A crack length detection method based on matched filtering
By using a high-precision camera mounted on a drone combined with image filtering and matched filtering technology, the problems of low efficiency and severe noise interference in traditional crack detection methods are solved, and efficient and safe crack detection and length measurement are achieved.
Patent Information
- Application Number
- CN202410716513.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2044-06-04
AI Technical Summary
Traditional crack detection methods are inefficient and highly dangerous, with severe noise interference. Deep learning-based methods are difficult to train, and existing visual inspection methods are greatly affected by noise and lack effective noise solutions.
A high-precision camera equipped with a drone is used for image acquisition. Image filtering and matched filtering techniques are combined to design the convolution kernel through Gaussian function for crack detection. The crack skeleton is extracted using morphological methods, and the actual crack length is calculated through proportional mapping.
It achieves efficient and safe crack detection, reduces noise interference, improves detection accuracy and speed, reduces manual intervention, and reduces detection risks.
Smart Images

Figure CN118587269B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer vision, and in particular relates to a crack length detection method based on matched filtering. Background Art
[0002] With the continuous development of science and technology, a large number of transportation infrastructure projects have been built, such as bridges, roads, and tunnels. The role of transportation in people's lives has become increasingly significant, and among all forms of transportation, road transportation is closely related to people's daily lives and travel. At the same time, ensuring the maintenance of roads during operation to ensure the longest possible service life is an urgent issue that needs to be addressed. Cracks are a common road hazard. Their appearance is often accompanied by a breakdown in the mechanical stability of the original structure. In severe cases, they can even cause collapse within a short period of time, seriously hindering the normal operation of traffic and causing significant economic losses. Therefore, how to conduct timely and effective inspection and maintenance in the early stages of road development to avoid damage to road structures and the occurrence of traffic accidents is a critical issue.
[0003] Traditional crack detection methods are primarily manual, requiring personnel to reach the height of the structure under inspection using climbing equipment and employing various detection tools to detect, record, and analyze cracks. This is inefficient, time-consuming, and, in certain environments, extremely dangerous. Traditional crack detection techniques can be categorized as destructive and non-destructive, depending on whether they cause structural damage. The former involves coring at designated locations on the bridge under inspection, which is somewhat destructive to the structure. The latter uses non-contact methods to inspect the locations under inspection. Ultrasonic testing, fiber optic sensors, and infrared imaging are currently the most commonly used non-destructive testing methods.
[0004] In recent years, with the rapid development of computer technology and the widespread application of artificial intelligence (AI), numerous computer vision-assisted crack detection methods have emerged. These methods typically offer advantages such as automated operation and rapid detection, while also significantly reducing detection risks and providing a high safety factor. However, the complexity of acquired road surface data and interference from environmental factors often result in images that are often filled with noise. Conventional visual inspection methods are significantly affected by noise. While deep learning-based inspection methods can mitigate the effects of noise, they are subject to challenges such as high training difficulty, difficulty in data acquisition, and significant susceptibility to the influence of the original dataset, leading to their gradual divergence from traditional vision. Therefore, within the field of traditional vision, addressing the noise issue in inspection remains an unresolved issue. Summary of the Invention
[0005] The purpose of the present invention is to provide a crack length detection method based on matched filtering to solve the problems raised in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A crack length detection method based on matched filtering includes an image acquisition module, an image processing module, a crack detection module based on matched filtering, a crack skeleton extraction module, and a crack size measurement module.
[0008] The image acquisition module uses a drone equipped with a high-precision camera to perform high-resolution scanning on the surface of the bridge or road to be inspected, obtaining high-definition image data so that the image resolution data meets the requirements of crack detection. At the same time, the image capture module saves the distance, height, GPS, attitude information, focal length, shooting distance, and camera CMOS (sensor) parameters at the time of shooting, and transmits the image captured by the drone to the image processing module in the computer, and the parameter information is saved in the computer for future use.
[0009] The image processing module, based on the high-resolution crack image obtained by the high-definition camera on the drone, is transmitted to the image and processing module in the computer. The original three-channel RGB (red, green, and blue) color image is first converted into a grayscale image, and then an image filtering algorithm is used to remove the noise interference in the image.
[0010] The crack detection module based on matched filtering designs a convolution kernel by using a Gaussian function as a matching template, obtains all feature convolution kernels based on the Gaussian function through the convolution kernel, and then uses all convolution kernel templates to detect the processed image to obtain the final crack result image, thereby achieving crack segmentation in the image;
[0011] The crack skeleton extraction module uses morphological methods (dilation, erosion) to refine the segmented crack image to obtain a crack skeleton consisting of only single pixels, which is used to calculate the length of the crack;
[0012] The crack size measurement module calculates the actual length value represented by each pixel based on the parameter information during image acquisition, the focal length and the distance to the photographed object, and then calculates the actual length value of the crack by accumulation.
[0013] Furthermore, the image acquisition module, through an unmanned aerial vehicle equipped with a camera, adopts high-precision technology suitable for crack detection to obtain high-precision crack images to meet detection requirements, while retaining the shooting distance, height, GPS, posture information, focal length, shooting distance, and camera CMOS (sensor) parameters corresponding to each image. The main steps include:
[0014] Preliminary preparation: determine the shooting area and target; select and inspect the drone and related equipment; set flight parameters and develop a flight plan; understand and comply with the laws and regulations of the flight area;
[0015] Flight operations: Take off the drone as planned; monitor the drone's status and shooting results in real time during flight; control the drone to fly along the planned route and adjust shooting parameters; respond to emergencies during flight to ensure safety;
[0016] Photography and image processing: Use drones to take photos or videos; transfer the captured data to a computer and save it on a storage device;
[0017] Post-processing: Write a shooting report to summarize the shooting process and results.
[0018] Furthermore, the image processing module transmits the high-resolution crack image obtained by the high-definition camera on the drone to the image and processing module in the computer. The original three-channel RGB (red, green, and blue) color image is first converted into a grayscale image, and then an image filtering algorithm is used to remove the noise interference in the image. The main steps include:
[0019] The obtained RBG (red, green, blue) three-channel color image is converted into a grayscale image. The specific formula is as follows:
[0020] p=0.21×r+0.72×g+0.07×b
[0021] Among them, p represents the grayscale value in the grayscale image, r represents the brightness value of the red channel, g represents the brightness value of the green channel, and b represents the brightness value of the blue channel;
[0022] Afterwards, the obtained grayscale image is denoised by image filtering to effectively smooth the speckle noise and retain the overall grayscale distribution characteristics of the image. The specific mean filtering formula is as follows:
[0023]
[0024] Where f(x, y) is the original image containing noise, g(x, y) is the image obtained after mean filtering, s is the set of pixels in the template centered at point (i, j), and the template size is m×n. Furthermore, the crack detection module based on matched filtering generates a feature convolution kernel based on a Gaussian function template selected based on crack features. This is done by dividing the crack direction into 12 directions, rotating the first feature matrix by 15°, and then accumulating them sequentially to obtain convolution kernels in all directions and the designed matching template. The main steps include:
[0025] Based on the crack characteristics, the Gaussian function is selected as the template function for identifying cracks, as shown below;
[0026]
[0027] Where x and y are the grayscale values; A represents the local background intensity; k is the reflectivity of the object being measured; d is the distance between the point (x, y) and the line segment passing through the center of the object; and σ represents the intensity distribution.
[0028] Select appropriate length and width through the template function value. Generate the feature values in the first row of convolution kernel according to the selected length and width values;
[0029] Copy the convolution kernel value of the first row to all rows to form the first convolution kernel;
[0030] Rotate the convolution kernel by a certain angle to obtain the convolution kernel of the angle around the entire circumference, as shown below;
[0031]
[0032] Among them, p i = the position of the point in the ith θ angle; p = the corresponding point in the horizontal kernel; T = the transpose of the matrix.
[0033] Convolve the image with all convolution kernels in turn to obtain the final convolution result, which is the preliminary crack image filtered by the convolution kernel;
[0034] The obtained crack image is subjected to connected domain denoising. This step can eliminate the influence of dark substances such as oil droplets and other spot substances on the final detection results.
[0035] Furthermore, the crack skeleton extraction module is implemented by the corrosion operation in the morphological method, corroding the crack detection result (black and white binary image of the crack, black is 0 and white is 1) to gradually transform it into a single pixel crack skeleton. The main steps include:
[0036] The crack segmentation results are input into the crack skeleton extraction module. The module needs to set the erosion block of size 7x7 in advance, and then obtain the refined crack skeleton by calling the morphology.skeletonize method in the skimage function package;
[0037] Furthermore, the crack size measurement module needs to obtain crack skeleton data, specifically the number of pixels in the crack skeleton. By using the distance, height, GPS, posture information, focal length, shooting distance, and camera CMOS (sensor) parameter information recorded simultaneously during shooting, the real data of the crack in reality can be obtained through proportional mapping. The specific formula is as follows:
[0038]
[0039] Among them, l is the actual length of the crack, k is the length value represented by each pixel in the camera, p is the number of pixels in the crack skeleton, f is the focal length of the camera, d is the shooting distance, and n is the pixel size in the CMOS.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] The present invention obtains digital image data of the area to be detected by an unmanned aerial vehicle, and simultaneously records the shooting distance, height, GPS, posture information, focal length, shooting distance and camera CMOS (sensor) parameter information corresponding to each image, and saves this information together with the image to a computer storage device. The image is preprocessed by an image and processing module to eliminate speckle noise and make the image smooth. At the same time, the image is converted from the original three-channel color RGB (red, green, blue) image to a grayscale image to reduce the amount of calculation. The matched filter designed by using the Gaussian function as a matching template can well detect and segment the crack image of the corresponding feature, and through the two steps of threshold screening and connected domain denoising, eliminate the interference of small noise in the non-crack area to obtain a pure crack image. The crack skeleton extraction module uses a morphological corrosion method to refine the crack image after detection and segmentation into a skeleton of only a single pixel, and calculates the total number of pixels contained in the skeleton. The crack size measurement module uses proportional mapping to calculate the length information of the detected crack in reality. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flow chart of a crack length detection method based on matched filtering provided in Example 1 of the present application;
[0043] Figure 2 The image acquisition module provided in Example 1 of the present application collects data images;
[0044] Figure 3 This is a flowchart of image acquisition and preprocessing provided in Example 1 of the present application;
[0045] Figure 4 Flowchart for generating over-convolution template provided in Example 1 of this application
[0046] Figure 5 A road surface grayscale image provided in Example 1 of the present application;
[0047] Figure 6 This is a crack detection result diagram provided in Example 1 of the present application;
[0048] Figure 7 This is the skeleton extraction diagram of the crack skeleton extraction module provided in Example 1 of the present application. DETAILED DESCRIPTION
[0049] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0050] Example 1:
[0051] like Figure 1 As shown in FIG, a crack length detection method based on matched filtering is implemented by the following technical solutions:
[0052] S1: Through the image acquisition module, a drone equipped with a high-precision camera is used to perform high-resolution scanning on the surface of the bridge and road to be inspected, obtaining high-definition image data so that the image resolution data meets the requirements of crack detection. At the same time, the distance, height, GPS, attitude information, focal length, shooting distance and camera CMOS (sensor) parameters are saved, and the images taken by the drone are transmitted to the image processing module in the computer, and the parameter information is saved in the computer for future use.
[0053] Specifically, because the implementation case involves the use of drones to collect data from the area to be inspected, the actual operation requires advance planning of the tasks performed by the drones and equipment. The specific steps are as follows:
[0054] Preliminary preparation: determine the shooting area and target; select and inspect the drone and related equipment; set flight parameters and develop a flight plan; understand and comply with the laws and regulations of the flight area;
[0055] Flight operations: Take off the drone as planned; monitor the drone's status and shooting results in real time during flight; control the drone to fly along the planned route and adjust shooting parameters; respond to emergencies during flight to ensure safety;
[0056] Photography and image processing: Use drones to take photos or videos; transfer the captured data to a computer and save it on a storage device;
[0057] Post-processing: Write a shooting report to summarize the shooting process and results.
[0058] S2: Use the image processing module to perform domain value conversion and noise reduction on the obtained image. The high-resolution crack image obtained by the high-definition camera on the drone is transmitted to the image and processing module in the computer. First, the original three-channel RGB (red, green, and blue) color image is converted into a grayscale image, and then the image filtering algorithm is used to remove the noise interference in the image.
[0059] Specifically, the obtained RBG (red, green, blue) three-channel color image is converted into a grayscale image. The specific formula is as follows:
[0060] p=0.21×r+0.72×g+0.07×b
[0061] Among them, p represents the grayscale value in the grayscale image, r represents the brightness value of the red channel, g represents the brightness value of the green channel, and b represents the brightness value of the blue channel;
[0062] Afterwards, the obtained grayscale image is denoised by image filtering to effectively smooth the speckle noise and retain the overall grayscale distribution characteristics of the image. The specific mean filtering formula is as follows:
[0063]
[0064] Where f(x,y) is the original image containing noise, g(x,y) is the image obtained after mean filtering, s is the set of pixels in the template centered at point (i,j), and the template size is m×n.
[0065] S3: Crack detection and segmentation are achieved through a crack detection module based on matched filtering. The crack detection module based on matched filtering generates a feature convolution kernel based on a Gaussian function template selected according to crack features. The crack direction is divided into 12 directions, and the first feature matrix is rotated 15° and accumulated sequentially to obtain convolution kernels in all directions and the designed matching template. The main steps include:
[0066] Specifically, the crack detection module based on matched filtering generates a feature convolution kernel based on a Gaussian function template selected according to crack features. The crack direction is divided into 12 directions, and the first feature matrix is rotated 15 degrees. The convolution kernels in all directions and the designed matching template are accumulated sequentially. The main steps include:
[0067] Based on the crack characteristics, the Gaussian function is selected as the template function for identifying cracks, as shown below;
[0068]
[0069] Where x and y are the grayscale values; A represents the local background intensity; k is the reflectivity of the object being measured; d is the distance between the point (x, y) and the line segment passing through the center of the object; and σ represents the intensity distribution.
[0070] Select appropriate length and width through the template function value. Generate the feature values in the first row of convolution kernel according to the selected length and width values;
[0071] Copy the convolution kernel value of the first row to all rows to form the first convolution kernel;
[0072] Rotate the convolution kernel by a certain angle to obtain the convolution kernel of the angle around the entire circumference, as shown below;
[0073]
[0074] Among them, p i = the position of the point in the ith θ angle; p = the corresponding point in the horizontal kernel; T = the transpose of the matrix.
[0075] Convolve the image with all convolution kernels in turn to obtain the final convolution result, which is the preliminary crack image filtered by the convolution kernel;
[0076] The obtained crack image is subjected to connected domain denoising. This step can eliminate the influence of dark substances such as oil droplets and other spot substances on the final detection results.
[0077] S4: Through the crack skeleton extraction module, the morphological method (dilation, erosion) is used to erode and refine the segmented crack image (black and white binary image of the crack, black is 0, white is 1) to obtain a crack skeleton composed of only single pixels, and the number of pixels in the skeleton is counted.
[0078] Specifically, the crack segmentation results are input into the crack skeleton extraction module. The module needs to set the corrosion block of size 7x7 in advance, and then obtain the refined crack skeleton by calling the morphology.skeletonize method in the skimage function package;
[0079] S5: Through the crack size measurement module, the distance, height, GPS, attitude information, focal length, shooting distance and camera CMOS (sensor) parameter information recorded at the time of shooting can be used to obtain the actual data of the crack in reality through proportional mapping. The specific formula is as follows:
[0080]
[0081] Among them, l is the actual length of the crack, k is the length value represented by each pixel in the camera, p is the number of pixels in the crack skeleton, f is the focal length of the camera, d is the shooting distance, and n is the pixel size in the CMOS.
[0082] The technical solutions of the embodiments of the present disclosure can be embodied in the form of a software product, stored in a storage medium and comprising one or more instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, and other media capable of storing program code, or a transient storage medium.
[0083] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A crack length detection method based on matched filtering, characterized in that: It includes image acquisition module, image processing module, crack detection module based on matched filtering, crack skeleton extraction module, and crack size measurement module. The image acquisition module uses a drone equipped with a high-precision camera to perform high-resolution scanning on the surface of the bridge or road to be inspected, obtaining high-definition image data so that the image resolution data meets the requirements of crack detection. At the same time, the image capture module saves the distance, height, GPS, attitude information, focal length, shooting distance, and camera CMOS (sensor) parameters at the time of shooting, and transmits the image captured by the drone to the image processing module in the computer, and the parameter information is saved in the computer for future use. The image processing module, based on the high-resolution crack image obtained by the high-definition camera on the drone, is transmitted to the image and processing module in the computer. The original three-channel RGB (red, green, and blue) color image is first converted into a grayscale image, and then an image filtering algorithm is used to remove noise interference in the image; The crack detection module based on matched filtering designs a convolution kernel by using a Gaussian function as a matching template, obtains all feature convolution kernels based on the Gaussian function through the convolution kernel, and then uses all convolution kernel templates to detect the processed image to obtain the final crack result image, thereby achieving crack segmentation in the image; Select the appropriate length and width through the template function value, and generate the eigenvalues in the convolution kernel of the first row according to the selected length and width values; Copy the convolution kernel value of the first row to all rows to form the first convolution kernel; Rotate the convolution kernel by a certain angle to obtain the convolution kernel of the angle around the entire circumference. The formula is as follows; Among them, p i = the position of the point in the ith angle θ; p = the corresponding point in the horizontal kernel; T = the transpose of the matrix; Convolve the image with all convolution kernels in turn to obtain the final convolution result, which is the preliminary crack image filtered by the convolution kernel; The crack skeleton extraction module uses a morphological method to refine the crack image obtained by segmentation to obtain a crack skeleton consisting of only single pixels for calculating the length of the crack; The crack size measurement module calculates the actual length value represented by each pixel based on the parameter information during image acquisition, the focal length and the distance to the photographed object, and then calculates the actual length value of the crack by accumulation.
2. The crack length detection method based on matched filtering according to claim 1, characterized in that: The data acquisition module of the drone vision adopts high-precision technology suitable for crack detection. It detects surface cracks through digital image processing technology and then obtains high-precision crack data based on the selected detection technology.
3. The crack length detection method based on matched filtering according to claim 2, characterized in that: The image processing module includes image filtering and denoising, effectively smoothing speckle noise and retaining the overall grayscale distribution characteristics of the image. The specific mean filtering formula is as follows: Where f(x,y) is the original image containing noise, g(x,y) is the image obtained after mean filtering, s is the set of pixels in the template centered at point (i,j), and the template size is m×n.
4. The crack length detection method based on matched filtering according to claim 1, characterized in that: The crack detection module based on matched filtering includes: 1) By performing a convolution extraction operation on the designed matched filter template and the grayscale image, a preliminary convolution result of the old template features is obtained; 2) Set an appropriate screening threshold to filter the results of the preliminary processing, remove the background area, and retain the crack characteristics; 3) Through connected domain denoising, the point noise in the non-crack area is removed to obtain the final crack segmentation image.
5. The crack length detection method based on matched filtering according to claim 4 is characterized in that: Designed matching templates, including: Based on the crack characteristics, the Gaussian function is selected as the template function for identifying cracks. The formula is as follows; Where x and y are the grayscale values; A represents the local background intensity; k is the reflectivity of the object being measured; d is the distance between the point (x, y) and the line segment passing through the center of the object; and σ represents the intensity distribution. The obtained crack image is subjected to connected domain denoising. This step can eliminate the influence of dark oil droplets and other spot materials on the final detection results.
6. The crack length detection method based on matched filtering according to claim 1, characterized in that: Perform the specified convolution operations, including: 1) Perform convolution operations on the original image in sequence according to the convolution template generated by the template function to obtain the crack feature results extracted by convolution in the corresponding direction; 2) Filter out the maximum value of the convolution results in all directions and save the maximum value in the final image; 3) The final image is the preliminary screening image obtained by convolution of the matching template.
7. The crack length detection method based on matched filtering according to claim 1, characterized in that: The crack skeleton extraction module includes thinning the crack image obtained based on detection and segmentation to obtain a skeleton, and applying a morphological method to perform an erosion operation on the crack image to obtain a crack skeleton with only a single pixel while retaining the overall trend of the crack.
8. The crack length detection method based on matched filtering according to claim 1, characterized in that: The crack size measurement module calculates the actual crack length through proportional mapping based on the distance, height, GPS, attitude information, focal length, shooting distance, and camera CMOS (sensor) parameter information recorded simultaneously during image acquisition. The specific formula is as follows; Among them, l is the actual length of the crack, k is the length value represented by each pixel in the camera, p is the number of pixels in the crack skeleton, f is the focal length of the camera, d is the shooting distance, and n is the pixel size in the CMOS.
Citation Information
Patent Citations
Bridge crack detection method based on dynamic threshold value
CN113592861A