From fdef49c2268a296c74b47579b7b910a57da411d8 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Tue, 12 Nov 2024 09:50:43 +0000 Subject: [PATCH] tests: crops: Reduce the size of the lores image Due to a rendering bug, if the lores viewfinder covers the main viewfinder, updates stall for an unknown reason. Avoid this temporarily by reducing the preview image resolution. Also lower the test time by reducing the number of frames run in each config. Signed-off-by: Naushir Patuck --- tests/crop_test.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/crop_test.py b/tests/crop_test.py index e3b9e287..350123f9 100644 --- a/tests/crop_test.py +++ b/tests/crop_test.py @@ -15,15 +15,14 @@ for m, l in [(False, False), (False, True), (True, False), (True, True)]: cfg = picam2.create_video_configuration(main={"size": (1920, 1080), "format": 'XRGB8888', "preserve_ar": m}, - lores={"size": (640, 640), "format": 'XRGB8888', "preserve_ar": l}, + lores={"size": (320, 320), "format": 'XRGB8888', "preserve_ar": l}, display="main") picam2.configure(cfg) picam2.start(show_preview=True) - for _ in range(100): + for _ in range(50): im = picam2.capture_array("lores") cv2.imshow("lores", im) - cv2.resizeWindow("lores", (640, 640)) cv2.waitKey(1) picam2.stop()