Skip to main content
. 2024 May 15;24(10):3148. doi: 10.3390/s24103148
Algorithm 1: Railway scanline division and calibration, SFRE process
Input: point cloud set P, the number of pulses of a scanning line m;
Output: Rail point cloud Prail
1: k=0;
2: for i=1; i<n; i++ do
3:   Line cluster I(k) ← m points
4:    k++
5: end for
6: I(g) ← ground scanning line
7: p·z=0 (p ∈ I(g))
8: αxoy ← I(g)[50, m−50] RANSAC line fitting
9: R1 ← αxoy
10: p·x=0 (p ∈ I(g))
11: αyoz ← I(g)[50, m−50] RANSAC line fitting
12: R2 ← αyoz
13: P ′=R1R2P
14:  bucket<key, value>
15: for i=0; i<P′·size(); i++do
16:  if bucket·count(P′·x/A)>0 then
17:      bucket[P′·x/A]++
18:  else bucket[P′·x/A]=1
19:  end if
20: end for
21: //Get the the two keys with the maximum values
22: key1, key2 ← Max(bucket[key1]), Max(bucket[key2])
23: Prail·x1=key1 * A
24: Prail·x2=key2 * A
25: //f(P, x1, x2) filtering in the x direction with set P
26: Prail ← f(P ′, Prail·x1, Prail·x2)
27: return Prail