Skip to content

Instantly share code, notes, and snippets.

@marjinal1st
Created February 8, 2015 17:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marjinal1st/940673f46cc8248f072c to your computer and use it in GitHub Desktop.
Save marjinal1st/940673f46cc8248f072c to your computer and use it in GitHub Desktop.
import cv2
camera = cv2.VideoCapture(0)
camera.set(3, 1280)
camera.set(4, 720)
while True:
ret, image = camera.read()
cv2.imshow('Webcam', image)
if cv2.waitKey(0) & 0xFF == ord('q'):
break
camera.release()
cv2.destroyAllWindows()
@usa499
Copy link

usa499 commented Aug 1, 2018

I can see the green light next to the camera but no output in the monitior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment