Automated Inspection of Railway Tunnels’ Power Line Using LiDAR Point Clouds

: Transport networks need periodic inspections to increase their safety and improve their management. In the last few years, LiDAR (light detection and ranging) technology has become a tool for helping to create a precise database of almost any type of infrastructure. Mobile laser scanning (MLS) systems use a laser beam to collect dense three dimensional (3D) point clouds, which include geometric and radiometric data of the environment in which they are placed. In the context of this paper, a methodology for automatically inspecting the clearance gauge and the deﬂection of the aerial contact line in railway tunnels is presented. The main objective is to compare results and verify their compliance with the Spanish norm. The 3D data are provided by a LYNX Mobile Mapper System (MMS). First, the area is surveyed and then the obtained (3D) point cloud is classiﬁed into contact wire, suspension wire, and remaining points. Finally, the inspection of the railway’s power line is performed. The validation of the proposed methodology has been carried out in three di ﬀ erent tunnel point clouds, obtaining both qualitative and quantitative results for points’ classiﬁcation, together with the results of the measures performed.


Introduction
Nowadays, the interest of having a digital model of real-life scenarios is increasing. This model can be used to update and track the behaviour of an infrastructure through its whole life cycle. In the railway field, with the arrival of the high-speed train and the high request for its maintenance and inspection, research concerning technical and technological improvements has increased. One of the main concerns of the railway industry is the irregularities affecting the rail track layout, as well as the perfect state of the catenary to fulfil the requirements of gauge, among others. These elements have a big repercussion in the security of the whole railway system. Hence, railway companies invest their resources for the optimal inspection and maintenance of the infrastructures. This is where laser scanning systems come into consideration. In recent years, the applications for laser scanning technology have increased. Until now, the main applications involving this type of data were dimensional control [1], 3D modelling, urban planning, and, more recently, BIM (building information modelling). The main characteristic of laser scanners is their capacity for obtaining large amounts of data with high accuracy in a short period of time. Usually, this information was processed manually or semi-automatically. The monotony of this task called for the necessity of automatically process the generated three dimensional (3D) point clouds.
This work arises due to the lack of specific methods for classifying and inspecting railway point clouds, and especially railway power lines. It is focused on the automatic classification of MLS point

Literature Review
Although some authors have developed methods using data from both aerial laser scanning (ALS) and terrestrial laser scanning (TLS) systems in the railway environment [4][5][6], the most common approach is to work with mobile laser scanning (MLS) point clouds. The use of MLS systems is translated into safer and faster surveys, obtaining data with very high accuracy and quality [7]. In this relation, Che et al. [8] presented also a review about the most recent object recognition, segmentation, and classification methods for LiDAR (light detection and ranging) data. With regard to the railway field, some authors have also developed different techniques for LiDAR-data grouping. Leslar et al. [9] propose a first classification of points regarding their return number, and then they perform a manual classification by using specific programs and semi-automatic methods. Several works from Arastounia propose heuristic methods for the fully-automatic classification of railway objects [10][11][12]. These objects such as rails, contact lines or catenaries, are extracted through an algorithm that recognizes interesting objects when studying how the LiDAR data are placed and their spatial relation with each other and with other objects. The result is a classified point cloud that can be used for later analysis, namely 3D modelling, specific measurements, or inspection of the continuity of rails. Concerning power line classification from 3D point clouds, Arastounia improved his own methods creating an algorithm for the recognition of railroad power lines and rail tracks using both Terrestrial Laser Scanning (TLS) and Aerial Laser Scanning (ALS) data [11]. Apart from these works, when focusing on the power line detection, Pastucha [13] used the trajectory data to limit the searching zone for extracting the power line. Then, RANSAC (RANdom SAmple Consensus) algorithms and geometrical relationships were used to improve the points' classification. In this relation, Zhang et al. [14] also used information from the MLS trajectory to extract valuable data from it, subsequently applying region growing algorithms to classify aerial contact wires' points. Similar to the railway field, point clouds from high voltage facilities or roadways have also been explored in order to classify their points. To this respect, Guo et al. [15] proposed a method for the reconstruction of wires working with ALS data, and applying RANSAC algorithms. Later on, Wang et al. [16] presented a methodology for detecting power line points and the power line corridor direction using connectivity and simplification algorithms. With reference to the inspection of railway power lines, authors like Blug et al. started to use laser scanning data for clearance measurements [17]. Years later and with recent equipment, Mikrut et al. [18] used cross-sectional data from point clouds to create 2D images that could be visually inspected by an expert in order to find anomalies.
Currently, the trend is to use classifiers in order to make predictions of points' classes. In this sense, Luo et al. [19] used the Conditional Random Field (CRF) classifier in order to make a context-based classification of the LiDAR points into several classes (railway elements). Using not only heuristic methods but also support vector machines (SVMs), Sánchez-Rodríguez et al. [20] presented Remote Sens. 2019, 11, 2567 3 of 13 a methodology for the classification of elements in an MLS railway tunnel point cloud. The good performance of deep learning algorithms for image classification has encouraged authors to develop new models for 3D data [21][22][23][24]. In this field, not only MLS but also ALS data are used to test the new convolutional networks used for point cloud classification. Balado et al. [25] use ALS for the automatic classification of land cover using the classifier ResNet-50, and in a later work, proved the validity of PointNet for MLS point clouds' classification [26]. Although many authors are working to improve these methods [27,28], they still need to evolve.
The novelty of this paper is the presentation of a fully automated method for measuring the power line gauge and the catenary deflection in a LiDAR point cloud, without the need of human intervention. The method is in charge of classifying points forming both the contact and the suspension wire, and then performing the corresponding measures.

Methodology
This paper follows the steps previously set in [20], where a methodology for the automatic classification of railway tunnel elements from MLS datasets was presented. The present work is oriented to the development and analysis of a new system for the recognition, classification, and inspection of electrical railway infrastructures using LiDAR data. The work starts with a labelled point cloud divided into lining, ground, railway tracks, overhead line, and cantilevers. This information is extracted following the steps presented in [20], and as reflected in Figure 1. In this section, the method developed for the automatic inspection of railway tunnels' power line is presented. First, Section 3.1 describes the steps followed to classify the contact wire and suspension wire points. Then, Section 3.2 exposes the inspection methods developed for measuring both the clearance gauge and the deflection of the suspension wire. new models for 3D data [21][22][23][24]. In this field, not only MLS but also ALS data are used to test the new convolutional networks used for point cloud classification. Balado et al. [25] use ALS for the automatic classification of land cover using the classifier ResNet-50, and in a later work, proved the validity of PointNet for MLS point clouds' classification [26]. Although many authors are working to improve these methods [27,28], they still need to evolve. The novelty of this paper is the presentation of a fully automated method for measuring the power line gauge and the catenary deflection in a LiDAR point cloud, without the need of human intervention. The method is in charge of classifying points forming both the contact and the suspension wire, and then performing the corresponding measures.

Methodology
This paper follows the steps previously set in [20], where a methodology for the automatic classification of railway tunnel elements from MLS datasets was presented. The present work is oriented to the development and analysis of a new system for the recognition, classification, and inspection of electrical railway infrastructures using LiDAR data. The work starts with a labelled point cloud divided into lining, ground, railway tracks, overhead line, and cantilevers. This information is extracted following the steps presented in [20], and as reflected in Figure 1. In this section, the method developed for the automatic inspection of railway tunnels' power line is presented. First, Section 3.1 describes the steps followed to classify the contact wire and suspension wire points. Then, Section 3.2 exposes the inspection methods developed for measuring both the clearance gauge and the deflection of the suspension wire. It is important to highlight that there are different catenary models installed in Spain, in the Conventional Network of Adif (Red Convencional de Adif). The most outstanding ones due to their common implementation are models CA-160 and CA-220, which are taken as reference for the present work [2,3]. The parameters used in this work for the segmentation of the catenary system and its inspection follow the standards summarized in Table 1.  It is important to highlight that there are different catenary models installed in Spain, in the Conventional Network of Adif (Red Convencional de Adif ). The most outstanding ones due to their common implementation are models CA-160 and CA-220, which are taken as reference for the present work [2,3]. The parameters used in this work for the segmentation of the catenary system and its inspection follow the standards summarized in Table 1.

Classification of Points
The method developed for this work is based on the one advanced by Sánchez-Rodríguez et al. [20]. Following the previously developed methodology, the method starts with a railway tunnel point cloud T = (x, y, z, t s , I, r n ), where (x, y, z) are the three-dimensional (3D) spatial coordinates, t s is the time stamp, I is the reflected laser pulse intensity, and r n is the return number assigned to each point. Since these point clouds have too much information to be processed by regular computers, the tunnel point cloud T is segmented into 20-m long sections, U i (i = 1 . . . n) ∈ T, and each of them is oriented to the y coordinate axis, resulting U r i (i = 1 . . . n) ∈ T. Subsequently, continuing with the algorithms proposed in [20], every element in the tunnel point cloud ends up classified based on its geometrical characteristics as ground, lining, power line, cantilever arms, rails, and other ( Figure 1). For the research of this paper, some of these classified points are used as basis before starting to develop the new classification methods. These are the ones forming rails and power lines, together with cantilever arms. It is important to highlight that, in the previous classification, the power lines were saved as individual sets of points, since there might be more than one in each 20-m section.
The novel classification algorithms presented in this work are summarized in Figure 2, and fully described in Sections 3.1.1 and 3.1.2. Table 1. Most used catenary models in Spain [3].

Characteristic
Wire The method developed for this work is based on the one advanced by Sánchez-Rodríguez et al. [20]. Following the previously developed methodology, the method starts with a railway tunnel point cloud , , , , , , where , , are the three-dimensional (3D) spatial coordinates, is the time stamp, is the reflected laser pulse intensity, and is the return number assigned to each point. Since these point clouds have too much information to be processed by regular computers, the tunnel point cloud is segmented into 20-m long sections, 1 … ∈ , and each of them is oriented to the y coordinate axis, resulting 1 … ∈ . Subsequently, continuing with the algorithms proposed in [20], every element in the tunnel point cloud ends up classified based on its geometrical characteristics as ground, lining, power line, cantilever arms, rails, and other ( Figure 1). For the research of this paper, some of these classified points are used as basis before starting to develop the new classification methods. These are the ones forming rails and power lines, together with cantilever arms. It is important to highlight that, in the previous classification, the power lines were saved as individual sets of points, since there might be more than one in each 20-m section.
The novel classification algorithms presented in this work are summarized in Figure 2, and fully described in Sections 3.1.1. and 3.1.2. , , ∈ 1 … be the point cloud of an individual power line. The first step is to distinguish the contact wire from the suspension wire and other elements (droppers and fake suspension wire, which allow the elasticity's homogeneity through the line [29]). Using point cloud as the basis, the RANSAC method is applied to find the contact cable. To do that, the point cloud is rasterized so that it is mapped to the YZ plane [30]. Then, the predefined Matlab function fitPolynomialRANSAC is applied [31]. It uses a version of the original RANSAC called M-estimator SAmple Consensus (MSAC), which finds the coefficients of a polynomial of degree that best fits the input data. In the described case, the need is to fit a line to the two-dimensional (2D) cloud, so the coefficient must be 1. The aforementioned function is iterative, meaning that the fitting process is repeated until it reaches the convergence. This happens when achieving the maximum number of possible iterations or the predefined precision (number of points fitting the line, in this case). In order to obtain a better tuning, the function uses the maximum allowed distance along the Z axis from an inlier to the estimated polynomial. This parameter was set to 0.15 m as the section of the CA-220 contact wire is 150 mm 2 (the diameter would be 13.8 mm), as reflected in Table 1. Inliers coming, as a result, are the points forming the contact wire , , ∈ ( Figure 2).

Contact wire detection
Let L = (x, y, z) ∈ U r i (i = 1 . . . n) be the point cloud of an individual power line. The first step is to distinguish the contact wire from the suspension wire and other elements (droppers and fake suspension wire, which allow the elasticity's homogeneity through the line [29]). Using point cloud L as the basis, the RANSAC method is applied to find the contact cable. To do that, the point cloud is rasterized so that it is mapped to the YZ plane [30]. Then, the predefined Matlab function fitPolynomialRANSAC is applied [31]. It uses a version of the original RANSAC called M-estimator SAmple Consensus (MSAC), which finds the coefficients of a polynomial P(x) of degree N that best fits the input data. In the described case, the need is to fit a line to the two-dimensional (2D) cloud, so the coefficient N must be N = 1. The aforementioned function is iterative, meaning that the fitting process is repeated until it reaches the convergence. This happens when achieving the maximum number of possible iterations or the predefined precision (number of points fitting the line, in this case). In order to obtain a better tuning, the function uses the maximum allowed distance along the Z axis from Remote Sens. 2019, 11, 2567 5 of 13 an inlier to the estimated polynomial. This parameter was set to 0.15 m as the section of the CA-220 contact wire is 150 mm 2 (the diameter would be 13.8 mm), as reflected in Table 1. Inliers coming, as a result, are the points forming the contact wire C = (x, y, z) ∈ L (Figure 2).

Suspension wire detection
For detecting the suspension wire, a different approach has been followed. Since this cable is always located in the maximum height of the remaining non-classified points of the power line, a search on this basis is started. In this part of the segmentation process, it is necessary to know where the cantilevers M = (x, y, z) ∈ U r i (i = 1 . . . n) are placed, as the highest points of the catenary curve drawn by these cables depend on them. Taking into account that the sections performed in the original point cloud are 20 m long, and following the established in the ADIF specifications [3] concerning the 'distance between cantilevers' in railway tunnels (50 m), only one cantilever can be contained in each of these sections.
Let S ∈ L be the possible suspension wire cloud. For the case that the selected section U r i (i = 1 . . . n) contains a cantilever, the point cloud S will be sectioned in two parts: one before and one after this element. Then, in order to improve the effectiveness of the algorithm, points belonging to these two parts are studied, segmenting the cloud into 5 cm sections ( Figure 3). After that, a search of valid points is performed starting with the highest points of these small sections. In this case, the broadly known range search algorithm is chosen for this matter [31]. The algorithm finds all neighbours in S that are within a distance from each of the highest ones selected before. In this case, that distance is taken as the standardized diameter of the suspension wire S ∈ L (Table 1). If, in the selected section U r i (i = 1 . . . n), no cantilevers are present, the algorithm is executed without distinguishing two parts in the cloud (Figure 2 For detecting the suspension wire, a different approach has been followed. Since this cable is always located in the maximum height of the remaining non-classified points of the power line, a search on this basis is started. In this part of the segmentation process, it is necessary to know where the cantilevers , , ∈ 1 … are placed, as the highest points of the catenary curve drawn by these cables depend on them. Taking into account that the sections performed in the original point cloud are 20 m long, and following the established in the ADIF specifications [3] concerning the 'distance between cantilevers' in railway tunnels (50 m), only one cantilever can be contained in each of these sections. Let ′ ∈ be the possible suspension wire cloud. For the case that the selected section 1 … contains a cantilever, the point cloud ′ will be sectioned in two parts: one before and one after this element. Then, in order to improve the effectiveness of the algorithm, points belonging to these two parts are studied, segmenting the cloud into 5 cm sections ( Figure 3). After that, a search of valid points is performed starting with the highest points of these small sections. In this case, the broadly known range search algorithm is chosen for this matter [31]. The algorithm finds all neighbours in ′ that are within a distance from each of the highest ones selected before. In this case, that distance is taken as the standardized diameter of the suspension wire ∈ (Table 1). If, in the selected section 1 … , no cantilevers are present, the algorithm is executed without distinguishing two parts in the cloud (Figure 2).

Gauge and Deflection
In a railway line, gauge (officially called contact wire height) is the distance between the inferior plane of the contact wire and the running surface (tangent to the rails' heads). This distance is perpendicularly measured in the axis of the track (Euclidean distance). Together with this, the deflection is defined as the maximum vertical distance existing between the suspension wire and the imaginary line joining two consecutive cantilevers. These distances are graphically represented in Figure 4.

Gauge and Deflection
In a railway line, gauge (officially called contact wire height) is the distance between the inferior plane of the contact wire and the running surface (tangent to the rails' heads). This distance is perpendicularly measured in the axis of the track (Euclidean distance). Together with this, the deflection is defined as the maximum vertical distance existing between the suspension wire and the imaginary line joining two consecutive cantilevers. These distances are graphically represented in Figure 4.
In a railway line, gauge (officially called contact wire height) is the distance between the inferior plane of the contact wire and the running surface (tangent to the rails' heads). This distance is perpendicularly measured in the axis of the track (Euclidean distance). Together with this, the deflection is defined as the maximum vertical distance existing between the suspension wire and the imaginary line joining two consecutive cantilevers. These distances are graphically represented in Figure 4.  The algorithm in charge of measuring the clearance gauge starts with the contact wire (C = (x, y, z) ∈ L) and the rails' point clouds (R j ∈ U r i ( j = 1, 2; i = 1 . . . n)). First, a plane is fitted to the top surface of rails. To do that, the voxelization of the rails' point cloud is done. Then, voxels with the biggest z coordinate are used as the rails' top surface, and after that, a search to find the plane that best fits them is started. To continue with the process, the point cloud forming the contact cable is also voxelized so that only one point is saved inside each 50 cm imaginary cube (voxel). Finally, the Euclidean distance between these new points (one per voxel) and the previously fitted plane is measured, following Equation (1): where q and p are the two points from which the distance is measured. The result are several measures in each 20-m section (Figure 5a).
Remote Sens. 2019, 11, x FOR PEER REVIEW 6 of 13 The algorithm in charge of measuring the clearance gauge starts with the contact wire ( , , ∈ ) and the rails' point clouds ( ∈ 1,2; 1 … ). First, a plane is fitted to the top surface of rails. To do that, the voxelization of the rails' point cloud is done. Then, voxels with the biggest z coordinate are used as the rails' top surface, and after that, a search to find the plane that best fits them is started. To continue with the process, the point cloud forming the contact cable is also voxelized so that only one point is saved inside each 50 cm imaginary cube (voxel). Finally, the Euclidean distance between these new points (one per voxel) and the previously fitted plane is measured, following Equation (1): where q and p are the two points from which the distance is measured. The result are several measures in each 20-m section (Figure 5a). For the measurement of the suspension wire deflection, it is first necessary to find which sections contain a cantilever , , ∈ 1 … . Then, the suspension wire point clouds ∈ placed between two consecutive cantilevers are grouped, as shown in Figure 6. The next step is to draw a line joining the two most extreme points of the span. These two points are located in the highest z coordinate in each of the two points clouds containing a cantilever ( Figure 6). Finally, the deflection is measured. This is done by calculating the maximum distance between the previously fitted line and each point in the point cloud sections forming a span (Figure 5b). As a result, only one measure is obtained for each span in the tunnel point cloud .  For the measurement of the suspension wire deflection, it is first necessary to find which sections contain a cantilever M = (x, y, z) ∈ U r i (i = 1 . . . n). Then, the suspension wire point clouds S ∈ L placed between two consecutive cantilevers are grouped, as shown in Figure 6. The next step is to draw a line joining the two most extreme points of the span. These two points are located in the highest z coordinate in each of the two points clouds containing a cantilever ( Figure 6). Finally, the deflection is measured. This is done by calculating the maximum distance between the previously fitted line and each point in the point cloud sections forming a span (Figure 5b). As a result, only one measure is obtained for each span in the tunnel point cloud T. placed between two consecutive cantilevers are grouped, as shown in Figure 6. The next step is to draw a line joining the two most extreme points of the span. These two points are located in the highest z coordinate in each of the two points clouds containing a cantilever ( Figure 6). Finally, the deflection is measured. This is done by calculating the maximum distance between the previously fitted line and each point in the point cloud sections forming a span (Figure 5b). As a result, only one measure is obtained for each span in the tunnel point cloud .

Equipment Setup
Laser scanning systems use a laser beam to generate a 3D model of the objects in the environment of study. The objects are represented with 3D coordinates in the space, obtained computing the distance between the LiDAR sensor and the target object. As laser scanners are an active technology, surveys can be performed at night or in places like tunnels, where the light has very low intensity. In this work, data have been obtained using a LYNX Mobile Mapper, by Optech Inc. (2007) [32]. The summary of its characteristics and a specific accuracy analysis is shown in [33]. The LiDAR sensor

Equipment Setup
Laser scanning systems use a laser beam to generate a 3D model of the objects in the environment of study. The objects are represented with 3D coordinates in the space, obtained computing the distance between the LiDAR sensor and the target object. As laser scanners are an active technology, surveys can be performed at night or in places like tunnels, where the light has very low intensity. In this work, data have been obtained using a LYNX Mobile Mapper, by Optech Inc. (2007) [32]. The summary of its characteristics and a specific accuracy analysis is shown in [33]. The LiDAR sensor together with the position and navigation systems, and the four racks (acquisition, control, LiDAR, and power supply), were placed in a draisine to ease the data acquisition process inside railway tunnels.

Geo-Referencing and Sensor Fusion
The positioning and navigation systems in charge of the 3D data positioning are also a key issue when performing a laser scanning survey. This is supported by GNSS (Global Navigation Satellite System) and INS (inertial navigation system) systems that require a specific planning for every measurement campaign. GNSS provides position and orientation with respect to a reference, while INS and DMI (distance measurement unit) provide time-derivative information of the position and orientation of the mobile platform. Using this information, the position of the point cloud at global level is determined: (i) the point cloud is referenced with respect to the LiDAR sensor itself; (ii) the platform is located with reference to the WGS84 global coordinate system; and (iii), the relative orientation and position of the LiDAR sensor in the platform with regard to the navigation and position system is determined.

Performance
Since every survey requires different planning before the performance, it is necessary to consider the particular needs of each case study. In general, the data acquisition time depends on the vehicle's average speed, which varies between 20 and 30 km/h. Apart from this, the total work time also includes: (a) equipment installation, which takes between half a day and a whole day depending on the draisine structure; (b) moving to the capture zone, with a speed similar to the data acquisition one; (c) data gathering (20-30 km/h); and (d) uninstalling the equipment, which usually takes around half a day. In addition, the performance of the Lynx Mobile Mapper is given by its resolution. Information about the equipment's acquisition parameters can be found in Table 2. Changes in the accuracy of point clouds are noticeable regarding the equipment with which they were acquired. There are three types of errors leading to low accuracy (in general) in laser scanners [34]: • Laser range error: measuring the distance to an object. It is different for every scanner and can be corrected by recalibrating them (by the manufacturer or specialist in the field).

•
Range noise: deviation of single readings from the real value within a sample of measures. It is conditioned by the distance to the object to be scanned and the reflectivity of the object's material.

•
Mechanical error: the difference between the measured and actual horizontal and vertical angles (angular error). It is caused by the mechanical devices forming the laser scanner (mirrors and servos).
The position and navigation systems may also result in invalid coordinates for the GNSS base station(s), misalignment of the INS with the LiDAR scanner, or a software failure at coordinate conversions. These cause systematic errors that may be identified by sensor calibration, comparing LiDAR with known reference data or additional control operations [35].
It is important to highlight that accuracy depends not only on the equipment, but also on the geometry of the 3D scenario under study. This affects to the performance of the trajectory and point cloud computation algorithms, and so a specific value of accuracy cannot be given as an answer. The atmospheric condition can also have undesired effects in the LiDAR performance that could lead to noisy measurements [36].
For more information regarding the MLS used in this work, please see [7,33].

Results
The classification of the aerial contact line points is developed using the algorithms described in Section 3.1. The data is classified into four categories: contact wire, suspension wire and remaining points. Then, the gauge of the contact wire and the deflection of the suspension wire are inspected following the current Spanish standards, as explained in Section 3.2.
In this section, the classification and inspection results are detailed. The methodology is implemented using the Matlab software, version 2017b. The validation performance is done using an Intel Core i7-4810MQ CPU at 2.8 GHz and 8 GB of RAM.

Case Study
The classification part of this work has been proved as valid in three different tunnel point clouds extracted from Spanish corridors, which are divided into 20-m sections so that the classification process can be performed by a regular computer (Table 3). Although one of the tunnels (tunnel C) has two power lines on top of the rails, the developed methodology would only consider the detection of the one in the closest area to the laser scanning system. Moreover, this tunnel dataset has only one cantilever present, hence the deflection measurement of the suspension wire cannot be tested on it.

Classification Results
This section exposes the classification results obtained for each of the three tunnel point clouds. In order to prove the validity of the method, one 20-m section of each dataset is selected. The characteristics of these points clouds are presented in Table 4. The contact wire points are first classified and separated from the rest of the point cloud, so it is prepared for the next segmentation step. Then, points belonging to the suspension wire are identified, these data being enough to perform the inspection required. After this classification of the aerial contact line elements, each point in the original cloud ended up labelled as contact wire, suspension wire or remaining points. The cantilever classification results are extracted from the previously developed methodology [20], and an overview of the whole power line classification is presented in Figure 7. As a way of proving the validity of the methods proposed, datasets from Table 4 are used. This prove is performed by quantitative comparing a previously labelled ground truth with the obtained results. The ground truth is labelled manually thanks to the use of the 3D point cloud processing software CloudCompare (v2.10.2). The precision, recall, and F-score performance metrics have been calculated for each of the three selected sections, and the results are exposed in Table 5.
where TP is the number of true positives; FP is the number of false positives; and FN is the number of false negatives.  As a way of proving the validity of the methods proposed, datasets from Table 4 are used. This prove is performed by quantitative comparing a previously labelled ground truth with the obtained results. The ground truth is labelled manually thanks to the use of the 3D point cloud processing software CloudCompare (v2.10.2). The precision, recall, and F-score performance metrics have been calculated for each of the three selected sections, and the results are exposed in Table 5.
where TP is the number of true positives; FP is the number of false positives; and FN is the number of false negatives. These results show high performance metrics for the classification tasks developed under the scope of this work.

Inspection Results
The classification results of the three tunnel point clouds are used for the validation of the automatic inspection method. In order to ease the process of the results' discussion, the distances obtained for the gauge measurement are exposed graphically and for the 20-m point cloud of Tunnel A exposed in Table 6. However, the point clouds used to present the deflection results are the ones in Table 6.  Figure 8 shows the gauge measurements, with a maximum difference of 0.0252 m. They must be within the range of 4.6 and 6 m, although the general norm is to use 5.3 m as nominal value and 4.9 as the minimum (the most restrictive one according to Table 1), as stated in ADIF's current affairs files [2]. This is complementary with the obligation of 4.9 m as the minimum contact wire's height in tunnels [3]. The deflection needs to be inferior than 0.853 m (Table 1), taking it as the most restrictive value for a span of 50 m, in this case. Every tunnel section studied in this work comply with this obligation and two results are presented as an example in Table 6.   Figure 8 shows the gauge measurements, with a maximum difference of 0.0252 m. They must be within the range of 4.6 and 6 m, although the general norm is to use 5.3 m as nominal value and 4.9 as the minimum (the most restrictive one according to Table 1), as stated in ADIF's current affairs files [2]. This is complementary with the obligation of 4.9 m as the minimum contact wire's height in tunnels [3]. The deflection needs to be inferior than 0.853 m (Table 1), taking it as the most restrictive value for a span of 50 m, in this case. Every tunnel section studied in this work comply with this obligation and two results are presented as an example in Table 6. From the results obtained for the one hundred sections (20-m point clouds) studied concerning gauge and deflection measurements, it can be said that the three tunnels comply with the measurement limitations of the standard summarized in Table 1. From the results obtained for the one hundred sections (20-m point clouds) studied concerning gauge and deflection measurements, it can be said that the three tunnels comply with the measurement limitations of the standard summarized in Table 1.

Global Discussion
This paper proposes two different contributions concerning the work with railway tunnels' point clouds: to evaluate the specific application of point clouds for classifying aerial contact lines; and to prove the validity of LiDAR data for performing automatic inspections of the railway network. Concerning point clouds classification (tunnel power line), a simple approach was adopted, showing high accuracies in the results. However, it is noticeable that point clouds with the lowest performance metrics belong to the suspension wires. This is caused by the difficulty for distinguishing this type of cables from the 'fake suspension wires' hanging by their side. Since they are too close with each other and because of their geometry, the way of labelling points in these areas is very dependent on the person manually carrying out this task. In addition, the classification results obtained were compared with the ones in the state of the art also in charge of differencing catenary and suspension wires from the rest [11,12]. In this relation, an improvement of the performance metrics is observed for both the contact and the catenary cables. Concerning the automatic inspection of the power line, none of the works in the state of the art work with point clouds in the 3D space to perform these measures.
Apart from the conclusions extracted taking into account the quantitative results in Table 5, and comparing the results with the state of the art, it can be concluded that is feasible to automatically classify aerial contact lines' point clouds into their specific elements for a later automatic inspection.

Error Analysis
Different causes may affect the effectiveness of the proposed method, and some are subsequently presented: (i) The resolution of the available point clouds could be improved, in such a way that the number of points forming the aerial contact wire increases; (ii) some occlusions may be corrected in accordance with the previous point; and (iii) the bounding boxes established using standardized measurements could be adjusted depending on the location of the tunnels. Although the classification results presented in this section seem good, some noisy points are wrongly classified as valid, which could be avoided by improving the method as proposed.

Conclusions
This paper presents an automatic methodology for the inspection of two important parameters in the railway's aerial contact line, using 3D point cloud data extracted with a mobile mapping system (MMS). The methodology is divided into three main parts, being: classification of points, distances measurement and standards' compliance. This is considered a first approach to start defining a methodology for highlighting conflictive areas in the railway network. Conceptually, the aim of this work is to offer a preliminary method for the automation of the railway network inspection that nowadays is conducted manually and subjected to the operator's criteria. In addition, the results presented show a good performance in terms of point cloud classification and distance measurement. It is important to highlight that there is no benchmark that allows comparing these results, so the proposed methodology has been tested under three private sets of data. This work can be considered as a proof that mobile mapping systems are valid for surveying and inspecting railway environments.
Future work may have different aspects into consideration. Working with LiDAR data, every methodology developed has room for improvement. With the trend of deep learning, the classification of points may also be done by applying specialized neural networks (PointNet, PointNet++, fpnn, splatnet, kpconv, etc.). Concerning the inspection of the aerial contact line, some other parameters are also required for a complete inspection of the line, as can be the eccentricity of the contact wire, the system's height, the slope of the tracks, etc. Funding: This work has been partially supported by University of Vigo through the grant Axudas Predoutorais para a formación de Doutores 2018 (grant number 00VI 131H 6410211). This project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement no. 769255.