The ambient light can be measured from the analogue gain the camera applies before shipping the image to the RPi. In order to create a light sensor we need to make this value available to the core code.
This Pull Request adds a general way to add and query metadata to the BaseCamera class, and sets the "analog_gain" (sic) in this metadata from the value from the Pi camera. To do this I had to ship the metadata over a multiprocessing.Queue since the camera runs in a separate process.
This doesn't make use of the gain yet, that will be done in a further Pull Request.
The ambient light can be measured from the analogue gain the camera applies before shipping the image to the RPi. In order to create a light sensor we need to make this value available to the core code.
This Pull Request adds a general way to add and query metadata to the BaseCamera class, and sets the "analog_gain" (sic) in this metadata from the value from the Pi camera. To do this I had to ship the metadata over a
multiprocessing.Queue
since the camera runs in a separate process.This doesn't make use of the gain yet, that will be done in a further Pull Request.