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::PointXYZ>::ConstPtr & cloudA,
71  const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloudB,
72  double maxCorrespondenceDistance,
73  double & variance,
74  int & correspondencesOut);
75 
76 Transform RTABMAP_EXP icp(
77  const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_source,
78  const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_target,
79  double maxCorrespondenceDistance,
80  int maximumIterations,
81  bool & hasConverged,
82  pcl::PointCloud<pcl::PointXYZ> & cloud_source_registered,
83  float epsilon = 0.0f,
84  bool icp2D = false);
85 
87  const pcl::PointCloud<pcl::PointNormal>::ConstPtr & cloud_source,
88  const pcl::PointCloud<pcl::PointNormal>::ConstPtr & cloud_target,
89  double maxCorrespondenceDistance,
90  int maximumIterations,
91  bool & hasConverged,
92  pcl::PointCloud<pcl::PointNormal> & cloud_source_registered,
93  float epsilon = 0.0f,
94  bool icp2D = false);
95 
96 } // namespace util3d
97 } // namespace rtabmap
98 
99 #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 Wed Jun 5 2019 22:43:41