A method for classifying and identifying pavement cracks under shadow interference

By combining brightness equalization, K-means clustering, and tensor voting algorithms with the RANSAC algorithm, the problem of accurate extraction and classification of road surface cracks under shadow interference was solved, achieving high-precision crack identification and classification.

CN116206156BActive Publication Date: 2025-12-05CHANGAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310209580.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-07
Publication Date
2025-12-05
Estimated Expiration
2043-03-07

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately extract and classify pavement cracks under shadow interference, and conventional methods cannot effectively eliminate shadow interference and may weaken crack characteristics.

Method used

The shaded region is segmented using brightness equalization and K-means clustering algorithms. Crack features are enhanced by combining grouped brightness compensation and tensor voting algorithms. Finally, crack classification and identification are performed using the RANSAC algorithm.

Benefits of technology

It effectively eliminates shadow interference, improves the accuracy and precision of road surface crack identification, and can quickly and accurately classify different types of cracks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116206156B_ABST
    Figure CN116206156B_ABST
Patent Text Reader

Abstract

The application discloses a kind of shadow interference under pavement crack classification identification method, comprising the following steps: S1: crack is extracted using threshold segmentation method;S2: eliminate shadow by K-means clustering algorithm and grouping brightness compensation algorithm;S3: crack is extracted using threshold segmentation method again, and intersection with the crack extracted in S1 is obtained, to obtain crack seed map;S4: crack feature is enhanced using tensor voting algorithm, and false crack is inhibited;S5: linear fitting is carried out to crack pixel using RANSAC algorithm fitting, and according to the characteristics of different kinds of cracks, crack classification identification is carried out in combination with fitting straight line;The method of the application can accurately and completely extract the pavement crack under shadow interference, and realize the classification identification of pavement crack.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to road surface recognition technology, specifically to a method for classifying and recognizing road surface cracks under shadow interference. Background Technology

[0002] Currently, pavement cracks are a common early-stage pavement defect. If not addressed promptly, they can develop into more serious problems such as pavement subsidence. Therefore, pavement crack identification technology is of great significance for highway maintenance.

[0003] Currently, digital image processing technology is widely used for the detection, extraction, and classification of road surface cracks. For cracks on clean roads with a simple background, threshold segmentation and edge detection algorithms can yield relatively complete and clear binary crack images. However, in reality, due to interference from road material textures, the road background contains a large amount of noise, and under sunlight, there are shadows on the road surface. These interferences pose significant challenges to the accurate extraction of cracks.

[0004] Eliminating shadow interference requires correctly identifying the shadow area. Because the projected object is far from the road surface, its shadow on the road may be lighter, forming a semi-shadow. Conventional thresholding methods may mistake this semi-shadow for the road background. Common shadow removal methods include extracting shadow contours based on mathematical operators, but these methods are often inaccurate, resulting in unnatural image transitions after shadow removal. Brightness compensation methods offer better shadow compensation, but they also compensate for the brightness of some crack areas, weakening crack features and hindering crack extraction.

[0005] In summary, due to the presence of road surface shadows, conventional crack extraction methods are difficult to accurately and completely extract road surface cracks. Therefore, a method is needed that can eliminate shadow interference while maximizing the protection of crack features. Summary of the Invention

[0006] The main objective of this invention is to provide a method for classifying and identifying road surface cracks under shadow interference, thereby reducing the interference of road surface shadows on the extraction and identification of road surface cracks and improving the accuracy of crack identification.

[0007] The technical solution adopted in this invention is: a method for classifying and identifying road surface cracks under shadow interference, comprising:

[0008] S1: Crack coarse extraction step: Convert the image into an 8-bit unsigned integer single-channel grayscale image, perform brightness equalization on the grayscale image to obtain an equalized image; calculate the mean μ1 and standard deviation σ1 of the brightness of all pixels in the equalized image; extract the pixels with brightness less than μ1-σ1 (if μ1-σ1≤0, then take 20) as the result of crack coarse extraction.

[0009] S2: Eliminate shadows using a brightness compensation algorithm:

[0010] S21: The K-means clustering algorithm is used to obtain a binary segmented image of the road background and shadow area after equalization of the grayscale image;

[0011] S22: Perform grouped brightness compensation;

[0012] S3: For the brightness-compensated image, perform the brightness equalization operation from S1, calculate the mean μ2 and standard deviation σ2 of the brightness of all pixels in the image; extract pixels with brightness less than...

[0013] The pixels with a value of μ2-3σ2 (or 10 if μ2-3σ2≤0) are used as the result of further crack extraction; the intersection of this intersection with the coarsely extracted crack obtained in S1 is used to obtain a crack seed map, in which the pixels are crack seed points.

[0014] S4: Employ the tensor voting algorithm to enhance cracks in the crack seed graph and suppress false cracks;

[0015] S5: The RANSAC algorithm is used to fit the crack curve, and the cracks are classified and identified based on the linear characteristics of different types of pavement cracks.

[0016] Furthermore, the brightness equalization operation in step S1 includes:

[0017] Let the pixel brightness values ​​of the original image range from [p1, p2]. After brightness equalization, the brightness of any pixel is p1. i Become

[0018] Furthermore, the K-means clustering algorithm in step S21 includes:

[0019] The road image is converted into a 32-bit floating-point integer single-channel image. The average value μ and standard deviation σ of the overall pixel grayscale values ​​of the road image are calculated. The road image is divided into three cluster regions: road background, semi-shade, and shadow. The initial values ​​of the iteration center points of the three cluster regions are set to μ+2σ (road background region, set to 255 if the value is greater than 255), μ-σ (semi-shade region, set to 100 if the value is less than 0), and μ-3σ (shadow region, set to 0 if the value is less than 0), respectively. An iterative algorithm is then performed.

[0020] Based on the current cluster center, calculate the distance (absolute value of the difference between the brightness values) between the brightness value of each pixel and the brightness values ​​of the three cluster centers, and assign the pixel to the nearest cluster.

[0021] Calculate the average brightness value of all pixels in each current cluster, and use it as the cluster center for the next iteration;

[0022] Calculate the distance between the two cluster centers. If the distance is less than the given iteration precision, the iteration ends; otherwise, repeat the above steps.

[0023] After the iteration is completed, the gray value of the road background area is set to 255, and the gray value of the semi-shaded and shadow areas (hereinafter collectively referred to as shadow areas) is set to 0, so as to obtain a binarized road shadow definition image.

[0024] Furthermore, the grouped brightness compensation algorithm in step S22 includes:

[0025] Record the coordinates of all pixels in the shadow area of ​​the shadow delineation map, traverse the corresponding positions in the original image, group them according to brightness, group them into groups based on brightness value, and record the coordinates of the pixels in the group;

[0026] Calculate the average μ value of all pixel brightness values ​​in the road surface background area. n ;

[0027] Calculate the average μ value of the brightness of all pixels in the shadow area. s ;

[0028] For the road surface background area, its pixel brightness value remains unchanged; for the first 10 groups of shadow areas, its pixel brightness value also remains unchanged; for other groups of shadow areas, its pixel brightness value increases by μ. n -μ s .

[0029] Furthermore, the tensor voting algorithm in step S4 includes:

[0030] S41: Constructing rod tensor fields in different directions:

[0031] Divide 2π into 180 equal parts, denoted as .

[0032] The size of the tensor field is determined by σ, and the calculation formula is as follows: And round up to an odd number; for each θ i Perform the following steps:

[0033] Construct a unit vector v i =[cos(θ) i ), sin(θ) i )];

[0034] Build size is Given a matrix X, where the elements in the j-th column are all... Build size is The matrix Y, whose i-th row elements are all By mapping the elements of X and Y one-to-one to obtain a grid, and then rotating it by θ... i The angle is used to obtain new X and Y values;

[0035] Calculate the arctangent function values ​​of corresponding elements in X and Y, denoted as α, and construct a standard bar tensor in the form of a second-order matrix:

[0036]

[0037] The degeneracy function is calculated using the following formula:

[0038]

[0039] Where s is the arc length of the circle between the two points, and the calculation formula is: Where l is the Euler distance between the two points; k is the curvature of the arc, calculated using the following formula: σ represents the voting scale; c is a parameter controlling the degradation rate, determined by σ, and calculated using the following formula:

[0040] Multiplying the standard rod tensor by the corresponding term of the degenerate function yields a rod tensor field with a certain propagation range;

[0041] S42: Constructing the spherical tensor field:

[0042] The spherical tensor field is obtained by superimposing the field strengths of the 180 bar tensor fields calculated in step S41 and then taking the average value.

[0043] S43: Tensor initialization of the crack seed graph:

[0044] Assign the tensor at the crack seed point to a sphere tensor without direction information as the initial sphere tensor;

[0045] S44: Perform sparse sphere tensor voting:

[0046] Iterate through all crack seed points and superimpose the spherical tensor field obtained in step S42 onto all its initial spherical tensors;

[0047] Set the second-order matrix form of the tensor at non-seed points in the crack seed graph to [0, 0; 0, 0];

[0048] S45: Perform tensor decomposition:

[0049] For any tensor S in the algorithm, after calculating its eigenvalues ​​λ1, λ2 and their corresponding eigenvectors e1, e2, it can be decomposed into:

[0050]

[0051] Calculate the eigenvalues ​​λ1, λ2 of all tensors in the tensor field after voting for the sparse sphere tensor in step S44, and their corresponding eigenvectors e1, e2;

[0052] Set λ2 to 0, and recalculate the tensor based on λ1, λ2 = 0, e1, e2. This step transforms the ball tensor into a rod tensor with directional information, whose direction vector is e1.

[0053] S46: Perform bar tensor voting:

[0054] Refer to step S41 to generate the rod tensor field corresponding to the e1 direction, and superimpose it onto all the tensors obtained in step S45.

[0055] The eigenvalues ​​of all tensors in the calculated tensor field are used to retain only tensors with λ1-λ2≥0.3, resulting in a linear significance plot.

[0056] S47: Generate crack map:

[0057] Based on the eigenvalues ​​λ1, λ2 and eigenvectors e1, e2 of the tensor retained in step S46, the tensor is recalculated, and the eigenvector e1 of the new tensor is calculated as the direction vector of the remaining crack seed points.

[0058] Using each remaining crack seed point as the center, construct a fan-shaped region with a radius of a certain pixel length and a central angle range offset from the direction vector of the seed point by a small angle; connect each seed point with the nearest point in the fan-shaped region it forms with a straight line to obtain the final crack map.

[0059] Furthermore, the method for calculating the tensor eigenvalues ​​and eigenvectors includes:

[0060] The four-dimensional tensor field of size h×w×2×2 is expanded into h×w second-order symmetric non-negative definite matrices along the third and fourth dimensions. Each second-order matrix represents the second-order matrix form of the tensor at the corresponding crack seed point.

[0061] Let the second-order matrix be [a, c; b, c], and its eigenvalues ​​can be calculated using the following formula:

[0062]

[0063]

[0064] remember Where arctan2() is the arctangent function in the fourth quadrant.

[0065] Its return value range is [-π, π], then the unit eigenvector e1 corresponding to λ1 is [cos(θ), sin(θ)]. TThe unit eigenvector corresponding to λ² is e² = [-sin(θ), cos(θ)]. T ;

[0066] Based on the known eigenvalues ​​λ1, λ2 and the corresponding eigenvector e1 = [e 11 e 12 ]、e2=[e 21 e 22 Methods for calculating tensors include:

[0067] Let the second-order matrix form of the tensor be [x, y; y, z], then y=λ1e 11 e 12 +λ2e 21 e 22 ,

[0068] Furthermore, the crack classification and identification algorithm in step S5 includes:

[0069] S51: Road surface cracks are classified into four types: transverse cracks, longitudinal cracks, block cracks, and alligator cracks;

[0070] S52: Set the origin of the crack diagram to the lower left corner, and define the horizontal direction of the image as the x-axis and the vertical direction as the y-axis;

[0071] S53: Apply the RANSAC algorithm to perform linear fitting on the pixels in the crack map, specifically including:

[0072] Randomly select two points (the Euclidean distance between the two points must be greater than 1). Connect them into a straight line;

[0073] Set threshold The range obtained by shifting the line up and down by a distance s is taken as the range of the line's containment area, and the number of points falling within the containment area is counted.

[0074] Repeat the first two steps in step S53 n times, where n = total number of crack pixels / 4, find the line with the most points in the range, use it as the final fitted line, and record the coordinates of the two points that the line passes through, denoted as [x1, y1] and [x2, y2]; calculate the ratio of the number of points in the range of the line to the total number of crack pixels.

[0075] S54: If the ratio is <40%, it is judged as a crack; if the ratio is [40%, 80%], it is judged as a blocky crack; if the ratio is >80%, it is judged by the formula. Calculate the angle between the fitted line and the positive x-axis. If the range of β is... or or Then it is determined to be a transverse crack; if the range of β is or It is then determined to be a longitudinal crack.

[0076] Advantages of this invention:

[0077] This invention uses the K-means clustering algorithm to segment the shadow region and employs a grouped brightness compensation algorithm to effectively eliminate road surface shadow interference;

[0078] By fusing the coarsely extracted cracks with the cracks extracted after shadow removal, and using the tensor voting algorithm, crack features can be preserved.

[0079] By fitting crack lines using the RANSAC algorithm, crack classification and identification can be achieved quickly and accurately based on the linear characteristics of different types of cracks.

[0080] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description

[0081] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0082] Figure 1 This is a flowchart illustrating the specific operational steps of the present invention.

[0083] Figure 2 This is the original image with shadow interference in this invention.

[0084] Figure 3 This is a rough extraction image of the cracks in this invention.

[0085] Figure 4 This is a shaded boundary diagram in this invention.

[0086] Figure 5 This is the image after shadow removal in this invention.

[0087] Figure 6 This is a crack seed diagram in this invention.

[0088] Figure 7 This is a linear saliency graph in the tensor voting algorithm of this invention.

[0089] Figure 8 This is the crack map enhanced by the tensor voting algorithm in this invention. Detailed Implementation

[0090] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0091] The programming environment for this invention is as follows: the tensor voting related algorithms are implemented using Matlab R2018a, and other algorithms are implemented using Visual Studio 2019.

[0092] The method steps of the present invention are as follows:

[0093] Step 1: Convert the image to an 8-bit unsigned integer single-channel grayscale image, and perform brightness equalization on the grayscale image, specifically:

[0094] Let the pixel brightness values ​​of the original image range from [p1, p2]. After brightness equalization, the brightness of any pixel is p1. i Become

[0095] Calculate the mean μ1 and standard deviation σ1 of the brightness of all pixels in the equalized image, and extract the pixels with brightness less than μ1-σ1 (if μ1-σ1≤0, then take 20) as the result of coarse crack extraction.

[0096] Step 2: Apply the K-means clustering algorithm to the equalized grayscale image, specifically:

[0097] (1) Convert the road surface image into a 32-bit floating-point integer single-channel image;

[0098] (2) Calculate the average value μ and standard deviation σ of the overall pixel grayscale values ​​of the road image. Divide the road image into three cluster regions: road background, semi-shade, and shadow. Set the initial values ​​of the iteration center points of the three cluster regions to μ+2σ (road background region, set to 255 if the value is greater than 255), μ-σ (semi-shade region, set to 100 if the value is less than 0), and μ-3σ (shadow region, set to 0 if the value is less than 0), respectively, and perform the iterative algorithm:

[0099] (a) Based on the current cluster center, calculate the distance (i.e. the absolute value of the difference between the brightness values) between the brightness value of each pixel and the brightness values ​​of the three cluster centers, and assign the pixel to the nearest cluster.

[0100] (b) Calculate the average brightness value of all pixels in each current cluster and use it as the cluster center for the next iteration;

[0101] (c) Calculate the distance between the two cluster centers. If the distance is less than the given iteration precision (taken as 0.001), the iteration ends; otherwise, repeat steps (a) to (c).

[0102] After the iteration is completed, the gray value of the road background area is set to 255, and the gray value of the semi-shaded and shadow areas (hereinafter collectively referred to as shadow areas) is set to 0, so as to obtain a binarized road shadow definition image.

[0103] (3) Grouped brightness compensation, specifically:

[0104] (a) Record the coordinates of all shadow region pixels in the shadow delineation map, traverse the corresponding positions in the original image, group them according to brightness, group them into groups based on brightness value, and record the coordinates of the pixels in the group.

[0105] (b) Calculate the average μ value of all pixel brightness values ​​in the road background area. n ;

[0106] (c) Calculate the average μ of the brightness values ​​of all pixels in the shadow area. s ;

[0107] (d) For the road surface background area, its pixel brightness value remains unchanged; for the first 10 groups of shadow areas, its pixel brightness value also remains unchanged; for other groups of shadow areas, its pixel brightness value increases by μ. n -μ s .

[0108] Step 3: Perform the same brightness equalization operation as in Step 1 on the brightness-compensated image, calculate the mean μ2 and standard deviation σ2 of the brightness of all pixels in the image; extract the pixels with brightness less than μ2-3σ2 (if μ2-3σ2≤0, then take 10) as the result of further crack extraction; take the intersection with the coarsely extracted crack obtained in S1 to obtain the crack seed map, in which the pixels are crack seed points;

[0109] Step 4: Enhance the crack seed graph using the tensor voting algorithm:

[0110] A tensor field at a given location is represented by a four-dimensional tensor with dimensions h×w×2×2, where h is the number of rows of pixels in the original image and w is the number of columns of pixels in the original image; tensors in a tensor field can be represented by second-order symmetric nonnegative definite matrices.

[0111] (1) Construct rod tensor fields in different directions:

[0112] (1a) Divide 2π into 180 equal parts, denoted as

[0113] (1b) The size of the tensor field is determined based on σ, and the calculation formula is as follows: And round up to an odd number; for each θ i Perform the following steps (a) to (e):

[0114] (a) Constructing the unit vector v i =[cos(θ) i ), sin(θ) i )];

[0115] (b) The construction size is Given a matrix X, where the elements in the j-th column are all... Build size is The matrix Y, whose i-th row elements are all By mapping the elements of X and Y one-to-one to obtain a grid, and then rotating it by θ... i The angle is used to obtain new X and Y values;

[0116] (c) Calculate the arctangent function values ​​of corresponding elements of X and Y, denoted as α, and construct a standard bar tensor in the form of a second-order matrix:

[0117]

[0118] (d) Calculate the degenerate function, as shown in the following formula:

[0119]

[0120] Where s is the arc length of the circle between the two points, and the calculation formula is: Where l is the Euler distance between the two points; k is the curvature of the arc, calculated using the following formula: σ represents the voting scale; c is a parameter controlling the degradation rate, determined by σ, and calculated using the following formula:

[0121] (e) Multiply the standard rod tensor by the corresponding term of the degenerate function to obtain a rod tensor field with a certain propagation range.

[0122] (2) Constructing the spherical tensor field:

[0123] The spherical tensor field is obtained by superimposing the field strengths of the 180 bar tensor fields calculated in step (1) and then taking the average value.

[0124] (3) Tensor initialization of the crack seed graph:

[0125] Assign the tensor at the crack seed point to a sphere tensor without direction information as the initial sphere tensor;

[0126] (4) Perform sparse sphere tensor voting:

[0127] (4a) Traverse all crack seed points and superimpose the spherical tensor field obtained in step (2) onto all its initial spherical tensors;

[0128] (4b) Set the second-order matrix form of the tensors at non-seed points in the crack seed graph to [0, 0; 0, 0];

[0129] (5) Perform tensor decomposition:

[0130] For any tensor S in the algorithm, after calculating its eigenvalues ​​λ1, λ2 and their corresponding eigenvectors e1, e2, it can be decomposed into:

[0131]

[0132] in, Let represent a rod tensor, (λ1-λ2) represent its linear significance, and e1 represent the direction of the rod tensor; This represents a sphere tensor.

[0133] The methods for calculating the eigenvalues ​​and eigenvectors of a tensor in a tensor field are as follows:

[0134] The four-dimensional tensor field of size h×w×2×2 is expanded into h×w second-order symmetric non-negative definite matrices along the third and fourth dimensions. Each second-order matrix represents the second-order matrix form of the tensor at the corresponding crack seed point.

[0135] Let the second-order matrix be [a, c; b, c], and its eigenvalues ​​can be calculated using the following formula:

[0136]

[0137]

[0138] remember Here, arctan2() is the arctangent function in the four quadrants, and its return value range is [-π, π]. Then, the unit eigenvector e1 corresponding to λ1 is [cos(θ), sin(θ)]. T The unit eigenvector corresponding to λ² is e² = [-sin(θ), cos(θ)]. T ;

[0139] (5a) Calculate the eigenvalues ​​λ1, λ2 of all tensors in the tensor field after voting for the sparse sphere tensor and their corresponding eigenvectors e1, e2;

[0140] (5b) Set λ2 to 0 and recalculate the tensor based on λ1, λ2 = 0, e1, and e2, as follows:

[0141] Let e1 = [e 11 e 12]、e2=[e 21 e 22 If the second-order matrix form of a tensor is [x, y; y, z], then... y=λ1e 11 e 12 +λ2e 21 e 22 ,

[0142] This step transforms the sphere tensor into a rod tensor with directional information, whose direction vector is e1.

[0143] (6) Perform bar tensor voting:

[0144] (6a) Generate the bar tensor field corresponding to the e1 direction according to step (1), and superimpose it on all the tensors obtained in step (5b);

[0145] (6b) Calculate the eigenvalues ​​of all tensors in the tensor field obtained in step (6a), and retain only the tensors with λ1-λ2≥0.3 to obtain the linear significance map of the crack seed map;

[0146] (7) Generate crack map:

[0147] (7a) Based on the eigenvalues ​​λ1, λ2 and eigenvectors e1, e2 of the tensor retained in step (6b), recalculate the tensor and calculate the eigenvector e1 of the new tensor as the direction vector of the remaining crack seed points.

[0148] (7b) Using each remaining crack seed point as the center, construct a circle with a radius of a certain pixel length (taken as 15), offset by a small angle (taken as ) from the direction vector of that seed point. The seed point is a sector within the central angle range; connect each seed point to the nearest point in the sector it forms with a straight line to obtain the final crack map.

[0149] Step 5: Crack classification and identification algorithm, including:

[0150] (1) Road surface cracks are classified into four types: transverse cracks, longitudinal cracks, block cracks, and alligator cracks;

[0151] (2) Set the origin of the crack diagram to the lower left corner, and define the horizontal direction of the image as the x-axis and the vertical direction as the y-axis;

[0152] (3) The RANSAC algorithm is used to fit straight lines to the pixels in the crack map, specifically including:

[0153] (3a) Randomly select two points (the Euclidean distance between the two points must be greater than 1 / 3 max{image height h, image width w}) and connect them with a straight line;

[0154] (3b) Set the threshold s = 1 / 10max{h, w}, and take the range obtained by shifting the line up and down by a distance s as the range of the line, and count the number of points that fall within the range.

[0155] (3c) Repeat (3a) to (3b) n times, n = total number of crack pixels / 4, find the line with the most points in the range, use it as the final fitted line, and record the coordinates of the two points that the line passes through, denoted as [x1, y1], [x2, y2]; calculate the ratio of the number of points in the range of the line to the total number of crack pixels.

[0156] (4) If the ratio is <40%, it is judged as a crack; if the ratio is [40%, 80%], it is judged as a blocky crack; if the ratio is >80%, it is judged as a blocky crack by formula. Calculate the angle between the fitted line and the positive x-axis. If the range of β is... or or Then it is determined to be a transverse crack; if the value range of β is or It is then determined to be a longitudinal crack.

[0157] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for classifying and identifying a road surface crack under shadow interference, characterized in that, Comprise: S1: crack rough extraction step: the image is converted into an 8-bit unsigned integer single-channel grayscale image, and a brightness equalization operation is performed on the grayscale image to obtain an equalized image; Calculating the mean value of the brightness of all pixels of the equalized image and the standard deviation ; extracting the pixels with brightness less than as the result of the rough extraction of cracks S2: eliminate shadows by brightness compensation algorithm: S21: for the equalized grayscale image, a K-means clustering algorithm is used to obtain a binary segmentation image of the road surface background and shadow area; S22: group brightness compensation; S3: on the image compensated for brightness, perform the brightness equalization operation in S1, calculate the mean value of the brightness of all pixel points of the image and the standard deviation ; extract the pixel points with brightness less than as the result of further extraction of the crack; and take the intersection of the rough extracted crack obtained in S1 to obtain a crack seed map, wherein the pixel points are crack seed points; S4: use tensor voting algorithm to enhance the cracks in the crack seed map and suppress false cracks; S5: use RANSAC algorithm to fit the crack curve, and according to the linear characteristics of different types of road cracks, realize the classification and identification of the cracks; The tensor voting algorithm in step S4 comprises: S41: Construct a stick tensor field in different directions: Divide into 180 parts, denoted as ; According to The size of the tensor field is determined by the formula: and rounded up to an odd number; for each the following steps are performed: Constructing unit vectors ; A matrix X of size is constructed, whose jthcolumn element is ; a matrix Y of size is constructed, whose ithrow element is ; the elements of X and Y are one-to-one corresponding to get a grid, which is rotated degrees to get the new values of X and Y; The inverse tangent function values of the corresponding elements of X and Y are calculated, denoted as The standard rod tensor in the form of a second-order matrix is constructed: ; Calculate the degenerate function, the formula is as follows: ; Wherein, s is the arc length of the arc between two points, the calculation formula is: Wherein, l is the Euler distance between two points; k is the curvature of the arc, the calculation formula is: ; The scale of voting is represented; c is the parameter for controlling the degradation rate, which is determined by , the calculation formula is: ; Multiply the standard stick tensor with the corresponding term of the degenerate function to obtain a stick tensor field with a certain propagation range; S42: Construct a spherical tensor field: After superimposing the field strengths of the 180 stick tensor fields calculated in step S41, the average value is obtained to obtain a spherical tensor field; S43: Tensor initialization of crack seed map: Assign the tensor at the crack seed point as a spherical tensor without direction information as the initial spherical tensor; S44: Sparse spherical tensor voting: Iterate through all crack seed points, and superimpose the spherical tensor field obtained in step S42 on all initial spherical tensors thereof; The second order matrix form of the tensor at the non-seed point in the crack seed map is set to [0, 0; 0, 0]; S45: Tensor decomposition: For any one tensor S in the algorithm, compute its eigenvalues , and their corresponding eigenvectors , After that, decompose it into: ; Computing step S44 eigenvalues of all tensors in the tensor field after the sparse tensor voting , and their corresponding eigenvectors , ; Set to 0 and recalculate the tensor, which transforms the spherical tensor into a stick tensor with directional information whose direction vector is ; and ; S46: Stick tensor voting: The corresponding reference step S41 is generated The rod tensor field of the direction is superimposed on all tensors obtained in step S45; The eigenvalues of all tensors in the computed tensor field are kept only for the tensors of The linear saliency map is obtained by keeping only the tensors of S47: Generate crack map: Eigenvalues of the tensor retained according to step S46 , re-computing the tensor and computing eigenvectors of the new tensor , as directional vectors of the remaining crack seed points; Take each remaining crack seed point as the center, construct a sector area with a certain pixel length as the radius, and a small angle offset from the seed point direction vector as the center angle range; connect each seed point with the nearest point in the sector area formed by it with a straight line to obtain the final crack map.

2. The road crack classification and identification method under shadow interference according to claim 1, characterized in that The brightness equalization operation in step S1 comprises: The pixel brightness value range of the original image is , and the brightness of any pixel point after the brightness equalization operation becomes .

3. The road crack classification and identification method under shadow interference according to claim 1, characterized in that The K-means clustering algorithm in step S21 comprises: The road surface image is converted into a 32-bit floating-point integer single-channel image; the average value of the overall pixel gray value of the road surface image is calculated and the standard deviation The road surface image is divided into three clustering areas of road surface background, half-shade and shade, and the initial values of the iterative center points of the three clustering areas are respectively set as , and The iterative algorithm is performed: According to the current clustering center, the distance between the brightness value of each pixel point and the brightness value of the three clustering centers is calculated respectively, and the pixel point is assigned to the nearest cluster; Calculate the average value of the brightness values of all pixel points in the current cluster as the clustering center for the next iteration; Calculate the distance between the two clustering centers, and when the distance is less than the given iteration accuracy, the iteration is ended, otherwise the above steps are repeatedly executed; After the iteration is completed, the road surface background area gray value is set to 255, and the semi-shade and shade area gray value is set to 0 to obtain a binary road surface shadow definition image.

4. The road crack classification and identification method under shadow interference according to claim 1, characterized in that The group brightness compensation algorithm in step S22 comprises: Record the coordinate values of all shadow area pixels in the shadow boundary graph, traverse the corresponding positions in the original image, group according to brightness, one brightness value is a group, and record the coordinate values of the pixels in the group; calculating an average of all pixel luminance values of the road surface background region ; calculating the average of the luminance values of all pixels of the shadow region ; For the road surface background region, the pixel brightness value remains unchanged; for the first 10 groups of shadow regions, the pixel brightness value also remains unchanged; for the other groups of shadow regions, the pixel brightness value increases .

5. The pavement crack classification and identification method under shadow interference according to claim 1, characterized in that The calculation method of the tensor eigenvalue and eigenvector comprises: A four-dimensional tensor field of size is unfolded along the third and fourth dimensions into second-order symmetric non-negative definite matrices, each second-order matrix representing a second-order matrix form of the tensor at the corresponding crack seed point; Let the second order matrix be The eigenvalues are calculated by the formula ; ; Recall where arctan2() is the four-quadrant arctangent function, The return value range thereof is Then The corresponding unit eigenvector , The corresponding unit eigenvector ; According to the known eigenvalues , and the corresponding eigenvectors , The method for calculating the tensor comprises: Let the second order matrix form of the tensor be expressed as then , , .

6. The pavement crack classification and identification method under shadow interference according to claim 1, characterized in that The classification and identification algorithm of the crack in the step S5 comprises: S51: divide the pavement crack into four types of transverse crack, longitudinal crack, block crack and crack; S52: set the coordinate origin of the crack graph at the lower left corner, and define the horizontal direction of the image as the x-axis and the vertical direction as the y-axis; S53: adopt the RANSAC algorithm for straight line fitting of the pixel points in the crack graph, specifically comprising: Randomly select two points (require the Euclidean distance between the two points greater than ), connected into a straight line; Setting a threshold The number of points falling within the containing range is counted. The first two steps in step S53 are repeated n times, The straight line containing the most points in the range is found as the final fitting straight line, and the coordinate values of the two points through which the straight line passes are recorded as The ratio of the number of points in the range to the total number of crack pixel points is calculated; S54: If the ratio < 40%, it is determined as a crack; if the ratio is [40%, 80%], it is determined as a block crack; if the ratio > 80%, it is determined as a formula the angle between the fitting straight line and the positive direction of the x-axis is calculated, if the range of or or , it is determined as a transverse crack; if the range of is or , it is determined as a longitudinal crack.