Measuring Line Profiles in IMages

36 Ansichten (letzte 30 Tage)
Vivek
Vivek am 11 Sep. 2025 um 15:25
Bearbeitet: Matt J am 22 Sep. 2025 um 21:37
I have a image such as below which has horizontal and vertical lines in the field of view. I want to segment the vertical line adjacent to the dark area such as in red below and vertical line in the intersection of the horizontal line(as seen in black).The full image has many such structiures. I want to stack all similar segmented structures within the fov (Average measuremnet of red and black) and display.I also want to measure the average x and y as shown below if the red line concaves at the max conving location in y.

Akzeptierte Antwort

Matt J
Matt J am 11 Sep. 2025 um 16:28
I=im2double(im2gray(imread('image.png')));
BW=imbinarize(I);
D=bwareaopen(abs(gradient(I))>0.06,20);
D=imclose(D,strel('disk',5));
black=(median(BW,2)>0);
red=~black;
L=D.*red+2*D.*black;
imshow(labeloverlay(I,L,Colormap=[1,0,0;0,0,0]));
  4 Kommentare
Vivek
Vivek am 22 Sep. 2025 um 21:20
What I meant is I want to overlay all the left and right edges to get a visual idea of how the profile varies
Matt J
Matt J am 22 Sep. 2025 um 21:25
Bearbeitet: Matt J am 22 Sep. 2025 um 21:37
But again, how will you "overlay" them when they are not all the same size? If you will crop them to a common size, what is to determine the boundaries of the cropped region?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by