Road surface crack detection and identification method based on digital image
By performing grayscale processing, noise reduction filtering and joint enhancement processing on the pavement crack image, combined with the minimum area threshold method and adaptive edge detection, the accurate and rapid identification of pavement cracks in complex scenarios is achieved, and the existing technology is solved The problems of low efficiency and high misjudgment rate improve detection efficiency and feature extraction effect.
Patent Information
- Application Number
- CN202411017620.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-15
AI Technical Summary
The existing technology is not efficient and prone to misjudgment in road crack detection. Especially in complex scenarios, traditional digital image processing algorithms are complex and slow to run. Deep learning methods require a large number of training sets, making it difficult to achieve accurate and fast recognition and features. extract.
By performing image graying and noise reduction filtering on the road surface crack images, combining airspace and frequency domain enhancement processing, combining minimum area threshold method and adaptive edge detection, the fracture images are extracted and segmented, and connected domain analysis and morphological processing are used for Optimization and feature extraction, elimination of noise and pseudo-cracks.
It realizes accurate and rapid identification of road surface cracks without relying on a large number of training sets, and performs effective feature extraction, reducing the misjudgment rate, improving detection efficiency, and not being disturbed by road surface texture particles.
Smart Images

Figure CN118968087A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of digital image processing, and in particular to a road surface crack detection and identification method based on digital images. Background Art
[0002] Cracks are common defects on the surface of various physical structures. Repairing cracks is an important guarantee to prevent the expansion of danger and maintain the safety of infrastructure. Concrete cracks are a common problem in construction projects. They not only affect the normal use of the structure, but also cause corrosion of steel bars in concrete and reduce the bearing capacity of the building, and also reduce the durability of the concrete structure. For the detection of concrete cracks, existing methods mainly rely on manual detection or computer vision technology. Among them, manual detection is suitable for crack detection problems in different scenarios, but the detection efficiency is not high; computer vision technology can efficiently detect cracks in simple scenes, but it is easy to make misjudgments when detecting in complex scenes. In recent years, in the field of road pavement crack recognition based on computer vision, the research direction is roughly divided into two parts: one is based on digital image processing, mainly by manual discrimination of features, using many feature rules such as frequency, edge, HOG, grayscale, texture and entropy, and designing some feature recognition conditions to limit the recognition; the other is based on deep learning, establishing a convolutional network and using the network to automatically find the features of the data, so that the network can continuously adjust itself according to certain rules to achieve input data output equal to or close to the label. Traditional digital image processing algorithms are restricted by many factors, and the algorithm implementation is complex and the actual operation is too long. Although deep learning detection and recognition of cracks is fast, it requires a large number of training sets. Therefore, it is urgent to propose a pavement crack detection and recognition method based on digital images to solve the technical problem of how to accurately and quickly identify pavement cracks and extract features. Summary of the invention
[0003] The main purpose of the present invention is to propose a pavement crack detection and identification method based on digital images, aiming to solve the technical problem of how to accurately and quickly identify pavement cracks and perform feature extraction.
[0004] To achieve the above object, the present invention provides a method for detecting and identifying pavement cracks based on digital images, wherein the method for detecting and identifying pavement cracks based on digital images comprises the following steps:
[0005] S1, graying the road crack image and performing noise reduction filtering;
[0006] S2, performing enhancement processing on the road surface crack image in the combined spatial domain and frequency domain to obtain a first image;
[0007] S3. Based on the minimum area threshold method and adaptive edge detection, the crack image is extracted and segmented from the first image to obtain a second image.
[0008] In one of the preferred solutions, step S1 is specifically:
[0009] Expand the grayscale image of the pavement crack image;
[0010] A filtering window is constructed, and the pavement crack image is subjected to median filtering based on the median filtering method. The standard deviation of each filtering window is calculated, and the filtering result of the filtering window with the smallest standard deviation is used as the filtering result of the pavement crack image.
[0011] In one of the preferred solutions, the standard deviation of each filter window is:
[0012]
[0013] Among them, E(e 2 ) is the standard deviation of each filter window, f(x,y) is the input pavement crack image, This is the pavement crack image after median filtering.
[0014] In one of the preferred solutions, step S2 is specifically:
[0015] S21, analyzing the frequency spectrum in the pavement crack image, obtaining the frequency spectrum characteristics corresponding to the pavement crack, and performing frequency domain enhancement processing on the high frequency band through a high frequency filter;
[0016] S22, using an adaptive grayscale stretching method to calculate the average grayscale value of the pavement crack image after frequency domain enhancement, and setting segmentation points to perform compression and grayscale stretching processing on the pavement crack image.
[0017] One of the preferred solutions is that the high frequency band is enhanced in the frequency domain by using a high frequency filter, specifically:
[0018] f'(x,y)=F -1 [k1F(u,v)+k2H HP (u,v)F(u,v)]
[0019] Among them, F -1 is the inverse Fourier transform, k1 is the adjustment coefficient of the DC component, F(u,v) is the frequency of the pavement crack image obtained by two-dimensional discrete Fourier transform, k2 is the adjustment coefficient of the high-frequency component, H HP (u,v) is the system function, and f'(x,y) is the result of frequency domain enhancement of the high frequency band through a high frequency filter.
[0020] In one preferred solution, step S22 is specifically:
[0021]
[0022] Among them, g(x,y) is the image grayscale value of the first image after joint enhancement, f”(x,y) is the grayscale value of the pavement crack image after frequency domain enhancement, a1 and a2 are grayscale value segmentation points, and b1 and b2 are adaptive parameters.
[0023] In one of the preferred solutions, step S3 is specifically:
[0024] S31, extracting edge features of the first image using adaptive edge detection to obtain an image g1(x, y) containing crack edge features;
[0025] S32, obtaining the optimal image segmentation threshold according to the minimum area threshold segmentation method, and performing segmentation processing on the first image after the enhancement processing to obtain the image g2(x, y);
[0026] S33, superimpose the image g1(x, y) and the image g2(x, y) to obtain a second image.
[0027] In one preferred solution, step S31 is specifically as follows:
[0028] The first image is smoothed and filtered to obtain image g g (x,y);
[0029] Calculate image g g (x, y) The partial derivatives H(i, j) in the horizontal direction and J(i, j) in the vertical direction of all pixels;
[0030] According to the image g g (x, y) The partial derivatives H(i, j) in the horizontal direction and J(i, j) in the vertical direction of all pixels are used to calculate the image g g The gradient value M(i,j) and gradient direction θ(i,j) of (x,y);
[0031] The first image is subjected to non-maximum suppression processing to obtain candidate edge points, that is, to obtain an image g1(x, y) containing crack edge features.
[0032] One of the preferred solutions, step S32 obtains the optimal image segmentation threshold according to the minimum area threshold segmentation method, specifically: divide the first image into multiple sub-blocks, calculate the optimal segmentation threshold of each sub-block, and select the smallest threshold as the optimal segmentation threshold of the first image.
[0033] One of the preferred solutions, after step S3, further includes:
[0034] S4, optimizing the second image and extracting crack features according to connected domain analysis and morphological processing, and displaying the image graphically; specifically:
[0035] Mark the connected domain of the second image and remove the noise and pseudo crack areas;
[0036] The structural element is constructed to perform morphological closing operation on the second image, remove secondary noise and pseudo-crack areas, complete crack type identification and parameter calculation, and display the image.
[0037] In the above technical solution of the present invention, the road crack detection and identification method based on digital images includes the following steps: graying the road crack image and performing noise reduction filtering; enhancing the road crack image in the joint space domain and frequency domain to obtain a first image; extracting and segmenting the crack image of the first image based on the minimum area threshold method and adaptive edge detection to obtain a second image. The present invention solves the technical problem of how to accurately and quickly identify road cracks and extract features without relying on a large amount of training set data and taking into account the interference of road texture particles.
[0038] In the present invention, the acquired pavement crack image is converted into a grayscale image and then subjected to noise reduction filtering through a median filter. A variety of filtering windows are constructed according to the characteristics of the cracks, and the best template is selected to retain the crack information. After the noise reduction filtering, the image features in the spatial domain and the frequency domain are analyzed, and a joint enhancement processing combining an adaptive grayscale stretching method and a high-pass filter is used to enhance the image.
[0039] In the present invention, adaptive edge detection is used to realize automatic selection of high and low thresholds in edge detection, draw edge lines, and perform image segmentation processing through the minimum threshold method, thereby obtaining a complete crack binary image. In crack feature extraction, the features of the segmented binary image, that is, the features of the second image, are subjected to noise and pseudo-crack elimination, connected domain analysis is performed to realize filtering processing, and the connection of broken cracks is realized through morphological closing operations, and finally complete crack information is proposed. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0041] Figure 1A schematic diagram of a pavement crack detection and identification method based on digital images according to an embodiment of the present invention;
[0042] Figure 2 Different filter windows constructed for embodiments of the present invention;
[0043] Figure 3 This is a GUI interface diagram after the embodiment of the present invention uses a transverse asphalt pavement crack image as an input image for detection and recognition;
[0044] Figure 4 This is a GUI interface diagram after the longitudinal pavement crack image is used as an input image for detection and recognition in an embodiment of the present invention;
[0045] Figure 5 This is a diagram of the GUI interface after the mesh road crack image is used as an input image for detection and recognition according to an embodiment of the present invention.
[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with the implementation methods and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0048] In addition, in the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features.
[0049] Furthermore, the technical solutions between the various embodiments of the present invention may be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in the field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0050] See also Figure 1-Figure 5 According to one aspect of the present invention, the present invention provides a method for detecting and identifying pavement cracks based on digital images, wherein the method for detecting and identifying pavement cracks based on digital images comprises the following steps:
[0051] S1, graying the road crack image and performing noise reduction filtering;
[0052] S2, performing enhancement processing on the road surface crack image in the combined spatial domain and frequency domain to obtain a first image;
[0053] S3. Based on the minimum area threshold method and adaptive edge detection, the crack image is extracted and segmented from the first image to obtain a second image.
[0054] Specifically, in this embodiment, the step S1 is specifically:
[0055] Expanding the grayscale image of the pavement crack image; wherein the size of the expanded boundary is selected according to the size of the filter window, and the grayscale value of the expanded image boundary is symmetrical with the original boundary grayscale value;
[0056] A filtering window is constructed, and the pavement crack image is subjected to median filtering based on the median filtering method. The standard deviation of each filtering window is calculated, and the filtering result of the filtering window with the smallest standard deviation is used as the filtering result of the pavement crack image.
[0057] Specifically, in this embodiment, since the cracks are directional but the directions are uncertain, the traditional rectangular median filter window cannot be applied to the filtering processing of various types of cracks, and it is easy to cause blurring of edge information; therefore, the filter window needs to be further improved; since the directions of the cracks are not the same, multiple types of filter windows are designed, wherein the filter windows are centrally symmetric to retain edge parts in any direction. In the present invention, five types of filter windows are constructed, and different windows are represented by different colors, including four unidirectional filter windows and a rectangular window, to ensure that the edge parts can still be well retained when cracks exist in multiple directions in an image; the above five filter windows are used to move on the image to obtain a set of pixel points in the filter window of each pixel point, obtain the filtering results of these filter windows and calculate the standard deviation.
[0058] Specifically, in this embodiment, the filtering window with the smallest standard deviation is adopted as the final filtering window.
[0059] Specifically, in this embodiment, the standard deviation of each filtering window is:
[0060]
[0061] Among them, E(e 2 ) is the standard deviation of each filter window, f(x,y) is the input pavement crack image, This is the pavement crack image after median filtering.
[0062] Specifically, in this embodiment, the step S2 is specifically:
[0063] S21, analyzing the frequency spectrum in the pavement crack image, obtaining the frequency spectrum characteristics corresponding to the pavement crack, and performing frequency domain enhancement processing on the high frequency band through a high frequency filter;
[0064] S22. Adopting the adaptive grayscale stretching method to calculate the average grayscale value of the pavement crack image after frequency domain enhancement, and setting segmentation points, the pavement crack image is compressed and grayscale stretched, specifically, the brighter and darker areas are compressed, and the middle area is grayscale stretched to expand the grayscale dynamic range.
[0065] Specifically, in this embodiment, the frequency domain enhancement processing of the high frequency band by using the high frequency filter is specifically as follows:
[0066] f'(x,y)=F -1 [k1F(u,v)+k2H HP (u,v)F(u,v)]
[0067] Among them, F -1 is the inverse Fourier transform, k1 is the adjustment coefficient of the DC component, F(u,v) is the frequency of the pavement crack image obtained by two-dimensional discrete Fourier transform, k2 is the adjustment coefficient of the high-frequency component, H HP (u,v) is the system function, and f'(x,y) is the result of frequency domain enhancement of the high frequency band through a high frequency filter.
[0068] Specifically, in this embodiment, the step S21 is specifically:
[0069] The preprocessed image is used as a two-dimensional discrete Fourier transform to obtain F(u,v). The high-frequency filter first retains the input digital image spectrum F(u,v). The DC component can be controlled by adjusting the coefficient k1. Then the spectrum F(u,v) passes through the high-frequency filter, and its system function is H HP (u, v), filter out the low-frequency part, and adjust the coefficient k2 to control the enhancement amplitude of the high-frequency component; finally, superimpose the two to achieve the goal of retaining the DC component while enhancing the high-frequency component, retaining the image background grayscale value in the spatial domain, and realizing the crack edge features to achieve the image enhancement effect.
[0070] Specifically, in this embodiment, the step S22 is specifically:
[0071]
[0072] Among them, g(x,y) is the image gray value of the first image after joint enhancement, f”(x,y) is the gray value of the pavement crack image after frequency domain enhancement, a1 and a2 are gray value segmentation points, the pixel gray value of the image is in [0,255], and the gray image is divided into three segments [0,a1], [a1,a2], and [a2,255] by a1 and a2. b1 and b2 are adaptive parameters. Calculate the average gray value Q of the pavement crack image, set it to a2, a1 takes 1 / 3 of a2, b1 takes 1 / 3 of a1, and b2 takes 3 / 2 of a2; then the gray value of the first image after joint enhancement is:
[0073]
[0074] Specifically, in this embodiment, step S3 is as follows:
[0075] S31, using adaptive Canny edge detection to extract edge features of the first image, to obtain an image g1(x, y) containing crack edge features;
[0076] S32, obtaining the optimal image segmentation threshold according to the minimum area threshold segmentation method, and performing segmentation processing on the first image after the enhancement processing to obtain the image g2(x, y);
[0077] S33, superimpose the image g1(x, y) and the image g2(x, y) to obtain a second image.
[0078] Specifically, in this embodiment, since the white part of the binary image g2(x, y) obtained by the minimum area threshold segmentation method is the background and the black part is the crack, and the white part of the image g1(x, y) obtained by edge detection is the edge of the crack, it is necessary to first invert the grayscale value of the binary image g2(x, y), and then traverse the binary image g2(x, y), classify the same pixels marked as crack edges as g1(x, y) as cracks, and finally obtain the image after segmentation processing.
[0079] Specifically, in this embodiment, the step S31 is specifically:
[0080] The first image is smoothed and filtered to obtain image g g (x, y); Specifically, the first image is smoothed by a two-dimensional Gaussian filter composed of horizontal and vertical shifted Gaussian filters to obtain an image g g (x,y);
[0081] Compute the image g through a 2×2 neighborhood g (x, y) The partial derivatives H(i, j) in the horizontal direction and J(i, j) in the vertical direction of all pixels;
[0082] The partial derivative H(i,j) in the horizontal direction is:
[0083] H(i,j)=[g(i,j+1)-g(i,j)+g(i+1,j+1)-g(i+1,j)] / 2
[0084] The partial derivative J(i,j) in the vertical direction is:
[0085] J(i,j)=[g(i,j)-g(i+1,j)+g(i,j+1)-g(i+1,j+1)] / 2
[0086] According to the image g g (x, y) The partial derivatives H(i, j) in the horizontal direction and J(i, j) in the vertical direction of all pixels are used to calculate the image g g The gradient value M(i,j) and gradient direction θ(i,j) of (x,y);
[0087] The gradient value M(i,j) is:
[0088]
[0089] The gradient direction θ(i,j) is:
[0090]
[0091] After calculating the image gradient value and gradient direction, it is necessary to traverse the image g g For each pixel (x, y), if the pixel neighborhood around the point (x, y) has the maximum gradient value in the same direction as the point, then the point is removed. If the point has the maximum gradient value, then the point is classified as a candidate edge point and non-maximum suppression is performed;
[0092] The first image is subjected to non-maximum suppression processing to obtain candidate edge points, that is, to obtain an image g1(x, y) containing crack edge features; the present invention uses a high-low dual threshold method to detect candidate edge points, and pixel points with gradient values higher than the high threshold are determined as edge points, and gradient values lower than the low threshold are determined as non-edge points. Pixel points with gradient values between the high and low thresholds are determined as weak edge points. If there are edge points around, the edge points are determined to be connected to the edge points, and if there are no edge points, they are determined to be non-edge points; specifically:
[0093] Set high and low thresholds;
[0094] The candidate edge points are automatically divided into three parts: B1, B2, and B3 using the gradient histogram and inter-class variance. The optimal segmentation threshold method for the candidate edge pixels is adaptively selected, where t1 and t2 are segmentation thresholds, t2>t1, the gradient amplitude is L, and it is generally divided into 64 gradients. The pixel gradients contained in the B1 part are (0, 1, ... t1), and the pixels in the B1 part are non-edge points. The pixel gradient range contained in the B2 part is (t1+1, t1+2, ... t2), and the pixels in the B2 part are edge points and need further judgment. The pixel gradient range contained in the B3 part is (t2+1, t2+2, ..., L), and the pixels in the B3 part are edge points.
[0095] Set the number of pixels with gradient level i in the image to n i , accounting for the proportion of the total number of pixels is p i , then the average gradient levels E(B1), E(B2), E(B3) of the three parts B1, B2, and B3 and the average gradient level E of all pixels are:
[0096]
[0097] The proportions of pixels in parts B1, B2, and B3 to the total pixels are p(B1), p(B2), and p(B2), respectively:
[0098]
[0099] According to the average gradient level and pixel percentage of B1, B2 and B3, the inter-class variance is calculated, which is:
[0100] σ 2 =p(B1)[E(B1)-E] 2 +p(B2)[E(B2)-E] 2 +p(B3)[E(B3)-E] 2
[0101] Among them, σ 2 is the between-class variance;
[0102] After non-maximum linear processing, the gradient histogram can be used to calculate the proportion of each gradient level and the corresponding pixel points to the total pixel points; the optimal segmentation thresholds t1 and t2 can be calculated based on the Lei Jian variance, so that t1 can be traversed within the gradient level range of 0-L, and t2 can be traversed within t1+1-L, so that the inter-class variance is maximized. The corresponding t1 and t2 at the maximum are the optimal segmentation thresholds for dividing into three parts, B1, B2, and B3.
[0103] Specifically, in this embodiment, the step S32 obtains the optimal image segmentation threshold according to the minimum area threshold segmentation method, specifically: the first image is divided into multiple sub-blocks, the optimal segmentation threshold of each sub-block is calculated using OTSU, and the smallest threshold is selected as the optimal segmentation threshold of the first image;
[0104] For each word block, let the total number of pixels in the area be N, and the grayscale value be between 0 and 255, where the total number of pixels with grayscale value equal to i is recorded as n i , which occupies the sub-block so the pixel ratio is p i , p i for:
[0105]
[0106] Assume that the sub-block segmentation threshold is T, and the image is divided into two parts, S0 and S1, whose grayscale values are in [0, T] and [T+1, 255] respectively. The probability that the grayscale value of the pixel in the sub-block is in S0 and S1 is P0 and P1 respectively:
[0107]
[0108] According to the probability that the grayscale value of the pixel in the block is located in the S0 and S1 parts, the average grayscale values of the pixels in the S0 and S1 parts of the sub-block are calculated as u0 and u1 respectively:
[0109]
[0110] According to the probability that the grayscale value of the pixel in the block is located in the S0 and S1 parts, and the average grayscale value of the pixels in the S0 and S1 parts of the sub-block, the average grayscale value u of the sub-block is calculated as:
[0111]
[0112] According to the average gray value of the sub-block and the probability that the gray value of the pixel in the sub-block is located in S0 and S1, the inter-class variance σ2 is calculated. for:
[0113]
[0114] In order to select the best segmentation threshold, it is necessary to traverse the threshold T in [0,255] and calculate the average gray value, and select the threshold that maximizes the inter-class variance σ2 as the best threshold; finally, count the best thresholds of all sub-blocks, and select the smallest threshold as the global threshold to complete the crack segmentation process.
[0115] Specifically, in this embodiment, after step S3, the following steps are further included:
[0116] S4, optimizing the second image and extracting crack features according to connected domain analysis and morphological processing, and displaying the image graphically; specifically:
[0117] Mark the connected domain of the second image and remove the noise and pseudo crack areas;
[0118] The structural element is constructed to perform morphological closing operation on the second image, remove secondary noise and pseudo-crack areas, complete crack type identification and parameter calculation, and display the image.
[0119] Specifically, in this embodiment, 8-connectivity is used to mark the connected domains of the image; the area of the crack connected domain is large and has a certain length. By analyzing the total number of pixels and rectangularity of each connected domain, some noise and pseudo-crack area connected domains are removed; secondly, the shape of the non-crack area is irregular and has nonlinear characteristics. By analyzing the ratio of the crack area to the area of its minimum circumscribed rectangle, the non-crack part can be further removed.
[0120] Specifically, in this embodiment, the morphological closing operation is:
[0121]
[0122] The closing operation is to first use the structural element S to expand the image X, and then perform corrosion processing; for the smaller part of the image, the closing operation can remove it and fill the small holes in the closed area. At the same time, it can smooth the irregular boundary area in the larger area, retain the original shape, and remove burrs; a circular structural element with a radius of 5 is used for morphological closing operation processing; for cracks with a large fracture distance that cannot be connected, and there are still some pseudo-crack features in the image, the circular structural element with a radius of R=10 is used to expand the crack feature with the largest area through the morphological expansion processing method, and the connected domains touched after the expansion are classified as cracks. Continue to expand until there is no new connected domain after the expansion, retain the features that have been identified as cracks, and remove the remaining connected domains.
[0123] Specifically, in this embodiment, matlab is used to build a pavement crack detection system based on a pavement crack detection and identification method based on digital images, and the control display is performed through a GUI interface; see Figure 3 It is the result interface of asphalt pavement transverse crack detection and recognition. The GUI interface is divided into three parts: control panel, parameter display, and graphic display area. The asphalt pavement crack image contains many pseudo-crack areas caused by noise and pavement texture particles. The method provided by the present invention can effectively remove the interference of noise and pavement texture particles on the detection and recognition effect, and obtain a relatively complete crack feature, which has certain advantages. Figure 4This is the interface of the crack detection and recognition results of the mesh pavement. The final detection and recognition results retain multiple crack fracture areas and connect some fractured cracks, effectively retaining the integrity of the crack characteristics; see Figure 5 This is the result interface of cement longitudinal pavement crack detection and recognition. The present invention can still correctly detect the crack features in the recognition image and complete the connection of the cracks and the filling of the internal holes. In addition, it can be found that the pavement crack detection and recognition method based on digital images provided by the present invention does not rely on a large number of training sets, thus further reflecting the practicality and broad application prospects of the present invention.
[0124] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. All equivalent structural changes made using the contents of the present invention's specification and drawings, or directly / indirectly applied in other related technical fields, are included in the patent protection scope of the present invention.
Claims
1. A method for detecting and identifying pavement cracks based on digital images, characterized in that: The following steps are involved: S1, graying the road crack image and performing noise reduction filtering; S2, performing enhancement processing on the road surface crack image in the combined spatial domain and frequency domain to obtain a first image; S3. Based on the minimum area threshold method and adaptive edge detection, the crack image is extracted and segmented from the first image to obtain a second image.
2. A method for detecting and identifying pavement cracks based on digital images according to claim 1, characterized in that: The step S1 is specifically: Expand the grayscale image of the pavement crack image; A filtering window is constructed, and the pavement crack image is subjected to median filtering based on the median filtering method. The standard deviation of each filtering window is calculated, and the filtering result of the filtering window with the smallest standard deviation is used as the filtering result of the pavement crack image.
3. The method for detecting and identifying pavement cracks based on digital images according to claim 2 is characterized in that: The standard deviation of each filter window is: Among them, E(e 2 ) is the standard deviation of each filter window, f(x,y) is the input pavement crack image, This is the pavement crack image after median filtering.
4. A method for detecting and identifying pavement cracks based on digital images according to any one of claims 1 to 3, characterized in that: The step S2 is specifically: S21, analyzing the frequency spectrum in the pavement crack image, obtaining the frequency spectrum characteristics corresponding to the pavement crack, and performing frequency domain enhancement processing on the high frequency band through a high frequency filter; S22, using an adaptive grayscale stretching method to calculate the average grayscale value of the pavement crack image after frequency domain enhancement, and setting segmentation points to perform compression and grayscale stretching processing on the pavement crack image.
5. The method for detecting and identifying pavement cracks based on digital images according to claim 4 is characterized in that: The frequency domain enhancement processing of the high frequency band by using the high frequency filter is specifically as follows: f'(x,y)=F -1 [k1F(u,v)+k2H HP (u,v)F(u,v)] Among them, F -1 is the inverse Fourier transform, k1 is the adjustment coefficient of the DC component, F(u,v) is the frequency of the pavement crack image obtained by two-dimensional discrete Fourier transform, k2 is the adjustment coefficient of the high-frequency component, H HP (u,v) is the system function, and f'(x,y) is the result of frequency domain enhancement of the high frequency band through a high frequency filter.
6. The method for detecting and identifying pavement cracks based on digital images according to claim 4, characterized in that: The step S22 is specifically as follows: Among them, g(x,y) is the image grayscale value of the first image after joint enhancement, f”(x,y) is the grayscale value of the pavement crack image after frequency domain enhancement, a1 and a2 are grayscale value segmentation points, and b1 and b2 are adaptive parameters.
7. A method for detecting and identifying pavement cracks based on digital images according to any one of claims 1 to 3, characterized in that: The step S3 is specifically: S31, extracting edge features of the first image using adaptive edge detection to obtain an image g1(x, y) containing crack edge features; S32, obtaining the optimal image segmentation threshold according to the minimum area threshold segmentation method, and performing segmentation processing on the first image after the enhancement processing to obtain the image g2(x, y); S33, superimpose the image g1(x, y) and the image g2(x, y) to obtain a second image.
8. The method for detecting and identifying pavement cracks based on digital images according to claim 7 is characterized in that: The step S31 is specifically as follows: The first image is smoothed and filtered to obtain image g g (x,y); Calculate image g g (x, y) The partial derivatives H(i, j) in the horizontal direction and J(i, j) in the vertical direction of all pixels; According to the image g g (x, y) The partial derivatives H(i, j) in the horizontal direction and J(i, j) in the vertical direction of all pixels are used to calculate the image g g The gradient value M(i,j) and gradient direction θ(i,j) of (x,y); The first image is subjected to non-maximum suppression processing to obtain candidate edge points, that is, to obtain an image g1(x, y) containing crack edge features.
9. The method for detecting and identifying pavement cracks based on digital images according to claim 7, characterized in that: The step S32 obtains the optimal image segmentation threshold according to the minimum area threshold segmentation method, specifically: the first image is divided into multiple sub-blocks, the optimal segmentation threshold of each sub-block is calculated, and the smallest threshold is selected as the optimal segmentation threshold of the first image.
10. A method for detecting and identifying pavement cracks based on digital images according to any one of claims 1 to 3, characterized in that: After step S3, the method further includes: S4, optimizing the second image and extracting crack features according to connected domain analysis and morphological processing, and displaying the image graphically; specifically: Mark the connected domain of the second image and remove the noise and pseudo crack areas; The structural element is constructed to perform morphological closing operation on the second image, remove secondary noise and pseudo-crack areas, complete crack type identification and parameter calculation, and display the image.
Citation Information
Cited By
Road surface disease high-precision inspection device and method based on unmanned aerial vehicle
CN121599958A
An unmanned aerial vehicle-based high-precision road disease inspection device and method
CN121599958B
