edge detection and linking

조회 수: 9 (최근 30일)
Sader Yousif
Sader Yousif 2014년 9월 13일
댓글: Image Analyst 2014년 9월 14일
Hello, I am doing contour detection using Canny Edge detection and I am trying to fill the broken edges and struggling to do that. please anyone can post some solutions or ideas. this is the original image and then the result.. my original aim is to find the external contour only.

답변 (1개)

Image Analyst
Image Analyst 2014년 9월 13일
Professor Peter Kovesi's site has edge linking code: http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/#edgelink
  댓글 수: 3
Image Analyst
Image Analyst 2014년 9월 14일
Sader's "Answer" moved here since it's a reply to me and not an "Answer" to the original question:
thanks for your answer but the first code does not do link edge but outlining all disconnected edges in different colors as I have tried it before and you can see his result.
the second code does not have any thing with what I have asked.. please any other solution or can you please apply the code on the deers and let me know.
I=imread('test03.jpg');
figure, imshow(I);
title('original image');
YCBCR=rgb2ycbcr(I);
Y=I(:,:,1);
sigma=1.5;
BW1=edge(Y,'canny',[0.1 0.4],sigma,'Thinning');
figure, imshow(BW1);
Image Analyst
Image Analyst 2014년 9월 14일
Not sure why you don't see how active contours apply, but anyway another option is to use imclose() to close the gaps. Not sure what you want to do after that but if you want to make the outlines into a solid mask, you can call imfill().

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by