Skip to content

Instantly share code, notes, and snippets.

@marjinal1st
Created February 8, 2015 17:58
Show Gist options
  • Select an option

  • Save marjinal1st/940673f46cc8248f072c to your computer and use it in GitHub Desktop.

Select an option

Save marjinal1st/940673f46cc8248f072c to your computer and use it in GitHub Desktop.

Revisions

  1. marjinal1st created this gist Feb 8, 2015.
    17 changes: 17 additions & 0 deletions opencv-camera-test
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    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()