how to calculate the area of certain portion of an image ?

9 views (last 30 days)
how to calculate the area of certain portion of an image ?

Accepted Answer

Image Analyst
Image Analyst on 2 Jan 2014
Edited: Image Analyst on 2 Jan 2014
Call regionprops(). See my Image Segmentation Tutorial. It goes over all of that:
For example with a simple thresholding:
binaryImage = grayImage > 90;
measurements = regionprops(binaryImage, 'Area');
allAreas = [measurements.Area];
  2 Comments
Image Analyst
Image Analyst on 4 Jan 2014
Then just get it. For example to get the area of blob #42, do this
blob42area = allAreas(42);
blob42area = measurements(42).Area; % Same thing as above.

Sign in to comment.

More Answers (0)

Categories

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

Community Treasure Hunt

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

Start Hunting!