I want to turn off AE and AWB and control the camera my self #592
-
Hi, In my environment the lighting is controlled based on the image, at present the automatic functions are fighting against the external lighting control. I want to turn off the camera controls (which is easy AeEnable set false and AwbEnable set false) but I have been unable to work out which controls/properties I then need to set. I have played with "Brightness" and "Contrast" but quickly realised that this was not enough/ If possible I would like to set the AE and AWB on, read the values it settles on then set AE and AWB off with the values set to match what the camera was doing as a starting point to adjust to my needs. If anyone can help me I would appreciate it. regards Mike Lerwill |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, thanks for the question. To control the camera brightness yourself, please use the To control the AWB, set the When the camera starts, by default AGC/AEC and AWB are both already running. You can leave them a moment and then read the At this point you can set those values explicitly, or you can just turn off |
Beta Was this translation helpful? Give feedback.
Hi, thanks for the question.
To control the camera brightness yourself, please use the
picam2.set_controls
method to adjust the"ExposureTime"
and"AnalogueGain"
values. Setting both of these will automatically disable the auto AGC/AEC.To control the AWB, set the
"ColourGains"
control. Again, doing so will disable the auto AWB.When the camera starts, by default AGC/AEC and AWB are both already running. You can leave them a moment and then read the
"ExposureTime"
,"AnalogueGain"
and"ColourGains"
values from the image metadata (for example, usepicam2.capture_metadata()
).At this point you can set those values explicitly, or you can just turn off
"AeEnable"
and"AwbEnable"
which will fix…