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

17 views (last 30 days)
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.

Accepted Answer

Matt J
Matt J on 17 Nov 2015
Edited: Matt J on 17 Nov 2015
Assuming you've "binarized" the image, so that black=0 and white=1,
percentageBlack=(1-nnz(image)/numel(image))*100
  7 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!