5

I am trying to use my webcam with OpenCV to run my application. However, when I tried to get the frame with videoCapture, and it gives me this error.

VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV Sample: ../test/test.cpp:3331

OpenCV build configuration

After checking the issue, some suggestions saying that to use this command to run the app

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

But I don't have this library file in the system /usr/lib/libv4l/v4l2convert.so

I am not sure where I could get this library, or does it come with OpenCV itself?

Thanks

Edit: Also tried

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.
4

1 回答 1

1

我在这里找到了这个库

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

于 2017-10-24T19:09:17.297 回答