 Download Download Presentation Iterative Closest Point

# Iterative Closest Point

Télécharger la présentation ## Iterative Closest Point

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. Iterative Closest Point Ronen Gvili www.cs.tau.ac.il/~dcor/Graphics/adv-slides/ICP.ppt

2. The Problem • Align two partially-overlapping meshesgiven initial guessfor relative transform

3. Data Types • Point sets • Line segment sets (polylines) • Implicit curves : f(x,y,z) = 0 • Parametric curves : (x(u),y(u),z(u)) • Triangle sets (meshes) • Implicit surfaces : s(x,y,z) = 0 • Parametric surfaces (x(u,v),y(u,v),z(u,v)))

4. Motivation • Shape inspection • Motion estimation • Appearance analysis • Texture Mapping • Tracking

5. Motivation • Range images registration

6. Motivation • Range images registration

7. Range Scanners

8. Aligning 3D Data

9. Corresponding Point Set Alignment • Let M be a model point set. • Let S be a scene point set. We assume : • NM = NS. • Each point Si correspond to Mi .

10. Corresponding Point Set Alignment The MSE objective function : The alignment is :

11. Aligning 3D Data • If correct correspondences are known, can find correct relative rotation/translation

12. Aligning 3D Data • How to find correspondences: User input? Feature detection? Signatures? • Alternative: assume closest points correspond

13. Aligning 3D Data • How to find correspondences: User input? Feature detection? Signatures? • Alternative: assume closest points correspond

14. Aligning 3D Data • Converges if starting position “close enough“

15. Closest Point • Given 2 points r1 and r2 , the Euclidean distance is: • Given a point r1 and set of points A , the Euclidean distance is:

16. Finding Matches • The sceneshape S is aligned to be in the best alignment with the model shape M. • The distance of each point s of the scene from the model is :

17. Finding Matches C – the closest point operator Y – the set of closest points to S

18. Finding Matches • Finding each match is performed in O(NM) worst case. • Given Y we can calculate alignment • S is updated to be :

19. The Algorithm Init the error to ∞ Y = CP(M,S),e Calculate correspondence (rot,trans,d) Calculate alignment S`= rot(S)+trans Apply alignment d` = d Update error If error > threshold

20. The Algorithm function ICP(Scene,Model) begin E`  + ∞; (Rot,Trans)  In Initialize-Alignment(Scene,Model); repeat E  E`; Aligned-Scene  Apply-Alignment(Scene,Rot,Trans); Pairs  Return-Closest-Pairs(Aligned-Scene,Model); (Rot,Trans,E`)  Update-Alignment(Scene,Model,Pairs,Rot,Trans); Until |E`- E| < Threshold return (Rot,Trans); end

21. Convergence Theorem • The ICP algorithm always converges monotonically to a local minimum with respect to the MSE distance objective function.

22. Convergence Theorem • Correspondence error : • Alignment error:

23. Ek Calculate correspondence Dk Calculate alignment S`= rot(S)+trans Apply alignment Convergence Theorem Ek+1 Calculate correspondence Dk+1 Calculate alignment

24. Convergence Theorem • Proof :

25. Convergence Theorem • Proof : If not - the identity transform would yield a smaller MSE than the least square alignment. Apply the alignmentqk on S0 Sk+1 . Assuming the correspondences are maintained: the MSE is still dk.

26. Convergence Theorem • Proof : After the last alignment, the closest point operator is applied : It is clear that: Thus :

27. Time analysis Each iteration includes 3 main steps A. Finding the closest points : O(NM) per each point O(NM*NS) total. B. Calculating the alignment: O(NS) C. Updating the scene: O(NS)

28. Optimizing the Algorithm The best match/nearest neighbor problem : Given N records each described by K real values (attributes) , and a dissimilarity measure D , find the m records closest to a query record.

29. Optimizing the Algorithm • K-D Tree : Construction time: O(knlogn) Space: O(n) Region Query : O(n1-1/k+k )

30. Optimizing the Algorithm Optimizing the K-D Tree : • Motivation: In each internal node we can exclude the sub K-D tree if the distance to the partition is greater than the ball radius . • Adjusting the discriminating number, the partition value , and the number of records in each bucket.

31. Optimizing the Algorithm

32. Optimizing the Algorithm

33. Optimizing the Algorithm

34. Optimizing the Algorithm • Optimizing the K-D Tree : We choose in each internal node the key with the largest spread values as the discriminator and the median as the partition value.

35. Optimizing the Algorithm • The Optimized K-D Tree : Construction time : Tn = 2Tn/2+kN = O(KNlogN) Search time: O(logN) Expected.

36. Optimizing the Algorithm • The Optimized K-D Tree : The algorithm can use the m-closest points to cache potentially closest points.

37. Optimizing the Algorithm • As the ICP algorithm proceeds a sequence of vectors is generated : q1, q2, q3, q4…

38. Optimizing the Algorithm • Let be a small angular tolerance. • Suppose : • Instead of 50 iterations in the ICP , this accelerated variant converges in less than 20 iterations.

39. Time analysis Each iteration includes 3 main steps A. Finding the closest points : O(NM) per each point O(NMlogNS) total. B. Calculating the alignment: O(NS) C. Updating the scene: O(NS)

40. ICP Variants • Variants on the following stages of ICPhave been proposed: • Selecting sample points (from one or both meshes) • Matching to points in the other mesh • Weighting the correspondences • Rejecting certain (outlier) point pairs • Assigning an error metric to the current transform • Minimizing the error metric w.r.t. transformation

41. Performance of Variants • Can analyze various aspects of performance: • Speed • Stability • Tolerance of noise and/or outliers • Maximum initial misalignment

42. ICP Variants • Selecting sample points (from one or both meshes). • Matching to points in the other mesh. • Weighting the correspondences. • Rejecting certain (outlier) point pairs. • Assigning an error metric to the current transform. • Minimizing the error metric w.r.t. transformation.

43. Selection of points • Use all available points [Besl 92]. • Uniform subsampling [Turk 94]. • Random sampling in each iteration [Masuda 96]. • Ensure that samples have normals distributed as uniformly as possible [Rusinkiewicz 01].

44. Selection of points Uniform Sampling Normal-Space Sampling

45. ICP Variants • Selecting sample points (from one or both meshes). • Matching to points in the other mesh. • Weighting the correspondences. • Rejecting certain (outlier) point pairs. • Assigning an error metric to the current transform. • Minimizing the error metric w.r.t. transformation.

46. Points matching • Closest point in the other mesh [Besl 92]. • Normal shooting [Chen 91]. • Reverse calibration [Blais 95]. • Restricting matches to compatible points (color, intensity , normals , curvature ..) [Pulli 99].

47. Closest point : Points matching

48. Normal Shooting Points matching