util3d_registration.h
Go to the documentation of this file.
00001 /*
00002 Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
00003 All rights reserved.
00004 
00005 Redistribution and use in source and binary forms, with or without
00006 modification, are permitted provided that the following conditions are met:
00007     * Redistributions of source code must retain the above copyright
00008       notice, this list of conditions and the following disclaimer.
00009     * Redistributions in binary form must reproduce the above copyright
00010       notice, this list of conditions and the following disclaimer in the
00011       documentation and/or other materials provided with the distribution.
00012     * Neither the name of the Universite de Sherbrooke nor the
00013       names of its contributors may be used to endorse or promote products
00014       derived from this software without specific prior written permission.
00015 
00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
00017 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00018 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00019 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
00020 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00021 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00022 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00023 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00024 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00025 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00026 */
00027 
00028 #ifndef UTIL3D_REGISTRATION_H_
00029 #define UTIL3D_REGISTRATION_H_
00030 
00031 #include <rtabmap/core/RtabmapExp.h>
00032 
00033 #include <pcl/point_cloud.h>
00034 #include <pcl/point_types.h>
00035 #include <rtabmap/core/Transform.h>
00036 #include <opencv2/core/core.hpp>
00037 
00038 namespace rtabmap
00039 {
00040 
00041 namespace util3d
00042 {
00043 
00044 int RTABMAP_EXP getCorrespondencesCount(const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_source,
00045                                                         const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_target,
00046                                                         float maxDistance);
00047 
00048 Transform RTABMAP_EXP transformFromXYZCorrespondencesSVD(
00049         const pcl::PointCloud<pcl::PointXYZ> & cloud1,
00050         const pcl::PointCloud<pcl::PointXYZ> & cloud2);
00051 
00052 Transform RTABMAP_EXP transformFromXYZCorrespondences(
00053                 const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud1,
00054                 const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud2,
00055                 double inlierThreshold = 0.02,
00056                 int iterations = 100,
00057                 int refineModelIterations = 10,
00058                 double refineModelSigma = 3.0,
00059                 std::vector<int> * inliers = 0,
00060                 double * variance = 0);
00061 
00062 void RTABMAP_EXP computeVarianceAndCorrespondences(
00063                 const pcl::PointCloud<pcl::PointNormal>::ConstPtr & cloudA,
00064                 const pcl::PointCloud<pcl::PointNormal>::ConstPtr & cloudB,
00065                 double maxCorrespondenceDistance,
00066                 double & variance,
00067                 int & correspondencesOut);
00068 void RTABMAP_EXP computeVarianceAndCorrespondences(
00069                 const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloudA,
00070                 const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloudB,
00071                 double maxCorrespondenceDistance,
00072                 double & variance,
00073                 int & correspondencesOut);
00074 
00075 Transform RTABMAP_EXP icp(
00076                 const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_source,
00077                 const pcl::PointCloud<pcl::PointXYZ>::ConstPtr & cloud_target,
00078                 double maxCorrespondenceDistance,
00079                 int maximumIterations,
00080                 bool & hasConverged,
00081                 pcl::PointCloud<pcl::PointXYZ> & cloud_source_registered,
00082                 float epsilon = 0.0f,
00083                 bool icp2D = false);
00084 
00085 Transform RTABMAP_EXP icpPointToPlane(
00086                 const pcl::PointCloud<pcl::PointNormal>::ConstPtr & cloud_source,
00087                 const pcl::PointCloud<pcl::PointNormal>::ConstPtr & cloud_target,
00088                 double maxCorrespondenceDistance,
00089                 int maximumIterations,
00090                 bool & hasConverged,
00091                 pcl::PointCloud<pcl::PointNormal> & cloud_source_registered,
00092                 float epsilon = 0.0f,
00093                 bool icp2D = false);
00094 
00095 } // namespace util3d
00096 } // namespace rtabmap
00097 
00098 #endif /* UTIL3D_REGISTRATION_H_ */


rtabmap
Author(s): Mathieu Labbe
autogenerated on Sat Jul 23 2016 11:44:28