#include <ColorCorrector.h>
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 |
Definition at line 24 of file ColorCorrector.h.
anonymous enum [private] |
anonymous enum [private] |
static unsigned char ColorCorrector::calcRadius | ( | int | x, | |
int | y | |||
) | [inline, static, private] |
The function calculates the corresponding radius for an image coordinate.
x | The x coordinate of a pixel. | |
y | The y coordinate of a pixel. |
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] |
void ColorCorrector::correct | ( | Image & | image | ) | [static] |
The functions corrects all pixels of an image.
image | The image that is corrected. |
Definition at line 251 of file ColorCorrector.cpp.
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.
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.
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. |
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().
int ColorCorrector::colorOrder = 0 [static, private] |
Definition at line 34 of file ColorCorrector.h.
double ColorCorrector::colorP [static, private] |
unsigned char ColorCorrector::correctionTable [static, private] |
The correction table.
Definition at line 29 of file ColorCorrector.h.
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] |
unsigned char ColorCorrector::radiusTable [static, private] |
The radius table.
Definition at line 28 of file ColorCorrector.h.