#include <BallPercept.h>
Definition at line 32 of file BallPercept.h.
BallPercept::BallPercept | ( | ) | [inline] |
BallPercept::BallPercept | ( | const BallPercept & | other | ) | [inline] |
Definition at line 39 of file BallPercept.h.
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().
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().
The center of the ball in pixel coords
Definition at line 85 of file BallPercept.h.
Referenced by add(), getOffsetIntrinsic(), operator<<(), operator=(), and operator>>().
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().
The radius of the ball in pixels
Definition at line 88 of file BallPercept.h.
Referenced by getOffsetIntrinsic(), operator<<(), operator=(), and operator>>().
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().
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>>().
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>>().
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>>().