我只是尝试通过以下方式访问Raspberry Pi上带有opencv的USB网络摄像头:
import cv2, time
cap = cv2.VideoCapture(0)
time.sleep(3)
while True:
time.sleep(0.1)
ret, frame = cap.read()
if ret:
cv2.imshow('frame', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
它只会生成一个永不结束的错误消息流:VIDIOC_QBUF:Invalid Argument
当我插入Logitech网络摄像头C260或Logitech网络摄像头C910时,摄像头指示灯亮起,/dev/video0文件被创建。还尝试了两种不同的RPi 4
我的个人形象建设: Raspberry Pi 4、Raspbian Buster v10、Python 3.7.3、OpenCV 4.1.0
PyImageSearch提供的图像生成: 树莓皮4, Raspbian Buster v10, Python 3.7.3, OpenCV 4.1.1
其他人也遇到过这个问题,但我还没有找到任何解决办法
任何帮助都将不胜感激
我有同样的问题,这是通过安装uv4l uvc修复的
相关问题 更多 >
编程相关推荐