Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# GT2005BeaconDetector Class Reference

A class for detecting beacons in images. More...

`#include <GT2005BeaconDetector.h>`

Collaboration diagram for GT2005BeaconDetector:

[legend]
List of all members.

## Public Types
enum | { edgeThresholdU = 13, edgeThresholdV = 15 }
## Public Member Functions
| GT2005BeaconDetector (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.
## 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.
GT2005FlagSpecialist | flagSpecialist
| A flag specialist.
const ColorCorrector & | colorCorrector
| The color corrector.

## Detailed Description

A class for detecting beacons in images.

Definition at line 27 of file GT2005BeaconDetector.h.

## Member Enumeration Documentation

anonymous enum

  | Enumeration values:
  edgeThresholdU |
  edgeThresholdV |
Definition at line 31 of file GT2005BeaconDetector.h.

anonymous enum`[private]`

  | Enumeration values:
  lowReliability |
  mediumReliability |
  highReliability |
Definition at line 125 of file GT2005BeaconDetector.h.

## Constructor & Destructor Documentation

GT2005BeaconDetector::GT2005BeaconDetector | ( | 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 GT2005BeaconDetector.cpp.

## Member Function Documentation

void GT2005BeaconDetector::execute | ( |  | ) |

| Executes the beacon detection. Definition at line 60 of file GT2005BeaconDetector.cpp. References Geometry::Line::base, Image::cameraInfo, clusterPinkBeaconParts(), Geometry::Line::direction, flagSpecialist, GT2005FlagSpecialist::getFlagPercept(), Geometry::getIntersectionPointsOfLineAndRectangle(), ImageInfo::horizon, horizontalBaseOffset, horizontalOffsetModifier, imageInf, GT2005FlagSpecialist::init(), LINE, ImageInfo::maxImageCoordinates, numOfBeaconCandidates, numOfHorizontalScanLineAbove, numOfHorizontalScanLineBelow, scanForPink(), ImageInfo::vertLine, Vector2< V >::x, and Vector2< V >::y. Referenced by GT2005ImageProcessor::execute().

Here is the call graph for this function:

void GT2005BeaconDetector::analyzeColorTable | ( |  | ) |

| Gains information about pink from the current color table. Definition at line 900 of file GT2005BeaconDetector.cpp. References minPinkUValue, and Vector3< V >::y. Referenced by GT2005ImageProcessor::GT2005ImageProcessor(), and GT2005ImageProcessor::handleMessage().

bool GT2005BeaconDetector::addCandidate | ( | const Run & | pinkRun | ) | `[private]`

  | Adds a pink run to the list of candidates. Parameters:
  pinkRun | A pink run
Returns: true, if the run has been appended Definition at line 184 of file GT2005BeaconDetector.cpp. References beaconCandidates, Run::end, MAX_NUMBER_OF_PINK_RUNS, numOfBeaconCandidates, Run::scanLineStart, and Run::start. Referenced by scanForPink().

void GT2005BeaconDetector::scanForPink | ( | const Vector2< int > & | start,
|  | const Vector2< int > & | end
| ) | `[private]`

| Scans along a line. Definition at line 111 of file GT2005BeaconDetector.cpp. References addCandidate(), COLOR_CLASS, ColorCorrector::correct(), Run::end, BresenhamLineScan::getNext(), Image::image, BresenhamLineScan::init(), Run::length, LINE, minPinkRunLength, minPinkUValue, 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:

bool GT2005BeaconDetector::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 842 of file GT2005BeaconDetector.cpp. References COLOR_CLASS, ColorCorrector::correct(), DOT, edgeDetectionU, edgeDetectionV, edgeScanDepth, 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:

void GT2005BeaconDetector::clusterPinkBeaconParts | ( |  | ) | `[private]`

| Clusters the pink elements to find the pink beacon parts. Definition at line 204 of file GT2005BeaconDetector.cpp. References analyzeBeacon(), Vector2< double >::angle(), beaconCandidates, Image::cameraInfo, Geometry::clipPointInsideRectange(), clusteringAspectRatio, clusteringDistanceTolerance, Geometry::Line::direction, TransformedRun::end, ImageInfo::horizon, imageInf, LINE, numOfBeaconCandidates, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, Run::scanLineStart, TransformedRun::start, TransformedRun::transform(), transformedCandidates, 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:

void GT2005BeaconDetector::analyzeBeacon | ( | const Vector2< double > & | left,
|  | const double | pinkRunWidth
| ) | `[private]`

| Tries to detect a beacon near a pink part. Definition at line 398 of file GT2005BeaconDetector.cpp. References imageInf. Referenced by clusterPinkBeaconParts().

int GT2005BeaconDetector::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 497 of file GT2005BeaconDetector.cpp. References Vector2< V >::abs(), Vector2< double >::angle(), Geometry::Line::base, Geometry::clipPointInsideRectange(), COLOR_CLASS, ColorCorrector::correct(), Geometry::Line::direction, DOT, flagSpecialist, Flag::FlagType, Geometry::getIntersectionPointsOfLineAndRectangle(), highReliability, ImageInfo::horizon, Image::image, imageInf, lowReliability, ImageInfo::maxImageCoordinates, mediumReliability, noColor, projectionAspectRatio, scanForBeaconPart(), GT2005FlagSpecialist::searchFlags(), ImageInfo::vertLine, Vector2< V >::x, Vector2< double >::x, Vector2< V >::y, and Vector2< double >::y.

Here is the call graph for this function:

## Member Data Documentation

const SUSANEdgeDetectionLite GT2005BeaconDetector::edgeDetectionU`[private]`

| Edge detection operators (U and V components) used to find the boundaries of flags. Definition at line 50 of file GT2005BeaconDetector.h. Referenced by scanForBeaconPart().

const SUSANEdgeDetectionLite GT2005BeaconDetector::edgeDetectionV`[private]`

| Definition at line 51 of file GT2005BeaconDetector.h. Referenced by scanForBeaconPart().

const Image& GT2005BeaconDetector::image`[private]`

| The image. Definition at line 54 of file GT2005BeaconDetector.h.

const CameraMatrix& GT2005BeaconDetector::cameraMatrix`[private]`

| The camera matrix. Definition at line 56 of file GT2005BeaconDetector.h.

const CameraMatrix& GT2005BeaconDetector::prevCameraMatrix`[private]`

| The previous camera matrix. Definition at line 58 of file GT2005BeaconDetector.h.

const ImageInfo& GT2005BeaconDetector::imageInf`[private]`

| Additional Image information. Definition at line 60 of file GT2005BeaconDetector.h. Referenced by analyzeBeacon(), clusterPinkBeaconParts(), execute(), and scanForBeaconEdges().

const ColorTable& GT2005BeaconDetector::colorTable`[private]`

| The color table. Definition at line 62 of file GT2005BeaconDetector.h.

LandmarksPercept& GT2005BeaconDetector::landmarksPercept`[private]`

| The landmarks percept. Definition at line 64 of file GT2005BeaconDetector.h.

int GT2005BeaconDetector::numOfBeaconCandidates`[private]`

| The number of possible beacons. Definition at line 66 of file GT2005BeaconDetector.h. Referenced by addCandidate(), clusterPinkBeaconParts(), and execute().

Run GT2005BeaconDetector::beaconCandidates[MAX_NUMBER_OF_PINK_RUNS]`[private]`

| The list of candidates. Definition at line 68 of file GT2005BeaconDetector.h. Referenced by addCandidate(), and clusterPinkBeaconParts().

TransformedRun GT2005BeaconDetector::transformedCandidates[MAX_NUMBER_OF_PINK_RUNS]`[private]`

| A buffer for transformed candidates. Definition at line 70 of file GT2005BeaconDetector.h. Referenced by clusterPinkBeaconParts().

const double GT2005BeaconDetector::horizontalBaseOffset`[private]`

| The base offset for horizontal scan lines. Definition at line 72 of file GT2005BeaconDetector.h. Referenced by execute().

const int GT2005BeaconDetector::numOfHorizontalScanLineAbove`[private]`

| The number of horizontal scan lines above the horizon. Definition at line 74 of file GT2005BeaconDetector.h. Referenced by execute().

const int GT2005BeaconDetector::numOfHorizontalScanLineBelow`[private]`

| The number of horizontal scan lines below the horizon. Definition at line 76 of file GT2005BeaconDetector.h. Referenced by execute().

const double GT2005BeaconDetector::horizontalOffsetModifier`[private]`

| The growth factor of the distance between two scan lines. Definition at line 78 of file GT2005BeaconDetector.h. Referenced by execute().

const int GT2005BeaconDetector::clusteringDistanceTolerance`[private]`

| The maximum distance between the merged runs. Definition at line 80 of file GT2005BeaconDetector.h. Referenced by clusterPinkBeaconParts().

const int GT2005BeaconDetector::minPinkRunLength`[private]`

| The minimum length of a pink run. Definition at line 82 of file GT2005BeaconDetector.h. Referenced by scanForPink().

const double GT2005BeaconDetector::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 GT2005BeaconDetector.h. Referenced by clusterPinkBeaconParts().

const double GT2005BeaconDetector::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 GT2005BeaconDetector.h. Referenced by scanForBeaconEdges().

const int GT2005BeaconDetector::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 GT2005BeaconDetector.h. Referenced by scanForBeaconPart().

unsigned char GT2005BeaconDetector::minPinkUValue`[private]`

| The minimum U channel value of a pink pixel. Definition at line 93 of file GT2005BeaconDetector.h. Referenced by analyzeColorTable(), and scanForPink().

const double GT2005BeaconDetector::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 GT2005BeaconDetector.h.

GT2005FlagSpecialist GT2005BeaconDetector::flagSpecialist`[private]`

| A flag specialist. Definition at line 98 of file GT2005BeaconDetector.h. Referenced by execute(), and scanForBeaconEdges().

const ColorCorrector& GT2005BeaconDetector::colorCorrector`[private]`

| The color corrector. Definition at line 100 of file GT2005BeaconDetector.h.

The documentation for this class was generated from the following files:

- Modules/ImageProcessor/GT2005ImageProcessor/GT2005BeaconDetector.h
- Modules/ImageProcessor/GT2005ImageProcessor/GT2005BeaconDetector.cpp