util3d_registration.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7  * Redistributions of source code must retain the above copyright
8  notice, this list of conditions and the following disclaimer.
9  * Redistributions in binary form must reproduce the above copyright
10  notice, this list of conditions and the following disclaimer in the
11  documentation and/or other materials provided with the distribution.
12  * Neither the name of the Universite de Sherbrooke nor the
13  names of its contributors may be used to endorse or promote products
14  derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef UTIL3D_REGISTRATION_H_
29 #define UTIL3D_REGISTRATION_H_
30 
32 
33 #include <pcl/point_cloud.h>
34 #include <pcl/point_types.h>
35 #include <rtabmap/core/Transform.h>
36 #include <opencv2/core/core.hpp>
37 
38 namespace rtabmap
39 {
40 
41 namespace util3d
42 {
43 
44 int RTABMAP_EXP getCorrespondencesCount(const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_source,
45  const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_target,
46  float maxDistance);
47 
49  const pcl::PointCloud<pcl::PointXYZ> & cloud1,
50  const pcl::PointCloud<pcl::PointXYZ> & cloud2);
51 
53  const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud1,
54  const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud2,
55  double inlierThreshold = 0.02,
56  int iterations = 100,
57  int refineModelIterations = 10,
58  double refineModelSigma = 3.0,
59  std::vector<int> * inliers = 0,
60  cv::Mat * variance = 0);
61 
63  const pcl::PointCloud<pcl::PointNormal>::ConstPtr & cloudA,
64  const pcl::PointCloud<pcl::PointNormal>::ConstPtr & cloudB,
65  double maxCorrespondenceDistance,
66  double maxCorrespondenceAngle, // <=0 means that we don't care about normal angle difference
67  double & variance,
68  int & correspondencesOut);
70  const pcl::PointCloud<pcl::PointXYZINormal>::ConstPtr & cloudA,
71  const pcl::PointCloud<pcl::PointXYZINormal>::ConstPtr & cloudB,
72  double maxCorrespondenceDistance,
73  double maxCorrespondenceAngle, // <=0 means that we don't care about normal angle difference
74  double & variance,
75  int & correspondencesOut);
77  const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloudA,
78  const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloudB,
79  double maxCorrespondenceDistance,
80  double & variance,
81  int & correspondencesOut);
83  const pcl::PointCloud<pcl::PointXYZI>::ConstPtr & cloudA,
84  const pcl::PointCloud<pcl::PointXYZI>::ConstPtr & cloudB,
85  double maxCorrespondenceDistance,
86  double & variance,
87  int & correspondencesOut);
88 
89 Transform RTABMAP_EXP icp(
90  const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_source,
91  const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_target,
92  double maxCorrespondenceDistance,
93  int maximumIterations,
94  bool & hasConverged,
95  pcl::PointCloud<pcl::PointXYZ> & cloud_source_registered,
96  float epsilon = 0.0f,
97  bool icp2D = false);
98 Transform RTABMAP_EXP icp(
99  const pcl::PointCloud<pcl::PointXYZI>::ConstPtr & cloud_source,
100  const pcl::PointCloud<pcl::PointXYZI>::ConstPtr & cloud_target,
101  double maxCorrespondenceDistance,
102  int maximumIterations,
103  bool & hasConverged,
104  pcl::PointCloud<pcl::PointXYZI> & cloud_source_registered,
105  float epsilon = 0.0f,
106  bool icp2D = false);
107 
108 Transform RTABMAP_EXP icpPointToPlane(
109  const pcl::PointCloud<pcl::PointNormal>::ConstPtr & cloud_source,
110  const pcl::PointCloud<pcl::PointNormal>::ConstPtr & cloud_target,
111  double maxCorrespondenceDistance,
112  int maximumIterations,
113  bool & hasConverged,
114  pcl::PointCloud<pcl::PointNormal> & cloud_source_registered,
115  float epsilon = 0.0f,
116  bool icp2D = false);
117 Transform RTABMAP_EXP icpPointToPlane(
118  const pcl::PointCloud<pcl::PointXYZINormal>::ConstPtr & cloud_source,
119  const pcl::PointCloud<pcl::PointXYZINormal>::ConstPtr & cloud_target,
120  double maxCorrespondenceDistance,
121  int maximumIterations,
122  bool & hasConverged,
123  pcl::PointCloud<pcl::PointXYZINormal> & cloud_source_registered,
124  float epsilon = 0.0f,
125  bool icp2D = false);
126 
127 } // namespace util3d
128 } // namespace rtabmap
129 
130 #endif /* UTIL3D_REGISTRATION_H_ */
Transform RTABMAP_EXP transformFromXYZCorrespondencesSVD(const pcl::PointCloud< pcl::PointXYZ > &cloud1, const pcl::PointCloud< pcl::PointXYZ > &cloud2)
Transform RTABMAP_EXP icpPointToPlane(const pcl::PointCloud< pcl::PointNormal >::ConstPtr &cloud_source, const pcl::PointCloud< pcl::PointNormal >::ConstPtr &cloud_target, double maxCorrespondenceDistance, int maximumIterations, bool &hasConverged, pcl::PointCloud< pcl::PointNormal > &cloud_source_registered, float epsilon=0.0f, bool icp2D=false)
void RTABMAP_EXP computeVarianceAndCorrespondences(const pcl::PointCloud< pcl::PointNormal >::ConstPtr &cloudA, const pcl::PointCloud< pcl::PointNormal >::ConstPtr &cloudB, double maxCorrespondenceDistance, double maxCorrespondenceAngle, double &variance, int &correspondencesOut)
Transform RTABMAP_EXP transformFromXYZCorrespondences(const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &cloud1, const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &cloud2, double inlierThreshold=0.02, int iterations=100, int refineModelIterations=10, double refineModelSigma=3.0, std::vector< int > *inliers=0, cv::Mat *variance=0)
#define RTABMAP_EXP
Definition: RtabmapExp.h:38
Transform RTABMAP_EXP icp(const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &cloud_source, const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &cloud_target, double maxCorrespondenceDistance, int maximumIterations, bool &hasConverged, pcl::PointCloud< pcl::PointXYZ > &cloud_source_registered, float epsilon=0.0f, bool icp2D=false)
int RTABMAP_EXP getCorrespondencesCount(const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &cloud_source, const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &cloud_target, float maxDistance)


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:38:58