Removing black holes from within a white circles
1 次查看(过去 30 天)
显示 更早的评论
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

0 个评论
采纳的回答
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 Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!