Extract objects from binary image

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.

Antworten (1)

Matt J
Matt J am 18 Apr. 2021
Bearbeitet: Matt J am 18 Apr. 2021

0 Stimmen

Something like this perhaps,
BW=bwareafilt(~yourBinarizedImage,3);
regions=regionprops(BW,'Image');

3 Kommentare

Walter Roberson
Walter Roberson am 18 Apr. 2021
In particular, regionprops and ask for 'Area'
Matt J
Matt J am 18 Apr. 2021
Bearbeitet: Matt J am 18 Apr. 2021
Depending on what "matrix of the area" means... To me, it sounds like the sub-image containing the bounding box of the regions.
I would interpret it as a single matrix containing all three areas.
Areas = [regions.Area];

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 18 Apr. 2021

Bearbeitet:

am 18 Apr. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by