I need 150 fps and get only 50

Hi all,

I am building a frisbee speed measuring device using a PSeye camera that shall watch the frisbee with 150 fps. I used a modified EyeCapture driver from the CL forum to do this.

My problem is: OF runs always with 50 Hz, no matter what I write in
ofSetVerticalSync(false) or
ofSetFrameRate(150)
The problem is not CPU limited (22 % load on a 2 core system).
It is also not USB bandwidth limited (320x240 @ 150 Hz grayscale = 92.16 MBit/s which is less than 480 Mbit/s of USB2.0)

Is there any hardcoded 50 Hz limit in OF?
Or has someone any hint what I can try to overcome this?

Many thanks in advance,
Werner

if you are on windows this is a known bug and it has been already fixed in the master branch in github. using a GLUT window instead of the default GLFW should fix it too if i remember well

also if you are on windows investigate the settings of your graphics card, which sometimes can have vsync settings that over-ride the preferences of software.

I assume you want to capture at that speed, not display everything? then you can also create a separate thread that captures as fast as possible, it should go faster then using the main graphics thread.

Thanks for the quick answers.
@arturo, Kj1: I will try as you suggested
@zach: on one of my PCs this is the case. But the other one claims to run at 150 Hz but does only 50.

I will be back with the results.
Werner

I had this problem as well recently (1-2 months ago, so this may have been updated in the latest master branch) and the problem was timer related on the system level, here’s the fix: emptyExample running at 50fps in release mode

@trentbrooks: Thanks for the hint. I had implemented that already - inspite of this the timer jumps in steps of 20 or 32 ms (Win XP).

It does not make a difference whether to use OF_FULLSCREEN or OF_GAME_MODE. In both cases the GUI runs with 150 fps. The video capturing routine does not. I will have some closer examination with an Arduino-LED-Clock that runs at a precise frequency.

@Kj1: I implemented 2 additonal threads for the 2 cameras. And it got slower, massively.