OptrisOptrisDocumentation

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

optris::sdk::ColorWindow

A temperature band rendered in color over a grayscale base -- an isotherm.

Pixels inside [min_c, max_c] take their color from this window; everything else is the grayscale rendering of the scene. Windows composite in ascending id order, so a later id draws over an earlier one where they overlap.

min_c and max_c are in the SDK's temperature unit (Celsius unless SetTemperatureUnit() chose Fahrenheit).

Drawn by whichever backend produced the picture -- the GPU colorizer, the CPU micro pipeline, or the CPU view path for a simulated source. In an earlier v12 build only the last of those drew them, so a window set on a real camera was stored, reported as set, and never reached a pixel.

Public attributes

min_c

float min_c = 0.0f

Low end of the band, in the SDK's temperature unit, inclusive. A pixel is in the window when min_c <= T <= max_c, against the corrected object temperature rather than the display scale -- a window outside the current colour range simply never matches.

One thing to know before reaching for windows at all: the moment any window exists the whole frame is drawn grayscale and the windows are blended on top. There is no "normal palette plus a highlight" mode.

Both pipelines draw the bands, including a real camera with RGBA output on.

max_c

float max_c = 0.0f

High end of the band, in the SDK's temperature unit, inclusive.

Zero at both ends -- the default -- is not a disabled window. It matches pixels at exactly 0 in the SDK's unit (0 C, or 0 F once SetTemperatureUnit() chose Fahrenheit), and its mere presence flips the frame to grayscale. Drop a window with Display().RemoveColorWindow() rather than collapsing it.

An inverted band (max_c < min_c) matches nothing and is not an error. The gradient span is floored at 0.01 K, so a zero-width window that does match maps to the first palette entry instead of dividing by zero.

palette

Palette palette = Palette::kIronBow

The built-in ramp across the band, used when colors is empty. Independent of ImagerConfig::palette, and that independence is the point: everything outside the windows is gray, so the global palette has nothing left to colour.

colors

std::vector< Rgb24 > colors

The band's own color ramp, coldest first, overriding palette.

Any length from 1 upwards; it is resampled across the band. One entry is a solid color -- the marker band that reads as a flag rather than a gradient. A table handed over backwards is a reversed ramp, which is how a cold band is made to read as cold.

Empty means "use palette", which is what every window did before v12: the band could only be one of the built-in ramps, so reversal was possible only where a palette happened to run the other way.

opacity

float opacity = 1.0f

How opaque the band is over the grayscale base, 0..1, clamped. 1.0 replaces the pixel outright; 0.0 leaves the window invisible while the grayscale base its presence forced still applies.

Windows composite in ascending id order, so where two bands overlap the higher id paints over the lower one.

motion_only

bool motion_only = false

Colour only the pixels a motion zone saw move.

Requires at least one MotionZone: with none configured the motion mask is empty and a motion_only window colours nothing at all, leaving a bare grayscale frame. It cannot name a zone either -- the mask is the union of every zone's moved pixels with no zone identity left in it. Expect nothing on the first frame after start or Motion().ClearZones(), since differencing needs a previous frame to compare against.

On a pipeline backend the mask is one frame old -- it is computed from the frame the backend has already colorized -- which is invisible at any real frame rate but is a difference from the view path, where it is exact.

scene_scale

bool scene_scale = false

Colour the band on the SCENE's range instead of across itself.

Off by default, which keeps what every existing band does: the ramp is stretched over [min_c, max_c], so a narrow band uses the whole palette and works as a magnifier on a few degrees.

On, a pixel in the band takes the colour the ordinary palette would have given it -- the band is a slice of the scene's own scale, cut out of the grey. That is what an operator usually means by an isotherm, and what makes it agree with the colour bar: a band from 32 to 36 C in a 23 to 36 C scene is the top third of the palette, not a second full ramp. Stretched instead, the band's cold end is the palette's cold end -- dark, where the bar says it should be bright -- which reads as the band being inverted.