number of white pixels
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Andrei Bobrov
le 13 Fév 2012
eg
BW = rand(15)<.5+0;
L = bwlabel(BW, 8);
out = [(1:max(L(:))).',accumarray(nonzeros(L),ones(nnz(L),1))]
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!