Question

I have used the property Area in regionprops() in order to find the area of every labeled region in a labeled image.

The question here is, for instance, say that I now have 300 labeled regions. I now know the area of each labeled region. But, how can I know which region in the image each label represents. Say that I have a region with label "176". How can I know what part of the image represents this label?

Thanks.

Was it helpful?

Solution

You have the labeled regions for this. For example

L = bwlabel( BW ); % L is your labled image
rg = regionprops( L, 'Area' ); % you use L for regionprops
figure; imagesc( L == 176 );axis image; title('showing region 176');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top