opencv-无法从raspberry pi上的相机捕获帧

opencv-无法从raspberry pi上的相机捕获帧,opencv,raspberry-pi,Opencv,Raspberry Pi,我的pi摄像头已连接并启用,raspistill已成功拍照。在python中,cv2.VideoCapture(-1).read()始终返回(False,None)。我被难住了。OpenCV依赖于V4L2(Linux视频)模块,因此请尝试在文件/etc/modules底部添加以下行并重新启动Raspberry Pi bcm2835-v4l2 我的现在看起来是这样的: 这确保了Broadcom Video For Linux 2(v4l2)驱动程序在所有后续重新启动时都被加载。这就完成了,非常感

我的pi摄像头已连接并启用,raspistill已成功拍照。在python中,cv2.VideoCapture(-1).read()始终返回(False,None)。我被难住了。

OpenCV依赖于V4L2(Linux视频)模块,因此请尝试在文件
/etc/modules
底部添加以下行并重新启动Raspberry Pi

bcm2835-v4l2
我的现在看起来是这样的:


这确保了Broadcom Video For Linux 2(v4l2)驱动程序在所有后续重新启动时都被加载。

这就完成了,非常感谢
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

bcm2835-v4l2