I have a working opencv code that takes a feed from my webcam and displays it. (Code changed from here
The only problem is that when I try to print the value of frame-per-second, like
int fps = (int) cvGetCaptureProperty(capture, CV_CAP_PROP_FPS); printf ("Frames per Second: %d\n",fps);
-1 is printed.
Another (secondary) problem is that there seem to be some runtime errors / warnings
VIDIOC_QUERYMENU: Invalid argument VIDIOC_QUERYMENU: Invalid argument select timeout HIGHGUI ERROR: V4L2: Unable to get property <unknown property string>(5) - Invalid argument HIGHGUI ERROR: V4L: Property <unknown property string>(2) not supported by device HIGHGUI ERROR: V4L2: Unable to get property <unknown property string>(1) - Invalid argument HIGHGUI ERROR: V4L: Property <unknown property string>(2) not supported by device
But the code does what it should do, i.e. display video from a webcam.
Any ideas how to sort out the problems? I am using opencv on Eclipse with CDT on Ubuntu 11.10
Thanks in advance.
source share