Skip to main content
. 2020 Jan 4;20(1):293. doi: 10.3390/s20010293
Algorithm 1 Wall Boundary extraction
Input: Lebeled wall point cloud:{P0}
Distance threshold to remove the point cloud: Td1
Distance threshold to filter the plane: Td2
Angle threshold to filter the plane: Ta
Distance threshold to reserve the point cloud: Td3
Percentage threshold to end the loop: Tp
Output: 2D Wall Lines in floor plane: L
1: initialize: remaining point cloud:{Pr} = {P0}
2: while C({Pr})< C({P0} Tp) do
3:    Plane candidate: pc=F({Pr})
4:    if L is empty then
5:       add Proj(pc) to L
6:       Distance between points and plane: D= D1({Pr})
7:       Distance between points and line in floor plane: DF=D2(Proj(pc), {Pr})
8:       for i=1, i C({Pr}), i++ do
9:          if Di < Td1 and DFi < Td3 then
10:           add {Pr}i to ready to remove set {Pm}
11:         end if
12:       end for
13:   else
14:       for j=1, jlength(L), j++ do
15:         Distance between planes: dp=Dis(pc, Lj)
16:         Angle between planes: ap=Ang(pc, Lj)
17:         if dp< Td2 and ap< Ta then
18:           Continue
19:         end if
20:       end for
21:       if j==length(L) then
22:         add Proj(pc) to L
23:         Distance between points and plane: D= D1({Pr})
24:         Distance between points and line in floor plane: DF=D2(Proj(pc), {Pr})
25:         for i=1, i C({Pr}), i++ do
26:          if Di < Td1 and DFi < Td3 then
27:             add {Pr}i to ready to remove set {Pm}
28:          end if
29:         end for
30:      end if
31:   end if
32:   remove point from {Pr}: {Pr}= {Pr}{Pm}
33: end while
34: Return: L