Image Component Library (ICL)
ICP3D.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/ICP3D.h **
10 ** Module : ICLGeom **
11 ** Authors: Tobias Roehlig **
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 
31 #pragma once
32 
33 #include <ICLUtils/Uncopyable.h>
34 #include <ICLMath/Octree.h>
36 
37 namespace icl {
38  namespace geom {
39 
44 
45  public:
46 
50  struct Result {
51  Result();
57  uint32_t iterations;
58  };
59 
61 
65  ICP3D(uint32_t const iterations = 10,
66  icl32f const max_distance = 1.0f,
67  icl64f const errorDelat = 0.01f);
68 
75  void build(std::vector<ICP3DVec> const &target,
76  icl32f const &min, icl32f const &len);
77 
88  void build(std::vector<ICP3DVec> const &target,
89  icl32f const &minX, icl32f const &minY, icl32f const &minZ,
90  icl32f const &width, icl32f const &height, icl32f const &depth);
91 
98  Result apply(std::vector<ICP3DVec> const &source,
99  std::vector<ICP3DVec> &out);
100 
110  Result apply(std::vector<ICP3DVec> const &target,
111  std::vector<ICP3DVec> const &source,
112  std::vector<ICP3DVec> &out,
113  icl32f const &min, icl32f const &len);
114 
128  Result apply(std::vector<ICP3DVec> const &target,
129  std::vector<ICP3DVec> const &source,
130  std::vector<ICP3DVec> &out,
131  icl32f const &minX, icl32f const &minY, icl32f const &minZ,
132  icl32f const &width, icl32f const &height, icl32f const &depth);
133 
134  virtual
135  ~ICP3D();
136 
137  void setMaxDistance(icl32f const dist) { maxDist = dist; }
138  icl32f getMaxDistance() { return maxDist; }
139 
140  void setErrorDeltaTh(icl64f const th) { errorDeltaTh = th; }
141  icl64f getErrorDeltaTh() { return errorDeltaTh; }
142 
143  void setMaximumIterations(uint32_t const iterations) { maxIterations = iterations; }
144  uint32_t getMaximumIterations() { return maxIterations; }
145 
146  std::vector<ICP3DVec> const &getTarget() { return m_target; }
147 
149  uint32_t maxIterations;
158 
162  std::vector<ICP3DVec> m_target;
163 
164  }; // class ICP3D
165  } // namespace geom
166 } // namespace icl
167 
icl64f getErrorDeltaTh()
Definition: ICP3D.h:141
undocument this line if you encounter any issues!
Definition: Any.h:37
Class interface for un-copyable classes.
Definition: Uncopyable.h:64
The ICP3D class is a special ICP-case for homogeneous 3D-vectors.
Definition: ICP3D.h:43
uint32_t maxIterations
maxIterations Maximum number of iterations
Definition: ICP3D.h:149
#define ICLGeom_API
Definition: CompatMacros.h:179
icl64f error
error The final error
Definition: ICP3D.h:55
icl32f maxDist
maxDist Maximal distance allowed between two corresponding points
Definition: ICP3D.h:151
Generic Octree Implementation.
Definition: Octree.h:60
void setMaximumIterations(uint32_t const iterations)
Definition: ICP3D.h:143
uint32_t getMaximumIterations()
Definition: ICP3D.h:144
math::Octree< icl32f, 16, 1, ICP3DVec > * octree
octree Underlying octree
Definition: ICP3D.h:160
Ipp32f icl32f
32Bit floating point type for the ICL
Definition: BasicTypes.h:55
std::vector< ICP3DVec > m_target
m_target Target for the ICP steps
Definition: ICP3D.h:162
Ipp64f icl64f
64Bit floating point type for the ICL
Definition: BasicTypes.h:52
math::Mat4 transformation
transformation Final transformation of ICP
Definition: ICP3D.h:53
std::vector< ICP3DVec > const & getTarget()
Definition: ICP3D.h:146
uint32_t iterations
iterations The number of iterations needed
Definition: ICP3D.h:57
depth
determines the pixel type of an image (8Bit-int or 32Bit-float)
Definition: Types.h:60
void setMaxDistance(icl32f const dist)
Definition: ICP3D.h:137
icl::math::FixedColVector< icl32f, 4 > ICP3DVec
Definition: ICP3D.h:60
icl64f errorDeltaTh
errorDeltaTh Threshold for the change of the error between to ICP-steps. If the error changed less th...
Definition: ICP3D.h:157
icl32f getMaxDistance()
Definition: ICP3D.h:138
The Result struct contains results of an ICP-loop.
Definition: ICP3D.h:50
void setErrorDeltaTh(icl64f const th)
Definition: ICP3D.h:140