Removing black holes from within a white circles

1 Ansicht (letzte 30 Tage)
arjun
arjun am 28 Jul. 2014
Kommentiert: arjun am 28 Jul. 2014
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

Akzeptierte Antwort

Image Analyst
Image Analyst am 28 Jul. 2014
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.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by