Ask Your Question
0

videocapturing and CV_CAP_PROP_FPS

asked 2013-09-04 11:17:37 -0600

nikita.bugrov gravatar image

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?

edit retag flag offensive close merge delete

Comments

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.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-09-04 13:42:18 -0600 )edit

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.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-09-04 13:44:45 -0600 )edit

It is possible to change FPS, because guvcview can do it! As I understand guvcview uses libv4l, so the problem is in OpenCV.

nikita.bugrov gravatar imagenikita.bugrov ( 2013-09-07 03:41:17 -0600 )edit

Did you try the latest version like suggested?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-09-07 04:17:43 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-09-04 12:41:52 -0600

Himanshu gravatar image

Hi,

I also have the same problem of setting the frame rate of my webcam using the CV_CAP_PROP_FPS.

Did you find any solution?

Thanks and regards Himanshu

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-09-04 11:17:37 -0600

Seen: 3,804 times

Last updated: Sep 04 '13