# Semi-Global Filtering of Airborne LiDAR Data for Fast Extraction of Digital Terrain Models

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Semi-Global Filtering

#### 2.1. Algorithm Overview

**G**. For each grid cell

**p = (x, y)**, the grid cell point

**G**is taken as the lowest elevation of all points within this grid cell. The empty cells without points are left blank and ignored during subsequent processing. The resolution of

_{p}**G**is related to the density of the raw point data. As illustrated in the section view of Figure 1, the set of height levels for each grid cell

**l**is defined as:

_{p}**d**is the unit height and

**N**is the number of possible height levels in grid cell

**p**.

**S**is the height of grid cell

_{p}**p**from the start surface

**S**. The start surface is a horizontal plane with height that is equal to the lowest elevation of all points in the raw point data.

**G**of size

**W × H**, SGF can be represented as a labeling problem in which the labels correspond to different height levels. As illustrates in the section view of Figure 1, the optimization procedure of SGF aims to assign an optimal label for each grid cell. This optimal label is the approximate ground height. To avoid clutter in subsequent sections, height levels are represented as labels. SGF optimizes the energy function as follows:

**l**is the set of possible labels for all grid cells, and

**l**denotes the optimal labels that minimize energy function

^{*}**E(l)**. The optimal labels

**l**form a classification surface

^{*}**C**, based on which the raw points are classified as either ground or non-ground. The data term

**E**and regularization term

_{data}(l)**E**are balanced by ground saliency

_{reg}(l)**γ**, which is discussed in the following section. Details about the data term and regularization term are presented in Section 2.3. For convenience in description, the desired DTM accuracy is defined as

**D**.

_{a}**Figure 1.**Workflow of SGF algorithm and the section view of a row from the regular grid (to avoid clutter, we draw possible labels for only one grid cell).

**p**(Figure 2a) with a label

**l**$\in $

**l**. These directions are +x, −x, +y, −y, +x+y, −x−y, +x−y and −x+y (Figure 2c). It is noteworthy that all the subsequent sections operate over these eight independent directions equally.

_{p}**Figure 2.**Optimization directions: (

**a**) a regular grid grayed by the corresponding image; (

**b**) and (

**c**) eight optimization directions used in SGF.

#### 2.2. Computation of Ground Saliency for Adaptively Balancing the Energy Function

**γ**to adaptively reconcile the energy function (2). At the onset of the experiment, the ground saliency

**γ**for each grid cell

_{p}**p**is set as 1.0

**γ**is then updated by two steps: segmentation and subtraction. Without loss of generality, assume that we are sweeping the window from left to right for a given row

_{p}**y**in the regular grid

**G**. The grid cell point

**G**is first segmented into segments according to the height difference with the grid cell point before it. Figure 3 illustrates the segmentation procedure for a given row when the window is swept from left to right. If the segment has a significant height discontinuity with the segment that comes after it, then the ground saliencies of all grid cells in this segment subtract a constant value of 0.125 (=

_{p}**1.0/N**,

**N**is the number of directions (i.e., eight directions in this paper)). Figure 4 displays a simulated example of the subtraction procedure for a given row when the window is swept from left to right and from right to left. The segmentation threshold

**S**in Figure 3 is equal to

_{thro}**D**and the subtraction threshold

_{a}**G**in Figure 4 is equal to 3

_{thro}**× D**. The segmentation and subtraction procedures are conducted in all eight crossing directions independently as shown in Figure 2. These steps operate extremely fast because they only perform simple computation (height comparison).

_{a}**Figure 3.**Cross section of the segmentation procedure when the window is swept from left to right: (

**a**) cross section of a given row from the regular grid; (

**b**), (

**c**) and (

**d**) grid cell points are segmented into different segments according to height difference with the grid cell points before them; and (

**e**) segmentation result.

**Figure 4.**Cross section of the subtraction procedure: (

**a**), (

**b**) and (

**c**) segment has a significant height discontinuity with the segment after it in this sweep direction (left to right), the ground saliencies of all grid cells in this segment subtract a constant value (0.125) in this simulated example; (

**d**), (

**e**) and (

**f**) show the similar operation from right to left.

**Figure 5.**Ground saliency results: (

**left**) is the corresponding image of point cloud (

**right**); (right) is grayed by (1.0 −

**γ**) × 100.

_{p}#### 2.3. Semi-Global Optimization

#### 2.3.1. Semi-Global Matching

**L**be a path that is traversed in the direction

_{r}**r**. The cost

**L**of pixel

_{r}(D_{p})**p**at disparity

**D**is defined recursive as:

**φ(D**is the data term (matching cost) defined by Mutual Information (MI), and

_{p})**φ(D**is the regularization term (smoothness cost) defined over the edge.

_{p-r}, D_{p})**r**:

**Figure 6.**Cost aggregation of SGM: (

**a**) minimum cost path in disparity space; and (

**b**) eight directions that go through the red pixel

**p**.

#### 2.3.2. Cost Aggregation of SGF

**G**and a given label

_{p}**l**$\in $

**l**:

_{p}**G**. Such an attraction force is strong if the label is close enough to a true ground cell point. The grid cell points belong to non-ground objects leave the classification surface unaffected. As shown in Figure 7a, the grid cell points from vegetation and buildings are too far from the classification surface to attract it.

**Figure 7.**(

**a**) Cross-section of a scene: the classification surface is attracted to the ground while the tree and building points are too far to attract the classification surface; (

**b**)

**q**is the grid cell before

**p**along a direction.

**q**in this case refers to the grid cell before

**p**along a direction (Figure 7b). This term adds small and large penalties to labels with little or great elevation changes, respectively. A small penalty for small elevation changes permits an adaptation to a gentle slope. Contrarily, a large penalty for large elevation changes preserves steep terrains, such as terraced fields and scarps.

**E(l)**via semi-global optimization, which is inspired by SGM [25,28]. A comparative study (http://vision.middlebury.edu/stereo) revealed that the semi-global optimization methods are not as accurate as state-of-the-art ones in solving the stereo matching of indoor scenes. Nevertheless, the semi-global optimization is faster and more robust than most other approaches, particularly when dealing with aerial data [30].Semi-global optimization performs cost aggregation as an approximation of the global optimization via DP from eight directions (Figure 2b). The cost

**C(p, l)**for a grid cell

**p**and a label

**l**$\in $

**l**is calculated by summing the costs of eight minimum cost directions that end in grid cell

_{p}**p**at label

**l**$\in $

**l**. Only the path cost of DP is required rather than the path itself. Finally, the label of each grid cell with the lowest total cost is selected to form the final classification surface. This semi-global optimization does not iterate and only converges at the summation of eight directional minimal costs.

_{p}**N**is the 4-connected neighborhood. The results are shown in Section 3.

_{p}#### 2.4. GPU Acceleration of SGF Algorithm

**N**is the number of possible labels in each grid cell.

#### 2.5. Point Filtering and Parameter Setting

**D**) to this surface are classified as ground points.

_{a}**D**, the resolution of the regular grid

_{a}**G**, the unit height

**d**, the segmentation threshold

**S**, and the subtraction threshold

_{thro}**G**. The desired DTM accuracy

_{thro}**D**is set according to the needs of the users. In Section 3, the desired DTM accuracy is 0.5 m. The resolution of the regular grid is equal to the area of the raw data coverage divided by the number of points. The segmentation threshold is equal to

_{a}**D**and the subtraction threshold is 3

_{a}**× D**.

_{a}**d**in (1) should be as small as possible. However, SGF may suffer from unacceptable computation cost and memory consumption because the set of possible labels is huge. To solve this problem, the SGF algorithm is performed twice. In the first execution, the unit height

**d**is set as a relative large value (i.e., 5 m). In the second execution, the unit height ${d}^{\prime}$ is set as a small value (i.e., half of

**D**) and the possible labels for each grid cell ${l}_{p}^{\prime}$ are then recalculated as follows:

_{a}## 3. Experimental Results and Discussion

#### 3.1. Quality Assessment on ISPRS Test Data Set

**Table 1.**Comparison of average accuracy among the eight classical filtering methods, parameter-free method (Mongus), TerraScan, BCD, and the proposed SGF algorithm for all benchmark study samples (the number in boldface indicates the smallest value in each error type, implying the corresponding method has the best performance).

Type I Error (%) | Type II Error (%) | Total Error (%) | |
---|---|---|---|

Elmqvist | 39.43 | 1.96 | 20.73 |

Sohn | 9.94 | 8.59 | 9.35 |

Axelsson | 5.55 | 7.46 | 4.82 |

Pfeifer | 10.82 | 3.32 | 8.02 |

Brovelli | 36.77 | 1.88 | 25.78 |

Roggero | 17.12 | 3.11 | 12.35 |

Wack | 16.52 | 1.58 | 12.04 |

Sithole | 24.59 | 2.08 | 17.48 |

Mongus | 4.5 | 6.5 | 5.49 |

TerraScan | 11.05 | 4.52 | 7.61 |

BCD | 5.69 | 3.41 | 4.88 |

SGF | 5.25 | 4.46 | 4.85 |

**Figure 9.**Detailed comparison of Axelsson’s algorithm, parameter-free method (Mongus), BCD, and the proposed SGF algorithm across 15 samples.

**Figure 10.**Error distribution of SGF and Axelsson’s algorithm on Sample11, Sample31, Sample 42, and Sample53.

#### 3.2. Computational Performance

^{2}.

Test Dataset | Sample | Sample1 | Sample2 | Sample3 | Sample4 | Sample5 |
---|---|---|---|---|---|---|

Number of Points (million) | 5.4 | 10.3 | 24.3 | 40.2 | 48.6 | |

TerraScan | CPU (s) | 15.1 | 31.4 | 75.8 | 115.4 | 140.3 |

GPU (s) | * | * | * | * | * | |

BCD | CPU (s) | 28.24 | 60.53 | 148.69 | 224.85 | 278.91 |

GPU (s) | 5.32 | 9.25 | 22.47 | 32.54 | 41.61 | |

SGF | CPU (s) | 9.67 | 19.21 | 44.54 | 75.38 | 89.62 |

GPU (s) | 1.91 | 3.52 | 8.11 | 12.36 | 15.42 |

*****TerraScan tested cannot be executed in GPU mode.

#### 3.3. Discussion

**Figure 11.**Preservation of steep slope: (

**a**) and (

**b**) are the cross sections; (

**c**) is the raw point data; (

**d**) is the DTM generated by SGF.

**Figure 12.**Preservation of terrain discontinuities: (

**a**), (

**b**) and (

**c**) are cross sections; (

**d**) is the terrain details; (

**e**) is the raw point data; (

**f**) is the DTM generated by SGF.

**Figure 13.**Removal of complex objects: (

**a**), (

**b**), (

**c**), and (

**d**) are cross sections; (

**e**) is the raw point data; (

**f**) is the DTM generated by SGF.

## 4. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Mongus, D.; Žalik, B. Parameter-free ground filtering of LiDAR data for automatic DTM generation. ISPRS J. Photogramm. Remote Sens.
**2012**, 67, 1–12. [Google Scholar] [CrossRef] - Sithole, G.; Vosselman, G. Experimental comparison of filter algorithms for bare-Earth extraction from airborne laser scanning point clouds. ISPRS J. Photogramm. Remote Sens.
**2004**, 59, 85–101. [Google Scholar] [CrossRef] - Liu, X. Airborne LiDAR for DEM generation: some critical issues. Prog. Phys. Geog.
**2008**, 32, 31–49. [Google Scholar] - Vosselman, G. Slope based filtering of laser altimetry data. Int. Arch. Photogramm. Remote Sens.
**2000**, 33, 935–942. [Google Scholar] - Shan, J.; Aparajithan, S. Urban DEM generation from raw LiDAR data. Photogramm. Eng. Remote Sens.
**2005**, 71, 217–226. [Google Scholar] [CrossRef] - Meng, X.; Wang, L.; Silván-Cárdenas, J.L.; Currit, N. A multi-directional ground filtering algorithm for airborne LiDAR. ISPRS J. Photogramm. Remote Sens.
**2009**, 64, 117–124. [Google Scholar] [CrossRef] - Susaki, J. Adaptive slope filtering of airborne LiDAR data in urban areas for digital terrain model (DTM) generation. Remote Sens.
**2012**, 4, 1804–1819. [Google Scholar] [CrossRef] [Green Version] - Kraus, K.; Pfeifer, N. Determination of terrain models in wooded areas with airborne laser scanner data. ISPRS J. Photogramm. Remote Sens.
**1998**, 53, 193–203. [Google Scholar] [CrossRef] - Pfeifer, N.; Reiter, T.; Briese, C.; Rieger, W. Interpolation of high quality ground models from laser scanner data in forested areas. Int. Arch. Photogramm. Remote Sens.
**1999**, 32, 31–36. [Google Scholar] - Lee, H.S.; Younan, N.H. DTM extraction of LiDAR returns via adaptive processing. IEEE Trans. Geosci. Remote Sens.
**2003**, 41, 2063–2069. [Google Scholar] [CrossRef] - Zhang, K.; Chen, S.; Whitman, D.; Shyu, M.; Yan, J.; Zhang, C. A progressive morphological filter for removing nonground measurements from airborne LiDAR data. IEEE Trans. Geosci. Remote Sens.
**2003**, 41, 872–882. [Google Scholar] [CrossRef] - Chen, Q.; Gong, P.; Baldocchi, D.; Xie, G. Filtering airborne laser scanning data with morphological methods. Photogramm. Eng. Remote Sens.
**2007**, 73, 175–185. [Google Scholar] [CrossRef] - Mongus, D.; Lukač, N.; Žalik, B. Ground and building extraction from LiDAR data based on differential morphological profiles and locally fitted surfaces. ISPRS J. Photogramm. Remote Sens.
**2014**, 93, 145–156. [Google Scholar] [CrossRef] - Axelsson, P. DEM generation from laser scanner data using adaptive TIN models. Int. Arch. Photogramm. Remote Sens.
**2000**, 33, 111–118. [Google Scholar] - Sohn, G.; Dowman, I.J. Terrain surface reconstruction by the use of tetrahedron model with the MDL criterion. Int. Arch. Photogramm. Remote Sens.
**2002**, 34, 336–344. [Google Scholar] - Kang, X.; Liu, J.; Lin, X. Streaming progressive TIN densification filter for airborne LiDAR point clouds using multi-core architectures. Remote Sens.
**2014**, 6, 7212–7232. [Google Scholar] [CrossRef] - Sithole, G.; Vosselman, G. Filtering of airborne laser scanner data based on segmented point clouds. Int. Arch. Photogramm. Remote Sens.
**2005**, 36, 66–71. [Google Scholar] - Tóvári, D.; Pfeifer, N. Segmentation based robust interpolation-a new approach to laser data filtering. In Proceedings of the ISPRS Workshop Laser scanning 2005, Enschede, The Netherlands, 12–14 September 2005.
- Tolt, G.; Persson, Å.; Landgård, J.; Söderman, U. Segmentation and classification of airborne laser scanner data for ground and building detection. In Proceedings of the Defense and Security Symposium, Orlando, FL, USA, 17 April 2006.
- Meng, X.; Currit, N.; Zhao, K. Ground filtering algorithms for airborne LiDAR data: A review of critical issues. Remote Sens.
**2010**, 2, 833–860. [Google Scholar] [CrossRef] - Elmqvist, M. Ground surface estimation from airborne laser scanner data using active shape models. Int. Arch. Photogramm. Remote Sens.
**2002**, 34, 114–118. [Google Scholar] - Zhou, Q.; Neumann, U. Complete residential urban area reconstruction from dense aerial LiDAR point clouds. Graph. Models
**2013**, 75, 118–125. [Google Scholar] [CrossRef] - Verdie, Y.; Lafarge, F.; Alliez, P. LOD Generation for urban scenes. Acm. Trans. Graph.
**2015**, 34, 15–29. [Google Scholar] [CrossRef] - Chen, Q.; Koltun, V. Fast MRF optimization with application to depth reconstruction. In Proceedings of the Computer Vision and Pattern Recognition (CVPR), Columbus, OH, USA, 23–28 June 2014.
- Hirschmuller, H. Stereo Processing by semiglobal matching and mutual information. IEEE Trans. Pattern Anal.
**2008**, 30, 328–341. [Google Scholar] [CrossRef] [PubMed] - Szeliski, R.; Zabih, R.; Scharstein, D.; Veksler, O.; Kolmogorov, V.; Agarwala, A.; Tappen, M.; Rother, C. A comparative study of energy minimization methods for markov random fields with smoothness-based priors. IEEE Trans. Pattern Anal.
**2008**, 30, 1068–1080. [Google Scholar] [CrossRef] [PubMed] - Hu, X.; Li, X.; Zhang, Y. Fast filtering of LiDAR point cloud in urban areas based on scan line segmentation and GPU acceleration. IEEE Geosci. Remote Sens.
**2013**, 10, 308–312. [Google Scholar] - Hirschmuller, H. Accurate and efficient stereo processing by semi-global matching and mutual information. In Proceedings of the Computer Vision and Pattern Recognition (CVPR), San Diego, CA, USA, 20–25 June 2005.
- Boykov, Y.; Veksler, O.; Zabih, R. Fast approximate energy minimization via graph cuts. IEEE Trans. Pattern Anal. Mach. Intell.
**2001**, 23, 1222–1239. [Google Scholar] [CrossRef] - Hirschmuller, H. Semi-Global Matching-Motivation, Developments and Applications. Available online: http://hgpu.org/?p=6161 (accessed on 8 May 2015).
- Gehrke, S.; Morin, K.; Downey, M.; Boehrer, N.; Fuchs, T. Semi-global matching: An alternative to LiDAR for DSM generation. In Proceedings of the Canadian Geomatics Conference 2010 and ISPRS Com I Symposium, Calgary, AB, Canada, 15–18 June 2010.
- Drory, A.; Haubold, C.; Avidan, S.; Hamprecht, F.A. Semi-global matching: A principled derivation in terms of message passing. In Pattern Recognition; Springer International Publishing: Cham, Switzerland, 2014; pp. 43–53. [Google Scholar]
- Birchfield, S.; Tomasi, C. Depth discontinuities by pixel-to-pixel stereo. Int. J. Comput. Vision
**1999**, 35, 269–293. [Google Scholar] [CrossRef] - Van Meerbergen, G.; Vergauwen, M.; Pollefeys, M.; van Gool, L. A hierarchical symmetric stereo algorithm using dynamic programming. Int. J. Comput. Vis.
**2002**, 47, 275–285. [Google Scholar] [CrossRef] - Kolmogorov, V.; Zabih, R. Computing visual correspondence with occlusions using graph cuts. In Proceedings of the Eighth International Conference on Computer Vision, Vancouver, BC, Canada, 7–14 July 2001.
- Klaus, A.; Sormann, M.; Karner, K. Segment-based stereo matching using belief propagation and a self-adapting dissimilarity measure. In Proceedings of the 18th International Conference on Pattern Recognition (ICPR 2006), Hong Kong, China, 20–24 August 2006.
- Yang, Q.; Wang, L.; Yang, R.; Stewénius, H.; Nistér, D. Stereo matching with color-weighted correlation, hierarchical belief propagation, and occlusion handling. IEEE T. Pattern Anal.
**2009**, 31, 492–504. [Google Scholar] [CrossRef] [PubMed] - Sun, J.; Li, Y.; Kang, S.B.; Shum, H. Symmetric stereo matching for occlusion handling. In Proceedings of the Computer Vision and Pattern Recognition (CVPR 2005), San Diego, CA, USA, 20–25 June 2005.
- Bleyer, M.; Gelautz, M. A layered stereo matching algorithm using image segmentation and global visibility constraints. ISPRS J. Photogramm. Remote Sens.
**2005**, 59, 128–150. [Google Scholar] [CrossRef] - Haller, I.; Nedevschi, S. GPU optimization of the SGM stereo algorithm. In Proceedings of the Intelligent Computer Communication and Processing (ICCP), Cluj-Napoca, Romania, 26–28 August 2010.
- Nvidia, N. CUDA Toolkit Documentation v7.0. Available online: http://developer.download.nvidia.com/compute/cuda/3_2_prod/toolkit/docs/CUDA_C_Programming_Guide.pdf (accessed on 8 May 2015).
- Mongus, D.; Zalik, B. Computationally efficient method for the generation of a digital terrain model from airborne LiDAR data using connected operators. IEEE J. Sel. Top. App. Remote Sens.
**2014**, 7, 340–351. [Google Scholar] [CrossRef]

© 2015 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Hu, X.; Ye, L.; Pang, S.; Shan, J.
Semi-Global Filtering of Airborne LiDAR Data for Fast Extraction of Digital Terrain Models. *Remote Sens.* **2015**, *7*, 10996-11015.
https://doi.org/10.3390/rs70810996

**AMA Style**

Hu X, Ye L, Pang S, Shan J.
Semi-Global Filtering of Airborne LiDAR Data for Fast Extraction of Digital Terrain Models. *Remote Sensing*. 2015; 7(8):10996-11015.
https://doi.org/10.3390/rs70810996

**Chicago/Turabian Style**

Hu, Xiangyun, Lizhi Ye, Shiyan Pang, and Jie Shan.
2015. "Semi-Global Filtering of Airborne LiDAR Data for Fast Extraction of Digital Terrain Models" *Remote Sensing* 7, no. 8: 10996-11015.
https://doi.org/10.3390/rs70810996