OptrisOptrisDocumentation

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

optris::sdk::AutoNucConfig

Auto-NUC (automatic shutter calibration) configuration.

temp_drift_threshold_c and recording_override_drift_c are temperature differences in degrees of the SDK's temperature unit (kelvin-sized in Celsius, Fahrenheit-sized once SetTemperatureUnit() chose Fahrenheit). The default of 0.1 is a compile-time Celsius number, so in Fahrenheit a default-constructed AutoNucConfig asks for 0.1 F. Start from the camera's current configuration (Detector::GetAuto()) and change only what you mean to.

Public attributes

enabled

bool enabled = true

Whether the SDK schedules NUC cycles on its own.

The schedule is kept host-side, against this process's clock -- it is never written to the camera, and a camera left running by another program is on its own schedule, not this one.

False stops only the scheduled cycles. The shutter still closes for the startup calibration, again after a temperature-range or optics change, and whenever Detector::TriggerShutter() is called -- the manual trigger is tested before this flag, not after it. It is also moot when a PIF input is wired to the flag, because the scheduler does not run at all in that case.

Frames are dropped while the shutter is closed, not frozen: no frame callback fires for the half-second or so a cycle takes, so a caller that times out on frame arrival needs to tolerate it. GetTelemetry() reports nuc_status and flag_open throughout.

min_interval_secs

float min_interval_secs = 12.0f

Lockout in seconds: no drift-triggered NUC until this much time has passed since the last one.

Once it has elapsed a cycle fires only if the box, chip or flag probe temperature has moved by more than temp_drift_threshold_c since the last NUC. Zero here disables the drift-triggered arm outright, so zero with zero in max_interval_secs means the shutter never closes on its own at all.

This was 30, and 30 described no camera: This was 30, and 30 described no camera Imager::Create() applies no AutoNucConfig, and nothing else writes the engine's schedule either -- IRImagerConfig::minInterval is written only by setFlagInterval(), reached only from Detector::SetAuto(). So a freshly opened camera ran the engine's 12 s while this struct documented 30, the two were both public and both wrong about each other, and the only thing the 30 could affect was a caller who default-constructed this struct and applied it whole -- who would then be changing the camera's schedule while believing they were leaving it alone.

It is 12 now, which is what a camera runs and what release/v11.x has always run. The schedule did not change; the documentation stopped being wrong about it. DefaultFlagSchedule.TheStructAndTheEngineAgree is what keeps them together.

max_interval_secs

float max_interval_secs = 0.0f

Ceiling in seconds: a NUC is forced once this much time has passed, whether or not anything drifted. Zero removes the ceiling.

Zero is the default, because zero is what a camera runs and what v11 runs. This said 300 for the same reason min_interval_secs said 30, and with the same consequence: a caller applying a default-constructed record would have been imposing a five-minute ceiling no camera had.

A camera therefore has no upper bound on its own. Nothing forces a correction on time alone; a detector that drifts more slowly than temp_drift_threshold_c is never re-referenced. That is inherited behaviour rather than a choice made here, and a process that needs a guaranteed correction interval has to set one.

The two intervals are not checked against each other here -- the smaller simply wins, and min > max degenerates into "NUC every max_interval_secs". The C ABI rejects min > max when the maximum is above zero, in both optris_sdk_imager_set_flag_interval() and optris_sdk_imager_set_auto_nuc(); a zero maximum is excluded from that comparison, because it is no ceiling rather than a ceiling of zero. The C++ path checks neither, so do not rely on being told.

The C ABI used to compare the two unconditionally, which refused the default -- the (12, 0) every camera reports -- so the value read back could not be written back.

forecast_enabled

bool forecast_enabled = true

Per-pixel compensation for the dark offsets drifting BETWEEN shutter cycles. On by default, as in SDK 11.

At every completed cycle the pipeline measures how far each pixel's dark offset moved since the previous one, divides by the camera frames between the two, averages that rate over the last five cycles, and then walks the applied offset one count at a time towards where the next reference is predicted to be. It learns only from cycles taken once the detector has settled, starts at the third of those, does nothing for a pixel whose predicted drift is under three counts, and resets when the auto-skim moves the converter or the calibration changes.

The longer the interval between cycles, the more this is worth: it is what keeps a camera measuring correctly between corrections rather than only just after one.

This documented "predictive flag scheduling: the camera anticipates the next NUC rather than waiting for the interval to elapse", and the .NET property documented it as a notification an application could pause on. Both described a different feature, and neither was implemented -- setFlagForecast() was an empty stub. It does not change WHEN a cycle happens; it changes what the offsets do in between.

temp_drift_threshold_c

float temp_drift_threshold_c = 0.1f

How far an internal temperature probe may drift before a correction is due, as a difference in degrees of the SDK's temperature unit.

Checked once min_interval_secs has elapsed, against the camera's box, chip and flag probes, using whichever has moved furthest since the last correction. max_interval_secs still forces one regardless of drift.

Raise it for fewer interruptions and more drift between corrections; lower it for the reverse. Must be greater than zero: a threshold of zero would fire on every frame, because any probe reading that is not bit-identical to the last one is more than zero of drift.

The default is the value the SDK compared against before this was settable, so a camera nobody configures behaves as it always did.

drift_probes

DriftProbes drift_probes = DriftProbes::kBoxChipAndFlag

Which internal probes the drift arm is allowed to consult.

DriftProbes::kBoxChipAndFlag by default, which is v11's behaviour and every camera's behaviour to date.

Not the fix for a 12-second cadence. The per-probe cause of 2,113 cycles across six cameras was measured and the box probe is the main trigger, so use drift_filter_secs and drift_band_steps for that. This remains the only setting that ends a shutter-blade feedback loop outright -- read DriftProbes for the measurement that decides between them.

drift_filter_secs

float drift_filter_secs = 0.0f

Time constant, in seconds, for filtering each probe before the drift arm compares it. Zero compares one frame's reading, which is v11's behaviour and the default.

What the single-frame comparison produces: What the single-frame comparison produces Measured on six cameras: a shutter correction every 12 to 16 seconds, for hours, on cameras whose detector the SDK's own NUC line called settled at every single dark reference. 309 cycles in 184 minutes on a PI 400 whose chip moved at most 0.12 K between references. 437 in 131 minutes on one whose chip never left a 0.19 C band. The probes were not reporting drift; they were reporting themselves, one frame at a time, against a threshold below what one frame can resolve.

A single-pole filter, stepped by elapsed time so that the constant means seconds on a 27 Hz camera and on a 32 Hz one alike.

The value to use, and why: The value to use, and why 120 seconds, if you set it at all. The hardest measured pattern is a regulated PI 400 chip that holds one of two levels 0.145 C apart for 5 to 40 seconds at a time: a single pole reduces that swing to 0.141 C at a 12 s constant, 0.107 at 30 s, 0.071 at 60 s and 0.041 at 120 s, so 60 is the first value that clears 0.1 C and 120 is the first with a factor of two in hand.

What it costs: What it costs Delay, and nothing else. Genuine drift at the threshold rate is caught about one time constant later: a real 0.1 C/min ramp brings a correction after about 60 s rather than after the 12 s lockout. There is no version of this without that -- a probe with 0.145 C of readout spread cannot be read to 0.1 C in one frame by anybody.

What you get, measured on the field patterns: What you get, measured on the field patterns Nothing else has to be configured to get the backoff. A filtered arm fires when the probe has moved one deadband, so the interval it produces is deadband / drift rate, floored at min_interval_secs -- 12 s while a PI 4x0 warms from cold, about two minutes on a camera following its room, and tens of minutes on a regulated one on a quiet bench. Over four decades of drift rate the measured interval is that quotient to better than half a percent.

Also makes max_interval_secs mean what it says again: with the ceiling at zero and the arm no longer firing on readout, a settled camera genuinely stops correcting instead of correcting every 12 s.

drift_band_steps

int drift_band_steps = 0

Deadband floor, in multiples of each probe's own smallest observed change. Zero uses temp_drift_threshold_c alone, which is v11's behaviour and the default.

Why a threshold in Celsius cannot be right for three probes: Why a threshold in Celsius cannot be right for three probes They do not share a granularity, and the SDK's decode unit is not it: box and flag are decoded in 1/128 C, yet those same probes were measured stepping in 0.0625 C -- eight of those units -- on a floating PI 400, a PI 1M and a PI 640i, and in 1/128 C on a different PI 400 and an Xi 1M. The granularity differs between two cameras of the same family, so it is measured from the readings rather than declared.

At 0.1 C that leaves the threshold at 1.60 counts of one probe and 30.30 of another. Two counts of the first is already past it, which is why 303 of 305 measured triggers on that camera fired at exactly 0.125 C.

The value to use: The value to use 1. One count is the least a probe can report, so two is the smallest band that can mean "more than the least". It is also nearly free: on every probe measured except the two-level regulated chip, two counts is already below 0.1 C, so the band stays at temp_drift_threshold_c and nothing changes.

It never widens the band without limit: It never widens the band without limit The estimate is the smallest motion observed, and on a probe whose only motion all session is one large excursion that is the excursion -- a PI 1M's box, in one measured trace, moves only by a 2 C round trip. The band is therefore capped at four times temp_drift_threshold_c, so an application that asks to watch a probe to 0.1 C is never silently given 4 C. Giving up means correcting more often, which is v11, which is safe.

It is not a substitute for the filter: It is not a substitute for the filter Neither is sufficient alone. The deadband cannot touch the 2 C round trip above, and the filter needs 70 minutes to quiet the two-level chip that the deadband quiets in two. Set both.

while_recording

FlagWhileRecording while_recording = FlagWhileRecording::kUse

What a running recording does to the schedule above.

FlagWhileRecording::kUse by default, which is the behaviour every camera has always had: a recording changes nothing. The other two modes trade radiometric accuracy for an uninterrupted stream and the recording says that they did.

Moot while a process-interface input owns the flag. The SDK runs no cycle of its own then -- see Detector::IsShutterExternallyControlled() -- so there is no cycle to hold and this setting does nothing. It is still stored and still read back; ask Detector::GetShutterDeferral() whether it is in force rather than assuming that setting it made it work.

recording_override_drift_c

float recording_override_drift_c = 0.0f

The drift that overrides FlagWhileRecording::kAvoidUnlessDrift, as a difference in degrees of the SDK's temperature unit.

Zero by default, and zero is not a usable value for that mode: every drift is more than zero, so the override would fire every time and the mode would behave as FlagWhileRecording::kUse. Detector::SetAuto() throws ConfigException for that pair rather than accepting it and quietly doing something else.

There is deliberately no sensible default here, because how much drift a measurement can bear is a property of what is being measured and not of the camera. Any number the SDK picked would be an invention presented as advice. Measure what your process tolerates, or use FlagWhileRecording::kAvoid and accept the whole drift knowingly.

Ignored by the other two modes, and not validated for them.