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!