Removing black holes from within a white circles

1 回表示 (過去 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.
  1 件のコメント
arjun
arjun 2014 年 7 月 28 日
Thanks a lot!it worked!

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by