#include <VLCGoalRecognizer.h>
Collaboration diagram for VLCGoalRecognizer:

Public Member Functions | |
| VLCGoalRecognizer (colorClass color, const ImageProcessorInterfaces &interfaces, const ColorCorrector &colorCorrector, const ImageInfo &horizonInfo) | |
| Initializes the VLCGoadRecognizer. | |
| ~VLCGoalRecognizer () | |
| Destructor. | |
| void | notifyAboutNewImage () |
| This method has to be called before a new image is scanned. | |
| void | notifyAboutFinish () |
| void | setBestColorTable (ColorTable *newBestColorTable) |
| void | notifyAboutNewScanline (const Vector2< int > &scanLineStart) |
| void | inspectPixel (const Vector2< int > &point, const colorClass &color) |
Private Types | |
| enum | EdgeType { none = 0, edge, deviationWithoutEdge, imageBorder } |
| TODO: Write Summary. More... | |
| enum | ImageBorderSide { topBorder = 0, leftBorder = 1, bottomBorder = 2, rightBorder = 3, noBorder } |
| TODO: Write Summary. More... | |
| enum | FreeSide { noFreeSide, leftSide, rightSide, bothSides } |
| enum | { lockAreaStackSize = 2 } |
| Stack containing the locked area. More... | |
| enum | { maxHypothesises = 5 } |
| Detected goal hypothesises. More... | |
Private Member Functions | |
| bool | inspectNeighbourhood (const Vector2< int > &point) |
| void | analyzeGoal (Vector2< int > startPoint) |
| point copied on purpose | |
| void | analyzeGoalpost (VLCGoalRecognizer::EdgeDetector *detector, const Vector2< double > &directionOfEdge, bool leftGoalpost, Vector2< int > &focus, VLCGoalRecognizer::Goalpost &result, bool *imageBorderScanned) |
| direction of edge normalized!! imageBorderScanned: to prevent that one image border is scanned again, never necessary in correct goal case | |
| void | scanCrossBar (VLCGoalRecognizer::EdgeDetector *detector, Vector2< int > &focus, VLCGoalRecognizer::GoalHypothesis &result, bool *imageBorderScanned) |
| VLCGoalRecognizer::EdgeType | detectEdgeTwice (VLCGoalRecognizer::EdgeDetector *detector, Vector2< int > &focus, BresenhamLineScan &scanLine, const Vector2< int > &scanLineOffset, int maxScanLength, EdgePointList &edgePoints) |
| scans first from focus+scanLineOffset, using detector[0]!! | |
| VLCGoalRecognizer::EdgeType | detectEdge (VLCGoalRecognizer::EdgeDetector &detector, Vector2< int > &focus, BresenhamLineScan &direction, int maxScanLength, int &pixelsUntilEdge) |
| VLCGoalRecognizer::EdgeType | scanAlongLine (VLCGoalRecognizer::EdgeDetector *detector, Vector2< int > &focus, BresenhamLineScan &scanLine, const Vector2< int > &scanLineOffset, int maximumScan, int &pixelsScanned) |
| VLCGoalRecognizer::ImageBorderSide | scanOnImageBorder (VLCGoalRecognizer::EdgeDetector *detector, Vector2< int > &focus, const Vector2< double > &targetDirection, int maxBorderDistance, bool *scannedSides) |
| case noBorder mustn't be ignored -> scanning hasn't been done before or doesn't make sense | |
| bool | detectGreenBelowGoalpost (Vector2< int > bottomPoint, const Vector2< double > &directionOfEdge, int goalpostHeight) |
| direction of edge normalized!! bottomPoint copied on purpose!! | |
| bool | nearImageBorder (const Vector2< int > &point, int maxDistance) |
| Returns true if the point is within one pixel distance to the image border. | |
| void | mergeFragments (bool *deletedHypothesises) |
| void | interpretResults (VLCGoalRecognizer::EdgeDetector *detector, bool *deletedHypothesises) |
| VLCGoalRecognizer::FreeSide | detectFreePartOfGoal (VLCGoalRecognizer::EdgeDetector *detector, const VLCGoalRecognizer::GoalHypothesis &goal, int goalHeight, int &freeWidth, Vector2< int > &otherSide) |
| void | lockArea (double x, double y, bool onGreen) |
| void | calculateLockedPixels (const Vector2< int > &scanLineStart) |
| void | recalculateLockedPixels (const Vector2< int > ¤tPoint) |
| DECLARE_DEBUG_IMAGE (imageProcessorGoal1) | |
| Declare raster image which will take debug information. | |
| DECLARE_DEBUG_IMAGE (imageProcessorGoal2) | |
Private Attributes | |
| const colorClass | goalColor |
| The colour class of the goal to be detected by this object. | |
| const ImageProcessorInterfaces & | interfaces |
| Collection of references to objects that are needed by this object, e.g. | |
| const ImageInfo & | horizonInfo |
| Object containing useful information related to the current horizon. | |
| const ColorCorrector & | colorCorrector |
| Reference to the color correction object. | |
| int | detectionCounter |
| Counter to detect accumulations of goal-coloured pixels. | |
| int | lockedPixels |
| Number of pixels that will not be inspected, because they are inside previously analysed areas. | |
| Vector2< double > | lockAreaStack [lockAreaStackSize] |
| int | lockAreaCount |
| GoalHypothesis | hypothesis [maxHypothesises] |
| int | hypothesisCount |
| ColorTable * | bestColorTable |
Definition at line 60 of file VLCGoalRecognizer.h.
|
|
TODO: Write Summary.
Definition at line 67 of file VLCGoalRecognizer.h. Referenced by detectEdge(), detectEdgeTwice(), VLCGoalRecognizer::EdgePointList::getType(), and scanAlongLine(). |
|
|
TODO: Write Summary.
Definition at line 507 of file VLCGoalRecognizer.h. Referenced by analyzeGoalpost(), and scanOnImageBorder(). |
|
|
Definition at line 516 of file VLCGoalRecognizer.h. Referenced by detectFreePartOfGoal(), and interpretResults(). |
|
|
Stack containing the locked area. This is to prevent that goal-coloured blobs are analysed twice. With inspectPixel being called on pixel from left to right and top to bottom, it is sufficient to store the bottom left point of the locked areas. Definition at line 752 of file VLCGoalRecognizer.h. |
|
|
Detected goal hypothesises.
Definition at line 758 of file VLCGoalRecognizer.h. |
|
||||||||||||||||||||
|
Initializes the VLCGoadRecognizer.
Definition at line 63 of file VLCGoalRecognizer.cpp. |
|
|
Destructor.
Definition at line 537 of file VLCGoalRecognizer.h. |
|
|
This method has to be called before a new image is scanned.
Definition at line 71 of file VLCGoalRecognizer.cpp. References ImageProcessorInterfaces::image, and INIT_DEBUG_IMAGE. Referenced by VLCImageProcessor::execute(). |
|
|
Definition at line 111 of file VLCGoalRecognizer.cpp. References DEBUG_DRAWING_FINISHED, interpretResults(), mergeFragments(), and SEND_DEBUG_IMAGE. Referenced by VLCImageProcessor::execute(). |
Here is the call graph for this function:

|
|
Definition at line 550 of file VLCGoalRecognizer.h. Referenced by VLCImageProcessor::execute(). |
|
|
Definition at line 557 of file VLCGoalRecognizer.h. References calculateLockedPixels(). Referenced by VLCImageProcessor::scan(). |
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 568 of file VLCGoalRecognizer.h. References analyzeGoal(), point, recalculateLockedPixels(), STUPID_DEBUG_IMAGE_SET_PIXEL, Vector2< int >::x, and Vector2< int >::y. Referenced by VLCImageProcessor::scan(). |
Here is the call graph for this function:

|
|
Definition at line 91 of file VLCGoalRecognizer.cpp. References CORRECTED_COLOR_CLASS, Image::image, ImageProcessorInterfaces::image, nearImageBorder(), point, Vector2< int >::x, and Vector2< int >::y. |
Here is the call graph for this function:

|
Here is the call graph for this function:

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

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

|
||||||||||||||||||||||||||||
|
scans first from focus+scanLineOffset, using detector[0]!!
Definition at line 591 of file VLCGoalRecognizer.cpp. References VLCGoalRecognizer::EdgePointList::add(), detectEdge(), EdgeType, and BresenhamLineScan::init(). Referenced by analyzeGoalpost(). |
Here is the call graph for this function:

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

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

|
||||||||||||||||||||||||
|
case noBorder mustn't be ignored -> scanning hasn't been done before or doesn't make sense
Definition at line 678 of file VLCGoalRecognizer.cpp. References ASSERT, DOT, ImageBorderSide, LINE, ImageInfo::maxImageCoordinates, scanAlongLine(), sgn, Vector2< V >::x, Vector2< int >::x, Vector2< V >::y, and Vector2< int >::y. Referenced by analyzeGoalpost(), and scanCrossBar(). |
Here is the call graph for this function:

|
||||||||||||||||
|
direction of edge normalized!! bottomPoint copied on purpose!!
Definition at line 1161 of file VLCGoalRecognizer.cpp. References CORRECTED_COLOR_CLASS, Geometry::Line::direction, BresenhamLineScan::getNext(), Image::image, ImageProcessorInterfaces::image, BresenhamLineScan::init(), max, ImageInfo::maxImageCoordinates, STUPID_DEBUG_IMAGE_SET_PIXEL, ImageInfo::vertLine, Vector2< int >::x, Vector2< double >::x, Vector2< V >::x, Vector2< int >::y, Vector2< double >::y, and Vector2< V >::y. Referenced by analyzeGoalpost(). |
Here is the call graph for this function:

|
||||||||||||
|
Returns true if the point is within one pixel distance to the image border.
Definition at line 694 of file VLCGoalRecognizer.h. References ImageInfo::maxImageCoordinates, point, Vector2< int >::x, and Vector2< int >::y. Referenced by analyzeGoalpost(), inspectNeighbourhood(), and scanCrossBar(). |
|
|
Definition at line 1316 of file VLCGoalRecognizer.cpp. References VLCGoalRecognizer::GoalHypothesis::height, max, and min. Referenced by notifyAboutFinish(). |
|
||||||||||||
Here is the call graph for this function:

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

|
||||||||||||||||
|
Definition at line 1229 of file VLCGoalRecognizer.cpp. References Vector2< double >::x, and Vector2< double >::y. Referenced by analyzeGoal(). |
|
|
Definition at line 1265 of file VLCGoalRecognizer.cpp. References max, ImageInfo::toHorizonAligned(), ImageInfo::toImageCoordinates(), Vector2< V >::x, Vector2< double >::x, Vector2< V >::y, and Vector2< double >::y. Referenced by notifyAboutNewScanline(). |
Here is the call graph for this function:

|
|
Definition at line 1302 of file VLCGoalRecognizer.cpp. References ImageInfo::horizonAlignedYOf(), max, ImageInfo::toImageCoordinates(), Vector2< V >::x, Vector2< V >::y, and Vector2< double >::y. Referenced by inspectPixel(). |
Here is the call graph for this function:

|
|
Declare raster image which will take debug information. NB: due to the f**king macros, I have to declare both images, even though only need one per instance. |
|
|
|
|
|
The colour class of the goal to be detected by this object.
Definition at line 728 of file VLCGoalRecognizer.h. |
|
|
Collection of references to objects that are needed by this object, e.g. the current image, objects used to store the processing results, etc. Definition at line 732 of file VLCGoalRecognizer.h. |
|
|
Object containing useful information related to the current horizon.
Definition at line 735 of file VLCGoalRecognizer.h. |
|
|
Reference to the color correction object.
Definition at line 738 of file VLCGoalRecognizer.h. |
|
|
Counter to detect accumulations of goal-coloured pixels. Used by the method inspectPixel. Definition at line 743 of file VLCGoalRecognizer.h. |
|
|
Number of pixels that will not be inspected, because they are inside previously analysed areas.
Definition at line 747 of file VLCGoalRecognizer.h. |
|
|
Definition at line 753 of file VLCGoalRecognizer.h. |
|
|
Definition at line 754 of file VLCGoalRecognizer.h. |
|
|
Definition at line 759 of file VLCGoalRecognizer.h. |
|
|
Definition at line 760 of file VLCGoalRecognizer.h. |
|
|
Definition at line 771 of file VLCGoalRecognizer.h. |
1.3.6