Comment 25 for bug 260251

Revision history for this message
David Coles (dcoles) wrote :

Hi Steven,

There seems to be something very odd going on with OpenCV's v4l driver and the way it interacts with v4l/bttv driver. Whilst http://opencvlibrary.svn.sourceforge.net/viewvc/opencvlibrary?view=rev&revision=1609 at least prevented the EIO from crashing OpenCV, it was still accompanied by kernel warnings ("bttv0: timeout") and a drop in frame rate as it was re-buffered.

Since no other programs seemed to encounter this problem, the solution we took was to use GStreamer to capture from the v4l2src and then pass the image data into OpenCV ourselves. This seemed to avoid the issues highgui's v4l capture drivers (although in the current OpenCV package the python setters were broken and required us to hack together our own little python wrapper). See http://www.tardis.ed.ac.uk/~dcoles/sdpgroup2/workspace/vision/gstcapture.py for an example.

It seemed to either be a kernel bug uncovered by an unusual way of using v4l with this device or the OpenCV v4l code not handling the device correctly. I noticed that the OpenCV subversion now supports a few higher level capture devices such as libv4l and gstreamer which may be a way around these issues. Unfortunately I no longer have access to the bttv hardware we were using and so can't really do any more testing.