![]() |
Thermal Camera SDK 10.0.1
SDK for Optris Thermal Cameras
|
Measures frame rates. More...
#include <FramerateCounter.h>
Public Member Functions | |
OTC_SDK_API | FramerateCounter (double interval=DEFAULT_INTERVAL, unsigned int smoothSize=DEFAULT_SMOOTH_SIZE) |
Constructor. | |
OTC_SDK_API | FramerateCounter (const FramerateCounter &)=delete |
No copy constructor. | |
OTC_SDK_API FramerateCounter & | operator= (const FramerateCounter &)=delete |
No copy assignment. | |
OTC_SDK_API | FramerateCounter (FramerateCounter &&)=delete |
No move constructor. | |
OTC_SDK_API FramerateCounter & | operator= (FramerateCounter &&)=delete |
No move assignment. | |
virtual OTC_SDK_API | ~FramerateCounter () |
Destructor. | |
OTC_SDK_API bool | trigger () |
Takes a new time measurement and updates the frames per seconds. | |
double | getFps () const noexcept |
Returns the current frames per seconds. | |
Static Public Attributes | |
static constexpr double | DEFAULT_INTERVAL = 1000. |
Default interval in milliseconds. | |
static constexpr unsigned int | DEFAULT_SMOOTH_SIZE = 30 |
Default smoothing size. | |
Measures frame rates.
Internally a linked list is used to average the time measurements. This list always has an even number of elements to avoid aliasing effects.
OTC_SDK_API optris::FramerateCounter::FramerateCounter | ( | double | interval = DEFAULT_INTERVAL, |
unsigned int | smoothSize = DEFAULT_SMOOTH_SIZE ) |
Constructor.
[in] | interval | time interval in milliseconds. Can be used to check the elapsed time between two subsequent calls of the trigger() method. |
[in] | smoothSize | half the amount of data points used to calculate the frames per seconds. The resulting amount is rounded up to an even number. |
|
inlinenoexcept |
Returns the current frames per seconds.
OTC_SDK_API bool optris::FramerateCounter::trigger | ( | ) |
Takes a new time measurement and updates the frames per seconds.