![]() |
Thermal Camera SDK 10.1.1
SDK for Optris Thermal Cameras
|
Creates false color images from thermal frames. More...
#include <ImageBuilder.h>

Public Types | |
| using | LookupTable = std::array<unsigned int, 65536> |
| Type for look up tables. | |
Public Member Functions | |
| OTC_SDK_API | ImageBuilder (ColorFormat colorFormat, WidthAlignment widthAlignment) |
| Constructor. | |
| OTC_SDK_API void | setThermalFrame (const ThermalFrame &thermalFrame) |
| Sets a new thermal frame. | |
| const ThermalFrame & | getThermalFrame () const noexcept |
| Grants read access to the stored thermal frame. | |
| int | getWidth () const noexcept |
| Returns the width in pixels of the thermal frame. | |
| int | getHeight () const noexcept |
| Returns the height in pixels of thermal frame. | |
| OTC_SDK_API float | getTemperature (int index) const |
| Returns the temperature the from last acquired image at specified pixel index. | |
| OTC_SDK_API float | getTemperature (int x, int y) const |
| Returns the temperature from last acquired image at specified pixel coordinates. | |
| OTC_SDK_API bool | getMeanTemperatureInRegion (TemperatureRegion &meanRegion) |
| Returns the mean temperature in °C of a rectangular region. | |
| 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 | setManualTemperatureRange (float min, float max) |
| Sets the temperature range for the manual scaling method. | |
| OTC_SDK_API float | getIsothermalMin () const noexcept |
| Returns the minimum temperature used to scale the image. | |
| OTC_SDK_API float | getIsothermalMax () const noexcept |
| Returns the maximum temperature used to scale the image. | |
| void | setPaletteScalingMethod (PaletteScalingMethod method) noexcept |
| Sets the scaling method for the false color conversion. | |
| PaletteScalingMethod | getPaletteScalingMethod () const noexcept |
| Returns the current scaling method for the false color conversion. | |
| void | setPalette (ColoringPalette palette) noexcept |
| Sets the palette for the false color conversion. | |
| OTC_SDK_API ColoringPalette | getPalette () const noexcept |
| Returns the palette for the false color conversion. | |
| const Image & | getImage () noexcept |
| Grants read access to the generated false color image. | |
| int | getImageSizeInBytes () const noexcept |
| Returns the image size in bytes including potential width padding. | |
| int | getImageStride () const noexcept |
| Returns the image stride in bytes. | |
| OTC_SDK_API void | copyImageDataTo (unsigned char *destination, int size) const noexcept |
| Copies the false color image data to the given destination array. | |
| OTC_SDK_API LookupTable | createLookupTable () |
| Creates a lookup table for the false color conversion.. | |
| OTC_SDK_API void | convertTemperatureToPaletteImage () |
| Triggers the image conversion. | |
| OTC_SDK_API void | convertTemperatureToPaletteImage (const LookupTable &lut) |
| Image conversion to RBG with lookup table. This method is efficient, but works only with fixed temperature ranges (manual mode). | |
Creates false color images from thermal frames.
| OTC_SDK_API optris::ImageBuilder::ImageBuilder | ( | ColorFormat | colorFormat, |
| WidthAlignment | widthAlignment ) |
Constructor.
Be mindful of which color format and width alignment you choose. Please refer to the documentation of the enums for more details.
| [in] | colorFormat | for the generated false color image. |
| [in] | widthAlignment | for the generated false color image. |
| OTC_SDK_API void optris::ImageBuilder::convertTemperatureToPaletteImage | ( | const LookupTable & | lut | ) |
Image conversion to RBG with lookup table. This method is efficient, but works only with fixed temperature ranges (manual mode).
| [in] | lut | lookup table. |
|
noexcept |
Copies the false color image data to the given destination array.
| [out] | destination | array to copy the false color image data to. |
| [in] | size | in bytes. The specified size is limited to [0, image size in bytes]. |
| OTC_SDK_API LookupTable optris::ImageBuilder::createLookupTable | ( | ) |
Creates a lookup table for the false color conversion..
|
inlinenoexcept |
Returns the height in pixels of thermal frame.
|
inlinenoexcept |
Grants read access to the generated false color image.
|
inlinenoexcept |
Returns the image size in bytes including potential width padding.
|
inlinenoexcept |
Returns the image stride in bytes.
The stride is the image width in bytes including potential padding.
|
noexcept |
Returns the maximum temperature used to scale the image.
|
noexcept |
Returns the minimum temperature used to scale the image.
| OTC_SDK_API bool optris::ImageBuilder::getMeanTemperatureInRegion | ( | TemperatureRegion & | meanRegion | ) |
Returns the mean temperature in °C of a rectangular region.
Before providing the region to this method you have to define the rectangular area it covers by specifying its upper left and lower right corners.
| [out] | meanRegion | in which to calculate the mean temperature. |
| OTC_SDK_API bool optris::ImageBuilder::getMinMaxRegions | ( | int | radius, |
| TemperatureRegion & | minRegion, | ||
| TemperatureRegion & | maxRegion ) |
Returns the region of minimum/maximum temperature in °C with the given radius.
The method will fill in all the data for the min and max temperature region.
| [in] | radius | radius of the region. |
| [out] | minRegion | region of minimum mean temperature. |
| [out] | maxRegion | region of maximum mean temperature. |
|
inlinenoexcept |
Returns the palette for the false color conversion.
|
inlinenoexcept |
Returns the current scaling method for the false color conversion.
| OTC_SDK_API float optris::ImageBuilder::getTemperature | ( | int | index | ) | const |
Returns the temperature the from last acquired image at specified pixel index.
| [in] | index | pixel index. |
| SDKException | if index is out of range. |
| OTC_SDK_API float optris::ImageBuilder::getTemperature | ( | int | x, |
| int | y ) const |
Returns the temperature from last acquired image at specified pixel coordinates.
The origin of coordinates is located in the upper left corner with the x-axis pointing right and the y-axis pointing downwards.
| [in] | x | coordinates. |
| [in] | y | coordinates. |
| SDKException | if coordinates are out of range. |
|
inlinenoexcept |
Grants read access to the stored thermal frame.
|
inlinenoexcept |
Returns the width in pixels of the thermal frame.
| OTC_SDK_API void optris::ImageBuilder::setManualTemperatureRange | ( | float | min, |
| float | max ) |
Sets the temperature range for the manual scaling method.
| [in] | min | lower limit in °C. |
| [in] | max | upper limit in °C. |
|
inlinenoexcept |
Sets the palette for the false color conversion.
| [in] | palette | coloring palette to set. |
|
inlinenoexcept |
Sets the scaling method for the false color conversion.
| [in] | method | scaling method. |
| OTC_SDK_API void optris::ImageBuilder::setThermalFrame | ( | const ThermalFrame & | thermalFrame | ) |
Sets a new thermal frame.
The provide frame will be copied to an internal buffer.
| [in] | thermalFrame | data. |