how can I obtain Boundary of an image with morphological operators?
조회 수: 1 (최근 30일)
이전 댓글 표시
how can I obtain Boundary of an image with morphological operators? for example my image is A...I want to obtain Boundary and fill Within the image. thanks
채택된 답변
Image Analyst
2014년 9월 5일
I agree with Matt J. If you want an image you could also use bwperim(). To do it morphologically you'd call imerode() to shrink the blobs out one layer, then subtract that from the original
perimImage = binaryImage - imerode(binaryImage);
댓글 수: 7
Image Analyst
2014년 9월 5일
No it doesn't. I do it all the time. Just do this:
filledImage = imfill(binaryImage, 'holes');
Again, I do it all the time so I know for a fact that it works.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!