OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Python API referencev12.0

measurement — functions

Regions, their statistics, and motion zones.

A region is described here and measured by the camera. The two halves are deliberately different types:

Region what you want measured -- a shape, a name, whether percentiles and samples are wanted. You build one, hand it to a camera, and it is yours to change and hand over again. RegionStats, RegionPercentiles, RegionSample what came back. Plain values, already copied out of the SDK's memory, safe to keep.

That split is the ABI's. optris_sdk_region is a builder handle with no measurements on it; the numbers are read from the camera by the id it gave you when the region was added. Modelling it any other way would suggest that a Region object updates itself, which it does not.

Why a measurement can be absent

valid is a real field and this package surfaces it as valid rather than hiding it. A region that is off-sensor, disabled, or whose frame has not arrived yet has no statistics, and its temperatures come back as NaN rather than zero -- zero is a temperature, and a scene containing 0 degrees is not unusual. Read valid before the numbers.

kind_name(kind)

A region kind as a word, for printing.

alarm_state_name(state)

An alarm state as a word, for printing.

is_measured(value)

Whether a temperature is a measurement rather than an absence.

The SDK reports "no measurement" as NaN. value == value is the idiom that detects it, and it is easy to get wrong, so it has a name here.