0

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

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

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

4

2 回答 2

0

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
于 2021-11-05T19:15:12.533 回答
0

正如另一位用户已经提到的,ICP 算法(PCL 中的实现可以在此处找到)可用于将两个点云相互配准。然而,这只适用于本地,因此必须首先对齐云。

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

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

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

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

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

于 2021-11-09T12:05:04.300 回答