问题
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.
回答1:
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');
来源:https://stackoverflow.com/questions/20679066/i-have-labeled-regions-but-where-are-they-on-the-image