Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Normalization.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 
26 #ifndef _Normalization_hh_
27 #define _Normalization_hh_
28 
29 #include "bias_config.h"
30 #include <Base/Common/BIASpragmaStart.hh>
31 #include <vector>
32 
33 #include <Base/Math/Matrix4x4.hh>
34 
35 namespace BIAS {
36  // forward declarations
37  class KMatrix;
38  class HomgPoint2D;
39  class HomgPoint3D;
40  template <class T> class BIASMathBase_EXPORT Matrix3x3;
41 
42  /** @class Normalization
43  @ingroup g_geometry
44  @brief class Normalization Functions, e.g. Hartley
45  @author koeser 07/2004 **/
46  class BIASGeometryBase_EXPORT Normalization
47  {
48  public:
49 
50  /** default constructor, does nothing **/
51  inline Normalization() {};
52 
53  /** @brief linearly transform Points with 3x3 matrix, such that they
54  have mean zero and stddev sqrt(2)
55  @param Points original (homogenized) points
56  @param NormPoints normalized (homogenized) points correponding to Points
57  @param Normalization matrix used for normalization
58  @author koeser */
59  int Hartley(const std::vector<HomgPoint2D>& Points,
60  std::vector<HomgPoint2D>& NormPoints,
61  KMatrix& Normalization) const;
62 
63  int Hartley(const std::vector<HomgPoint3D>& Points,
64  std::vector<HomgPoint3D>& NormPoints,
65  Matrix4x4<double> & normMatrix) const;
66 
67  /** @brief normalization for fisheye cameras wher points may have a
68  w component = 0
69 
70  Linearly transform Points with 3x3 matrix, such that their
71  zero is (0,0,1) using a rotation matrix. If the average
72  angle of the points with (0,0,1) is less than 60 deg, the points
73  are scaled such that afterwards their average angle with (0,0,1)
74  is as close aspossible to 60 deg subject to the constrant that no
75  point has an angle greater than 80deg with (0,0,1)
76 
77 
78  @param Points original points, can be at infinity
79  @param NormPoints normalized points correponding to Points
80  @param Normalization matrix used for normalization
81  @author woelk 11/2006 */
82  int Woelk(const std::vector<HomgPoint2D>& Points,
83  std::vector<HomgPoint2D>& NormPoints,
85 
86  };
87 
88 
89 } // namespace BIAS
90 
91 #include <Base/Common/BIASpragmaEnd.hh>
92 
93 #endif
94 
Normalization()
default constructor, does nothing
class Normalization Functions, e.g.
class BIASMathBase_EXPORT Matrix3x3
K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs).
Definition: KMatrix.hh:48
class BIASGeometryBase_EXPORT HomgPoint2D
class BIASGeometryBase_EXPORT HomgPoint3D