#include <GT2004BallSpecialist.h>
Collaboration diagram for GT2004BallSpecialist:
Public Member Functions | |
GT2004BallSpecialist (const ColorCorrector &colorCorrector) | |
void | searchBall (const Image &image, const ColorTable &colorTable, const CameraMatrix &cameraMatrix, const CameraMatrix &prevCameraMatrix, int x, int y, BallPercept &ballPercept) |
Searches for the ball in the image, starting from the secified point. | |
unsigned char | getSimilarityToOrange (unsigned char y, unsigned char u, unsigned char v) |
Returns the Similarity of the given color to orange. | |
Private Member Functions | |
void | scanForBallPoints (const Image &image, const CameraInfo &bwCameraInfo, const ColorTable &colorTable, int x, int y, BallPointList &ballPoints, int &countAmbiguous, int &countOrange, int &maxOrangePerLine, int &countPixel) |
Scan for the ball starting at a given trigger point. | |
bool | findEndOfBall (const Image &image, const CameraInfo &bwCameraInfo, const ColorTable &colorTable, const BallPoint &start, const Vector2< int > &step, BallPoint &destination, int &countAmbiguous, int &countOrange, int &maxOrangePerLine, int &countPixel) |
Finds the end of the ball. | |
bool | createBallPerceptLevenbergMarquardt (const BallPointList &ballPoints, Vector2< int > ¢er, double &radius) |
The function tries to calculate the ball percept by using the Levenberg-Marquardt algorithm. | |
bool | checkIfPointsAreInsideBall (const BallPointList &ballPoints, Vector2< int > ¢er, double radius) |
void | addBallPercept (const Image &image, const CameraInfo &bwCameraInfo, const ColorTable &colorTable, const CameraMatrix &cameraMatrix, const CameraMatrix &prevCameraMatrix, const Vector2< int > ¢er, double radius, BallPercept &ballPercept) |
The function checks whether a ball percept is plausible and will add it if so. | |
Private Attributes | |
const ColorCorrector & | colorCorrector |
Definition at line 28 of file GT2004BallSpecialist.h.
|
Definition at line 24 of file GT2004BallSpecialist.cpp. |
|
Searches for the ball in the image, starting from the secified point.
Definition at line 33 of file GT2004BallSpecialist.cpp. References GT2004BallSpecialist::BallPointList::add(), DEBUG_DRAWING_FINISHED, CameraInfo::focalLength, CameraInfo::focalLengthInv, GT2004BallSpecialist::BallPointList::number, CameraInfo::opticalCenter, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< double >::x, and Vector2< double >::y. Referenced by GT2004ImageProcessor::execute(). |
Here is the call graph for this function:
|
Returns the Similarity of the given color to orange.
Definition at line 49 of file GT2004BallSpecialist.h. References Image::convertFromYCbCrToRGB(), max, and min. Referenced by findEndOfBall(). |
Here is the call graph for this function:
|
Scan for the ball starting at a given trigger point.
Definition at line 158 of file GT2004BallSpecialist.cpp. References GT2004BallSpecialist::BallPoint::atBorder, DOT, findEndOfBall(), Vector2< V >::x, Vector2< int >::x, Vector2< V >::y, and Vector2< int >::y. |
Here is the call graph for this function:
|
Finds the end of the ball.
Definition at line 352 of file GT2004BallSpecialist.cpp. References colorClass, colorCorrector, ColorCorrector::correct(), CORRECTED_COLOR_CLASS, getSimilarityToOrange(), LINE, and max. Referenced by scanForBallPoints(). |
Here is the call graph for this function:
|
The function tries to calculate the ball percept by using the Levenberg-Marquardt algorithm. The function fails if less than 3 points are available.
Definition at line 526 of file GT2004BallSpecialist.cpp. References idText, OUTPUT, and Matrix_nxn< T, N >::solve(). |
Here is the call graph for this function:
|
Definition at line 605 of file GT2004BallSpecialist.cpp. References Geometry::distance(), and GT2004BallSpecialist::BallPointList::number. |
Here is the call graph for this function:
|
The function checks whether a ball percept is plausible and will add it if so.
Definition at line 618 of file GT2004BallSpecialist.cpp. References Geometry::calculateAnglesForPoint(), colorClass, CORRECTED_COLOR_CLASS, DOT, BresenhamLineScan::getNext(), BresenhamLineScan::init(), BresenhamLineScan::numberOfPixels, pi_4, Vector2< V >::x, Vector2< V >::y, and Vector3< V >::z. |
Here is the call graph for this function:
|
Definition at line 169 of file GT2004BallSpecialist.h. Referenced by findEndOfBall(). |