How to determine if an image is dark?
To determin if an image is dark, simply calculate the average intensity and judge it.
The problem for the recognition although is not that the image is dark, but that it has a low contrast. A bright image with the same contrast would yield the same bad results.
Histogram equalization is a method that is used to improve images for human vision. Humans have difficulties to distinguish between very similar intensity values. A problem that a computer does not have, unless your algorithm is somehow made to mimic human vision with all its flaws.
A low contrast image bears little information. There is no image enhancement algorithm in the world that will add any further information.
I won't get into too much detail about image characterization. You'll find plenty of resources online or in text books.
A simple measure would be to calculate the standard deviation of image regions you are interested in.
I have some images i'm using for face recognition.
Some of the images are very dark.
I don't want to use Histogram equalisation on all the images only on the dark ones.
How can i determine if an image is dark?
I'm using opencv in python.
I would like to understand the theory and the implementation.
Thanks