#include <GT2004GoalRecognizer.h>
Collaboration diagram for GT2004GoalRecognizer:
Public Member Functions | |
GT2004GoalRecognizer (const Image &image, const CameraMatrix &cameraMatrix, const CameraMatrix &prevCameraMatrix, const ColorTable &colorTable, const ColorCorrector &colorCorrector, ObstaclesPercept &obstaclesPercept, LandmarksPercept &landmarksPercept) | |
~GT2004GoalRecognizer () | |
void | execute () |
Private Types | |
enum | { maxNumberOfHorizontalScanLines = 32 } |
enum | { maxNumberOfGoalScanLines = 255 } |
Private Member Functions | |
void | calculateScanLinesParallelToHorizon () |
Calculates the scan lines near the horizon for the goals. | |
void | calculateScanLinesParallelToHorizon (int distanceAboveHorizon, int distanceBelowHorizon, int numberOfScanLines) |
Calculates the scan lines near the horizon for the goals. | |
void | scanHorizontalForGoals () |
Scans horizontal for goals. | |
void | calculateVerticalGoalScanLines () |
Calculates the vertical scan lines for the goals. | |
void | scanLinesForGoals () |
Scans vertical for goals. | |
DECLARE_DEBUG_IMAGE (imageProcessorGoals) | |
Private Attributes | |
const Image & | image |
A reference to the image that is scanned for a goal. | |
const CameraMatrix & | cameraMatrix |
A reference to the camera matrix that describes position and rotation of the camera when the image was aquired. | |
const CameraMatrix & | prevCameraMatrix |
A reference to the previous camera matrix that describes position and rotation of the camera when the image was aquired. | |
const ColorTable & | colorTable |
A reference to the color table. | |
int | goalIndicationAboveHorizon |
int | goalIndicationBelowHorizon |
bool | useFixedScanLines |
ObstaclesPercept & | obstaclesPercept |
A reference to the obstacles percept. | |
LandmarksPercept & | landmarksPercept |
A reference to the obstacles percept. | |
const ColorCorrector & | colorCorrector |
A reference to the color corrector. | |
colorClass | colorOfOpponentGoal |
The color class of the opponent goal. | |
colorClass | colorOfOwnGoal |
The color class of the own goal. | |
Geometry::Line | horizonLine |
A representation of the horizon. | |
Geometry::Line | verticalLine |
A representation of the horizon. | |
int | numberOfHorizontalScanLines |
The number of horizontal scan lines. | |
Vector2< int > | leftPoint [maxNumberOfHorizontalScanLines] |
representation of the left points of the horizontal scan lines | |
Vector2< int > | rightPoint [maxNumberOfHorizontalScanLines] |
representation of the right points of the horizontal scan lines | |
int | numberOfGoalIndications |
the number of indications for goals | |
Vector2< int > | goalIndicationLeft [maxNumberOfGoalScanLines] |
left point of an indications for a goal | |
Vector2< int > | goalIndicationCenter [maxNumberOfGoalScanLines] |
left point of an indications for a goal | |
Vector2< int > | goalIndicationRight [maxNumberOfGoalScanLines] |
right point of an indication for a goal | |
bool | leftOfGoalIndicationIsOnBorder [maxNumberOfGoalScanLines] |
true if the left end of the goal indication is on the border of the image | |
bool | rightOfGoalIndicationIsOnBorder [maxNumberOfGoalScanLines] |
true if the right end of the goal indication is on the border of the image | |
colorClass | colorOfGoalIndication [maxNumberOfGoalScanLines] |
the color class of the goal indication | |
int | numberOfGoalScanLines |
The number of vertical scan lines where a goal is searched. | |
Vector2< int > | topGoalPoint [maxNumberOfGoalScanLines] |
representation of the top points of the goal scan lines | |
Vector2< int > | bottomGoalPoint [maxNumberOfGoalScanLines] |
representation of the bottom points of the goal scan lines | |
bool | scanLineToCheckBestAngle [maxNumberOfGoalScanLines] |
int | indexOfGoalIndication [maxNumberOfGoalScanLines] |
colorClass | colorOfGoalScanLine [maxNumberOfGoalScanLines] |
The recognizer scans horizontal lines in the image left to right. Indications for a goal are grouped and checked vertical.
Definition at line 22 of file GT2004GoalRecognizer.h.
|
Definition at line 156 of file GT2004GoalRecognizer.h. |
|
Definition at line 157 of file GT2004GoalRecognizer.h. |
|
Definition at line 24 of file GT2004GoalRecognizer.cpp. |
|
Definition at line 45 of file GT2004GoalRecognizer.cpp. |
|
Here is the call graph for this function:
|
Calculates the scan lines near the horizon for the goals.
Definition at line 81 of file GT2004GoalRecognizer.cpp. References Geometry::Line::base, Geometry::Line::direction, Geometry::getIntersectionPointsOfLineAndRectangle(), horizonLine, leftPoint, numberOfHorizontalScanLines, rightPoint, and verticalLine. Referenced by execute(). |
Here is the call graph for this function:
|
Calculates the scan lines near the horizon for the goals.
Definition at line 109 of file GT2004GoalRecognizer.cpp. References Geometry::Line::base, Geometry::Line::direction, and Geometry::getIntersectionPointsOfLineAndRectangle(). |
Here is the call graph for this function:
|
Here is the call graph for this function:
|
Calculates the vertical scan lines for the goals.
Definition at line 408 of file GT2004GoalRecognizer.cpp. References bottomGoalPoint, Geometry::calculateAnglesForPoint(), Geometry::calculatePointByAngles(), Geometry::clipLineWithRectangleCohenSutherland(), colorOfGoalIndication, colorOfGoalScanLine, colorOfOpponentGoal, colorOfOwnGoal, goalIndicationCenter, goalIndicationLeft, goalIndicationRight, indexOfGoalIndication, numberOfGoalIndications, numberOfGoalScanLines, scanLineToCheckBestAngle, topGoalPoint, Vector2< V >::x, and Vector2< V >::y. Referenced by execute(). |
Here is the call graph for this function:
|
Here is the call graph for this function:
|
|
|
A reference to the image that is scanned for a goal.
Definition at line 120 of file GT2004GoalRecognizer.h. |
|
A reference to the camera matrix that describes position and rotation of the camera when the image was aquired.
Definition at line 123 of file GT2004GoalRecognizer.h. |
|
A reference to the previous camera matrix that describes position and rotation of the camera when the image was aquired.
Definition at line 126 of file GT2004GoalRecognizer.h. |
|
A reference to the color table.
Definition at line 129 of file GT2004GoalRecognizer.h. |
|
Definition at line 131 of file GT2004GoalRecognizer.h. Referenced by execute(). |
|
Definition at line 132 of file GT2004GoalRecognizer.h. Referenced by execute(). |
|
Definition at line 133 of file GT2004GoalRecognizer.h. Referenced by execute(). |
|
A reference to the obstacles percept.
Definition at line 136 of file GT2004GoalRecognizer.h. |
|
A reference to the obstacles percept.
Definition at line 139 of file GT2004GoalRecognizer.h. |
|
A reference to the color corrector.
Definition at line 142 of file GT2004GoalRecognizer.h. |
|
The color class of the opponent goal.
Definition at line 145 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), execute(), scanHorizontalForGoals(), and scanLinesForGoals(). |
|
The color class of the own goal.
Definition at line 148 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), and execute(). |
|
A representation of the horizon.
Definition at line 151 of file GT2004GoalRecognizer.h. Referenced by calculateScanLinesParallelToHorizon(), and execute(). |
|
A representation of the horizon.
Definition at line 151 of file GT2004GoalRecognizer.h. Referenced by calculateScanLinesParallelToHorizon(), and execute(). |
|
The number of horizontal scan lines.
Definition at line 154 of file GT2004GoalRecognizer.h. Referenced by calculateScanLinesParallelToHorizon(), and scanHorizontalForGoals(). |
|
representation of the left points of the horizontal scan lines
Definition at line 160 of file GT2004GoalRecognizer.h. Referenced by calculateScanLinesParallelToHorizon(), and scanHorizontalForGoals(). |
|
representation of the right points of the horizontal scan lines
Definition at line 163 of file GT2004GoalRecognizer.h. Referenced by calculateScanLinesParallelToHorizon(), and scanHorizontalForGoals(). |
|
the number of indications for goals
Definition at line 166 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), scanHorizontalForGoals(), and scanLinesForGoals(). |
|
left point of an indications for a goal
Definition at line 169 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), scanHorizontalForGoals(), and scanLinesForGoals(). |
|
left point of an indications for a goal
Definition at line 172 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), and scanHorizontalForGoals(). |
|
right point of an indication for a goal
Definition at line 175 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), scanHorizontalForGoals(), and scanLinesForGoals(). |
|
true if the left end of the goal indication is on the border of the image
Definition at line 178 of file GT2004GoalRecognizer.h. Referenced by scanHorizontalForGoals(), and scanLinesForGoals(). |
|
true if the right end of the goal indication is on the border of the image
Definition at line 181 of file GT2004GoalRecognizer.h. Referenced by scanHorizontalForGoals(), and scanLinesForGoals(). |
|
the color class of the goal indication
Definition at line 184 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), scanHorizontalForGoals(), and scanLinesForGoals(). |
|
The number of vertical scan lines where a goal is searched.
Definition at line 187 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), and scanLinesForGoals(). |
|
representation of the top points of the goal scan lines
Definition at line 190 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), and scanLinesForGoals(). |
|
representation of the bottom points of the goal scan lines
Definition at line 193 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), and scanLinesForGoals(). |
|
Definition at line 195 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), and scanLinesForGoals(). |
|
Definition at line 198 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), and scanLinesForGoals(). |
|
Definition at line 201 of file GT2004GoalRecognizer.h. Referenced by calculateVerticalGoalScanLines(), and scanLinesForGoals(). |