how to find the largest object in the coin image?

5 ビュー (過去 30 日間)
betty
betty 2022 年 1 月 1 日
コメント済み: betty 2022 年 1 月 1 日
how to find the largest object in the image below ? the code I wrote below does not work
A = imread('eight.tif');
C=imbinarize(A);
figure,imshow(C)
B=bwareafilt(C,1);
figure,imshow(B)

採用された回答

Walter Roberson
Walter Roberson 2022 年 1 月 1 日
A = imread('eight.tif');
C=imbinarize(A, 'adaptive', 'ForegroundPolarity', 'dark');
figure,imshow(C)
B=bwareafilt(~C,1);
figure,imshow(~B)
  1 件のコメント
betty
betty 2022 年 1 月 1 日
Thank you very much

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by