bwconncomp, use the ids assigned by Matlab in a image.
显示 更早的评论
Hi, when I use bwconncomp function, this create a cc 1x1 struct
Connectivity 8 ImageSize [145 145] NumObjects 7 PixelIdxList 1x7 cell
is there a way to get the numobjects value using a function to can use this one to create others functions or tasks?
采纳的回答
更多回答(1 个)
Mani
2012-8-22
0 个投票
use numPixels = cellfun(@numel,CC.PixelIdxList); objects=length(numPixels);
hope that answers
1 个评论
Image Analyst
2012-8-22
Or you could just ask for the Area when you call regionprops (which you've already had to have had called if you had PixelIdxList)
类别
在 帮助中心 和 File Exchange 中查找有关 Region and Image Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!