simple sample

This commit is contained in:
Oskar Kapala 2025-07-29 19:58:11 +02:00
parent 098e7c3bc6
commit 326a1acd99

21
super-simple.py Normal file
View file

@ -0,0 +1,21 @@
import cv2
cap = cv2.VideoCapture(0)
if not cap.isOpened():
print("Nie można otworzyć kamery!")
exit()
while True:
ret, frame = cap.read()
if not ret:
print("Nie udało się odczytać klatki!")
break
cv2.imshow("Podgląd z kamery", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()