Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MSH2004ColorCorrector Class Reference

The class represents a table for color correction. More...

#include <MSH2004ColorCorrector.h>

List of all members.

Public Member Functions

 MSH2004ColorCorrector ()
 Default constructor.

void getCorrectedPixel (const int x, const int y, unsigned char &Y, unsigned char &U, unsigned char &V) const
 This functions returns a radiometric distortion corrected pixel.

void getCorrectedColor (const int x, const int y, unsigned char &color, unsigned char spectrum) const
void correctPixel (Image &source, const int x, const int y) const
 This functions corercts the radiometric distortion of a chosen pixel in an image.

bool isActive () const
 The function returns whether the corrector is active.


Private Types

enum  { maxRadialOrder = 10, maxColorOrder = 10, max_radius = 140 }
 radialOrder is the polinomial power (+1) of the radial factor of the color correction. More...


Private Member Functions

void setupRadiusLUT ()
 The following functions are called by the constructor to build the LookUpTables.

void setupCorrectionLUT ()
unsigned char colorDistortionCorrection (const unsigned char radius_i, const unsigned char color, const unsigned char channel) const
 Corrects the radiometric distortion of a single channel of a given pixel, based on the distance from the image center.


Private Attributes

int radialOrder
int colorOrder
unsigned char radiusLUT [cameraResolutionHeight_ERS7][cameraResolutionWidth_ERS7]
unsigned char colorCorrectionLUT [max_radius][256][3]
 Radius look up table, used to index the correction table.

bool active
 Correction table.

double radialP [3 *maxRadialOrder]
 Flag which keeps the corrector status.

double colorP [3 *maxColorOrder]


Detailed Description

The class represents a table for color correction.

Definition at line 21 of file MSH2004ColorCorrector.h.


Member Enumeration Documentation

anonymous enum [private]
 

radialOrder is the polinomial power (+1) of the radial factor of the color correction.

colorOrder is the polinomial power (+1) of the brighness factor of the color correction.

Enumeration values:
maxRadialOrder 
maxColorOrder 
max_radius 

Definition at line 29 of file MSH2004ColorCorrector.h.


Constructor & Destructor Documentation

MSH2004ColorCorrector::MSH2004ColorCorrector  ) 
 

Default constructor.

Definition at line 15 of file MSH2004ColorCorrector.cpp.

References InFile::exists(), getLocation(), setupCorrectionLUT(), and setupRadiusLUT().

Here is the call graph for this function:


Member Function Documentation

void MSH2004ColorCorrector::setupRadiusLUT  )  [private]
 

The following functions are called by the constructor to build the LookUpTables.

Definition at line 153 of file MSH2004ColorCorrector.cpp.

References cameraResolutionHeight_ERS7, cameraResolutionWidth_ERS7, centralPointX, centralPointY, and radiusLUT.

Referenced by MSH2004ColorCorrector().

void MSH2004ColorCorrector::setupCorrectionLUT  )  [private]
 

Definition at line 197 of file MSH2004ColorCorrector.cpp.

References colorCorrectionLUT, colorDistortionCorrection(), and max_radius.

Referenced by MSH2004ColorCorrector().

Here is the call graph for this function:

unsigned char MSH2004ColorCorrector::colorDistortionCorrection const unsigned char  radius_i,
const unsigned char  color,
const unsigned char  channel
const [private]
 

Corrects the radiometric distortion of a single channel of a given pixel, based on the distance from the image center.

Parameters:
radius_i The distance of the given pixel from the image center.
color The brightness value of the given channel
channel Selects the channel to which the color distortion is to be applied (Y=0, U=1, V=2).
Returns:
The corrected value.

Definition at line 166 of file MSH2004ColorCorrector.cpp.

Referenced by setupCorrectionLUT().

void MSH2004ColorCorrector::getCorrectedPixel const int  x,
const int  y,
unsigned char &  Y,
unsigned char &  U,
unsigned char &  V
const [inline]
 

This functions returns a radiometric distortion corrected pixel.

Parameters:
x The x coordinate of the pixel.
y The y coordinate of the pixel.
Y The Y (brightness) color channel (to be) corrected.
U The U (crominance) color channel (to be) corrected.
V The V (crominance) color channel (to be) corrected.

Definition at line 67 of file MSH2004ColorCorrector.h.

References colorCorrectionLUT, radiusLUT, U(), and Y.

Referenced by ColorTableTSL::generateColorClassImage(), and GT2004EdgeDetection::getColor().

Here is the call graph for this function:

void MSH2004ColorCorrector::getCorrectedColor const int  x,
const int  y,
unsigned char &  color,
unsigned char  spectrum
const [inline]
 

Definition at line 75 of file MSH2004ColorCorrector.h.

References colorCorrectionLUT, and radiusLUT.

void MSH2004ColorCorrector::correctPixel Image source,
const int  x,
const int  y
const [inline]
 

This functions corercts the radiometric distortion of a chosen pixel in an image.

Parameters:
source The source image
x The x coordinate of the pixel.
y The y coordinate of the pixel.

Definition at line 87 of file MSH2004ColorCorrector.h.

References colorCorrectionLUT, Image::image, radiusLUT, U(), and Y.

Here is the call graph for this function:

bool MSH2004ColorCorrector::isActive  )  const [inline]
 

The function returns whether the corrector is active.

Returns:
Is it active?

Definition at line 103 of file MSH2004ColorCorrector.h.


Member Data Documentation

int MSH2004ColorCorrector::radialOrder [private]
 

Definition at line 30 of file MSH2004ColorCorrector.h.

int MSH2004ColorCorrector::colorOrder [private]
 

Definition at line 31 of file MSH2004ColorCorrector.h.

unsigned char MSH2004ColorCorrector::radiusLUT[cameraResolutionHeight_ERS7][cameraResolutionWidth_ERS7] [private]
 

Definition at line 33 of file MSH2004ColorCorrector.h.

Referenced by correctPixel(), getCorrectedColor(), getCorrectedPixel(), and setupRadiusLUT().

unsigned char MSH2004ColorCorrector::colorCorrectionLUT[max_radius][256][3] [private]
 

Radius look up table, used to index the correction table.

Definition at line 34 of file MSH2004ColorCorrector.h.

Referenced by correctPixel(), getCorrectedColor(), getCorrectedPixel(), and setupCorrectionLUT().

bool MSH2004ColorCorrector::active [private]
 

Correction table.

Definition at line 35 of file MSH2004ColorCorrector.h.

double MSH2004ColorCorrector::radialP[3*maxRadialOrder] [private]
 

Flag which keeps the corrector status.

Definition at line 37 of file MSH2004ColorCorrector.h.

double MSH2004ColorCorrector::colorP[3*maxColorOrder] [private]
 

Definition at line 38 of file MSH2004ColorCorrector.h.


The documentation for this class was generated from the following files:
Generated on Mon Mar 20 22:18:07 2006 for GT2005 by doxygen 1.3.6