Object extraction from stripes image
Ältere Kommentare anzeigen
I have two images. one with stripes and another object with stripes. I would like to extract the object from these two images. These two are uint8 images. Also I want to find the depth of the object by showing images in the surf plot.
Could you give some hint?
I have used imsubtract but it won't give the desire results.
Pprs3 = imread('P1000571-min.JPG'); % Colour Image
Pprs1 = rgb2gray(Pprs3); % Grayscale Image
x = 0:size(Pprs1,2)-1;
y = 0:size(Pprs1,1)-1;
[X,Y] = meshgrid(x,y); % Coordinate Matrices (Not Necessary)
figure(1)
meshc(X, Y, Pprs1) % Mesh Plot
grid on
xlabel('X')
ylabel('Y')
zlabel('Intensity')
colormap(jet)
hold on
a = imread('P1000578-min.JPG'); % Colour Image
b = rgb2gray(a); % Grayscale Image
x = 0:size(b,2)-1;
y = 0:size(b,1)-1;
[X,Y] = meshgrid(x,y); % Coordinate Matrices (Not Necessary)
figure(2)
meshc(X, Y, b) % Mesh Plot
grid on
xlabel('X')
ylabel('Y')
zlabel('Intensity')
colormap(jet)
hold on
c = imsubtract(Pprs1,b);
x = 0:size(c,2)-1;
y = 0:size(c,1)-1;
[X,Y] = meshgrid(x,y); % Coordinate Matrices (Not Necessary)
figure(3)
meshc(X, Y, c) % Mesh Plot
grid on
xlabel('X')
ylabel('Y')
zlabel('Intensity')
colormap(jet)
In the attachment, images are given.
14 Kommentare
KALYAN ACHARJYA
am 23 Mai 2021
Bearbeitet: KALYAN ACHARJYA
am 30 Mai 2021
Initially forcus on ROI segmentation, surf in just one line code. As both images are not exactly co-alligned images, hence image subtraction may not be work.
Catalytic
am 23 Mai 2021
@Ayush singhal We'd rather not have to go digging into an attached .zip file to find your images. Why not insert them into your post so that we can understand the problem right away?
Ayush singhal
am 23 Mai 2021
Ayush singhal
am 23 Mai 2021
Catalytic
am 23 Mai 2021
It looks like the camera is in different positions for each of the images. Couldn't you just make life easier on yourself and retake the images with the camera fixed?


Ayush singhal
am 23 Mai 2021
I can't see @Catalytic's complete idea, but imsubtract should certainly work much better if the camera perspectives are the same.
Clearly also, the fact that stripe pattern on the hand is shifted relative to the background is supposed to provide some information about the depth.
Ayush singhal
am 23 Mai 2021
Matt J
am 23 Mai 2021
What 3D metric information do you have? Can you know the width of the stripes on the screen and the distance from the screen to the grate?
Ayush singhal
am 23 Mai 2021
Ayush singhal
am 25 Mai 2021
Ayush singhal
am 30 Mai 2021
KALYAN ACHARJYA
am 30 Mai 2021
In my spare time, I will try on new uploaded images
Ayush singhal
am 31 Mai 2021
Antworten (0)
Kategorien
Mehr zu Semantic Segmentation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!