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

VLCGoalRecognizer::EdgeDetector Class Reference

TODO: Write Summary. More...

Collaboration diagram for VLCGoalRecognizer::EdgeDetector:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 EdgeDetector (colorClass target)
 Constructor.

 EdgeDetector (colorClass target, Vector3< int > referenceColor, int referenceColorBase)
EdgeType inspectPixel (const Vector2< int > &point, int index, const colorClass &colorCls, const Vector3< int > &color)
 Investigates the next pixel and reports, wether an edge, or repeated deviation of the pixel colours (without the indications of an edge) have been detected.

Vector2< int > getLastPointInClass ()
 Returns the last point in the target colour class.

void getLastPointInClass (Vector2< int > &point)
 Similar to getLastPointInClass().

void getLastPointInClass (Vector2< int > &point, int &index)
 Similar to getLastPointInClass(), but also returns the index of the lastPointInClass.

int getLastIndexInClass ()
 Similar to getLastPointInClass(), but returns the index of the lastPointInClass instead of the poinst itself.

void clear (const Vector2< int > &defaultLast, bool connectedToClass)
 Resets the edge detection state while keeping the reference colour.

void clear ()
 Reset the edge detection state while keeping the reference colour.

void reset ()
 Reset the reference colour and the edge detector state.

void setReferenceColor (const Vector3< int > &color, int referenceColorBase)
 Sets the reference colour.

void getReferenceColor (Vector3< int > &result)
 Returns the reference colour.


Private Member Functions

int distance (const Vector3< int > &color)
 Calculates the Mahalanobis distance of the given colour to the reference colour.


Private Attributes

const colorClass targetColorClass
 The colour class of the goal.

const colorClass ignoredClassification
 Colour class that is not considered as an indication for an edge.

const Matrix3x3< int > invCovar
 The inverse covariance matrix of the goal colour.

Vector3< int > referenceColor
 The reference colour for distance calculations.

int referenceColorBase
int deviationCounter
 Counter to detect the end of an area in target colour without an edge.

int edgeCounter
 Counter to detect an edge.

Vector2< int > lastPointInClass
 Last pixel in the target colour class (or within tolerable distance).

int lastPointInClassIndex
 The index of the last point in/near the target colour class.

bool connectedToClass
 Current pixel is connected via to a pixel in the target colour class only via pixels within tolerable distance, i.e.


Static Private Attributes

const float classThreshold = 300000
 The maximum distance from the reference colour that is tolerated for a pixel to be considered in the target colour class.

const float edgeThreshold = 600000
 The minimum distance from the reference colour that pixels on the other side of an edge need to have.


Detailed Description

TODO: Write Summary.

Definition at line 78 of file VLCGoalRecognizer.h.


Constructor & Destructor Documentation

VLCGoalRecognizer::EdgeDetector::EdgeDetector colorClass  target  ) 
 

Constructor.

Definition at line 1675 of file VLCGoalRecognizer.cpp.

References inverseCovarianceMatrix2(), and noColor.

Here is the call graph for this function:

VLCGoalRecognizer::EdgeDetector::EdgeDetector colorClass  target,
Vector3< int >  referenceColor,
int  referenceColorBase
 

Definition at line 1689 of file VLCGoalRecognizer.cpp.

References inverseCovarianceMatrix2(), and noColor.

Here is the call graph for this function:


Member Function Documentation

EdgeType VLCGoalRecognizer::EdgeDetector::inspectPixel const Vector2< int > &  point,
int  index,
const colorClass colorCls,
const Vector3< int > &  color
[inline]
 

Investigates the next pixel and reports, wether an edge, or repeated deviation of the pixel colours (without the indications of an edge) have been detected.

It is assumed that edges are quite sharp and that the color beyond the edge is significantly different to the goal colour. In case of a blurred edge or a steady color gradient the method will (eventually) return deviationWithoutEdge.

Definition at line 92 of file VLCGoalRecognizer.h.

References classThreshold, distance(), edgeThreshold, noColor, and point.

Referenced by VLCGoalRecognizer::detectEdge(), and VLCGoalRecognizer::scanAlongLine().

Here is the call graph for this function:

Vector2<int> VLCGoalRecognizer::EdgeDetector::getLastPointInClass  )  [inline]
 

Returns the last point in the target colour class.

If inspectPixel return the value edge the returned point is located just before the edge.

Definition at line 190 of file VLCGoalRecognizer.h.

Referenced by VLCGoalRecognizer::detectEdge().

void VLCGoalRecognizer::EdgeDetector::getLastPointInClass Vector2< int > &  point  )  [inline]
 

Similar to getLastPointInClass().

Definition at line 198 of file VLCGoalRecognizer.h.

References point.

void VLCGoalRecognizer::EdgeDetector::getLastPointInClass Vector2< int > &  point,
int &  index
[inline]
 

Similar to getLastPointInClass(), but also returns the index of the lastPointInClass.

Definition at line 207 of file VLCGoalRecognizer.h.

References point.

int VLCGoalRecognizer::EdgeDetector::getLastIndexInClass  )  [inline]
 

Similar to getLastPointInClass(), but returns the index of the lastPointInClass instead of the poinst itself.

Definition at line 217 of file VLCGoalRecognizer.h.

Referenced by VLCGoalRecognizer::scanAlongLine().

void VLCGoalRecognizer::EdgeDetector::clear const Vector2< int > &  defaultLast,
bool  connectedToClass
[inline]
 

Resets the edge detection state while keeping the reference colour.

Parameters:
defaultLast The value returned by getLastPointInClass if none of the inspected pixels is in or near the target colour class.
connectedToClass Assume that the first pixel that is inspected is connected to the target colour class.

Definition at line 229 of file VLCGoalRecognizer.h.

Referenced by VLCGoalRecognizer::analyzeGoalpost(), VLCGoalRecognizer::detectFreePartOfGoal(), and VLCGoalRecognizer::scanCrossBar().

void VLCGoalRecognizer::EdgeDetector::clear  )  [inline]
 

Reset the edge detection state while keeping the reference colour.

Definition at line 244 of file VLCGoalRecognizer.h.

void VLCGoalRecognizer::EdgeDetector::reset void   )  [inline]
 

Reset the reference colour and the edge detector state.

Definition at line 259 of file VLCGoalRecognizer.h.

void VLCGoalRecognizer::EdgeDetector::setReferenceColor const Vector3< int > &  color,
int  referenceColorBase
[inline]
 

Sets the reference colour.

Definition at line 277 of file VLCGoalRecognizer.h.

Referenced by VLCGoalRecognizer::detectFreePartOfGoal().

void VLCGoalRecognizer::EdgeDetector::getReferenceColor Vector3< int > &  result  )  [inline]
 

Returns the reference colour.

Definition at line 286 of file VLCGoalRecognizer.h.

Referenced by VLCGoalRecognizer::analyzeGoalpost().

int VLCGoalRecognizer::EdgeDetector::distance const Vector3< int > &  color  )  [inline, private]
 

Calculates the Mahalanobis distance of the given colour to the reference colour.

Definition at line 296 of file VLCGoalRecognizer.h.

Referenced by inspectPixel().


Member Data Documentation

const float VLCGoalRecognizer::EdgeDetector::classThreshold = 300000 [static, private]
 

The maximum distance from the reference colour that is tolerated for a pixel to be considered in the target colour class.

Definition at line 1704 of file VLCGoalRecognizer.cpp.

Referenced by inspectPixel().

const float VLCGoalRecognizer::EdgeDetector::edgeThreshold = 600000 [static, private]
 

The minimum distance from the reference colour that pixels on the other side of an edge need to have.

This value is greater than classThreshold.

Definition at line 1705 of file VLCGoalRecognizer.cpp.

Referenced by inspectPixel().

const colorClass VLCGoalRecognizer::EdgeDetector::targetColorClass [private]
 

The colour class of the goal.

Definition at line 319 of file VLCGoalRecognizer.h.

const colorClass VLCGoalRecognizer::EdgeDetector::ignoredClassification [private]
 

Colour class that is not considered as an indication for an edge.

Definition at line 322 of file VLCGoalRecognizer.h.

const Matrix3x3<int> VLCGoalRecognizer::EdgeDetector::invCovar [private]
 

The inverse covariance matrix of the goal colour.

It is used to calculate the Mahalanobis distance between the reference colour and the current colour for pixels in no colour class (or an ignored one).

Definition at line 327 of file VLCGoalRecognizer.h.

Vector3<int> VLCGoalRecognizer::EdgeDetector::referenceColor [private]
 

The reference colour for distance calculations.

It is an average of recent pixels that were classified in the target colour class.

Definition at line 331 of file VLCGoalRecognizer.h.

int VLCGoalRecognizer::EdgeDetector::referenceColorBase [private]
 

Definition at line 332 of file VLCGoalRecognizer.h.

int VLCGoalRecognizer::EdgeDetector::deviationCounter [private]
 

Counter to detect the end of an area in target colour without an edge.

Definition at line 335 of file VLCGoalRecognizer.h.

int VLCGoalRecognizer::EdgeDetector::edgeCounter [private]
 

Counter to detect an edge.

Definition at line 338 of file VLCGoalRecognizer.h.

Vector2<int> VLCGoalRecognizer::EdgeDetector::lastPointInClass [private]
 

Last pixel in the target colour class (or within tolerable distance).

Definition at line 342 of file VLCGoalRecognizer.h.

int VLCGoalRecognizer::EdgeDetector::lastPointInClassIndex [private]
 

The index of the last point in/near the target colour class.

By default, this value is -1, so it can be used to check whether any pixel was considered to be in/near the target colour class.

Definition at line 347 of file VLCGoalRecognizer.h.

bool VLCGoalRecognizer::EdgeDetector::connectedToClass [private]
 

Current pixel is connected via to a pixel in the target colour class only via pixels within tolerable distance, i.e.

there hasn't been a pixel with a distance greater than the classDistance threshold since the last pixel classified in the target class (without distance). As long as this variable is true, points with tolerable distance will be stored as lastPointInClass.

Definition at line 354 of file VLCGoalRecognizer.h.


The documentation for this class was generated from the following files:
Generated on Mon Mar 20 22:22:45 2006 for GT2005 by doxygen 1.3.6