ScanlineStar Class Reference
Star-like arranged scanline points. More...
#include <models/scanlines/star.h>

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. | |
| virtual | ~ScanlineStar () |
| Destructor. | |
| 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. | |
| void | advance () |
| Calculates the next scanline point. | |
| 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. | |
| void | set_robot_pose (float x, float y, float ori) |
| Set the robot's pose. | |
| void | set_pan_tilt (float pan, float tilt) |
| Set camera's pan/tilt values. | |
| void | skip_current_ray () |
| Skips the current ray and continues with the first valid scanline point of the next ray. | |
| unsigned int | num_rays () const |
| Returns the number of segments in the model. | |
| unsigned int | ray_index () const |
| Return the index of the current ray. | |
| unsigned int | current_radius () const |
| Returns the radius of the current scanline point. | |
| float | current_angle () const |
| Returns the angle of the current scanline point. | |
| bool | first_on_ray () const |
| Checks whether the current scanpoint is the first scanpoint on the current ray. | |
Detailed Description
Star-like arranged scanline points.
Definition at line 31 of file star.h.
Constructor & Destructor Documentation
| 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.
- Parameters:
-
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 53 of file star.cpp.
References fawkes::deg2rad(), reset(), fawkes::point_t::x, and fawkes::point_t::y.
Member Function Documentation
| void ScanlineStar::advance | ( | ) |
Calculates the next scanline point.
Definition at line 135 of file star.cpp.
Referenced by operator++().
| float ScanlineStar::current_angle | ( | ) | const |
| unsigned int ScanlineStar::current_radius | ( | ) | const |
| bool ScanlineStar::finished | ( | ) | [virtual] |
Check if all desired points have been processed.
- Returns:
- true if all pixels that the model defines have been iterated.
Implements ScanlineModel.
| bool ScanlineStar::first_on_ray | ( | ) | const |
| unsigned int ScanlineStar::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.
| const char * ScanlineStar::get_name | ( | ) | [virtual] |
| unsigned int ScanlineStar::num_rays | ( | ) | const |
| point_t ScanlineStar::operator* | ( | ) | [virtual] |
Get the current coordinate.
- Returns:
- current point in image that is shall be processed.
Implements ScanlineModel.
| point_t * ScanlineStar::operator++ | ( | int | ) | [virtual] |
Prefix ++ operator.
Advances to the next point but returns the old point.
Implements ScanlineModel.
Definition at line 124 of file star.cpp.
References advance().
| point_t * ScanlineStar::operator++ | ( | ) | [virtual] |
Postfix ++ operator.
Advances to the next point and returns the new point.
- Returns:
- pointer to new point
Implements ScanlineModel.
Definition at line 116 of file star.cpp.
References advance().
| point_t * ScanlineStar::operator-> | ( | ) | [virtual] |
Get pointer to current point.
- Returns:
- pointer to current point
- See also:
- operator*()
Implements ScanlineModel.
| unsigned int ScanlineStar::ray_index | ( | ) | const |
| void ScanlineStar::reset | ( | ) | [virtual] |
Reset model.
Resets the set of processed points.
Implements ScanlineModel.
Definition at line 169 of file star.cpp.
Referenced by ScanlineStar().
| void ScanlineStar::set_pan_tilt | ( | float | pan, | |
| float | tilt | |||
| ) | [virtual] |
Set camera's pan/tilt values.
- Parameters:
-
pan camera's current pan tilt camera's current tilt
Implements ScanlineModel.
| void ScanlineStar::set_robot_pose | ( | float | x, | |
| float | y, | |||
| float | ori | |||
| ) | [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.
| void ScanlineStar::skip_current_ray | ( | ) |
The documentation for this class was generated from the following files:

