Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom awb_gains not working #581

Closed
JolleJolles opened this issue Jul 31, 2019 · 1 comment
Closed

Custom awb_gains not working #581

JolleJolles opened this issue Jul 31, 2019 · 1 comment

Comments

@JolleJolles
Copy link

JolleJolles commented Jul 31, 2019

I am trying to set custom gains and created the following script based on the picamera documentation

`from time import sleep
from picamera import PiCamera
from fractions import Fraction

camera = PiCamera(resolution=(1280, 720), framerate=30)
camera.iso = 100
sleep(2)
camera.shutter_speed = camera.exposure_speed
camera.exposure_mode = 'off'
g = camera.awb_gains
camera.awb_mode = 'off'
camera.awb_gains = (2.5, 2.5)
camera.capture('try.jpg')
print(camera.awb_gains)`

But whatever I put as camera.awb_gains, also with Fractions, the values returned are always very similar fractions in the range (Fraction(167, 128), Fraction(257, 128)). The images returned also always have a nice white balance and not the overly red or blue that I would expect with the provided awb_gains.

I am testing this on a rpi 3B+

Originally posted by @JolleJolles in #318 (comment)

@JolleJolles
Copy link
Author

I could fix it by adding sleep(0.1) after setting the awb_gains

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant