MATLAB: How to calculate the area of an input image

areabinaryimageImage Processing Toolbox

I want to calculate the area of the FULL binary image the user inputs is it as simple as heightXwidth if so what function does it

Best Answer

If it is a binary image (so a 2D array), the numel (link) function will do what you want.
It is equivalent to prod(size(BI)), where ‘BI’ is your binary image.