icp_numpy

compas.geometry.icp_numpy(source, target, tol=0.001)[source]

Align two point clouds using the Iterative Closest Point (ICP) method.

Parameters
  • source (list of point) – The source data.

  • target (list of point) – The target data.

  • tol (float, optional) – Tolerance for finding matches. Default is 1e-3.

Returns

The transformed points

Notes

First we align the source with the target cloud using the frames resulting from a PCA of each of the clouds, simply by calculating a frame-to-frame transformation.

This initial alignment is used to establish an initial correspondence between the points of the two clouds.

Then we iteratively improve the alignment by computing successive “best-fit” transformations using SVD of the cross-covariance matrix of the two data sets. During this iterative process, we continuously update the correspondence between the point clouds by finding the closest point in the target to each of the source points.

The algorithm terminates when the alignment error is below a specified tolerance.

Examples

>>>