Fawkes API  Fawkes Development Version
mirrormodel.h
1 
2 /***************************************************************************
3  * mirrormodel.h - Abstract class defining a mirror model
4  *
5  * Created: Tue Jul 19 11:55:29 2005
6  * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __FIREVISION_MODELS_MIRRORMODEL_H_
25 #define __FIREVISION_MODELS_MIRRORMODEL_H_
26 
27 #include <utils/math/types.h>
28 
29 namespace firevision {
30 #if 0 /* just to make Emacs auto-indent happy */
31 }
32 #endif
33 
35 {
36  public:
37 
38  virtual ~MirrorModel();
39 
40  virtual void warp2unwarp(unsigned int warp_x, unsigned int warp_y,
41  unsigned int *unwarp_x, unsigned int *unwarp_y) = 0;
42 
43  virtual void unwarp2warp(unsigned int unwarp_x, unsigned int unwarp_y,
44  unsigned int *warp_x, unsigned int *warp_y) = 0;
45 
46  virtual const char * getName() = 0;
47 
48 
49  virtual fawkes::polar_coord_2d_t getWorldPointRelative(unsigned int image_x,
50  unsigned int image_y) const = 0;
51 
52  virtual fawkes::cart_coord_2d_t getWorldPointGlobal(unsigned int image_x,
53  unsigned int image_y,
54  float pose_x, float pose_y,
55  float pose_ori) const = 0;
56 
57  virtual void reset() = 0;
58 
59  virtual fawkes::upoint_t getCenter() const = 0;
60  virtual void setCenter(unsigned int image_x, unsigned int image_y ) = 0;
61  virtual void setOrientation(float angle) = 0;
62  virtual float getOrientation() const = 0;
63 
64  virtual bool isValidPoint(unsigned int image_x, unsigned int image_y ) const = 0;
65 
66 };
67 
68 } // end namespace firevision
69 
70 #endif
virtual void reset()=0
Reset model.
Cartesian coordinates (2D).
Definition: types.h:59
virtual void setCenter(unsigned int image_x, unsigned int image_y)=0
Set center of omni-camera to given image pixel.
virtual const char * getName()=0
Get name of model.
Polar coordinates.
Definition: types.h:85
virtual float getOrientation() const =0
Get orientation of the omni-camera.
virtual bool isValidPoint(unsigned int image_x, unsigned int image_y) const =0
Check if the given point is valid.
virtual fawkes::upoint_t getCenter() const =0
Get the image pixel that is the center of the omni-camera.
Mirror model interface.
Definition: mirrormodel.h:34
Point with cartesian coordinates as unsigned integers.
Definition: types.h:34
virtual void unwarp2warp(unsigned int unwarp_x, unsigned int unwarp_y, unsigned int *warp_x, unsigned int *warp_y)=0
Transform unwarped to warped point.
virtual void warp2unwarp(unsigned int warp_x, unsigned int warp_y, unsigned int *unwarp_x, unsigned int *unwarp_y)=0
Transform warped to unwarped point.
virtual fawkes::polar_coord_2d_t getWorldPointRelative(unsigned int image_x, unsigned int image_y) const =0
Get relative coordinate based on image coordinates.
virtual ~MirrorModel()
Virtual empty destructor.
virtual fawkes::cart_coord_2d_t getWorldPointGlobal(unsigned int image_x, unsigned int image_y, float pose_x, float pose_y, float pose_ori) const =0
Get global coordinate based on image coordinates.
virtual void setOrientation(float angle)=0
Set orientation of the omni-camera device.