Find area from binary image.
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have this binary image:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169029/image.jpeg)
I want to encircle it with ellipse or any kind of boundary like below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169031/image.jpeg)
After this, I have to fill the area inside the boundary and want to found out the area of this boundary. How to do so?
Thanks.
0 个评论
采纳的回答
Image Analyst
2017-11-1
Try this:
binaryImage = bwconvhull(binaryImage, 'union');
area = bwarea(binaryImage);
% or for a simple sum of pixels:
area = sum(binaryImage(:));
0 个评论
更多回答(1 个)
Naga Sai Anupoju
2019-4-24
binaryImage = bwconvhull(binaryImage, 'union');
area = bwarea(binaryImage);
% or for a simple sum of pixels:
area = sum(binaryImage(:));
2 个评论
另请参阅
类别
在 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!