Fawkes API
Fawkes Development Version
|
This model uses a ProjectiveCam to back project points in the image to the world by the ground plane assumption. More...
#include <>>
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. | |
![]() | |
virtual | ~RelativePositionModel () |
Destructor. |
This model uses a ProjectiveCam to back project points in the image to the world by the ground plane assumption.
Definition at line 35 of file back_projection.h.
firevision::BackProjectionPositionModel::BackProjectionPositionModel | ( | ProjectiveCam & | projective_cam, |
float | ball_circumference = 0.f |
||
) |
Constructor.
projective_cam | the projective camera object |
ball_circumference | the circumference in case it's a ball |
Definition at line 42 of file back_projection.cpp.
References firevision::center_in_roi_t::x, and firevision::center_in_roi_t::y.
|
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 firevision::RelativePositionModel.
Definition at line 107 of file back_projection.cpp.
References firevision::ProjectiveCam::get_GPA_world_coord(), fawkes::point_6D_struct::pitch, fawkes::point_6D_struct::roll, firevision::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.
|
inlinevirtual |
Calculate data unfiltered.
Same as calc(), but without any filtering (i.e. no Kalman filter).
Implements firevision::RelativePositionModel.
Definition at line 62 of file back_projection.h.
|
inlinevirtual |
Get bearing (horizontal angle) to object.
Implements firevision::RelativePositionModel.
Definition at line 58 of file back_projection.h.
|
virtual |
Returns the camera orientation.
pan | pan value (rad) |
tilt | tilt value (rad) |
roll | roll value (rad) |
Reimplemented from firevision::RelativePositionModel.
Definition at line 84 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().
|
virtual |
Returns the current translation of the camera.
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 firevision::RelativePositionModel.
Definition at line 98 of file back_projection.cpp.
References fawkes::point_6D_struct::x, fawkes::point_6D_struct::y, and fawkes::point_6D_struct::z.
|
inlinevirtual |
Get distance to object.
Implements firevision::RelativePositionModel.
Definition at line 55 of file back_projection.h.
|
inlinevirtual |
Get name of relative position model.
Implements firevision::RelativePositionModel.
Definition at line 41 of file back_projection.h.
|
virtual |
Get camera pan tilt.
pan | contains pan value (rad) upon return |
tilt | contains tilt value (rad) upon return |
Implements firevision::RelativePositionModel.
Definition at line 78 of file back_projection.cpp.
References get_cam_rotation().
|
inlinevirtual |
Get slope (vertical angle) to object.
Implements firevision::RelativePositionModel.
Definition at line 59 of file back_projection.h.
|
inlinevirtual |
Get relative X coordinate of object.
Implements firevision::RelativePositionModel.
Definition at line 56 of file back_projection.h.
|
inlinevirtual |
Get relative Y coordinate of object.
Implements firevision::RelativePositionModel.
Definition at line 57 of file back_projection.h.
|
inlinevirtual |
Check if position is valid.
Implements firevision::RelativePositionModel.
Definition at line 65 of file back_projection.h.
|
virtual |
Reset all data.
This must be called if the object is not visible.
Implements firevision::RelativePositionModel.
Definition at line 141 of file back_projection.cpp.
|
virtual |
Sets the camera orientation.
pan | pan value (rad) |
tilt | tilt value (rad) |
roll | roll value (rad) |
Reimplemented from firevision::RelativePositionModel.
Definition at line 71 of file back_projection.cpp.
References fawkes::point_6D_struct::pitch, fawkes::point_6D_struct::roll, and fawkes::point_6D_struct::yaw.
|
virtual |
Sets the current translation of the camera.
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 firevision::RelativePositionModel.
Definition at line 91 of file back_projection.cpp.
References fawkes::point_6D_struct::x, fawkes::point_6D_struct::y, and fawkes::point_6D_struct::z.
|
virtual |
Set center of a found circle.
This is especially used for ball position implementations.
x | x position in image (pixels) |
y | y position in image (pixels) |
Implements firevision::RelativePositionModel.
Definition at line 63 of file back_projection.cpp.
References firevision::center_in_roi_t::x, and firevision::center_in_roi_t::y.
|
inlinevirtual |
Set center of a found circle.
This is especially used for ball position implementations.
c | center |
Implements firevision::RelativePositionModel.
Definition at line 44 of file back_projection.h.
References set_center(), firevision::center_in_roi_t::x, and firevision::center_in_roi_t::y.
Referenced by set_center().
|
inlinevirtual |
Set camera pan and tilt.
pan | pan value (rad) |
tilt | tilt value (rad) |
Implements firevision::RelativePositionModel.
Definition at line 46 of file back_projection.h.
|
virtual |
Set radius of a found circle.
This is especially used for ball position implementations.
r | radius |
Implements firevision::RelativePositionModel.
Definition at line 56 of file back_projection.cpp.