Fawkes API  Fawkes Development Version
mirrormodel.cpp
1 
2 /***************************************************************************
3  * mirrormodel.cpp - Abstract class defining a mirror model
4  *
5  * Created: Wed Mar 21 16:32:32 2007
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 #include <fvmodels/mirror/mirrormodel.h>
25 
26 namespace firevision {
27 #if 0 /* just to make Emacs auto-indent happy */
28 }
29 #endif
30 
31 /** @class MirrorModel <fvmodels/mirror/mirrormodel.h>
32  * Mirror model interface.
33  * This interface defines the API for a mirror model.
34  *
35  * @fn void MirrorModel::warp2unwarp(unsigned int warp_x, unsigned int warp_y, unsigned int *unwarp_x, unsigned int *unwarp_y)
36  * Transform warped to unwarped point.
37  * Given a point in the warped image it returns the coordinates of
38  * the corresponding pixel in the unwarped image
39  * Useful for: You found the ball center in the image and want to get
40  * the position this pixel would have in an unwarped image
41  * @param warp_x warped x coordinate
42  * @param warp_y warped y coordinate
43  * @param unwarp_x contains unwarped x coordinate upon return
44  * @param unwarp_y contains unwarped y coordinate upon return
45  *
46  * @fn void MirrorModel::unwarp2warp(unsigned int unwarp_x, unsigned int unwarp_y, unsigned int *warp_x, unsigned int *warp_y)
47  * Transform unwarped to warped point.
48  * Given a point in the unwarped image it returns the coordinates of
49  * the corresponding pixel in the warped image
50  * Useful for: You want to generate the unwarped image and ask the model
51  * for every point of the unwarped image which warped pixel to copy
52  * @param unwarp_x unwarped x coordinate
53  * @param unwarp_y unwarped y coordinate
54  * @param warp_x contains the warped x coordinate upon return
55  * @param warp_y contains the warped y coordinate upon return
56  *
57  * @fn const char * MirrorModel::getName()
58  * Get name of model.
59  * @return name of model
60  *
61  * @fn polar_coord_t MirrorModel::getWorldPointRelative(unsigned int image_x, unsigned int image_y ) const
62  * Get relative coordinate based on image coordinates.
63  * @param image_x x coordinate in image in pixels
64  * @param image_y y coordinate in image in pixels
65  * @return polar coordinates relative to the base system in metric local system
66  *
67  * @fn f_point_t MirrorModel::getWorldPointGlobal(unsigned int image_x, unsigned int image_y, float pose_x, float pose_y, float pose_ori) const
68  * Get global coordinate based on image coordinates.
69  * @param image_x x coordinate in image in pixels
70  * @param image_y y coordinate in image in pixels
71  * @param pose_x robot pose global x coordinate
72  * @param pose_y robot pose global y coordinate
73  * @param pose_ori robot pose global orientation
74  * @return cartesian coordinates relative to the base system in metric global system
75  *
76  * @fn void MirrorModel::reset()
77  * Reset model. This will reset mirror model.
78  *
79  * @fn cart_coord_t MirrorModel::getCenter() const
80  * Get the image pixel that is the center of the omni-camera.
81  * @return pixel coordinates of mirror center in image.
82  *
83  * @fn void MirrorModel::setCenter(unsigned int image_x, unsigned int image_y)
84  * Set center of omni-camera to given image pixel
85  * @param image_x x coordinate in image in pixels
86  * @param image_y y coordinate in image in pixels
87  *
88  * @fn void MirrorModel::setOrientation(float angle)
89  * Set orientation of the omni-camera device.
90  * @param angle angle to the forward direction.
91  *
92  * @fn float MirrorModel::getOrientation() const
93  * Get orientation of the omni-camera.
94  * @return angle to forward direction.
95  *
96  * @fn bool MirrorModel::isValidPoint(unsigned int image_x, unsigned int image_y ) const
97  * Check if the given point is valid.
98  * @param image_x x coordinate of queried pixel in image
99  * @param image_y y coordinate of queried pixel in image
100  * @return true, if pixel is valid, false otherwise.
101  */
102 
103 /** Virtual empty destructor. */
105 {
106 }
107 
108 } // end namespace firevision
virtual ~MirrorModel()
Virtual empty destructor.