Skip to main content
. 2021 May 26;21(11):3703. doi: 10.3390/s21113703
Algorithm 1. GPCA outliers removed
Input:S(n×3points)
Output: Sf(nf×3points),Sw(nw×3points)
 1: S=(xn,yn,zn)
 2: μ=1ni=1nxi,1ni=1nyi,1ni=1nzi
 3: for eachpoint pi=(xi,yi,zi)S do
 4:   pi=piμ
 5: end for
 6: C=S
 7: Γ=1nCTC
 8: UΣVT=Γ
 9: V=t1,t2,t3
10: ΔT=(t1,t2)
11: Sq=SΔT
12: bx=xmaxxmin/l
13: by=ymaxymin/l
14: for eachpointvi=xi,yiSq do
15:   hxi=round((xixmin)/bx)
16:   hyi=round((yiymin)/by)
17:   hi=(hxi,hyi)
18: end for
19: for eachgrid(i,j) do
20:   Countthenumberkijofpointsineachcell
21:   if kij<kσ then
22:     NoisefPointsingrid(i,j)
23:   else
24:     WallpointswPointsingrid(i,j)
25:   end if
26: end for
27: GetSfandSw