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

GT2005GoalRecognizer Class Reference

TODO: Write Summary. More...

#include <GT2005GoalRecognizer.h>

Collaboration diagram for GT2005GoalRecognizer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GT2005GoalRecognizer (colorClass color, const ImageProcessorInterfaces &interfaces, const ColorCorrector &colorCorrector, const ImageInfo &horizonInfo)
 Initializes the GT2005GoadRecognizer.

 ~GT2005GoalRecognizer ()
 Destructor.

void notifyAboutNewImage ()
 Call this method on every new image before the first call of inspect pixel.

void notifyAboutFlags ()
 Call this method to use seen flags (from the LandmarkPercept object) as areas where not to look for goals.

void notifyAboutFinish ()
void notifyAboutNewScanline (const Vector2< int > &scanLineStart)
void inspectPixel (const Vector2< int > &point, const colorClass &color)

Private Types

enum  EdgeType {
  none = 0, edge, deviationWithoutEdge,
  imageBorder
}
 TODO: Write Summary. More...

enum  ImageBorderSide {
  topBorder = 0, leftBorder = 1, bottomBorder = 2,
  rightBorder = 3, noBorder
}
 TODO: Write Summary. More...

enum  FreeSide {
  noFreeSide, leftSide, rightSide,
  bothSides
}
enum  { lockAreaStackSize = 2 }
 Stack containing the locked area from previous goal analysises. More...

enum  { maxFlagLocks = 3 }
 HY-Ranges where flags have been detected. More...

enum  { maxHypothesises = 5 }
 Detected goal hypothesises. More...


Private Member Functions

bool inspectNeighbourhood (const Vector2< int > &point)
void analyzeGoal (Vector2< int > startPoint)
 point copied on purpose

void analyzeGoalpost (GT2005GoalRecognizer::EdgeDetector *detector, const Vector2< double > &directionOfEdge, bool leftGoalpost, Vector2< int > &focus, GT2005GoalRecognizer::Goalpost &result, bool *imageBorderScanned)
 direction of edge normalized!! imageBorderScanned: to prevent that one image border is scanned again, never necessary in correct goal case

void scanCrossBar (GT2005GoalRecognizer::EdgeDetector *detector, Vector2< int > &focus, GT2005GoalRecognizer::GoalHypothesis &result, bool *imageBorderScanned)
GT2005GoalRecognizer::EdgeType detectEdgeTwice (GT2005GoalRecognizer::EdgeDetector *detector, Vector2< int > &focus, BresenhamLineScan &scanLine, const Vector2< int > &scanLineOffset, int maxScanLength, EdgePointList &edgePoints)
 scans first from focus+scanLineOffset, using detector[0]!!

GT2005GoalRecognizer::EdgeType detectEdge (GT2005GoalRecognizer::EdgeDetector &detector, Vector2< int > &focus, BresenhamLineScan &direction, int maxScanLength, int &pixelsUntilEdge)
GT2005GoalRecognizer::EdgeType scanAlongLine (GT2005GoalRecognizer::EdgeDetector *detector, Vector2< int > &focus, BresenhamLineScan &scanLine, const Vector2< int > &scanLineOffset, int maximumScan, int &pixelsScanned)
GT2005GoalRecognizer::ImageBorderSide scanOnImageBorder (GT2005GoalRecognizer::EdgeDetector *detector, Vector2< int > &focus, const Vector2< double > &targetDirection, int maxBorderDistance, bool *scannedSides)
 case noBorder mustn't be ignored -> scanning hasn't been done before or doesn't make sense

bool detectGreenBelowGoalpost (Vector2< int > bottomPoint, const Vector2< double > &directionOfEdge, int goalpostHeight)
 direction of edge normalized!! bottomPoint copied on purpose!!

bool nearImageBorder (const Vector2< int > &point, int maxDistance)
 Returns true if the point is within one pixel distance to the image border.

void mergeFragments (bool *deletedHypothesises)
void interpretResults (GT2005GoalRecognizer::EdgeDetector *detector, bool *deletedHypothesises)
void publishResults (const GT2005GoalRecognizer::GoalHypothesis &goal, const bool *visibleGoalpost, const GT2005GoalRecognizer::FreeSide freeSide, const Vector2< int > &endpointOfFreePart, const bool *freePartOnImageBorder)
GT2005GoalRecognizer::FreeSide detectFreePartOfGoal (GT2005GoalRecognizer::EdgeDetector *detector, const GT2005GoalRecognizer::GoalHypothesis &goal, int &freeWidth, Vector2< int > &otherSide, bool *onImageBorder)
void lockArea (double x, double y, bool onGreen)
void calculateLockedPixels (const Vector2< int > &scanLineStart)
 pop lock, chekc flag intersection, calculate locked pixels

void recalculateLockedPixels (const Vector2< int > &currentPoint)
 Recalculates the number of locked pixels after a goal has been detected.

 DECLARE_DEBUG_IMAGE (imageProcessorGoal1)
 Declare raster image which will take debug information.

 DECLARE_DEBUG_IMAGE (imageProcessorGoal2)
 N_DECLARE_DEBUG_GRAY_SCALE_IMAGE (goalRecognizerYellow)
 N_DECLARE_DEBUG_GRAY_SCALE_IMAGE (goalRecognizerBlue)

Private Attributes

const colorClass goalColor
 The colour class of the goal to be detected by this object.

const ImageProcessorInterfacesinterfaces
 Collection of references to objects that are needed by this object, e.g.

const ImageInfohorizonInfo
 Object containing useful information related to the current horizon.

const ColorCorrectorcolorCorrector
 Reference to the color correction object.

int detectionCounter
 Counter to detect accumulations of goal-coloured pixels.

int lockedPixels
 Number of pixels that will not be inspected, because they are inside previously analysed areas.

Vector2< double > lockAreaStack [lockAreaStackSize]
int lockAreaCount
Range< double > flagLock [maxFlagLocks]
int flagLockCount
unsigned long frameNumberImage
unsigned long frameNumberFlags
GoalHypothesis hypothesis [maxHypothesises]
int hypothesisCount

Detailed Description

TODO: Write Summary.

Author:
<a href="mailto:oberlies@sim.tu-darmstadt.de"Tobias Oberlies

Definition at line 61 of file GT2005GoalRecognizer.h.


Member Enumeration Documentation

enum GT2005GoalRecognizer::EdgeType [private]
 

TODO: Write Summary.

Enumeration values:
none 
edge 
deviationWithoutEdge 
imageBorder 

Definition at line 68 of file GT2005GoalRecognizer.h.

Referenced by detectEdge(), detectEdgeTwice(), GT2005GoalRecognizer::EdgePointList::getType(), and scanAlongLine().

enum GT2005GoalRecognizer::ImageBorderSide [private]
 

TODO: Write Summary.

Enumeration values:
topBorder 
leftBorder 
bottomBorder 
rightBorder 
noBorder 

Definition at line 543 of file GT2005GoalRecognizer.h.

Referenced by analyzeGoalpost(), and scanOnImageBorder().

enum GT2005GoalRecognizer::FreeSide [private]
 

Enumeration values:
noFreeSide 
leftSide 
rightSide 
bothSides 

Definition at line 552 of file GT2005GoalRecognizer.h.

Referenced by detectFreePartOfGoal(), and interpretResults().

anonymous enum [private]
 

Stack containing the locked area from previous goal analysises.

This is to prevent that goal-coloured blobs are analysed twice. With inspectPixel being called on pixel from left to right and top to bottom, it is sufficient to store the bottom left point of the locked areas.

Enumeration values:
lockAreaStackSize 

Definition at line 808 of file GT2005GoalRecognizer.h.

anonymous enum [private]
 

HY-Ranges where flags have been detected.

Scanlines that are within that range are not scanned at all to avoid that goals are detected within flags.

Enumeration values:
maxFlagLocks 

Definition at line 814 of file GT2005GoalRecognizer.h.

anonymous enum [private]
 

Detected goal hypothesises.

Enumeration values:
maxHypothesises 

Definition at line 821 of file GT2005GoalRecognizer.h.


Constructor & Destructor Documentation

GT2005GoalRecognizer::GT2005GoalRecognizer colorClass  color,
const ImageProcessorInterfaces interfaces,
const ColorCorrector colorCorrector,
const ImageInfo horizonInfo
 

Initializes the GT2005GoadRecognizer.

Definition at line 74 of file GT2005GoalRecognizer.cpp.

GT2005GoalRecognizer::~GT2005GoalRecognizer  )  [inline]
 

Destructor.

Definition at line 573 of file GT2005GoalRecognizer.h.


Member Function Documentation

void GT2005GoalRecognizer::notifyAboutNewImage  ) 
 

Call this method on every new image before the first call of inspect pixel.

Definition at line 82 of file GT2005GoalRecognizer.cpp.

References detectionCounter, flagLockCount, Image::frameNumber, frameNumberImage, goalColor, hypothesisCount, ImageProcessorInterfaces::image, INIT_DEBUG_IMAGE, interfaces, lockAreaCount, N_INIT_DEBUG_GRAY_SCALE_IMAGE, and NDECLARE_DEBUGDRAWING.

Referenced by GT2005ImageProcessor::execute().

void GT2005GoalRecognizer::notifyAboutFlags  ) 
 

Call this method to use seen flags (from the LandmarkPercept object) as areas where not to look for goals.

Definition at line 119 of file GT2005GoalRecognizer.cpp.

References Flag::bottomLeft, Flag::bottomRight, flagLock, flagLockCount, LandmarksPercept::flags, LandmarksPercept::frameNumber, frameNumberFlags, ImageInfo::horizonAlignedXOf(), horizonInfo, interfaces, ImageProcessorInterfaces::landmarksPercept, Range< double >::max, maxFlagLocks, Range< double >::min, min, and LandmarksPercept::numberOfFlags.

Referenced by GT2005ImageProcessor::execute().

Here is the call graph for this function:

void GT2005GoalRecognizer::notifyAboutFinish  ) 
 

Definition at line 140 of file GT2005GoalRecognizer.cpp.

References DEBUG_DRAWING_FINISHED, goalColor, interpretResults(), maxHypothesises, mergeFragments(), N_SEND_DEBUG_GRAY_SCALE_IMAGE, and SEND_DEBUG_IMAGE.

Referenced by GT2005ImageProcessor::execute().

Here is the call graph for this function:

void GT2005GoalRecognizer::notifyAboutNewScanline const Vector2< int > &  scanLineStart  )  [inline]
 

Definition at line 592 of file GT2005GoalRecognizer.h.

References calculateLockedPixels(), and detectionCounter.

Referenced by GT2005ImageProcessor::scan().

Here is the call graph for this function:

void GT2005GoalRecognizer::inspectPixel const Vector2< int > &  point,
const colorClass color
[inline]
 

Definition at line 603 of file GT2005GoalRecognizer.h.

References analyzeGoal(), detectionCounter, goalColor, lockedPixels, N_STUPID_DEBUG_IMAGE_SET_PIXEL, point, recalculateLockedPixels(), STUPID_DEBUG_IMAGE_SET_PIXEL, Vector2< int >::x, and Vector2< int >::y.

Referenced by GT2005ImageProcessor::scan().

Here is the call graph for this function:

bool GT2005GoalRecognizer::inspectNeighbourhood const Vector2< int > &  point  )  [private]
 

Definition at line 172 of file GT2005GoalRecognizer.cpp.

References ImageProcessorInterfaces::colorTable, CORRECTED_COLOR_CLASS, goalColor, Image::image, ImageProcessorInterfaces::image, interfaces, nearImageBorder(), point, Vector2< int >::x, and Vector2< int >::y.

Here is the call graph for this function:

void GT2005GoalRecognizer::analyzeGoal Vector2< int >  startPoint  )  [private]
 

point copied on purpose

Definition at line 192 of file GT2005GoalRecognizer.cpp.

References analyzeGoalpost(), GT2005GoalRecognizer::Goalpost::bottomPointH, GT2005GoalRecognizer::GoalHypothesis::crossBarEndpoint, GT2005GoalRecognizer::GoalHypothesis::crossBarEndpointH, Geometry::Line::direction, GT2005GoalRecognizer::Goalpost::edgePoint, GT2005GoalRecognizer::Goalpost::edgePointH, goalColor, GT2005GoalRecognizer::GoalHypothesis::goalpost, GT2005GoalRecognizer::GoalHypothesis::height, GT2005GoalRecognizer::Goalpost::height, ImageInfo::horizon, HORIZON_ALIGNED_RECTANGLE, horizonInfo, hypothesis, hypothesisCount, lockArea(), max, maxHypothesises, min, GT2005GoalRecognizer::GoalHypothesis::onGreen, GT2005GoalRecognizer::Goalpost::onGreen, scanCrossBar(), GT2005GoalRecognizer::Goalpost::topPoint, GT2005GoalRecognizer::Goalpost::topPointH, GT2005GoalRecognizer::GoalHypothesis::width, Vector2< int >::x, Vector2< double >::x, and Vector2< double >::y.

Referenced by inspectPixel().

Here is the call graph for this function:

void GT2005GoalRecognizer::analyzeGoalpost GT2005GoalRecognizer::EdgeDetector detector,
const Vector2< double > &  directionOfEdge,
bool  leftGoalpost,
Vector2< int > &  focus,
GT2005GoalRecognizer::Goalpost result,
bool *  imageBorderScanned
[private]
 

direction of edge normalized!! imageBorderScanned: to prevent that one image border is scanned again, never necessary in correct goal case

Definition at line 265 of file GT2005GoalRecognizer.cpp.

References GT2005GoalRecognizer::EdgePointList::add(), ASSERT, GT2005GoalRecognizer::Goalpost::bottomPoint, GT2005GoalRecognizer::Goalpost::bottomPointH, Matrix2x2< double >::c, GT2005GoalRecognizer::EdgeDetector::clear(), ImageInfo::clipToImageBoundary(), GT2005GoalRecognizer::Goalpost::color, DEBUG_RESPONSE, detectEdgeTwice(), detectGreenBelowGoalpost(), deviationWithoutEdge, Geometry::Line::direction, GT2005GoalRecognizer::Goalpost::edgePoint, GT2005GoalRecognizer::Goalpost::edgePointH, GT2005GoalRecognizer::EdgePointList::getCount(), GT2005GoalRecognizer::EdgeDetector::getReferenceColor(), GT2005GoalRecognizer::EdgePointList::getType(), GT2005GoalRecognizer::Goalpost::height, horizonInfo, imageBorder, ImageBorderSide, ImageInfo::invRotation, maxScanLengthToGoalpostEdge, minGoalpostHeight, nearImageBorder(), noBorder, GT2005GoalRecognizer::Goalpost::nonExistant, GT2005GoalRecognizer::Goalpost::onGreen, scanAlongLine(), scanOnImageBorder(), GT2005GoalRecognizer::EdgePointList::size(), GT2005GoalRecognizer::Goalpost::strongEdgeCount, ImageInfo::toHorizonAligned(), GT2005GoalRecognizer::Goalpost::topPoint, GT2005GoalRecognizer::Goalpost::topPointH, ImageInfo::vertLine, GT2005GoalRecognizer::Goalpost::visibleHeight, GT2005GoalRecognizer::Goalpost::weakEdgeCount, Vector2< int >::x, Vector2< V >::x, Vector2< double >::x, Vector2< int >::y, Vector2< V >::y, and Vector2< double >::y.

Referenced by analyzeGoal().

Here is the call graph for this function:

void GT2005GoalRecognizer::scanCrossBar GT2005GoalRecognizer::EdgeDetector detector,
Vector2< int > &  focus,
GT2005GoalRecognizer::GoalHypothesis result,
bool *  imageBorderScanned
[private]
 

Definition at line 910 of file GT2005GoalRecognizer.cpp.

References ASSERT, GT2005GoalRecognizer::EdgeDetector::clear(), GT2005GoalRecognizer::GoalHypothesis::crossBarEndpoint, GT2005GoalRecognizer::GoalHypothesis::crossBarEndpointH, GT2005GoalRecognizer::GoalHypothesis::crossBarInImage, DEBUG_RESPONSE, detectEdge(), deviationWithoutEdge, Geometry::Line::direction, DOT, edge, ImageInfo::horizon, horizonInfo, imageBorder, nearImageBorder(), Vector2< V >::normalize(), scanAlongLine(), scanOnImageBorder(), ImageInfo::toHorizonAligned(), ImageInfo::vertLine, Vector2< double >::x, Vector2< V >::x, Vector2< double >::y, and Vector2< V >::y.

Referenced by analyzeGoal().

Here is the call graph for this function:

GT2005GoalRecognizer::EdgeType GT2005GoalRecognizer::detectEdgeTwice GT2005GoalRecognizer::EdgeDetector detector,
Vector2< int > &  focus,
BresenhamLineScan scanLine,
const Vector2< int > &  scanLineOffset,
int  maxScanLength,
EdgePointList edgePoints
[private]
 

scans first from focus+scanLineOffset, using detector[0]!!

Definition at line 652 of file GT2005GoalRecognizer.cpp.

References GT2005GoalRecognizer::EdgePointList::add(), detectEdge(), EdgeType, imageBorder, and BresenhamLineScan::init().

Referenced by analyzeGoalpost().

Here is the call graph for this function:

GT2005GoalRecognizer::EdgeType GT2005GoalRecognizer::detectEdge GT2005GoalRecognizer::EdgeDetector detector,
Vector2< int > &  focus,
BresenhamLineScan direction,
int  maxScanLength,
int &  pixelsUntilEdge
[private]
 

Definition at line 1070 of file GT2005GoalRecognizer.cpp.

References COLOR_CLASS, ImageProcessorInterfaces::colorTable, ColorCorrector::correct(), deviationWithoutEdge, DOT, EdgeType, GT2005GoalRecognizer::EdgeDetector::getLastPointInClass(), BresenhamLineScan::getNext(), goalColor, horizonInfo, Image::image, ImageProcessorInterfaces::image, imageBorder, BresenhamLineScan::init(), GT2005GoalRecognizer::EdgeDetector::inspectPixel(), interfaces, ImageInfo::maxImageCoordinates, N_STUPID_DEBUG_IMAGE_SET_PIXEL, STUPID_DEBUG_IMAGE_SET_PIXEL, Vector2< int >::x, Vector2< V >::x, Vector2< int >::y, and Vector2< V >::y.

Referenced by detectEdgeTwice(), and scanCrossBar().

Here is the call graph for this function:

GT2005GoalRecognizer::EdgeType GT2005GoalRecognizer::scanAlongLine GT2005GoalRecognizer::EdgeDetector detector,
Vector2< int > &  focus,
BresenhamLineScan scanLine,
const Vector2< int > &  scanLineOffset,
int  maximumScan,
int &  pixelsScanned
[private]
 

Definition at line 1137 of file GT2005GoalRecognizer.cpp.

References COLOR_CLASS, ImageProcessorInterfaces::colorTable, ColorCorrector::correct(), edge, EdgeType, GT2005GoalRecognizer::EdgeDetector::getLastIndexInClass(), BresenhamLineScan::getNext(), goalColor, horizonInfo, Image::image, ImageProcessorInterfaces::image, imageBorder, GT2005GoalRecognizer::EdgeDetector::inspectPixel(), interfaces, ImageInfo::maxImageCoordinates, N_STUPID_DEBUG_IMAGE_SET_PIXEL, STUPID_DEBUG_IMAGE_SET_PIXEL, Vector2< int >::x, Vector2< V >::x, Vector2< int >::y, and Vector2< V >::y.

Referenced by analyzeGoalpost(), detectFreePartOfGoal(), scanCrossBar(), and scanOnImageBorder().

Here is the call graph for this function:

GT2005GoalRecognizer::ImageBorderSide GT2005GoalRecognizer::scanOnImageBorder GT2005GoalRecognizer::EdgeDetector detector,
Vector2< int > &  focus,
const Vector2< double > &  targetDirection,
int  maxBorderDistance,
bool *  scannedSides
[private]
 

case noBorder mustn't be ignored -> scanning hasn't been done before or doesn't make sense

Definition at line 739 of file GT2005GoalRecognizer.cpp.

References ASSERT, bottomBorder, DOT, horizonInfo, ImageBorderSide, leftBorder, LINE, ImageInfo::maxImageCoordinates, noBorder, rightBorder, scanAlongLine(), sgn, topBorder, Vector2< V >::x, Vector2< int >::x, Vector2< V >::y, and Vector2< int >::y.

Referenced by analyzeGoalpost(), and scanCrossBar().

Here is the call graph for this function:

bool GT2005GoalRecognizer::detectGreenBelowGoalpost Vector2< int >  bottomPoint,
const Vector2< double > &  directionOfEdge,
int  goalpostHeight
[private]
 

direction of edge normalized!! bottomPoint copied on purpose!!

Definition at line 1241 of file GT2005GoalRecognizer.cpp.

References ImageProcessorInterfaces::colorTable, CORRECTED_COLOR_CLASS, Geometry::Line::direction, BresenhamLineScan::getNext(), goalColor, horizonInfo, Image::image, ImageProcessorInterfaces::image, BresenhamLineScan::init(), interfaces, max, ImageInfo::maxImageCoordinates, N_STUPID_DEBUG_IMAGE_SET_PIXEL, STUPID_DEBUG_IMAGE_SET_PIXEL, ImageInfo::vertLine, Vector2< int >::x, Vector2< V >::x, Vector2< double >::x, Vector2< int >::y, Vector2< double >::y, and Vector2< V >::y.

Referenced by analyzeGoalpost().

Here is the call graph for this function:

bool GT2005GoalRecognizer::nearImageBorder const Vector2< int > &  point,
int  maxDistance
[inline, private]
 

Returns true if the point is within one pixel distance to the image border.

Definition at line 732 of file GT2005GoalRecognizer.h.

References horizonInfo, ImageInfo::maxImageCoordinates, point, Vector2< int >::x, and Vector2< int >::y.

Referenced by analyzeGoalpost(), inspectNeighbourhood(), and scanCrossBar().

void GT2005GoalRecognizer::mergeFragments bool *  deletedHypothesises  )  [private]
 

Definition at line 1413 of file GT2005GoalRecognizer.cpp.

References GT2005GoalRecognizer::GoalHypothesis::height, HORIZON_ALIGNED_RECTANGLE, horizonInfo, hypothesis, hypothesisCount, max, maxHypothesises, and min.

Referenced by notifyAboutFinish().

void GT2005GoalRecognizer::interpretResults GT2005GoalRecognizer::EdgeDetector detector,
bool *  deletedHypothesises
[private]
 

Definition at line 1483 of file GT2005GoalRecognizer.cpp.

References bothSides, GT2005GoalRecognizer::Goalpost::bottomPointH, GT2005GoalRecognizer::GoalHypothesis::crossBarEndpointH, DEBUG_RESPONSE, detectFreePartOfGoal(), ImageInfo::distanceTopLeftCorner, GT2005GoalRecognizer::Goalpost::edgePointH, FreeSide, GT2005GoalRecognizer::GoalHypothesis::goalpost, HORIZON_ALIGNED_RECTANGLE, horizonInfo, hypothesis, hypothesisCount, idText, leftSide, max, min, minGoalpostHeight, MODIFY, noFreeSide, GT2005GoalRecognizer::Goalpost::nonExistant, OUTPUT, publishResults(), GT2005GoalRecognizer::Goalpost::topPointH, GT2005GoalRecognizer::GoalHypothesis::width, Vector2< double >::x, and Vector2< double >::y.

Referenced by notifyAboutFinish().

Here is the call graph for this function:

void GT2005GoalRecognizer::publishResults const GT2005GoalRecognizer::GoalHypothesis goal,
const bool *  visibleGoalpost,
const GT2005GoalRecognizer::FreeSide  freeSide,
const Vector2< int > &  endpointOfFreePart,
const bool *  freePartOnImageBorder
[private]
 

Definition at line 1577 of file GT2005GoalRecognizer.cpp.

References LandmarksPercept::addGoal(), ConditionalBoundary::addX(), ConditionalBoundary::addY(), bothSides, GT2005GoalRecognizer::Goalpost::bottomPoint, GT2005GoalRecognizer::Goalpost::bottomPointH, Geometry::calculateAnglesForPoint(), Image::cameraInfo, ImageProcessorInterfaces::cameraMatrix, GT2005GoalRecognizer::Goalpost::edgePoint, GT2005GoalRecognizer::Goalpost::edgePointH, goalColor, GT2005GoalRecognizer::GoalHypothesis::goalpost, ImageInfo::horizonAlignedXOf(), horizonInfo, ImageProcessorInterfaces::image, interfaces, ImageProcessorInterfaces::landmarksPercept, leftSide, max, ImageProcessorInterfaces::obstaclesPercept, ImageInfo::previousCameraMatrix, rightSide, ObstaclesPercept::setFreePartOfGoal(), ImageInfo::toImageCoordinates(), GT2005GoalRecognizer::Goalpost::topPoint, GT2005GoalRecognizer::Goalpost::topPointH, Vector2< double >::x, Vector2< V >::x, Vector2< V >::y, and Vector2< double >::y.

Referenced by interpretResults().

Here is the call graph for this function:

GT2005GoalRecognizer::FreeSide GT2005GoalRecognizer::detectFreePartOfGoal GT2005GoalRecognizer::EdgeDetector detector,
const GT2005GoalRecognizer::GoalHypothesis goal,
int &  freeWidth,
Vector2< int > &  otherSide,
bool *  onImageBorder
[private]
 

Definition at line 1653 of file GT2005GoalRecognizer.cpp.

References bothSides, GT2005GoalRecognizer::Goalpost::bottomPointH, GT2005GoalRecognizer::EdgeDetector::clear(), ImageInfo::clipToImageBoundary(), GT2005GoalRecognizer::Goalpost::color, Geometry::Line::direction, GT2005GoalRecognizer::Goalpost::edgePointH, FreeSide, GT2005GoalRecognizer::GoalHypothesis::goalpost, GT2005GoalRecognizer::GoalHypothesis::height, GT2005GoalRecognizer::Goalpost::height, ImageInfo::horizon, horizonInfo, imageBorder, leftSide, BresenhamLineScan::numberOfPixels, rightSide, scanAlongLine(), GT2005GoalRecognizer::EdgeDetector::setReferenceColor(), ImageInfo::toImageCoordinates(), ImageInfo::vertLine, GT2005GoalRecognizer::Goalpost::visibleHeight, GT2005GoalRecognizer::GoalHypothesis::width, Vector2< double >::x, and Vector2< double >::y.

Referenced by interpretResults().

Here is the call graph for this function:

void GT2005GoalRecognizer::lockArea double  x,
double  y,
bool  onGreen
[private]
 

Definition at line 1311 of file GT2005GoalRecognizer.cpp.

References lockAreaCount, lockAreaStack, lockAreaStackSize, Vector2< double >::x, and Vector2< double >::y.

Referenced by analyzeGoal().

void GT2005GoalRecognizer::calculateLockedPixels const Vector2< int > &  scanLineStart  )  [private]
 

pop lock, chekc flag intersection, calculate locked pixels

Definition at line 1347 of file GT2005GoalRecognizer.cpp.

References flagLock, flagLockCount, frameNumberFlags, frameNumberImage, horizonInfo, Range< double >::isInside(), lockAreaCount, lockAreaStack, lockedPixels, max, ImageInfo::toHorizonAligned(), ImageInfo::toImageCoordinates(), Vector2< double >::x, Vector2< V >::x, Vector2< V >::y, and Vector2< double >::y.

Referenced by notifyAboutNewScanline().

Here is the call graph for this function:

void GT2005GoalRecognizer::recalculateLockedPixels const Vector2< int > &  currentPoint  )  [private]
 

Recalculates the number of locked pixels after a goal has been detected.

The scan will continue on the same scanline where it was before, so in this case it is not necessary to manage (i.e. remove) locked areas and to check if the scanline is near the flags.

Definition at line 1396 of file GT2005GoalRecognizer.cpp.

References ImageInfo::horizonAlignedYOf(), horizonInfo, lockAreaCount, lockAreaStack, lockedPixels, max, ImageInfo::toImageCoordinates(), Vector2< V >::x, Vector2< V >::y, and Vector2< double >::y.

Referenced by inspectPixel().

Here is the call graph for this function:

GT2005GoalRecognizer::DECLARE_DEBUG_IMAGE imageProcessorGoal1   )  [private]
 

Declare raster image which will take debug information.

NB: due to the f**king macros, I have to declare both images, even though only need one per instance.

GT2005GoalRecognizer::DECLARE_DEBUG_IMAGE imageProcessorGoal2   )  [private]
 

GT2005GoalRecognizer::N_DECLARE_DEBUG_GRAY_SCALE_IMAGE goalRecognizerYellow   )  [private]
 

GT2005GoalRecognizer::N_DECLARE_DEBUG_GRAY_SCALE_IMAGE goalRecognizerBlue   )  [private]
 


Member Data Documentation

const colorClass GT2005GoalRecognizer::goalColor [private]
 

The colour class of the goal to be detected by this object.

Definition at line 782 of file GT2005GoalRecognizer.h.

Referenced by analyzeGoal(), detectEdge(), detectGreenBelowGoalpost(), inspectNeighbourhood(), inspectPixel(), notifyAboutFinish(), notifyAboutNewImage(), publishResults(), and scanAlongLine().

const ImageProcessorInterfaces& GT2005GoalRecognizer::interfaces [private]
 

Collection of references to objects that are needed by this object, e.g.

the current image, objects used to store the processing results, etc.

Definition at line 786 of file GT2005GoalRecognizer.h.

Referenced by detectEdge(), detectGreenBelowGoalpost(), inspectNeighbourhood(), notifyAboutFlags(), notifyAboutNewImage(), publishResults(), and scanAlongLine().

const ImageInfo& GT2005GoalRecognizer::horizonInfo [private]
 

Object containing useful information related to the current horizon.

Definition at line 789 of file GT2005GoalRecognizer.h.

Referenced by analyzeGoal(), analyzeGoalpost(), calculateLockedPixels(), detectEdge(), detectFreePartOfGoal(), detectGreenBelowGoalpost(), interpretResults(), mergeFragments(), nearImageBorder(), notifyAboutFlags(), publishResults(), recalculateLockedPixels(), scanAlongLine(), scanCrossBar(), and scanOnImageBorder().

const ColorCorrector& GT2005GoalRecognizer::colorCorrector [private]
 

Reference to the color correction object.

Definition at line 792 of file GT2005GoalRecognizer.h.

int GT2005GoalRecognizer::detectionCounter [private]
 

Counter to detect accumulations of goal-coloured pixels.

Used by the method inspectPixel.

Definition at line 797 of file GT2005GoalRecognizer.h.

Referenced by inspectPixel(), notifyAboutNewImage(), and notifyAboutNewScanline().

int GT2005GoalRecognizer::lockedPixels [private]
 

Number of pixels that will not be inspected, because they are inside previously analysed areas.

Definition at line 801 of file GT2005GoalRecognizer.h.

Referenced by calculateLockedPixels(), inspectPixel(), and recalculateLockedPixels().

Vector2<double> GT2005GoalRecognizer::lockAreaStack[lockAreaStackSize] [private]
 

Definition at line 809 of file GT2005GoalRecognizer.h.

Referenced by calculateLockedPixels(), lockArea(), and recalculateLockedPixels().

int GT2005GoalRecognizer::lockAreaCount [private]
 

Definition at line 810 of file GT2005GoalRecognizer.h.

Referenced by calculateLockedPixels(), lockArea(), notifyAboutNewImage(), and recalculateLockedPixels().

Range<double> GT2005GoalRecognizer::flagLock[maxFlagLocks] [private]
 

Definition at line 815 of file GT2005GoalRecognizer.h.

Referenced by calculateLockedPixels(), and notifyAboutFlags().

int GT2005GoalRecognizer::flagLockCount [private]
 

Definition at line 816 of file GT2005GoalRecognizer.h.

Referenced by calculateLockedPixels(), notifyAboutFlags(), and notifyAboutNewImage().

unsigned long GT2005GoalRecognizer::frameNumberImage [private]
 

Definition at line 817 of file GT2005GoalRecognizer.h.

Referenced by calculateLockedPixels(), and notifyAboutNewImage().

unsigned long GT2005GoalRecognizer::frameNumberFlags [private]
 

Definition at line 817 of file GT2005GoalRecognizer.h.

Referenced by calculateLockedPixels(), and notifyAboutFlags().

GoalHypothesis GT2005GoalRecognizer::hypothesis[maxHypothesises] [private]
 

Definition at line 822 of file GT2005GoalRecognizer.h.

Referenced by analyzeGoal(), interpretResults(), and mergeFragments().

int GT2005GoalRecognizer::hypothesisCount [private]
 

Definition at line 823 of file GT2005GoalRecognizer.h.

Referenced by analyzeGoal(), interpretResults(), mergeFragments(), and notifyAboutNewImage().


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