This article has some downloadable source code that may give you insight about how to monitor the frame rate.
1 of 1 people found this helpful
If you just want to check the frame rate for debug purposes, you could put a System.Diagonstics.Stopwatch (assuming C#) on to time each frame, adding each stopwatch.ElapsedMilliseconds to a List<long> and calling stopwatch.Reset() at the end of each frame. I've used this method for identifying parts of my camera loop which were causing slowdowns and required optimisation. If you want FPS rather than milliseconds, you can do 1000/ElapsedMilliseconds to get the maximum frame rate (eg, if your camera loop takes 50ms, the maximum frame rate would be 1000/50 = 20fps)
Thanks jb455, but I'm working in c++. I was asking for some function that get me that value.
Anyway I'm going to try your solution
The C++ Raw Streams sample has an FPS counter along the bottom of the screen - if you look in the source code you should be able to work out how they do it!
I tried to do the jb455's solution but I'm not was able.
In the RAW example there are some functions and I tried to use one of them but it doesn't work.
int frame = FaceTrackingFrameRateCalculator::GetFrameRate();
isFrameRateReady = false;
This message was posted on behalf of Intel Corporation
Perhaps the answer is on using generic C++ code instead of focusing on the SDK. For example, you can try something similar to what is explained on these guides: