label_regions
显示 更早的评论
I would like a function that accepts a binary image and returns an image. The output image has the same dimensions as the input image, and the value of each pixel of the output image is an index describing what region that pixel belongs to. That is, each region in the input binary image is assigned a unique index, and that index is placed in the corresponding pixels of the output image.
Does such a function exist?
For those who are familiar with IDL, I'm looking for the Matlab equivalent of label_regions.
回答(1 个)
Image Analyst
2011-10-15
0 个投票
You can use bwlabel() http://www.mathworks.com/help/toolbox/images/ref/bwlabel.html in the Image Processing Toolbox. It's still there, but there is a more efficient version called bwconncomp() http://www.mathworks.com/help/toolbox/images/ref/bwconncomp.html in newer versions of the toolbox.
类别
在 帮助中心 和 File Exchange 中查找有关 Images 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!