how to find the largest object in the coin image?

조회 수: 12 (최근 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)

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by