Extract objects from binary image

2 次查看(过去 30 天)
Yoav weber
Yoav weber 2021-4-18
编辑: Yoav weber 2021-4-18
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
编辑:Matt J 2021-4-18
Something like this perhaps,
BW=bwareafilt(~yourBinarizedImage,3);
regions=regionprops(BW,'Image');
  3 个评论
Matt J
Matt J 2021-4-18
编辑:Matt J 2021-4-18
Depending on what "matrix of the area" means... To me, it sounds like the sub-image containing the bounding box of the regions.
Walter Roberson
Walter Roberson 2021-4-18
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