How do I find the radius and count of the black circles (blobs) in the image.
2 次查看(过去 30 天)
显示 更早的评论
The tricky part is that imfindcircles gets confused between the inner white circle and the boundary. How do I use edge detect on just the black circle ? I would like to completely transform this image into pure black and white image so that I can use imfindcircles to get the answers. Any advise is appreciated.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/277724/image.bmp)
0 个评论
采纳的回答
Image Analyst
2020-3-17
Just get rid of them:
% Invert mask so black is white.
mask = ~mask;
% Fill holes
mask = imfill(mask, 'holes');
No need to invert again and turn your object black since MATLAB only considers the white blobs when doing operations.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!