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

# BallPercept Class Reference

`#include <BallPercept.h>`

Inheritance diagram for BallPercept:

[legend]
Collaboration diagram for BallPercept:

[legend]
List of all members.

## Public Member Functions
| BallPercept ()
| Constructor.
void | reset (unsigned long frameNumber)
| The functions resets the percept.
void | add (const Vector2< double > &offsetOnField, const Vector2< double > &bearingBasedOffsetOnField, const Vector2< double > &sizeBasedOffsetOnField, const Vector2< double > &centerInImage, double radiusInImage, double reliability, bool isCameraMatrixValid)
| The function adds a seen ball to the percept.
void | addHighRes (const Vector2< int > &centerInPixel, const Vector2< double > &centerAsAngles, double radiusInPixel, double radiusAsAngle, const Vector3< double > &translationOfCamera, bool isCameraMatrixValid, double reliability)
| Adds a seen ball to the percept, specifing its center and radius in image coords and additionally its reliability.
## Public Attributes
bool | ballWasSeen
| Indicates if the ball was seen.
Vector2< double > | offsetOnField
| Ball offset based interpolated between size based and bearing based.
Vector2< double > | bearingBasedOffsetOnField
| Ball offset based on intersection with the field plane.
Vector2< double > | sizeBasedOffsetOnField
| Ball offset based on the size in the image.
Vector2< double > | centerInImage
| The center of the ball in image coordinates.
double | radiusInImage
| The center of the ball in image coordinates.
double | reliability
| The reliability of the percept.
bool | isCameraMatrixValid
| Indicates, whether the camera matrix was reliable when the percept was created.
MultipleBallPerceptList | multiplePercepts
| Array stores the multiple ball percepts, ordered by reliability.
unsigned long | frameNumber
| The frame number of the image that was used to create the percept.
## Private Member Functions
void | serialize (In *in, Out *out)
void | checkOffset (Vector2< double > &offset) const

## Constructor & Destructor Documentation

BallPercept::BallPercept | ( |  | ) |

| Constructor. Definition at line 19 of file BallPercept.cpp. References reset().

Here is the call graph for this function:

## Member Function Documentation

void BallPercept::serialize | ( | In * | in,
|  | Out * | out
| ) | `[inline, private, virtual]`

| Implements Streamable. Definition at line 31 of file BallPercept.h. References bearingBasedOffsetOnField, centerInImage, isCameraMatrixValid, multiplePercepts, offsetOnField, radiusInImage, reliability, sizeBasedOffsetOnField, STREAM, STREAM_REGISTER_BEGIN, and STREAM_REGISTER_FINISH.

void BallPercept::reset | ( | unsigned long | frameNumber | ) | `[inline]`

| The functions resets the percept. Definition at line 54 of file BallPercept.h. Referenced by BallPercept(), VLCImageProcessor::execute(), SlamImageProcessor::execute(), and GT2005ImageProcessor::execute().

void BallPercept::add | ( | const Vector2< double > & | offsetOnField,
|  | const Vector2< double > & | bearingBasedOffsetOnField,
|  | const Vector2< double > & | sizeBasedOffsetOnField,
|  | const Vector2< double > & | centerInImage,
|  | double | radiusInImage,
|  | double | reliability,
|  | bool | isCameraMatrixValid
| ) |

| The function adds a seen ball to the percept. Definition at line 24 of file BallPercept.cpp. Referenced by addHighRes().

void BallPercept::addHighRes | ( | const Vector2< int > & | centerInPixel,
|  | const Vector2< double > & | centerAsAngles,
|  | double | radiusInPixel,
|  | double | radiusAsAngle,
|  | const Vector3< double > & | translationOfCamera,
|  | bool | isCameraMatrixValid,
|  | double | reliability
| ) |

| Adds a seen ball to the percept, specifing its center and radius in image coords and additionally its reliability. Definition at line 42 of file BallPercept.cpp. References Vector2< V >::abs(), add(), checkOffset(), Geometry::getBallDistanceByAngleSize(), sqr, Vector3< V >::x, Vector2< V >::x, Vector3< V >::y, Vector2< V >::y, and Vector3< V >::z. Referenced by VLCBallSpecialist::addBallPercept(), and GT2005BallSpecialist::addBallPercept().

Here is the call graph for this function:

void BallPercept::checkOffset | ( | Vector2< double > & | offset | ) | const`[private]`

| Definition at line 115 of file BallPercept.cpp. References getRobotConfiguration(), RobotConfiguration::getRobotDimensions(), RobotDimensions::lowerBodyWidth, Vector2< V >::x, and Vector2< V >::y. Referenced by addHighRes().

Here is the call graph for this function:

## Member Data Documentation

bool BallPercept::ballWasSeen

| Indicates if the ball was seen. Definition at line 74 of file BallPercept.h. Referenced by GT2005BallLocator::execute(), Cognition::main(), and GT2005BallLocator::setBallSymbols().

Vector2<double> BallPercept::offsetOnField

| Ball offset based interpolated between size based and bearing based. Definition at line 75 of file BallPercept.h. Referenced by VLCBallSpecialist::addBallPercept(), GT2005BallSpecialist::addBallPercept(), GT2005BallLocator::execute(), and serialize().

Vector2<double> BallPercept::bearingBasedOffsetOnField

| Ball offset based on intersection with the field plane. Definition at line 76 of file BallPercept.h. Referenced by serialize().

Vector2<double> BallPercept::sizeBasedOffsetOnField

| Ball offset based on the size in the image. Definition at line 77 of file BallPercept.h. Referenced by serialize(), and GT2005BallLocator::setBallSymbols().

Vector2<double> BallPercept::centerInImage

| The center of the ball in image coordinates. Definition at line 78 of file BallPercept.h. Referenced by VLCBallSpecialist::addBallPercept(), GT2005BallSpecialist::addBallPercept(), and serialize().

double BallPercept::radiusInImage

| The center of the ball in image coordinates. Definition at line 79 of file BallPercept.h. Referenced by VLCBallSpecialist::addBallPercept(), GT2005BallSpecialist::addBallPercept(), and serialize().

double BallPercept::reliability

| The reliability of the percept. Definition at line 80 of file BallPercept.h. Referenced by VLCBallSpecialist::addBallPercept(), GT2005BallSpecialist::addBallPercept(), GT2005BallLocator::execute(), serialize(), and GT2005BallLocator::setBallSymbols().

bool BallPercept::isCameraMatrixValid

| Indicates, whether the camera matrix was reliable when the percept was created. Definition at line 81 of file BallPercept.h. Referenced by serialize().

MultipleBallPerceptList BallPercept::multiplePercepts

| Array stores the multiple ball percepts, ordered by reliability. Definition at line 82 of file BallPercept.h. Referenced by GT2005BallLocator::draw(), GT2005BallLocator::execute(), VLCBallSpecialist::forwardPercept(), GT2005BallSpecialist::forwardPercept(), VLCBallSpecialist::resetMultiplePerceptsList(), GT2005BallSpecialist::resetMultiplePerceptsList(), and serialize().

unsigned long BallPercept::frameNumber

| The frame number of the image that was used to create the percept. Definition at line 83 of file BallPercept.h.

The documentation for this class was generated from the following files:

- Representations/Perception/BallPercept.h
- Representations/Perception/BallPercept.cpp