sudo apt install v4l-utils
v4l2-ctl --list-devices
v4l2-ctl --all -d /dev/vid*
运行一段OpenCV-Python的USB相机测试程序,程序代码如下:
import cv2 as cv
capture = cv.VideoCapture(0)
while True:
ret, image = capture.read()
if ret is True:
image = cv.flip(image, 1)
cv.imshow("frame", image)
c = cv.waitKey(50)
if c == 27:
break
else:
break
cv.destroyAllWindows()
运行结果截图如下:
扫码查看OpenCV+OpenVIO+Pytorch系统化学习路线图
文章引用微信公众号"OpenCV学堂",如有侵权,请联系管理员删除!