I have labeled regions, but, where are they on the image?

徘徊边缘 提交于 2019-12-11 19:35:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!