Image Component Library (ICL)
RansacBasedPoseEstimator.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/RansacBasedPoseEstimator.h **
10 ** Module : ICLGeom **
11 ** Authors: 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 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
34 #include <ICLUtils/Configurable.h>
35 #include <ICLUtils/Exception.h>
36 #include <ICLGeom/GeomDefs.h>
37 #include <ICLGeom/Camera.h>
38 
39 namespace icl{
40  namespace geom{
41 
44  struct Data;
45  Data *m_data;
46 
47  public:
48 
50  Mat T;
51  bool found;
52  float error;
53  };
54 
55 
57  int iterations=200,
58  int minPoints=4,
59  float maxErr=5,
60  float minPointsForGoodModel=12,
61  bool storeLastConsensusSet=false);
62 
64 
65  void setIterations(int iterations);
66 
67  void setMinPoints(int minPoints);
68 
69  void setMaxError(float maxError);
70 
71  void setMinPointsForGoodModel(float f);
72 
73  void setStoreLastConsensusSet(bool);
74 
75  std::vector<utils::Point32f> getLastConsensusSet() ;
76 
78  Result fit(const std::vector<utils::Point32f> &modelPoints,
79  const std::vector<utils::Point32f> &imagePoints);
80 
82  Result fit(const std::vector<geom::Vec> &modelPoints,
83  const std::vector<utils::Point32f> &imagePoints);
84 
85 
87  std::vector<float> fit_coplanar(const std::vector<std::vector<float> > &pts);
88 
90  icl64f err_coplanar(const std::vector<float> &m, const std::vector<float> &p);
91 
92 
93  };
94  }
95 }
96 
97 
undocument this line if you encounter any issues!
Definition: Any.h:37
RANSAC-based pose estimation.
Definition: RansacBasedPoseEstimator.h:43
#define ICLGeom_API
Definition: CompatMacros.h:179
Data * m_data
internal data handling
Definition: RansacBasedPoseEstimator.h:44
Camera class.
Definition: Camera.h:132
Ipp64f icl64f
64Bit floating point type for the ICL
Definition: BasicTypes.h:52
Definition: RansacBasedPoseEstimator.h:49
bool found
Definition: RansacBasedPoseEstimator.h:51
Interface for classes that can be configured from configuration-files and GUI-Components.
Definition: Configurable.h:194
Mat T
Definition: RansacBasedPoseEstimator.h:50
float error
Definition: RansacBasedPoseEstimator.h:52