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

Public Types | |
| enum | { maxNumberOfLines = 6, maxNumberOfLinePoints = 60, pointsNeededForLine = 3 } |
Public Member Functions | |
| GT2005LineFinder_DeterministicApproach (const ColorCorrector &colorCorrector, const ColorTable &colorTable) | |
| ~GT2005LineFinder_DeterministicApproach (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 | execute (LinesPercept &linesPercept, const CameraMatrix &cameraMatrix, const Image &image, const ImageInfo &imageInfo, const RobotPose &robotPose, const bool circleFound, const Vector2< double > &circleOnField) |
| Calculates lines and crossings out of the given LinePoints considering given information about the center circle. | |
| 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. | |
| bool | handleCenterCircle (const CameraMatrix &cameraMatrix, const Image &image, const RobotPose &robotPose) |
| Filters out some line fragments, that may be caused by a center circle. | |
| bool | handleCenterCircle (const Vector2< double > ¢erOnField, const CameraMatrix &cameraMatrix, const Image &image) |
| Filters out line points belonging to the center circle. | |
| void | addCenterCirclePercept (LinesPercept &linesPercept, const CameraMatrix &cameraMatrix, const Image &image) |
| Writes the centerCircle (if found by one of the attempts) to the LinesPercept. | |
| 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. | |
| bool | doVerificationScanForCircle (const Vector2< int > &circleOnFieldRelative, double orientation, const CameraMatrix &cameraMatrix, const Image &image) |
| Verifies if the found circle really is one. | |
Private Attributes | |
| int | numberOfLines |
| LineFragment * | lines |
| int | numberOfLineFragments |
| bool | lineFragmentAlreadyConsidered [maxNumberOfLines *2] |
| LineFragment * | lineFragments |
| Vector2< int > | fromCircleFinder |
| bool | foundByCircleFinder |
| Vector2< int > | fromOwnHandling |
| bool | foundByOwnHandling |
| double | centerCircleOrientation |
| Vector2< double > | lastSeenCircleGlobal |
| double | lastSeenCircleOrientationGlobal |
| int | framesSinceLastSeen |
| int | frameCount |
| int | circleCount |
| const ColorCorrector & | colorCorrector |
| const ColorTable & | colorTable |
| LinePoint | linePoints [maxNumberOfLinePoints] |
| int | numberOfLinePoints |
| double | normDistance |
| double | normProjection |
| double | normProjectionPerpendicularToHorizon |
|
|
Definition at line 95 of file GT2005LineFinder_DeterministicApproach.h. |
|
||||||||||||
|
Definition at line 12 of file GT2005LineFinder_DeterministicApproach.cpp. References circleCount, frameCount, framesSinceLastSeen, and normProjectionPerpendicularToHorizon. |
|
|
Definition at line 24 of file GT2005LineFinder_DeterministicApproach.cpp. |
|
||||||||||||
|
Add a new LinePont for later consideration.
Definition at line 48 of file GT2005LineFinder_DeterministicApproach.cpp. References GT2005LineFinder_DeterministicApproach::LinePoint::belongsToLineNo, linePoints, maxNumberOfLinePoints, GT2005LineFinder_DeterministicApproach::LinePoint::normalToLine, numberOfLinePoints, and GT2005LineFinder_DeterministicApproach::LinePoint::pointOnLine. Referenced by SlamImageProcessor::calcEdgeAngle(), and GT2005ImageProcessor::calcEdgeAngle(). |
|
||||||||||||||||||||||||
|
Calculates lines and crossings out of the given LinePoints.
Definition at line 64 of file GT2005LineFinder_DeterministicApproach.cpp. References addCenterCirclePercept(), DEBUG_DRAWING_FINISHED, findIntersections(), findLineFragments(), findLines(), foundByCircleFinder, handleCenterCircle(), lineFragments, and maxNumberOfLines. Referenced by SlamImageProcessor::execute(), and GT2005ImageProcessor::execute(). |
Here is the call graph for this function:

|
||||||||||||||||||||||||||||||||
|
Calculates lines and crossings out of the given LinePoints considering given information about the center circle.
Definition at line 86 of file GT2005LineFinder_DeterministicApproach.cpp. References addCenterCirclePercept(), DEBUG_DRAWING_FINISHED, findIntersections(), findLineFragments(), findLines(), foundByCircleFinder, fromCircleFinder, handleCenterCircle(), lineFragments, maxNumberOfLines, NDECLARE_DEBUGDRAWING, Vector2< V >::x, Vector2< int >::x, Vector2< V >::y, and Vector2< int >::y. |
Here is the call graph for this function:

|
|
Resets the lineFinder.
Definition at line 28 of file GT2005LineFinder_DeterministicApproach.cpp. References circleCount, foundByCircleFinder, foundByOwnHandling, frameCount, framesSinceLastSeen, numberOfLineFragments, numberOfLinePoints, and numberOfLines. Referenced by SlamImageProcessor::execute(), and GT2005ImageProcessor::execute(). |
|
|
Returns the number of found lines.
Definition at line 1182 of file GT2005LineFinder_DeterministicApproach.cpp. References numberOfLines. |
|
||||||||||||||||
|
Returns the line by number.
Definition at line 1187 of file GT2005LineFinder_DeterministicApproach.cpp. References GT2005LineFinder_DeterministicApproach::LineFragment::base, GT2005LineFinder_DeterministicApproach::LineFragment::normal, Vector2< double >::x, Vector2< int >::x, Vector2< V >::x, Vector2< double >::y, Vector2< int >::y, and Vector2< V >::y. Referenced by findLines(). |
|
Here is the call graph for this function:

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

|
||||||||||||||||||||||||
|
Calculates crossings out of the previously calculated lines.
Definition at line 440 of file GT2005LineFinder_DeterministicApproach.cpp. References Vector2< V >::abs(), addCrossingsPercept(), GT2005LineFinder_DeterministicApproach::LineFragment::base, Geometry::calculatePointOnField(), Image::cameraInfo, direction, Geometry::getIntersectionOfLines(), linesPerpendicularOnField(), maxNumberOfLines, GT2005LineFinder_DeterministicApproach::LineFragment::normal, Vector2< double >::normalize(), numberOfLines, 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 488 of file GT2005LineFinder_DeterministicApproach.cpp. References Vector2< V >::abs(), calculateLineOnField(), Geometry::calculateLineSize(), Image::cameraInfo, CIRCLE, COMPLEX_DRAWING, doVerificationScan(), LINE, LinesPercept::lineCrossings, LinesPercept::maxNumberOfLineCrossings, NCIRCLE, NCOMPLEX_DRAWING, NLINE, GT2005LineFinder_DeterministicApproach::LineFragment::normal, Vector2< V >::normalize(), LinesPercept::numberOfLineCrossings, pi, pi2, pi3_2, pi_2, pi_4, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::rotateRight(), Vector2< V >::x, and Vector2< V >::y. Referenced by findIntersections(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Filters out some line fragments, that may be caused by a center circle. Do only use when no center detection available.
Definition at line 792 of file GT2005LineFinder_DeterministicApproach.cpp. References Vector2< V >::abs(), Geometry::Line::base, calculateLineOnField(), Geometry::calculatePointInImage(), Geometry::calculatePointOnField(), Image::cameraInfo, centerCircleOrientation, CIRCLE, Geometry::Line::direction, doVerificationScanForCircle(), GT2005LineFinder_DeterministicApproach::LineFragment::end, foundByOwnHandling, framesSinceLastSeen, fromOwnHandling, Geometry::getIntersectionOfLines(), lastSeenCircleGlobal, lastSeenCircleOrientationGlobal, LINE, GT2005LineFinder_DeterministicApproach::LineFragment::lineFragmentAlreadyConsidered, lineFragments, maxNumberOfLines, numberOfLineFragments, GT2005LineFinder_DeterministicApproach::LineFragment::numberOfPoints, pi_2, Geometry::relative2FieldCoord(), Vector2< double >::rotateLeft(), Pose2D::rotation, GT2005LineFinder_DeterministicApproach::LineFragment::start, Vector2< int >::x, Vector2< double >::x, Vector2< V >::x, Vector2< double >::y, Vector2< V >::y, and Vector2< int >::y. Referenced by execute(). |
Here is the call graph for this function:

|
||||||||||||||||
|
Filters out line points belonging to the center circle.
Definition at line 772 of file GT2005LineFinder_DeterministicApproach.cpp. References GT2005LineFinder_DeterministicApproach::LinePoint::belongsToLineNo, Geometry::calculatePointOnField(), Image::cameraInfo, linePoints, numberOfLinePoints, GT2005LineFinder_DeterministicApproach::LinePoint::pointOnLine, Vector2< V >::x, Vector2< int >::y, and Vector2< V >::y. |
Here is the call graph for this function:

|
||||||||||||||||
|
Writes the centerCircle (if found by one of the attempts) to the LinesPercept.
Definition at line 1133 of file GT2005LineFinder_DeterministicApproach.cpp. References Geometry::Line::base, calculateLineOnField(), LinesPercept::centerCircle, LinesPercept::centerCircleFound, centerCircleOrientation, Geometry::Line::direction, foundByCircleFinder, foundByOwnHandling, fromCircleFinder, fromOwnHandling, maxNumberOfLines, numberOfLines, pi_2, Vector2< double >::rotateLeft(), Vector2< double >::x, Vector2< int >::x, Vector2< double >::y, and Vector2< int >::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 1196 of file GT2005LineFinder_DeterministicApproach.cpp. References calculateLineOnField(). Referenced by findIntersections(). |
Here is the call graph for this function:

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

|
||||||||||||||||||||||||||||
|
Calculates the projected line on the field.
Definition at line 1228 of file GT2005LineFinder_DeterministicApproach.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 1245 of file GT2005LineFinder_DeterministicApproach.cpp. References Image::cameraInfo, COLOR_CLASS, ColorCorrector::correct(), BresenhamLineScan::getNext(), Image::image, LINE, max, NLINE, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::x, and Vector2< V >::y. Referenced by addCrossingsPercept(). |
Here is the call graph for this function:

|
||||||||||||||||||||
|
Verifies if the found circle really is one.
Definition at line 1385 of file GT2005LineFinder_DeterministicApproach.cpp. References Geometry::calculatePointInImage(), Image::cameraInfo, circleCount, COLOR_CLASS, ColorCorrector::correct(), BresenhamLineScan::getNext(), Image::image, LINE, max, normalize(), BresenhamLineScan::numberOfPixels, pi, pi_2, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Vector2< V >::x, and Vector2< V >::y. Referenced by handleCenterCircle(). |
Here is the call graph for this function:

|
|
Definition at line 291 of file GT2005LineFinder_DeterministicApproach.h. Referenced by addCenterCirclePercept(), findIntersections(), findLines(), getNumberOfLines(), and reset(). |
|
|
Definition at line 293 of file GT2005LineFinder_DeterministicApproach.h. |
|
|
Definition at line 298 of file GT2005LineFinder_DeterministicApproach.h. Referenced by findLineFragments(), findLines(), handleCenterCircle(), and reset(). |
|
|
Definition at line 299 of file GT2005LineFinder_DeterministicApproach.h. |
|
|
Definition at line 301 of file GT2005LineFinder_DeterministicApproach.h. Referenced by execute(), findLineFragments(), findLines(), and handleCenterCircle(). |
|
|
Definition at line 305 of file GT2005LineFinder_DeterministicApproach.h. Referenced by addCenterCirclePercept(), and execute(). |
|
|
Definition at line 306 of file GT2005LineFinder_DeterministicApproach.h. Referenced by addCenterCirclePercept(), execute(), and reset(). |
|
|
Definition at line 307 of file GT2005LineFinder_DeterministicApproach.h. Referenced by addCenterCirclePercept(), and handleCenterCircle(). |
|
|
Definition at line 308 of file GT2005LineFinder_DeterministicApproach.h. Referenced by addCenterCirclePercept(), handleCenterCircle(), and reset(). |
|
|
Definition at line 309 of file GT2005LineFinder_DeterministicApproach.h. Referenced by addCenterCirclePercept(), and handleCenterCircle(). |
|
|
Definition at line 310 of file GT2005LineFinder_DeterministicApproach.h. Referenced by handleCenterCircle(). |
|
|
Definition at line 311 of file GT2005LineFinder_DeterministicApproach.h. Referenced by handleCenterCircle(). |
|
|
Definition at line 312 of file GT2005LineFinder_DeterministicApproach.h. Referenced by GT2005LineFinder_DeterministicApproach(), handleCenterCircle(), and reset(). |
|
|
Definition at line 313 of file GT2005LineFinder_DeterministicApproach.h. Referenced by GT2005LineFinder_DeterministicApproach(), and reset(). |
|
|
Definition at line 313 of file GT2005LineFinder_DeterministicApproach.h. Referenced by doVerificationScanForCircle(), GT2005LineFinder_DeterministicApproach(), and reset(). |
|
|
Definition at line 316 of file GT2005LineFinder_DeterministicApproach.h. |
|
|
Definition at line 317 of file GT2005LineFinder_DeterministicApproach.h. |
|
|
Definition at line 318 of file GT2005LineFinder_DeterministicApproach.h. Referenced by considerLinePoint(), findLineFragments(), and handleCenterCircle(). |
|
|
Definition at line 319 of file GT2005LineFinder_DeterministicApproach.h. Referenced by considerLinePoint(), findLineFragments(), handleCenterCircle(), and reset(). |
|
|
Definition at line 320 of file GT2005LineFinder_DeterministicApproach.h. |
|
|
Definition at line 321 of file GT2005LineFinder_DeterministicApproach.h. |
|
|
Definition at line 322 of file GT2005LineFinder_DeterministicApproach.h. Referenced by findLines(), and GT2005LineFinder_DeterministicApproach(). |
1.3.6