【问题标题】:Aligning point clouds given the correct correspondences给定正确的对应关系对齐点云
【发布时间】:2021-02-08 21:32:19
【问题描述】:

我一直在 pcl 中试验几种注册方法。我对他们中的大多数人的问题是初始对齐。因此,我开始更多地研究如何找到点对应关系。根据我所读到的内容,我发现了一些用于特征计算和匹配的良好参数值,这些参数值可以在我专门使用的点云之间实现完美匹配。我可以看到它们是正确的,因为我知道我期望的结果。

现在,有了这些正确的对应关系,我如何运行 ICP 或任何其他将这些对应关系作为初始条件的注册算法?

我尝试将pcl::IterativeClosestPointcorrespondences_ 成员设置为我找到的对应关系,但看起来它没有得到考虑。我想它只是在执行align 时更新。

我还在 pcl 文档中遇到了一些 TransformationEstimation 类,但我什至无法理解如何从文档中定义这些类(如果它们是这里的方法)。例如我试过这个:

pcl::Correspondences correspondences;
//... Filling the correspondences
//
Eigen::Matrix4f finalTransform;
pcl::registration::TransformationEstimationSVD<pcl::PointCloud<pcl::PointXYZ>, pcl::PointCloud<pcl::PointXYZ>,pcl::Correspondences> aman;
aman.estimateRigidTransformation(*samplesChosenSource, *samplesChosenTarget,correspondences,finalTransform);

前 2 个参数是点云,仅包括我在上一步中设法匹配的点。

这是班级的documentation。这是弹出的错误:

正如我所说,我并不想专门使用这个类。我只是想实现我上面解释的。但是,解释为什么上述类不起作用将有助于我使用库中的其他类。这只是一个例子。我尝试使用很多看起来很有帮助的东西,但我无法定义它们中的任何一个。

【问题讨论】:

    标签: registration point-cloud-library


    【解决方案1】:

    “初始对齐”步骤(实际上是任何对齐)计算旋转矩阵,您可以使用pcl::Registration 抽象类的getFinalTransformation 获得。因此,例如,假设您使用SampleConsensusPrerejective

    pcl::SampleConsensusPrerejective<pcl::PointXYZ, pcl::PointXYZ, pcl::FPFHSignature33> sac_pr_ia;
    ...
    sac_pr_ia.align(ia_cloud);
    Eigen:Matrix4F ia_transform = sac_pr_ia.getFinalTransformation();
    

    比使用 ICP 作为“猜测”:

    pcl::IterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ> icp;
    ...
    icp.align(fine_cloud, ia_transform );
    

    【讨论】:

      猜你喜欢
      • 2021-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-16
      • 2013-08-04
      • 2014-07-27
      • 1970-01-01
      • 2016-04-30
      相关资源
      最近更新 更多