optris::sdk::BlobConfig
Blob detection parameters for a RegionKind::kBlobGroup region.
Every field here is honoured by the measuring pass; see Region::detected_blobs for the results and RegionBlob for the coordinates they are reported in. On any other region kind the whole struct is stored, saved and ignored, which is what Region::blobs says.
Detection is confined to the region: only pixels whose centres pass the same Contains() test the statistics were taken over can join a blob, so a hot area straddling the boundary is clipped to the region rather than accepted or rejected whole.
threshold and threshold_max are in the SDK's temperature unit (Celsius unless SetTemperatureUnit() chose Fahrenheit). The default threshold of 30 is a compile-time Celsius number, so in Fahrenheit a default-constructed BlobConfig asks for 30 F. Start from the region as the SDK returns it, or set the threshold yourself.
Public attributes
threshold
float threshold = 30.0F
Lower edge of the band, in the SDK's temperature unit, inclusive: a pixel is a member when threshold <= value <= threshold_max.
threshold_max
float threshold_max = 0.0F
Upper bound, in the SDK's temperature unit, inclusive, so a band rather than a floor can be detected. 0 -- and anything below 0 C -- means no upper bound, which is the default and also the trap, because 0 C is a ceiling a caller may genuinely want. In Fahrenheit 0 still means no upper bound, and so does anything at or below 32 F, because the test is made in Celsius.
min_size
uint32_t min_size = 10
Smallest blob to report, in member pixels, inclusive. Counted in pixels that joined the blob rather than bounding-box area, so a thin diagonal streak is judged on its own length.
max_count
uint32_t max_count = 0
Most blobs to report; 0 means unlimited. Applied last, after max_blob_size, by ranking on bounding-box area and truncating -- so what survives is the blobs with the largest boxes, which for a sparse L-shape is not the blob with the most hot pixels.
smoothing
float smoothing = 0.005F
Outline simplification tolerance, in region-space units -- the same units Vec2 uses, so smoothing * frame_width is the tolerance in pixels. A vertex within this distance of the line it would have bent is dropped. Ignored unless render_mode is BlobRenderMode::kContour.
max_blob_size
float max_blob_size = 0.0F
Largest blob to report, as a fraction of the region; 0 means no limit. Useful when a warm background would otherwise be one blob.
The fraction is of the pixels the region actually measured -- RegionStats::pixel_count -- compared against the blob's own member pixel count (RegionBlob::pixel_count). Both are member counts, so the comparison is like for like and does not drift with the shape of either. Applied before max_count, so a blob rejected for being too large does not use up a slot.
contour_max_points
uint32_t contour_max_points = 200
Cap on the number of points in a BlobRenderMode::kContour outline, applied after smoothing by subsampling the survivors at a regular stride. 0 means the default 200 rather than "no
points". Ignored unless render_mode is BlobRenderMode::kContour.
render_mode
BlobRenderMode render_mode = BlobRenderMode::kBox
Box or outline. Selecting BlobRenderMode::kContour is what makes RegionBlob::contour non-empty, and it is the expensive switch: tracing costs blob count times region area, rather than growing with the number of hot pixels.