本文介绍了我已经标记了区域,但是图像上它们在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已使用regionprops()
中的属性Area
来查找标签图像中每个标签区域的面积.
I have used the property Area
in regionprops()
in order to find the area of every labeled region in a labeled image.
例如,这里的问题是,我现在有300
标记的区域.我现在知道每个标记区域的面积.但是,我怎么知道每个标签代表图像中的哪个区域.假设我有一个标签为"176"的区域.我怎么知道图像的哪一部分代表这个标签?
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?
谢谢.
推荐答案
您已为此添加了标签区域.例如
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');
这篇关于我已经标记了区域,但是图像上它们在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!