# Advanced Methods for Point Cloud Processing and Simplification
## 5 Planar Surface Detection Algorithm  
The known orientation angle of a point cloud allows the detection of planar surfaces in all coordinate axes directly by using only three passes for each axis. More details about the LCCL algorithm are described in papers [29; 30; 32]. In short, there are two important parameters: the _lvlS_ as the maximal deviation from a level value and the _lvlRS_ multiplier denoting the new level searching range. The algorithm scans a selected coordinate axis by the global virtual plane, which covers the whole horizontal range of the selected axis. The following figures (Figures 10-12) illustrate the planar surface detection by using the LCCL algorithm and level image in the X, Y and Z axes respectively.  
Figure 8: Sum of local maxima of the X and Y axes histograms: (**a**) X-axis sum; (**b**) Y-axis sum.  
Figure 9: Point cloud with corrected orientation: (**a**) Output point cloud; (**b**) New histograms of point density in all coordinate axes.  
The width of the analyzed data is defined as the \(lvlS\cdot lvlRS\) and from the selected range, a level \(dL\) with the highest concentration is found by using the histogram. The range of the detected level is defined as \(dL\pm lvlS\). We also developed the algorithm for finding the fine range described in reference [32]. The Figure 10c,d nicely illustrates the planar surface detection of the radiator and the erasing of the selected undesired points by the morphological open. The thickness of the undesired points is smaller than the used element.  
The range for the next level estimation is selected from the last \(dL+lvlS\) and the same range \(lvlS\cdot lvlRS\) used above. This way of selection and using the histogram for finding the highest point concentration allows finding all uniformly distributed flat surfaces in the analyzed point cloud.  
The LCCL algorithm itself is not sufficient for planar surface detection. As in Figures 10c, 11c and 12c, from each founded level \(dL\), the \(I_{L}\) is created by using the point space quantization parameter \(qD\). For this testing purpose, \(qD=4\) cm, \(lvlS=5\) cm and \(lvlRS=2.5\) are selected. The \(I_{L}\) is firstly processed by the morphological operations and the all planar surfaces are found by the level connected component labeling algorithm. Searching of all levels in all coordinate axes took about 80 ms. The main  
Figure 11: Planar surface detection in Y-axis: (**a**) 1 st level selection in the Y-axis; (**b**) Segmented point cloud; (**c**) Resulting level image; (**d**) Morphologically closed and opened image.  
Figure 12: Planar surface detection in Z-axis: (**a**) 1 st level selection in the Z-axis; (**b**) Segmented point cloud; (**c**) Resulting level image; (**d**) Morphologically closed and opened image.  
Figure 10: Planar surface detection in X-axis: (**a**) 2 nd level selection in the X-axis; (**b**) Segmented point cloud; (**c**) Resulting level image; (**d**) Morphologically closed and opened image.  
advantage of \(I_{L}\) is the definite physical position determination of each pixel in space. The processing \(I_{L}\) allows the filling of these missing data. The proposed method is described in the next section.