378 static constexpr
float DEFAULT_TEMPERATURE_SCALING_FILTER_FACTOR = 0.96F;
382 void calculateIntegralImage();
385 void calcMinMaxScalingFactor();
388 void updateMinValue(
float filterFactor = 1.F);
391 void updateMaxValue(
float filterFactor = 1.F);
398 void calcSigmaScalingFactor(
float sigma);
405 void writeColorImage(
unsigned char* dest);
416 bool _integralIsDirty;
454 float _scalingFilterFactor;
457 std::
string _paletteName;
459 std::array<std::array<uint8_t, 3>, 240> _paletteColors;
466 return _thermalFrame;
471 return _thermalFrame.getWidth();
476 return _thermalFrame.getHeight();
501 return _imageInfo.getHeight() * _imageInfo.getStride();
506 return _imageInfo.getStride();
Contains defines controlling the Windows DLL export and import of symbols.
#define OTC_SDK_API
Only needed when working with Windows DLLs.
Definition Api.h:65
Contains a class that encapsulates false color images.
Contains a class encapsulating a processed thermal frame.
OTC_SDK_API void setTemperatureScaling(float min, float max)
Sets the temperature range for the manual scaling mode.
OTC_SDK_API std::string getPaletteName() const noexcept
Returns the name of the currently active palette.
Definition ImageBuilder.h:489
const Image & getImage() noexcept
Grants read access to the generated false color image.
Definition ImageBuilder.h:494
OTC_SDK_API void setPalette(const std::string &name)
Sets the palette for the false color conversion by name.
const ThermalFrame & getThermalFrame() const noexcept
Grants read access to the stored thermal frame.
Definition ImageBuilder.h:464
TemperatureScalingMode getTemperatureScalingMode() const noexcept
Returns the current temperate scaling mode for the false color conversion.
Definition ImageBuilder.h:484
int getHeight() const noexcept
Returns the height in pixels of thermal frame.
Definition ImageBuilder.h:474
int getImageStride() const noexcept
Returns the image stride in bytes.
Definition ImageBuilder.h:504
std::array< unsigned int, 65536 > LookupTable
Type for look up tables.
Definition ImageBuilder.h:114
int getImageSizeInBytes() const noexcept
Returns the image size in bytes including potential width padding.
Definition ImageBuilder.h:499
OTC_SDK_API float getTemperatureScalingFilterFactor() const noexcept
Returns the low pass filter factor for the temperature scaling method.
OTC_SDK_API bool getMeanTemperatureInRegion(TemperatureRegion &meanRegion)
Returns the mean temperature in °C of a rectangular region.
OTC_SDK_API void convertTemperatureToPaletteImage()
Triggers the image conversion.
void setTemperatureScalingMode(TemperatureScalingMode mode) noexcept
Sets the temperature scaling mode for the false color conversion.
Definition ImageBuilder.h:479
OTC_SDK_API LookupTable createLookupTable()
Creates a lookup table for the false color conversion.
OTC_SDK_API void copyImageDataTo(unsigned char *destination, int size) const noexcept
Copies the false color image data to the given destination array.
int getWidth() const noexcept
Returns the width in pixels of the thermal frame.
Definition ImageBuilder.h:469
OTC_SDK_API float getTemperatureScalingMinFiltered() const noexcept
Returns the filtered minimum temperature actually used by the most recent frame's palette rendering.
OTC_SDK_API float getTemperatureScalingMax() const noexcept
Returns the maximum temperature used to scale the image.
OTC_SDK_API float getTemperatureScalingMaxFiltered() const noexcept
Returns the filtered maximum temperature actually used by the most recent frame's palette rendering....
OTC_SDK_API ImageBuilder(ColorFormat colorFormat, WidthAlignment widthAlignment)
Constructor.
OTC_SDK_API float getTemperatureScalingMin() const noexcept
Returns the minimum temperature used to scale the image.
OTC_SDK_API void setTemperatureScalingFilterFactor(float filterFactor)
Sets the low pass filter factor for the temperature scaling for smooth transitions.
OTC_SDK_API bool getMinMaxRegions(int radius, TemperatureRegion &minRegion, TemperatureRegion &maxRegion)
Returns the region of minimum/maximum temperature in °C with the given radius.
OTC_SDK_API void setThermalFrame(const ThermalFrame &thermalFrame)
Sets a new thermal frame.
OTC_SDK_API float getTemperature(int index) const
Returns the temperature the from last acquired image at specified pixel index.
Encapsulates all relevant information about a false color image.
Definition ImageInfo.h:57
Encapsulates false color images with 8-bit color depth.
Definition Image.h:37
Converts temperatures in °C to and from their internal SDK representation.
Definition TemperatureConverter.h:23
Encapsulates processed thermal frame data.
Definition ThermalFrame.h:23
Main SDK namespace.
Definition AlarmChannel.h:21
ColorFormat
Represents the different available color formats.
Definition ImageInfo.h:32
TemperatureScalingMode
Represents the different mode to scale temperatures when generating a false color image.
Definition ImageBuilder.h:101
@ Sigma3
Same as Sigma1, but with factor 3.
Definition ImageBuilder.h:105
@ MinMax
Dynamic determination of minimum and maximum temperature as upper and lower limit.
Definition ImageBuilder.h:103
@ Manual
User-defined upper and lower limit (fixed values).
Definition ImageBuilder.h:102
@ Sigma1
Dynamic determination of upper and lower limit from standard deviation of temperature image.
Definition ImageBuilder.h:104
WidthAlignment
Represents the different available width alignments.
Definition ImageInfo.h:47
Helper struct for calculating an integral image.
Definition ImageBuilder.h:90
std::uint64_t value
Summed up valid pixel values.
Definition ImageBuilder.h:92
std::uint32_t count
Number of valid pixels summed up.
Definition ImageBuilder.h:94
Characterizes a rectangular region by the indexes of the upper left and the lower right corners along...
Definition ImageBuilder.h:44
bool fitsInRectangle(int width, int height, int padding=0) const noexcept
Returns whether the region fits within a rectangle of the given dimensions.
int y2
Y index of the lower right corner.
Definition ImageBuilder.h:84
int x2
X index of the lower right corner.
Definition ImageBuilder.h:82
TemperatureRegion() noexcept
Constructor.
float temperature
Associated temperature in °C.
Definition ImageBuilder.h:74
int y1
Y index of the upper left corner.
Definition ImageBuilder.h:79
void reset() noexcept
Resets the temperature and the coordinates of the corners.
int x1
X index of the upper left corner.
Definition ImageBuilder.h:77