📅  最后修改于: 2022-03-11 14:47:12.990000             🧑  作者: Mango
import cv2
cap = cv2.VideoCapture(0)
while True:
success, img = cap.read()
cv2.imshow("Webcam", img)
if cv2.waitKey(1) == ord('q'):
break