In this lesson we show you step-by-step how to launch a WEB camera using OpenCV running on windows. In the video we show how to install OpenCV and how to write your first simple programs. Below is the code we developed in the video to launch the WEB cam.
1 2 3 4 5 6 7 8 9 10 | import cv2 print(cv2.__version__) cam=cv2.VideoCapture(1) while True: ignore, frame = cam.read() cv2.imshow('my WEBcam', frame) cv2.moveWindow('my WEBcam',0,0) if cv2.waitKey(1) & 0xff ==ord('q'): break cam.release() |