Number of ones
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Image Analyst
2012 年 4 月 13 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!