Has anyone found out what we should use to set the camera FPS in c++. I noticed that there appears to be several ways to do it in java with the most simple being camera.setFPS(), but there appears to be nothing in the C++ wpi library that does that.
I noticed that through the driver station you have the option to change the FPS settings there, but the FPS slider in the driver station appears to do nothing. At least i see no difference in the FPS no matter what value i move the slider to. Based on what the driver station shows it seems like we are locked to 30 FPS.
Here is how we do it:
VideoCapture GearCap("/dev/gearcam"); // open the default camera
GearCap.set(CV_CAP_PROP_FRAME_WIDTH,inputframewidth);
GearCap.set(CV_CAP_PROP_FRAME_HEIGHT,inputframeheight);
GearCap.set(CV_CAP_PROP_FPS,gearfpsused);
You will need to figure out what your camera supports as far as FPS and frame size. This can be done following:
sorry it put some spaces in the code where they should not have been:
VideoCapture GearCap("/dev/gearcam"); // open the default camera
GearCap.set(CV_CAP_PROP_FRAME_WIDTH,inputframewidth);
GearCap.set(CV_CAP_PROP_FRAME_HEIGHT,inputframeheight);
GearCap.set(CV_CAP_PROP_FPS,gearfpsused);