The question was previously \"How to select image of best contrast in OpenCV\" but as per @Rook\'s suggestion, I\'m changing it.
I am going to use OpenCV + Visual Studio
Entropy of image is used as a measure of contrast. See this code.
Entropy is a scalar value, statistical measure of randomness that can be used to characterize the texture of the input image. Entropy is defined as -sum(p.*log2(p)) where p contains the histogram counts.
Entropy is a scalar value, statistical measure of randomness that can be used to characterize the texture of the input image. Entropy is defined as
-sum(p.*log2(p))
where p contains the histogram counts.
p
— Matlab documentation