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. | |
fawkes::point_t | operator* () |
Get the current coordinate. | |
fawkes::point_t * | operator-> () |
Get pointer to current point. | |
fawkes::point_t * | operator++ () |
Postfix ++ operator. | |
fawkes::point_t * | operator++ (int) |
Prefix ++ operator. | |
bool | finished () |
Check if all desired points have been processed. | |
void | reset () |
Reset model. | |
const char * | get_name () |
Get name of scanline model. | |
unsigned int | get_margin () |
Get margin around points. | |
virtual void | set_robot_pose (float x, float y, float ori) |
Set the robot's pose. | |
virtual void | set_pan_tilt (float pan, float tilt) |
Set camera's pan/tilt values. | |
void | set_center (unsigned int center_x, unsigned int center_y) |
Set new center point. | |
void | set_radius (unsigned int dead_radius, unsigned int max_radius) |
Set new radius. |
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.
Definition at line 35 of file radial.h.
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().
bool firevision::ScanlineRadial::finished | ( | ) | [virtual] |
Check if all desired points have been processed.
Implements firevision::ScanlineModel.
Definition at line 213 of file radial.cpp.
unsigned int firevision::ScanlineRadial::get_margin | ( | ) | [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.
const char * firevision::ScanlineRadial::get_name | ( | ) | [virtual] |
Get name of scanline model.
Implements firevision::ScanlineModel.
Definition at line 287 of file radial.cpp.
point_t firevision::ScanlineRadial::operator* | ( | ) | [virtual] |
Get the current coordinate.
Implements firevision::ScanlineModel.
Definition at line 80 of file radial.cpp.
point_t * firevision::ScanlineRadial::operator++ | ( | int | ) | [virtual] |
Prefix ++ operator.
Advances to the next point but returns the old point.
Implements firevision::ScanlineModel.
Definition at line 206 of file radial.cpp.
point_t * firevision::ScanlineRadial::operator++ | ( | ) | [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::point_t::x, and fawkes::point_t::y.
point_t * firevision::ScanlineRadial::operator-> | ( | ) | [virtual] |
Get pointer to current point.
Implements firevision::ScanlineModel.
Definition at line 86 of file radial.cpp.
void firevision::ScanlineRadial::reset | ( | ) | [virtual] |
Reset model.
Resets the set of processed points.
Implements firevision::ScanlineModel.
Definition at line 245 of file radial.cpp.
References fawkes::point_t::x, and fawkes::point_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().
virtual void firevision::ScanlineRadial::set_pan_tilt | ( | float | pan, | |
float | tilt | |||
) | [inline, virtual] |
Set camera's pan/tilt values.
pan | camera's current pan | |
tilt | camera's current tilt |
Implements firevision::ScanlineModel.
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().
virtual void firevision::ScanlineRadial::set_robot_pose | ( | float | x, | |
float | y, | |||
float | ori | |||
) | [inline, virtual] |
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.