将各个视角下的点合并到统一的坐标系下
配准可以分为粗配准和精配准两个阶段
粗配准是在点云相对位姿完全未知的情况下对点云进行配准,找到一个可以让两块点云相对近似的旋转平移变换矩阵,为精配准提供良好的初始值。
精配准是指在粗配准的基础上,让点云之间的空间位置差异最小化,得到一个更加精准的旋转平移变换矩阵。该算法的运行速度以及收敛性在很大程度上依赖于给定的初始变换估计以及在迭代过程中对应关系的确立。所以需要各种粗配准技术为ICP算法提供较好的位置。(ICP、NDT)
自动配准技术
整体配准和局部配准
PCL实现的配准算法
步骤:
1. 提取关键点,计算描述子
2. 初步估计对应点对
3. 除去噪声点和错误点对
4. 用正确点对估算变换矩阵
使用迭代最近点算法(ICP)
IterativeClosestPoint<PointXYZ, PointXYZ> icp;
// Set the input source and target
icp.setInputCloud (cloud_source);
icp.setInputTarget (cloud_target);
// Set the max correspondence distance to 5cm (e.g., correspondences with higher distances will be ignored)
icp.setMaxCorrespondenceDistance (0.05); // 距离较大的距离将被忽略
// Set the maximum number of iterations (criterion 1)
icp.setMaximumIterations (50);
// Set the transformation epsilon (criterion 2)
icp.setTransformationEpsilon (1e-8);
// Set the euclidean distance difference epsilon (criterion 3)
icp.setEuclideanFitnessEpsilon (1);
// Perform the alignment
icp.align (cloud_source_registered);
// Obtain the transformation that aligned cloud_source to cloud_source_registered
Eigen::Matrix4f transformation = icp.getFinalTransformation ();
报错:error: inconsistent operand constraints in an ‘asm’
EIGEN_GEBGP_ONESTEP(0);
目前的解决方案是eigen3.3.6换成eigen3.2.10
2. 逐步匹配多幅点云
3. 交互式ICP
其实就是在普通ICP匹配上加上了查看器,可以控制ICP迭代的进度
4. 正态分布变换匹配
用正态分布变换算法来确定两个大型点云(都超过 100 000个点)之间的刚体变换。因为其在配准过程中不利用对应点的特征计算和匹配,所以时间比其他方法快。
5. 刚性物体的鲁棒姿态估计
在具有杂波和遮挡的场景中找到刚体的对齐姿势