pcl使用icp对2d点云进行匹配icp_2d

        pcl中ICP算法可以对两个3d点云进行匹配,在实际应用过程中,有时候需要对2d点云进行匹配,虽然也可以将2d点云保存为3d点云,再使用ICP进行匹配,但匹配过程引入了不必要的自由度,会导致计算速度变慢或者匹配错误。

        根据上一篇博客可知,ICP在构造函数中会构造三个对象,其中transformation_estimation_定义了ICP最近点匹配后计算变换矩阵的方法,默认采用SVD分解计算,如下所示:

transformation_estimation_.reset (new pcl::registration::TransformationEstimationSVD<PointSource, PointTarget, Scalar> ());

而这个transformation_estimation_对象时可以通过icp的setTransformationEstimation方法进行替换的,因此就想到pcl的registration文件夹中可能会存在其他transformation_estimation方法,结果真的发现了transformation_estimation_2D.h,这个文件中有TransformationEstimation2D类,是专门针对2d点云位姿估计的,可以构造TransformationEstimation2D的对象来替换icp默认的transformation_estimation_来实现2d的icp计算。调用的过程如下所示:

pcl::registration::TransformationEstimation2D<PointXYZ, PointXYZ>::Ptr
			transform_estimation(new pcl::registration::TransformationEstimation2D<PointXYZ, PointXYZ>());
pcl::IterativeClosestPoint<PointXYZ, PointXYZ>::Ptr icp(new pcl::IterativeClosestPoint<PointXYZ, PointXYZ>());
icp_->setTransformationEstimation(transform_estimation);

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值