M-File Help: icp View code for icp

icp

Point cloud alignment

T = icp(p1, p2, options) is the homogeneous transformation that best transforms the set of points p1 to p2 using the iterative closest point algorithm.

[T,d] = icp(p1, p2, options) as above but also returns the norm of the error between the transformed point set p2 and p1.

Options

'dplot', D show the points P1 and P2 at each iteration, with a delay of D [sec].
'plot' show the points P1 and P2 at each iteration, with a delay of 0.5 [sec].
'maxtheta', T limit the change in rotation at each step to T (default 0.05 rad)
'maxiter', N stop after N iterations (default 100)
'mindelta', T stop when the relative change in error norm is less than T (default 0.001)
'distthresh', T eliminate correspondences more than T x the median distance at each iteration.

Example

Create a 3D point cloud

p1 = randn(3,20);

Transform it by an arbitrary amount

T = transl(1,2,3)*eul2tr(0.1, 0.2, 0.3)
p2 = homtrans( T, p1);

Perform icp to determine the transformation that maps p1 to p2

icp(p1, p2)

Notes

Reference


 

© 1990-2012 Peter Corke.