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

Image Class Reference

Platform independend definition of an image class. More...

#include <Image.h>

Inheritance diagram for Image:

Inheritance graph
[legend]
Collaboration diagram for Image:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Image ()
 constructs an image

 ~Image ()
 deconstructs an image

bool hasColorTable (void)
void setColorTable (const ColorTable *ct)
char getClassifiedColor (int x, int y)
char getClassifiedColor (unsigned long index)
void convertFromYUVToRGB (const Image &yuvImage)
 Converts an YUV image into an RGB image.

void convertFromYCbCrToRGB (const Image &ycbcrImage)
 Converts an YCbCr image into an RGB image.

void convertFromRGBToYUV (const Image &rgbImage)
 Converts an RGB image into an YUV image.

void convertFromYCbCrToHSI (const Image &ycrcbImage)
 Converts an YCbCr image into an HSI image.

void convertFromYUVToTSL (const Image &yuvImage)
 Converts an YUV image into an TSL image.

unsigned char getHighResY (int x, int y) const
 Returns the high resolution y value of a pixel.

void setHighResY (int x, int y, unsigned char tl, unsigned char bl, unsigned char tr, unsigned char br)
 Sets the high resolution y values for one pixel in low resolution.

Imageoperator= (const Image &other)
 Assignment operator.

void setCameraInfo ()
 set values in CameraInfo according to image size


Static Public Member Functions

void convertFromYCbCrToRGB (unsigned char Y, unsigned char Cb, unsigned char Cr, unsigned char &R, unsigned char &G, unsigned char &B)
 Converts an YCbCr pixel into an RGB pixel.

void convertFromYCbCrToHSI (unsigned char Y, unsigned char Cb, unsigned char Cr, unsigned char &H, unsigned char &S, unsigned char &I)
 Converts an YCbCr pixel into an HSI pixel.


Public Attributes

unsigned char image [cameraResolutionHeight_ERS7][6][cameraResolutionWidth_ERS7]
 representation for an image height color width point of origin is the upper left corner, height is positive downwards and width positive to the right the color values are in the order Y,U,V

CameraInfo cameraInfo
unsigned long frameNumber
 the frame number of that image

const ColorTablecolorTable
 associated color table


Detailed Description

Platform independend definition of an image class.

Definition at line 24 of file Image.h.


Constructor & Destructor Documentation

Image::Image  ) 
 

constructs an image

Definition at line 13 of file Image.cpp.

References CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth.

Image::~Image  ) 
 

deconstructs an image

Definition at line 27 of file Image.cpp.


Member Function Documentation

bool Image::hasColorTable void   ) 
 

Definition at line 31 of file Image.cpp.

References colorTable.

void Image::setColorTable const ColorTable ct  ) 
 

Definition at line 41 of file Image.cpp.

References colorTable.

Referenced by ObstacleAvoiderOnGreenFieldERS7::execute(), and ObstacleAvoiderOnGreenField::execute().

char Image::getClassifiedColor int  x,
int  y
 

Definition at line 47 of file Image.cpp.

References colorTable, and ColorTable::getColorClass().

Referenced by ObstacleAvoiderOnGreenFieldERS7::execute(), and ObstacleAvoiderOnGreenField::execute().

Here is the call graph for this function:

char Image::getClassifiedColor unsigned long  index  ) 
 

void Image::convertFromYUVToRGB const Image yuvImage  ) 
 

Converts an YUV image into an RGB image.

Parameters:
yuvImage The given YUV image

Definition at line 54 of file Image.cpp.

References convertFromYCbCrToRGB().

Referenced by LogPlayer::saveImages().

Here is the call graph for this function:

void Image::convertFromYCbCrToRGB unsigned char  Y,
unsigned char  Cb,
unsigned char  Cr,
unsigned char &  R,
unsigned char &  G,
unsigned char &  B
[inline, static]
 

Converts an YCbCr pixel into an RGB pixel.

Parameters:
Y The Y channel of the source pixel.
Cb The Cb channel of the source pixel.
Cr The Cr channel of the source pixel.
R The R channel of the target pixel.
G The G channel of the target pixel.
B The B channel of the target pixel.

Definition at line 52 of file Image.h.

References Y.

Referenced by convertFromYCbCrToHSI(), convertFromYCbCrToRGB(), convertFromYUVToRGB(), and GT2004BallSpecialist::getSimilarityToOrange().

void Image::convertFromYCbCrToRGB const Image ycbcrImage  ) 
 

Converts an YCbCr image into an RGB image.

Parameters:
ycbcrImage The given YCbCr image

Definition at line 82 of file Image.cpp.

References cameraInfo, convertFromYCbCrToRGB(), image, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth.

Here is the call graph for this function:

void Image::convertFromRGBToYUV const Image rgbImage  ) 
 

Converts an RGB image into an YUV image.

Parameters:
rgbImage The given RGB image

Definition at line 95 of file Image.cpp.

References cameraInfo, image, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, U(), V(), and Y.

Here is the call graph for this function:

void Image::convertFromYCbCrToHSI unsigned char  Y,
unsigned char  Cb,
unsigned char  Cr,
unsigned char &  H,
unsigned char &  S,
unsigned char &  I
[inline, static]
 

Converts an YCbCr pixel into an HSI pixel.

Parameters:
Y The Y channel of the source pixel.
Cb The Cb channel of the source pixel.
Cr The Cr channel of the source pixel.
H The H channel of the target pixel.
S The S channel of the target pixel.
I The I channel of the target pixel.

Definition at line 88 of file Image.h.

References convertFromYCbCrToRGB(), I, pi2, and Y.

Referenced by convertFromYCbCrToHSI().

Here is the call graph for this function:

void Image::convertFromYCbCrToHSI const Image ycrcbImage  ) 
 

Converts an YCbCr image into an HSI image.

Parameters:
ycrcbImage The given Ycrcb image

Definition at line 133 of file Image.cpp.

References cameraInfo, convertFromYCbCrToHSI(), image, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth.

Here is the call graph for this function:

void Image::convertFromYUVToTSL const Image yuvImage  ) 
 

Converts an YUV image into an TSL image.

Parameters:
yuvImage The given YUV image

Definition at line 146 of file Image.cpp.

References cameraInfo, image, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, U(), V(), and Y.

Here is the call graph for this function:

unsigned char Image::getHighResY int  x,
int  y
const
 

Returns the high resolution y value of a pixel.

Parameters:
x The x coord. of the pixel in high resolution
y The y coord. of the pixel in high resolution
Returns:
The y value of the pixel

Definition at line 216 of file Image.cpp.

Referenced by ColorTable64::generateHighResColorClassImage(), and ColorTable32K::generateHighResColorClassImage().

void Image::setHighResY int  x,
int  y,
unsigned char  tl,
unsigned char  bl,
unsigned char  tr,
unsigned char  br
 

Sets the high resolution y values for one pixel in low resolution.

Parameters:
x The x coord. of the pixel
y The y coord. of the pixel
tl The y value of the top left subpixel
bl The y value of the bottom left subpixel
tr The y value of the top right subpixel
br The y value of the bottom right subpixel

Definition at line 246 of file Image.cpp.

Image& Image::operator= const Image other  )  [inline]
 

Assignment operator.

Parameters:
other The other Image that is assigned to this one
Returns:
A reference to this object after the assignment.

Reimplemented in JPEGImage.

Definition at line 154 of file Image.h.

void Image::setCameraInfo  ) 
 

set values in CameraInfo according to image size

Definition at line 268 of file Image.cpp.

References ASSERT, cameraResolutionWidth_ERS210, cameraResolutionWidth_ERS7, CameraInfo::focalLength, focalLength_ERS210, focalLength_ERS7, CameraInfo::focalLengthInv, CameraInfo::focalLenPow2, CameraInfo::focalLenPow4, CameraInfo::fourthOrderRadialDistortion, fourthOrderRadialDistortion_ERS210, fourthOrderRadialDistortion_ERS7, CameraInfo::openingAngleHeight, openingAngleHeight_ERS210, openingAngleHeight_ERS7, CameraInfo::openingAngleWidth, openingAngleWidth_ERS210, openingAngleWidth_ERS7, CameraInfo::opticalCenter, opticalCenterX_ERS210, opticalCenterX_ERS7, opticalCenterY_ERS210, opticalCenterY_ERS7, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, CameraInfo::secondOrderRadialDistortion, secondOrderRadialDistortion_ERS210, secondOrderRadialDistortion_ERS7, CameraInfo::simulated, Vector2< double >::x, and Vector2< double >::y.

Referenced by operator>>().


Member Data Documentation

unsigned char Image::image[cameraResolutionHeight_ERS7][6][cameraResolutionWidth_ERS7]
 

representation for an image height color width point of origin is the upper left corner, height is positive downwards and width positive to the right the color values are in the order Y,U,V

Definition at line 166 of file Image.h.

Referenced by GT2004EdgeSpecialist::addCandidate(), REdgeDetection::ballEdgeVote(), GT2004ImageProcessor::calcEdgeAngle(), ObstacleAvoiderOnGreenFieldERS7::calibrate(), ObstacleAvoiderOnGreenField::calibrate(), convertFromRGBToYUV(), convertFromYCbCrToHSI(), convertFromYCbCrToRGB(), convertFromYUVToTSL(), ColorClassImage::convertToImage(), ColorCorrector::correct(), ChallengeSpecialVision::countPixels(), REdgeDetection::crossEdgeVote(), MotionRecognition::drawDynamicDiff(), BarCodeReader::execute(), CheckerboardDetector::execute(), REdgeDetection::fastCrossEdgeVote(), REdgeDetection::fieldEdgeVote(), FastSUSANNoiseReduction::filterPixel(), ColorTableTSL::generateColorClassImage(), ColorTable64::generateColorClassImage(), ColorTable32K::generateColorClassImage(), ColorTable64::generateHighResColorClassImage(), ColorTable32K::generateHighResColorClassImage(), ColorTableTSL::generateTSLDialogImage(), REdgeDetection::getColor(), RasterStrategy::getColor(), RasterSpecialist::getColor(), GT2004ImageProcessor::getCoords(), CheckerboardDetector::getExactTransitionMiddle(), FastSUSANNoiseReduction::getFilteredImage(), FastSUSANNoiseReduction::getFilteredPixelSpectrum(), MotionRecognition::getPixelDiff(), CheckerboardDetector::getTransitionsOnLine(), CheckerboardDetector::getTransitionToWhite(), REdgeDetection::horizontalEdgeVote(), MotionRecognition::isDiff(), SUSANEdgeDetectionLite::isEdgePoint(), ColorCorrector::load(), AutoShutter::makeHistogram(), JPEGImage::onDestInit(), JPEGImage::onDestTerm(), operator<<(), JPEGImage::operator=(), operator>>(), LogPlayer::saveAMV(), LogPlayer::saveImages(), GT2004ImageProcessor::scan(), GT2004BeaconDetector::scanForBeaconEdges(), GT2004BeaconDetector::scanForBeaconPart(), GT2004BeaconDetector::scanForPink(), JPEGImage::toImage(), and REdgeDetection::verticalEdgeVote().

CameraInfo Image::cameraInfo
 

Definition at line 168 of file Image.h.

Referenced by RBallSpecialist2::addBallPercept(), RasterImageProcessor::addFieldPoint(), RasterImageProcessor::addFlag(), RasterImageProcessor::addObstaclePoints(), REdgeDetection::ballEdgeVote(), GT2004ImageProcessor::calcEdgeAngle(), REnemySpecialist::calculateFarestPoint(), REnemySpecialist::calculateFarestPointCOG(), REnemySpecialist::calculateFarestPointFastCOG(), REnemySpecialist::calculatePointOnFieldFromSegment(), ObstacleAvoiderOnGreenFieldERS7::calibrate(), ObstacleAvoiderOnGreenField::calibrate(), GT2004EdgeSpecialist::checkPoint(), RFieldSpecialist::checkRamp(), GT2004ImageProcessor::clusterRobots(), convertFromRGBToYUV(), convertFromYCbCrToHSI(), convertFromYCbCrToRGB(), convertFromYUVToTSL(), ColorClassImage::convertToImage(), ColorCorrector::correct(), REdgeDetection::crossEdgeVote(), BoxSpecialist::detectFreePartOfGoal(), MotionRecognition::drawDynamicDiff(), MotionRecognition::drawPixelFlow(), BarCodeReader::execute(), ObstacleAvoiderOnGreenFieldERS7::execute(), ObstacleAvoiderOnGreenField::execute(), GT2004ImageProcessor::execute(), GT2004BeaconDetector::execute(), CheckerboardDetector::execute(), RBallSpecialist2::executePostProcessing(), REdgeDetection::fieldEdgeVote(), RBridgeSpecialist::findBridgeMark(), REdgeDetection::findStart(), BoxSpecialist::fusionGoal(), ColorTableTSL::generateColorClassImage(), ColorTable64::generateColorClassImage(), ColorTable32K::generateColorClassImage(), ColorTable64::generateHighResColorClassImage(), ColorTable32K::generateHighResColorClassImage(), ColorTableTSL::generateTSLDialogImage(), CheckerboardDetector::getAngleBetweenScreenPoints(), MotionRecognition::getAngleYZ(), MotionRecognition::getCenteredCoor(), REdgeDetection::getColor(), GT2004EdgeSpecialist::getEdgesPercept(), FastSUSANNoiseReduction::getFilteredImage(), CheckerboardDetector::getLineThroughPixels(), CheckerboardDetector::getMiddleAndLengthOfPerpendicular(), SimpleMotionRecognition::getMotion(), MotionRecognition::getPixelDiff(), REdgeDetection::horizontalEdgeVote(), RDefaultStrategy::init(), RasterImageProcessor::init(), REdgeDetection::insideImage(), RasterImageProcessor::isValidPoint(), ColorCorrector::load(), MotionRecognition::MotionRecognition(), JPEGImage::onDestInit(), operator<<(), JPEGImage::operator=(), operator>>(), MotionRecognition::pixelInImage(), RDefaultStrategy::postScan(), RasterImageProcessor::RasterImageProcessor(), LogPlayer::saveAMV(), LogPlayer::saveImages(), GT2004ImageProcessor::scan(), GT2004ImageProcessor::scanColumns(), REdgeDetection::scanEast(), REdgeDetection::scanSouth(), BoxSpecialist::searchGoal(), SimpleMotionRecognition::SimpleMotionRecognition(), REdgeDetection::susanVote(), JPEGImage::toImage(), RBallSpecialist2::validateCircle(), and REdgeDetection::verticalEdgeVote().

unsigned long Image::frameNumber
 

the frame number of that image

Definition at line 171 of file Image.h.

Referenced by SimpleMotionRecognition::execute(), BB2004Calibrator::execute(), GT2004ImageProcessor::execute(), CheckerboardDetector::execute(), FastSUSANNoiseReduction::getFilteredImage(), RasterImageProcessor::init(), ColorCorrector::load(), operator<<(), JPEGImage::operator=(), operator>>(), and JPEGImage::toImage().

const ColorTable* Image::colorTable
 

associated color table

Definition at line 174 of file Image.h.

Referenced by getClassifiedColor(), FastSUSANNoiseReduction::getFilteredImage(), hasColorTable(), and setColorTable().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:08:26 2004 for GT2004 by doxygen 1.3.6