Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
KMatrix.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 __KMatrix_hh__
27 #define __KMatrix_hh__
28 #include "bias_config.h"
29 
30 #include <Base/Math/Matrix3x3.hh>
31 
32 #define KMATRIX_TYPE double
33 
34 namespace BIAS{
35  /** @class KMatrix
36  @ingroup g_geometry
37  @brief
38  K describes the mapping from world coordinates (wcs) to pixel
39  coordinates (pcs).
40  To remember:
41  (1) (R' | -R' C) projects a homgenous 3D (scene) point from wcs to
42  2d ics.
43  (2) K transfroms a 2d scene point from ics to pcs
44  (pixel coordinates) (which is mainly shift of origin
45  + scale).
46  @author Jan Woetzel
47  */
48  class BIASGeometryBase_EXPORT KMatrix : public Matrix3x3<KMATRIX_TYPE>
49  {
50  public:
51  KMatrix() : Matrix3x3<KMATRIX_TYPE>() {};
52 
53  /** constructor setting identity or zero
54  @brief author koeser **/
55  explicit KMatrix(const MatrixInitType& i) :
56  Matrix3x3<KMATRIX_TYPE>(i) {};
57 
58  KMatrix(const Matrix3x3<KMATRIX_TYPE>& A) : Matrix3x3<KMATRIX_TYPE>(A) {};
59 
60  ~KMatrix() {};
61 
62  /** returns analyticaly inverted matrix */
63  KMatrix Invert() const;
64 
65  /** get and set data members by verbose names.
66  fx skew hx
67  0 fy hy
68  0 0 1
69  @author JW 2005 */
70  void Set(const KMATRIX_TYPE & fx
71  ,const KMATRIX_TYPE & fy
72  ,const KMATRIX_TYPE & hx
73  ,const KMATRIX_TYPE & hy
74  ,const KMATRIX_TYPE & skew=KMATRIX_TYPE(0) );
75 
76  KMATRIX_TYPE GetFx() const;
77  void SetFx(const KMATRIX_TYPE & val);
78 
79  KMATRIX_TYPE GetFy() const;
80  void SetFy(const KMATRIX_TYPE & val);
81 
82  KMATRIX_TYPE GetSkew() const;
83  void SetSkew(const KMATRIX_TYPE & val);
84 
85  KMATRIX_TYPE GetHx() const;
86  void SetHx(const KMATRIX_TYPE & val);
87 
88  KMATRIX_TYPE GetHy() const;
89  void SetHy(const KMATRIX_TYPE & val);
90 
91  };
92 
93 } // namespace
94 
95 
96 #endif // __KMatrix_hh__
97 
MatrixInitType
can be passed to matrix constructors to init the matrix with the most often used values ...
Definition: Matrix.hh:59
KMatrix(const MatrixInitType &i)
constructor setting identity or zero
Definition: KMatrix.hh:55
KMatrix(const Matrix3x3< KMATRIX_TYPE > &A)
Definition: KMatrix.hh:58
is a &#39;fixed size&#39; quadratic matrix of dim.
Definition: Matrix.hh:54
K describes the mapping from world coordinates (wcs) to pixel coordinates (pcs).
Definition: KMatrix.hh:48