- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I realized that when I have a high computational cost in my program, the fps reduced its value. I wondered if I can get the fps value instantly.
Thanks in advance!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This article has some downloadable source code that may give you insight about how to monitor the frame rate.
https://software.intel.com/en-us/videos/intel-realsense-unity-5-pro-tip-monitor-the-realsense-frame-rate RealSense - Intel® RealSense™ + Unity* 5 Pro Tip: Monitor the RealSense Frame Rate | Intel® Software
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi MQMQ,
Do you still need assistance with this thread? Keep us updated on your progress.
-Sergio A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sergio,
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.
My code:
int frame = FaceTrackingFrameRateCalculator::GetFrameRate();
int FaceTrackingFrameRateCalculator::GetFrameRate()
{
isFrameRateReady = false;
return frameRate;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
https://noobtuts.com/cpp/frames-per-second
http://www.opengl-tutorial.org/miscellaneous/an-fps-counter/
Pedro M.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page