MATLAB: How to calculate area of an irregular shape region in a binary image

areaImage Processing Toolbox

Is there any way to calculate the area of the irregular regions in a binary image? I am attaching the image here.Kindly help me.

Best Answer

  • Try this:
    props = regionprops(binaryImage, 'Area');
    allAreas = [props.Area]