From d04d0f3f316d583659a31a1ab4060176a0cd5b71 Mon Sep 17 00:00:00 2001 From: David Plowman Date: Tue, 19 Nov 2024 10:07:38 +0000 Subject: [PATCH] Add a test for grey world AWB Signed-off-by: David Plowman --- tests/grey_world.py | 18 ++++++++++++++++++ tests/test_list.txt | 1 + 2 files changed, 19 insertions(+) create mode 100755 tests/grey_world.py diff --git a/tests/grey_world.py b/tests/grey_world.py new file mode 100755 index 00000000..7edaafac --- /dev/null +++ b/tests/grey_world.py @@ -0,0 +1,18 @@ +#!/usr/bin/python3 +import time + +from picamera2 import Picamera2 + +# 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() diff --git a/tests/test_list.txt b/tests/test_list.txt index f87a2b41..b9a921b9 100644 --- a/tests/test_list.txt +++ b/tests/test_list.txt @@ -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