MATLAB: I have a black and white image, how can I find the area percentage of the black areas

image processingregions

I have this black and white image. What I need is the percentage of the black areas. I first change the contrast so the black and white areas are more distinguishable. but I don’t know how to proceed from here. I'd appreciate if someone let me know which function(s) I should use.

Best Answer

Assuming you've "binarized" the image, so that black=0 and white=1,
percentageBlack=(1-nnz(image)/numel(image))*100