Created
July 14, 2021 14:35
-
-
Save codewithpom/a737daa2dd9787254a52eff8d788da17 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
# I used this line because I have external camera. | |
# You do not need to use cv2.CAP_DSHOW if you do not use external camera | |
cam = cv2.VideoCapture(0, cv2.CAP_DSHOW) | |
while True: | |
ret, frame = cam.read() | |
cv2.imshow("My Webcam", frame) | |
key = cv2.waitKey(25) | |
if key == ord('q'): | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment