Rymapt / ethoscope

a platform from monitoring animal behaviour in real time from a raspberry pi
http://gilestrolab.github.io/ethoscope/
GNU General Public License v3.0
0 stars 2 forks source link

Add a way to get the analogue camera gain from the camera class #39

Closed mark-grimes closed 7 years ago

mark-grimes commented 7 years ago

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.

mark-grimes commented 7 years ago

I'll merge this since it's required for other work from both @PaoloGB and me. If issues show up we can roll back later.