how to find the largest region in binary image and replace all other region with black?

20 ビュー (過去 30 日間)
I have a binary image (attached as 'randomm.jpg') that consists of several shapes.
How to extract the shape with most pixels (white) and replace other figures with black?
Thank you!

採用された回答

Walter Roberson
Walter Roberson 2017 年 5 月 6 日
  2 件のコメント
Image Analyst
Image Analyst 2017 年 5 月 6 日
binaryImage = bwareafilt(binaryImage, 1);
Sokhib Tukhtayev
Sokhib Tukhtayev 2017 年 5 月 6 日
Awesome, thank you!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by