Next Article in Journal
A Review on the Construction, Modeling, and Consistency of Digital Twins for Advanced Air Mobility Applications
Previous Article in Journal
AI-Driven Safety and Security for UAVs: From Machine Learning to Large Language Models
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Tunnel Crack Detection Method Based on an Unmanned Aerial Vehicle (UAV) Equipped with a High-Speed Camera and Crack Recognition Algorithm Using Improved Multi-Scale Retinex and Prewitt–Otsu

1
School of Mechatronic Engineering, Xi’an Technological University, Xi’an 710021, China
2
School of Mechanical Engineering, Shaanxi University of Technology, Hanzhong 723001, China
3
Trine Engineering Institute, Shaanxi University of Technology, Hanzhong 723001, China
4
School of Electronic Information Engineering, Xi’an Technological University, Xi’an 710021, China
*
Author to whom correspondence should be addressed.
Drones 2025, 9(6), 393; https://doi.org/10.3390/drones9060393
Submission received: 7 April 2025 / Revised: 20 May 2025 / Accepted: 21 May 2025 / Published: 24 May 2025

Abstract

:
In order to solve the problems of low efficiency and accuracy in the traditional detection of tunnel cracks, this paper proposes a tunnel crack detection method based on a UAV (unmanned aerial vehicle) equipped with a high-speed camera and a crack recognition algorithm using the improved multi-scale Retinex (MSR) algorithm and the Prewitt–Otsu algorithm, aiming to improve the accuracy and efficiency of detection. The tunnel crack detection method, based on a UAV equipped with a high-speed camera to acquire tunnel surface images, significantly improves the detection efficiency. The recognition method employs an improved multi-scale Retinex algorithm to process the acquired images, enhancing the details of the crack images and improving the contrast between cracks and the background. The enhanced images are input to the Prewitt–Otsu algorithm, which segments the crack image by combining Prewitt edge detection and Otsu thresholding. Finally, the pseudo-crack and isolated edges are removed by the minimum bounding rectangle principle. Using the UAV-collected tunnel surface images as targets, the tunnel crack recognition algorithm proposed in this paper is compared with other existing methods. The experimental results show that the method proposed in this paper improves the recognition ability of the small-texture features of the tunnel’s surface, and the overall crack recognition accuracy is higher than the existing methods. The proposed method not only enhances the efficiency of tunnel crack detection but also significantly improves the recognition accuracy, demonstrating substantial practical significance for tunnel maintenance and safety management.

1. Introduction

1.1. Research Background and Significance

With the rapid increase in both the quantity and total length of tunnel projects, safety risks associated with the long-term use of tunnels have become increasingly prominent. Among various tunnel defects including water leakage, spalling, and cracking, cracks induced by concrete aging, water erosion, and geological stress inhomogeneity are the most common defects, which pose a serious threat to the safety of tunnel structures. Therefore, the defect detection of tunnel cracks is very crucial and important. Traditional manual tunnel crack inspections primarily relying on visual observation and manual recording exhibit low efficiency, subjective bias, and high omission rates, failing to meet the demands of large-scale tunnel inspection. In recent years, with the rapid development of UAV and computer vision technologies, non-contact and intelligent tunnel crack detection methods have become the focus of current research.
Through the early identification of cracks and prediction of their development trend, active prevention of tunnel disasters is enabled, thereby avoiding accidents and significantly prolonging the service life of tunnels. The application of intelligent crack detection methods has greatly improved operational efficiency, reduced labor costs, and minimized the impact of maintenance work on traffic. In addition, the research on tunnel crack detection technology is helpful in that it promotes the intelligent transformation of tunnel management and provides a scientific basis for tunnel safety operation.
In the current research on tunnel crack detection and recognition, most of the detection methods, using unmanned vehicles equipped with cameras to scan the tunnel surface, are expensive and have limitations. The mainstream crack identification methods focus predominantly on the recognition of obvious tunnel cracks, with limited studies on the recognition methods of small cracks.
Therefore, this paper proposes a detection method using a UAV equipped with a high-speed camera. This method captures the tunnel surface image by using low-cost hardware configurations such as a UAV and an industrial camera, which not only improves the efficiency of tunnel surface image acquisition but also reduces the detection cost. By employing the improved MSR enhancement algorithm and Prewitt–Otsu segmentation algorithm, we achieve precise crack feature extraction and higher recognition rates for small cracks. These advancements provide reliable data support for tunnel disaster prediction and tunnel structure maintenance.

1.2. Related Work

Many experts have been studying the crack detection of tunnels using advanced technology, and good results have been achieved. For example, Jiang et al. [1] proposed two main approaches for tunnel crack detection, which are fixed detection technology and mobile detection technology. Fixed detection technology has shown obvious advantages in local crack detection. However, its limitation is that it is difficult to achieve full tunnel coverage. Mobile detection technology, based on machine vision with its efficient image data acquisition ability, is gradually becoming the mainstream research focus for tunnel crack detection. Tang et al. [2] developed a method of high-speed acquisition of image and video data inside a tunnel by developing a detection vehicle that integrates high-resolution camera equipment and an encoder; this method not only significantly improves the detection efficiency but also ensures the accuracy of the detection results. Huang et al. [3] proposed a design of an omnidirectional detection unit equipped with a CCD camera, which can realize 260° tunnel appearance image acquisition and can further complete the automatic classification of tunnel cracks, seepage, spalling, and other defect types. Huang et al. [4] designed an inspection vehicle system that innovatively integrates a multi-axis robotic arm with a binocular stereo vision system, significantly enhancing the overall efficiency of tunnel maintenance work. Laofor et al. [5] proposed a multi-camera robotic detection system and designed a lightweight monorail-mounted detection unit. These two defect detection systems can use multi-focal length cameras to obtain high-definition images of tunnel defects, which is conducive to improving the recognition accuracy of tunnel cracks. Although the above existing research has improved the detection efficiency of tunnel cracks, it still faces challenges including the high cost of detection equipment and insufficient adaptability in complex environments such as uneven illumination, high brightness, and low brightness.
In the research on tunnel crack identification, Wang et al. [6] proposed an automatic identification method for tunnel lining cracks based on local grid analysis, achieving precise crack identification through grid pattern analysis. Zhu et al. [7] established a systematic tunnel crack image acquisition method and detection process, offering a systematic solution for crack collection, processing, and analysis. Cheng et al. [8] designed a tunnel crack detection system that performs image distorted correction before crack identification processing. Zhang et al. [9] researched a subway tunnel crack detection technique using an improved Otsu method. By combining mask-based uniform illumination correction and adaptive grayscale stretching, they effectively enhanced the image contrast, improving the crack identification accuracy. Lei et al. [10] developed a method based on the Hessian matrix, using its eigenvalues and eigenvectors to accurately distinguish structural shapes. Ni et al. [11] proposed a crack extraction and identification algorithm based on statistical filtering. Chen et al. [12] applied image grayscale-depth data to perform surface reconstruction and the identification of crack images, further enhancing the accuracy and reliability of crack identification. In [13,14], the authors studied a parallel MSR algorithm to enhance the image processing efficiency and developed an image processing method combining bimodal threshold segmentation with K-means clustering, which effectively separates damaged regions and achieves efficient automated defect detection in high-noise environments. In addition, Lei et al. [15] proposed a differential noise filtering method to address the limitations in lining crack identification caused by the tunnel’s linear lighting conditions and various lining defects. Zhiznyakov et al. [16] introduced a feature description method based on image self-similarity, extracting crack features through the similarity distribution analysis of image patches, providing more accurate feature representation for defect analysis in complex scenes. These research methods have certainly improved the identification effect of obvious cracks in the tunnel, but the identification effect of small cracks still needs to be improved.
In order to solve the problems regarding small cracks in tunnels, this paper proposes a tunnel crack detection method based on a UAV equipped with a high-speed camera for tunnel surface image acquisition, integrating an improved multi-scale Retinex algorithm and Prewitt–Otsu segmentation for tunnel crack recognition. The innovations of this paper are as follows:
(1)
We propose a tunnel crack detection method based on a UAV equipped with a high-speed camera. The crack detection method consists of two parts: image acquisition and data storage. The UAV is equipped with a high-speed camera and a light source device to form an image acquisition system for obtaining tunnel surface images. The data transmission and storage system store the tunnel surface images. The tunnel crack detection system achieves efficient acquisition of the tunnel surface images.
(2)
We improve the MSR enhancement algorithm by replacing the Gaussian function with a bilateral filtering function. The improved MSR enhancement algorithm maintains the smoothness of the temporal domain while enhancing the spatial details in crack images and improving the enhancement accuracy and stability.
(3)
We propose a segmentation algorithm that combines Prewitt and Otsu. The Prewitt algorithm is used to process the enhanced crack image, and then the Otsu algorithm is used to segment the crack image. The Prewitt–Otsu algorithm reduces noise interference while highlighting the edge features of the crack, significantly improving segmentation performance.
The remainder of this paper is organized as follows: Section 2 states tunnel crack detection system design based on a UAV with a high-speed camera. Section 3 states tunnel small crack recognition algorithm using improved Multi-Scale Retinex and Prewitt–Otsu. Section 4 states the experiment and analysis. Finally, Section 5 concludes the paper.

2. Tunnel Crack Detection System Design Based on a UAV with a High-Speed Camera

2.1. The Overall Architecture of the Tunnel Crack Detection System

This paper proposes a tunnel crack detection system based on a UAV. Firstly, the high-resolution acquisition of tunnel surface images utilizes a UAV equipped with a high-speed camera, and the original image data are transmitted via Bluetooth to a storage subsystem in real time. Next, according to the characteristics of uneven illumination in the tunnel environment, an improved multi-scale Retinex enhancement algorithm is used to preprocess the original image, enhance the details and contrast of the image, and improve the visibility of the cracks. Finally, Prewitt–Otsu segmentation is used to process the enhanced image to highlight small crack features and accurately extract crack regions. Figure 1 is the overall architecture of the tunnel crack system.

2.2. Tunnel Crack Image Acquisition and Analysis Based on a UAV with a High-Speed Camera

The tunnel surface crack images were acquired using a UAV-mounted high-speed camera system. The tunnel was divided into finite segments according to the length of the tunnel. Then, the UAV was used to capture an image of the tunnel surface in the set order in these finite segments. Figure 2 shows the tunnel image acquisition system based on a UAV equipped with a high-speed camera.
In Figure 2, first, we obtain the surface images of the tunnel through the high-speed camera carried by the unmanned aerial vehicle. Then, the images collected by the high-speed camera are stored in the computer. Finally, the computer is used to process and identify the tunnel cracks. An image of the whole tunnel surface can be obtained based on the manner of shooting in Figure 2. The images of possible cracks can be selected by the batch image processing method as the source of the tunnel crack image recognition method studied in this paper. When the images of possible cracks are confirmed, we use the proposed improved multi-scale Retinex and Prewitt–Otsu method to effectively identify cracks.
To efficiently acquire the image information for the tunnel surface, to enable a comprehensive evaluation of the existence of cracks in the tunnel and discover potential safety hazards in real time, this study designs a tunnel crack image acquisition and storage system using a UAV-based platform. The tunnel crack image acquisition system is mainly composed of the image acquisition subsystem and storage subsystem. The data acquisition subsystem includes the UAV, a high-speed camera, and a light supplement device. The UAV carries a high-speed camera and flies according to the planned route. The high-speed camera captures tunnel surface images at designated locations. The LED auxiliary light source ensures stable illumination during image capture, guaranteeing high-quality image acquisition. The data transmission subsystem employs Bluetooth technology to transmit the tunnel crack image data to a computer in real time, where they are stored for subsequent processing.
The UAV-based tunnel image acquisition system integrates image acquisition and real-time data transmission. In the equipment configuration of the tunnel image acquisition system, the UAV uses the quadcopter UAV Matrice 300RTK (M300RTK). The UAV has a strong load capacity, with a maximum take-off weight of 9 kg. The image acquisition platform is mounted on the UAV underside, comprising a 270° rotatable bracket, a camera, and an LED auxiliary light source. A Sony RX1R II high-resolution full-frame visible light camera is selected. The camera has 42.4 million effective pixels and a 35 mm fixed-focus lens. It can achieve a ground resolution of 1.2 cm at a flight altitude of 120 m, capturing raw images at 3840 × 2160 pixel resolution to enable clear visualization of submillimeter cracks on tunnel surfaces. The LED auxiliary light source is installed on the side of the camera to provide supplementary illumination for low-light tunnel environments. During the shooting process, the collected tunnel crack image data are transmitted to a central computer through Bluetooth in real time for storage, to facilitate subsequent image processing.
In the process of tunnel crack image acquisition, due to the limited viewing angle of the camera, in order to ensure the complete coverage of the tunnel surface, it is necessary to determine the number of shots according to the viewing angle of the camera. Figure 3 illustrates the camera’s perspective view.
Assuming that the actual range of the camera shooting is a × a , the tunnel arc length is W . The specific detection steps of the tunnel crack detection method based on a UAV equipped with a high-speed camera are as follows:
Firstly, considering the limitation of the camera’s shooting angle, the camera is set to capture images every 30° rotation to enhance the reliability and integrity of the detection.
Secondly, the tunnel surface is divided into grid sections based on its arc length W and total length L . The UAV follows a predefined U-shaped flight path to systematically capture comprehensive images of the tunnel surface.
Finally, the number of pictures taken is quantitatively analyzed. Assuming that the length of the tunnel is L , it is divided into m sections according to the length; the arc length is W , which is divided into n sections according to the width. On this basis, a represents the picture obtained by a single shot, and F represents the total number of pictures obtained. The calculation formula of the number of tunnel images can be expressed by Formula (1).
F = 2 a 11 a 12 a 1 n a 21 a 22 a 2 n a m 1 a m 2 a m n
Following theoretical calculations and path planning, field tests were conducted using a high-speed camera mounted on the UAV. Figure 4 shows some typical images obtained from these tests.
Observing the tunnel crack images in Figure 4, it can be found that the tunnel crack images collected by the UAV show significant characteristics of low overall brightness and contrast and uneven illumination. Among them, Figure 4a–c shows obvious cracks in the environment with sufficient light, and Figure 4d shows overexposed small cracks. Figure 4e–h represents small cracks in the environment with insufficient light. Although the brightness is high in Figure 4a–d, overexposure obscures small crack features, increasing detection difficulty. The low brightness of the images in Figure 4e–h may reduce the contrast of crack details, which is also not conducive to the detection of cracks. According to the classification of fracture obvious degree, Figure 4a–h is categorized into two groups: Figure 4a–c is obvious cracks with large widths, and the contrast between the crack area and the background area is high, which is usually easy to identify. Figure 4d–h is small cracks with narrow widths, low contrast between the crack area and the background, hidden crack shape, and high requirements for recognition methods.

3. Tunnel Small Crack Recognition Algorithm Using Improved Multi-Scale Retinex and Prewitt–Otsu

3.1. Overview of Proposed Image Processing Method

This paper focuses on the study of small cracks under low brightness and normal brightness conditions in Figure 4. Traditional crack detection methods tend to eliminate the edge feature of small cracks, resulting in small cracks that cannot be detected. To address the problem of small feature loss, this paper proposes a small tunnel crack detection algorithm using improved multi-scale Retinex and Prewitt–Otsu. The improved MSR algorithm replaces the Gaussian filtering with bilateral filtering, enhancing the spatial domain of the tunnel crack image while maintaining the smoothness of the time domain, and retains the edge features of small cracks. The Prewitt–Otsu algorithm integrates Prewitt edge detection and Otsu thresholding for image segmentation. To mitigate noise in the enhanced image, the Prewitt edge detection operator detects the edge of the tunnel crack image to remove the noise, and then the Otsu threshold segmentation algorithm is used to segment the crack from the background. There will still be a small number of isolated points around the segmented cracks. Finally, the minimum bounding rectangle principle is used to remove the isolated points. The tunnel crack recognition process is shown in Figure 5.
Figure 5 shows the workflow of the improved multi-scale Retinex (MSR) algorithm and Prewitt–Otsu algorithm for small crack recognition and the results of the input and output of each process. In this paper, the tunnel surface images captured by the UAV equipped with a high-speed camera serve as the input for tunnel crack recognition. Firstly, the original images are standardized, and the resolution is cut to 800 × 600 to optimize the calculation efficiency. Then, the improved MSR enhancement algorithm enhances the crack images by increasing the contrast between the crack and the background, emphasizing the crack features. Next, the Prewitt–Otsu algorithm segments the enhanced crack image to precisely extract the crack regions. Finally, the minimum bounding rectangle principle removes the isolated points and pseudo-cracks from the segmented crack images.

3.2. Image Enhancement Based on an Improved Multi-Scale Retinex Algorithm

When using the UAV-mounted high-speed camera to obtain the tunnel surface images, in order to reduce the interference such as motion blur generated during image acquisition, the exposure of the camera is reduced. Therefore, the contrast of the captured tunnel crack images is low, and the crack features are not obvious. Processing these crack images requires contrast enhancement to emphasize the crack details. The improved MSR algorithm replaces the Gaussian function in the MSR algorithm with a bilateral filtering function, which enhances the spatial domain of the tunnel crack image while maintaining the smoothness of the time domain. It can improve the uneven illumination of the tunnel crack images while improving the crack image contrast, thus enhancing the image details and improving crack clarity [17,18,19,20].
The MSR algorithm is based on Retinex theory. The core concept of Retinex theory involves decomposing the image into the illumination component and the reflection component. Given an image S ( x , y ) , it can be decomposed into a reflection image R ( x , y ) and an illumination image L ( x , y ) . The resulting image can be expressed as Formula (2).
S ( x , y ) = L ( x , y ) × R ( x , y )
where R ( x , y ) represents the reflectance component, which should be preserved to the greatest extent, and L ( x , y ) represents the illumination component, which determines the dynamic range of the pixel values.
The MSR algorithm employs Gaussian kernel functions at multiple scales (large, medium, and small scales) to estimate the illumination component and extract the reflectance component of the original image. The results from each scale are weighted and fused. The MSR algorithm effectively achieves the collaborative optimization of dynamic range compression and local contrast enhancement. Formula (3) is its function.
R ( x , y ) = k = 1 K ω k log S ( x , y ) F k ( x , y ) S ( x , y )
where K is the number of center- surround functions. In this study, K = 3 is selected to combine the benefits of three scales [21].
The MSR algorithm employs the Gaussian function as the surround function. However, since the Gaussian filter cannot estimate the illumination well in the transition zones when the illumination changes are large, the halo phenomenon occurs, thereby weakening the image enhancement effect. Compared with the Gaussian function, the bilateral filtering function addresses misestimation issues and solves the halo problem caused by the Gaussian function to a certain extent. In addition, the bilateral filter preserves the edge information of the image, resulting in an enhanced tunnel crack image with continuous and smoother features. Therefore, this paper improves the MSR algorithm by using the bilateral filtering function instead of the original Gaussian surround function. Formula (4) defines the bilateral filter.
f ( x , y ) = m , n Ω p , x , y w d ( m , n ) f ( m , n ) w r ( m , n ) m , n Ω p , x , y w d ( m , n ) w r ( m , n )
where f ( m , n ) and f ( x , y ) represent the input and filtered image, respectively. Ω p , x , y represents the pixel neighborhood centered at x , y in the input image with a filter radius 2 p + 1 , where a larger p value results in a larger filtering interval and more complex computation [22,23].
Applying gamma correction to the bilaterally filtered image can make the transformed image appear more natural. Formula (5) is the gamma correction function.
L ( x , y ) = L γ ( x , y )
where L x , y represents the illumination component after gamma correction, and γ is the gamma coefficient. When γ > 1 the overall image becomes brighter; when γ < 1 the overall image becomes darker; and when γ = 1 , the image remains unchanged [24,25].
When the improved MSR algorithm is used to enhance tunnel crack images, the R, G, and B color channels are first extracted, and then the RGB color space is converted to the HSV color space, where the H channel remains unmodified. The S channel undergoes adaptive enhancement. The V channel is processed through the bilateral filtering function to filter the crack image, and then the gamma function is used to correct the color. Finally, the image is converted back to RGB space. The overall process of the improved MSR algorithm is shown in Figure 6.
By observing and comparing the tunnel crack images before and after enhancement, it is evident that the enhanced images exhibit significant improvements in both contrast and brightness. The separation between cracks and the background becomes more obvious, and small cracks are clearly visible. When the tunnel crack images are processed via the improved MSR enhancement algorithm, the enhanced images achieve a higher quality, and the possibility of missed detection is reduced.

3.3. Image Segmentation Algorithm Based on Prewitt–Otsu Model

After image enhancement processing, crack images show significant improvements in contrast and detail. However, the crack edge information remains insufficiently enhanced for the accurate segmentation of small tunnel cracks. Therefore, this paper proposes a Prewitt–Otsu hybrid algorithm to segment the crack images. Firstly, Prewitt edge detection is applied to the enhanced tunnel crack image to highlight the transition region between the crack and the background and strengthen the geometric characteristics of the crack.
In edge detection, many classical algorithms address diverse different image processing requirements. For the specific applications in tunnel crack detection, different operators exhibit significant performance variations. In order to evaluate the algorithm performance on tunnel crack images, this study compares classical edge detection algorithms, such as the Laplacian algorithm, Prewitt algorithm, Roberts algorithm, and Sobel algorithm, for crack feature extraction. Figure 7 visually compares edge detection results across these operators.
Figure 7 shows that the Roberts algorithm exhibits low performance in crack extraction, with minimal visible cracks detected. The Laplacian algorithm produces images with less noise but fails to accurately extract fine crack edges, often eroding their features. The Sobel algorithm can extract cracks but introduces substantial noise [26,27]. In contrast, the Prewitt algorithm demonstrates the best performance. It preserves the fine crack features while suppressing noise, leaving only a small number of isolated noise points after processing.
The Otsu threshold segmentation algorithm automatically determines the optimal segmentation threshold by maximizing the inter-class variance, which can effectively distinguish cracks from the background without manual intervention. However, it is prone to noise interference for small cracks with low contrast, leading to background misclassification. Therefore, this paper integrates the Prewitt edge detection operator with the Otsu algorithm for tunnel crack image segmentation.
The steps of the Prewitt–Otsu segmentation algorithm proceed as follows: Firstly, Prewitt edge detection is performed. An image is defined as a two-dimensional function f ( x , y ) , and the horizontal gradient G x and vertical gradient G y are calculated. Formula (6) is their calculation formula.
G x = 1 0 + 1 1 0 + 1 1 0 + 1 I ,         G y = 1 1 1 0 0 0 + 1 + 1 + 1 I
The edge-detected image is obtained by calculating the gradient amplitude. The gradient amplitude function can be expressed by Formula (7).
G = m a g ( f ) = G x 2 + G y 2
Next, the Otsu algorithm is applied to the gradient amplitude image G obtained by Prewitt edge detection to calculate the optimal threshold T. Formula (8) is its function.
T = arg max τ σ 2 τ
where δ 2 τ represents the between-class [28,29].
Finally, T is applied to binarize the enhanced tunnel crack image, generating the segmented binary image. Figure 8 shows the Prewitt–Otsu segmentation process for enhanced tunnel crack images.
The results in Figure 8 demonstrate that the Prewitt–Otsu segmentation algorithm effectively separates cracks from the background, demonstrating overall good performance in crack segmentation. However, there are still a small number of isolated edges. To mitigate this, the minimum bounding rectangle principle is applied to remove isolated edges from segmented images.

3.4. The Removal of Isolated Crack Edges Based on the Minimum Bounding Rectangle Principle

After tunnel crack segmentation, although the crack features are enhanced, some noise and pseudo-cracks introduce isolated edges. These isolated edges are not fracture features, and their existence will interfere with the extraction of crack characterization. Therefore, this paper uses the minimum bounding rectangle principle to remove isolated edges. This principle defines the minimum area rectangle that surrounds the fracture geometry as the minimum circumscribed rectangle and judges whether the region is an isolated edge according to whether there are other rectangles in the neighborhood of the minimum circumscribed rectangle. If the minimum circumscribed rectangle of a connected region does not intersect with other circumscribed rectangles within its neighborhood, the region is isolated and can be removed. The specific process of removing isolated edges by the minimum circumscribed rectangle is as follows:
Firstly, morphological closing is applied to connect nearby feature points and merge holes or small adjacent regions in the tunnel crack image. Next, all connected regions in the tunnel crack image are traversed, and the minimum bounding rectangle of each region is calculated. Then, the minimum circumscribed rectangle of each connected region is taken as the center, and the size of the rectangle is the size of the template. The algorithm checks whether there are other circumscribed rectangles in the neighborhood template range of its eight directions (0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°). If neighboring rectangles exist, the edge is classified as non-isolated; otherwise, it is identified as isolated and removed.
As shown in Figure 9, the number 1 to 4 are the edge-connected regions, The areas 3 and 4 are identified as isolated edges due to the absence of neighboring circumscribed rectangles in their eight-neighborhood, and they are discarded. In contrast, areas 1 and 2 contain adjacent circumscribed rectangles, leading to their classification as non-isolated edges retained by the algorithm.
After removing the isolated edge by the minimum bounding rectangle principle, the non-crack pixels have been significantly reduced, the proportion of crack feature points has been significantly increased, the crack skeleton has been basically highlighted, and the skeleton structure of the crack has been clearly highlighted after removing the isolated edges.

4. Experiments and Analysis

4.1. Experimental Environment

In the tunnel surface image acquisition and detection method based on a UAV with a high-speed camera proposed in this paper, the selection of hardware equipment is critical. The UAV used in this study is the Matrice 300RTK (M300RTK), which provides a payload capacity of 9 kg and a 40 min flight time, enabling stable operation with the high-speed camera. The Sony RX1R II camera achieves 42.4-megapixel resolution for the precise capture of micro-cracks and surface detail. At the same time, the high sensitivity ensures excellent imaging performance in low-light environments. In addition, in order to enhance the lighting effect, the system is equipped with an LED auxiliary light source with a power of 300 lumens, and the efficient transmission of image data is realized through the Bluetooth wireless communication module. Some of the tunnel surface images obtained based on the UAV equipped with a high-speed camera are shown in Figure 10.
When using the UAV with a high-speed camera to collect actual tunnel surface images for tunnel detection, a 150 m long tunnel section was selected for data acquisition. A total of 5337 tunnel surface images were captured. To validate the tunnel crack detection performance of the proposed algorithm, 300 images were selected as the dataset. The dataset consists of 80% crack-containing images and 20% non-crack samples. Within the crack-containing images, small cracks account for 80%, while distinct cracks constitute 20%. Such screening criteria are designed to ensure that the experimental data can fully and objectively reflect the performance of the algorithm in different situations. The experimental environment for tunnel crack recognition is shown in Table 1.

4.2. Evaluation Metrics

To comprehensively evaluate the performance of the tunnel crack recognition algorithm proposed in this paper, this paper employs four metrics: peak signal-to-noise ratio (PSNR), information entropy (H), contrast (C), and recognition accuracy (P).
The PSNR quantifies pixel-level errors between the enhanced and reference images, directly reflecting the algorithm’s accuracy in correcting illumination components. In general, higher PSNR values indicate lower image distortion. The information entropy H represents the average amount of information, where higher r values correspond to richer texture details and preserved edge integrity. The image contrast C can better reflect the relationship between tunnel cracks and concrete in the image. The larger the contrast is, the more in line with the intuitive effect of the human eye. The recognition accuracy P directly reflects the ability of the algorithm to discriminate crack targets.
The peak signal-to-noise ratio can be expression by Formulas (9) and (10).
M S E = 1 m n i = 1 m j = 1 n X ( i , j Y ( i , j ) 2
PSNR = 10 log 10 ( 2 n 1 ) 2 M S E
where M S E represents the mean squared error between the current image X and the reference image Y ; m and n denote the height and width of the image [30].
The entropy of information is as follows:
H ( p ) = i = 0 p p i log p i 0 p 255
where p i represents the probability of occurrence of each gray level.
The contrast is as follows:
C = δ ( i , j ) P δ ( i , j )
where δ ( i , j ) = i j represents the gray-level difference between adjacent pixels, and P δ ( i , j ) denotes the probability distribution of the pixels [31].
The recognition accuracy is as follows:
P = P t N × 100 %
where P t represents the number of correctly identified samples, and N denotes the total number of samples.

4.3. Comparative Analysis of Improved MSR Enhanced Algorithms

To validate the improved MSR algorithm, this paper selects tunnel crack images as detection objects, which were collected by the UAV with a high-speed camera, and compares its performance against four classical enhancement algorithms, including the single-scale Retinex (SSR) algorithm, multi-scale Retinex (MSR) algorithm, Fourier transform algorithm, and wavelet transform algorithm. The experimental results are shown in Figure 11. In order to further quantify the performance differences of each algorithm, this paper calculates the peak signal-to-noise ratio, information entropy, and contrast to comprehensively evaluated the enhancement effects. The results are shown in Table 2.
Figure 11 demonstrates that the single-scale Retinex (SSR) algorithm produces uniformly illuminated images with improved detail recovery in both the dark and bright regions. However, it tends to lose edge information when processing images with complex textures. In contrast, The MSR algorithm significantly suppresses color distortion, avoids oversaturation, and preserves natural colors. Nevertheless, it struggles to fully retain detail information in regions with significant brightness variations. Both the Fourier-based methods and wavelet transform perform well in enhancing edges and textures but face challenges in distinguishing subtle differences between frequency components in images with complex textures, which affects the final enhancement results. Additionally, they perform poorly in enhancing fine textures. The proposed MSR algorithm preserves the original colors while enhancing the details, yielding clearer images and more accurate fine crack texture extraction. Table 2 shows the objective quality evaluation results of the proposed enhancement algorithm and other image enhancement algorithms and compares them quantitatively by three indicators: peak signal-to-noise ratio (PSNR), information entropy, and contrast. The results show that the improved MSR algorithm outperforms other algorithms in evaluation metrics: its PSNR (98.25) is 3.0% higher than the original MSR algorithm (95.38), the information entropy (5.22) is 5.7% higher, and the contrast (91.56) is 3.8% higher. Compared with Fourier transform and wavelet transform, the PSNR of the improved MSR algorithm is 6.5% and 7.1% higher, respectively, which verifies its significant advantages in noise suppression and detail preservation. In conclusion, the improved MSR algorithm proposed in this paper performs better in enhancing crack detail, improving contrast, and suppressing background noise, effectively highlighting the characteristics of small cracks. It shows significant advantages in tunnel crack image enhancement and provides higher quality image data for subsequent segmentation and recognition.

4.4. Comparative Analysis of Prewitt–Otsu Segmentation Algorithm

In the experimental verification of the Prewitt–Otsu segmentation algorithm, we compared the Prewitt–Otsu algorithm against the Canny–Otsu algorithm proposed in [27], image blocking algorithm applied in [28], and the small-scale fractal dimension algorithm used for tunnel crack recognition. The dataset consisted of tunnel crack images enhanced by the improved MSR algorithm. Figure 12 summarizes the accuracy rates of the edge detection, small-scale fractal dimension recognition, image blocking, Canny–Otsu fusion, and Prewitt–Otsu fusion algorithms for crack identification. The results of several segmentation algorithms are shown in Figure 13.
As shown in the accuracy calculations in Figure 12, the Prewitt–Otsu fusion algorithm achieves a crack detection rate of 93.0%. This represents a 3.5% improvement over the Canny–Otsu fusion algorithm (89.5%) and an 11.8% increase compared to traditional edge detection methods (81.2%). The small-scale fractal dimension method, based on texture statistical feature extraction, demonstrates the lowest accuracy (78.6%) due to its limited capability in capturing complex crack morphological features. The image partitioning method (88.6%) balances precision and efficiency through localized processing but suffers from performance constraints due to insufficient global feature integration. The Prewitt–Otsu algorithm effectively enhances crack texture recognition by combining the Prewitt operator’s precise edge preservation with Otsu adaptive threshold segmentation for background noise suppression.
It can be seen from the results of Figure 13 that different algorithms show significant performance variations in the segmentation of tunnel crack images. Figure 13b presents the crack results processed by Ground Truth. The morphological edge detection algorithm and the recognition algorithm based on small-scale fractal dimension are used to process the crack image. Although these methods effectively filter out most of the noise, they also eliminate the edge information of some small cracks. They show insufficient retention of transverse crack edges, performing well only for longitudinal cracks. The image-blocking method detects transverse and longitudinal cracks, but the block processing will lead to the loss and fracture of crack information. When detecting irregular cracks, it will lead to the fracture of crack information and reduce the integrity of small crack identification. The Canny–Otsu algorithm improves the irregular crack recognition accuracy, but the processing effect on small texture cracks is not prominent; the Prewitt–Otsu algorithm proposed in this paper effectively filters out the background and noise in the image. Through multi-scale feature fusion, it shows a stable effect on the identification of horizontal, vertical, and irregular cracks. At the same time, it retains the crack characteristics in the image to the greatest extent, The recognition effect of small cracks is significant, and the recognition accuracy of crack texture is effectively improved.
The crack recognition algorithm proposed in this paper shows good performance in the image recognition of small cracks in tunnels under normal brightness and low brightness conditions, and it can accurately capture the characteristic information of small cracks. However, this method still has some limitations. When dealing with tunnel images acquired under uneven illumination conditions, the illumination intensity of different regions of the image is significantly different. Some regions may be too bright, while some regions are too dark. This method is difficult to effectively balance the illumination information of each region, and it is easy to lose some critical details during processing, which will directly lead to a reduction in the recognition rate of small cracks. Similarly, under excessively high illumination conditions, overexposure phenomena may occur in the images, and some originally weak crack features will be covered by strong light. When extracting and processing such image features, this method cannot accurately separate the crack features from the complex strong light background, resulting in difficulty in identifying small cracks and a low recognition rate.

5. Conclusions

According to the problems of low detection efficiency, easily missed detection, poor image quality caused by special tunnel environments, and insufficient recognition of small cracks in tunnel crack detection and recognition, the crack detection method based on a UAV equipped with a high-speed camera and the crack recognition algorithm using the improved MSR algorithm and Prewitt–Otsu algorithm is studied. The detection efficiency of the detection system is significantly improved, and the cost is reduced by obtaining surface images of tunnel cracks based on a UAV equipped with a high-speed camera. The recognition method of the improved MSR algorithm and Prewitt–Otsu algorithm can effectively remove the interference of noise and pseudo cracks, and the extraction effect of the texture of small cracks is remarkable. The recognition rate of cracks can reach 96%.
This paper proposes a tunnel crack detection method based on a UAV equipped with a high-speed camera and crack recognition algorithm using improved multi-scale Retinex and Prewitt–Otsu, which effectively improve the efficiency of tunnel crack detection and the accuracy of tunnel small crack recognition. However, this method demonstrates suboptimal performance when the images are acquired under uneven illumination or high light intensity conditions. In future research, we intend to combine the proposed method with deep learning technology to study an intelligent tunnel crack defect detection system. We will explore a multi-scale feature-fusion-based approach for tunnel crack identification. This method introduces a multi-scale feature module, which can capture and analyze image features from different scales and is expected to improve the recognition effect of small cracks under uneven illumination and high illumination conditions. It establishes a research foundation for our subsequent work and is also our future key research object.

Author Contributions

Conceptualization and methodology, software and validation, writing—original draft, W.S.; Methodology, software and validation, writing—original draft, X.L.; Methodology, software and validation, writing—original draft, Z.L. All authors have read and agreed to the published version of the manuscript.

Funding

This work has been supported by Shaanxi University of Technology Talent Launch Project (Grant No. SLGRC202416) and Shaanxi Provincial Science and Technology Department (Grant No. 2023-YBGY-342).

Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Jiang, W.-B.; Luo, Q.-R.; Zhang, X.-H. A Review of Concrete Roads Crack Detection Methods Based on Digital Image. J. Xihua Univ. Nat. Sci. Ed. 2018, 37, 75–84. [Google Scholar] [CrossRef]
  2. Tang, W.-L.; Ma, H.-H.; Zhong, H.; Fan, X.-D.; Yuan, K. Research on the application of zoom binocular stereo vision system in subway track detection. Manuf. Autom. 2022, 44, 58–61. [Google Scholar]
  3. Huang, Z.; Fu, H.; Chen, W.; Zhang, J.; Huang, H. Damage Detection and Quantitative Analysis of Shield Tunnel Structure. Autom. Constr. 2018, 94, 303–316. [Google Scholar] [CrossRef]
  4. Huang, Z.; Zhang, C.-L.; Ma, S.-K.; Chen, Y.-M.; Liao, M.-X. Research on the integrated robot system of tunnel detection and maintenance and analysis of key technologies. J. Railw. Sci. Eng. 2021, 18, 767–776. [Google Scholar] [CrossRef]
  5. Laofor, C.; Peansupap, V. Defect detection and quantification system to support subjective visual quality inspection via a digital image processing: A tiling work case study. Autom. Constr. 2012, 24, 160–174. [Google Scholar] [CrossRef]
  6. Wang, P.-R.; Huang, H.-W.; Xue, Y.-D. Automatic recognition of tunnel lining cracks based on local grid features of images. Chin. J. Rock Mech. Eng. 2012, 31, 991–999. [Google Scholar]
  7. Zhu, X.-Y.; Liu, Z.; Zhang, Z.-Q.; Feng, Y. Study on the influence law of structural design parameters of the railway tunnel on secondary lining cracks. Mod. Tunn. Technol. 2023, 60, 1–10. [Google Scholar]
  8. Cheng, H.; Zhang, X.-H.; You, C. Application of acoustic and electrical imaging logging technology in reservoir fracture identification. Audio Eng. 2020, 44, 83–84. [Google Scholar]
  9. Zhang, Z.-H.; Ji, K.; Dang, J.-W. Research on Tunnel Crack Detection Methods Based on Machine Vision. J. Chongqing Univ. 2024, 47, 83–91. [Google Scholar] [CrossRef]
  10. Lei, M.; Liu, L.; Shi, C.; Tan, Y.; Lin, Y.; Wang, W. A novel tunnel-lining crack recognition system based on digital image technology. Tunn. Undergr. Space Technol. 2021, 108, 103724. [Google Scholar] [CrossRef]
  11. Ni, X.; Fieguth, P.W.; Ma, Z.; Shi, B.; Liu, H. Defect Detection on Multi-Type Rail Surfaces via IOU Decoupling and Multi-Information Alignment. Adv. Eng. Inform. 2024, 62, 102717. [Google Scholar] [CrossRef]
  12. Chen, F.C.; Jahanshahi, M.R. NB-CNN: Deep Learning-Based Crack Detection Using Convolutional Neural Network and Naïve Bayes Data Fusion. IEEE Trans. Ind. Electron. 2017, 65, 4392–4400. [Google Scholar] [CrossRef]
  13. Wang, Q.; Zhang, N.; Jiang, K.; Ma, C.; Zhou, Z.; Dai, C. Tunnel Lining Crack Recognition Based on Improved Multiscale Retinex and Sobel Edge Detection. Math. Probl. Eng. 2021, 2021, 9969464. [Google Scholar] [CrossRef]
  14. Loupos, K.; Doulamis, A.D.; Stentoumis, C.; Protopapadakis, E.; Makantasis, K.; Doulamis, N.D.; Amditis, A.; Chrobocinski, P.; Victores, J.; Montero, R.; et al. Autonomous robotic system for tunnel structural inspection and assessment. Int. J. Intell. Robot. Appl. 2018, 2, 43–66. [Google Scholar] [CrossRef]
  15. Menendez, E.; Victores, J.G.; Montero, R.; Martínez, S.; Balaguer, C. Tunnel structural inspection and assessment using an autonomous robotic system. Autom. Constr. 2018, 87, 117–126. [Google Scholar] [CrossRef]
  16. Zhiznyakov, L.A.; Privezentsev, G.D.; Zakharov, A.A. Using fractal features of digital images for the detection of surface defects. Pattern Recognit. Image Anal. 2015, 25, 122–131. [Google Scholar] [CrossRef]
  17. Nicola, G.; Jaime, M.; Walter, K. Automated crack detection and measurement based on digital image correlation. Constr. Build. Mater. 2020, 98, 119383. [Google Scholar] [CrossRef]
  18. Dai, P.-K.; Li, H.-S. Improved YOLOv8n for MEMS Defect Detection. Semicond. Technol. 2025, 50, 170–180. [Google Scholar] [CrossRef]
  19. Xue, Y.; Jia, F.; Cai, X.; Shadabfar, M.; Huang, H. An optimization strategy to improve the deep learning-based recognition model of leakage in shield tunnels. Ind. Appl. 2022, 37, 386–402. [Google Scholar] [CrossRef]
  20. Liu, K.; Zhong, S.; Wang, R.; Zhou, P.; Zhao, X.; Liu, X. Tunnel lining crack recognition algorithm integrating sk attention and cascade neural network. Electronics 2023, 12, 3307. [Google Scholar] [CrossRef]
  21. Li, H.-S.; Zhang, X.-Q.; Gao, J.-C. A cloud model target damage effectiveness assessment algorithm based on spatio-temporal sequence finite multilayer fragments dispersion. Def. Technol. 2024, 40, 48–64. [Google Scholar] [CrossRef]
  22. Lu, L.; Li, H.; Ding, Z.; Guo, Q. An Improved Target Detection Method Based on Multiscale Features Fusion. Microw. Opt. Technol. Lett. 2020, 62, 3051–3059. [Google Scholar] [CrossRef]
  23. Wang, B.; He, N.; Xu, F.; Du, Y.; Xu, H. Visual detection method of tunnel water leakage diseases based on feature enhancement learning. Tunn. Undergr. Space Technol. 2024, 193, 106009. [Google Scholar] [CrossRef]
  24. Li, K.; Wang, B.; Tian, Y.; Qi, Z. Fast and Accurate Road Crack Detection Based on Adaptive Cost-Sensitive Loss Function. IEEE Trans. Cybern. 2023, 53, 1051–1062. [Google Scholar] [CrossRef]
  25. Lu, L.-P.; Zhang, X.-Q. Datafusion method of multi-sensor target recognition in complex environment. J. Xidian Univ. 2020, 47, 31–38. [Google Scholar] [CrossRef]
  26. Zhang, Y.-C.; Gao, J.-C.; Zhang, X.-Q. Perforated Target Plate with Fragments Deformation Recovery Method after Static Detonation Test. J. Detect. Control 2024, 46, 34–42. [Google Scholar]
  27. Ding, X.; Hu, H.; Hu, Y.; Jin, J.; Liu, Z.; Pan, H.; Shi, G. Identification and precise control of disaster-causing hazards in metro operation and maintenance: A new method for improving metro operation safety based on data mining. Comput. Ind. Eng. 2025, 201, 110899. [Google Scholar] [CrossRef]
  28. Hu, W.; Liu, X.; Zhou, Z.; Wang, W.; Wu, Z.; Chen, Z. Robust crack detection in complex slab track scenarios using STC-YOLO and synthetic data with highly simulated modeling. Autom. Constr. 2025, 175, 106219. [Google Scholar] [CrossRef]
  29. Li, H.-S.; Zhang, X.-Q. An equivalent target plate damage probability calculation mathematical model and damage evaluation method. Def. Technol. 2024, 41, 82–103. [Google Scholar] [CrossRef]
  30. Li, H.-S. Multi-target space position identification and matching algorithm in multi-screen intersection measurement system using information constraint method. Measurement 2019, 145, 172–177. [Google Scholar] [CrossRef]
  31. Yu, S.-N.; Jang, J.-H.; Han, C.-S. Auto inspection system using a mobile robot for detecting concrete cracks in a tunnel. Autom. Constr. 2007, 16, 255–261. [Google Scholar] [CrossRef]
Figure 1. Structure diagram of the tunnel crack detection system based on a UAV.
Figure 1. Structure diagram of the tunnel crack detection system based on a UAV.
Drones 09 00393 g001
Figure 2. UAV-based tunnel crack image acquisition system.
Figure 2. UAV-based tunnel crack image acquisition system.
Drones 09 00393 g002
Figure 3. Camera perspective view.
Figure 3. Camera perspective view.
Drones 09 00393 g003
Figure 4. Partial tunnel surface images. (ad) show obvious cracks in the environment with sufficient light; (eh) show obvious cracks in the environment with low light.
Figure 4. Partial tunnel surface images. (ad) show obvious cracks in the environment with sufficient light; (eh) show obvious cracks in the environment with low light.
Drones 09 00393 g004
Figure 5. Crack identification process.
Figure 5. Crack identification process.
Drones 09 00393 g005
Figure 6. Flowchart of the MSR enhancement algorithm.
Figure 6. Flowchart of the MSR enhancement algorithm.
Drones 09 00393 g006
Figure 7. Comparison of edge detection algorithms.
Figure 7. Comparison of edge detection algorithms.
Drones 09 00393 g007
Figure 8. The result of crack segmentation.
Figure 8. The result of crack segmentation.
Drones 09 00393 g008
Figure 9. Schematic diagram for isolation points removal.
Figure 9. Schematic diagram for isolation points removal.
Drones 09 00393 g009
Figure 10. Partial tunnel images acquired based on a UAV detection system.
Figure 10. Partial tunnel images acquired based on a UAV detection system.
Drones 09 00393 g010
Figure 11. Comparative chart of enhancement algorithm results.
Figure 11. Comparative chart of enhancement algorithm results.
Drones 09 00393 g011
Figure 12. Objective quality assessment of enhancement algorithms.
Figure 12. Objective quality assessment of enhancement algorithms.
Drones 09 00393 g012
Figure 13. Comparative analysis of crack extraction algorithms.
Figure 13. Comparative analysis of crack extraction algorithms.
Drones 09 00393 g013
Table 1. Experimental environment parameters.
Table 1. Experimental environment parameters.
CPUIntel Core i5-8265U
GPUNVIDIA GeForce MX110
Operating systemWindows 10
Programming languagePython3.9.7
Virtual environmentAnaconda 4.10.3
Table 2. Objective quality assessment of enhancement algorithms.
Table 2. Objective quality assessment of enhancement algorithms.
AlgorithmPSNRInformation EntropyContrast
Original image91.494.1861.12
SSR92.454.2672.37
MSR95.384.9488.25
Fourier transform92.254.2175.76
Wavelet transform91.764.2378.24
Improved MSR algorithm98.255.2291.56
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Sun, W.; Liu, X.; Lei, Z. A Tunnel Crack Detection Method Based on an Unmanned Aerial Vehicle (UAV) Equipped with a High-Speed Camera and Crack Recognition Algorithm Using Improved Multi-Scale Retinex and Prewitt–Otsu. Drones 2025, 9, 393. https://doi.org/10.3390/drones9060393

AMA Style

Sun W, Liu X, Lei Z. A Tunnel Crack Detection Method Based on an Unmanned Aerial Vehicle (UAV) Equipped with a High-Speed Camera and Crack Recognition Algorithm Using Improved Multi-Scale Retinex and Prewitt–Otsu. Drones. 2025; 9(6):393. https://doi.org/10.3390/drones9060393

Chicago/Turabian Style

Sun, Wei, Xiaohu Liu, and Zhiyong Lei. 2025. "A Tunnel Crack Detection Method Based on an Unmanned Aerial Vehicle (UAV) Equipped with a High-Speed Camera and Crack Recognition Algorithm Using Improved Multi-Scale Retinex and Prewitt–Otsu" Drones 9, no. 6: 393. https://doi.org/10.3390/drones9060393

APA Style

Sun, W., Liu, X., & Lei, Z. (2025). A Tunnel Crack Detection Method Based on an Unmanned Aerial Vehicle (UAV) Equipped with a High-Speed Camera and Crack Recognition Algorithm Using Improved Multi-Scale Retinex and Prewitt–Otsu. Drones, 9(6), 393. https://doi.org/10.3390/drones9060393

Article Metrics

Back to TopTop