Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
LogPolarMapping.hh
1 /*
2 This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4 Copyright (C) 2003-2009 (see file CONTACT for details)
5 Multimediale Systeme der Informationsverarbeitung
6 Institut fuer Informatik
7 Christian-Albrechts-Universitaet Kiel
8 
9 
10 BIAS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 BIAS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with BIAS; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 #include <Base/Common/BIASpragmaStart.hh>
26 
27 #ifndef __LogPolarMapping_hh__
28 #define __LogPolarMapping_hh__
29 
30 #include <Image/BackwardMapping.hh>
31 
32 
33 namespace BIAS {
34 
35  /** @class LogPolarMapping
36  @ingroup g_filter
37  @brief Maps cartesian source coordinates to log-polar sink coordinates.
38  The center of rotation must be set. The minimum center value is the
39  radius of the circle.
40  @author oniemann
41  */
42  template <class InputStorageType, class OutputStorageType>
43  class BIASImage_EXPORT LogPolarMapping
44  : public BackwardMapping<InputStorageType, OutputStorageType> {
45  public:
46 
47  virtual ~LogPolarMapping();
48 
50 
51  /** required because assignment is
52  @author Jan Woetzel */
53  LogPolarMapping(const LogPolarMapping & src);
54 
55  /** required because of const members
56  @author Jan Woetzel */
58  operator=(const LogPolarMapping & src);
59 
60  /** @brief set your image center before calling Map(). min(x,y) = radius
61  of circle.*/
62  void SetImageCenter(const int & x, const int & y);
63 
64  protected:
65  /** @brief reimplementation for Pixel transformation,
66  takes sink and computes coords in source */
67  virtual int GetSourceCoordinates_(const HomgPoint2D& sink,
68  HomgPoint2D& source) const;
69  int XCenter_,YCenter_;
70  double R_, A_;
72 
73  };
74 } // namespace
75 
76 #endif
77 
78 #include <Base/Common/BIASpragmaEnd.hh>
79 
Maps cartesian source coordinates to log-polar sink coordinates.
class HomgPoint2D describes a point with 2 degrees of freedom in projective coordinates.
Definition: HomgPoint2D.hh:67
Abstract base class to map an image (texture) src to an image sink with an arbitrary continuous funct...