How to fill holes having area less than some maximum threshold value?
조회 수: 12 (최근 30일)
이전 댓글 표시
I have a binary image, I want to fill only those holes having area less than say 20, and holes having area more than that remains unfilled...how can I do this...any sort of help is appreciated
댓글 수: 0
채택된 답변
Image Analyst
2015년 7월 18일
Invert the image so that the holes are now foreground blobs, then call bwareaopen, and invert again
binaryImage = ~bwareaopen(~binaryImage, 20);
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!