Find area from binary image.

1 view (last 30 days)
Naseeb Gill
Naseeb Gill on 1 Nov 2017
Commented: darova on 27 Apr 2019
Hello,
I have this binary image:
I want to encircle it with ellipse or any kind of boundary like below:
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.

Accepted Answer

Image Analyst
Image Analyst on 1 Nov 2017
Try this:
binaryImage = bwconvhull(binaryImage, 'union');
area = bwarea(binaryImage);
% or for a simple sum of pixels:
area = sum(binaryImage(:));

More Answers (1)

Naga Sai Anupoju
Naga Sai Anupoju on 24 Apr 2019
binaryImage = bwconvhull(binaryImage, 'union');
area = bwarea(binaryImage);
% or for a simple sum of pixels:
area = sum(binaryImage(:));
  2 Comments
Image Analyst
Image Analyst on 27 Apr 2019
??? This answer is identical to the one I posted a year and a half ago.
darova
darova on 27 Apr 2019
Use special button for code inserting please
Untitled.png

Sign in to comment.

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!