MATLAB Answers

Extract objects from binary image

조회 수: 14(최근 30일)
Yoav weber
Yoav weber 18 Apr 2021 20:41
편집: Yoav weber 18 Apr 2021 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 18 Apr 2021 21:18
편집: Matt J 18 Apr 2021 21:19
Something like this perhaps,
BW=bwareafilt(~yourBinarizedImage,3);
regions=regionprops(BW,'Image');
  댓글 수: 3
Walter Roberson
Walter Roberson 18 Apr 2021 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