Fawkes API Fawkes Development Version
|
Star-like arranged scanline points. More...
#include <>>
Public Member Functions | |
ScanlineStar (unsigned int image_width, unsigned int image_height, unsigned int center_x, unsigned int center_y, unsigned int num_rays, unsigned int radius_incr, unsigned char *yuv_mask, unsigned int dead_radius=0, unsigned int max_radius=0, unsigned int margin=0) | |
Constructor. More... | |
virtual | ~ScanlineStar () |
Destructor. 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... | |
void | advance () |
Calculates the next scanline point. 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... | |
void | set_robot_pose (float x, float y, float ori) |
Set the robot's pose. More... | |
void | set_pan_tilt (float pan, float tilt) |
Set camera's pan/tilt values. More... | |
void | skip_current_ray () |
Skips the current ray and continues with the first valid scanline point of the next ray. More... | |
unsigned int | num_rays () const |
Returns the number of segments in the model. More... | |
unsigned int | ray_index () const |
Return the index of the current ray. More... | |
unsigned int | current_radius () const |
Returns the radius of the current scanline point. More... | |
float | current_angle () const |
Returns the angle of the current scanline point. More... | |
bool | first_on_ray () const |
Checks whether the current scanpoint is the first scanpoint on the current ray. More... | |
![]() | |
virtual | ~ScanlineModel () |
Virtual empty destructor. More... | |
virtual fawkes::upoint_t | operator* ()=0 |
Get the current coordinate. More... | |
virtual fawkes::upoint_t * | operator-> ()=0 |
Get pointer to current point. More... | |
virtual fawkes::upoint_t * | operator++ ()=0 |
Postfix ++ operator. More... | |
virtual fawkes::upoint_t * | operator++ (int)=0 |
Prefix ++ operator. More... | |
virtual bool | finished ()=0 |
Check if all desired points have been processed. More... | |
virtual void | reset ()=0 |
Reset model. More... | |
virtual const char * | get_name ()=0 |
Get name of scanline model. More... | |
virtual unsigned int | get_margin ()=0 |
Get margin around points. More... | |
virtual void | set_robot_pose (float x, float y, float ori)=0 |
Set the robot's pose. More... | |
virtual void | set_pan_tilt (float pan, float tilt)=0 |
Set camera's pan/tilt values. More... | |
virtual void | set_roi (ROI *roi=NULL) |
Set the region-of-interest. More... | |
firevision::ScanlineStar::ScanlineStar | ( | unsigned int | image_width, |
unsigned int | image_height, | ||
unsigned int | center_x, | ||
unsigned int | center_y, | ||
unsigned int | num_rays, | ||
unsigned int | radius_incr, | ||
unsigned char * | yuv_mask, | ||
unsigned int | dead_radius = 0 , |
||
unsigned int | max_radius = 0 , |
||
unsigned int | margin = 0 |
||
) |
Constructor.
image_width | width of the image |
image_height | height of the image |
center_x | x-coordinate of the center point |
center_y | y-coordinate of the center point |
num_rays | number of rays |
radius_incr | number of pixels by which the radius is increased |
yuv_mask | a mask allows to exclude certain regions of the image from inspection. More precisely, no scanline points are generated in those areas. The ignored regions have to be black, i.e. Y=0, U=127, V=127. |
dead_radius | number of pixels around the center that are disregarded |
max_radius | maximal radius in number of pixels |
margin | margin around every scanline point that does not contain any other scanline point (in pixels) |
Definition at line 55 of file star.cpp.
References fawkes::deg2rad(), num_rays(), reset(), fawkes::upoint_t::x, and fawkes::upoint_t::y.
|
virtual |
void firevision::ScanlineStar::advance | ( | ) |
Calculates the next scanline point.
Definition at line 134 of file star.cpp.
Referenced by operator++().
float firevision::ScanlineStar::current_angle | ( | ) | const |
unsigned int firevision::ScanlineStar::current_radius | ( | ) | const |
|
virtual |
Check if all desired points have been processed.
Implements firevision::ScanlineModel.
bool firevision::ScanlineStar::first_on_ray | ( | ) | const |
|
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.
|
virtual |
unsigned int firevision::ScanlineStar::num_rays | ( | ) | const |
Returns the number of segments in the model.
Definition at line 227 of file star.cpp.
Referenced by ScanlineStar().
|
virtual |
Get the current coordinate.
Implements firevision::ScanlineModel.
|
virtual |
Postfix ++ operator.
Advances to the next point and returns the new point.
Implements firevision::ScanlineModel.
Definition at line 117 of file star.cpp.
References advance().
|
virtual |
Prefix ++ operator.
Advances to the next point but returns the old point.
Implements firevision::ScanlineModel.
Definition at line 124 of file star.cpp.
References advance().
|
virtual |
Get pointer to current point.
Implements firevision::ScanlineModel.
unsigned int firevision::ScanlineStar::ray_index | ( | ) | const |
|
virtual |
Reset model.
Resets the set of processed points.
Implements firevision::ScanlineModel.
Definition at line 166 of file star.cpp.
Referenced by ScanlineStar().
|
virtual |
Set camera's pan/tilt values.
pan | camera's current pan |
tilt | camera's current tilt |
Implements firevision::ScanlineModel.
|
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.
void firevision::ScanlineStar::skip_current_ray | ( | ) |