问题
Is there a way to use camera (web camera or phone camera) as a light meter? Phone camera can grab image and get data in RGB format, but has anyone tried to determine illuminance value (in lux)?
I am aware that there is no formula to do this (correct me if I am wrong), but is it possible to model it, and get an approximate value of illuminance?
回答1:
The problem you would have, as all reflective light meters do, is that you can't tell the difference between a bright light (high lux) shining on a dark object and a dim light (low lux) shining on a light object. In other words, you get luminance, not illumination.
The second problem is that you need to know the amplifier gain, exposure settings (f-stop, exposure time), transfer function (gamma), and other information to be able to get a correct photometric interpretation of the pixels in the image. If you have that information, though, you can just ignore the pixel data and just use the exposure information as a light meter.
The EXIF data in an image will tell you the exposure values which you can add up to get the luminance. See http://en.wikipedia.org/wiki/APEX_system for more details.
来源:https://stackoverflow.com/questions/2720411/determine-illuminance-from-rgb-image