- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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!
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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!
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi MQMQ,
Do you still need assistance with this thread? Keep us updated on your progress.
-Sergio A
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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;
}
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
