Select Timeout error in Ubuntu - Opencv

五迷三道 提交于 2019-11-28 07:49:33

Try this:

modprobe uvcvideo nodrop=1 timeout=6000

and if that works, simply make the changes permanent by editing /etc/modprobe.d/modprobe.conf

Try increasing the timeout to a ridiculously large number. That should fix the issue, or at least it worked for me. It's just that the call to select returns no ready descriptors, and that may be caused by the video driver, or device one.

If that does not work,

Enable module traces:

sudo echo 0xffff > /sys/module/uvcvideo/parameters/trace

Run the program until the error is found, and stop it as soon as possible. Then disable the traces:

sudo echo 0 > /sys/module/uvcvideo/parameters/trace

Search with dmesg for error messages.

It can be resolved if we add the following lines to the code:

VideoCapture capture(<device id>);
capture.set(CV_CAP_PROP_FRAME_WIDTH , 352);
capture.set(CV_CAP_PROP_FRAME_HEIGHT , 288);

Following is a good link where the solution is explained in detail: http://derekmolloy.ie/beaglebone/beaglebone-video-capture-and-image-processing-on-embedded-linux-using-opencv/

I had the same issue with my Logitech C920. I tried the following solutions without any success. However, it worked like a charm with the C930e webcam so I guess the V4L API has something to do with it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!