number of white pixels
조회 수: 4 (최근 30일)
이전 댓글 표시
Sir, I am finding connected components of image
L = bwlabel(BW, n) [L, num] = bwlabel(BW, n) How to find out number of white pixels in each connected component
Regards,
댓글 수: 0
답변 (1개)
Andrei Bobrov
2012년 2월 13일
eg
BW = rand(15)<.5+0;
L = bwlabel(BW, 8);
out = [(1:max(L(:))).',accumarray(nonzeros(L),ones(nnz(L),1))]
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!