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

ColorTableTSL Class Reference

Contains a ColorTableTSL which can decode the color for every 8 * 4 * 4 cube in the 255 * 255 * 255 YUV color space. More...

#include <ColorTableTSL.h>

Inheritance diagram for ColorTableTSL:

Inheritance graph
[legend]
Collaboration diagram for ColorTableTSL:

Collaboration graph
[legend]
List of all members.

Members to be used by the ColorTableTSL dialog

void convertYUVToTSL (unsigned char y, unsigned char u, unsigned char v, unsigned char *t, unsigned char *s, unsigned char *l) const
 YUV->TSL conversion.

colorClass classifyTSL (unsigned char t, unsigned char s, unsigned char l) const
 TSL->colorClass classification.

unsigned char colorClasses [32][64][64]
 The color table.

unsigned char tsl_threshold [numOfColors][2][3]
 The TSL threshold table.

unsigned char tsl_index
 The TSL threshold index.

colorClass tsl_order [numOfColors]
 The TSL order table.


Public Member Functions

 ColorTableTSL ()
 Constructor.

 ~ColorTableTSL ()
 Destructor.

void clear ()
 Clear color tables.

void reset ()
 Reset to default TSL values.

void generateTSLDialogImage (const Image &image, ColorClassImage &colorClassImage)
 Generates the Image for the TSL-Dialog-Bar.

void addColorClass (colorClass colorClass, unsigned char t_min, unsigned char t_max, unsigned char s_min, unsigned char s_max, unsigned char l_min, unsigned char l_max)
 Add a TSL range color class to the color table.

void calculateLUT ()
 Calculates the lookup table.

virtual colorClass getColorClass (const unsigned char y, const unsigned char u, const unsigned char v) const
 Returns the color class of a pixel.

virtual void generateColorClassImage (const Image &image, ColorClassImage &colorClassImage) const
 Segments an image to an color class image.


Private Attributes

MSH2004ColorCorrector corrector

Detailed Description

Contains a ColorTableTSL which can decode the color for every 8 * 4 * 4 cube in the 255 * 255 * 255 YUV color space.

Author:
André Osterhues

Definition at line 29 of file ColorTableTSL.h.


Constructor & Destructor Documentation

ColorTableTSL::ColorTableTSL  ) 
 

Constructor.

Definition at line 15 of file ColorTableTSL.cpp.

ColorTableTSL::~ColorTableTSL  ) 
 

Destructor.

Definition at line 24 of file ColorTableTSL.cpp.


Member Function Documentation

void ColorTableTSL::clear  )  [virtual]
 

Clear color tables.

Reimplemented from ColorTable.

Definition at line 31 of file ColorTableTSL.cpp.

References noColor, numOfColors, tsl_index, tsl_order, and tsl_threshold.

Referenced by reset().

void ColorTableTSL::reset void   ) 
 

Reset to default TSL values.

Definition at line 59 of file ColorTableTSL.cpp.

References addColorClass(), clear(), and noColor.

Referenced by operator>>().

Here is the call graph for this function:

void ColorTableTSL::generateTSLDialogImage const Image image,
ColorClassImage colorClassImage
 

Generates the Image for the TSL-Dialog-Bar.

Definition at line 341 of file ColorTableTSL.cpp.

References Image::cameraInfo, classifyTSL(), convertYUVToTSL(), ColorClassImage::height, ColorClassImage::image, Image::image, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, and ColorClassImage::width.

Here is the call graph for this function:

void ColorTableTSL::addColorClass colorClass  colorClass,
unsigned char  t_min,
unsigned char  t_max,
unsigned char  s_min,
unsigned char  s_max,
unsigned char  l_min,
unsigned char  l_max
 

Add a TSL range color class to the color table.

Parameters:
colorClass the color class
t_min the min t value
t_max the max t value
s_min the min s value
s_max the max s value
l_min the min l value
l_max the max l value

Definition at line 78 of file ColorTableTSL.cpp.

References tsl_index, tsl_order, and tsl_threshold.

Referenced by reset().

void ColorTableTSL::calculateLUT  ) 
 

Calculates the lookup table.

Definition at line 100 of file ColorTableTSL.cpp.

References classifyTSL(), and convertYUVToTSL().

Referenced by Cognition::handleMessage().

Here is the call graph for this function:

colorClass ColorTableTSL::getColorClass const unsigned char  y,
const unsigned char  u,
const unsigned char  v
const [virtual]
 

Returns the color class of a pixel.

Parameters:
y the y value of the pixel
u the u value of the pixel
v the v value of the pixel
Returns:
the color class

Reimplemented from ColorTable.

Definition at line 122 of file ColorTableTSL.cpp.

Referenced by generateColorClassImage().

void ColorTableTSL::generateColorClassImage const Image image,
ColorClassImage colorClassImage
const [virtual]
 

Segments an image to an color class image.

This doesn't need to used in the image processor, but is needed for visualisation of color tables.

Parameters:
image A reference to the image to be segmented
colorClassImage A reference to the color class image to be created

Reimplemented from ColorTable.

Definition at line 246 of file ColorTableTSL.cpp.

References Image::cameraInfo, corrector, getColorClass(), MSH2004ColorCorrector::getCorrectedPixel(), ColorClassImage::height, ColorClassImage::image, Image::image, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, and ColorClassImage::width.

Here is the call graph for this function:

void ColorTableTSL::convertYUVToTSL unsigned char  y,
unsigned char  u,
unsigned char  v,
unsigned char *  t,
unsigned char *  s,
unsigned char *  l
const
 

YUV->TSL conversion.

Definition at line 140 of file ColorTableTSL.cpp.

Referenced by calculateLUT(), and generateTSLDialogImage().

colorClass ColorTableTSL::classifyTSL unsigned char  t,
unsigned char  s,
unsigned char  l
const
 

TSL->colorClass classification.

Definition at line 209 of file ColorTableTSL.cpp.

References noColor, tsl_index, tsl_order, and tsl_threshold.

Referenced by calculateLUT(), and generateTSLDialogImage().


Member Data Documentation

unsigned char ColorTableTSL::colorClasses[32][64][64]
 

The color table.

Each entry contains both the color class A (lower 4 bits) and the color class B (higher 4 bits) values. As Y information is less relevant, only 5 bits are used for Y; U and V use 6 bits.

Definition at line 132 of file ColorTableTSL.h.

unsigned char ColorTableTSL::tsl_threshold[numOfColors][2][3]
 

The TSL threshold table.

This table stores the TSL thresholds as given by addColorClass() and updateColorClass(). The first index selects the color class. The second index selects min (0) or max (1). The third index selects t (0), s (1) or l (2).

Definition at line 142 of file ColorTableTSL.h.

Referenced by addColorClass(), classifyTSL(), clear(), operator<<(), and operator>>().

unsigned char ColorTableTSL::tsl_index
 

The TSL threshold index.

Definition at line 147 of file ColorTableTSL.h.

Referenced by addColorClass(), classifyTSL(), and clear().

colorClass ColorTableTSL::tsl_order[numOfColors]
 

The TSL order table.

It contains a permutation of colorClass.

Definition at line 153 of file ColorTableTSL.h.

Referenced by addColorClass(), classifyTSL(), clear(), operator<<(), and operator>>().

MSH2004ColorCorrector ColorTableTSL::corrector [private]
 

Definition at line 159 of file ColorTableTSL.h.

Referenced by generateColorClassImage().


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