cv2.VideoCapture(0).grab and cv2.VideoCapture(0).read hangs

asked 2015-01-04 14:41:59 -0600

Logan gravatar image

My OS is Ubuntu 14.04 LTS.

I am using Python 2.7 with OpenCV 3.0 Beta and my webcam is Logitech webcam pro 9000.

Cheese application is running fine indicating no issue with the webcam driver.

On calling cv2.VideoCapture(0).read() (or grab()), I get the error 'select timeout' after about 10 seconds.

I googled this extensively and found the following solution:

sudo rmmod uvcvideo

sudo modprobe uvcvideo nodrop=1 timeout=5000 quirks=0x80

Now the API cv2.VideoCapture(0).read() (or grab()) just hangs.

edit retag flag offensive close merge delete

Comments

Tried with OpenCV 2.4.0 and 2.4.10 but still see the same behavior

Logan gravatar imageLogan ( 2015-01-04 17:13:51 -0600 )edit