Sensor gain documentation

It would be good to mention in the documentation:

  • Why can the gain ceiling go up to 128 with the H7+ although gain can only be set to a maximum of 36 (using set_auto_gain(False, gain_db=64))?

  • Doesn’t the ceiling gain value represent dB?

  • What is the default gain ceiling and maximum gain for the different sensors?

Use sensor — camera sensor — MicroPython 1.15 documentation to set the gain ceiling. The sensor — camera sensor — MicroPython 1.15 documentation is an old function that directly sets the gain which you should not use anymore. E.g. it’s not in dB.

I choose to represent everything in dB so there’d be a way to talk about all cameras universally since each camera module has different settings controls.

If you want to see the max for each sensor please check the datasheet. However, for some sensors it’s not documented and we had to reverse engineer things.

Interesting. Thanks @kwagyeman, it makes sense indeed to talk only about dB in that context. Maybe the old set_gainceiling function could be removed for clarity. I checked the sensor datasheet for the OV5645 but could not find the info so I guess max gain should be around 36 dB as I cannot manually set it higher with the gain_db argument of the sensor_set_auto_gain function.

Yeah… it’s not documented… however, I guessed how it worked from other camera sensors made by OmniVision.