-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Describe the bug
When using the new AWB algorithm, setting AWB gains is broken after changing the camera resolution (and possibly other properties?). Upon changing the resolution, the AWB gains seem to reset to their Auto values, and changing them back is broken.
To reproduce
Easiest to demonstrate in Python
import picamera as cam
import time
c = cam.PiCamera()
c.start_preview()
# Set the AWB mode to change the gains
c.awb_mode = "tungsten"
time.sleep(2)
# Show, and store, the gains it settled on
print(c.awb_gains)
g = c.awb_gains
# Turn auto AWB off, fixing the gains
c.awb_mode = "off"
time.sleep(2)
# Store the current resolution
r=c.resolution
# Apply a "new" resolution
c.resolution=r
print("At this point, the AWB gains will have reset if using the new AWB algorithm")
time.sleep(1)
# Try to set the AWB gains back
c.awb_gains = g
# Note: it didn't work
print(c.awb_gains)
# Wait for it to work...
time.sleep(2)
# It still doesn't work...
print(c.awb_gains)
print(c.awb_mode)
c.stop_preview()
Expected behaviour
- Changing resolution shouldn't reset the AWB gains
- AWB gains should be changeable after this anyway, if AWB is off.
Actual behaviour
- Changing resolution resets AWB gains, seemingly to their values when AWB is set to "auto"
- Turning the AWB off and trying to set new AWB gains after this point silently fails. AWB gains remain fixed at their reset values.
System
- Pi3B+
- Firmware 38e81f2, and 1.20190718 tested
Additional context
These issues seem related:
waveform80/picamera#581
waveform80/picamera#580
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels