line_grid.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __FIREVISION_SCANLINE_LINE_GRID_H_
00025 #define __FIREVISION_SCANLINE_LINE_GRID_H_
00026
00027 #include "scanlinemodel.h"
00028 #include <fvutils/base/types.h>
00029 #include <fvutils/color/yuv.h>
00030
00031 #include <list>
00032
00033 class ROI;
00034
00035
00036 class ScanlineLineGrid :
00037 public ScanlineModel
00038 {
00039 private:
00040 typedef std::list<fawkes::point_t> point_list_t;
00041
00042 public:
00043 ScanlineLineGrid(unsigned int width, unsigned int height,
00044 unsigned int offset_hor, unsigned int offset_ver,
00045 ROI* roi = NULL, unsigned int gap = 0);
00046 virtual ~ScanlineLineGrid();
00047
00048 fawkes::point_t operator*();
00049 fawkes::point_t * operator->();
00050 fawkes::point_t * operator++();
00051 fawkes::point_t * operator++(int);
00052
00053 bool finished();
00054 void reset();
00055 const char * get_name();
00056 unsigned int get_margin();
00057
00058 virtual void set_robot_pose(float x, float y, float ori);
00059 virtual void set_pan_tilt(float pan, float tilt);
00060
00061 virtual void set_dimensions(unsigned int width, unsigned int height, ROI* roi = NULL);
00062 virtual void set_offset(unsigned int offset_x, unsigned int offset_y);
00063 virtual void set_grid_params(unsigned int width, unsigned int height,
00064 unsigned int offset_hor, unsigned int offset_ver, ROI* roi = NULL);
00065 virtual void set_roi(ROI* roi = NULL);
00066
00067 private:
00068 unsigned int __width;
00069 unsigned int __height;
00070 unsigned int __offset_ver;
00071 unsigned int __offset_hor;
00072 unsigned int __next_pixel;
00073
00074 ROI* __roi;
00075
00076 point_list_t __point_list;
00077 point_list_t::iterator __cur;
00078
00079 void calc_coords();
00080 };
00081
00082 #endif //__FIREVISION_SCANLINE_LINE_GRID_H_