MATLAB: Comparing average greyscale of two images

comparisongrayscalemean

Hello,
I have two greyscale pictures, one is clearly darker than the other. I obtain the average grayscale of each using mean(mean(grayImg)).
But when I compare those two values the darker one has higher average value than the one with more whites. I don't understand how this can happen, and using other test images it happens the same thing.
What am I missing here?
Thanks for the help !

Best Answer

It could happen if you applied an inverse gray scale color map. Please attach your two images, and a screenshot of what they look like displayed.
By the way, you can use mean2() instead of mean(mean()).
Related Question