Number of ones
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
counting number of ones occured in labelled binary image for specific rows and storing the values in a vector like number of ones in x row
0 commentaires
Réponses (2)
Image Analyst
le 13 Avr 2012
Try this:
% Create a sample binary image.
binaryImage = logical(randi(2, [5 7])-1)
% Count the ones in each row.
numberOfOnesPerRow = sum(binaryImage, 2)
0 commentaires
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!