ColorTable64 Class Reference

#include <ColorTable64.h>

Inheritance diagram for ColorTable64:

ColorTable List of all members.

Members to be used by the ColorTable64 dialog

enum  { CT32K_SIZE = 8*64*64, CT64_SIZE = 64*64*64 }
void clear ()
void clearChannel (colorClass colorClass)
void addColorClass (colorClass colorClass, unsigned char y, unsigned char u, unsigned char v)
void addColorClass (colorClass colorClass, unsigned char y, unsigned char u, unsigned char v, unsigned char range)
void addCuboidToColorClass (colorClass colorClass, unsigned char yMin, unsigned char uMin, unsigned char vMin, unsigned char yMax, unsigned char uMax, unsigned char vMax)
void removeColorClass (unsigned char y, unsigned char u, unsigned char v, unsigned char range)
void setFormat (Format form)
Inoperator>> (In &stream, ColorTable64 &colorTable64)

Public Types

 CT32K
 CT64
 CT32K_SIZE = 8*64*64
 CT64_SIZE = 64*64*64
enum  Format { CT32K, CT64 }

Public Member Functions

 ColorTable64 ()
 ~ColorTable64 ()
virtual colorClass getColorClass (const unsigned char y, const unsigned char u, const unsigned char v) const
void getBoxAroundColorClass (colorClass color, Vector3< int > &pNear, Vector3< int > &pFar)
virtual void generateColorClassImage (const Image &image, ColorClassImage &colorClassImage) const
virtual void generateColorClassImage (const Image &image, ColorClassImage &colorClassImage, colorClass colorClass) const
virtual void generateHighResColorClassImage (const Image &image, ColorClassImage &colorClassImage) const
virtual void generateHighResColorClassImage (const Image &image, ColorClassImage &colorClassImage, colorClass colorClass) const

Public Attributes

unsigned char colorClasses [64][64][64]

Static Private Member Functions

static void convert32Kto64 (const unsigned char *c32k, unsigned char c64[64][64][64])

Private Attributes

Format format

Detailed Description

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

Author:
Matthias Jüngel

Martin Lötzsch

Definition at line 30 of file ColorTable64.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
CT32K_SIZE 
CT64_SIZE 

Definition at line 177 of file ColorTable64.h.

enum ColorTable64::Format

Enumerator:
CT32K 
CT64 

Definition at line 39 of file ColorTable64.h.


Constructor & Destructor Documentation

ColorTable64::ColorTable64 (  ) 

Constructor

Definition at line 106 of file ColorTable64.cpp.

References clear().

ColorTable64::~ColorTable64 (  ) 

Destructor

Definition at line 111 of file ColorTable64.cpp.


Member Function Documentation

void ColorTable64::addColorClass ( colorClass  colorClass,
unsigned char  y,
unsigned char  u,
unsigned char  v,
unsigned char  range 
)

Sets the color class for a cube with the size "range" around a pixel given by y,u,v to the given color class.

Definition at line 125 of file ColorTable64.cpp.

References ASSERT.

void ColorTable64::addColorClass ( colorClass  colorClass,
unsigned char  y,
unsigned char  u,
unsigned char  v 
)

Sets the color class for a pixel in the color space given by y, u, v to the given color class.

Definition at line 114 of file ColorTable64.cpp.

Referenced by ObstacleAvoiderOnGreenFieldERS7::calibrate(), ObstacleAvoiderOnGreenField::calibrate(), HSIColorTableToolCore::createColorTable64FromHSIColorTable(), CColorTable64DlgBar::OnRecordClick(), CColorTable64DlgBar::OnRecordReset(), and CColorTable64DlgBar::smoothImage().

void ColorTable64::addCuboidToColorClass ( colorClass  colorClass,
unsigned char  yMin,
unsigned char  uMin,
unsigned char  vMin,
unsigned char  yMax,
unsigned char  uMax,
unsigned char  vMax 
)

Sets the color class for all sub cubes within the specified cuboid to the given color class.

Definition at line 157 of file ColorTable64.cpp.

References ASSERT.

Referenced by CColorTable64DlgBar::OnCt64Open().

void ColorTable64::clear (  ) 

Sets the color class of every 4x4x4 to noColor

Definition at line 228 of file ColorTable64.cpp.

References noColor.

Referenced by ObstacleAvoiderOnGreenFieldERS7::calibrate(), ObstacleAvoiderOnGreenField::calibrate(), ColorTable64(), CColorTable64DlgBar::OnCt64ClearColorTable(), and CColorTable64DlgBar::OnInitDialog().

void ColorTable64::clearChannel ( colorClass  colorClass  ) 

Sets all cubes that have the given color class to noColor

Definition at line 214 of file ColorTable64.cpp.

References colorClasses, and noColor.

Referenced by CColorTable64DlgBar::OnCt64ClearChannel().

void ColorTable64::convert32Kto64 ( const unsigned char *  c32k,
unsigned char  c64[64][64][64] 
) [static, private]

Definition at line 25 of file ColorTable64.cpp.

Referenced by operator>>().

void ColorTable64::generateColorClassImage ( const Image image,
ColorClassImage colorClassImage,
colorClass  colorClass 
) const [virtual]

Generates an image that contains all pixels that have the specified color class.

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

Definition at line 57 of file ColorTable64.cpp.

References colorClasses, ColorClassImage::height, ColorClassImage::image, image, noColor, and ColorClassImage::width.

void ColorTable64::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 11 of file ColorTable64.cpp.

References colorClasses, ColorClassImage::height, ColorClassImage::image, image, and ColorClassImage::width.

Referenced by ImageView::draw(), and CColorTable64DlgBar::generateSegmentedImage().

void ColorTable64::generateHighResColorClassImage ( const Image image,
ColorClassImage colorClassImage,
colorClass  colorClass 
) const [virtual]

Generates an image that contains all pixels that have the specified color class.

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

Definition at line 79 of file ColorTable64.cpp.

References colorClasses, ColorClassImage::height, ColorClassImage::image, image, noColor, and ColorClassImage::width.

void ColorTable64::generateHighResColorClassImage ( 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 40 of file ColorTable64.cpp.

References colorClasses, ColorClassImage::height, ColorClassImage::image, image, and ColorClassImage::width.

Referenced by CColorTable64DlgBar::generateSegmentedImage().

void ColorTable64::getBoxAroundColorClass ( colorClass  color,
Vector3< int > &  pNear,
Vector3< int > &  pFar 
)

Computes an axis aligned box around all positions of a specified color in YUV space

Parameters:
color The color
pNear The corner of the box nearest to the origin
pFar The corner of the box farthest to the origin

Definition at line 242 of file ColorTable64.cpp.

References colorClasses, Vector3< V >::x, Vector3< V >::y, and Vector3< V >::z.

virtual colorClass ColorTable64::getColorClass ( const unsigned char  y,
const unsigned char  u,
const unsigned char  v 
) const [inline, virtual]

Calculates 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 48 of file ColorTable64.h.

References colorClasses.

Referenced by RoboCupCtrl::adaptColors(), CColorTable64DlgBar::OnCt64Save(), and CColorTable64DlgBar::removeColorClassFromImage().

void ColorTable64::removeColorClass ( unsigned char  y,
unsigned char  u,
unsigned char  v,
unsigned char  range 
)

Sets the color class for a cube with the size "range" around a pixel given by y,u,v to noColor.

Definition at line 186 of file ColorTable64.cpp.

References noColor.

void ColorTable64::setFormat ( Format  form  )  [inline]

Definition at line 172 of file ColorTable64.h.

References format.

Referenced by ColorTable64Mod::setup(), ColorTable32KMod::setup(), and VariableLighting::VariableLighting().


Friends And Related Function Documentation

In& operator>> ( In stream,
ColorTable64 colorTable64 
) [friend]

Streaming operator that reads a ColorTable64 from a stream.

Parameters:
stream The stream from which is read.
colorTable64 The ColorTable64 object.
Returns:
The stream.

Definition at line 404 of file ColorTable64.cpp.


Member Data Documentation

unsigned char ColorTable64::colorClasses[64][64][64]

The color table. Each element in the array contains the color class of a 4x4x4 cube in the color space.

Definition at line 114 of file ColorTable64.h.

Referenced by clearChannel(), VariableLighting::execute(), generateColorClassImage(), generateHighResColorClassImage(), getBoxAroundColorClass(), getColorClass(), CColorTable64DlgBar::OnRecordFloodfill(), operator<<(), and operator>>().

Format ColorTable64::format [private]

Definition at line 190 of file ColorTable64.h.

Referenced by operator>>(), and setFormat().


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