Select Timeout error in Ubuntu - Opencv

TomSelleck picture TomSelleck · Oct 3, 2012 · Viewed 17.6k times · Source

I am trying to set OpenCv up for my final year project and have run into a couple of problems. I successfully got it set up in Ubuntu following this tutorial.

The problem I am having now is keeping this sample program running. The program is face detection using a webcam.

It runs fine for 3 or 4 seconds and then the capture gets stuck with a single frame in the window. The console displays the following output.

tom@ubuntu:~/College/opencv/faceDetect_sample$ make
./faceDetect --cascade="haarcascade_frontalface_alt.xml" --nested-cascade="haarcascade_eye_tree_eyeglasses.xml"
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
init done 
opengl support available 
select timeout
select timeout
select timeout
select timeout
select timeout
select timeout
^Cmake: *** [run] Interrupt

If anybody has an idea of where to go from here, I would really appreciate some help !

Answer

user883128 picture user883128 · Oct 3, 2012

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.