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

# VLCFlagSpecialist Class Reference

As part of the GridImageProcessor the VLCFlagSpecialist searches for flag landmarks starting at a point in an Image determined before. More...

`#include <VLCFlagSpecialist.h>`

Collaboration diagram for VLCFlagSpecialist:

[legend]
List of all members.

## Public Member Functions
| VLCFlagSpecialist (const ColorCorrector &)
void | init (const Image &image)
| Initializes the flag specialist.
void | searchFlags (const Image &image, const ColorTable &colorTable, const CameraMatrix &cameraMatrix, colorClass color, bool pinkIsTop, const Geometry::Line horizonLine, int x, int y)
| Searches for the flag in the image, starting from the specified point.
void | getFlagPercept (const CameraMatrix &cameraMatrix, const CameraMatrix &prevCameraMatrix, const CameraInfo &cameraInfo, const Geometry::Line horizonLine, LandmarksPercept &landmarksPercept)
void | setBestColorTable (ColorTable *newBestColorTable)
| DECLARE_DEBUG_IMAGE (imageProcessorFlags)
| Used for visualization of the flag scans.
## Private Types
enum | { maxNumberOfBoundingBoxes = 6 }
enum | { numberOfHorizontalScans = 5, numberOfVerticalScans = 3 }
enum | Direction { up, down, left, right }
enum | DebugType { initial, vertical, horizontal }
## Private Member Functions
void | estimateOffsetForFlags (LandmarksPercept &landmarksPercept, const Vector2< double > &cameraOffset)
bool | findEndOfFlag (const Image &image, const CameraInfo &bwCameraInfo, const ColorTable &colorTable, const Vector2< int > start, Vector2< double > horizonDirection, Direction direction, Vector2< int > &destination, colorClass color, bool pinkIsTop, bool startIsInTop, DebugType type, int &countPixel, int &countTop, int &countBottom)
## Private Attributes
const ColorCorrector & | colorCorrector
int | imageWidth
int | imageHeight
Vector2< int > | north
Vector2< int > | east
Vector2< int > | south
Vector2< int > | west
Vector2< int > | start
Vector2< int > | destination
double | boundingBoxTop [maxNumberOfBoundingBoxes][6]
double | boundingBoxBottom [maxNumberOfBoundingBoxes][6]
double | boundingBoxLeft [maxNumberOfBoundingBoxes][6]
double | boundingBoxRight [maxNumberOfBoundingBoxes][6]
bool | boundingBoxTopValid [maxNumberOfBoundingBoxes][6]
bool | boundingBoxBottomValid [maxNumberOfBoundingBoxes][6]
bool | boundingBoxLeftValid [maxNumberOfBoundingBoxes][6]
bool | boundingBoxRightValid [maxNumberOfBoundingBoxes][6]
int | numberOfBoundingBoxes [6]
int | bestBoundingBox [6]
ColorTable * | bestColorTable

## Detailed Description

As part of the GridImageProcessor the VLCFlagSpecialist searches for flag landmarks starting at a point in an Image determined before.

Definition at line 22 of file VLCFlagSpecialist.h.

## Member Enumeration Documentation

anonymous enum`[private]`

  | Enumeration values:
  maxNumberOfBoundingBoxes |
Definition at line 74 of file VLCFlagSpecialist.h.

anonymous enum`[private]`

  | Enumeration values:
  numberOfHorizontalScans |
  numberOfVerticalScans |
Definition at line 75 of file VLCFlagSpecialist.h.

enum VLCFlagSpecialist::Direction`[private]`

  | Enumeration values:
  up |
  down |
  left |
  right |
Definition at line 91 of file VLCFlagSpecialist.h.

enum VLCFlagSpecialist::DebugType`[private]`

  | Enumeration values:
  initial |
  vertical |
  horizontal |
Definition at line 92 of file VLCFlagSpecialist.h.

## Constructor & Destructor Documentation

VLCFlagSpecialist::VLCFlagSpecialist | ( | const ColorCorrector & |  | ) |

| Definition at line 16 of file VLCFlagSpecialist.cpp.

## Member Function Documentation

void VLCFlagSpecialist::init | ( | const Image & | image | ) |

| Initializes the flag specialist. Definition at line 21 of file VLCFlagSpecialist.cpp. References INIT_DEBUG_IMAGE. Referenced by VLCBeaconDetector::execute().

void VLCFlagSpecialist::searchFlags | ( | const Image & | image,
|  | const ColorTable & | colorTable,
|  | const CameraMatrix & | cameraMatrix,
|  | colorClass | color,
|  | bool | pinkIsTop,
|  | const Geometry::Line | horizonLine,
|  | int | x,
|  | int | y
| ) |

| Searches for the flag in the image, starting from the specified point. Definition at line 31 of file VLCFlagSpecialist.cpp. References Geometry::Line::base, DEBUG_IMAGE_SET_PIXEL_BLUE, DEBUG_IMAGE_SET_PIXEL_GREEN, DEBUG_IMAGE_SET_PIXEL_RED, DEBUG_IMAGE_SET_PIXEL_YELLOW, Geometry::Line::direction, DOT, Flag::FlagType, CameraInfo::focalLength, CameraInfo::focalLengthInv, Geometry::getDistanceToLine(), CameraInfo::opticalCenter, CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, sqr, Vector2< V >::x, Vector2< double >::x, Vector2< V >::y, and Vector2< double >::y. Referenced by VLCBeaconDetector::scanForBeaconEdges().

Here is the call graph for this function:

void VLCFlagSpecialist::getFlagPercept | ( | const CameraMatrix & | cameraMatrix,
|  | const CameraMatrix & | prevCameraMatrix,
|  | const CameraInfo & | cameraInfo,
|  | const Geometry::Line | horizonLine,
|  | LandmarksPercept & | landmarksPercept
| ) |

| Definition at line 440 of file VLCFlagSpecialist.cpp. References ConditionalBoundary::addX(), ConditionalBoundary::addY(), Flag::FlagType, CameraInfo::focalLength, CameraInfo::focalLengthInv, getPlayer(), Player::getTeamColor(), CameraInfo::opticalCenter, Geometry::rayFromCamera(), CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, SEND_DEBUG_IMAGE, sqr, Vector3< V >::x, Vector2< V >::x, Vector2< double >::x, Vector3< V >::y, Vector2< V >::y, and Vector2< double >::y. Referenced by VLCBeaconDetector::execute().

Here is the call graph for this function:

void VLCFlagSpecialist::setBestColorTable | ( | ColorTable * | newBestColorTable | ) | `[inline]`

| Definition at line 49 of file VLCFlagSpecialist.h. Referenced by VLCBeaconDetector::setBestColorTable().

void VLCFlagSpecialist::estimateOffsetForFlags | ( | LandmarksPercept & | landmarksPercept,
|  | const Vector2< double > & | cameraOffset
| ) | `[private]`

| Definition at line 574 of file VLCFlagSpecialist.cpp. References Vector2< double >::abs(), Flag::angle, Flag::angleValidity, Flag::distance, Flag::distanceValidity, Range< double >::getCenter(), Range< double >::getSize(), ConditionalBoundary::isOnBorder(), Range< double >::max, Range< double >::min, Pose2D::translation, Boundary< double >::x, and Boundary< double >::y.

Here is the call graph for this function:

bool VLCFlagSpecialist::findEndOfFlag | ( | const Image & | image,
|  | const CameraInfo & | bwCameraInfo,
|  | const ColorTable & | colorTable,
|  | const Vector2< int > | start,
|  | Vector2< double > | horizonDirection,
|  | Direction | direction,
|  | Vector2< int > & | destination,
|  | colorClass | color,
|  | bool | pinkIsTop,
|  | bool | startIsInTop,
|  | DebugType | type,
|  | int & | countPixel,
|  | int & | countTop,
|  | int & | countBottom
| ) | `[private]`

| Definition at line 271 of file VLCFlagSpecialist.cpp. References CORRECTED_COLOR_CLASS, DEBUG_IMAGE_SET_PIXEL_RED, DEBUG_IMAGE_SET_PIXEL_Y, Vector2< V >::x, Vector2< double >::x, Vector2< V >::y, and Vector2< double >::y.

VLCFlagSpecialist::DECLARE_DEBUG_IMAGE | ( | imageProcessorFlags |  | ) |

| Used for visualization of the flag scans.

## Member Data Documentation

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

| Definition at line 56 of file VLCFlagSpecialist.h.

int VLCFlagSpecialist::imageWidth`[private]`

| Definition at line 58 of file VLCFlagSpecialist.h.

int VLCFlagSpecialist::imageHeight`[private]`

| Definition at line 59 of file VLCFlagSpecialist.h.

Vector2<int> VLCFlagSpecialist::north`[private]`

| Definition at line 62 of file VLCFlagSpecialist.h.

Vector2<int> VLCFlagSpecialist::east`[private]`

| Definition at line 63 of file VLCFlagSpecialist.h.

Vector2<int> VLCFlagSpecialist::south`[private]`

| Definition at line 64 of file VLCFlagSpecialist.h.

Vector2<int> VLCFlagSpecialist::west`[private]`

| Definition at line 65 of file VLCFlagSpecialist.h.

Vector2<int> VLCFlagSpecialist::start`[private]`

| Definition at line 66 of file VLCFlagSpecialist.h.

Vector2<int> VLCFlagSpecialist::destination`[private]`

| Definition at line 67 of file VLCFlagSpecialist.h.

double VLCFlagSpecialist::boundingBoxTop[maxNumberOfBoundingBoxes][6]`[private]`

| Definition at line 77 of file VLCFlagSpecialist.h.

double VLCFlagSpecialist::boundingBoxBottom[maxNumberOfBoundingBoxes][6]`[private]`

| Definition at line 78 of file VLCFlagSpecialist.h.

double VLCFlagSpecialist::boundingBoxLeft[maxNumberOfBoundingBoxes][6]`[private]`

| Definition at line 79 of file VLCFlagSpecialist.h.

double VLCFlagSpecialist::boundingBoxRight[maxNumberOfBoundingBoxes][6]`[private]`

| Definition at line 80 of file VLCFlagSpecialist.h.

bool VLCFlagSpecialist::boundingBoxTopValid[maxNumberOfBoundingBoxes][6]`[private]`

| Definition at line 82 of file VLCFlagSpecialist.h.

bool VLCFlagSpecialist::boundingBoxBottomValid[maxNumberOfBoundingBoxes][6]`[private]`

| Definition at line 83 of file VLCFlagSpecialist.h.

bool VLCFlagSpecialist::boundingBoxLeftValid[maxNumberOfBoundingBoxes][6]`[private]`

| Definition at line 84 of file VLCFlagSpecialist.h.

bool VLCFlagSpecialist::boundingBoxRightValid[maxNumberOfBoundingBoxes][6]`[private]`

| Definition at line 85 of file VLCFlagSpecialist.h.

int VLCFlagSpecialist::numberOfBoundingBoxes[6]`[private]`

| Definition at line 87 of file VLCFlagSpecialist.h.

int VLCFlagSpecialist::bestBoundingBox[6]`[private]`

| Definition at line 89 of file VLCFlagSpecialist.h.

ColorTable* VLCFlagSpecialist::bestColorTable`[private]`

| Definition at line 113 of file VLCFlagSpecialist.h.

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

- Modules/ImageProcessor/VLCImageProcessor/VLCFlagSpecialist.h
- Modules/ImageProcessor/VLCImageProcessor/VLCFlagSpecialist.cpp