Select Ubuntu Timeout Error - Opencv

I am trying to install OpenCv for my project last year and have encountered several problems. I successfully got it in Ubuntu after this tutorial.

The problem that I am currently facing is that this program is running . The program recognizes a face using a webcam.

It works fine for 3 or 4 seconds, and then the capture gets stuck with one frame in the window. The following output is displayed on the console.

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 anyone has an idea where to go from here, I would really appreciate help!

+7
source share
3 answers

Try the following:

 modprobe uvcvideo nodrop=1 timeout=6000 

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

Try to increase the waiting time to a ridiculously large number. This should fix the problem, or at least it worked for me. It is simple that calling select does not return ready descriptors, and this can be caused by a video driver or device.

If that doesn't work,

Enable module tracing:

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

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

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

Search with dmesg for error messages.

+11
source

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); 

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

+3
source

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

+1
source

All Articles