# A UAV-Based Visual Inspection Method for Rail Surface Defects
## 3 Experiment Results
### Performance Analysis
#### 3.2.1 Image Enhancement  
The effectiveness of image enhancement method was first verified by performing experiments on several randomly selected images. It should be noted that these selected images include defects for types T-I and T-II, and have characteristics of low contrast and varying illumination. In this section,  
\begin{table}
\begin{tabular}{c c c} \hline
**Defects Type** & **T-I Defect** & **T-II Defect** \\ \hline Area (\(\Omega\)) & 25 mm\({}^{2}<\Omega\leq\) 255 mm\({}^{2}\) & 255 mm\({}^{2}<\Omega\) \\ \hline \end{tabular}
\end{table}
Table 1: The type of rail surface defects.  
Figure 9: Examples of UAV images containing discrete defects on rail surfaces.  
this paper compares the LWLC algorithm with traditional enhancement methods, including histogram equalization (HE), LN [14] and MLC [30] algorithms.  
Figure 10 presents comparison results of these methods. The HE method only averages the gray level distribution rather than enlarging the gray scale, and retains a number of irregular (noise) points, as shown in the Figure 10B. The LN method has poor enhancement effect because the image loses a lot of the significant detailed information. Not surprisingly, the MLC algorithm achieves competitive performance and highlights defects on UAV-based rail images. However, to UAV-based rail images having high brightness mean and a great deal irregular points, the MLC algorithm has a poor ability at extending grayscale range between irregular points and defect points. The MLC algorithm can distinguish defects from background, but the distinguishing capability for irregular (noise) points and defect points is not as good as that of the LWLC algorithm. As shown in Figure 10D,E, the enhanced defects by LWLC algorithm are more obviously highlighted than the MLC algorithm.  
It is worth noting that the proposed method can effectively remove the influence of uneven illumination. As shown in Figure 10A, for the above two images with several shadows, the global image enhancement method (HE method, as shown in Figure 10B) makes images loss detail information and amplifies irregular points (noise points and shadow points), since the HE is a linear algorithm and only averages the gray level distribution. In addition, although the LN method (as shown in Figure 10C) can remove shadows, it also removes defects, due to the fact that a rail surface contains a small number of defects, and the difference between defects and backgrounds in longitudinal direction is large. However, because of few defects existing on rail surfaces and high reflection properties of rail surfaces, the brightness mean of longitudinal line along a track approximates to the background luminance. Thereby, the proposed LWLC algorithm based on [PERSON]'s law can address these issues, and effectively remove the uneven illumination due to the feature of Weber's law presented in Section 1. It can be seen that the proposed LWLC algorithm is superior to other two methods, as shown in the Figure 10E.  
For defect segmentation, the LWLC algorithm combined with the GSME method can achieve better performance, and the experiment of defect segmentation will be described in the next section.