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


Helpers for grid drawing | |
| void | plot (const unsigned char *p, Drawings::Color color) |
| const unsigned char * | last |
| Drawings::Color | lineColor |
Public Member Functions | |
| VLCImageProcessor (const ImageProcessorInterfaces &interfaces) | |
| Constructor. | |
| ~VLCImageProcessor () | |
| Destructor. | |
| 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 (??). | |
| 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 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 (colorCorrected2) | |
| 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. | |
| 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 |
| VLCClustering | ballClustering |
| VLCLineFinder_DeterministicApproach | lineFinder |
| VLCCenterCircleFinder | circleFinder |
| CameraMatrix | cmTricot |
| Camera matrix without tricot height. | |
| CameraMatrix | prevCmTricot |
| The tricot matrix of the previous image. | |
| ColorCorrector | colorCorrector |
| The color correction tool. | |
| VLCGoalRecognizer | goalSpecialistY |
| Goal specialists to recognize the goals (one for each color). | |
| VLCGoalRecognizer | goalSpecialistB |
| Goal specialists to recognize the goals (one for each color). | |
| VLCBeaconDetector | beaconDetector |
| The beacon detector. | |
| VLCBallSpecialist | ballSpecialist |
| The ball specialist. | |
| double | angleBetweenDirectionOfViewAndGround |
| int | numberOfScannedPixels |
| double | averageY |
| double | averageU |
| double | averageV |
| RingBuffer< double, 5 > | averageYBuffer |
| ColorTable64 * | colorTableVeryDark |
| ColorTable64 * | colorTableDark |
| ColorTable64 * | colorTableMedium |
| ColorTable64 * | colorTableBright |
| ColorTable * | bestColorTable |
| double | vd2d |
| double | d2m |
| double | m2b |
| 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 52 of file VLCImageProcessor.h.
|
|
Constructor.
Definition at line 40 of file VLCImageProcessor.cpp. References VLCBeaconDetector::analyzeColorTable(), averageYBuffer, colorTableBright, colorTableDark, colorTableMedium, colorTableVeryDark, d2m, InStream< InFile, InConfig >::eof(), InFile::exists(), getLocation(), RingBuffer< double, 5 >::init(), m2b, pi, ColorTable64::setFormat(), and vd2d. |
Here is the call graph for this function:

|
|
Destructor.
Definition at line 65 of file VLCImageProcessor.h. References colorTableBright, colorTableDark, colorTableMedium, and colorTableVeryDark. |
|
Here is the call graph for this function:

|
|
Handles an incoming message.
Reimplemented from Module. Definition at line 2168 of file VLCImageProcessor.cpp. References VLCBeaconDetector::analyzeColorTable(), 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 668 of file VLCImageProcessor.cpp. References ASSERT, Geometry::Line::base, Matrix2x2< double >::c, Geometry::Line::direction, ImageInfo::distanceTopLeftCorner, Geometry::getIntersectionPointsOfLineAndRectangle(), ImageInfo::horizon, 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 857 of file VLCImageProcessor.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 1670 of file VLCImageProcessor.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 execute(). |
Here is the call graph for this function:

|
|
The function filters the percepts, i.e. it removes potential misreadings. Definition at line 1738 of file VLCImageProcessor.cpp. References Vector2< double >::abs(), Goal::angle, Flag::angle, PlayersPercept::bluePlayers, Goal::color, filterLinesPercept(), LandmarksPercept::flags, LandmarksPercept::goals, minAngleBetweenFlagAndGoal, PlayersPercept::numberOfBluePlayers, LandmarksPercept::numberOfFlags, LandmarksPercept::numberOfGoals, PlayersPercept::numberOfRedPlayers, SinglePlayerPercept::offsetOnField, pi, LinesPercept::points, PlayersPercept::redPlayers, Flag::type, Vector2< double >::x, and Vector2< double >::y. |
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 2189 of file VLCImageProcessor.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 2068 of file VLCImageProcessor.cpp. References Vector2< V >::abs(), Vector2< V >::angle(), ARROW, Geometry::calculatePointOnField(), Image::cameraInfo, VLCLineFinder_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 231 of file VLCImageProcessor.h. References cameraResolutionWidth_ERS7, and Image::image. Referenced by calcEdgeAngle(), clusterRobots(), plot(), and scan(). |
|
||||||||||||
|
Definition at line 2151 of file VLCImageProcessor.cpp. References getCoords(), LINE, 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 25 of file VLCImageProcessor.cpp. Referenced by scanColumns(). |
|
|
Definition at line 26 of file VLCImageProcessor.cpp. Referenced by scanColumns(). |
|
|
Definition at line 27 of file VLCImageProcessor.cpp. Referenced by scanColumns(). |
|
|
Definition at line 28 of file VLCImageProcessor.cpp. Referenced by scanColumns(). |
|
|
Definition at line 37 of file VLCImageProcessor.cpp. Referenced by filterPercepts(). |
|
|
Factor to convert the pixel coordinate space to the anglular coordinate space.
Definition at line 127 of file VLCImageProcessor.h. |
|
|
Factor to convert the pixel coordinate space to the anglular coordinate space.
Definition at line 127 of file VLCImageProcessor.h. |
|
|
Brightness increase threshold.
Definition at line 129 of file VLCImageProcessor.h. |
|
|
Brightness decrease threshold.
Definition at line 130 of file VLCImageProcessor.h. |
|
|
Number of columns with ball points.
Definition at line 131 of file VLCImageProcessor.h. |
|
|
Number of columns without a ball point.
Definition at line 131 of file VLCImageProcessor.h. |
|
|
Number of columns without a red robot point.
Definition at line 131 of file VLCImageProcessor.h. |
|
|
Number of columns without a blue robot point.
Definition at line 131 of file VLCImageProcessor.h. |
|
|
Number of columns without a opponent goal seen.
Definition at line 131 of file VLCImageProcessor.h. |
|
|
Closest bottom point on the grid.
Definition at line 131 of file VLCImageProcessor.h. |
|
|
First red robot point in a cluster.
Definition at line 137 of file VLCImageProcessor.h. |
|
|
Closest red robot point in a cluster.
Definition at line 137 of file VLCImageProcessor.h. |
|
|
Last red robot point in a cluster.
Definition at line 137 of file VLCImageProcessor.h. |
|
|
First blue robot point in a cluster.
Definition at line 137 of file VLCImageProcessor.h. |
|
|
Closest blue robot point in a cluster.
Definition at line 137 of file VLCImageProcessor.h. |
|
|
Last blue robot point in a cluster.
Definition at line 137 of file VLCImageProcessor.h. |
|
|
First flag point in a cluster.
Definition at line 137 of file VLCImageProcessor.h. |
|
|
Last flag point in a cluster.
Definition at line 137 of file VLCImageProcessor.h. |
|
|
Is the first goal point at the image border?
Definition at line 145 of file VLCImageProcessor.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 151 of file VLCImageProcessor.h. |
|
|
Definition at line 154 of file VLCImageProcessor.h. |
|
|
Definition at line 155 of file VLCImageProcessor.h. |
|
|
Definition at line 156 of file VLCImageProcessor.h. |
|
|
Definition at line 157 of file VLCImageProcessor.h. |
|
|
Definition at line 158 of file VLCImageProcessor.h. |
|
|
Camera matrix without tricot height.
Definition at line 160 of file VLCImageProcessor.h. |
|
|
The tricot matrix of the previous image.
Definition at line 160 of file VLCImageProcessor.h. |
|
|
The color correction tool.
Definition at line 164 of file VLCImageProcessor.h. |
|
|
Goal specialists to recognize the goals (one for each color).
Definition at line 167 of file VLCImageProcessor.h. |
|
|
Goal specialists to recognize the goals (one for each color).
Definition at line 167 of file VLCImageProcessor.h. |
|
|
The beacon detector.
Definition at line 170 of file VLCImageProcessor.h. |
|
|
The ball specialist.
Definition at line 171 of file VLCImageProcessor.h. |
|
|
Definition at line 239 of file VLCImageProcessor.h. |
|
|
Definition at line 240 of file VLCImageProcessor.h. |
|
|
Definition at line 244 of file VLCImageProcessor.h. |
|
|
Definition at line 246 of file VLCImageProcessor.h. |
|
|
Definition at line 249 of file VLCImageProcessor.h. |
|
|
Definition at line 249 of file VLCImageProcessor.h. |
|
|
Definition at line 249 of file VLCImageProcessor.h. |
|
|
Definition at line 250 of file VLCImageProcessor.h. Referenced by execute(), and VLCImageProcessor(). |
|
|
Definition at line 251 of file VLCImageProcessor.h. Referenced by execute(), VLCImageProcessor(), and ~VLCImageProcessor(). |
|
|
Definition at line 252 of file VLCImageProcessor.h. Referenced by execute(), VLCImageProcessor(), and ~VLCImageProcessor(). |
|
|
Definition at line 253 of file VLCImageProcessor.h. Referenced by execute(), VLCImageProcessor(), and ~VLCImageProcessor(). |
|
|
Definition at line 254 of file VLCImageProcessor.h. Referenced by execute(), VLCImageProcessor(), and ~VLCImageProcessor(). |
|
|
Definition at line 255 of file VLCImageProcessor.h. |
|
|
Definition at line 256 of file VLCImageProcessor.h. Referenced by execute(), and VLCImageProcessor(). |
|
|
Definition at line 256 of file VLCImageProcessor.h. Referenced by execute(), and VLCImageProcessor(). |
|
|
Definition at line 256 of file VLCImageProcessor.h. Referenced by execute(), and VLCImageProcessor(). |
|
|
Definition at line 259 of file VLCImageProcessor.h. |
1.3.6