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


Helpers for grid drawing | |
| void | plot (const unsigned char *p, Drawings::Color color) |
| const unsigned char * | last |
| Drawings::Color | lineColor |
Public Member Functions | |
| SlamImageProcessor (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. | |
| 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 | |
| PinkCaracteristic | pinkCaracteristic [NUM_PINK] |
| double | filterWeight |
| double | averageY |
| double | averageU |
| double | averageV |
| int | averageCount |
| 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 |
| GT2005Clustering | ballClustering |
| GT2005LineFinder_DeterministicApproach | lineFinder |
| ImageInfo | imageInfo |
| Additional information about the current image. | |
| CameraMatrix | cmTricot |
| Camera matrix without tricot height. | |
| CameraMatrix | prevCmTricot |
| The tricot matrix of the previous image. | |
| ColorCorrector | colorCorrector |
| The color correction tool. | |
| SlamBeaconDetector | beaconDetector |
| The beacon detector. | |
| SlamGoalRecognizer | goalRecognizer |
| The goal recognizer. | |
| GT2005BallSpecialist | ballSpecialist |
| The ball specialist. | |
| SlamEdgeSpecialist | edgeSpecialist |
| The edge specialist. | |
| SlamBorderFinder | borderFinder |
| int | count |
| double | angleBetweenDirectionOfViewAndGround |
| int | numberOfScannedPixels |
| bool | prevCameraMatrixUninitialized |
| 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 62 of file SlamImageProcessor.h.
|
|
Constructor.
Definition at line 30 of file SlamImageProcessor.cpp. References SlamBeaconDetector::analyzeColorTable(), PinkCaracteristic::count, filterWeight, NUM_PINK, pi, pinkCaracteristic, PinkCaracteristic::pixel, and prevCameraMatrixUninitialized. |
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 1831 of file SlamImageProcessor.cpp. References SlamBeaconDetector::analyzeColorTable(), InMessage::getMessageID(), and idColorTable64. |
Here is the call graph for this function:

|
|
The function scans columns for line points.
Definition at line 533 of file SlamImageProcessor.cpp. References Geometry::Line::base, Image::cameraInfo, clusterRobots(), Geometry::Line::direction, Geometry::getIntersectionOfLines(), Geometry::getIntersectionPointsOfLineAndRectangle(), ImageInfo::horizon, ImageInfo::maxImageCoordinates, 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 656 of file SlamImageProcessor.cpp. References Geometry::Line::base, Geometry::Line::direction, Geometry::getIntersectionPointsOfLineAndRectangle(), ImageInfo::horizon, 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 1561 of file SlamImageProcessor.cpp. References Vector2< V >::abs(), Vector2< int >::abs(), PlayersPercept::addBluePlayer(), PlayersPercept::addRedPlayer(), Geometry::calculatePointOnField(), Image::cameraInfo, SinglePlayerPercept::directionOnField, getCoords(), SinglePlayerPercept::offsetOnField, LinesPercept::points, 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 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 1629 of file SlamImageProcessor.cpp. References Vector2< double >::abs(), PlayersPercept::bluePlayers, filterLinesPercept(), PlayersPercept::numberOfBluePlayers, PlayersPercept::numberOfRedPlayers, SinglePlayerPercept::offsetOnField, pi, LinesPercept::points, ImageInfo::previousCameraMatrix, 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 1852 of file SlamImageProcessor.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 1731 of file SlamImageProcessor.cpp. References Vector2< V >::abs(), Vector2< V >::angle(), ARROW, Geometry::calculatePointOnField(), Image::cameraInfo, GT2005LineFinder_DeterministicApproach::considerLinePoint(), getCoords(), Image::image, normalize(), pi, pi2, pi_2, point, ImageInfo::previousCameraMatrix, Vector2< V >::rotateLeft(), 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 211 of file SlamImageProcessor.h. References cameraResolutionWidth_ERS7, and Image::image. Referenced by calcEdgeAngle(), clusterRobots(), plot(), and scan(). |
|
||||||||||||
|
Definition at line 1814 of file SlamImageProcessor.cpp. References getCoords(), LINE, Vector2< V >::x, and Vector2< V >::y. |
Here is the call graph for this function:

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 80 of file SlamImageProcessor.h. Referenced by SlamImageProcessor(). |
|
|
Definition at line 82 of file SlamImageProcessor.h. Referenced by execute(), and SlamImageProcessor(). |
|
|
Definition at line 84 of file SlamImageProcessor.h. |
|
|
Definition at line 85 of file SlamImageProcessor.h. |
|
|
Definition at line 86 of file SlamImageProcessor.h. |
|
|
Definition at line 88 of file SlamImageProcessor.h. |
|
|
Factor to convert the pixel coordinate space to the anglular coordinate space.
Definition at line 90 of file SlamImageProcessor.h. |
|
|
Factor to convert the pixel coordinate space to the anglular coordinate space.
Definition at line 90 of file SlamImageProcessor.h. |
|
|
Brightness increase threshold.
Definition at line 92 of file SlamImageProcessor.h. |
|
|
Brightness decrease threshold.
Definition at line 93 of file SlamImageProcessor.h. |
|
|
Number of columns with ball points.
Definition at line 94 of file SlamImageProcessor.h. |
|
|
Number of columns without a ball point.
Definition at line 94 of file SlamImageProcessor.h. |
|
|
Number of columns without a red robot point.
Definition at line 94 of file SlamImageProcessor.h. |
|
|
Number of columns without a blue robot point.
Definition at line 94 of file SlamImageProcessor.h. |
|
|
Number of columns without a opponent goal seen.
Definition at line 94 of file SlamImageProcessor.h. |
|
|
Closest bottom point on the grid.
Definition at line 94 of file SlamImageProcessor.h. |
|
|
First red robot point in a cluster.
Definition at line 100 of file SlamImageProcessor.h. |
|
|
Closest red robot point in a cluster.
Definition at line 100 of file SlamImageProcessor.h. |
|
|
Last red robot point in a cluster.
Definition at line 100 of file SlamImageProcessor.h. |
|
|
First blue robot point in a cluster.
Definition at line 100 of file SlamImageProcessor.h. |
|
|
Closest blue robot point in a cluster.
Definition at line 100 of file SlamImageProcessor.h. |
|
|
Last blue robot point in a cluster.
Definition at line 100 of file SlamImageProcessor.h. |
|
|
First flag point in a cluster.
Definition at line 100 of file SlamImageProcessor.h. |
|
|
Last flag point in a cluster.
Definition at line 100 of file SlamImageProcessor.h. |
|
|
Is the first goal point at the image border?
Definition at line 108 of file SlamImageProcessor.h. |
|
|
Definition at line 109 of file SlamImageProcessor.h. |
|
|
Definition at line 110 of file SlamImageProcessor.h. |
|
|
Definition at line 111 of file SlamImageProcessor.h. |
|
|
Definition at line 112 of file SlamImageProcessor.h. |
|
|
Additional information about the current image.
Definition at line 115 of file SlamImageProcessor.h. |
|
|
Camera matrix without tricot height.
Definition at line 117 of file SlamImageProcessor.h. |
|
|
The tricot matrix of the previous image.
Definition at line 117 of file SlamImageProcessor.h. |
|
|
The color correction tool.
Definition at line 120 of file SlamImageProcessor.h. |
|
|
The beacon detector.
Definition at line 122 of file SlamImageProcessor.h. |
|
|
The goal recognizer.
Definition at line 124 of file SlamImageProcessor.h. Referenced by execute(). |
|
|
The ball specialist.
Definition at line 126 of file SlamImageProcessor.h. |
|
|
The edge specialist.
Definition at line 128 of file SlamImageProcessor.h. |
|
|
Definition at line 130 of file SlamImageProcessor.h. |
|
|
Definition at line 133 of file SlamImageProcessor.h. |
|
|
Definition at line 219 of file SlamImageProcessor.h. |
|
|
Definition at line 220 of file SlamImageProcessor.h. |
|
|
Definition at line 224 of file SlamImageProcessor.h. |
|
|
Definition at line 226 of file SlamImageProcessor.h. |
|
|
Definition at line 227 of file SlamImageProcessor.h. Referenced by execute(), and SlamImageProcessor(). |
|
|
Definition at line 229 of file SlamImageProcessor.h. |
1.3.6