ColorCorrector Class Reference

#include <ColorCorrector.h>

List of all members.

Static Public Member Functions

static unsigned char correct (const int x, const int y, const int c, const unsigned char intensity)
static void correct (const int x, const int y, unsigned char &intensityY, unsigned char &intensityU, unsigned char &intensityV)
static void correct (Image &image)
static void load ()
static void disable ()

Private Types

 maxRadius = 140
 centerRadius = 10
 maxRadialOrder = 10
 maxColorOrder = 10
enum  { maxRadius = 140, centerRadius = 10 }
enum  { maxRadialOrder = 10, maxColorOrder = 10 }

Static Private Member Functions

static unsigned char colorDistortionCorrection (const unsigned char radius_i, const unsigned char color, const unsigned char channel)
static unsigned char calcRadius (int x, int y)

Static Private Attributes

static unsigned char radiusTable [cameraResolutionHeight_ERS7][cameraResolutionWidth_ERS7]
static unsigned char correctionTable [maxRadius][256][3]
static int radialOrder = 0
static int colorOrder = 0
static double radialP [3 *maxRadialOrder]
static double colorP [3 *maxColorOrder]
static bool loaded = false


Detailed Description

The class represents a table for color correction.

Definition at line 24 of file ColorCorrector.h.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
maxRadius 
centerRadius 

Definition at line 27 of file ColorCorrector.h.

anonymous enum [private]

Enumerator:
maxRadialOrder 
maxColorOrder 

Definition at line 32 of file ColorCorrector.h.


Member Function Documentation

static unsigned char ColorCorrector::calcRadius ( int  x,
int  y 
) [inline, static, private]

The function calculates the corresponding radius for an image coordinate.

Parameters:
x The x coordinate of a pixel.
y The y coordinate of a pixel.
Returns:
The distance from the center of the image.

Definition at line 53 of file ColorCorrector.h.

References abs(), cameraResolutionHeight_ERS7, cameraResolutionWidth_ERS7, centerRadius, and int().

Referenced by load().

unsigned char ColorCorrector::colorDistortionCorrection ( const unsigned char  radius_i,
const unsigned char  color,
const unsigned char  channel 
) [static, private]

Definition at line 201 of file ColorCorrector.cpp.

References colorP, maxColorOrder, and radialP.

void ColorCorrector::correct ( Image image  )  [static]

The functions corrects all pixels of an image.

Parameters:
image The image that is corrected.

Definition at line 251 of file ColorCorrector.cpp.

References correct(), and image.

static void ColorCorrector::correct ( const int  x,
const int  y,
unsigned char &  intensityY,
unsigned char &  intensityU,
unsigned char &  intensityV 
) [inline, static]

The functions returns the corrected color of a pixel.

Parameters:
x The x coordinate of the pixel.
y The y coordinate of the pixel.
intensityY The intensity of the pixel in color channel Y.
intensityU The intensity of the pixel in color channel U.
intensityV The intensity of the pixel in color channel V.

Definition at line 85 of file ColorCorrector.h.

References correctionTable, and radiusTable.

static unsigned char ColorCorrector::correct ( const int  x,
const int  y,
const int  c,
const unsigned char  intensity 
) [inline, static]

The functions returns a corrected intensity of a pixel.

Parameters:
x The x coordinate of the pixel.
y The y coordinate of the pixel.
c The color channel corrected.
intensity The intensity of the pixel in color channel c.
Returns:
The corrected intensity.

Definition at line 71 of file ColorCorrector.h.

References correctionTable, and radiusTable.

Referenced by PanoramaImageProcessor::applyImageFilters(), ColorClustering::clusterImage(), correct(), CTSLColorTableToolDlgBar::doColorCorrection(), ImageView::draw(), GT2004BallSpecialist::findEndOfBall(), ColorTableTSL::generateColorClassImage(), REdgeDetection::getColor(), RasterStrategy::getColor(), RasterSpecialist::getColor(), CColorTable64DlgBar::handleMessage(), GT2004ImageProcessor::scan(), GT2004BeaconDetector::scanForBeaconEdges(), GT2004BeaconDetector::scanForBeaconPart(), and GT2004BeaconDetector::scanForPink().

void ColorCorrector::disable (  )  [static]

The function disables the color correction. The table is cleared.

Definition at line 235 of file ColorCorrector.cpp.

References correctionTable, and radiusTable.

Referenced by load().

void ColorCorrector::load (  )  [static]

Loads the calibration image and computes the lookup table

Definition at line 43 of file ColorCorrector.cpp.

References calcRadius(), cameraResolutionHeight_ERS7, cameraResolutionWidth_ERS7, correctionTable, disable(), InStream< S, R >::eof(), InFile::exists(), getLocation(), image, loaded, maxRadius, radiusTable, and InStream< S, R >::read().

Referenced by GT2004ImageProcessor::execute(), FastPanoramaProcessor::framePrepare(), PanoramaImageProcessor::initialize(), and RobotConsole::RobotConsole().


Member Data Documentation

int ColorCorrector::colorOrder = 0 [static, private]

Definition at line 34 of file ColorCorrector.h.

double ColorCorrector::colorP [static, private]

Definition at line 36 of file ColorCorrector.h.

Referenced by colorDistortionCorrection().

unsigned char ColorCorrector::correctionTable [static, private]

The correction table.

Definition at line 29 of file ColorCorrector.h.

Referenced by correct(), disable(), and load().

bool ColorCorrector::loaded = false [static, private]

Determines whether the corrector has already been loaded.

Definition at line 45 of file ColorCorrector.h.

Referenced by load().

int ColorCorrector::radialOrder = 0 [static, private]

Definition at line 33 of file ColorCorrector.h.

double ColorCorrector::radialP [static, private]

Definition at line 35 of file ColorCorrector.h.

Referenced by colorDistortionCorrection().

unsigned char ColorCorrector::radiusTable [static, private]

The radius table.

Definition at line 28 of file ColorCorrector.h.

Referenced by correct(), disable(), and load().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:22:59 2006 for DT2005.panorama by  doxygen 1.4.7