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

# Modules/ImageProcessor/GT2005ImageProcessor/GT2005GoalRecognizer.cpp File Reference

Implementation of class GT2005GoalRecognizer. More...

`#include "Tools/ColorClasses.h"`
`#include "Tools/Math/Geometry.h"`
`#include "Tools/Debugging/DebugImages.h"`
`#include "Tools/Debugging/DebugDrawings.h"`
`#include "Platform/GTAssert.h"`
`#include "Representations/Perception/LandmarksPercept.h"`
`#include "GT2005ImageProcessorTools.h"`
`#include "GT2005GoalRecognizer.h"`

Include dependency graph for GT2005GoalRecognizer.cpp:

Go to the source code of this file.

## Defines
#define | HORIZON_ALIGNED_RECTANGLE(horizoninfo, id, x1, y1, x2, y2, penwidth, penstyle, pencolor, cross)
| Macro to draw a rectangle that is given in horizon-aligned coordinates.
## Enumerations
enum | parameters { maxScanLengthToGoalpostEdge = 14, minGoalpostHeight = 7 }
| Parameters. More...

## Detailed Description

Implementation of class GT2005GoalRecognizer.

Author:
  Tobias Oberlies

Definition in file GT2005GoalRecognizer.cpp.

## Define Documentation

#define HORIZON_ALIGNED_RECTANGLE | ( | horizoninfo,
|  | id,
|  | x1,
|  | y1,
|  | x2,
|  | y2,
|  | penwidth,
|  | penstyle,
|  | pencolor,
|  | cross |  | ) |

| Value:
    { \
        Vector2<int> _topleft = horizoninfo.toImageCoordinates(x1, y1); \
        Vector2<int> _bottomleft = horizonInfo.toImageCoordinates(x1, y2); \
        Vector2<int> _bottomright = horizoninfo.toImageCoordinates(x2, y2); \
        Vector2<int> _topright = horizoninfo.toImageCoordinates(x2, y1); \
        QUADRANGLE(imageProcessor_flagsAndGoals, _topleft.x, _topleft.y, _bottomleft.x, _bottomleft.y, _bottomright.x, _bottomright.y, _topright.x, _topright.y, penwidth, penstyle, pencolor); \
        NQUADRANGLE(id, _topleft.x, _topleft.y, _bottomleft.x, _bottomleft.y, _bottomright.x, _bottomright.y, _topright.x, _topright.y, penwidth, penstyle, pencolor); \
        if (cross) \
        { \
          NLINE(id, _topleft.x, _topleft.y, _bottomright.x, _bottomright.y, penwidth, penstyle, pencolor); \
          NLINE(id, _bottomleft.x, _bottomleft.y, _topright.x, _topright.y, penwidth, penstyle, pencolor); \
        } \
      }
  Macro to draw a rectangle that is given in horizon-aligned coordinates. Parameters:
  horizoninfo | The current ImageInfo instance.
  x1,y1,x2,y2 | The coordinates of 2 opposite corners in horizon-aligned coordinates.
  penwidth | The line width.
  penstyle | The line style, e.g. ls_solid.
  pencolor | The drawing colour.
Definition at line 56 of file GT2005GoalRecognizer.cpp. Referenced by VLCGoalRecognizer::analyzeGoal(), GT2005GoalRecognizer::analyzeGoal(), VLCGoalRecognizer::interpretResults(), GT2005GoalRecognizer::interpretResults(), and GT2005GoalRecognizer::mergeFragments().

## Enumeration Type Documentation

enum parameters

  | Parameters. Enumeration values:
  maxScanLengthToGoalpostEdge | The maximal length of a scanline towards the edge. If no edge is detected within this range, it is assumed, that the current focus is nowhere near the goalpost and goalpost detection will be cancelled.
  minGoalpostHeight | Goal hypotheses flatter than this value are not considered to be goals.
Definition at line 31 of file GT2005GoalRecognizer.cpp.