MATLAB Answers

Extract objects from binary image

14 ビュー (過去 30 日間)
Yoav weber
Yoav weber 2021 年 4 月 18 日 20:41
編集済み: Yoav weber 2021 年 4 月 18 日 22:08
Hey,
I am looking for a way to extrac objects from an binary image.
For example, Given the following image, I am looking for a way to get the matrix of the area of each of those 3 big objects.
Thank you in advance.

回答 (1 件)

Matt J
Matt J 2021 年 4 月 18 日 21:18
編集済み: Matt J 2021 年 4 月 18 日 21:19
Something like this perhaps,
BW=bwareafilt(~yourBinarizedImage,3);
regions=regionprops(BW,'Image');
  3 件のコメント
Walter Roberson
Walter Roberson 2021 年 4 月 18 日 21:51
I would interpret it as a single matrix containing all three areas.
Areas = [regions.Area];

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

Community Treasure Hunt

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

Start Hunting!

Translated by