Edge detection in gradient images
Mostrar comentarios más antiguos
Hello,
I am trying to detect a smooth boundary of an image (attached) to find contact angles of each component in contact (the whole image is not attached).
Firstly, I averaged 3*3 pixels to reduce noises and then, used 'imgradient()' to detect the boundary (subplot(2,2,3)).
To get a single boundary line, I used 'edge()' and tried different methods (Solbel, Canny, etc.), but I am getting two boundaries, which I didn't intend... Is there any way that I can get only the inner line (orange arrows are indicating) in the last picture (subplot(2,2,4))?
I googled and searched but I could not find clear solutions on this so far. I really appreciate your time and comments in advance.

Respuesta aceptada
Más respuestas (1)
Simon Chan
el 1 de Sept. de 2021
Try Otsu's method
rawdata=imread('capture 1.png');
I = rgb2gray(rawdata);
level = graythresh(I);
BW = imbinarize(I,level);
J = edge(BW);
imshow(J);

1 comentario
autumn
el 4 de Sept. de 2021
Categorías
Más información sobre Object Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
