From 098e7c3bc655924884d713ae9af3ea3a1aea3fe0 Mon Sep 17 00:00:00 2001 From: Oskar Kapala Date: Tue, 29 Jul 2025 19:47:52 +0200 Subject: [PATCH] picamera2 sample --- picamera2-sample.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 picamera2-sample.py diff --git a/picamera2-sample.py b/picamera2-sample.py new file mode 100644 index 0000000..f4b556c --- /dev/null +++ b/picamera2-sample.py @@ -0,0 +1,14 @@ +from picamera2 import Picamera2 +import cv2 + +picam2 = Picamera2() +picam2.configure(picam2.create_preview_configuration(main={"size": (1024, 576)})) +picam2.start() + +while True: + frame = picam2.capture_array() + cv2.imshow("PodglÄ…d", frame) + if cv2.waitKey(1) & 0xFF == ord('q'): + break + +cv2.destroyAllWindows() \ No newline at end of file