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 namespace firevision {
00034 #if 0
00035 }
00036 #endif
00037
00038 class ROI;
00039
00040 class ScanlineLineGrid : public ScanlineModel
00041 {
00042 private:
00043 typedef std::list<fawkes::point_t> point_list_t;
00044
00045 public:
00046 ScanlineLineGrid(unsigned int width, unsigned int height,
00047 unsigned int offset_hor, unsigned int offset_ver,
00048 ROI* roi = NULL, unsigned int gap = 0);
00049 virtual ~ScanlineLineGrid();
00050
00051 fawkes::point_t operator*();
00052 fawkes::point_t * operator->();
00053 fawkes::point_t * operator++();
00054 fawkes::point_t * operator++(int);
00055
00056 bool finished();
00057 void reset();
00058 const char * get_name();
00059 unsigned int get_margin();
00060
00061 virtual void set_robot_pose(float x, float y, float ori);
00062 virtual void set_pan_tilt(float pan, float tilt);
00063
00064 virtual void set_dimensions(unsigned int width, unsigned int height, ROI* roi = NULL);
00065 virtual void set_offset(unsigned int offset_x, unsigned int offset_y);
00066 virtual void set_grid_params(unsigned int width, unsigned int height,
00067 unsigned int offset_hor, unsigned int offset_ver, ROI* roi = NULL);
00068 virtual void set_roi(ROI* roi = NULL);
00069
00070 private:
00071 unsigned int __width;
00072 unsigned int __height;
00073 unsigned int __offset_ver;
00074 unsigned int __offset_hor;
00075 unsigned int __next_pixel;
00076
00077 ROI* __roi;
00078
00079 point_list_t __point_list;
00080 point_list_t::iterator __cur;
00081
00082 void calc_coords();
00083 };
00084
00085 }
00086
00087 #endif //__FIREVISION_SCANLINE_LINE_GRID_H_