#include <ImageBuilder.h>
Public Member Functions | |
void | calcHistogram (unsigned int *hist, unsigned int histsize, int tMin, int tMax) |
void | convertTemperatureToPaletteImage (unsigned char *dst, bool ignoreStride=false) |
void | convertTemperatureToPaletteImage (unsigned int lut[65536], unsigned char *dst) |
void | drawCrosshair (unsigned char *img, unsigned int x, unsigned int y, unsigned channels=3) |
void | fillPaletteLookup (unsigned int lut[65536]) |
unsigned int | getHeight () |
float | getIsothermalMax () |
float | getIsothermalMin () |
float | getMeanTemperature (int u1, int v1, int u2, int v2) |
void | getMinMaxRegion (int radius, ExtremalRegion *minRegion, ExtremalRegion *maxRegion) |
EnumOptrisColoringPalette | getPalette () |
EnumOptrisPaletteScalingMethod | getPaletteScalingMethod () |
void | getPaletteTable (paletteTable &table) |
unsigned int | getStride (void) |
float | getTemperatureAt (int index) |
float | getTemperatureAt (int u, int v) |
unsigned int | getWidth () |
ImageBuilder (bool alignStride=true) | |
void | setData (unsigned int width, unsigned int height, unsigned short *data) |
void | setManualTemperatureRange (float min, float max) |
void | setPalette (EnumOptrisColoringPalette palette) |
void | setPaletteScalingMethod (EnumOptrisPaletteScalingMethod method) |
void | yuv422torgb24 (const unsigned char *src, unsigned char *dst, unsigned int w, unsigned int h) |
~ImageBuilder () | |
Private Member Functions | |
void | calcMinMaxScalingFactor () |
void | calcSigmaScalingFactor (float sigma) |
void | calculateIntegralImage () |
Private Attributes | |
bool | _alignStride |
unsigned short * | _data |
unsigned int | _height |
unsigned long * | _integral |
bool | _integralIsDirty |
unsigned short | _max |
unsigned short | _min |
EnumOptrisColoringPalette | _palette |
EnumOptrisPaletteScalingMethod | _scalingMethod |
unsigned int | _size |
unsigned int | _stride |
unsigned int | _width |
Image creation module for displaying purposes
Definition at line 53 of file ImageBuilder.h.
optris::ImageBuilder::ImageBuilder | ( | bool | alignStride = true | ) |
Standard constructor
Standard destructor
void optris::ImageBuilder::calcHistogram | ( | unsigned int * | hist, |
unsigned int | histsize, | ||
int | tMin, | ||
int | tMax | ||
) |
calculate histogram
[out] | hist | histogram |
[in] | histsize | number of quantization steps |
[in] | tMin | minimum temperature |
[in] | tMax | maximum temperature |
void optris::ImageBuilder::calcMinMaxScalingFactor | ( | ) | [private] |
Calculate scaling boundaries based on minimal and maximal temperature
void optris::ImageBuilder::calcSigmaScalingFactor | ( | float | sigma | ) | [private] |
Calculate scaling boundaries based on standard deviation
[in] | sigma | Multiplication factor for sigma range |
void optris::ImageBuilder::calculateIntegralImage | ( | ) | [private] |
void optris::ImageBuilder::convertTemperatureToPaletteImage | ( | unsigned char * | dst, |
bool | ignoreStride = false |
||
) |
Image conversion to rgb
[out] | dst | Destination image |
[in] | by | default columns are multiple of 4, i.e., stride is added |
void optris::ImageBuilder::convertTemperatureToPaletteImage | ( | unsigned int | lut[65536], |
unsigned char * | dst | ||
) |
Image conversion to rgb with lookup table. This method is efficient, but works only with fixed temperature ranges (manual mode).
[in] | lut | lookup table |
[out] | dst | Destination image |
void optris::ImageBuilder::drawCrosshair | ( | unsigned char * | img, |
unsigned int | x, | ||
unsigned int | y, | ||
unsigned | channels = 3 |
||
) |
Draw crosshair to the center of image
in/out] | img image in RGB or RGBA format | |
[in] | x | x-position in image |
[out] | y | y-position in image |
void optris::ImageBuilder::fillPaletteLookup | ( | unsigned int | lut[65536] | ) |
Fill lookup table for false color conversion.
[out] | lut | lookup table |
unsigned int optris::ImageBuilder::getHeight | ( | ) |
Get image height
float optris::ImageBuilder::getIsothermalMax | ( | ) |
Get maximum temperature used to scale image
float optris::ImageBuilder::getIsothermalMin | ( | ) |
Get minimum temperature used to scale image
float optris::ImageBuilder::getMeanTemperature | ( | int | u1, |
int | v1, | ||
int | u2, | ||
int | v2 | ||
) |
Get mean temperature of rectangular measuring field
[in] | u1 | u-component of image coordinate, i. e. column of 1st point |
[in] | v1 | v-component of image coordinate, i. e. row of 1st point |
[in] | u2 | u-component of image coordinate, i. e. column of 2nd point |
[in] | v2 | v-component of image coordinate, i. e. row of 2nd point |
void optris::ImageBuilder::getMinMaxRegion | ( | int | radius, |
ExtremalRegion * | minRegion, | ||
ExtremalRegion * | maxRegion | ||
) |
Get region of minimum/maximum temperature with given radius
[in] | radius | Radius of region |
[out] | minRegion | Region of minimum mean temperature |
[out] | maxRegion | Region of maximum mean temperature |
Get palette for color conversion return coloring palette
Accessor for activated color conversion mode
void optris::ImageBuilder::getPaletteTable | ( | paletteTable & | table | ) |
Get palette table for color conversion
unsigned int optris::ImageBuilder::getStride | ( | void | ) |
If memory alignment is needed, this class provides a stride parameter configured with setSize(...). Memory will be aligned such that the image width is a multiple of 4
float optris::ImageBuilder::getTemperatureAt | ( | int | index | ) |
Get temperature from last acquired image at specified image index
[in] | index | Image index (must be within [0; getWidth()*getHeight()]) return temperature in degree Celsius |
float optris::ImageBuilder::getTemperatureAt | ( | int | u, |
int | v | ||
) |
Get temperature from last acquired image at specified image coordinates
[in] | u | Image column (must be within [0; getWidth()]) |
[in] | v | Image row (must be within [0; getHeight()]) return temperature in degree Celsius |
unsigned int optris::ImageBuilder::getWidth | ( | ) |
Get image width
void optris::ImageBuilder::setData | ( | unsigned int | width, |
unsigned int | height, | ||
unsigned short * | data | ||
) |
Set new data
[in] | width | image width |
[in] | height | image height |
[in] | data | image data |
void optris::ImageBuilder::setManualTemperatureRange | ( | float | min, |
float | max | ||
) |
Set temperature range for manual scaling method
[in] | min | Lower limit in °C |
[in] | max | Upper limit in °C |
void optris::ImageBuilder::setPalette | ( | EnumOptrisColoringPalette | palette | ) |
Set palette for color conversion
[in] | palette | coloring palette |
Scaling method of color conversion
[in] | method | Scaling method |
void optris::ImageBuilder::yuv422torgb24 | ( | const unsigned char * | src, |
unsigned char * | dst, | ||
unsigned int | w, | ||
unsigned int | h | ||
) |
Convert YUV422 image to RGB format (8-Bit per channel)
[in] | src | source image |
[out] | dst | destination image |
w | image width | |
h | image height |
bool optris::ImageBuilder::_alignStride [private] |
Memory alignment
Definition at line 288 of file ImageBuilder.h.
unsigned short* optris::ImageBuilder::_data [private] |
Image data
Definition at line 238 of file ImageBuilder.h.
unsigned int optris::ImageBuilder::_height [private] |
Real height of Imager-Matrix
Definition at line 268 of file ImageBuilder.h.
unsigned long* optris::ImageBuilder::_integral [private] |
Integral image
Definition at line 243 of file ImageBuilder.h.
bool optris::ImageBuilder::_integralIsDirty [private] |
Flag for recomputation of integral image
Definition at line 293 of file ImageBuilder.h.
unsigned short optris::ImageBuilder::_max [private] |
Maximum temperature of display range
Definition at line 258 of file ImageBuilder.h.
unsigned short optris::ImageBuilder::_min [private] |
Minimum temperature of display range
Definition at line 253 of file ImageBuilder.h.
Coloring palette for conversion method
Definition at line 283 of file ImageBuilder.h.
Variable indicating the temperature range scaling method
Definition at line 248 of file ImageBuilder.h.
unsigned int optris::ImageBuilder::_size [private] |
Real size if Imager-Matrix
Definition at line 278 of file ImageBuilder.h.
unsigned int optris::ImageBuilder::_stride [private] |
Width including additional pixels in every row of Imager-Matrix to fit the modulo-4-criteria
Definition at line 273 of file ImageBuilder.h.
unsigned int optris::ImageBuilder::_width [private] |
Real width of Imager-Matrix
Definition at line 263 of file ImageBuilder.h.