ScanlineRadial Class Reference

Radial scanlines. More...

#include <models/scanlines/radial.h>

Inheritance diagram for ScanlineRadial:

List of all members.


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_toperator-> ()
 Get pointer to current point.
fawkes::point_toperator++ ()
 Postfix ++ operator.
fawkes::point_toperator++ (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.

Detailed Description

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 30 of file radial.h.


Constructor & Destructor Documentation

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.

Parameters:
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 54 of file radial.cpp.

References reset().


Member Function Documentation

bool ScanlineRadial::finished (  )  [virtual]

Check if all desired points have been processed.

Returns:
true if all pixels that the model defines have been iterated.

Implements ScanlineModel.

Definition at line 208 of file radial.cpp.

unsigned int 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.

Returns:
margin around a point.

Implements ScanlineModel.

Definition at line 289 of file radial.cpp.

const char * ScanlineRadial::get_name (  )  [virtual]

Get name of scanline model.

Returns:
name of scanline model.

Implements ScanlineModel.

Definition at line 282 of file radial.cpp.

point_t ScanlineRadial::operator* (  )  [virtual]

Get the current coordinate.

Returns:
current point in image that is shall be processed.

Implements ScanlineModel.

Definition at line 75 of file radial.cpp.

point_t * ScanlineRadial::operator++ ( int   )  [virtual]

Prefix ++ operator.

Advances to the next point but returns the old point.

Implements ScanlineModel.

Definition at line 201 of file radial.cpp.

point_t * ScanlineRadial::operator++ (  )  [virtual]

Postfix ++ operator.

Advances to the next point and returns the new point.

Returns:
pointer to new point

Implements ScanlineModel.

Definition at line 87 of file radial.cpp.

References fawkes::point_t::x, and fawkes::point_t::y.

point_t * ScanlineRadial::operator-> (  )  [virtual]

Get pointer to current point.

Returns:
pointer to current point
See also:
operator*()

Implements ScanlineModel.

Definition at line 81 of file radial.cpp.

void ScanlineRadial::reset (  )  [virtual]

Reset model.

Resets the set of processed points.

Implements ScanlineModel.

Definition at line 240 of file radial.cpp.

References fawkes::point_t::x, and fawkes::point_t::y.

Referenced by ScanlineRadial(), set_center(), and set_radius().

void 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().

Parameters:
center_x x coordinate of the new center
center_y y coordinate of the new center

Definition at line 302 of file radial.cpp.

References reset().

virtual void ScanlineRadial::set_pan_tilt ( float  pan,
float  tilt 
) [inline, virtual]

Set camera's pan/tilt values.

Parameters:
pan camera's current pan
tilt camera's current tilt

Implements ScanlineModel.

Definition at line 52 of file radial.h.

void 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().

Parameters:
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 317 of file radial.cpp.

References reset().

virtual void ScanlineRadial::set_robot_pose ( float  x,
float  y,
float  ori 
) [inline, virtual]

Set the robot's pose.

Parameters:
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 ScanlineModel.

Definition at line 51 of file radial.h.


The documentation for this class was generated from the following files: