Number of ones
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (2)
Image Analyst
il 13 Apr 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 Commenti
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!