Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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 }
00096 }
00097
00098 #endif