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