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

4 次查看(过去 30 天)
how to calculate the area of certain portion of an image ?

采纳的回答

Image Analyst
Image Analyst 2014-1-2
编辑:Image Analyst 2014-1-2
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 个评论
Image Analyst
Image Analyst 2014-1-4
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geometric Transformation and Image Registration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by