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

BallPercept Class Reference

Contains a percept for a ball. More...

#include <BallPercept.h>

Collaboration diagram for BallPercept:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BallPercept ()
 Constructor.

 BallPercept (const BallPercept &other)
BallPerceptoperator= (const BallPercept &other)
void reset (unsigned long frameNumber)
 The functions resets the percept.

void add (Vector2< double > anglesToCenter, double ballRadiusAsAngle, Vector3< double > translationOfCamera, bool isCameraMatrixValid)
 The function adds a seen ball to the percept.

void add (CameraInfo cameraInfo, Vector2< int > ballCenter, double ballRadiusInPixel, Vector2< double > anglesToCenter, double ballRadiusAsAngle, Vector3< double > translationOfCamera, bool isCameraMatrixValid)
 Adds a seen ball to the percept, specifing its center and radius in image coords.

double getAngle () const
double getDistance () const
double getAngleBearingBased () const
double getDistanceBearingBased () const
double getAngleSizeBased () const
double getDistanceSizeBased () const
double getAngleIntrinsicBased () const
 The following methods are calculating the ball position based on size, position in image plane coords and camera intrinsic parameters.

double getDistanceIntrinsicBased () const
void getOffset (Vector2< double > &offset) const
void getOffsetSizeBased (Vector2< double > &offset) const
void getOffsetBearingBased (Vector2< double > &offset) const
void getOffsetIntrinsic (Vector2< double > &offset) const
 Calculates ball position based on intrinsic camera parameters, instead of opening angle width.


Public Attributes

bool ballWasSeen
 Indicates if the ball was seen.

unsigned long frameNumber
 The frame number of the image that was used to create the percept.

Vector2< double > anglesToCenter
 The horizontal and the vertical angle from the camera to the ball.

Vector3< double > translationOfCamera
 The translation of the camera relative to the robot.

double ballRadiusAsAngle
 The radius of the ball in the image (measure: angle).

Vector2< int > ballCenter
 The center of the ball in pixel coords.

double ballRadiusInPixel
 The radius of the ball in pixels.

bool isCameraMatrixValid
 Indicates, if the camera matrix was reliable when the percept was created.

CameraInfo cameraInfo

Private Member Functions

void checkOffset (Vector2< double > &offset) const

Detailed Description

Contains a percept for a ball.

Definition at line 25 of file BallPercept.h.


Constructor & Destructor Documentation

BallPercept::BallPercept  )  [inline]
 

Constructor.

Definition at line 31 of file BallPercept.h.

References reset().

Here is the call graph for this function:

BallPercept::BallPercept const BallPercept other  )  [inline]
 

Definition at line 32 of file BallPercept.h.


Member Function Documentation

BallPercept & BallPercept::operator= const BallPercept other  ) 
 

Definition at line 14 of file BallPercept.cpp.

References anglesToCenter, ballCenter, ballRadiusAsAngle, ballRadiusInPixel, ballWasSeen, cameraInfo, frameNumber, isCameraMatrixValid, and translationOfCamera.

void BallPercept::reset unsigned long  frameNumber  )  [inline]
 

The functions resets the percept.

Definition at line 39 of file BallPercept.h.

Referenced by BallPercept(), GT2004ImageProcessor::execute(), and RasterImageProcessor::init().

void BallPercept::add Vector2< double >  anglesToCenter,
double  ballRadiusAsAngle,
Vector3< double >  translationOfCamera,
bool  isCameraMatrixValid
 

The function adds a seen ball to the percept.

Definition at line 28 of file BallPercept.cpp.

Referenced by RBallSpecialist2::addBallPercept().

void BallPercept::add CameraInfo  cameraInfo,
Vector2< int >  ballCenter,
double  ballRadiusInPixel,
Vector2< double >  anglesToCenter,
double  ballRadiusAsAngle,
Vector3< double >  translationOfCamera,
bool  isCameraMatrixValid
 

Adds a seen ball to the percept, specifing its center and radius in image coords.

Definition at line 42 of file BallPercept.cpp.

void BallPercept::checkOffset Vector2< double > &  offset  )  const [inline, private]
 

Definition at line 90 of file BallPercept.h.

References getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), RobotDimensions::lowerBodyWidth, Vector2< V >::x, and Vector2< V >::y.

Referenced by getOffsetBearingBased(), getOffsetIntrinsic(), and getOffsetSizeBased().

Here is the call graph for this function:

double BallPercept::getAngle  )  const
 

Definition at line 151 of file BallPercept.cpp.

References Vector2< V >::angle(), and getOffset().

Here is the call graph for this function:

double BallPercept::getDistance  )  const
 

Definition at line 144 of file BallPercept.cpp.

References Vector2< V >::abs(), and getOffset().

Referenced by GT2004BallLocator::execute().

Here is the call graph for this function:

double BallPercept::getAngleBearingBased  )  const
 

Definition at line 172 of file BallPercept.cpp.

References Vector2< V >::angle(), and getOffsetBearingBased().

Here is the call graph for this function:

double BallPercept::getDistanceBearingBased  )  const
 

Definition at line 158 of file BallPercept.cpp.

References Vector2< V >::abs(), and getOffsetBearingBased().

Here is the call graph for this function:

double BallPercept::getAngleSizeBased  )  const
 

Definition at line 179 of file BallPercept.cpp.

References Vector2< V >::angle(), and getOffsetSizeBased().

Referenced by GT2004BallLocator::execute().

Here is the call graph for this function:

double BallPercept::getDistanceSizeBased  )  const
 

Definition at line 165 of file BallPercept.cpp.

References Vector2< V >::abs(), and getOffsetSizeBased().

Referenced by GT2004BallLocator::execute(), and getOffset().

Here is the call graph for this function:

double BallPercept::getAngleIntrinsicBased  )  const
 

The following methods are calculating the ball position based on size, position in image plane coords and camera intrinsic parameters.

Definition at line 193 of file BallPercept.cpp.

References Vector2< V >::angle(), and getOffsetIntrinsic().

Here is the call graph for this function:

double BallPercept::getDistanceIntrinsicBased  )  const
 

Definition at line 186 of file BallPercept.cpp.

References Vector2< V >::abs(), and getOffsetIntrinsic().

Here is the call graph for this function:

void BallPercept::getOffset Vector2< double > &  offset  )  const
 

Definition at line 127 of file BallPercept.cpp.

References anglesToCenter, getDistanceSizeBased(), getOffsetBearingBased(), getOffsetSizeBased(), isCameraMatrixValid, and Vector2< double >::y.

Referenced by GT2004BallLocator::execute(), getAngle(), getDistance(), and GT2004BallLocator::handleSeenBall().

Here is the call graph for this function:

void BallPercept::getOffsetSizeBased Vector2< double > &  offset  )  const
 

Definition at line 106 of file BallPercept.cpp.

References anglesToCenter, ballRadiusAsAngle, checkOffset(), Geometry::getBallDistanceByAngleSize(), sqr, translationOfCamera, Vector2< double >::x, Vector3< double >::x, Vector2< V >::x, Vector3< double >::y, Vector2< V >::y, and Vector3< double >::z.

Referenced by getAngleSizeBased(), getDistanceSizeBased(), and getOffset().

Here is the call graph for this function:

void BallPercept::getOffsetBearingBased Vector2< double > &  offset  )  const
 

Definition at line 62 of file BallPercept.cpp.

References anglesToCenter, checkOffset(), translationOfCamera, Vector2< double >::x, Vector3< double >::x, Vector2< V >::x, Vector3< double >::y, Vector2< V >::y, Vector2< double >::y, and Vector3< double >::z.

Referenced by getAngleBearingBased(), getDistanceBearingBased(), and getOffset().

Here is the call graph for this function:

void BallPercept::getOffsetIntrinsic Vector2< double > &  offset  )  const
 

Calculates ball position based on intrinsic camera parameters, instead of opening angle width.

Definition at line 79 of file BallPercept.cpp.

References anglesToCenter, ballCenter, ballRadiusInPixel, cameraInfo, checkOffset(), Geometry::getDistanceBySize(), sqr, translationOfCamera, Vector2< double >::x, Vector3< double >::x, Vector2< V >::x, Vector2< int >::x, Vector3< double >::y, Vector2< V >::y, Vector2< int >::y, and Vector3< double >::z.

Referenced by getAngleIntrinsicBased(), and getDistanceIntrinsicBased().

Here is the call graph for this function:


Member Data Documentation

bool BallPercept::ballWasSeen
 

Indicates if the ball was seen.

Definition at line 35 of file BallPercept.h.

Referenced by GT2004BallLocator::determineNumberOfImagesWith_WithoutBall(), GT2004BallLocator::execute(), operator<<(), operator=(), and operator>>().

unsigned long BallPercept::frameNumber
 

The frame number of the image that was used to create the percept.

Definition at line 36 of file BallPercept.h.

Referenced by operator<<(), operator=(), and operator>>().

Vector2<double> BallPercept::anglesToCenter
 

The horizontal and the vertical angle from the camera to the ball.

The reference is not the optical axis but the axes of the coordinate system of the robot.

Definition at line 64 of file BallPercept.h.

Referenced by getOffset(), getOffsetBearingBased(), getOffsetIntrinsic(), getOffsetSizeBased(), operator<<(), operator=(), and operator>>().

Vector3<double> BallPercept::translationOfCamera
 

The translation of the camera relative to the robot.

Definition at line 69 of file BallPercept.h.

Referenced by getOffsetBearingBased(), getOffsetIntrinsic(), getOffsetSizeBased(), operator<<(), operator=(), and operator>>().

double BallPercept::ballRadiusAsAngle
 

The radius of the ball in the image (measure: angle).

Definition at line 74 of file BallPercept.h.

Referenced by getOffsetSizeBased(), operator<<(), operator=(), and operator>>().

Vector2<int> BallPercept::ballCenter
 

The center of the ball in pixel coords.

Definition at line 78 of file BallPercept.h.

Referenced by getOffsetIntrinsic(), operator<<(), operator=(), and operator>>().

double BallPercept::ballRadiusInPixel
 

The radius of the ball in pixels.

Definition at line 81 of file BallPercept.h.

Referenced by getOffsetIntrinsic(), operator<<(), operator=(), and operator>>().

bool BallPercept::isCameraMatrixValid
 

Indicates, if the camera matrix was reliable when the percept was created.

Definition at line 84 of file BallPercept.h.

Referenced by getOffset(), operator<<(), operator=(), and operator>>().

CameraInfo BallPercept::cameraInfo
 

Definition at line 86 of file BallPercept.h.

Referenced by getOffsetIntrinsic(), operator<<(), operator=(), and operator>>().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:04:19 2004 for GT2004 by doxygen 1.3.6