optris::sdk::RegionStats
Per-frame measurement of a region. A superset of the old RoiStats and MeasurementStats. What a region measured on the most recent frame.
Every temperature here is quiet NaN when valid is false. That happens when the region had no measurable pixel behind it at all -- off the sensor, or entirely inside the unmeasurable border that radial distortion correction leaves in Wide mode -- and equally when a spot's sample fell below its Aperture::min_coverage. NaN rather than zero, and rather than an out-of-band cold value, because a region the SDK itself calls invalid must not report a number that could be plotted, compared against an alarm limit or averaged into anything: every comparison against NaN is false, so the omission shows up as a blank instead of as a plausible reading. min_loc and max_loc collapse to centre_loc for the same reason -- there is no hottest pixel to point at.
pixel_count and coverage are the exception and stay truthful, because they are how a caller finds out how short the sample was: an under-covered spot reports the pixels it did reach and the fraction they came to, with no temperatures.
min_c, max_c, mean_c and median_c are in the SDK's temperature unit (Celsius unless SetTemperatureUnit() chose Fahrenheit). std_dev_c is a difference in degrees of that unit (kelvin-sized in Celsius, Fahrenheit-sized in Fahrenheit).
Public attributes
min_c
float min_c = 0.0F
coldest measured pixel; NaN if none
max_c
float max_c = 0.0F
hottest measured pixel; NaN if none
mean_c
float mean_c = 0.0F
arithmetic mean of them; NaN if none
std_dev_c
float std_dev_c = 0.0F
standard deviation across them; NaN if none
median_c
float median_c = 0.0F
Only computed when Region::want_percentiles is set, because it costs extra work on every frame. Zero otherwise in Celsius, and NaN in Fahrenheit, where 0 would read as 32 F.
min_loc
Vec2 min_loc
where min_c was found, in region space
max_loc
Vec2 max_loc
where max_c was found
centre_loc
Vec2 centre_loc
the region's centre, for placing a label or marker
pixel_count
uint32_t pixel_count = 0
pixels actually measured
coverage
float coverage = 1.0F
Pixels actually measured / pixels the region nominally covers.
1.0 when everything the region asked for had sensor behind it, the ordinary case, and the one that costs nothing to establish. Below 1.0 when part of it had no data: an aperture clipped by the region boundary or the image edge (see Aperture), an area region hanging off the sensor, which is what happens the moment a camera is panned or zoomed on a Canvas, or a pixel the SDK could not measure (the border radial distortion correction leaves in Wide mode, where 15.8% of the field has no source inside the sensor). The three are the same thing from the region's point of view and are reported as one fraction.
The statistics are computed over the covered part only, so mean_c is honest about the pixels it had. This field is what separates "20 degrees across this region" from "20 degrees
across the 30 per cent of it that had data". It is published as SignalField::kCoverage, so a rule can refuse to alarm below a floor rather than alarming on a corner.
valid
bool valid = false