How do I find the radius and count of the black circles (blobs) in the image.

1 回表示 (過去 30 日間)
Abhilash Sukumari
Abhilash Sukumari 2020 年 3 月 17 日
回答済み: Image Analyst 2020 年 3 月 17 日
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.

採用された回答

Image Analyst
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 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by