videocapturing and CV_CAP_PROP_FPS
Hello everyone!
I'm trying to write code for videocapturing from PlayStation Eye (USB camera). I'm working under Debian 7 with OpenCV 2.4.6.1.
In my problem I need to use as high frame rate as possible. Highest FPS for PlayStation Eye camera is 120 Hz. So, I try to set needed for capturing parametes in this way:
CvCapture* capture = cvCaptureFromCAM( 1 );
assert( capture );
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, 320);
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT, 240);
cvSetCaptureProperty(capture, CV_CAP_PROP_FPS, 120);
But this code gives me:
HIGHGUI ERROR: V4L: setting property #5 is not supported
and FPS doesn't change!
Ok.As I understood CV_CAP_PROP_FPS need to be implemented in "cap_v4l.cpp" and "cap_libv4l.cpp". Second file has some CV_CAP_PROP_FPS implementation, but no implementation found in first file. For some reasons in my case (with PlayStation Eye) OpenCV using "cap_v4l.cpp", but not "cap_libv4l.cpp". That's way I have error during setting FPS!
So, the question is - Can I use "cap_libv4l.cpp" instead "cap_v4l.cpp"? If it possible what I have to do? May be anyone knows how to fix this problem in other way?
Actually this interface uses the universal libv4l API inside BUT it does expect that your camera supports the configuring of the framerate. Normally if you get that error message returned, it means your manufacturer doesn't allow you to change the capture rate of your camera, which is possible. It is also possible that the Playstation Eye doesn't support this camera interface.
Another tip, try grabbing the latest 2.4 branch of github. It has fixes the download doesn't have and I have seen many updates involving cameras.
It is possible to change FPS, because guvcview can do it! As I understand guvcview uses libv4l, so the problem is in OpenCV.
Did you try the latest version like suggested?