optris::sdk::EmissivityResolver
Re-resolves a temperature at a different emissivity.
Region::emissivity is a radiometric override, and honouring it means undoing the correction the frame already carries and redoing it at the region's own value. That needs the camera's temperature/radiance curve, which a RegionStore has no way to know -- it is handed Celsius and nothing else, which is exactly why a per-region emissivity used to be accepted, stored, read back, and then have no effect on any number the region reported.
So the owner supplies one of these. Imager installs its own from the active pipeline backend. A standalone RegionStore given none measures at whatever emissivity its input was already corrected at, which is the behaviour it has always had.
Public functions
~EmissivityResolver
~EmissivityResolver()=default
AtEmissivity
auto AtEmissivity(float measured_c, float emissivity) const -> float=0
measured_c is a temperature from the frame, corrected at the camera's global emissivity. Returns what the same pixel reads at emissivity.
Must be monotonic in measured_c. Hot-spot and cold-spot regions find their extreme pixel before this runs, on the uncorrected frame; a mapping that reordered temperatures would move the extreme out from under them.
Implementations return measured_c unchanged when they cannot do better -- no characteristic curve loaded, or an emissivity outside the sensible range. Reporting the uncorrected number is right; inventing a correction from a curve that is not there is not.
AppliesTo
auto AppliesTo(uint64_t, float) const -> bool
Whether this region's own emissivity still has to be applied, or is already in the pixels being measured.
True by default, which is a live camera: the pipeline corrects at the global emissivity and nothing else, so every region's own value is still owed.
It is false where the correction has already happened for this one region and applying it again would apply it twice. That is a per-region fact, not a per-frame one, and it is why this sits here rather than being expressed by passing no resolver at all: on a replay, a region restored out of the recording may carry an emissivity the recording camera's GPU already baked into the pixels, while a region the operator added afterwards certainly does not. Those two regions are in the same frame and must be treated differently.
emissivity is the value the region carries, passed so an implementation can tell "the same region, still at the value it
was restored with" from "the same region, since changed".