BlobConfig
pub struct BlobConfig
Blob detection settings for a RegionKind::BlobGroup region.
Every field here is honoured by the measuring pass. On any other region kind the whole set is stored, saved and ignored.
Detection is confined to the region: only pixels the region contains can join a blob, so a hot area straddling the boundary is clipped to the region rather than accepted or rejected whole.
BlobConfig::new carries the SDK's own defaults, read from the
library rather than restated here so the two cannot drift.
BlobConfig — fields
threshold_c: f32
Lower edge of the band, in the SDK's temperature unit (Celsius
unless crate::set_temperature_unit chose Fahrenheit),
inclusive: a pixel is a member when
threshold_c <= value <= threshold_max_c.
threshold_max_c: f32
Upper edge of the band, in the SDK's temperature unit, inclusive. Zero means no upper bound in either unit, which is the default. So does any ceiling at or below 0 °C (32 °F), and that is the trap, because freezing is a ceiling you may want.
min_size_pixels: u32
Smallest blob to report, in member pixels, inclusive. Counted in pixels that joined the blob, not bounding-box area.
max_count: u32
Most blobs to report; 0 means unlimited. Applied last, after
max_blob_size, by ranking on bounding-box area.
max_blob_size: f32
Largest blob to report, as a fraction of the pixels the region actually measured; 0 means no limit. Useful when a warm background would otherwise be one blob.
smoothing: f32
Outline simplification tolerance, in region coordinates, so
smoothing * frame_width is the tolerance in pixels. Ignored
unless render_mode is BlobRenderMode::Contour.
contour_max_points: u32
Cap on the points in an outline, applied after smoothing by
subsampling at a regular stride. 0 means the default 200.
render_mode: BlobRenderMode
Box or outline.
BlobConfig — methods
pub fn new() -> Result<Self>
The SDK's defaults: a 30 °C floor, no ceiling, a ten-pixel minimum, no count or size limit, 0.005 smoothing, 200 contour points, and a bounding box.
The floor is read in the SDK's temperature unit at the time of
the call, so it is 86.0 once crate::set_temperature_unit has
chosen Fahrenheit. The ceiling stays 0, meaning none.
Errors
Returns Status::InvalidArgument only if the library refuses
the initialiser, which means the crate and the library disagree
about the struct.