optris_sdk_region_stats
One region's measurement for one frame. What a region measured on the most recent frame.
Its temperatures are in the SDK's temperature unit (Celsius unless optris_sdk_set_temperature_unit() chose Fahrenheit), and the standard deviation is a difference in degrees of that unit.
When valid is zero every temperature below is NaN, not zero. That is the case for a region with no measurable pixel behind it: one placed off the sensor, or one entirely inside the border that radial distortion correction leaves unmeasurable in Wide mode. Test valid, but if you do not, NaN fails every comparison, so the mistake shows up as a blank rather than as a plausible reading.
Public attributes
struct_size
uint32_t struct_size
Set to sizeof(optris_sdk_region_stats).
min_c
float min_c
Coolest temperature in the region, in the SDK's temperature unit. NaN when valid is zero.
max_c
float max_c
Warmest temperature in the region, in the SDK's temperature unit. NaN when valid is zero.
mean_c
float mean_c
Mean temperature over the region, in the SDK's temperature unit. NaN when valid is zero.
std_dev_c
float std_dev_c
Standard deviation of the region's temperatures, a difference in degrees of the SDK's temperature unit (kelvin-sized in Celsius, Fahrenheit-sized in Fahrenheit). NaN when valid is zero.
median_c
float median_c
Median temperature, in the SDK's temperature unit. Zero unless the region was asked for percentiles, because computing it costs extra work; that placeholder is NaN in Fahrenheit.
min_loc
optris_sdk_vec2 min_loc
Where the coolest pixel is, in region coordinates.
max_loc
optris_sdk_vec2 max_loc
Where the warmest pixel is, in region coordinates.
centre_loc
optris_sdk_vec2 centre_loc
The region's centre, in region coordinates.
pixel_count
uint32_t pixel_count
How many pixels were actually measured.
coverage
float coverage
Pixels actually measured divided by pixels the region nominally covers.
1.0 when everything the region asked for had sensor behind it, which is the ordinary case. Below 1.0 when part of it did not: an aperture clipped by the region boundary or the image edge, an area region hanging off the sensor, or a pixel the SDK could not measure (the border radial distortion correction leaves in Wide mode, which is 15.8% of the field on a G7). The statistics are computed over the measured part only, so this is what separates "20 degrees across this region" from "20 degrees across the 30 per cent of it that had data".
valid
uint8_t valid
Non-zero when the statistics above are meaningful. A region with no measurable pixels, or one below its aperture's minimum coverage, reports zero here; its temperatures are then NaN and its other fields must be ignored.
reserved0
uint8_t reserved0[3]
Reserved; always zero.