#include <GT2004ImageProcessor.h>
Inheritance diagram for GT2004ImageProcessor:
Helpers for grid drawing | |
void | plot (const unsigned char *p, Drawings::Color color) |
const unsigned char * | last |
Drawings::Color | lineColor |
Public Member Functions | |
GT2004ImageProcessor (const ImageProcessorInterfaces &interfaces) | |
Constructor. | |
virtual void | execute () |
Executes the module. | |
virtual bool | handleMessage (InMessage &message) |
Handles an incoming message. | |
Private Member Functions | |
void | scanColumns () |
The function scans columns for line points. | |
void | scanRows () |
The function scans rows for line points. | |
void | scan (const Vector2< int > &start, const Vector2< int > &end, bool vertical, bool noLines) |
The function scans a line for line points. | |
void | clusterRobots (const unsigned char *bottomPoint, bool redFound, bool blueFound) |
The function clusters points of red and blue robots. | |
void | filterPercepts () |
The function filters the percepts, i.e. | |
void | filterLinesPercept (LinesPercept &percept, int type, const CameraMatrix &cameraMatrix, const CameraMatrix &prevCameraMatrix, const Image &image) |
The function filters the line-percepts, i.e. | |
double | calcEdgeAngle (const Vector2< int > &pointInImage, const Vector2< int > &pointOnField, double scanAngle, const RingBuffer< const unsigned char *, 7 > &pixelBuffer, const bool againstScanline=false, int channel=0) const |
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) | |
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. | |
bool | goalAtBorder |
Is the first goal point at the image border? | |
int | longestBallRun |
Vector2< int > | ballCandidate |
CameraMatrix | cmTricot |
Camera matrix without tricot height. | |
CameraMatrix | prevCameraMatrix |
The camera matrix of the previous image. | |
CameraMatrix | prevCmTricot |
The tricot matrix of the previous image. | |
ColorCorrector | colorCorrector |
The color correction tool. | |
GT2004BeaconDetector | beaconDetector |
The beacon detector. | |
GT2004GoalRecognizer | goalRecognizer |
The goal recognizer. | |
GT2004BallSpecialist | ballSpecialist |
The ball specialist. | |
GT2004EdgeSpecialist | edgeSpecialist |
The edge specialist. | |
ImageInfo | imageInfo |
Additional information about the current image. | |
double | angleBetweenDirectionOfViewAndGround |
int | numberOfScannedPixels |
Matrix2x2< double > | rotation2x2 |
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 48 of file GT2004ImageProcessor.h.
|
Constructor.
Definition at line 24 of file GT2004ImageProcessor.cpp. References GT2004BeaconDetector::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 1412 of file GT2004ImageProcessor.cpp. References GT2004BeaconDetector::analyzeColorTable(), beaconDetector, InMessage::getMessageID(), and idColorTable64. |
Here is the call graph for this function:
|
The function scans columns for line points.
Definition at line 288 of file GT2004ImageProcessor.cpp. References Geometry::Line::base, Image::cameraInfo, closestBottom, clusterRobots(), Geometry::Line::direction, Geometry::getIntersectionOfLines(), Geometry::getIntersectionPointsOfLineAndRectangle(), goalAtBorder, ImageInfo::horizon, imageInfo, ImageInfo::maxImageCoordinates, noBlueCount, noRedCount, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, scan(), ImageInfo::vertLine, Vector2< V >::x, Vector2< double >::x, Vector2< V >::y, and Vector2< double >::y. Referenced by execute(). |
Here is the call graph for this function:
|
The function scans rows for line points.
Definition at line 411 of file GT2004ImageProcessor.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 clusters points of red and blue robots.
Definition at line 1165 of file GT2004ImageProcessor.cpp. References Vector2< V >::abs(), Vector2< int >::abs(), PlayersPercept::addBluePlayer(), PlayersPercept::addRedPlayer(), Geometry::calculatePointOnField(), Image::cameraInfo, closestBlue, closestRed, SinglePlayerPercept::direction, firstBlue, firstRed, getCoords(), lastBlue, lastRed, noBlueCount, noRedCount, LinesPercept::numberOfPoints, SinglePlayerPercept::offset, LinesPercept::points, SinglePlayerPercept::validity, Vector2< double >::x, Vector2< int >::x, Vector2< V >::x, Vector2< double >::y, Vector2< int >::y, and Vector2< V >::y. Referenced by scan(), and scanColumns(). |
Here is the call graph for this function:
|
The function filters the percepts, i.e. it removes potential misreadings. Definition at line 1231 of file GT2004ImageProcessor.cpp. References Vector2< double >::abs(), PlayersPercept::bluePlayers, filterLinesPercept(), PlayersPercept::numberOfBluePlayers, LinesPercept::numberOfPoints, PlayersPercept::numberOfRedPlayers, SinglePlayerPercept::offset, pi, PlayersPercept::redPlayers, Vector2< double >::x, and Vector2< double >::y. Referenced by execute(). |
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 1433 of file GT2004ImageProcessor.cpp. References normalize(), LinesPercept::numberOfPoints, 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 1333 of file GT2004ImageProcessor.cpp. References Vector2< V >::abs(), Vector2< V >::angle(), ARROW, Geometry::calculatePointOnField(), Image::cameraInfo, getCoords(), Image::image, normalize(), pi, pi2, pi_2, point, 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 174 of file GT2004ImageProcessor.h. References cameraResolutionWidth_ERS7, and Image::image. Referenced by calcEdgeAngle(), clusterRobots(), plot(), and scan(). |
|
Definition at line 1395 of file GT2004ImageProcessor.cpp. References getCoords(), LINE, lineColor, Vector2< V >::x, and Vector2< V >::y. |
Here is the call graph for this function:
|
|
|
|
|
|
|
|
|
|
|
Factor to convert the pixel coordinate space to the anglular coordinate space.
Definition at line 66 of file GT2004ImageProcessor.h. Referenced by execute(). |
|
Factor to convert the pixel coordinate space to the anglular coordinate space.
Definition at line 66 of file GT2004ImageProcessor.h. Referenced by execute(). |
|
Brightness increase threshold.
Definition at line 68 of file GT2004ImageProcessor.h. Referenced by GT2004ImageProcessor(), and scan(). |
|
Brightness decrease threshold.
Definition at line 69 of file GT2004ImageProcessor.h. Referenced by GT2004ImageProcessor(), and scan(). |
|
Number of columns with ball points.
Definition at line 70 of file GT2004ImageProcessor.h. Referenced by scan(). |
|
Number of columns without a ball point.
Definition at line 70 of file GT2004ImageProcessor.h. Referenced by scan(). |
|
Number of columns without a red robot point.
Definition at line 70 of file GT2004ImageProcessor.h. Referenced by clusterRobots(), and scanColumns(). |
|
Number of columns without a blue robot point.
Definition at line 70 of file GT2004ImageProcessor.h. Referenced by clusterRobots(), and scanColumns(). |
|
Number of columns without a opponent goal seen.
Definition at line 70 of file GT2004ImageProcessor.h. |
|
Closest bottom point on the grid.
Definition at line 70 of file GT2004ImageProcessor.h. Referenced by scan(), and scanColumns(). |
|
First red robot point in a cluster.
Definition at line 76 of file GT2004ImageProcessor.h. Referenced by clusterRobots(), and scan(). |
|
Closest red robot point in a cluster.
Definition at line 76 of file GT2004ImageProcessor.h. Referenced by clusterRobots(). |
|
Last red robot point in a cluster.
Definition at line 76 of file GT2004ImageProcessor.h. Referenced by clusterRobots(), and scan(). |
|
First blue robot point in a cluster.
Definition at line 76 of file GT2004ImageProcessor.h. Referenced by clusterRobots(), and scan(). |
|
Closest blue robot point in a cluster.
Definition at line 76 of file GT2004ImageProcessor.h. Referenced by clusterRobots(). |
|
Last blue robot point in a cluster.
Definition at line 76 of file GT2004ImageProcessor.h. Referenced by clusterRobots(), and scan(). |
|
First flag point in a cluster.
Definition at line 76 of file GT2004ImageProcessor.h. |
|
Last flag point in a cluster.
Definition at line 76 of file GT2004ImageProcessor.h. |
|
Is the first goal point at the image border?
Definition at line 84 of file GT2004ImageProcessor.h. Referenced by scan(), and scanColumns(). |
|
Definition at line 85 of file GT2004ImageProcessor.h. |
|
Definition at line 86 of file GT2004ImageProcessor.h. |
|
Camera matrix without tricot height.
Definition at line 88 of file GT2004ImageProcessor.h. |
|
The camera matrix of the previous image.
Definition at line 88 of file GT2004ImageProcessor.h. |
|
The tricot matrix of the previous image.
Definition at line 88 of file GT2004ImageProcessor.h. |
|
The color correction tool.
Definition at line 92 of file GT2004ImageProcessor.h. |
|
The beacon detector.
Definition at line 94 of file GT2004ImageProcessor.h. Referenced by execute(), GT2004ImageProcessor(), and handleMessage(). |
|
The goal recognizer.
Definition at line 96 of file GT2004ImageProcessor.h. Referenced by execute(). |
|
The ball specialist.
Definition at line 98 of file GT2004ImageProcessor.h. Referenced by execute(). |
|
The edge specialist.
Definition at line 100 of file GT2004ImageProcessor.h. |
|
Additional information about the current image.
Definition at line 102 of file GT2004ImageProcessor.h. Referenced by execute(), scanColumns(), and scanRows(). |
|
Definition at line 182 of file GT2004ImageProcessor.h. |
|
Definition at line 183 of file GT2004ImageProcessor.h. |
|
Definition at line 187 of file GT2004ImageProcessor.h. |
|
Definition at line 189 of file GT2004ImageProcessor.h. |
|
Definition at line 191 of file GT2004ImageProcessor.h. Referenced by calcEdgeAngle(), and GT2004ImageProcessor(). |