首页 文章

缺少libv4l for OpenCV

提问于
浏览
4

我正在尝试使用我的网络摄像头和OpenCV来运行我的应用程序 . 但是,当我试图用videoCapture获取帧时,它给了我这个错误 .

VIDEOIO ERROR:V4L2:OpenCV示例不支持传入图像的像素格式:../ test / test.cpp:3331

OpenCV build configuration

检查问题后,一些建议说要使用此命令来运行应用程序

LD_PRELOAD="/usr/lib/libv4l/v4l2convert.so" ./MY-APP

但我在系统/usr/lib/libv4l/v4l2convert.so中没有这个库文件

我不确定在哪里可以获得这个库,或者它是否附带OpenCV本身?

谢谢

编辑:也试过了

sudo apt-get install libv4l-0
[sudo] password for nvidia: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libv4l-0 is already the newest version (1.10.0-1).
libv4l-0 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

1 回答

  • 1

    我找到了这个lib here

    它是ubuntu包的链接,应该有lib的包是 libv4l-0 ,正如您在链接中看到的那样 .

相关问题