I have a binary image and want to find the area of white in the image
1 回表示 (過去 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!