Image Component Library (ICL)
ICP.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLGeom/src/ICLGeom/ICP.h **
10 ** Module : ICLGeom **
11 ** Authors: Christian Groszewski, Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 #pragma once
31 
32 #include <ICLUtils/Macros.h>
33 #include <ICLUtils/Uncopyable.h>
34 #include <ICLMath/DynMatrix.h>
35 #include <ICLMath/KDTree.h>
36 #include <ICLGeom/PoseEstimator.h>
37 
38 namespace icl{
39  namespace geom{
40 
42 
46  public:
49  Result();
52  double error;
53  };
54 
55  private:
58 
61 
63  math::DynMatrix<icl64f> *compute(const std::vector<math::DynMatrix<icl64f>* > &data,
64  const std::vector<math::DynMatrix<icl64f>* > &model);
65  public:
66 
67 
68 
70 
71  ICP(std::vector<math::DynMatrix<icl64f> > &model);
72 
74 
75  ICP(std::vector<math::DynMatrix<icl64f>* > &model);
76 
78  ICP();
79 
81  ~ICP();
82 
83 
85  const Result &apply(const std::vector<math::DynMatrix<icl64f>* > &pointlist);
86 
88  static double error(const std::vector<math::DynMatrix<icl64f>* > &dat,
89  const std::vector<math::DynMatrix<icl64f>* > &mod);
90 
91  #if 0
92  // hope we dont need that anymore ...
94  inline double getError(){
95  return m_result.error;
96  }
97 
99  inline const math::DynMatrix<icl64f>& getRotation() const{
100  return m_result.rotation;
101  }
102 
104  inline const math::DynMatrix<icl64f>& getTranslation() const{
105  return m_result.translation;
106  }
107  #endif
108  };
109  } // namespace geom
110 }
111 
double error
Error value.
Definition: ICP.h:52
Result m_result
rotation, translation and error value Result m_result;
Definition: ICP.h:57
Simple result structure.
Definition: ICP.h:48
undocument this line if you encounter any issues!
Definition: Any.h:37
Class interface for un-copyable classes.
Definition: Uncopyable.h:64
#define ICLGeom_API
Definition: CompatMacros.h:179
Simple KD-Tree implementation.
Definition: KDTree.h:51
ICLQt_API ImgROI data(ImgQ &r)
creates full ROI ROI-struct
Implementaiton of the Iterator Closest utils::Point (ICP) Algorithm.
Definition: ICP.h:45
math::DynMatrix< icl64f > translation
Model translation matrix.
Definition: ICP.h:51
math::KDTree kdt
internal data structure for efficient search
Definition: ICP.h:60
ICLCV_API void error(const char *msg)
Display error message and terminate program.
math::DynMatrix< icl64f > rotation
Model rotation matrix.
Definition: ICP.h:50