【问题标题】:opencv - unable to capture frame from camera on raspberry piopencv - 无法从树莓派上的相机捕获帧
【发布时间】:2020-08-21 23:17:31
【问题描述】:

我的 pi 相机已连接并启用,raspistill 成功拍照。在 python 中,cv2.VideoCapture(-1).read() 总是返回 (False, None)。我被难住了。

【问题讨论】:

  • 成功了,非常感谢

标签: opencv raspberry-pi


【解决方案1】:

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

bcm2835-v4l2

我的现在看起来像这样toto

# /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

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

【讨论】:

    猜你喜欢
    • 2018-02-13
    • 1970-01-01
    • 2023-03-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-04
    • 2018-07-14
    • 1970-01-01
    相关资源
    最近更新 更多