SET FPS Camera Error using OpenCV2.4.9

asked 2014-10-01 13:41:28 -0600

mcprakash gravatar image

updated 2014-10-02 07:10:32 -0600

Hi I am using GCC and linux to compile my opencv code. I am getting this error when I use the following commands

VideoCapture cam(1);
cam.set(CV_CAP_PROP_FPS,30);
int fps=cam.get(CV_CAP_PROP_FPS);

Please help me out.

HIGHGUI ERROR: V4L2: Unable to get property <unknown property string>(5) - Invalid argument
I get the output as -1 for fps

However, if I run the same code in Visual Studio, it works fine.

Chandra

edit retag flag offensive close merge delete

Comments

this simply means: your camera's driver does not support it.

berak gravatar imageberak ( 2014-10-01 14:22:37 -0600 )edit

Well not completely. It is also possible that OpenCV doesn't support the camera's API. Why not use the API that is supplied with the camera itself to set the FPS rate?

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-02 07:11:38 -0600 )edit