フィルターのクリア

bwconncomp, use the ids assigned by Matlab in a image.

2 ビュー (過去 30 日間)
Jesus Luevano
Jesus Luevano 2012 年 8 月 22 日
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?

採用された回答

Image Analyst
Image Analyst 2012 年 8 月 22 日
You can use bwlabel instead. Is this what you mean?
[labeledImage numberOfObjects] = bwlabel(binaryImage);
or maybe you want the labelmatrix() function?

その他の回答 (1 件)

Mani
Mani 2012 年 8 月 22 日
use numPixels = cellfun(@numel,CC.PixelIdxList); objects=length(numPixels);
hope that answers
  1 件のコメント
Image Analyst
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)

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by