I have holes in my outline. How to fill holes because i like to apply a poly2mask to closed outline.Please I need your help
이전 댓글 표시
I have holes in my outline. How to fill holes because i like to apply a poly2mask to closed outline
댓글 수: 4
Walter Roberson
2012년 6월 19일
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
Mohamed Amine
2012년 6월 19일
Image Analyst
2012년 6월 19일
That link doesn't work.
Walter Roberson
2012년 6월 19일
It had an extra colon at the beginning
https://www.dropbox.com/sh/gb02kopgo0ukmx2/WesN7ZS7C1
답변 (1개)
Image Analyst
2012년 6월 20일
0 개 추천
Try edge linking. Here's one professor's implementation: http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/#edgelink
댓글 수: 13
Mohamed Amine
2012년 6월 20일
Walter Roberson
2012년 6월 20일
Example of using the method is at http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/LineSegments/example/index.html
Mohamed Amine
2012년 6월 20일
Mohamed Amine
2012년 6월 20일
Walter Roberson
2012년 6월 20일
Threshold and convert to BW before doing the Canny ?
The image link you gave above no longer has an image, and now has only a .mat file.
My memory of your image is that you had a fairly large gap, possibly larger than was suitable for this technique.
Have you tried using a convex hull and finding the "inside" edge of that?
Image Analyst
2012년 6월 20일
You may have to adjust some parameters to get it to link larger gaps. Or look for different edge linking routines or write your own. Or else just process your image in a different way so that you don't get gaps in the first place. Maybe use contour() or something...
Mohamed Amine
2012년 6월 20일
Walter Roberson
2012년 6월 20일
Threshold and convert to BW is a suggestion on how to deal with the differing reflectivity levels in the spoon. You asked for an example, right, not us to do your work for you, right?
Have you tried using a convex hull and finding the "inside" edge of that?
Please post your image up again; I seldom bother to download .mat files
Image Analyst
2012년 6월 20일
By the way, I can't use dropbox - my company blocks that one for some reason. Try tinypic.com.
Mohamed Amine
2012년 6월 20일
Walter Roberson
2012년 6월 20일
We're going to need the image back.
Image Analyst
2012년 6월 20일
Also tell us the big picture. Forget about the outline for the moment. What do you really want to measure in the image?
Ryan
2012년 6월 20일
The small holes could be closed with a dilation and re-thinning, iirc. Then find the end points (which would be the top gap) and connect them with a line.
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!