OptrisOptrisDocumentation

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

optris_sdk_motion_zone

An area watched for movement, by frame differencing within a temperature band.

The band is in the SDK's temperature unit (Celsius unless optris_sdk_set_temperature_unit() chose Fahrenheit), and sensitivity is a difference in degrees of that unit.

Public attributes

struct_size

uint32_t struct_size

Set to sizeof(optris_sdk_motion_zone).

temp_min_c

float temp_min_c

Only pixels in this band take part, in the SDK's temperature unit. A zone watching for people uses roughly 30..40 C (86..104 F).

temp_max_c

float temp_max_c

Top of that band, in the SDK's temperature unit. Both ends are inclusive, and a pixel outside them is skipped before the frame difference is taken -- so a pixel out of band can neither raise motion nor mask it.

A zone left at 0..0, which is what a zeroed struct gives you, watches only pixels at exactly 0 (0 C, or 0 F in Fahrenheit) and therefore never reports anything. optris_sdk_motion_zone_init() does not choose a band either -- there is no band that is right for every scene -- and leaves 0 C..0 C (32..32 in Fahrenheit), so set both bounds explicitly after calling it.

sensitivity

float sensitivity

How much a pixel must change between consecutive frames to count as moving: an absolute difference in degrees of the SDK's temperature unit (kelvin-sized in Celsius, Fahrenheit-sized in Fahrenheit), and higher means less sensitive. The test is abs(T_now - T_prev) > sensitivity.

optris_sdk_motion_zone_init() sets 0.5 K (0.9 in Fahrenheit), which sits above sensor noise and below a real scene change. Around 0.05 K the zone trips on noise; nothing in a still room moves by 1.5 K. Not clamped -- a negative value marks every in-band pixel as moving, on every frame, forever.

min_area

uint32_t min_area

The smallest blob, in pixels, that counts. Raising it is how sensor noise is rejected. optris_sdk_motion_zone_init() sets 10; 0 or 1 admits single-pixel blobs, which is how sensor noise becomes a detection.

visualize

int32_t visualize

Non-zero to draw the zone into the colorized picture.

overlay_color

float overlay_color[4]

The overlay's red, green, blue and alpha, each 0 to 1. optris_sdk_motion_zone_init() sets red at 80% alpha. Nothing clamps these; values outside 0..1 are converted to bytes unchecked.