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!