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

Public Types | |
| enum | { maxNumberOfLines = 6, maxNumberOfLinePoints = 60, pointsNeededForLine = 3 } |
Public Member Functions | |
| SlamBorderFinder (const ColorCorrector &colorCorrector, const ColorTable &colorTable) | |
| ~SlamBorderFinder (void) | |
| void | considerLinePoint (Vector2< int > &pointOnLine, Vector2< double > &normalToLine) |
| Add a new LinePont for later consideration. | |
| void | execute (LinesPercept &linesPercept, const CameraMatrix &cameraMatrix, const Image &image, const ImageInfo &imageInfo, const RobotPose &robotPose) |
| Calculates lines and crossings out of the given LinePoints. | |
| void | reset () |
| Resets the lineFinder. | |
| int | getNumberOfLines () |
| Returns the number of found lines. | |
| void | getLine (int number, Vector2< int > &pointOnLine, Vector2< double > &normalToLine) |
| Returns the line by number. | |
Private Member Functions | |
| void | findLineFragments () |
| Calculates line fragments out of the given LinePoints. | |
| void | findLines (LinesPercept &linesPercept, const CameraMatrix &cameraMatrix, const Image &image, const ImageInfo &imageInfo) |
| Calculates lines out of the previously calculated line fragments. | |
| void | findIntersections (LinesPercept &linesPercept, const CameraMatrix &cameraMatrix, const Image &image, const RobotPose &robotPose, const ImageInfo &imageInfo) |
| Calculates crossings out of the previously calculated lines. | |
| void | addCrossingsPercept (const Vector2< double > &intersectionInImage, const Vector2< int > &intersectionOnField, int lineNumber1, int lineNumber2, LinesPercept &linesPercept, const Image &image, const ImageInfo &imageInfo, const CameraMatrix &cameraMatrix, const RobotPose &robotPose) |
| Adds the crossing to the linesPercept including some characteristics found by additional scanning. | |
| void | calculateDirectionAwayFromBorder (LinesPercept &linesPercept, const Image &image, const ImageInfo &imageInfo, const CameraMatrix &cameraMatrix, const RobotPose &robotPose) |
| Calculates the direction away from the border. | |
| bool | linesPerpendicularOnField (int lineNumber1, int lineNumber2, const CameraMatrix &cameraMatrix, const Image &image) |
| Very rough calculation if lines are perpendicular on the field (used for validating crossings). | |
| bool | calculateLineOnField (int lineNumber, Vector2< double > &base, Vector2< double > &direction, const CameraMatrix &cameraMatrix, const Image &image) |
| Calculates the projected line on the field. | |
| bool | calculateLineOnField (const Vector2< int > &baseInImage, const Vector2< double > &directionInImage, Vector2< double > &baseOnField, Vector2< double > &directionOnField, const CameraMatrix &cameraMatrix, const Image &image) |
| Calculates the projected line on the field. | |
| void | doVerificationScan (const Vector2< double > &crossingPoint, const Vector2< double > &directionToScanAt, const Vector2< double > &scanningDirection, int lineSize, LinesPercept::CrossingCharacteristic &result, const CameraMatrix &cameraMatrix, const Image &image) |
| Calculates the projected line on the field. | |
Private Attributes | |
| int | numberOfLines |
| LineFragment * | lines |
| int | numberOfLineFragments |
| bool | lineFragmentAlreadyConsidered [maxNumberOfLines *2] |
| LineFragment * | lineFragments |
| const ColorCorrector & | colorCorrector |
| const ColorTable & | colorTable |
| LinePoint | linePoints [maxNumberOfLinePoints] |
| int | numberOfLinePoints |
| double | normDistance |
| double | normProjection |
| double | normProjectionPerpendicularToHorizon |
|
|
Definition at line 76 of file SlamBorderFinder.h. |
|
||||||||||||
|
Definition at line 12 of file SlamBorderFinder.cpp. |
|
|
Definition at line 20 of file SlamBorderFinder.cpp. |
|
||||||||||||
|
Add a new LinePont for later consideration.
Definition at line 31 of file SlamBorderFinder.cpp. References SlamBorderFinder::LinePoint::belongsToLineNo, SlamBorderFinder::LinePoint::normalToLine, and SlamBorderFinder::LinePoint::pointOnLine. Referenced by SlamImageProcessor::scan(). |
|
||||||||||||||||||||||||
|
Calculates lines and crossings out of the given LinePoints.
Definition at line 47 of file SlamBorderFinder.cpp. References calculateDirectionAwayFromBorder(), DEBUG_DRAWING_FINISHED, findIntersections(), findLineFragments(), findLines(), and NDECLARE_DEBUGDRAWING. Referenced by SlamImageProcessor::execute(). |
Here is the call graph for this function:

|
|
Resets the lineFinder.
Definition at line 24 of file SlamBorderFinder.cpp. Referenced by SlamImageProcessor::execute(). |
|
|
Returns the number of found lines.
Definition at line 767 of file SlamBorderFinder.cpp. |
|
||||||||||||||||
|
Returns the line by number.
Definition at line 772 of file SlamBorderFinder.cpp. References SlamBorderFinder::LineFragment::base, SlamBorderFinder::LineFragment::normal, Vector2< double >::x, Vector2< int >::x, Vector2< V >::x, Vector2< double >::y, Vector2< int >::y, and Vector2< V >::y. Referenced by findLines(). |
|
|
Calculates line fragments out of the given LinePoints.
Definition at line 68 of file SlamBorderFinder.cpp. References SlamBorderFinder::LineFragment::averageStep, SlamBorderFinder::LineFragment::base, SlamBorderFinder::LinePoint::belongsToLineNo, SlamBorderFinder::LineFragment::end, SlamBorderFinder::LineFragment::lineFragmentAlreadyConsidered, SlamBorderFinder::LineFragment::normal, Vector2< V >::normalize(), SlamBorderFinder::LinePoint::normalToLine, pi_4, Vector2< V >::rotateLeft(), SlamBorderFinder::LineFragment::start, Vector2< double >::x, Vector2< V >::x, and Vector2< V >::y. Referenced by execute(). |
Here is the call graph for this function:

|
||||||||||||||||||||
|
Calculates lines out of the previously calculated line fragments.
Definition at line 229 of file SlamBorderFinder.cpp. References SlamBorderFinder::LineFragment::averageStep, SlamBorderFinder::LineFragment::base, Image::cameraInfo, Geometry::Line::direction, SlamBorderFinder::LineFragment::end, Geometry::getIntersectionPointsOfLineAndRectangle(), getLine(), ImageInfo::horizon, SlamBorderFinder::LineFragment::lineFragmentAlreadyConsidered, max, SlamBorderFinder::LineFragment::normal, Vector2< double >::normalize(), Vector2< V >::normalize(), pi_4, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< double >::rotateLeft(), SlamBorderFinder::LineFragment::start, Vector2< int >::x, Vector2< V >::x, Vector2< double >::x, Vector2< int >::y, and Vector2< V >::y. Referenced by execute(). |
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
Calculates crossings out of the previously calculated lines.
Definition at line 384 of file SlamBorderFinder.cpp. References Vector2< V >::abs(), SlamBorderFinder::LineFragment::base, Geometry::calculatePointOnField(), Image::cameraInfo, direction, Geometry::getIntersectionOfLines(), linesPerpendicularOnField(), SlamBorderFinder::LineFragment::normal, Vector2< double >::normalize(), Geometry::relative2FieldCoord(), Vector2< double >::rotateLeft(), Vector2< double >::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:

|
||||||||||||||||||||||||||||||||||||||||
|
Adds the crossing to the linesPercept including some characteristics found by additional scanning.
Definition at line 432 of file SlamBorderFinder.cpp. References Vector2< V >::abs(), calculateLineOnField(), Geometry::calculateLineSize(), Image::cameraInfo, doVerificationScan(), LinesPercept::lineCrossings, LinesPercept::maxNumberOfLineCrossings, SlamBorderFinder::LineFragment::normal, Vector2< V >::normalize(), LinesPercept::numberOfLineCrossings, pi2, pi_2, pi_4, Geometry::relative2FieldCoord(), CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::rotateRight(), Vector2< V >::x, and Vector2< V >::y. |
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
Calculates the direction away from the border.
Definition at line 667 of file SlamBorderFinder.cpp. References Vector2< V >::abs(), calculateLineOnField(), NARROW, Vector2< V >::normalize(), Geometry::relative2FieldCoord(), Vector2< V >::rotateRight(), Pose2D::translation, Vector2< double >::x, Vector2< V >::x, Vector2< double >::y, and Vector2< V >::y. Referenced by execute(). |
Here is the call graph for this function:

|
||||||||||||||||||||
|
Very rough calculation if lines are perpendicular on the field (used for validating crossings).
Definition at line 781 of file SlamBorderFinder.cpp. References calculateLineOnField(). Referenced by findIntersections(). |
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
Calculates the projected line on the field.
Definition at line 795 of file SlamBorderFinder.cpp. References SlamBorderFinder::LineFragment::base, Geometry::calculatePointOnField(), Image::cameraInfo, SlamBorderFinder::LineFragment::normal, Vector2< double >::normalize(), Vector2< double >::x, Vector2< V >::x, Vector2< V >::y, Vector2< double >::y, and Vector2< int >::y. Referenced by addCrossingsPercept(), calculateDirectionAwayFromBorder(), and linesPerpendicularOnField(). |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||
|
Calculates the projected line on the field.
Definition at line 813 of file SlamBorderFinder.cpp. References Geometry::calculatePointOnField(), Image::cameraInfo, Vector2< V >::normalize(), Vector2< V >::x, and Vector2< V >::y. |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||
|
Calculates the projected line on the field.
Definition at line 830 of file SlamBorderFinder.cpp. References Image::cameraInfo, COLOR_CLASS, ColorCorrector::correct(), BresenhamLineScan::getNext(), Image::image, max, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::x, and Vector2< V >::y. Referenced by addCrossingsPercept(). |
Here is the call graph for this function:

|
|
Definition at line 237 of file SlamBorderFinder.h. |
|
|
Definition at line 239 of file SlamBorderFinder.h. |
|
|
Definition at line 244 of file SlamBorderFinder.h. |
|
|
Definition at line 245 of file SlamBorderFinder.h. |
|
|
Definition at line 247 of file SlamBorderFinder.h. |
|
|
Definition at line 250 of file SlamBorderFinder.h. |
|
|
Definition at line 251 of file SlamBorderFinder.h. |
|
|
Definition at line 252 of file SlamBorderFinder.h. |
|
|
Definition at line 253 of file SlamBorderFinder.h. |
|
|
Definition at line 254 of file SlamBorderFinder.h. |
|
|
Definition at line 255 of file SlamBorderFinder.h. |
|
|
Definition at line 256 of file SlamBorderFinder.h. |
1.3.6