OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C++ API referencev12.0

optris::sdk::view::BlobConfig

The band, size limits and outline settings for one Detect() call.

Passed per call rather than held by the detector, so one BlobDetector can run two different bands over the same frame.

Do not confuse this with optris::sdk::BlobConfig in region.h, which is the user-facing configuration a Region carries. The fields there are named min_size and smoothing, and its threshold defaults to 30 C rather than 35 C. Its max_blob_size has no counterpart here: it is a fraction of the region, which this detector does not know about, so the region measurement path applies it afterwards against Blob::pixel_count.

Public attributes

threshold

float threshold = 35.0F

Lower edge of the band, in degrees Celsius, inclusive.

A pixel is a member when threshold <= value <= threshold_max. The default of 35 is a warm-body number and deliberately not the 30 that optris::sdk::BlobConfig and Roi default to, so a caller who wants to match the ROI pipeline has to set it. On the int16_t overload the bound is converted with value * 10 + 1000 and truncated, which snaps it to 0.1 K.

threshold_max

float threshold_max = 0.0F

Upper edge of the band, in degrees Celsius, inclusive.

Zero, and anything below it, means "no upper bound" -- which is the default and also the trap, because 0 C is a ceiling a caller may genuinely want and asking for it silently removes the ceiling instead. A band is what makes this detector able to find something that is warm but not the warmest thing in frame.

min_size_pixels

uint32_t min_size_pixels = 10

Smallest blob to report, in pixels, inclusive.

Counted in member pixels rather than bounding-box area, so a thin diagonal streak is judged on its own length. Candidates below the limit are found and then discarded, so this trims noise out of the result rather than saving any work. Both 0 and 1 mean "report everything", which on a noisy frame means thousands of single-pixel blobs.

max_count

uint32_t max_count = 0

Most blobs to return; 0 means no limit.

Applied last, by sorting the finished list on bounding-box area and truncating -- so it costs a sort rather than saving one, and what survives is the blobs with the largest boxes, which for a sparse L-shape is not the blob with the most hot pixels. The returned order is that sort when this triggers and detection order when it does not; rely on neither.

extract_contour

bool extract_contour = true

Whether to trace Blob::contour.

This is the expensive switch. Tracing retains every member pixel of each blob and clears a frame-sized mask once per blob, so its cost grows as blob count times frame area rather than as the number of hot pixels -- on a frame that breaks into hundreds of small blobs it dominates everything else in Detect(). Turn it off whenever the bounding box is all that gets drawn.

contour_simplify

float contour_simplify = 0.005F

Douglas-Peucker tolerance for Blob::contour.

In ContourPoint units, so the default 0.005 drops a vertex that sits within half a percent of the frame width of the line it would have bent. Larger gives fewer points and a blockier outline; 0 keeps every step of the walk. Whatever the value, the survivors are subsampled down to at most 200 points, so this shapes the outline rather than budgeting it -- contour_max_points is the budget. Ignored when extract_contour is false.

contour_max_points

uint32_t contour_max_points = 200

Hard cap on the number of points in Blob::contour.

Applied after contour_simplify, by subsampling the survivors at a regular stride, so the outline keeps its shape and loses its resolution. The default of 200 is the figure this detector hard-coded before the cap was exposed, so an existing caller sees no change. Zero means the same thing as 200 rather than "no points": a contour that was asked for and came back empty is not a useful answer. Ignored when extract_contour is false.