import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while(1):
# get a frame
ret, frame = cap.read()
# show a frame
cv2.imshow("capture", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
利用python OpenCV调用摄像头模块
猜你喜欢
转载自blog.csdn.net/m0_37756557/article/details/81569149
今日推荐
周排行