python+opencv实现摄像头的调用
apt install python-pip //安装pip pip --version //查看pip的版本信息 pip install opencv-python //安装opencv-python
# -- coding:utf-8 -- import cv2 cap = cv2.VideoCapture(0) # 打开摄像头 while True: ret, frame = cap.read() # 读摄像头 cv2.imshow("video", frame) if cv2.waitKey(1) & 0xFF == ord('q'): # 按q退出 break cap.release() cv2.destroyAllWindows() # 基本操作
相关推荐
iFlyAI 2020-09-14
xinhao 2020-07-20
taiyangshenniao 2020-06-25
pythonxuexi 2020-06-25
zhaobig 2020-06-25
qingqingpiaoguo 2020-06-22
yjsflxiang 2020-06-14
txlCandy 2020-06-09
bizercsdn 2020-06-08
JakobHu 2020-05-27
davidliu00 2020-05-26
Laozizuiku 2020-05-17
zcabcd 2020-05-15