BallPercept Class Reference

#include <BallPercept.h>

List of all members.

Public Member Functions

 BallPercept ()
 BallPercept (const BallPercept &other)
BallPerceptoperator= (const BallPercept &other)
void reset (unsigned long frameNumber)
void add (Vector2< double > anglesToCenter, double ballRadiusAsAngle, Vector3< double > translationOfCamera, bool isCameraMatrixValid)
void add (CameraInfo cameraInfo, Vector2< int > ballCenter, double ballRadiusInPixel, Vector2< double > anglesToCenter, double ballRadiusAsAngle, Vector3< double > translationOfCamera, bool isCameraMatrixValid)
void checkOffset (Vector2< double > &offset) const
double getAngle () const
double getDistance () const
double getAngleBearingBased () const
double getDistanceBearingBased () const
double getAngleSizeBased () const
double getDistanceSizeBased () const
double getAngleIntrinsicBased () const
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

Public Attributes

bool ballWasSeen
unsigned long frameNumber
Vector2< double > anglesToCenter
Vector3< double > translationOfCamera
double ballRadiusAsAngle
Vector2< int > ballCenter
double ballRadiusInPixel
bool isCameraMatrixValid
CameraInfo cameraInfo


Detailed Description

Contains a percept for a ball

Definition at line 32 of file BallPercept.h.


Constructor & Destructor Documentation

BallPercept::BallPercept (  )  [inline]

Constructor.

Definition at line 38 of file BallPercept.h.

References reset().

BallPercept::BallPercept ( const BallPercept other  )  [inline]

Definition at line 39 of file BallPercept.h.


Member Function Documentation

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.

References anglesToCenter, ballCenter, ballWasSeen, cameraInfo, and translationOfCamera.

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.

References anglesToCenter, ballWasSeen, and translationOfCamera.

Referenced by RBallSpecialist2::addBallPercept(), and GT2004BallSpecialist::addBallPercept().

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

Definition at line 97 of file BallPercept.h.

References getRobotConfiguration(), Vector2< V >::x, and Vector2< V >::y.

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

double BallPercept::getAngle (  )  const

Definition at line 151 of file BallPercept.cpp.

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

Referenced by CValueHistoryDlgBar::handleMessage().

double BallPercept::getAngleBearingBased (  )  const

Definition at line 172 of file BallPercept.cpp.

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

Referenced by CValueHistoryDlgBar::handleMessage().

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().

double BallPercept::getAngleSizeBased (  )  const

Definition at line 179 of file BallPercept.cpp.

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

Referenced by GT2004BallLocator::execute(), and CValueHistoryDlgBar::handleMessage().

double BallPercept::getDistance (  )  const

Definition at line 144 of file BallPercept.cpp.

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

Referenced by GT2004BallLocator::execute(), and CValueHistoryDlgBar::handleMessage().

double BallPercept::getDistanceBearingBased (  )  const

Definition at line 158 of file BallPercept.cpp.

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

Referenced by CValueHistoryDlgBar::handleMessage().

double BallPercept::getDistanceIntrinsicBased (  )  const

Definition at line 186 of file BallPercept.cpp.

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

double BallPercept::getDistanceSizeBased (  )  const

Definition at line 165 of file BallPercept.cpp.

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

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

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

Definition at line 127 of file BallPercept.cpp.

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

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

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

Definition at line 62 of file BallPercept.cpp.

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

Referenced by getAngleBearingBased(), getDistanceBearingBased(), getOffset(), CValueHistoryDlgBar::handleMessage(), DrawingMethods::paintBallPerceptForFieldView(), PaintMethodsWin32::paintBallPerceptToCDC(), and OpenGLMethods::paintBallPerceptToOpenGLList().

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, Vector3< V >::x, Vector2< V >::x, Vector3< V >::y, Vector2< V >::y, and Vector3< V >::z.

Referenced by getAngleIntrinsicBased(), and getDistanceIntrinsicBased().

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

Definition at line 106 of file BallPercept.cpp.

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

Referenced by getAngleSizeBased(), getDistanceSizeBased(), getOffset(), DrawingMethods::paintBallPerceptForFieldView(), PaintMethodsWin32::paintBallPerceptToCDC(), and OpenGLMethods::paintBallPerceptToOpenGLList().

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 46 of file BallPercept.h.

References ballWasSeen.

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


Member Data Documentation

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 71 of file BallPercept.h.

Referenced by add(), getOffset(), getOffsetBearingBased(), getOffsetIntrinsic(), getOffsetSizeBased(), operator<<(), operator=(), operator>>(), and DrawingMethods::paintBallPerceptForImageView().

Vector2<int> BallPercept::ballCenter

The center of the ball in pixel coords

Definition at line 85 of file BallPercept.h.

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

double BallPercept::ballRadiusAsAngle

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

Definition at line 81 of file BallPercept.h.

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

double BallPercept::ballRadiusInPixel

The radius of the ball in pixels

Definition at line 88 of file BallPercept.h.

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

bool BallPercept::ballWasSeen

Indicates if the ball was seen.

Definition at line 42 of file BallPercept.h.

Referenced by add(), GT2004BallLocator::determineNumberOfImagesWith_WithoutBall(), GT2004BallLocator::execute(), CValueHistoryDlgBar::handleMessage(), operator<<(), operator=(), operator>>(), DrawingMethods::paintBallPerceptForFieldView(), DrawingMethods::paintBallPerceptForImageView(), and reset().

CameraInfo BallPercept::cameraInfo

Definition at line 93 of file BallPercept.h.

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

unsigned long BallPercept::frameNumber

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

Definition at line 43 of file BallPercept.h.

Referenced by CValueHistoryDlgBar::handleMessage(), CRadarViewerDlgBar::handleMessage(), CStatisticsDlgBar::handleMessagePercepts(), operator<<(), operator=(), and operator>>().

bool BallPercept::isCameraMatrixValid

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

Definition at line 91 of file BallPercept.h.

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

Vector3<double> BallPercept::translationOfCamera

The translation of the camera relative to the robot.

Definition at line 76 of file BallPercept.h.

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


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:18:58 2006 for DT2005.panorama by  doxygen 1.4.7