【问题标题】:How to align two Point Clouds given the set of points and point-to-point correspondence?给定点集和点对点对应关系,如何对齐两个点云?
【发布时间】:2021-12-17 11:49:06
【问题描述】:

假设我有两个点云[x1, x2, x3...][y1, y2, y3...]。这两个点云应该尽可能接近。点云配准问题有很多算法和深度学习技术。但我有额外的信息:点 x1 和 y1 应该对齐,x2 和 y2 应该对齐,等等。

所以两个点云中点的顺序是一样的。如何使用它来正确获取转换矩阵以对齐这些两点云?

注意:这两个点云并不完全相同。实际上,我有地面实况点云[x1,x2,x3...],我尝试将另一个点云重建为[y1,y2,y3...]。现在我想匹配它们并可视化它们是否重建好。

【问题讨论】:

  • 使用 ICP,但您已经有了匹配,因此您可以跳过它所做的分配步骤。剩下的是一些可能涉及雅可比或其他东西的数学。像往常一样,维基百科对理解“估计变换”步骤没有帮助......这使用cv.estimateRigidTransformstackoverflow.com/questions/20120384/…
  • cv.estimateAffine3D 似乎可以满足您的需求。它假设匹配点集,就像你一样。它也不是很仿射,因为描述说它只涉及平移、旋转、缩放(甚至那些可以被锁定)但谁知道......无论如何,这是一个开始

标签: computer-vision alignment point-cloud-library point-clouds transformation-matrix


【解决方案1】:

正如另一位用户已经提到的,ICP 算法 (implementation in PCL can be found here) 可用于将两个点云相互配准。但是,这只适用于本地,因此必须先对齐云。

我认为目前 PCL 中没有全局注册,但我使用了 OpenGR,它有一个 PCL 包装器。

如果您确定 x1 在 y1 附近,x2 在 y2 附近等。您可以进行手动对齐,这将比全局对齐快得多:

  1. 通过向量 y1-x1 平移第二朵云
  2. 将向量 y2-y1 旋转为向量 x2-x1

然后使用 ICP 对其进行细化。

这不考虑测量误差,因此如果您的数据不是 100% 正确,则使用上述矩阵估计将很有用。

【讨论】:

    【解决方案2】:

    VTK 的 vtkLandmarkTransform 也做同样的事情,支持 RigidBody/Similarity/Affine 变换:

    // need at least four pairs of points in sourcePoint and targetPoints,
    // can pick more, but probably not too many
    vtkLandmarkTransform landmarkTransform = new vtkLandmarkTransform();
    landmarkTransform.SetSourceLandmarks(sourcePoints);  // source is to be transformed to match the target
    landmarkTransform.SetTargetLandmarks(targetPoints);   // target stays still
    landmarkTransform.SetMode(VTK_Modes.AFFINE);
    landmarkTransform.Modified();  // do the calculation
    landmarkTransform.GetMatrix(mtx);
    
    // now you can apply the mtx to all points
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-14
      • 1970-01-01
      • 2013-01-03
      • 2014-07-27
      • 2014-07-22
      • 1970-01-01
      相关资源
      最近更新 更多