目录
下载v4l2-ctl
//root@orangepi4:~# apt install v4l-utils
apt install v4l-utils
查看USB摄像头的节点信息
//root@orangepi4:~# v4l2-ctl --list-devices
v4l2-ctl --list-devices
测试USB摄像头
import cv2
# 采用摄像头
cap = cv2.VideoCapture("/dev/video10")
i = 0
while True:
flag, zhen = cap.read()
if not flag:
break
cv2.imshow('xian_shi', zhen)
cv2.waitKey(1)
print(i)
i += 1
cap.release()
cv2.destroyAllWindows()