24 #ifndef _FIREVISION_MODELS_SCANLINES_STAR_H_
25 #define _FIREVISION_MODELS_SCANLINES_STAR_H_
27 #include <fvmodels/scanlines/scanlinemodel.h>
32 namespace firevision {
38 unsigned int image_height,
39 unsigned int center_x,
40 unsigned int center_y,
42 unsigned int radius_incr,
43 unsigned char *yuv_mask,
44 unsigned int dead_radius = 0,
45 unsigned int max_radius = 0,
46 unsigned int margin = 0);
70 void generate_scan_points();
72 unsigned int m_image_width;
73 unsigned int m_image_height;
75 unsigned int m_num_rays;
76 unsigned int m_radius_incr;
77 unsigned int m_dead_radius;
78 unsigned int m_max_radius;
79 unsigned int m_margin;
81 unsigned char * m_mask;
88 unsigned int m_ray_index;
90 typedef std::map<unsigned int, fawkes::upoint_t> Ray;
91 std::map<float, Ray *> m_rays;
92 std::map<float, Ray *>::iterator m_ray_iter;
93 Ray::iterator m_point_iter;
Scanline model interface.
Star-like arranged scanline points.
void skip_current_ray()
Skips the current ray and continues with the first valid scanline point of the next ray.
virtual ~ScanlineStar()
Destructor.
fawkes::upoint_t operator*()
Get the current coordinate.
void set_pan_tilt(float pan, float tilt)
Set camera's pan/tilt values.
unsigned int current_radius() const
Returns the radius of the current scanline point.
void advance()
Calculates the next scanline point.
fawkes::upoint_t * operator->()
Get pointer to current point.
unsigned int ray_index() const
Return the index of the current ray.
fawkes::upoint_t * operator++()
Postfix ++ operator.
const char * get_name()
Get name of scanline model.
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.
bool first_on_ray() const
Checks whether the current scanpoint is the first scanpoint on the current ray.
void set_robot_pose(float x, float y, float ori)
Set the robot's pose.
unsigned int num_rays() const
Returns the number of segments in the model.
bool finished()
Check if all desired points have been processed.
unsigned int get_margin()
Get margin around points.
float current_angle() const
Returns the angle of the current scanline point.
Point with cartesian coordinates as unsigned integers.