Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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?