Skip to content

Commit 98a0d46

Browse files
committed
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 <[email protected]>
1 parent adb3513 commit 98a0d46

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/crop_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515

1616
for m, l in [(False, False), (False, True), (True, False), (True, True)]:
1717
cfg = picam2.create_video_configuration(main={"size": (1920, 1080), "format": 'XRGB8888', "preserve_ar": m},
18-
lores={"size": (640, 640), "format": 'XRGB8888', "preserve_ar": l},
18+
lores={"size": (320, 320), "format": 'XRGB8888', "preserve_ar": l},
1919
display="main")
2020
picam2.configure(cfg)
2121
picam2.start(show_preview=True)
2222

23-
for _ in range(100):
23+
for _ in range(50):
2424
im = picam2.capture_array("lores")
2525
cv2.imshow("lores", im)
26-
cv2.resizeWindow("lores", (640, 640))
2726
cv2.waitKey(1)
2827

2928
picam2.stop()

0 commit comments

Comments
 (0)