How to calculate the luminance of an image? Is there any method for calculating luminance of an image?

As from wiki got to know Luminance is an amount of energy perceived by the observer and LUX is different from brightness.

But still is there any way to calculate LUX value of an image using any of image processing technique.
https://stackoverflow.com/a/4876528/4523099


  Just convert your image to YUV format and calculate the average of luma channel. Color conversion is a typical operation and any decent image processing framework supports it. For example, OpenCV has CvtColor.


However, to get an actual Lux value, you will need to calibrate your camera and tell whether it has an auto-setting aperture (see the link above for more details).