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

GT2005PlayerSpecialist Class Reference

As part of the GridImageProcessor the GT2005FlagSpecialist searches for flag landmarks starting at a point in an Image determined before. More...

#include <GT2005PlayerSpecialist.h>

Collaboration diagram for GT2005PlayerSpecialist:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GT2005PlayerSpecialist (const ColorCorrector &colorCorrector, const ColorTable &colorTable, const Image &image, const ImageInfo &imageInfo, const LinesPercept &linesPercept, const CameraMatrix &cameraMatrix, PlayersPercept &playersPercept)
void execute ()
 Execute the Specialist.


Private Member Functions

void detectRedRobots (Vector2< int > averageRobotSignatureStart, Vector2< int > averageRobotSignatureStop, Vector2< int > averageRobotSignature)
 search for more robot properties

void detectBlueRobots (Vector2< int > averageRobotSignatureStart, Vector2< int > averageRobotSignatureStop, Vector2< int > averageRobotSignature)
Vector2< unsigned char > findRedFootPointYAxis (Vector2< unsigned char > start, Vector2< char > direction, short depth, unsigned char recursionLevel=0)
 Finds the foot point of a robots leg.

Vector2< unsigned char > findBlueFootPointYAxis (Vector2< unsigned char > start, Vector2< char > direction, short depth, unsigned char recursionLevel=0)
void clusterRobotLinesPercepts ()
 Clusters the linespercepts in different robots Maximal 4 robots and 30 pixel space between them.

bool checkForWhiteLineBetweenRed (Vector2< int > start, Vector2< int > stop)
 Checks if the line between 2 points is mostly white or accepted color.

bool checkForWhiteLineBetweenBlue (Vector2< int > start, Vector2< int > stop)
colorClass inspectColorArea (const Vector2< unsigned char > &position, const Vector2< char > &direction)
 Inspect a color quad of the color proportion.


Private Attributes

Vector2< int > averageRedRobotSignatureStart [4]
Vector2< int > averageRedRobotSignatureStop [4]
 Needed for debugging.

Vector2< int > averageRedRobotSignature [4]
 Needed for debugging.

Vector2< int > averageBlueRobotSignatureStart [4]
 Needed for debugging.

Vector2< int > averageBlueRobotSignatureStop [4]
 Needed for debugging.

Vector2< int > averageBlueRobotSignature [4]
 Needed for debugging.

int clusteredRedRobots
 Needed for debugging.

int clusteredBlueRobots
 Needed for debugging.

int averageRedRobotSignaturePoints [4]
 the number of clustered robots

int averageBlueRobotSignaturePoints [4]
 the number of clustered robots

int maxDepth
const ImageInfoimageInfo
const ColorTablecolorTable
const ColorCorrectorcolorCorrector
const LinesPerceptlinesPercept
const Imageimage
const CameraMatrixcameraMatrix
PlayersPerceptplayersPercept

Detailed Description

As part of the GridImageProcessor the GT2005FlagSpecialist searches for flag landmarks starting at a point in an Image determined before.

Definition at line 26 of file GT2005PlayerSpecialist.h.


Constructor & Destructor Documentation

GT2005PlayerSpecialist::GT2005PlayerSpecialist const ColorCorrector colorCorrector,
const ColorTable colorTable,
const Image image,
const ImageInfo imageInfo,
const LinesPercept linesPercept,
const CameraMatrix cameraMatrix,
PlayersPercept playersPercept
 

Definition at line 16 of file GT2005PlayerSpecialist.cpp.


Member Function Documentation

void GT2005PlayerSpecialist::execute  ) 
 

Execute the Specialist.

Definition at line 36 of file GT2005PlayerSpecialist.cpp.

References averageBlueRobotSignature, averageBlueRobotSignaturePoints, averageBlueRobotSignatureStart, averageBlueRobotSignatureStop, averageRedRobotSignature, averageRedRobotSignaturePoints, averageRedRobotSignatureStart, averageRedRobotSignatureStop, clusteredBlueRobots, clusteredRedRobots, clusterRobotLinesPercepts(), detectBlueRobots(), detectRedRobots(), LINE, and NLINE.

Here is the call graph for this function:

void GT2005PlayerSpecialist::detectRedRobots Vector2< int >  averageRobotSignatureStart,
Vector2< int >  averageRobotSignatureStop,
Vector2< int >  averageRobotSignature
[private]
 

search for more robot properties

Definition at line 98 of file GT2005PlayerSpecialist.cpp.

References PlayersPercept::addRedPlayer(), Geometry::calculatePointOnField(), Image::cameraInfo, CIRCLE, CORRECTED_COLOR_CLASS, SinglePlayerPercept::directionOnField, DOT, findRedFootPointYAxis(), BresenhamLineScan::getNext(), idText, Image::image, ImageInfo::maxImageCoordinates, NCIRCLE, NDOT, SinglePlayerPercept::offsetOnField, SinglePlayerPercept::orientation, OUTPUT, pi, point, SinglePlayerPercept::positionInImage, ImageInfo::previousCameraMatrix, SinglePlayerPercept::validity, Vector2< double >::x, Vector2< int >::x, Vector2< V >::x, Vector2< double >::y, Vector2< int >::y, and Vector2< V >::y.

Referenced by execute().

Here is the call graph for this function:

void GT2005PlayerSpecialist::detectBlueRobots Vector2< int >  averageRobotSignatureStart,
Vector2< int >  averageRobotSignatureStop,
Vector2< int >  averageRobotSignature
[private]
 

Definition at line 282 of file GT2005PlayerSpecialist.cpp.

References PlayersPercept::addBluePlayer(), Geometry::calculatePointOnField(), Image::cameraInfo, CIRCLE, CORRECTED_COLOR_CLASS, SinglePlayerPercept::directionOnField, DOT, findBlueFootPointYAxis(), BresenhamLineScan::getNext(), idText, Image::image, ImageInfo::maxImageCoordinates, NCIRCLE, NDOT, SinglePlayerPercept::offsetOnField, SinglePlayerPercept::orientation, OUTPUT, pi, point, SinglePlayerPercept::positionInImage, ImageInfo::previousCameraMatrix, SinglePlayerPercept::validity, Vector2< double >::x, Vector2< int >::x, Vector2< V >::x, Vector2< double >::y, Vector2< int >::y, and Vector2< V >::y.

Referenced by execute().

Here is the call graph for this function:

Vector2< unsigned char > GT2005PlayerSpecialist::findRedFootPointYAxis Vector2< unsigned char >  start,
Vector2< char >  direction,
short  depth,
unsigned char  recursionLevel = 0
[private]
 

Finds the foot point of a robots leg.

To compare the results the Y-axis is used

Parameters:
start The starting point in the image
depth count the step size. Used to make smaller steps in the foot near
Returns:
the foot point

Definition at line 698 of file GT2005PlayerSpecialist.cpp.

References CORRECTED_COLOR_CLASS, DOT, idText, Image::image, LINE, max, ImageInfo::maxImageCoordinates, NDOT, NLINE, OUTPUT, Vector2< double >::x, Vector2< int >::x, Vector2< V >::x, Vector2< double >::y, Vector2< int >::y, and Vector2< V >::y.

Referenced by detectRedRobots().

Vector2< unsigned char > GT2005PlayerSpecialist::findBlueFootPointYAxis Vector2< unsigned char >  start,
Vector2< char >  direction,
short  depth,
unsigned char  recursionLevel = 0
[private]
 

Definition at line 778 of file GT2005PlayerSpecialist.cpp.

References CORRECTED_COLOR_CLASS, DOT, idText, Image::image, LINE, max, ImageInfo::maxImageCoordinates, NDOT, NLINE, OUTPUT, Vector2< double >::x, Vector2< int >::x, Vector2< V >::x, Vector2< double >::y, Vector2< int >::y, and Vector2< V >::y.

Referenced by detectBlueRobots().

void GT2005PlayerSpecialist::clusterRobotLinesPercepts  )  [private]
 

Clusters the linespercepts in different robots Maximal 4 robots and 30 pixel space between them.

Definition at line 466 of file GT2005PlayerSpecialist.cpp.

References averageBlueRobotSignature, averageBlueRobotSignaturePoints, averageBlueRobotSignatureStart, averageBlueRobotSignatureStop, averageRedRobotSignature, averageRedRobotSignaturePoints, averageRedRobotSignatureStart, averageRedRobotSignatureStop, checkForWhiteLineBetweenBlue(), checkForWhiteLineBetweenRed(), clusteredBlueRobots, clusteredRedRobots, linesPercept, and LinesPercept::points.

Referenced by execute().

Here is the call graph for this function:

bool GT2005PlayerSpecialist::checkForWhiteLineBetweenRed Vector2< int >  start,
Vector2< int >  stop
[private]
 

Checks if the line between 2 points is mostly white or accepted color.

Definition at line 632 of file GT2005PlayerSpecialist.cpp.

References CORRECTED_COLOR_CLASS, BresenhamLineScan::getNext(), idText, Image::image, ImageInfo::maxImageCoordinates, noColor, OUTPUT, Vector2< int >::x, Vector2< V >::x, Vector2< int >::y, and Vector2< V >::y.

Referenced by clusterRobotLinesPercepts().

Here is the call graph for this function:

bool GT2005PlayerSpecialist::checkForWhiteLineBetweenBlue Vector2< int >  start,
Vector2< int >  stop
[private]
 

Definition at line 564 of file GT2005PlayerSpecialist.cpp.

References CORRECTED_COLOR_CLASS, BresenhamLineScan::getNext(), idText, Image::image, ImageInfo::maxImageCoordinates, noColor, OUTPUT, Vector2< int >::x, Vector2< V >::x, Vector2< int >::y, and Vector2< V >::y.

Referenced by clusterRobotLinesPercepts().

Here is the call graph for this function:

colorClass GT2005PlayerSpecialist::inspectColorArea const Vector2< unsigned char > &  position,
const Vector2< char > &  direction
[inline, private]
 

Inspect a color quad of the color proportion.

Definition at line 855 of file GT2005PlayerSpecialist.cpp.

References CORRECTED_COLOR_CLASS, Image::image, ImageInfo::maxImageCoordinates, noColor, Vector2< int >::x, Vector2< V >::x, Vector2< int >::y, and Vector2< V >::y.


Member Data Documentation

Vector2<int> GT2005PlayerSpecialist::averageRedRobotSignatureStart[4] [private]
 

Definition at line 81 of file GT2005PlayerSpecialist.h.

Referenced by clusterRobotLinesPercepts(), and execute().

Vector2<int> GT2005PlayerSpecialist::averageRedRobotSignatureStop[4] [private]
 

Needed for debugging.

Definition at line 81 of file GT2005PlayerSpecialist.h.

Referenced by clusterRobotLinesPercepts(), and execute().

Vector2<int> GT2005PlayerSpecialist::averageRedRobotSignature[4] [private]
 

Needed for debugging.

Definition at line 81 of file GT2005PlayerSpecialist.h.

Referenced by clusterRobotLinesPercepts(), and execute().

Vector2<int> GT2005PlayerSpecialist::averageBlueRobotSignatureStart[4] [private]
 

Needed for debugging.

Definition at line 81 of file GT2005PlayerSpecialist.h.

Referenced by clusterRobotLinesPercepts(), and execute().

Vector2<int> GT2005PlayerSpecialist::averageBlueRobotSignatureStop[4] [private]
 

Needed for debugging.

Definition at line 81 of file GT2005PlayerSpecialist.h.

Referenced by clusterRobotLinesPercepts(), and execute().

Vector2<int> GT2005PlayerSpecialist::averageBlueRobotSignature[4] [private]
 

Needed for debugging.

Definition at line 81 of file GT2005PlayerSpecialist.h.

Referenced by clusterRobotLinesPercepts(), and execute().

int GT2005PlayerSpecialist::clusteredRedRobots [private]
 

Needed for debugging.

Definition at line 89 of file GT2005PlayerSpecialist.h.

Referenced by clusterRobotLinesPercepts(), and execute().

int GT2005PlayerSpecialist::clusteredBlueRobots [private]
 

Needed for debugging.

Definition at line 89 of file GT2005PlayerSpecialist.h.

Referenced by clusterRobotLinesPercepts(), and execute().

int GT2005PlayerSpecialist::averageRedRobotSignaturePoints[4] [private]
 

the number of clustered robots

Definition at line 90 of file GT2005PlayerSpecialist.h.

Referenced by clusterRobotLinesPercepts(), and execute().

int GT2005PlayerSpecialist::averageBlueRobotSignaturePoints[4] [private]
 

the number of clustered robots

Definition at line 90 of file GT2005PlayerSpecialist.h.

Referenced by clusterRobotLinesPercepts(), and execute().

int GT2005PlayerSpecialist::maxDepth [private]
 

Definition at line 93 of file GT2005PlayerSpecialist.h.

const ImageInfo& GT2005PlayerSpecialist::imageInfo [private]
 

Definition at line 95 of file GT2005PlayerSpecialist.h.

const ColorTable& GT2005PlayerSpecialist::colorTable [private]
 

Definition at line 96 of file GT2005PlayerSpecialist.h.

const ColorCorrector& GT2005PlayerSpecialist::colorCorrector [private]
 

Definition at line 97 of file GT2005PlayerSpecialist.h.

const LinesPercept& GT2005PlayerSpecialist::linesPercept [private]
 

Definition at line 98 of file GT2005PlayerSpecialist.h.

Referenced by clusterRobotLinesPercepts().

const Image& GT2005PlayerSpecialist::image [private]
 

Definition at line 99 of file GT2005PlayerSpecialist.h.

const CameraMatrix& GT2005PlayerSpecialist::cameraMatrix [private]
 

Definition at line 100 of file GT2005PlayerSpecialist.h.

PlayersPercept& GT2005PlayerSpecialist::playersPercept [private]
 

Definition at line 102 of file GT2005PlayerSpecialist.h.


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