Removing black holes from within a white circles

조회 수: 2 (최근 30일)
arjun
arjun 2014년 7월 28일
댓글: arjun 2014년 7월 28일
Hey, I want to remove the black patches that occur within the white circles, i tries using imfill(,'holes') but it turns the whole image white. I don't understand whats happening. Thanks

채택된 답변

Image Analyst
Image Analyst 2014년 7월 28일
You have white stuff around the border of the image, which means that everything will get filled. So call imclearborder first
binaryImage = imclearborder(binaryImage);
binaryImage = imfill(binaryImage, 'holes');
If you need to put the white border back, let me know.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by