Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4829

Python • Re: How to lock AWB with Picamera2 API

$
0
0
If you want to stop the AWB changing after it's had a few moments to settle, send

Code:

picam2.set_controls({'AwbEnable': False})
If you have specific colour gains that you want to set, use

Code:

picam2,set_controls({'ColourGains': (red_gain, blue_gain)})
The code you have should work if you use "set_controls" after "configure" (calling "configure" wipes out any other settings).

For the moment, I would advise against setting AeEnable to False if you're also setting the exposure and analogue gain as there are some sequencing problems that may cause an unexpected result (setting the exposure and gain will disable AE automatically, so it actually doesn't need doing explicitly). Ditto AWB, if you set the colour gains no need to set AwbEnable to False either (again, not 100% sure what would happen).

Statistics: Posted by therealdavidp — Mon Feb 05, 2024 9:40 am



Viewing all articles
Browse latest Browse all 4829

Trending Articles