OpenCV for Unity 3.0.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/5.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.Extensions.SourceToMat.FPSThrottle Class Reference

Throttles callbacks to a target frame rate, or invokes every tick when the target FPS is zero or negative. Used internally by image mat sources and video grabbers; not a primary public contract. More...

Public Member Functions

 FPSThrottle (float targetFPS)
 Creates a throttle for the specified target FPS.
 
void Reset ()
 Resets the internal timer.
 
bool Update (float deltaTime, Action onTick)
 Advances the timer and invokes onTick when the FPS interval elapses.
 

Properties

bool IsPaused [get, set]
 Gets or sets whether the timer is paused. When resuming from pause, the internal timer is reset.
 

Detailed Description

Throttles callbacks to a target frame rate, or invokes every tick when the target FPS is zero or negative. Used internally by image mat sources and video grabbers; not a primary public contract.

Constructor & Destructor Documentation

◆ FPSThrottle()

OpenCVForUnity.Extensions.SourceToMat.FPSThrottle.FPSThrottle ( float targetFPS)

Creates a throttle for the specified target FPS.

Parameters
targetFPSTarget FPS. When targetFPS is 0 or less, Update invokes the callback every call.

Member Function Documentation

◆ Reset()

void OpenCVForUnity.Extensions.SourceToMat.FPSThrottle.Reset ( )

Resets the internal timer.

◆ Update()

bool OpenCVForUnity.Extensions.SourceToMat.FPSThrottle.Update ( float deltaTime,
Action onTick )

Advances the timer and invokes onTick when the FPS interval elapses.

Parameters
deltaTimeElapsed time in seconds since the previous update.
onTickCallback invoked when the interval is reached.
Returns
true if the callback is invoked; otherwise false.

Property Documentation

◆ IsPaused

bool OpenCVForUnity.Extensions.SourceToMat.FPSThrottle.IsPaused
getset

Gets or sets whether the timer is paused. When resuming from pause, the internal timer is reset.


The documentation for this class was generated from the following file: