Skip to content

Instantly share code, notes, and snippets.

@FelixWeichselgartner
Last active February 4, 2022 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FelixWeichselgartner/9c02424a3e62bccd3a320054d48fa790 to your computer and use it in GitHub Desktop.
Save FelixWeichselgartner/9c02424a3e62bccd3a320054d48fa790 to your computer and use it in GitHub Desktop.
very simple opencv camera test
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