optris::sdk::PipelineDiagnostics
Read-only snapshot of the internal pipeline buffers for diagnostic tools. Returned by Imager::GetDiagnostics(). All spans point into the live Pipeline struct and are only valid until the next frame is processed; copy if you need to keep them.
Warning: Everything here is SENSOR-NATIVE. Imager::SetOrientation() rotates and mirrors the frame at the very end of the pipeline, and none of it reaches this struct: width/height are the sensor's own, not the pair Imager::GetWidth()/GetHeight() report, and every buffer below is in sensor coordinates. So once an orientation is set, these buffers and the delivered frame disagree; a diagnostic overlaid on the picture will appear rotated relative to it.
That is deliberate. A diagnostic buffer has to line up with the hardware and with the calibration tables beside it (the gain LUT, the BXF LUT, the dead-pixel mask, the SoS kernel), all of which are per-sensor-pixel and cannot be rotated without being wrong. Rotating the diagnostics to match the picture would break the one correspondence they exist for.
To place a diagnostic pixel in the oriented frame, apply the orientation from Imager::GetOrientation() yourself.
Public attributes
width
uint32_t width = 0
SENSOR dimensions. Not Imager::GetWidth()/GetHeight(), which are swapped by a quarter turn. See the warning above.
height
uint32_t height = 0
buffer_memory_bytes
uint64_t buffer_memory_bytes = 0
Bytes held by the active backend's frame buffers. Unlike the spans below this is not tied to a frame, and it is the one number the old SdkMetrics actually measured.
raw_adu_buf
Span< const uint16_t > raw_adu_buf
Raw ADU from the sensor (uint16, pixel_count elements).
energy_buf
Span< const int32_t > energy_buf
Energy buffer after radiometry (int32, pixel_count elements).
thermal_buf
Span< const int16_t > thermal_buf
Calibrated temperature in internal format (int16). celsius = (value - 1000) / 10.0
filter_buf
Span< const int16_t > filter_buf
Spatial/temporal filter output (int16, same format as thermal).
bgra_buf
Span< const uint8_t > bgra_buf
Colorized BGRA output (4 bytes per pixel): blue, green, red, alpha, in that order. See BgraFrame.
rdc_corrected_buf
Span< const int32_t > rdc_corrected_buf
RDC corrected buffer (int32), empty if RDC is off.
gain_lut
Span< const float > gain_lut
Per-pixel gain LUT (float, pixel_count elements).
bxf_lut
Span< const float > bxf_lut
Per-pixel BXF (black-body fixpoint) LUT.
sos_kernel
Span< const float > sos_kernel
SoS convolution kernel (square, sos_kernel_size x sos_kernel_size).
sos_kernel_size
uint32_t sos_kernel_size = 0
norm_table
Span< const int32_t > norm_table
Energy normalization table.
emissivity
float emissivity = 0
Current processing parameters.
transmissivity
float transmissivity = 0
ambient_temp_c
float ambient_temp_c = 0
The ambient temperature in use, in the SDK's temperature unit (Celsius unless SetTemperatureUnit() chose Fahrenheit).
dde_gain_base
float dde_gain_base = 0
dde_gain_detail
float dde_gain_detail = 0
temporal_alpha
float temporal_alpha = 0
backend_filter_mode
int backend_filter_mode = 0
The filter the backend is running, in the backend's own numbering -- not a NoiseFilter. The two pipelines number their filters differently, which is exactly the confusion NoiseFilter exists to end, so this one is deliberately not dressed up as the public type. Use Processing::Get().filter_mode for what was asked for; this is for looking inside when the two might differ.
nuc_valid
bool nuc_valid = false
NUC state.
nuc_last_temp_c
float nuc_last_temp_c = 0
The temperature taken at the last NUC, in the SDK's temperature unit. Only a reading when nuc_valid is true; otherwise 0 in Celsius and NaN in Fahrenheit, where 0 would read as 32 F.
rdc_enabled
bool rdc_enabled = false
RDC state.
rdc_table_valid
bool rdc_table_valid = false
fact_cosine
float fact_cosine = 0
fact_alpha
float fact_alpha = 0
fact_alpha_low
float fact_alpha_low = 0
fact_bxf_fact
float fact_bxf_fact = 0
offs_bxf_fact
float offs_bxf_fact = 0
fact_bxf_offs
float fact_bxf_offs = 0
offs_bxf_offs
float offs_bxf_offs = 0
bxf_diff
float bxf_diff = 0
energy_flag_value
int32_t energy_flag_value = 0
ref_thermal_buf
Span< const int16_t > ref_thermal_buf
Reference (legacy CPU) pipeline thermal output for side-by-side comparison. Empty if no reference backend is active.
valid
bool valid = false
Whether the diagnostics struct was successfully populated.
pixels_withheld
bool pixels_withheld = false
The per-frame pixel buffers above are empty on purpose, and pixels_withheld_explanation says why.
This call hands out live spans into the pipeline's own buffers, and on an export-restricted camera those buffers advance at the full sensor rate for the one to one and a half seconds of each shutter cycle: the 9 Hz gate sits ahead of ProcessFrame() and is deliberately skipped there, because the NUC reference has to accumulate every frame of the closed window. A caller polling this call fast through that window would therefore read per-frame pixel data above the ceiling the camera is restricted to, which is the whole of it. So for a frame the cap did not admit, the pixels are not handed out.
Why a flag and not simply an empty span. A caller has to be able to tell "no pixels, because the cap did not admit this
frame" from "no pixels, because something went wrong". Returning empty and saying nothing would put a smaller copy of this same defect in the fix for it. valid stays true: the backend answered, and everything it answered with is here.
What is still here. Every non-pixel field: width, height, buffer_memory_bytes, the processing parameters, the NUC and RDC state, and the calibration tables (gain_lut, bxf_lut, sos_kernel, norm_table). Those are per-sensor-pixel but they are not per-frame -- they do not advance with the stream, so reading them quickly reveals nothing about the scene.
Always false on an unrestricted camera, which is every camera without the export restriction, and on a simulated or replayed source. The gate is the same per-frame admission bit the cap already sets, so nothing changes for the ordinary case.
pixels_withheld_explanation
std::string pixels_withheld_explanation
Why the pixel buffers are absent, in the SDK's own words. Empty unless pixels_withheld is set.