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

# SlamColorCorrector Class Reference

This class provides a table to do a radial color correction to compensate for the ERS7 camera image error. More...

`#include <SlamColorCorrector.h>`

List of all members.

## Public Member Functions
unsigned char | correctY (int x, int y, int c) const
| correct an Y pixel value
unsigned char | correctU (int x, int y, int c) const
| correct an U pixel value
unsigned char | correctV (int x, int y, int c) const
| correct an V pixel value
| SlamColorCorrector ()
| Constructor.
void | init ()
| Initializes the correction table.
void | disable ()
| Disable the color correction.
void | generateCorrectedImage (const Image &image, Image &correctedImage) const
| Creates a color corrected image.
## Private Member Functions
int | getRadius (int x, int y) const
| Calculates the corresponding radius to an image coordinate.
## Private Attributes
int | radiusTable [cameraResolutionWidth_ERS7][cameraResolutionHeight_ERS7]
| the redius table
unsigned char | correctionTable [cameraResolutionWidth_ERS7][256][3]
| the correction table

## Detailed Description

This class provides a table to do a radial color correction to compensate for the ERS7 camera image error.

Definition at line 19 of file SlamColorCorrector.h.

## Constructor & Destructor Documentation

SlamColorCorrector::SlamColorCorrector | ( |  | ) |

| Constructor. Definition at line 11 of file SlamColorCorrector.cpp. References disable(), getRobotConfiguration(), RobotConfiguration::getRobotDesign(), and init().

Here is the call graph for this function:

## Member Function Documentation

unsigned char SlamColorCorrector::correctY | ( | int | x,
|  | int | y,
|  | int | c
| ) | const`[inline]`

  | correct an Y pixel value Parameters:
  x | x-coordinate
  y | y-coordinate
  c | old y value
Returns: corrected y value Definition at line 30 of file SlamColorCorrector.h. Referenced by generateCorrectedImage().

unsigned char SlamColorCorrector::correctU | ( | int | x,
|  | int | y,
|  | int | c
| ) | const`[inline]`

  | correct an U pixel value Parameters:
  x | x-coordinate
  y | y-coordinate
  c | old u value
Returns: corrected u value Definition at line 42 of file SlamColorCorrector.h. Referenced by generateCorrectedImage().

unsigned char SlamColorCorrector::correctV | ( | int | x,
|  | int | y,
|  | int | c
| ) | const`[inline]`

  | correct an V pixel value Parameters:
  x | x-coordinate
  y | y-coordinate
  c | old v value
Returns: corrected v value Definition at line 54 of file SlamColorCorrector.h. Referenced by generateCorrectedImage().

void SlamColorCorrector::init | ( |  | ) |

| Initializes the correction table. Table is created from images in whiteImage.log. Definition at line 19 of file SlamColorCorrector.cpp. References Image::cameraInfo, cameraResolutionHeight_ERS7, cameraResolutionWidth_ERS7, disable(), InStream< InFile, InBinary >::eof(), InFile::exists(), Image::frameNumber, getLocation(), getRadius(), idText, Image::image, OUTPUT, InStream< InFile, InBinary >::read(), CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth. Referenced by SlamColorCorrector().

Here is the call graph for this function:

void SlamColorCorrector::disable | ( |  | ) |

| Disable the color correction. Table is cleared. Definition at line 90 of file SlamColorCorrector.cpp. References cameraResolutionHeight_ERS7, and cameraResolutionWidth_ERS7. Referenced by init(), and SlamColorCorrector().

void SlamColorCorrector::generateCorrectedImage | ( | const Image & | image,
|  | Image & | correctedImage
| ) | const`[inline]`

  | Creates a color corrected image. Parameters:
  image | A reference to the image to be corrected
  correctedImage | A reference to the image to be created
Definition at line 82 of file SlamColorCorrector.h. References Image::cameraInfo, Image::colorTable, correctU(), correctV(), correctY(), Image::getHighResY(), Image::image, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, and Image::setHighResY().

Here is the call graph for this function:

int SlamColorCorrector::getRadius | ( | int | x,
|  | int | y
| ) | const`[inline, private]`

| Calculates the corresponding radius to an image coordinate. Definition at line 106 of file SlamColorCorrector.h. References cameraResolutionHeight_ERS7, and cameraResolutionWidth_ERS7. Referenced by init().

## Member Data Documentation

int SlamColorCorrector::radiusTable[cameraResolutionWidth_ERS7][cameraResolutionHeight_ERS7]`[private]`

| the redius table Definition at line 116 of file SlamColorCorrector.h.

unsigned char SlamColorCorrector::correctionTable[cameraResolutionWidth_ERS7][256][3]`[private]`

| the correction table Definition at line 118 of file SlamColorCorrector.h.

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

- Modules/ImageProcessor/SlamImageProcessor/SlamColorCorrector.h
- Modules/ImageProcessor/SlamImageProcessor/SlamColorCorrector.cpp