BackProjectionPositionModel Class Reference
This model uses a ProjectiveCam to back project points in the image to the world by the ground plane assumption. More...
#include <back_projection.h>

Public Member Functions | |
| BackProjectionPositionModel (ProjectiveCam &projective_cam, float ball_circumference=0.f) | |
| Constructor. | |
| virtual const char * | get_name () const |
| Get name of relative position model. | |
| virtual void | set_radius (float r) |
| Set radius of a found circle. | |
| virtual void | set_center (float x, float y) |
| Set center of a found circle. | |
| virtual void | set_center (const center_in_roi_t &c) |
| Set center of a found circle. | |
| virtual void | set_pan_tilt (float pan=0.0f, float tilt=0.0f) |
| Set camera pan and tilt. | |
| virtual void | get_pan_tilt (float *pan, float *tilt) const |
| Get camera pan tilt. | |
| virtual void | set_cam_rotation (float pan=0.f, float tilt=0.f, float roll=0.f) |
| Sets the camera orientation. | |
| virtual void | get_cam_rotation (float &pan, float &tilt, float &roll) const |
| Returns the camera orientation. | |
| virtual void | set_cam_translation (float height, float rel_x=0.f, float rel_y=0.f) |
| Sets the current translation of the camera. | |
| virtual void | get_cam_translation (float &height, float &rel_x, float &rel_y) const |
| Returns the current translation of the camera. | |
| virtual float | get_distance () const |
| Get distance to object. | |
| virtual float | get_x () const |
| Get relative X coordinate of object. | |
| virtual float | get_y () const |
| Get relative Y coordinate of object. | |
| virtual float | get_bearing () const |
| Get bearing (horizontal angle) to object. | |
| virtual float | get_slope () const |
| Get slope (vertical angle) to object. | |
| virtual void | calc () |
| Calculate position data. | |
| virtual void | calc_unfiltered () |
| Calculate data unfiltered. | |
| virtual void | reset () |
| Reset all data. | |
| virtual bool | is_pos_valid () const |
| Check if position is valid. | |
Detailed Description
This model uses a ProjectiveCam to back project points in the image to the world by the ground plane assumption.
Definition at line 30 of file back_projection.h.
Constructor & Destructor Documentation
| BackProjectionPositionModel::BackProjectionPositionModel | ( | ProjectiveCam & | projective_cam, | |
| float | ball_circumference = 0.f | |||
| ) |
Constructor.
- Parameters:
-
projective_cam the projective camera object ball_circumference the circumference in case it's a ball
Definition at line 38 of file back_projection.cpp.
References center_in_roi_t::x, and center_in_roi_t::y.
Member Function Documentation
| void BackProjectionPositionModel::calc | ( | ) | [virtual] |
Calculate position data.
Call this method if all relevant data (set(Radius|Center|PanTilt)) has been set, after this valid data can be retrieved via get*
Implements RelativePositionModel.
Definition at line 103 of file back_projection.cpp.
References ProjectiveCam::get_GPA_world_coord(), fawkes::point_6D_struct::pitch, fawkes::point_6D_struct::roll, ProjectiveCam::set_location(), fawkes::cart_coord_2d_t::x, fawkes::point_6D_struct::x, fawkes::cart_coord_2d_t::y, fawkes::point_6D_struct::y, fawkes::point_6D_struct::yaw, and fawkes::point_6D_struct::z.
Referenced by calc_unfiltered().
| virtual void BackProjectionPositionModel::calc_unfiltered | ( | ) | [inline, virtual] |
Calculate data unfiltered.
Same as calc(), but without any filtering (i.e. no Kalman filter).
Implements RelativePositionModel.
Definition at line 58 of file back_projection.h.
References calc().
| virtual float BackProjectionPositionModel::get_bearing | ( | void | ) | const [inline, virtual] |
Get bearing (horizontal angle) to object.
- Returns:
- bearing in rad
Implements RelativePositionModel.
Definition at line 54 of file back_projection.h.
| void BackProjectionPositionModel::get_cam_rotation | ( | float & | pan, | |
| float & | tilt, | |||
| float & | roll | |||
| ) | const [virtual] |
Returns the camera orientation.
- Parameters:
-
pan pan value (rad) tilt tilt value (rad) roll roll value (rad)
Reimplemented from RelativePositionModel.
Definition at line 80 of file back_projection.cpp.
References fawkes::point_6D_struct::pitch, fawkes::point_6D_struct::roll, and fawkes::point_6D_struct::yaw.
Referenced by get_pan_tilt().
| void BackProjectionPositionModel::get_cam_translation | ( | float & | height, | |
| float & | rel_x, | |||
| float & | rel_y | |||
| ) | const [virtual] |
Returns the current translation of the camera.
- Parameters:
-
height height of the camera [m] rel_x distance to the center of the robot [m] rel_y distance to the center of the robot [m]
Reimplemented from RelativePositionModel.
Definition at line 94 of file back_projection.cpp.
References fawkes::point_6D_struct::x, fawkes::point_6D_struct::y, and fawkes::point_6D_struct::z.
| virtual float BackProjectionPositionModel::get_distance | ( | ) | const [inline, virtual] |
Get distance to object.
- Returns:
- distance to object in meters.
Implements RelativePositionModel.
Definition at line 51 of file back_projection.h.
| virtual const char* BackProjectionPositionModel::get_name | ( | void | ) | const [inline, virtual] |
Get name of relative position model.
- Returns:
- name of relative position model
Implements RelativePositionModel.
Definition at line 37 of file back_projection.h.
| void BackProjectionPositionModel::get_pan_tilt | ( | float * | pan, | |
| float * | tilt | |||
| ) | const [virtual] |
Get camera pan tilt.
- Parameters:
-
pan contains pan value (rad) upon return tilt contains tilt value (rad) upon return
Implements RelativePositionModel.
Definition at line 74 of file back_projection.cpp.
References get_cam_rotation().
| virtual float BackProjectionPositionModel::get_slope | ( | ) | const [inline, virtual] |
Get slope (vertical angle) to object.
- Returns:
- slope in rad
Implements RelativePositionModel.
Definition at line 55 of file back_projection.h.
| virtual float BackProjectionPositionModel::get_x | ( | void | ) | const [inline, virtual] |
Get relative X coordinate of object.
- Returns:
- relative X coordinate in local metric cartesian coordinate system
Implements RelativePositionModel.
Definition at line 52 of file back_projection.h.
| virtual float BackProjectionPositionModel::get_y | ( | void | ) | const [inline, virtual] |
Get relative Y coordinate of object.
- Returns:
- relative Y coordinate in local metric cartesian coordinate system
Implements RelativePositionModel.
Definition at line 53 of file back_projection.h.
| virtual bool BackProjectionPositionModel::is_pos_valid | ( | ) | const [inline, virtual] |
Check if position is valid.
- Returns:
- true, if the calculated position is valid, false otherwise
Implements RelativePositionModel.
Definition at line 61 of file back_projection.h.
| void BackProjectionPositionModel::reset | ( | ) | [virtual] |
Reset all data.
This must be called if the object is not visible.
Implements RelativePositionModel.
Definition at line 137 of file back_projection.cpp.
| void BackProjectionPositionModel::set_cam_rotation | ( | float | pan = 0.f, |
|
| float | tilt = 0.f, |
|||
| float | roll = 0.f | |||
| ) | [virtual] |
Sets the camera orientation.
- Parameters:
-
pan pan value (rad) tilt tilt value (rad) roll roll value (rad)
Reimplemented from RelativePositionModel.
Definition at line 67 of file back_projection.cpp.
References fawkes::point_6D_struct::pitch, fawkes::point_6D_struct::roll, and fawkes::point_6D_struct::yaw.
Referenced by set_pan_tilt().
| void BackProjectionPositionModel::set_cam_translation | ( | float | height, | |
| float | rel_x = 0.f, |
|||
| float | rel_y = 0.f | |||
| ) | [virtual] |
Sets the current translation of the camera.
- Parameters:
-
height height of the camera [m] rel_x distance to the center of the robot [m] rel_y distance to the center of the robot [m]
Reimplemented from RelativePositionModel.
Definition at line 87 of file back_projection.cpp.
References fawkes::point_6D_struct::x, fawkes::point_6D_struct::y, and fawkes::point_6D_struct::z.
| virtual void BackProjectionPositionModel::set_center | ( | const center_in_roi_t & | c | ) | [inline, virtual] |
Set center of a found circle.
This is especially used for ball position implementations.
- Parameters:
-
c center
Implements RelativePositionModel.
Definition at line 40 of file back_projection.h.
References set_center(), center_in_roi_t::x, and center_in_roi_t::y.
Referenced by set_center().
| void BackProjectionPositionModel::set_center | ( | float | x, | |
| float | y | |||
| ) | [virtual] |
Set center of a found circle.
This is especially used for ball position implementations.
- Parameters:
-
x x position in image (pixels) y y position in image (pixels)
Implements RelativePositionModel.
Definition at line 59 of file back_projection.cpp.
References center_in_roi_t::x, and center_in_roi_t::y.
| virtual void BackProjectionPositionModel::set_pan_tilt | ( | float | pan = 0.0f, |
|
| float | tilt = 0.0f | |||
| ) | [inline, virtual] |
Set camera pan and tilt.
- Parameters:
-
pan pan value (rad) tilt tilt value (rad)
Implements RelativePositionModel.
Definition at line 42 of file back_projection.h.
References set_cam_rotation().
| void BackProjectionPositionModel::set_radius | ( | float | r | ) | [virtual] |
Set radius of a found circle.
This is especially used for ball position implementations.
- Parameters:
-
r radius
Implements RelativePositionModel.
Definition at line 52 of file back_projection.cpp.
The documentation for this class was generated from the following files:
- src/firevision/models/relative_position/back_projection.h
- src/firevision/models/relative_position/back_projection.cpp

