## 4 Analysis of Crack Characteristics in Tunnel Lining Images
### Crack Width Extraction Model  
In order to simulate the different widths of the cracks on the surface of the actual tunnel lining, the image acquisition targets of this experiment are the crack line series and the checkerboard, which are fixed on the white wall on the A1 drawing. The distinguishable range of the crack line series is 0.1-5.0 mm. Considering that longitudinal cracks (in the direction of the tunnel axis) generally have a significant impact on the structural safety performance in tunnel structures, simulated cracks with different widths are presented in the form of longitudinal cracks. The checkerboard is an array of black and white grids where the actual size of each grid is 20 mm \(\times\) 20 mm, which is used for the focus of the area scan camera. The above drawings with cracks of different widths are photographed by the selected photographing system, and then the grayscale characteristics of the cracks with different widths in the photographed images are analyzed to establish a crack width model based on grayscale analysis. As shown in Figure 3, the cracks in the first series, that is, the cracks with a width of 0.1 mm\(\sim\)1.0 mm, show a significant difference in brightness, but the width difference is not apparent. For cracks with a width greater than 3.0 mm, the color density remains basically unchanged, but a relatively noticeable width difference can be observed. In each crack series, three lines are drawn along the vertical crack direction, and the extraction positions are shown in Figure 7.  
Figure 7: Crack grayscale extraction position. As shown in Figure 8, three extraction points on each crack are extracted to obtain the average value of the gray value, and the gray distribution map of each crack in the width direction is obtained. The results show that when the crack width is in the range of 0.1-2.0 mm, the gray value of the crack increases linearly, and the openings on both sides of the wave trough remain basically unchanged. When the crack width exceeds 2.0 mm, the gray value of the crack gradually stabilizes, but the opening of the wave trough gradually becomes larger, indicating that the number of pixels of the crack gradually increases. In order to establish the mapping relationship between the crack width and the gray value, three points are taken on each crack width, and the difference between the average gray value and the background gray value at the three points is calculated. As shown in Figure 9, the relationship with crack width is plotted in the same figure. The change of the image curve can be divided into three stages:  
1. In the interval of the crack width from 0.1 mm to 1.4 mm, the gray difference of the crack shows a linear change, which is defined as the No.1 linear interval. 2. In the interval of 1.5 mm-2.6 mm, the gray difference of the cracks still shows a linear change, but the slope is smaller than that of the first linear area, which is defined as the No.2 linear interval. 3. In the interval of 2.7 mm-5.0 mm, the gray difference of the crack basically changes steadily, which is defined as the smooth interval. Figure 8: Grayscale distribution map of the crack width direction: (**a**) series of 0.1–1.0 mm, (**b**) series of 1.1–2.0 mm, (**c**) series of 2.1–3.0 mm, (**d**) series of 3.1–4.0 mm, (**e**) series of 4.1–5.0 mm. In the cracks of the No.1 linear interval and the No.2 linear interval, it can be seen that the grayscale difference of the cracks is linearly related to the width as a whole. Therefore, the least squares method is used to establish their linear relationship, forming the fitting formula for the No.1 linear interval and the No.2 linear interval. The fitting results are shown in Table 3:  
The fitting results show that the correlation coefficients \(R^{2}\) of the linear interval are 0.9903 and 0.98339, and the correlation is high enough to meet the fitting requirements of the linear interval.