OpenCV 4.5.3(日本語機械翻訳)
icp.hpp
[詳解]
1 //
2 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
3 //
4 // By downloading, copying, installing or using the software you agree to this license.
5 // If you do not agree to this license, do not download, install,
6 // copy or use the software.
7 //
8 //
9 // License Agreement
10 // For Open Source Computer Vision Library
11 //
12 // Copyright (C) 2014, OpenCV Foundation, all rights reserved.
13 // Third party copyrights are property of their respective owners.
14 //
15 // Redistribution and use in source and binary forms, with or without modification,
16 // are permitted provided that the following conditions are met:
17 //
18 // * Redistribution's of source code must retain the above copyright notice,
19 // this list of conditions and the following disclaimer.
20 //
21 // * Redistribution's in binary form must reproduce the above copyright notice,
22 // this list of conditions and the following disclaimer in the documentation
23 // and/or other materials provided with the distribution.
24 //
25 // * The name of the copyright holders may not be used to endorse or promote products
26 // derived from this software without specific prior written permission.
27 //
28 // This software is provided by the copyright holders and contributors "as is" and
29 // any express or implied warranties, including, but not limited to, the implied
30 // warranties of merchantability and fitness for a particular purpose are disclaimed.
31 // In no event shall the Intel Corporation or contributors be liable for any direct,
32 // indirect, incidental, special, exemplary, or consequential damages
33 // (including, but not limited to, procurement of substitute goods or services;
34 // loss of use, data, or profits; or business interruption) however caused
35 // and on any theory of liability, whether in contract, strict liability,
36 // or tort (including negligence or otherwise) arising in any way out of
37 // the use of this software, even if advised of the possibility of such damage.
38
46 #ifndef __OPENCV_SURFACE_MATCHING_ICP_HPP__
47 #define __OPENCV_SURFACE_MATCHING_ICP_HPP__
48
49 #include <opencv2/core.hpp>
50
51 #include "pose_3d.hpp"
52 #include <vector>
53
54 namespace cv
55{
56 namespace ppf_match_3d
57{
58
61
80 class CV_EXPORTS_W ICP
81{
82 public:
83
84 CV_WRAP enum
85 {
86 ICP_SAMPLING_TYPE_UNIFORM = 0,
87 ICP_SAMPLING_TYPE_GELFAND = 1
88 };
89
90 CV_WRAP ICP()
91 {
92 m_tolerance = 0.005f;
93 m_rejectionScale = 2.5f;
94 m_maxIterations = 250;
95 m_numLevels = 6;
96 m_sampleType = ICP_SAMPLING_TYPE_UNIFORM;
97 m_numNeighborsCorr = 1;
98 }
99
100 virtual ~ICP() { }
101
117 CV_WRAP ICP(const int iterations, const float tolerence = 0.05f, const float rejectionScale = 2.5f, const int numLevels = 6, const int sampleType = ICP::ICP_SAMPLING_TYPE_UNIFORM, const int numMaxCorr = 1)
118 {
119 m_tolerance = tolerence;
120 m_numNeighborsCorr = numMaxCorr;
121 m_rejectionScale = rejectionScale;
122 m_maxIterations = iterations;
123 m_numLevels = numLevels;
124 m_sampleType = sampleType;
125 }
126
139 CV_WRAP int registerModelToScene(const Mat& srcPC, const Mat& dstPC, CV_OUT double& residual, CV_OUT Matx44d& pose);
140
152 CV_WRAP int registerModelToScene(const Mat& srcPC, const Mat& dstPC, CV_IN_OUT std::vector<Pose3DPtr>& poses);
153
154 private:
155 float m_tolerance;
156 int m_maxIterations;
157 float m_rejectionScale;
158 int m_numNeighborsCorr;
159 int m_numLevels;
160 int m_sampleType;
161
162};
163
165
166} // namespace ppf_match_3d
167
168} // namespace cv
169
170 #endif
n-dimensional dense array class
Definition: mat.hpp:802
Template class for small matrices whose type and size are known at compilation time
Definition: matx.hpp:100
This class implements a very efficient and robust variant of the iterative closest point (ICP) algori...
Definition: icp.hpp:81
cv
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75