Last active
February 4, 2022 18:37
-
-
Save FelixWeichselgartner/9c02424a3e62bccd3a320054d48fa790 to your computer and use it in GitHub Desktop.
very simple opencv camera test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import cv2 | |
cap = cv2.VideoCapture(0) | |
#cap.set(3, 1920) | |
#cap.set(4, 1080) | |
while(True): | |
ret, frame = cap.read() | |
cv2.imshow('frame', frame) | |
if cv2.waitKey(1) & 0xFF == ord('q'): | |
break | |
cap.release() | |
cv2.destroyAllWindows() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment