how to find the smallest object in the coin image?
17 ビュー (過去 30 日間)
古いコメントを表示
how to find the smallest object in the image below ? the code I wrote below does not work

A = imread('eight.tif');
C=imbinarize(A, 'adaptive', 'ForegroundPolarity', 'dark');
figure,imshow(C)
BW3=bwareafilt(C,1,'smallest');
figure, imshow(BW3)
0 件のコメント
採用された回答
Matt J
2022 年 1 月 1 日
編集済み: Matt J
2022 年 1 月 1 日
This should make it easier:
A = imread('eight.tif');
C=imbinarize(A, 'adaptive', 'ForegroundPolarity', 'dark');
C=bwareafilt( bwconvhull(~C,'objects') ,4);
figure,imshow(C)
4 件のコメント
Matt J
2022 年 1 月 1 日
okay, well if you think the problem is solved, then please Accept-click the answer to indicate so.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!