#include <Image.h>
Inheritance diagram for Image:
Public Member Functions | |
Image () | |
~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) |
void | convertFromYCbCrToRGB (const Image &ycbcrImage) |
void | convertFromRGBToYUV (const Image &rgbImage) |
void | convertFromYCbCrToHSI (const Image &ycrcbImage) |
void | convertFromYUVToTSL (const Image &yuvImage) |
unsigned char | getHighResY (int x, int y) const |
void | setHighResY (int x, int y, unsigned char tl, unsigned char bl, unsigned char tr, unsigned char br) |
Image & | operator= (const Image &other) |
void | setCameraInfo () |
Static Public Member Functions | |
static void | convertFromYCbCrToRGB (unsigned char Y, unsigned char Cb, unsigned char Cr, unsigned char &R, unsigned char &G, unsigned char &B) |
static void | convertFromYCbCrToHSI (unsigned char Y, unsigned char Cb, unsigned char Cr, unsigned char &H, unsigned char &S, unsigned char &I) |
Public Attributes | |
unsigned char | image [cameraResolutionHeight_ERS7][6][cameraResolutionWidth_ERS7] |
CameraInfo | cameraInfo |
unsigned long | frameNumber |
const ColorTable * | colorTable |
Definition at line 24 of file Image.h.
Image::Image | ( | ) |
constructs an image
Definition at line 13 of file Image.cpp.
References cameraInfo, image, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth.
void Image::convertFromRGBToYUV | ( | const Image & | rgbImage | ) |
Converts an RGB image into an YUV image.
rgbImage | The given RGB image |
Definition at line 95 of file Image.cpp.
References cameraInfo, image, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, U, V, and Y.
void Image::convertFromYCbCrToHSI | ( | const Image & | ycrcbImage | ) |
Converts an YCbCr image into an HSI image.
ycrcbImage | The given Ycrcb image |
Definition at line 133 of file Image.cpp.
References cameraInfo, convertFromYCbCrToHSI(), image, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth.
static 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.
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(), int(), and pi2.
Referenced by convertFromYCbCrToHSI(), HSIColorTableToolCore::createColorTable64FromHSIColorTable(), OpenGLMethods::paintImagePixelsToOpenGLList(), and HSIColorTableToolCore::setImageToPlace().
void Image::convertFromYCbCrToRGB | ( | const Image & | ycbcrImage | ) |
Converts an YCbCr image into an RGB image.
ycbcrImage | The given YCbCr image |
Definition at line 82 of file Image.cpp.
References cameraInfo, convertFromYCbCrToRGB(), image, CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth.
static 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.
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.
Referenced by convertFromYCbCrToHSI(), convertFromYCbCrToRGB(), convertFromYUVToRGB(), PanoramaModel::drawTransition(), PanoramaImageProcessor::drawTransition(), SignatureGenerator::drawTransition(), and GT2004BallSpecialist::getSimilarityToOrange().
void Image::convertFromYUVToRGB | ( | const Image & | yuvImage | ) |
Converts an YUV image into an RGB image.
yuvImage | The given YUV image |
Definition at line 54 of file Image.cpp.
References convertFromYCbCrToRGB().
Referenced by OpenGLMethods::paintImagePixelsToOpenGLList(), PaintMethodsWin32::paintImageProjectionOnGroundToCDC(), OpenGLMethods::paintRotatedImageToOpenGLList(), and LogPlayer::saveImages().
void Image::convertFromYUVToTSL | ( | const Image & | yuvImage | ) |
Converts an YUV image into an TSL image.
yuvImage | The given YUV image |
Definition at line 146 of file Image.cpp.
References cameraInfo, image, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, U, V, and Y.
Referenced by OpenGLMethods::paintImagePixelsToOpenGLList().
char Image::getClassifiedColor | ( | unsigned long | index | ) |
char Image::getClassifiedColor | ( | int | x, | |
int | y | |||
) |
Definition at line 47 of file Image.cpp.
References colorTable, ColorTable::getColorClass(), and image.
Referenced by ObstacleAvoiderOnGreenFieldERS7::execute(), and ObstacleAvoiderOnGreenField::execute().
unsigned char Image::getHighResY | ( | int | x, | |
int | y | |||
) | const |
Returns the high resolution y value of a pixel
x | The x coord. of the pixel in high resolution | |
y | The y coord. of the pixel in high resolution |
Definition at line 216 of file Image.cpp.
Referenced by CColorTable64DlgBar::removeColorClassFromImage(), and CColorTable64DlgBar::smoothImage().
bool Image::hasColorTable | ( | void | ) |
void Image::setCameraInfo | ( | ) |
set values in CameraInfo according to image size
Definition at line 268 of file Image.cpp.
References ASSERT, cameraInfo, cameraResolutionWidth_ERS210, cameraResolutionWidth_ERS7, CameraInfo::focalLength, focalLength_ERS210, focalLength_ERS7, CameraInfo::focalLengthInv, CameraInfo::focalLenPow2, CameraInfo::focalLenPow4, CameraInfo::fourthOrderRadialDistortion, fourthOrderRadialDistortion_ERS210, fourthOrderRadialDistortion_ERS7, frameNumber, 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< V >::x, and Vector2< V >::y.
Referenced by operator>>().
void Image::setColorTable | ( | const ColorTable * | ct | ) |
Definition at line 41 of file Image.cpp.
References colorTable.
Referenced by ObstacleAvoiderOnGreenFieldERS7::execute(), and ObstacleAvoiderOnGreenField::execute().
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
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 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(), GoalRecognizer::calculateScanLinesParallelToHorizon(), GT2004GoalRecognizer::calculateScanLinesParallelToHorizon(), GoalRecognizer::calculateVerticalGoalScanLines(), GT2004GoalRecognizer::calculateVerticalGoalScanLines(), ObstacleAvoiderOnGreenFieldERS7::calibrate(), ObstacleAvoiderOnGreenField::calibrate(), RFieldSpecialist::checkRamp(), EMGaussianMixture::clusterImage(), GT2004ImageProcessor::clusterRobots(), convertFromRGBToYUV(), convertFromYCbCrToHSI(), convertFromYCbCrToRGB(), convertFromYUVToTSL(), AnisotropicImage::copyFromImage(), AnisotropicImage::copyToImage(), REdgeDetection::crossEdgeVote(), BoxSpecialist::detectFreePartOfGoal(), HSIColorTableToolCore::doImageSegmentation(), ImageView::draw(), MotionRecognition::drawDynamicDiff(), MotionRecognition::drawPixelFlow(), VariableLighting::execute(), ObstacleAvoiderOnGreenFieldERS7::execute(), ObstacleAvoiderOnGreenField::execute(), GT2004ImageProcessor::execute(), GT2004GoalRecognizer::execute(), CheckerboardDetector::execute(), RBallSpecialist2::executePostProcessing(), REdgeDetection::fieldEdgeVote(), RBridgeSpecialist::findBridgeMark(), REdgeDetection::findStart(), FastPanoramaProcessor::framePrepare(), BoxSpecialist::fusionGoal(), CheckerboardDetector::getAngleBetweenScreenPoints(), MotionRecognition::getAngleYZ(), MotionRecognition::getCenteredCoor(), REdgeDetection::getColor(), CRobotControlDialogBar::getDebugImageCameraInfo(), FastSUSANNoiseReduction::getFilteredImage(), GoalRecognizer::getGoalPercept(), CheckerboardDetector::getLineThroughPixels(), CheckerboardDetector::getMiddleAndLengthOfPerpendicular(), SimpleMotionRecognition::getMotion(), MotionRecognition::getPixelDiff(), CColorTable64DlgBar::handleMessage(), CColorSpaceDlgBar::handleMessage(), REdgeDetection::horizontalEdgeVote(), Image(), RDefaultStrategy::init(), RasterImageProcessor::init(), PanoramaImageProcessor::initialize(), REdgeDetection::insideImage(), RasterImageProcessor::isValidPoint(), MotionRecognition::MotionRecognition(), CColorTable64DlgBar::OnHighRes(), CColorSpaceDlgBar::OnHScroll(), CColorTable64DlgBar::OnInitDialog(), CColorTable64DlgBar::OnLButtonDown(), CColorTable64DlgBar::OnMouseMove(), CColorTable64DlgBar::OnPaint(), CColorTable64DlgBar::OnRButtonDown(), CColorTable64DlgBar::OnRecordClick(), CColorTable64DlgBar::OnRecordNewImage(), operator<<(), JPEGImage::operator=(), operator>>(), CColorSpaceDlgBar::paintBoundingCube(), MotionRecognition::pixelInImage(), RDefaultStrategy::postScan(), ScanningGrid::prepareHorizontalScanline(), ScanningGrid::prepareImageInfo(), RasterImageProcessor::RasterImageProcessor(), CColorTable64DlgBar::removeColorClassFromImage(), LogPlayer::saveImages(), GT2004ImageProcessor::scan(), GT2004ImageProcessor::scanColumns(), REdgeDetection::scanEast(), GoalRecognizer::scanHorizontalForGoals(), GT2004GoalRecognizer::scanHorizontalForGoals(), GoalRecognizer::scanLinesForGoals(), GT2004GoalRecognizer::scanLinesForGoals(), REdgeDetection::scanSouth(), BoxSpecialist::searchGoal(), setCameraInfo(), SimpleMotionRecognition::SimpleMotionRecognition(), CColorTable64DlgBar::smoothImage(), REdgeDetection::susanVote(), JPEGImage::toImage(), RBallSpecialist2::validateCircle(), REdgeDetection::verticalEdgeVote(), and EMGaussianMixture::visualizeClusters().
const ColorTable* Image::colorTable |
associated color table
Definition at line 174 of file Image.h.
Referenced by getClassifiedColor(), FastSUSANNoiseReduction::getFilteredImage(), hasColorTable(), and setColorTable().
unsigned long Image::frameNumber |
the frame number of that image
Definition at line 171 of file Image.h.
Referenced by VariableLighting::execute(), BB2004Calibrator::execute(), GT2004ImageProcessor::execute(), CheckerboardDetector::execute(), FastPanoramaProcessor::framePrepare(), FastSUSANNoiseReduction::getFilteredImage(), RasterImageProcessor::init(), PanoramaImageProcessor::initialize(), operator<<(), JPEGImage::operator=(), operator>>(), setCameraInfo(), and JPEGImage::toImage().
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 PanoramaImageProcessor::applyImageFilters(), REdgeDetection::ballEdgeVote(), GT2004ImageProcessor::calcEdgeAngle(), ObstacleAvoiderOnGreenFieldERS7::calibrate(), ObstacleAvoiderOnGreenField::calibrate(), EMGaussianMixture::clusterImage(), convertFromRGBToYUV(), convertFromYCbCrToHSI(), convertFromYCbCrToRGB(), convertFromYUVToTSL(), AnisotropicImage::copyFromImage(), AnisotropicImage::copyToImage(), ChallengeSpecialVision::countPixels(), REdgeDetection::crossEdgeVote(), HSIColorTableToolCore::doImageSegmentation(), MotionRecognition::drawDynamicDiff(), HSIColorTableToolZoomDlg::editHSIColorRange(), VariableLighting::execute(), BarCodeReader::execute(), SignatureGenerator::execute(), HorizonEstimator::execute(), CheckerboardDetector::execute(), REdgeDetection::fastCrossEdgeVote(), REdgeDetection::fieldEdgeVote(), FastSUSANNoiseReduction::filterPixel(), ColorSpaceUsageCounter::generateImage(), CTSLColorTableToolDlgBar::generateNoiseImage(), getClassifiedColor(), REdgeDetection::getColor(), RasterStrategy::getColor(), RasterSpecialist::getColor(), GT2004ImageProcessor::getCoords(), CheckerboardDetector::getExactTransitionMiddle(), FastSUSANNoiseReduction::getFilteredImage(), getHighResY(), MotionRecognition::getPixelDiff(), CheckerboardDetector::getTransitionsOnLine(), CheckerboardDetector::getTransitionToWhite(), REdgeDetection::horizontalEdgeVote(), Image(), MotionRecognition::isDiff(), JPEGImage::JPEGImage(), AutoShutter::makeHistogram(), JPEGImage::onDestInit(), JPEGImage::onDestTerm(), CColorTable64DlgBar::OnPaint(), CColorTable64DlgBar::OnRecordClick(), CColorTable64DlgBar::OnRecordFloodfill(), CColorTable64DlgBar::OnRecordInitImages(), CColorTable64DlgBar::OnRecordNewImage(), CColorTable64DlgBar::OnRecordSeedPixel(), CTSLColorTableToolDlgBar::OnTSLColorTableToolSaveYUV(), operator<<(), JPEGImage::operator=(), operator>>(), OpenGLMethods::paintImagePixelsToOpenGLList(), PaintMethodsWin32::paintImageProjectionOnGroundToCDC(), OpenGLMethods::paintRotatedImageToOpenGLList(), CColorTable64DlgBar::removeColorClassFromImage(), LogPlayer::saveImages(), GT2004ImageProcessor::scan(), GT2004BeaconDetector::scanForBeaconEdges(), GT2004BeaconDetector::scanForBeaconPart(), GT2004BeaconDetector::scanForPink(), GoalRecognizer::scanHorizontalForGoals(), GT2004GoalRecognizer::scanHorizontalForGoals(), GoalRecognizer::scanLinesForGoals(), GT2004GoalRecognizer::scanLinesForGoals(), SignatureGenerator::scanPixel(), HorizonEstimator::scanPixel(), ColorClustering::scanPixel(), SignatureGenerator::scanPixelDetail(), setHighResY(), ColorCollection::showCollectedColors(), CColorTable64DlgBar::smoothImage(), JPEGImage::toImage(), REdgeDetection::verticalEdgeVote(), EMGaussianMixture::visualizeClusters(), PanoramaModel::visualizeLikelihoods(), and GlobalAlignment::visualizeMatch().