Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

estimate the value of the luminance (the amount of light) from the camera with openCV

I'am actually building an application on android using Samsung galaxy tab 10.1. I want to get the value of the luminance using the back Camera of the device.

The problem is that there is not a light sensor in the back of the device to just get the value that the light sensor gives to us . So I have to do it manually, in fact, I have to take frames in real time and for each frame I calculate the mean of the grayscale image, there is still a problem with that: With this method you will have false values because of the auto-correction of the camera and white balancing.

For instance, if you point the camera in front of a very bright source, the camera will focus on the bright area and all the area that surronds the bright point will became very dark so that the mean of the grayscale image gives us a false value ( it will not be very high in this case because there is dark area). I searched about method in the android API that disable such corrections but I do not found something interesting.

So, the question is: Is there a method in openCV than can help me having a nice estimation about the amount of light that enter to the back camera or some method that can help me accessing the parameters of the camera so that I manipulate them to , maybe , help me in the estimation of the luminance ?

Let me know if something is unclear ;) Thank you :D