number of white pixels
2 ビュー (過去 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!