# Automatic Extraction of Railroad Centerlines from Mobile Laser Scanning Data

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

**Figure 1.**Varying point density across neighboring rail tracks. Top view (

**top**), cross section (

**middle**), and rail track number (

**bottom**). The mobile mapping system was mounted on a platform driving at track “0”. It is our aim to find the centerlines of all tracks.

^{2}in track “0” to 500 p/m

^{2}in track −1, to less than 100 p/m

^{2}in track “+2” and about 40 p/m

^{2}in track “+3”. In addition, clearly visible is the existence of large data gaps due to occlusions by the rail track itself.

- -
- To compare a data-driven and a model-driven approach to centerline extraction;
- -
- To evaluate the accuracy of centerlines obtained by the two methods.

## 2. Literature Review

## 3. Methodology of Center Line Extraction

#### 3.1. Overview of the Methods

^{2}. Our method is designed to automatically reconstruct the position of the centerline using two approaches, as shown in Figure 3. They both start by detecting the points that hit the rail way tracks. The first is a data driven approach that calculates imaginary points in between points on two parallel rail tracks, followed by a curve fitting algorithm to get a smooth centerline. The second approach generates a 3D model of the rail tracks, taking into account parallelism and constraints to the smoothness and slope of rail way design. Based on the location of the 3D models, the centerline is implicitly defined as the line in the middle of the pair of rails.

**Figure 3.**Schematic workflow from rail detection to data-driven and model-driven centerline calculation.

#### 3.2. Initial Rail Track Detection by Grid Wise Height Histogram Analyses

^{2}: this meant that at switches part of the points on tracks were not selected. In this paper, we directly calculate point based features without the need to keep only the RANSAC inliers of a local fitted line. As a direct consequence, points on tracks near switches can still be detected automatically. As the point-based feature calculation is relatively expensive, the coarse track detection applied in this step helps reducing the computation time by eliminating the places where definitively no rail tracks are present.

#### 3.3. Fine Rail Track Detection by Point Based Attribute Calculation

#### 3.4. Centerline Determination Directly from Detected Points

**Figure 4.**Within a radius of 2 m (black circle), points are selected at the parallel track (red ellipse). The average direction of those points is used to construct a perpendicular line through the current rail track point (green dot). The center point is generated on that line (blue dot), exactly in between the rail track point and line through the selected parallel track points.

**Figure 5.**Switch detection (dashed red box) by checking distances between rail track points and center points. Red circles indicate locations where rail track points are closer than e.g., 60 cm to the center points. Grey circles indicate normal situations where center points and track points are more than 60 cm apart.

#### 3.5. Centerline Determination by 3D Modeling of the Rail Tracks

#### 3.5.1. Defining a Parametric Model of a Rail Piece

**Figure 6.**Parametric model of a pair of two rail pieces. Position and the orientation parameters of the local coordinate system need to be determined.

#### 3.5.2. Estimating the Parameters of a Piece Model

_{j}in segment j, the aim is to find a model Ɵ

_{j}that maximizes the probability p(Ɵ

_{j}|X

_{j}), where Ɵ

_{j}= [x

_{oj}, y

_{oj}, z

_{oj}, ω

_{j}, ϕ

_{j}, κ

_{j}]

^{T}is the vector of six orientation parameters of the model. Using Bayes’ rule:

_{j}|X

_{j}) = ηp(X

_{j}|Ɵ

_{j})p(Ɵ

_{j})

_{j}|Ɵ

_{j}) is the evidence for the model provided by the points, p(Ɵ

_{j}) is the model prior, and $\text{\eta}=1/{\sum}_{{\mathrm{\u019f}}_{i}}\text{p}({\text{X}}_{j}|\text{}{\mathrm{\u019f}}_{i})\text{p}\left({\mathrm{\u019f}}_{i}\right)$ is a normalization factor that does not affect the choice of Ɵ

_{j}. We define the evidence as:

_{j}, and c is a constant. The point-model distance is defined as the perpendicular distance from a point to its corresponding planar patch in the model. To find the corresponding patch, the point is orthogonally projected to each of the patches of the model, and the projected point is tested whether it is contained within the boundary of the patch. The patch that contains the orthogonal projection of the point is selected as the corresponding patch, and its perpendicular distance from the point is calculated. Points that do not project to any of the patches (these are usually points that are far away from the model) are excluded from the calculation of ${\overline{d}}_{j}$ in Equation (2).

_{j}) is used to incorporate our prior knowledge of the model parameters. We expect that the rotation parameters of each rail piece are only slightly different from the previous piece, and that the position of a piece is close to the center of its corresponding point segment. To include this knowledge, we define the prior as a normal distribution centered around the expected rotation and position parameters of the piece model:

_{j}) ~ N(µ

_{j}, ∑

_{j})

_{j}is the mean vector and ∑

_{j}is the covariance of the parameters in Ɵ

_{j}. The mean vector contains the expected rotation (i.e., the rotation of the previous piece) and position (i.e., the center of the point segment) of the piece. For the first piece in each track we set ω

_{1}= 0 and ϕ

_{1}= 0, while κ is obtained as the direction of the approximate centerline. The covariance of the prior distribution ∑

_{j}is defined by assuming large variances for the expected orientation parameters and no correlation between them. The large variances ensure that the Markov chain does not get stuck at the mean of the prior distribution.

_{t}, t = 1,…,n from the target distribution p(Ɵ

_{j}|X

_{j}). The samples are drawn from a proposal distribution, which is chosen as a Gaussian with variances larger than the prior distribution. An estimate of the expectation of model parameters is then obtained by the ergodic mean of the samples: ${\widehat{\text{\theta}}}_{j}=\frac{1}{n-m}{\sum}_{t=m}^{n}{\text{\theta}}_{t}$, where m specifies the number of so-called burn-in samples. Further details about the Metropolis-Hastings algorithm can be found in [22].

#### 3.5.3. Interpolating a Smooth and Continuous Rail Model

^{i}(t), i = 1,..,6 is i-th orientation parameter at an intermediate location t in the interval [1, m], m being the number of rail pieces, a

_{k}, b

_{k}, w are the unknown coefficients of the interpolation function and n is its order. The interpolation coefficients are estimated for each parameter separately. By evaluating Equation (4) with the known Ɵ

^{i}of all pieces, a system of equations is obtained, which is then solved for the unknown coefficients. The estimated coefficients minimize the sum of squared differences between the piece parameter and the interpolated value. The order of the Fourier series defines the flexibility of the fitted curve. However, higher order Fourier series may result in oscillation and waviness in the final model. By experiment we found that the third order Fourier series is sufficient to fit a smooth curve to the orientation parameters accurately.

## 4. Results

#### 4.1. Dataset Description

**Figure 7.**Point cloud from area near station Blerick (

**top**) and Sittard (

**bottom**). Data has been acquired on tracks indicated by the green arrows.

#### 4.2. Rail Track Detection

**Figure 8.**Coarse (

**top**) and fine (

**bottom**) rail track detection in Blerick. MLS data has been captured at the most right rail track.

**Figure 9.**Rail track detection and centerline extraction from Sittard area. Top and bottom left: original point cloud; top center: points labelled by left/right rail piece, center points and switches; top and bottom right: points colored by connected component, center points derived at intervals of 2 m.

#### 4.3. Accuracy Analysis of Center Line Extraction

**Figure 11.**Residuals between generated centerlines and reference data for our data-driven approach (

**left**) and the model-driven approach (

**right**) in Blerick. Grey lines represent the direction and magnitude of the residuals (magnified by a factor 20).

- -
- Along track direction; to analyze systematic patterns caused by curve fitting in our second approach and/or curve fitting in the reference data.
- -
- Across track direction; to analyze the capability to generate center lines at parallel rail tracks next to the current rail track. Both systematic and stochastic errors are analyzed. The scanning angle may cause systematic effects for parallel tracks far away, and the decreasing point density may result in higher standard deviation values.

**Figure 12.**Residuals between centerlines from data-driven approach and reference data in Sittard: top value is the systematic offset, bottom value represent the standard deviation of the residuals per track. Grey lines represent the direction and magnitude of the residuals (magnified by a factor 20).

**Figure 13.**Differences between data-driven and model-driven approach in Blerick (

**left**) and Sittard (

**right**).

## 5. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Petrie, G. Mobile mapping systems: An introduction to the technology. GeoInformatics
**2010**, 13, 32–43. [Google Scholar] - Puente, I.; González-Jorge, H.; Martínez-Sánchez, J.; Arias, P. Review of mobile mapping and surveying technologies. Measurement
**2013**, 46, 2127–2145. [Google Scholar] [CrossRef] - Vaaja, M.; Kukko, A.; Kaartinen, H.; Kurkela, M.; Kasvi, E.; Flener, C.; Hyyppä, H.; Hyyppä, J.; Järvelä, J.; Alho, P.; et al. Data processing and quality evaluation of a boat-based mobile laser scanning system. Sensors
**2013**, 13, 12497–12515. [Google Scholar] [CrossRef] [PubMed] - Oude Elberink, S.; Khoshelham, K.; Arastounia, M.; Díaz Benito, D. Rail track detection and modelling in mobile laser scanner data. ISPRS Ann. Photogramm. Remote Sens. Spat. Inf. Sci.
**2013**, 1, 223–228. [Google Scholar] [CrossRef] - Kaleli, F.; Akgul, Y.S. Vision-based railroad track extraction using dynamic programming. In Proceedings of the 2009 IEEE 12th International Conference on Intelligent Transportation Systems, St. Louis, MO, USA, 4–7 October 2009; pp. 1–6.
- Zhu, L.; Hyyppa, J. The use of airborne and mobile laser scanning for modeling railway environments in 3D. Remote Sens.
**2014**, 6, 3075–3100. [Google Scholar] [CrossRef] - Beger, R.; Gedrange, C.; Hecht, R.; Neubert, M. Data fusion of extremely high resolution aerial imagery and lidar data for automated railroad centre line reconstruction. ISPRS J. Photogramm. Remote Sens.
**2011**, 66, S40–S51. [Google Scholar] [CrossRef] - Neubert, M.; Hecht, R.; Gedrange, C.; Trommler, M.; Herold, H.; Krüger, T. Extraction of railroad objects from very high resolution helicopterborne lidar and ortho-image data. Int. Arch. Photogramm. Remote Sens. Spat. Inf. Sci.
**2008**, 38, 25–30. [Google Scholar] - Yang, B.; Fang, L. Automated extraction of 3-d railway tracks from mobile laser scanning point clouds. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens.
**2014**, 7, 4750–4761. [Google Scholar] [CrossRef] - Tang, P.; Huber, D.; Akinci, B.; Lipman, R.; Lytle, A. Automatic reconstruction of as-built building information models from laser-scanned point clouds: A review of related techniques. Autom. Constr.
**2010**, 19, 829–843. [Google Scholar] [CrossRef] - Maas, H.-G.; Vosselman, G. Two algorithms for extracting building models from raw laser altimetry data. ISPRS J. Photogramm. Remote Sens.
**1999**, 54, 153–163. [Google Scholar] [CrossRef] - Verma, V.; Kumar, R.; Hsu, S. 3D building detection and modeling from aerial lidar data. In Proceedings of the 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, New York, NY, USA, 17–22 June 2006; pp. 2213–2220.
- Rabbani, T.; Heuvel, F.V.D. Methods for fitting CSG models to point clouds and their comparison. In Proceedings of the 7th IASTED International Conference on Computer Graphics and Imaging, Kauai, HI, USA, 17–19 August 2004; pp. 279–284.
- Lai, K.; Fox, D. Object recognition in 3d point clouds using web data and domain adaptation. Int. J. Robot. Res.
**2010**, 29, 1019–1037. [Google Scholar] [CrossRef] - Diaz Benito, D. Automatic 3d Modelling of Train Rails in a Lidar Point Cloud. M.Sc. Thesis, University of Twente, Enschede, The Netherlands, 2012. [Google Scholar]
- Miao, Z.; Wang, B.; Shi, W.; Wu, H. A method for accurate road centerline extraction from a classified image. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens.
**2014**, 7, 4762–4771. [Google Scholar] [CrossRef] - Miao, Z.; Shi, W.; Zhang, H.; Wang, X. Road centerline extraction from high-resolution imagery based on shape features and multivariate adaptive regression splines. IEEE Geosci. Remote Sens. Lett.
**2013**, 10, 583–587. [Google Scholar] [CrossRef] - Soni, A.; Robson, S.; Gleeson, B. Extracting rail track geometry from static terrestrail laser scans for monitoring purposes. Int. Arch. Photogramm. Remote Sens. Spat. Inf. Sci.
**2014**, XL-5, 553–557. [Google Scholar] [CrossRef] - Lowe, D.G. Three-dimensional object recognition from single two-dimensional images. AI
**1987**, 31, 355–395. [Google Scholar] - Khoshelham, K.; Li, Z.L. A model-based approach to semi-automated reconstruction of buildings from aerial images. Photogramm. Rec.
**2004**, 19, 342–359. [Google Scholar] [CrossRef] - Hastings, W.K. Monte carlo sampling methods using markov chains and their applications. Biometrika
**1970**, 57, 97–109. [Google Scholar] [CrossRef] - Gilks, W.R.; Richardson, S.; Spiegelhalter, D. Markov Chain Monte Carlo in Practice; Chapman and Hall/CRC: Boca Raton, FL, USA, 1995. [Google Scholar]

© 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**

Elberink, S.O.; Khoshelham, K.
Automatic Extraction of Railroad Centerlines from Mobile Laser Scanning Data. *Remote Sens.* **2015**, *7*, 5565-5583.
https://doi.org/10.3390/rs70505565

**AMA Style**

Elberink SO, Khoshelham K.
Automatic Extraction of Railroad Centerlines from Mobile Laser Scanning Data. *Remote Sensing*. 2015; 7(5):5565-5583.
https://doi.org/10.3390/rs70505565

**Chicago/Turabian Style**

Elberink, Sander Oude, and Kourosh Khoshelham.
2015. "Automatic Extraction of Railroad Centerlines from Mobile Laser Scanning Data" *Remote Sensing* 7, no. 5: 5565-5583.
https://doi.org/10.3390/rs70505565