|
Algorithm 1: GrassRemoval : Grass removal from point cloud P
|
-
1:
procedure GrassRemoval(P)
-
2:
Rotate P about Z and Y axes to align vertically.
-
3:
if m then
-
4:
Flag P as Potential_Grass
-
5:
-
6:
-
7:
while do
-
8:
RANSAC_Plane_Segment(B)
-
9:
if then
-
10:
break
-
11:
end if
-
12:
angle between normal of and Y-axis
-
13:
if then
-
14:
-
15:
end if
-
16:
-
17:
end while
-
18:
if then
-
19:
plane in with maximum number of points
-
20:
-
21:
-
22:
for all B do
-
23:
distance from p to
-
24:
if m then
-
25:
-
26:
end if
-
27:
end for
-
28:
-
29:
return
-
30:
else
-
31:
-
32:
-
33:
-
34:
-
35:
-
36:
return
-
37:
end if
-
38:
else
-
39:
return P ▹ No preprocessing needed
-
40:
end if
-
41:
end procedure
|