Edge detection in gradient images
이전 댓글 표시
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.

채택된 답변
추가 답변 (1개)
Simon Chan
2021년 9월 1일
Try Otsu's method
rawdata=imread('capture 1.png');
I = rgb2gray(rawdata);
level = graythresh(I);
BW = imbinarize(I,level);
J = edge(BW);
imshow(J);

카테고리
도움말 센터 및 File Exchange에서 Object Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
