#include <GT2004BeaconDetector.h>
Definition at line 27 of file GT2004BeaconDetector.h.
anonymous enum |
anonymous enum [private] |
Definition at line 125 of file GT2004BeaconDetector.h.
GT2004BeaconDetector::GT2004BeaconDetector | ( | const Image & | image, | |
const CameraMatrix & | cameraMatrix, | |||
const CameraMatrix & | prevCameraMatrix, | |||
const ImageInfo & | imageInf, | |||
const ColorTable & | colorTable, | |||
const ColorCorrector & | colorCorrector, | |||
LandmarksPercept & | landmarksPercept | |||
) |
Constructor
Definition at line 32 of file GT2004BeaconDetector.cpp.
bool GT2004BeaconDetector::addCandidate | ( | const Run & | pinkRun | ) | [private] |
Adds a pink run to the list of candidates
pinkRun | A pink run |
Definition at line 183 of file GT2004BeaconDetector.cpp.
References beaconCandidates, Run::end, MAX_NUMBER_OF_PINK_RUNS, numOfBeaconCandidates, Run::scanLineStart, and Run::start.
Referenced by scanForPink().
void GT2004BeaconDetector::analyzeBeacon | ( | const Vector2< double > & | left, | |
const double | pinkRunWidth | |||
) | [private] |
Tries to detect a beacon near a pink part
Definition at line 393 of file GT2004BeaconDetector.cpp.
References Vector2< V >::angle(), Drawings::black, Drawings::blue, cameraMatrix, Geometry::clipPointInsideRectange(), colorTable, Geometry::Line::direction, DOT, flagSpecialist, ImageInfo::horizon, image, imageInf, int(), ImageInfo::maxImageCoordinates, minFlagConfidence, Flag::pinkAboveSkyblue, Flag::pinkAboveYellow, scanForBeaconEdges(), GT2004FlagSpecialist::searchFlags(), skyblue, Flag::skyblueAbovePink, Vector2< V >::x, Vector2< V >::y, yellow, and Flag::yellowAbovePink.
void GT2004BeaconDetector::analyzeColorTable | ( | ) |
Gains information about pink from the current color table
Definition at line 883 of file GT2004BeaconDetector.cpp.
References colorTable, minPinkUValue, pink, and Vector3< V >::y.
Referenced by GT2004ImageProcessor::GT2004ImageProcessor(), and GT2004ImageProcessor::handleMessage().
void GT2004BeaconDetector::clusterPinkBeaconParts | ( | ) | [private] |
Clusters the pink elements to find the pink beacon parts
Definition at line 203 of file GT2004BeaconDetector.cpp.
References Vector2< V >::angle(), beaconCandidates, Geometry::Line::direction, ImageInfo::horizon, imageInf, numOfBeaconCandidates, TransformedRun::start, transformedCandidates, Matrix2x2< V >::transpose(), and Vector2< V >::x.
void GT2004BeaconDetector::execute | ( | ) |
Executes the beacon detection
Definition at line 60 of file GT2004BeaconDetector.cpp.
References Geometry::Line::base, Geometry::Line::direction, dist(), flagSpecialist, Geometry::getIntersectionPointsOfLineAndRectangle(), Drawings::gray, ImageInfo::horizon, horizontalBaseOffset, horizontalOffsetModifier, image, imageInf, GT2004FlagSpecialist::init(), LINE, ImageInfo::maxImageCoordinates, numOfBeaconCandidates, numOfHorizontalScanLineBelow, Drawings::ps_dash, scanForPink(), and ImageInfo::vertLine.
Referenced by GT2004ImageProcessor::execute().
int GT2004BeaconDetector::scanForBeaconEdges | ( | const Vector2< int > & | position, | |
const double | pinkRunWidth, | |||
Flag::FlagType & | flagType, | |||
Vector2< int > & | topEdge, | |||
Vector2< int > & | bottomEdge | |||
) | [private] |
Looks for the vertical edges and the color type of a beacon
Definition at line 492 of file GT2004BeaconDetector.cpp.
References Vector2< V >::abs(), Vector2< V >::angle(), Geometry::Line::base, Drawings::black, Drawings::blue, cameraMatrix, Geometry::clipPointInsideRectange(), COLOR_CLASS, ColorClasses::colorClassToDrawingsColor(), colorTable, ColorCorrector::correct(), Geometry::Line::direction, DOT, flagSpecialist, Geometry::getIntersectionPointsOfLineAndRectangle(), Drawings::gray, gray, highReliability, ImageInfo::horizon, Image::image, image, imageInf, lowReliability, ImageInfo::maxImageCoordinates, mediumReliability, noColor, pink, Drawings::pink, Flag::pinkAboveSkyblue, Flag::pinkAboveYellow, projectionAspectRatio, Drawings::red, scanForBeaconPart(), GT2004FlagSpecialist::searchFlags(), skyblue, Flag::skyblueAbovePink, ImageInfo::vertLine, Drawings::white, white, Vector2< V >::x, Vector2< V >::y, Drawings::yellow, yellow, and Flag::yellowAbovePink.
Referenced by analyzeBeacon().
bool GT2004BeaconDetector::scanForBeaconPart | ( | const Vector2< int > & | start, | |
const Vector2< int > & | end, | |||
Vector2< int > & | position, | |||
Vector2< int > & | edge, | |||
colorClass & | color | |||
) | [private] |
Scans for one other beacon part
Definition at line 837 of file GT2004BeaconDetector.cpp.
References Drawings::black, COLOR_CLASS, SUSANEdgeDetectionLite::componentB, SUSANEdgeDetectionLite::componentC, ColorCorrector::correct(), DOT, edgeDetectionU, edgeDetectionV, edgeScanDepth, BresenhamLineScan::getNext(), Image::image, image, BresenhamLineScan::init(), SUSANEdgeDetectionLite::isEdgePoint(), noColor, BresenhamLineScan::numberOfPixels, orange, Drawings::orange, Vector2< V >::x, and Vector2< V >::y.
Referenced by scanForBeaconEdges().
void GT2004BeaconDetector::scanForPink | ( | const Vector2< int > & | start, | |
const Vector2< int > & | end | |||
) | [private] |
Scans along a line
Definition at line 111 of file GT2004BeaconDetector.cpp.
References addCandidate(), COLOR_CLASS, ColorCorrector::correct(), Run::end, Image::image, image, BresenhamLineScan::init(), Run::length, LINE, minPinkRunLength, minPinkUValue, BresenhamLineScan::numberOfPixels, Drawings::pink, pink, Drawings::ps_solid, Run::scanLineStart, Run::start, U, V, Vector2< V >::x, Vector2< V >::y, and Y.
Referenced by execute().
Run GT2004BeaconDetector::beaconCandidates[MAX_NUMBER_OF_PINK_RUNS] [private] |
The list of candidates
Definition at line 68 of file GT2004BeaconDetector.h.
Referenced by addCandidate(), and clusterPinkBeaconParts().
const CameraMatrix& GT2004BeaconDetector::cameraMatrix [private] |
The camera matrix
Definition at line 56 of file GT2004BeaconDetector.h.
Referenced by analyzeBeacon(), and scanForBeaconEdges().
const double GT2004BeaconDetector::clusteringAspectRatio [private] |
The maximum vertical distance of scanlines to be clustered, over the estimated merged horizontal distance (half beacon aspect ratio should be 1:1)
Definition at line 85 of file GT2004BeaconDetector.h.
const int GT2004BeaconDetector::clusteringDistanceTolerance [private] |
The maximum distance between the merged runs
Definition at line 80 of file GT2004BeaconDetector.h.
const ColorCorrector& GT2004BeaconDetector::colorCorrector [private] |
The color corrector
Definition at line 100 of file GT2004BeaconDetector.h.
const ColorTable& GT2004BeaconDetector::colorTable [private] |
The color table
Definition at line 62 of file GT2004BeaconDetector.h.
Referenced by analyzeBeacon(), analyzeColorTable(), and scanForBeaconEdges().
const SUSANEdgeDetectionLite GT2004BeaconDetector::edgeDetectionU [private] |
Edge detection operators (U and V components) used to find the boundaries of flags
Definition at line 50 of file GT2004BeaconDetector.h.
Referenced by scanForBeaconPart().
const SUSANEdgeDetectionLite GT2004BeaconDetector::edgeDetectionV [private] |
const int GT2004BeaconDetector::edgeScanDepth [private] |
The maximum number of pixels which are examined after an edge response has been found for determining the color beyond the edge
Definition at line 91 of file GT2004BeaconDetector.h.
Referenced by scanForBeaconPart().
A flag specialist
Definition at line 98 of file GT2004BeaconDetector.h.
Referenced by analyzeBeacon(), execute(), and scanForBeaconEdges().
const double GT2004BeaconDetector::horizontalBaseOffset [private] |
The base offset for horizontal scan lines
Definition at line 72 of file GT2004BeaconDetector.h.
Referenced by execute().
const double GT2004BeaconDetector::horizontalOffsetModifier [private] |
The growth factor of the distance between two scan lines
Definition at line 78 of file GT2004BeaconDetector.h.
Referenced by execute().
const Image& GT2004BeaconDetector::image [private] |
The image
Definition at line 54 of file GT2004BeaconDetector.h.
Referenced by analyzeBeacon(), execute(), scanForBeaconEdges(), scanForBeaconPart(), and scanForPink().
const ImageInfo& GT2004BeaconDetector::imageInf [private] |
Additional Image information
Definition at line 60 of file GT2004BeaconDetector.h.
Referenced by analyzeBeacon(), clusterPinkBeaconParts(), execute(), and scanForBeaconEdges().
The landmarks percept
Definition at line 64 of file GT2004BeaconDetector.h.
const double GT2004BeaconDetector::minFlagConfidence [private] |
A confidence threshold used to determine if a target beacon, whose type is not completely clear, can be accepted or not
Definition at line 96 of file GT2004BeaconDetector.h.
Referenced by analyzeBeacon().
const int GT2004BeaconDetector::minPinkRunLength [private] |
The minimum length of a pink run
Definition at line 82 of file GT2004BeaconDetector.h.
Referenced by scanForPink().
unsigned char GT2004BeaconDetector::minPinkUValue [private] |
The minimum U channel value of a pink pixel
Definition at line 93 of file GT2004BeaconDetector.h.
Referenced by analyzeColorTable(), and scanForPink().
int GT2004BeaconDetector::numOfBeaconCandidates [private] |
The number of possible beacons
Definition at line 66 of file GT2004BeaconDetector.h.
Referenced by addCandidate(), clusterPinkBeaconParts(), and execute().
const int GT2004BeaconDetector::numOfHorizontalScanLineAbove [private] |
The number of horizontal scan lines above the horizon
Definition at line 74 of file GT2004BeaconDetector.h.
const int GT2004BeaconDetector::numOfHorizontalScanLineBelow [private] |
The number of horizontal scan lines below the horizon
Definition at line 76 of file GT2004BeaconDetector.h.
Referenced by execute().
const CameraMatrix& GT2004BeaconDetector::prevCameraMatrix [private] |
The previous camera matrix
Definition at line 58 of file GT2004BeaconDetector.h.
const double GT2004BeaconDetector::projectionAspectRatio [private] |
The minimum value for the ratio of the 2 dimensions of the pink part of the beacon, to be used for projection on the unknown colored part
Definition at line 88 of file GT2004BeaconDetector.h.
Referenced by scanForBeaconEdges().
TransformedRun GT2004BeaconDetector::transformedCandidates[MAX_NUMBER_OF_PINK_RUNS] [private] |
A buffer for transformed candidates
Definition at line 70 of file GT2004BeaconDetector.h.
Referenced by clusterPinkBeaconParts().