#include <GT2005ImageProcessor.h>
Inheritance diagram for GT2005ImageProcessor:


Helpers for grid drawing | |
| void | plot (const unsigned char *p, Drawings::Color color) |
| const unsigned char * | last |
| Drawings::Color | lineColor |
Public Member Functions | |
| GT2005ImageProcessor (const ImageProcessorInterfaces &interfaces) | |
| Constructor. | |
| virtual void | execute () |
| Main method. | |
| virtual bool | handleMessage (InMessage &message) |
| Handles an incoming message. | |
Static Public Attributes | |
| const double | verticalScanLineTopAboveHorizon = 15.0 |
| Parameters for the scanning grid. | |
| const double | verticalScanLineLength13 = 55.0 |
| const double | verticalScanLineLength2 = 75.0 |
| const double | verticalScanLineSpacing = 4.0 |
Private Member Functions | |
| void | scanColumns () |
| Calculates the vertical lines and calls scan(...) on each of them. | |
| void | scanRows () |
| Calculates the horizontal lines and calls scan. | |
| void | scan (const Vector2< int > &start, const Vector2< int > &end, bool vertical, bool noLines, int pixelsRelevantForGoal) |
| The function scans a line for varous things (??). | |
| bool | pixelBelowHorizon (Vector2< int > point, double &distance) |
| The function calculates the distance to a point to horizon. | |
| void | filterPercepts () |
| The function filters the percepts, i.e. | |
| void | filterLinesPercept (LinesPercept &percept, int type, const Image &image) |
| The function filters the line-percepts, i.e. | |
| bool | calcEdgeAngle (double &angleInImage, double &angleOnField, const Vector2< int > &pointInImage, const Vector2< int > &pointOnField, double scanAngle, const RingBuffer< const unsigned char *, 7 > &pixelBuffer, const bool againstScanline=false, const bool borderOrLine=true, int channel=0) |
| The function calculates the angle of an edge at an edge point. | |
| Vector2< int > | getCoords (const unsigned char *p) const |
| The function converts an address to pixel coordinates. | |
| DECLARE_DEBUG_IMAGE (imageProcessorPlayers) | |
| DECLARE_DEBUG_IMAGE (imageProcessorGeneral) | |
| DECLARE_DEBUG_COLOR_CLASS_IMAGE (segmentedImage1) | |
| DECLARE_DEBUG_IMAGE (imageProcessorBall) | |
| DECLARE_DEBUG_IMAGE (imageProcessorGradients) | |
| N_DECLARE_DEBUG_IMAGE (colorCorrected) | |
| N_DECLARE_DEBUG_IMAGE (colorCorrectedAsJpeg) | |
| N_DECLARE_DEBUG_COLOR_CLASS_IMAGE (segmented) | |
| N_DECLARE_DEBUG_IMAGE (ball) | |
| N_DECLARE_DEBUG_IMAGE (edgeDetection) | |
| N_DECLARE_DEBUG_GRAY_SCALE_IMAGE (scanLines) | |
Private Attributes | |
| double | xFactor |
| Factor to convert the pixel coordinate space to the anglular coordinate space. | |
| double | yFactor |
| Factor to convert the pixel coordinate space to the anglular coordinate space. | |
| int | yThreshold |
| Brightness increase threshold. | |
| int | vThreshold |
| Brightness decrease threshold. | |
| int | orangeCount |
| Number of columns with ball points. | |
| int | noOrangeCount |
| Number of columns without a ball point. | |
| int | noRedCount |
| Number of columns without a red robot point. | |
| int | noBlueCount |
| Number of columns without a blue robot point. | |
| int | noGoalCount |
| Number of columns without a opponent goal seen. | |
| int | closestBottom |
| Closest bottom point on the grid. | |
| Vector2< int > | firstRed |
| First red robot point in a cluster. | |
| Vector2< int > | closestRed |
| Closest red robot point in a cluster. | |
| Vector2< int > | lastRed |
| Last red robot point in a cluster. | |
| Vector2< int > | firstBlue |
| First blue robot point in a cluster. | |
| Vector2< int > | closestBlue |
| Closest blue robot point in a cluster. | |
| Vector2< int > | lastBlue |
| Last blue robot point in a cluster. | |
| Vector2< int > | firstFlag |
| First flag point in a cluster. | |
| Vector2< int > | lastFlag |
| Last flag point in a cluster. | |
| Vector2< int > | lastRedMidPoint |
| Last flag point in a cluster. | |
| Vector2< int > | lastBlueMidPoint |
| Needed for debug drawings. | |
| bool | goalAtBorder |
| Is the first goal point at the image border? | |
| ImageInfo | imageInfo |
| Useful information about the current image that is calculated by the ImageProcessor object and may be used by the specialist (avoiding recalculation) like the horizon, etc. | |
| int | longestBallRun |
| Vector2< int > | ballCandidate |
| GT2005Clustering | ballClustering |
| GT2005LineFinder_DeterministicApproach | lineFinder |
| GT2005CenterCircleFinder | circleFinder |
| CameraMatrix | cmTricot |
| Camera matrix without tricot height. | |
| CameraMatrix | prevCmTricot |
| The tricot matrix of the previous image. | |
| ColorCorrector | colorCorrector |
| The color correction tool. | |
| GT2005GoalRecognizer | goalSpecialistY |
| Goal specialists to recognize the goals (one for each color). | |
| GT2005GoalRecognizer | goalSpecialistB |
| Goal specialists to recognize the goals (one for each color). | |
| GT2005BeaconDetector | beaconDetector |
| The beacon detector. | |
| GT2005BallSpecialist | ballSpecialist |
| The ball specialist. | |
| GT2005EdgeSpecialist | edgeSpecialist |
| The edge specialist. | |
| GT2005PlayerSpecialist | playerSpecialist |
| The player specialist. | |
| double | angleBetweenDirectionOfViewAndGround |
| int | numberOfScannedPixels |
| Matrix2x2< double > | rotation2x2 |
Static Private Attributes | |
| const double | minAngleBetweenFlagAndGoal = 0.05 |
Four types of lines are distinguished: edges between the skyblue goal and the field, edges between the yellow goal and the field, edges between the border and the field, and edges between the field lines and the field.
The module scans vertical and horizontal lines in the image from top to bottom and from left to right. As the green of the field is very dark, all edges are characterized by a big difference of the y-channel of adjacent pixels. An increase in the y-channel followed by a decrease is an indication for an edge.
The projection of the pixels on the field plane is used to determine their relative position to the robot.
Definition at line 60 of file GT2005ImageProcessor.h.
|
|
Constructor.
Definition at line 35 of file GT2005ImageProcessor.cpp. References GT2005BeaconDetector::analyzeColorTable(), beaconDetector, pi, rotation2x2, vThreshold, and yThreshold. |
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Handles an incoming message.
Reimplemented from Module. Definition at line 2048 of file GT2005ImageProcessor.cpp. References GT2005BeaconDetector::analyzeColorTable(), beaconDetector, InMessage::getMessageID(), and idColorTable64. |
Here is the call graph for this function:

|
|
Calculates the vertical lines and calls scan(...) on each of them. The vertical lines are more dense near the horizon, since objects are further away and hence smaller. NB: HX and HY in variable names denote x- and y-values in the horizon-aligned coordinate system. The goal detection should be only be done near the horizon. Therefore I calculate the (maximum) number of pixels on the current scanline that should be considered. NB: Assumes the usage of the Bresenham line algorithm when scanning the lines. Definition at line 528 of file GT2005ImageProcessor.cpp. References ASSERT, Geometry::Line::base, Matrix2x2< double >::c, Geometry::Line::direction, ImageInfo::distanceTopLeftCorner, Geometry::getIntersectionPointsOfLineAndRectangle(), ImageInfo::horizon, imageInfo, ImageInfo::invRotation, max, ImageInfo::maxImageCoordinates, min, ImageInfo::rotation, scan(), verticalScanLineLength13, verticalScanLineLength2, verticalScanLineSpacing, verticalScanLineTopAboveHorizon, ImageInfo::vertLine, Vector2< V >::x, Vector2< double >::x, Vector2< V >::y, Vector2< double >::y, and Vector2< int >::y. Referenced by execute(). |
Here is the call graph for this function:

|
|
Calculates the horizontal lines and calls scan.
Definition at line 717 of file GT2005ImageProcessor.cpp. References Geometry::Line::base, Geometry::Line::direction, Geometry::getIntersectionPointsOfLineAndRectangle(), ImageInfo::horizon, imageInfo, LINE, ImageInfo::maxImageCoordinates, scan(), ImageInfo::vertLine, Vector2< V >::x, Vector2< int >::x, Vector2< double >::x, Vector2< V >::y, and Vector2< double >::y. Referenced by execute(). |
Here is the call graph for this function:

|
||||||||||||||||||||||||
Here is the call graph for this function:

|
||||||||||||
|
The function calculates the distance to a point to horizon.
Definition at line 1622 of file GT2005ImageProcessor.cpp. References Geometry::Line::base, Geometry::Line::direction, ImageInfo::horizon, ImageInfo::horizonInImage, imageInfo, Geometry::Line::normalizeDirection(), point, RotationMatrix::rotateZ(), sgn, Vector2< double >::x, Vector3< V >::x, Vector2< int >::x, Vector2< double >::y, Vector3< V >::y, and Vector2< int >::y. |
Here is the call graph for this function:

|
|
The function filters the percepts, i.e. it removes potential misreadings. Definition at line 1650 of file GT2005ImageProcessor.cpp. References Goal::angle, Flag::angle, Goal::color, filterLinesPercept(), LandmarksPercept::flags, LandmarksPercept::goals, minAngleBetweenFlagAndGoal, LandmarksPercept::numberOfFlags, LandmarksPercept::numberOfGoals, LinesPercept::points, and Flag::type. |
Here is the call graph for this function:

|
||||||||||||||||
|
The function filters the line-percepts, i.e. it removes potential misreadings, for the given line-type. Definition at line 2069 of file GT2005ImageProcessor.cpp. References normalize(), and LinesPercept::points. Referenced by filterPercepts(). |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||||||||||
|
The function calculates the angle of an edge at an edge point.
Definition at line 1948 of file GT2005ImageProcessor.cpp. References Vector2< V >::abs(), Vector2< V >::angle(), ARROW, Geometry::calculatePointOnField(), Image::cameraInfo, GT2005LineFinder_DeterministicApproach::considerLinePoint(), getCoords(), Image::image, imageInfo, lineFinder, normalize(), pi, pi2, pi_2, point, ImageInfo::previousCameraMatrix, Vector2< V >::rotateLeft(), rotation2x2, Vector2< V >::x, Vector2< int >::x, Vector2< V >::y, and Vector2< int >::y. Referenced by scan(). |
Here is the call graph for this function:

|
|
The function converts an address to pixel coordinates.
Definition at line 236 of file GT2005ImageProcessor.h. References cameraResolutionWidth_ERS7, and Image::image. Referenced by calcEdgeAngle(), plot(), and scan(). |
|
||||||||||||
|
Definition at line 2031 of file GT2005ImageProcessor.cpp. References getCoords(), LINE, lineColor, Vector2< V >::x, and Vector2< V >::y. |
Here is the call graph for this function:

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parameters for the scanning grid. Only one in four scanlines run from the horizon to the bottom of the image. In between of those, there are one medium and two short lines, so that the grid is more dense near the horizon. The parameter verticalScanlineSpacing specifies the distance between the vertical scan lines. Definition at line 20 of file GT2005ImageProcessor.cpp. Referenced by scanColumns(). |
|
|
Definition at line 21 of file GT2005ImageProcessor.cpp. Referenced by scanColumns(). |
|
|
Definition at line 22 of file GT2005ImageProcessor.cpp. Referenced by scanColumns(). |
|
|
Definition at line 23 of file GT2005ImageProcessor.cpp. Referenced by scanColumns(). |
|
|
Definition at line 32 of file GT2005ImageProcessor.cpp. Referenced by filterPercepts(). |
|
|
Factor to convert the pixel coordinate space to the anglular coordinate space.
Definition at line 124 of file GT2005ImageProcessor.h. Referenced by execute(). |
|
|
Factor to convert the pixel coordinate space to the anglular coordinate space.
Definition at line 124 of file GT2005ImageProcessor.h. Referenced by execute(). |
|
|
Brightness increase threshold.
Definition at line 126 of file GT2005ImageProcessor.h. Referenced by GT2005ImageProcessor(), and scan(). |
|
|
Brightness decrease threshold.
Definition at line 127 of file GT2005ImageProcessor.h. Referenced by GT2005ImageProcessor(), and scan(). |
|
|
Number of columns with ball points.
Definition at line 128 of file GT2005ImageProcessor.h. Referenced by scan(). |
|
|
Number of columns without a ball point.
Definition at line 128 of file GT2005ImageProcessor.h. Referenced by scan(). |
|
|
Number of columns without a red robot point.
Definition at line 128 of file GT2005ImageProcessor.h. Referenced by execute(). |
|
|
Number of columns without a blue robot point.
Definition at line 128 of file GT2005ImageProcessor.h. Referenced by execute(). |
|
|
Number of columns without a opponent goal seen.
Definition at line 128 of file GT2005ImageProcessor.h. |
|
|
Closest bottom point on the grid.
Definition at line 128 of file GT2005ImageProcessor.h. |
|
|
First red robot point in a cluster.
Definition at line 134 of file GT2005ImageProcessor.h. Referenced by scan(). |
|
|
Closest red robot point in a cluster.
Definition at line 134 of file GT2005ImageProcessor.h. |
|
|
Last red robot point in a cluster.
Definition at line 134 of file GT2005ImageProcessor.h. Referenced by scan(). |
|
|
First blue robot point in a cluster.
Definition at line 134 of file GT2005ImageProcessor.h. Referenced by scan(). |
|
|
Closest blue robot point in a cluster.
Definition at line 134 of file GT2005ImageProcessor.h. |
|
|
Last blue robot point in a cluster.
Definition at line 134 of file GT2005ImageProcessor.h. Referenced by scan(). |
|
|
First flag point in a cluster.
Definition at line 134 of file GT2005ImageProcessor.h. |
|
|
Last flag point in a cluster.
Definition at line 134 of file GT2005ImageProcessor.h. |
|
|
Last flag point in a cluster.
Definition at line 134 of file GT2005ImageProcessor.h. Referenced by execute(). |
|
|
Needed for debug drawings.
Definition at line 134 of file GT2005ImageProcessor.h. Referenced by execute(). |
|
|
Is the first goal point at the image border?
Definition at line 146 of file GT2005ImageProcessor.h. |
|
|
Useful information about the current image that is calculated by the ImageProcessor object and may be used by the specialist (avoiding recalculation) like the horizon, etc.
Definition at line 152 of file GT2005ImageProcessor.h. Referenced by calcEdgeAngle(), execute(), pixelBelowHorizon(), scan(), scanColumns(), and scanRows(). |
|
|
Definition at line 155 of file GT2005ImageProcessor.h. |
|
|
Definition at line 156 of file GT2005ImageProcessor.h. |
|
|
Definition at line 157 of file GT2005ImageProcessor.h. |
|
|
Definition at line 158 of file GT2005ImageProcessor.h. Referenced by calcEdgeAngle(), and execute(). |
|
|
Definition at line 159 of file GT2005ImageProcessor.h. Referenced by execute(). |
|
|
Camera matrix without tricot height.
Definition at line 161 of file GT2005ImageProcessor.h. Referenced by execute(). |
|
|
The tricot matrix of the previous image.
Definition at line 161 of file GT2005ImageProcessor.h. |
|
|
The color correction tool.
Definition at line 165 of file GT2005ImageProcessor.h. |
|
|
Goal specialists to recognize the goals (one for each color).
Definition at line 168 of file GT2005ImageProcessor.h. |
|
|
Goal specialists to recognize the goals (one for each color).
Definition at line 168 of file GT2005ImageProcessor.h. |
|
|
The beacon detector.
Definition at line 171 of file GT2005ImageProcessor.h. Referenced by execute(), GT2005ImageProcessor(), and handleMessage(). |
|
|
The ball specialist.
Definition at line 172 of file GT2005ImageProcessor.h. Referenced by execute(). |
|
|
The edge specialist.
Definition at line 173 of file GT2005ImageProcessor.h. |
|
|
The player specialist.
Definition at line 174 of file GT2005ImageProcessor.h. |
|
|
Definition at line 244 of file GT2005ImageProcessor.h. |
|
|
Definition at line 245 of file GT2005ImageProcessor.h. |
|
|
Definition at line 249 of file GT2005ImageProcessor.h. Referenced by execute(). |
|
|
Definition at line 251 of file GT2005ImageProcessor.h. |
|
|
Definition at line 253 of file GT2005ImageProcessor.h. Referenced by calcEdgeAngle(), and GT2005ImageProcessor(). |
1.3.6