Skip to main content
. 2024 Dec 10;24(24):7889. doi: 10.3390/s24247889
Algorithm 1. CSNDT
Input:
   X: Current scan
   Y: Reference scan
Output:
   p: Transform parameter
 1: {Initialization:}
 2: Y={C1, C2, …, Cn} ← L-DBSCAN
 3: For all Point cloud cluster Ci∈Y do
 4:   Ci={m1,…,mm} ← all points in Ci
 5:   μj←1n∑i=1mmj mj∈Ci
 6:   ∑j←1n∑j=1m(mj−μj)(mj−μj)T
 7:   l=max(xmax−xmin, ymax−ymin)
 8:   If seg>1 do segmentation
 9:     For all small Point cloud cluster Cis∈Ci do
 10:       Cis={m1,…,mm} ← all points in Cis
 11:       μjs←1n∑i=1mmj mj∈Ci
 12:       ∑js←1n∑j=1m(mj−μjs)(mj−μjs)T
 13:     End for
 14:   End if
 15: End for
 16: {First Registration:}
 17: While not converged do
 18:   score←0, g←0, H←0, p1←0
 19:   For all points xi∈X do
 20:     Find the cell Fi that contains xi′
 21:     score←score+p(xi′)
 22:     Update g, H
 23:   End for
 24:   Solve HΔp1=−g
 25:   p1←p1+Δp1
 26: End while
 27: {Second Registration:}
 28: While not converged do
 29:   score←0, g←0, H←0, p2←p1
 30:   For all points xi∈X do
 31:     Find the cell Fis that contains xi′
 32:     score←score+p(xi′)
 33:     Update g, H
 34:   End for
 35:   Solve HΔp2=−g
 36:   p2←p2+Δp2
 37: End while