Public Member Functions

firevision::ScanlineRadial Class Reference

Radial scanlines. More...

#include <>>

Inheritance diagram for firevision::ScanlineRadial:
Inheritance graph
[legend]

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


Constructor & Destructor Documentation

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.

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 59 of file radial.cpp.

References reset().


Member Function Documentation

bool firevision::ScanlineRadial::finished (  )  [virtual]

Check if all desired points have been processed.

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

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.

Returns:
margin around a point.

Implements firevision::ScanlineModel.

Definition at line 294 of file radial.cpp.

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

Get name of scanline model.

Returns:
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.

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

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.

Returns:
pointer to next 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.

Returns:
pointer to 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.

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

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

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

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

Implements firevision::ScanlineModel.

Definition at line 57 of file radial.h.

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

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

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

Definition at line 56 of file radial.h.


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