Public Member Functions | Private Member Functions | Private Attributes
optris::ImageBuilder Class Reference

#include <ImageBuilder.h>

List of all members.

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

Detailed Description

Image creation module for displaying purposes

Author:
Stefan May (Nuremberg Institute of Technology Georg Simon Ohm), Matthias Wiedemann (Optris GmbH)

Definition at line 53 of file ImageBuilder.h.


Constructor & Destructor Documentation

optris::ImageBuilder::ImageBuilder ( bool  alignStride = true)

Standard constructor

Standard destructor


Member Function Documentation

void optris::ImageBuilder::calcHistogram ( unsigned int *  hist,
unsigned int  histsize,
int  tMin,
int  tMax 
)

calculate histogram

Parameters:
[out]histhistogram
[in]histsizenumber of quantization steps
[in]tMinminimum temperature
[in]tMaxmaximum temperature

Calculate scaling boundaries based on minimal and maximal temperature

void optris::ImageBuilder::calcSigmaScalingFactor ( float  sigma) [private]

Calculate scaling boundaries based on standard deviation

Parameters:
[in]sigmaMultiplication factor for sigma range
void optris::ImageBuilder::convertTemperatureToPaletteImage ( unsigned char *  dst,
bool  ignoreStride = false 
)

Image conversion to rgb

Parameters:
[out]dstDestination image
[in]bydefault 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).

Parameters:
[in]lutlookup table
[out]dstDestination image
void optris::ImageBuilder::drawCrosshair ( unsigned char *  img,
unsigned int  x,
unsigned int  y,
unsigned  channels = 3 
)

Draw crosshair to the center of image

Parameters:
in/out]img image in RGB or RGBA format
[in]xx-position in image
[out]yy-position in image
void optris::ImageBuilder::fillPaletteLookup ( unsigned int  lut[65536])

Fill lookup table for false color conversion.

Parameters:
[out]lutlookup table

Get image height

Returns:
image height

Get maximum temperature used to scale image

Returns:
Temperature in °C

Get minimum temperature used to scale image

Returns:
Temperature in °C
float optris::ImageBuilder::getMeanTemperature ( int  u1,
int  v1,
int  u2,
int  v2 
)

Get mean temperature of rectangular measuring field

Parameters:
[in]u1u-component of image coordinate, i. e. column of 1st point
[in]v1v-component of image coordinate, i. e. row of 1st point
[in]u2u-component of image coordinate, i. e. column of 2nd point
[in]v2v-component of image coordinate, i. e. row of 2nd point
Returns:
mean temperature
void optris::ImageBuilder::getMinMaxRegion ( int  radius,
ExtremalRegion minRegion,
ExtremalRegion maxRegion 
)

Get region of minimum/maximum temperature with given radius

Parameters:
[in]radiusRadius of region
[out]minRegionRegion of minimum mean temperature
[out]maxRegionRegion of maximum mean temperature

Get palette for color conversion return coloring palette

Accessor for activated color conversion mode

Returns:
Scaling method

Get palette table for color conversion

Returns:
coloring palette table as rgb triple
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

Get temperature from last acquired image at specified image index

Parameters:
[in]indexImage 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

Parameters:
[in]uImage column (must be within [0; getWidth()])
[in]vImage row (must be within [0; getHeight()]) return temperature in degree Celsius

Get image width

Returns:
image width
void optris::ImageBuilder::setData ( unsigned int  width,
unsigned int  height,
unsigned short *  data 
)

Set new data

Parameters:
[in]widthimage width
[in]heightimage height
[in]dataimage data
void optris::ImageBuilder::setManualTemperatureRange ( float  min,
float  max 
)

Set temperature range for manual scaling method

Parameters:
[in]minLower limit in °C
[in]maxUpper limit in °C

Set palette for color conversion

Parameters:
[in]palettecoloring palette

Scaling method of color conversion

Parameters:
[in]methodScaling 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)

Parameters:
[in]srcsource image
[out]dstdestination image
wimage width
himage height

Member Data Documentation

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.

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.


The documentation for this class was generated from the following file:


optris_drivers
Author(s): Stefan May (Nuremberg Institute of Technology Georg Simon Ohm - www.th-nuernberg.de), 64-Bit platform supported by Fraunhofer IPA (www.ipa.fraunhofer.de), Support for ROS hydro migration by Christopher-Eyk Hrabia (DAI-Labor, Technische Universität Berlin)
autogenerated on Mon Oct 6 2014 03:09:39