#include <VLCBeaconDetector.h>
Collaboration diagram for VLCBeaconDetector:
Public Types | |
| enum | { edgeThresholdU = 13, edgeThresholdV = 15 } |
Public Member Functions | |
| VLCBeaconDetector (const Image &image, const CameraMatrix &cameraMatrix, const CameraMatrix &prevCameraMatrix, const ImageInfo &imageInf, const ColorTable &colorTable, const ColorCorrector &colorCorrector, LandmarksPercept &landmarksPercept) | |
| Constructor. | |
| void | execute () |
| Executes the beacon detection. | |
| void | analyzeColorTable () |
| Gains information about pink from the current color table. | |
| void | setBestColorTable (ColorTable *newBestColorTable) |
Private Types | |
| enum | { lowReliability = 1, mediumReliability = 4, highReliability = 6 } |
Private Member Functions | |
| bool | addCandidate (const Run &pinkRun) |
| Adds a pink run to the list of candidates. | |
| void | scanForPink (const Vector2< int > &start, const Vector2< int > &end) |
| Scans along a line. | |
| bool | scanForBeaconPart (const Vector2< int > &start, const Vector2< int > &end, Vector2< int > &position, Vector2< int > &edge, colorClass &color) |
| Scans for one other beacon part. | |
| void | clusterPinkBeaconParts () |
| Clusters the pink elements to find the pink beacon parts. | |
| void | analyzeBeacon (const Vector2< double > &left, const double pinkRunWidth) |
| Tries to detect a beacon near a pink part. | |
| int | scanForBeaconEdges (const Vector2< int > &position, const double pinkRunWidth, Flag::FlagType &flagType, Vector2< int > &topEdge, Vector2< int > &bottomEdge) |
| Looks for the vertical edges and the color type of a beacon. | |
Private Attributes | |
| const SUSANEdgeDetectionLite | edgeDetectionU |
| Edge detection operators (U and V components) used to find the boundaries of flags. | |
| const SUSANEdgeDetectionLite | edgeDetectionV |
| const Image & | image |
| The image. | |
| const CameraMatrix & | cameraMatrix |
| The camera matrix. | |
| const CameraMatrix & | prevCameraMatrix |
| The previous camera matrix. | |
| const ImageInfo & | imageInf |
| Additional Image information. | |
| const ColorTable & | colorTable |
| The color table. | |
| LandmarksPercept & | landmarksPercept |
| The landmarks percept. | |
| int | numOfBeaconCandidates |
| The number of possible beacons. | |
| Run | beaconCandidates [MAX_NUMBER_OF_PINK_RUNS] |
| The list of candidates. | |
| TransformedRun | transformedCandidates [MAX_NUMBER_OF_PINK_RUNS] |
| A buffer for transformed candidates. | |
| const double | horizontalBaseOffset |
| The base offset for horizontal scan lines. | |
| const int | numOfHorizontalScanLineAbove |
| The number of horizontal scan lines above the horizon. | |
| const int | numOfHorizontalScanLineBelow |
| The number of horizontal scan lines below the horizon. | |
| const double | horizontalOffsetModifier |
| The growth factor of the distance between two scan lines. | |
| const int | clusteringDistanceTolerance |
| The maximum distance between the merged runs. | |
| const int | minPinkRunLength |
| The minimum length of a pink run. | |
| const double | clusteringAspectRatio |
| The maximum vertical distance of scanlines to be clustered, over the estimated merged horizontal distance (half beacon aspect ratio should be 1:1). | |
| const double | projectionAspectRatio |
| 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. | |
| const int | edgeScanDepth |
| The maximum number of pixels which are examined after an edge response has been found for determining the color beyond the edge. | |
| unsigned char | minPinkUValue |
| The minimum U channel value of a pink pixel. | |
| const double | minFlagConfidence |
| A confidence threshold used to determine if a target beacon, whose type is not completely clear, can be accepted or not. | |
| VLCFlagSpecialist | flagSpecialist |
| A flag specialist. | |
| const ColorCorrector & | colorCorrector |
| The color corrector. | |
| ColorTable * | bestColorTable |
Definition at line 27 of file VLCBeaconDetector.h.
|
|
Definition at line 31 of file VLCBeaconDetector.h. |
|
|
Definition at line 138 of file VLCBeaconDetector.h. |
|
||||||||||||||||||||||||||||||||
|
Constructor.
Definition at line 32 of file VLCBeaconDetector.cpp. |
|
|
Executes the beacon detection.
Definition at line 60 of file VLCBeaconDetector.cpp. References Geometry::Line::base, Image::cameraInfo, clusterPinkBeaconParts(), Geometry::Line::direction, VLCFlagSpecialist::getFlagPercept(), Geometry::getIntersectionPointsOfLineAndRectangle(), ImageInfo::horizon, VLCFlagSpecialist::init(), LINE, ImageInfo::maxImageCoordinates, scanForPink(), ImageInfo::vertLine, Vector2< V >::x, and Vector2< V >::y. |
Here is the call graph for this function:
|
|
Gains information about pink from the current color table.
Definition at line 900 of file VLCBeaconDetector.cpp. References Vector3< V >::y. Referenced by VLCImageProcessor::handleMessage(), and VLCImageProcessor::VLCImageProcessor(). |
|
|
Definition at line 48 of file VLCBeaconDetector.h. References bestColorTable, VLCFlagSpecialist::setBestColorTable(), and Vector3< V >::y. Referenced by VLCImageProcessor::execute(). |
Here is the call graph for this function:
|
|
Adds a pink run to the list of candidates.
Definition at line 184 of file VLCBeaconDetector.cpp. References Run::end, MAX_NUMBER_OF_PINK_RUNS, Run::scanLineStart, and Run::start. Referenced by scanForPink(). |
|
||||||||||||
|
Scans along a line.
Definition at line 111 of file VLCBeaconDetector.cpp. References addCandidate(), bestColorTable, COLOR_CLASS, ColorCorrector::correct(), Run::end, BresenhamLineScan::getNext(), Image::image, BresenhamLineScan::init(), Run::length, LINE, BresenhamLineScan::numberOfPixels, Run::scanLineStart, Run::start, U(), V(), Vector2< int >::x, Vector2< V >::x, Vector2< int >::y, Vector2< V >::y, and Y(). Referenced by execute(). |
Here is the call graph for this function:
|
||||||||||||||||||||||||
|
Scans for one other beacon part.
Definition at line 842 of file VLCBeaconDetector.cpp. References bestColorTable, COLOR_CLASS, ColorCorrector::correct(), DOT, BresenhamLineScan::getNext(), Image::image, BresenhamLineScan::init(), SUSANEdgeDetectionLite::isEdgePoint(), noColor, BresenhamLineScan::numberOfPixels, Vector2< V >::x, and Vector2< V >::y. Referenced by scanForBeaconEdges(). |
Here is the call graph for this function:
|
|
Clusters the pink elements to find the pink beacon parts.
Definition at line 204 of file VLCBeaconDetector.cpp. References Vector2< double >::angle(), Image::cameraInfo, Geometry::clipPointInsideRectange(), Geometry::Line::direction, TransformedRun::end, ImageInfo::horizon, LINE, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Run::scanLineStart, TransformedRun::start, TransformedRun::transform(), Matrix2x2< V >::transpose(), 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:
|
||||||||||||
|
Tries to detect a beacon near a pink part.
Definition at line 398 of file VLCBeaconDetector.cpp. |
|
||||||||||||||||||||||||
|
Looks for the vertical edges and the color type of a beacon.
Definition at line 497 of file VLCBeaconDetector.cpp. References Vector2< V >::abs(), Vector2< double >::angle(), Geometry::Line::base, bestColorTable, Geometry::clipPointInsideRectange(), COLOR_CLASS, ColorCorrector::correct(), Geometry::Line::direction, DOT, Flag::FlagType, Geometry::getIntersectionPointsOfLineAndRectangle(), ImageInfo::horizon, Image::image, ImageInfo::maxImageCoordinates, noColor, scanForBeaconPart(), VLCFlagSpecialist::searchFlags(), ImageInfo::vertLine, Vector2< V >::x, Vector2< double >::x, Vector2< V >::y, and Vector2< double >::y. |
Here is the call graph for this function:
|
|
Edge detection operators (U and V components) used to find the boundaries of flags.
Definition at line 63 of file VLCBeaconDetector.h. |
|
|
Definition at line 64 of file VLCBeaconDetector.h. |
|
|
The image.
Definition at line 67 of file VLCBeaconDetector.h. |
|
|
The camera matrix.
Definition at line 69 of file VLCBeaconDetector.h. |
|
|
The previous camera matrix.
Definition at line 71 of file VLCBeaconDetector.h. |
|
|
Additional Image information.
Definition at line 73 of file VLCBeaconDetector.h. |
|
|
The color table.
Definition at line 75 of file VLCBeaconDetector.h. |
|
|
The landmarks percept.
Definition at line 77 of file VLCBeaconDetector.h. |
|
|
The number of possible beacons.
Definition at line 79 of file VLCBeaconDetector.h. |
|
|
The list of candidates.
Definition at line 81 of file VLCBeaconDetector.h. |
|
|
A buffer for transformed candidates.
Definition at line 83 of file VLCBeaconDetector.h. |
|
|
The base offset for horizontal scan lines.
Definition at line 85 of file VLCBeaconDetector.h. |
|
|
The number of horizontal scan lines above the horizon.
Definition at line 87 of file VLCBeaconDetector.h. |
|
|
The number of horizontal scan lines below the horizon.
Definition at line 89 of file VLCBeaconDetector.h. |
|
|
The growth factor of the distance between two scan lines.
Definition at line 91 of file VLCBeaconDetector.h. |
|
|
The maximum distance between the merged runs.
Definition at line 93 of file VLCBeaconDetector.h. |
|
|
The minimum length of a pink run.
Definition at line 95 of file VLCBeaconDetector.h. |
|
|
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 98 of file VLCBeaconDetector.h. |
|
|
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 101 of file VLCBeaconDetector.h. |
|
|
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 104 of file VLCBeaconDetector.h. |
|
|
The minimum U channel value of a pink pixel.
Definition at line 106 of file VLCBeaconDetector.h. |
|
|
A confidence threshold used to determine if a target beacon, whose type is not completely clear, can be accepted or not.
Definition at line 109 of file VLCBeaconDetector.h. |
|
|
A flag specialist.
Definition at line 111 of file VLCBeaconDetector.h. |
|
|
The color corrector.
Definition at line 113 of file VLCBeaconDetector.h. |
|
|
Definition at line 141 of file VLCBeaconDetector.h. Referenced by scanForBeaconEdges(), scanForBeaconPart(), scanForPink(), and setBestColorTable(). |
1.3.6