Fawkes API
Fawkes Development Version
|
Radial scanlines. More...
#include <>>
Public Member Functions | |
ScanlineRadial (unsigned int width, unsigned int height, unsigned int center_x, unsigned int center_y, unsigned int radius_increment, unsigned int step, unsigned int max_radius=0, unsigned int dead_radius=0) | |
Constructor. More... | |
fawkes::upoint_t | operator* () |
Get the current coordinate. More... | |
fawkes::upoint_t * | operator-> () |
Get pointer to current point. More... | |
fawkes::upoint_t * | operator++ () |
Postfix ++ operator. More... | |
fawkes::upoint_t * | operator++ (int) |
Prefix ++ operator. More... | |
bool | finished () |
Check if all desired points have been processed. More... | |
void | reset () |
Reset model. More... | |
const char * | get_name () |
Get name of scanline model. More... | |
unsigned int | get_margin () |
Get margin around points. More... | |
virtual void | set_robot_pose (float x, float y, float ori) |
Set the robot's pose. More... | |
virtual void | set_pan_tilt (float pan, float tilt) |
Set camera's pan/tilt values. More... | |
void | set_center (unsigned int center_x, unsigned int center_y) |
Set new center point. More... | |
void | set_radius (unsigned int dead_radius, unsigned int max_radius) |
Set new radius. More... | |
![]() | |
virtual | ~ScanlineModel () |
Virtual empty destructor. More... | |
virtual void | set_roi (ROI *roi=NULL) |
Set the region-of-interest. More... | |
Radial scanlines.
Uses circles to generate scanline points. A dead radius is ignored in the center of the image (for example for the camera itself in an omni-vision system). From there circles are used in radius_increment distances. On each circle points are generated in a distance of about step pixels. This is done up to a given maximum radius. If no maximum radius is supplied (max_radius=0) it is automatically calculated depending on the image size.
firevision::ScanlineRadial::ScanlineRadial | ( | unsigned int | width, |
unsigned int | height, | ||
unsigned int | center_x, | ||
unsigned int | center_y, | ||
unsigned int | radius_increment, | ||
unsigned int | step, | ||
unsigned int | max_radius = 0 , |
||
unsigned int | dead_radius = 0 |
||
) |
Constructor.
width | image width |
height | image height |
center_x | radial center center x |
center_y | radial center center y |
radius_increment | radius increment |
step | step |
max_radius | maximum radius, if set to 0 will be calculated automatically depending on the image dimensions. |
dead_radius | inner radius to ignore |
Definition at line 59 of file radial.cpp.
References reset().
|
virtual |
Check if all desired points have been processed.
Implements firevision::ScanlineModel.
Definition at line 213 of file radial.cpp.
|
virtual |
Get margin around points.
Models that do not use margins shall return zero. It shall be guaranteed that in this margin region around a point there is no other point that has been or will be returned in a full iteration.
Implements firevision::ScanlineModel.
Definition at line 294 of file radial.cpp.
|
virtual |
Get name of scanline model.
Implements firevision::ScanlineModel.
Definition at line 287 of file radial.cpp.
|
virtual |
Get the current coordinate.
Implements firevision::ScanlineModel.
Definition at line 80 of file radial.cpp.
|
virtual |
Postfix ++ operator.
Advances to the next point and returns the new point.
Implements firevision::ScanlineModel.
Definition at line 92 of file radial.cpp.
References fawkes::upoint_t::x, and fawkes::upoint_t::y.
|
virtual |
Prefix ++ operator.
Advances to the next point but returns the old point.
Implements firevision::ScanlineModel.
Definition at line 206 of file radial.cpp.
|
virtual |
Get pointer to current point.
Implements firevision::ScanlineModel.
Definition at line 86 of file radial.cpp.
|
virtual |
Reset model.
Resets the set of processed points.
Implements firevision::ScanlineModel.
Definition at line 245 of file radial.cpp.
References fawkes::upoint_t::x, and fawkes::upoint_t::y.
Referenced by ScanlineRadial(), set_center(), and set_radius().
void firevision::ScanlineRadial::set_center | ( | unsigned int | center_x, |
unsigned int | center_y | ||
) |
Set new center point.
Sets new center point to move around the scanlines in the image. Does an implicit reset().
center_x | x coordinate of the new center |
center_y | y coordinate of the new center |
Definition at line 307 of file radial.cpp.
References reset().
Referenced by set_pan_tilt().
|
inlinevirtual |
Set camera's pan/tilt values.
pan | camera's current pan |
tilt | camera's current tilt |
Implements firevision::ScanlineModel.
Definition at line 57 of file radial.h.
References set_center(), and set_radius().
void firevision::ScanlineRadial::set_radius | ( | unsigned int | dead_radius, |
unsigned int | max_radius | ||
) |
Set new radius.
Sets the new maximum and dead radius. Does an implicit reset().
dead_radius | new dead radius |
max_radius | new maximum radius, if set to 0 this is automatically calculated depending on the image size. |
Definition at line 322 of file radial.cpp.
References reset().
Referenced by set_pan_tilt().
|
inlinevirtual |
Set the robot's pose.
x | robot's x coordinate on field in meters |
y | robot's y coordinate on field in meters |
ori | robot's orientation. Looking towards the opponent goal is zero rad, with positive values pointing to the right, negative to the left. |
Implements firevision::ScanlineModel.