Skip to content

Instantly share code, notes, and snippets.

@KeenWarrior
Created July 16, 2018 17:58
Show Gist options
  • Save KeenWarrior/f744c68cf278560304a2ba82ad232860 to your computer and use it in GitHub Desktop.
Save KeenWarrior/f744c68cf278560304a2ba82ad232860 to your computer and use it in GitHub Desktop.
import cv2
cap = cv2.VideoCapture(0)
while 1:
ret, img = cap.read()
cv2.imshow('img', img)
k = cv2.waitKey(30) & 0xff
if k == 27:
break
cap.release()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment