Skip to content

Commit

Permalink
Add a test for grey world AWB
Browse files Browse the repository at this point in the history
Signed-off-by: David Plowman <[email protected]>
  • Loading branch information
davidplowman committed Nov 19, 2024
1 parent f8f9a63 commit 59c44d7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/grey_world.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/python3
import time

from picamera2 import Picamera2, Preview

# Here we load up the tuning for the HQ cam and alter the default exposure profile.
# For more information on what can be changed, see chapter 5 in
# https://datasheets.raspberrypi.com/camera/raspberry-pi-camera-guide.pdf

tuning = Picamera2.load_tuning_file("imx477.json")
awb = Picamera2.find_tuning_algo(tuning, "rpi.awb")
awb.clear()
awb['bayes'] = 0
picam2 = Picamera2(tuning=tuning)
picam2.configure(picam2.create_preview_configuration())
picam2.start()
time.sleep(2)
picam2.stop()
1 change: 1 addition & 0 deletions tests/test_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ tests/easy_video2.py
tests/egl_leak.py
tests/encoder_start_stop.py
tests/ffmpeg_abort.py
tests/grey_world.py
tests/imx708_device.py
tests/large_datagram.py
tests/mjpeg_server.py
Expand Down

0 comments on commit 59c44d7

Please sign in to comment.