I have a binary image and want to find the area of white in the image
조회 수: 2 (최근 30일)
이전 댓글 표시
I used rgb2gray(), im2bw and I have a Binary Image all is to find the area of the white portion
댓글 수: 0
답변 (1개)
Image Analyst
2016년 3월 8일
There are 3 ways
area1 = bwarea(binaryImage)
area2 = sum(binaryImage(:))
measurements = regionprops(logical(binaryImage), 'Area');
area3 = sum([measurements.Area])
The first one uses a different algorithm than the other two and will give different results depending on the shape of the boundary. The second two are just pixel counting.
댓글 수: 2
Image Analyst
2016년 3월 8일
See my attached spatial calibration demo. If that answers all your questions, can you mark it as Accepted?
참고 항목
카테고리
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!