MATLAB: How can i calculate area enclosed by contour

area;contourImage Processing Toolbox

I used snake to enclosed the left ventricle; how can i calculate area enclosed by contour?

Best Answer

If you used activecontour, it returns a binary image, so you simply label it and call regionprops:
labeledImage = bwlabel(binaryImage);
measurements = regionprops(labeledImage, 'Area');
allAreas = [measurements.Area];