OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C API referencev12.0

optris_sdk_live_frame_rate

Real frames per second over the time the scene was being measured: the frame rate to show a user. New in 12.0.10.

optris_sdk_measured_frame_rate counts real frames over wall time, so its measured_hz dips towards zero through every shutter cycle and falls to zero while a replay is paused, and a camera tile showing it reads 0 fps for a healthy camera. This is the same count over live time: the intervals that ended in a repeated frame (the shutter flag closed, in motion, or settling after it reopens) and the time a replay is paused are cut out of the clock, numerator and divisor alike:

hz = real_frames / (window_ms / 1000)

A healthy shutter cycle therefore reads the camera's rate throughout and a paused replay keeps the rate it had, reading the file's rate again straight after it resumes. A camera that stops delivering still reads 0, closure or not; a dropped frame still lowers it; and with nothing held or paused within the window it equals measured_hz. A struct of its own, so that optris_sdk_measured_frame_rate keeps the layout every 12.0 program was built against.

Public attributes

struct_size

uint32_t struct_size

Set to sizeof(optris_sdk_live_frame_rate).

valid

uint8_t valid

Non-zero when there is live time to divide by: two frames delivered and at least a quarter of a second of live time since the first. Otherwise every other field is zero.

Can be zero while optris_sdk_measured_frame_rate::valid is non-zero, for a stream that has never had live time: one that started with the flag closed, or a replay paused straight after it started. Once set it stays set through any closure or pause, however long.

reserved0

uint8_t reserved0[3]

Reserved; always zero. Named so the struct has no implicit padding.

hz

float hz

Real frames per second over window_ms of live time, in Hz. Exactly real_frames / (window_ms / 1000).

window_ms

float window_ms

The live time hz was counted over, in milliseconds. The same length as optris_sdk_measured_frame_rate::window_ms once the stream has been live that long.

real_frames

uint32_t real_frames

Real frames counted in the live window. The numerator of hz.