Confusing documentation re: auto gain/exposure

On the VIDEO_SETTINGS documentation page, there is a note under GAIN that reads:

If EXPOSURE is set to -1 (automatic mode), then GAIN will be automatic as well.

This implies that the procedure for setting auto gain is to set EXPOSURE to -1.

However, there are two other points that contradict this:

  • The docs for EXPOSURE do not mention -1, and state that the range is 0 to 100.
  • The docs for AEC_AGC state that this setting is what controls if gain/exposure is automatic or not (as opposed to setting EXPOSURE to -1).

My question is, what is the proper way to enable auto gain/exposure? Is it to set EXPOSURE to -1, or is it to enable AEC_AGC?

Also, can the documentation be clarified at some point in the future?


Hi @JC3
AEC_AGC controls the automatic GAIN/EXPOSURE behavior.

By setting EXPOSURE to -1 you obtain the same effect as setting AEC_AGC to 1 (-1 is kept for compatibility with older versions of the SDK).
If you set GAIN or EXPOSURE to a value in the range [0,100] you automatically set AEC_AGC to 0 and enable the manual control of these two parameters.

1 Like

Makes sense; thank you!