Road crack shape fitting, analysis and complexity evaluation method
By processing the road fracture binary graph, using the central axis transformation and the minimum spanning tree to connect feature points, the undirected graph is solved, and the problem of failure to evaluate the crack morphology and complexity in the existing technology is achieved, and rapid and effective quantitative analysis and priority processing are achieved.
Patent Information
- Application Number
- CN202510437051.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-04-09
AI Technical Summary
The prior art cannot effectively evaluate the morphology and complexity of road cracks, resulting in the inability to conduct quantitative analysis and priority treatment.
By performing open and closed operations on the road crack binary graph, the contour of the connected area is detected, the feature points are connected using the central axis transformation and the minimum spanning tree, and the undirected graph is constructed, and the degree and edge orientation of the undirected graph are counted to evaluate the crack morphology and complexity.
A rapid and effective assessment of the shape and complexity of road cracks has been achieved, and road management personnel are guided to prioritize crack diseases according to complexity.
Smart Images

Figure CN120298375A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer graphics, and particularly relates to a method for fitting, analyzing and evaluating the complexity of road crack morphology. Background Art
[0002] When carrying out road maintenance, road cracks are major potential safety hazards for traffic, which may lead to major accidents. Therefore, it is very important to evaluate road crack diseases. With the development of radar detection technology and digital image processing technology, the road crack evaluation technology based on video images has good economic benefits and development potential. The evaluation methods for disease image processing at home and abroad are mainly traditional manual processing methods. The information of cracks is determined through on-site or vehicle-mounted images taken. Although this method has low technical requirements, it has high labor costs, low useful information volume, and unstable information acquisition, and quantitative analysis of road diseases cannot be carried out.
[0003] Currently, in the aspect of road crack morphology analysis, the main working method is: using radar detection technology and semantic segmentation technology can quickly and effectively extract the binary image of the crack area. However, these methods can only judge whether there are cracks in the area, and cannot evaluate the morphology and complexity of the cracks. Summary of the Invention
[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method for fitting, analyzing and evaluating the complexity of road crack morphology to solve the problem that traditional detection methods cannot analyze the crack morphology and evaluate its complexity.
[0005] The purpose of the present invention is achieved by the following technical solutions:
[0006] A method for fitting, analyzing and evaluating the complexity of road crack morphology, comprising the following steps:
[0007] Step 1, perform opening operation on the binary image of the road crack to filter the noise area;
[0008] Step 2, perform closing operation on the binary image of the road crack, and splice the connected areas with a distance less than the set threshold as the same crack area of the binary image;
[0009] Step 3, detect the contours of all connected areas as the crack areas, and separate each connected area to ensure that the subsequent algorithm only processes a single connected area;
[0010] Step 4, for a single connected area, downsample the area pixels, and use medial axis transformation to refine the connected area to obtain the internal skeleton of the connected area;
[0011] Step 5, detect the feature points of the connected area skeleton;
[0012] Step 6: Determine whether all feature points are connected to each other. If so, use the minimum spanning tree to connect the feature points. If there are unconnected feature points, use the minimum spanning tree to connect the feature points for each connected component respectively to obtain a spanning forest, and finally merge the spanning forests to form a connected graph to obtain a new minimum spanning tree.
[0013] Step 7: Perform a depth-first traversal of the new minimum spanning tree and simplify it to obtain an undirected graph that can describe the road crack morphology analysis and complexity.
[0014] Step 8: Count the degrees of each node and the orientations of the edges in the undirected graph to determine the morphology of the road crack.
[0015] Step 9: Count the number of edges, the number of articulation points, and the weighted average of the orientations of all edges in the undirected graph to quantify the complexity of the road crack.
[0016] In Step 4, the medial axis transformation is a process of continuously eliminating pixels, and the specific process is as follows:
[0017] First, make the following definitions:
[0018] Traverse the binary image P of a single connected region, where all pixel points px i,j in the binary image P take values of 0 and 1. When traversing to px i,j , determine whether px i,j needs to be deleted. Mark the 8-neighborhood of px i,j in clockwise order as:
[0019] Seq = {px i-1,j-1 , px i,j-1 , px i+1,j-1 , px i+1,j , px i+1,j+1 , px i,j+1 , px i-1,j+1 , px i-1,j};
[0020] Let neighbor(px i,j ) be the sum of pixel values in the 8-neighborhood of px i,j , and curcle(px i,j ) be the number of 0 - 1 in the 8-neighborhood of px i,j in the marked order sequence. The number of 0 - 1 in the sequence is 2, so circle(px i,j ) = 2. In summary:
[0021] neighbor(px i,j ) = ∑ m,n=-1,0,1 px i+m,j+n - px i,j ;
[0022]
[0023] Traverse each point of the image, and for each point px where the pixel value is 1 i,j Make the following judgments:
[0024] 1) 2 ≤ neighbor(px i,j ) ≤ 6;
[0025] 2) circle(px i,j ) = 1;
[0026] 3) When it is an odd-numbered iteration, judge whether px i,j-1 × px i+1,j × px i,j+1 = 0 and px i+1,j × px i,j+1 × px i-1,j = 0 hold simultaneously. If so, condition 3) is satisfied;
[0027] When it is an even-numbered iteration, judge whether px i,j-1 × px i+1,j × px i-1,j = 0 and px i,j-1 × px i,j+1 × px i-1,j = 0 hold simultaneously. If so, condition 3) is satisfied;
[0028] If conditions 1), 2), and 3) are satisfied simultaneously, then delete this pixel point; loop through the image until no pixel points are deleted, then the medial axis transformation process is completed, and finally a binary image of the skeleton of the refined crack structure is obtained.
[0029] Step 5, detecting the feature points of the connected region skeleton is done in the following way:
[0030] Use a fixed window to slide in any direction on the binary image of the crack structure skeleton, and compare the degree of change in pixel grayscale in the window before and after sliding: If there is sliding in any direction and the grayscale change value is greater than the set value, then it is considered that there are corner feature points in this window.
[0031] In step 6, let the crack structure diagram G have n connected components, SG = (V, E) be a connected component of G, and T = (U, TE) be the minimum spanning tree of SG, where V and E respectively represent the vertex set and edge set of the connected component, and U and TE respectively represent the vertex set and edge set of the corresponding minimum spanning tree; then the steps of the prim algorithm for constructing the minimum spanning tree T starting from vertex v from SG are as follows:
[0032] (1) Initialize \(U = \{v\}\), \(V = V - U\);
[0033] (2) Repeat the following steps until all nodes in \(V\) are added to \(U\):
[0034] ① Select a node \(u\) from \(U\) * , and a node \(v\) from \(V\) * such that among all the edges connecting a node from each of the two sets \(U\) and \(V\), the edge with the smallest weight;
[0035]
[0036] ② Add to \(TE\):
[0037]
[0038] ③ Add \(v\) * to \(U\):
[0039] \(U = U\cup\{v * \}\);
[0040] ④ Remove \(v\) * from \(V\):
[0041] \(V = V - \{v * \}\);
[0042] Then the minimum spanning tree \(T\) of the connected component \(SG\) can be obtained; applying the Prim algorithm to each connected component, the minimum spanning forest \(F=\{T i |1\leq i\leq n\}\) can be obtained.
[0043] In step 6, the merging of the spanning forests to form a connected graph to obtain a new minimum spanning tree is as follows:
[0044] First, consider all the edges of the connected components as a set of pixel points, and calculate the shortest distance between every pair of sets of pixel points;
[0045] Second, use the endpoints of the connecting line segments corresponding to the shortest distances as new nodes and add them to the connected components;
[0046] Finally, use the connecting line segments as new edges to reorganize multiple connected components into a connected graph.
[0047] In step 7, the depth-first traversal and simplification of the new minimum spanning tree are as follows:
[0048] (1) For the crack structure graph \(G\), select a node \(v\) with degree 1 start as the starting node for depth-first traversal;
[0049] (2) If the current node \(v\) reached during the depth-first traversal currentThe degree d(v current )≠2, then retain v current ;
[0050] (3) If the current node v reached by the depth - first traversal current has a degree d(v current ) = 2, it means that v current has two adjacent edges e pre , e next , and two adjacent nodes v pre , v next , where v pre is a node that has been visited in the previous depth - first traversal, v next is the next node to be visited, and
[0051] e pre =(v pre , v current )#(3 - 27)
[0052] e next =(v current , v next )#(3 - 28)
[0053] Judge the included angle between the two edges e pre , e next . If i.e., the included angle of e pre , e next is then retain v current and continue the traversal; otherwise, delete v current , and at the same time connect v pre , v next , and continue the traversal;
[0054] After the depth - first traversal of all nodes, the final simplified result is obtained.
[0055] Meanwhile, the present invention provides:
[0056] A server, the server includes a processor and a memory, and at least one segment of program is stored in the memory, and the program is loaded and executed by the processor to implement the above - mentioned method for fitting, analyzing and evaluating the complexity of road crack patterns.
[0057] A computer - readable storage medium, at least one segment of program is stored in the storage medium, and the program is loaded and executed by a processor to implement the above - mentioned method for fitting, analyzing and evaluating the complexity of road crack patterns.
[0058] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0059] The present invention provides an algorithm that can quickly and effectively evaluate the morphology and complexity of cracks. To quantitatively analyze the development of internal cracks in a road and determine the morphology and complexity of road cracks, the present invention uses piecewise straight lines to fit the morphology of road cracks, and represents the size and orientation of the crack area through the length and angle of the straight lines, thereby representing the structural morphology of these cracks, and can guide road maintenance personnel to process crack diseases according to the complexity priority. Brief Description of the Drawings
[0060] Figure 1 It is a preprocessing flow chart for the binary image of road cracks.
[0061] Figure 2 It is a flow chart for fitting the crack structure of road cracks.
[0062] Figure 3 It is for point px i,j Schematic diagram of the 8-neighborhood.
[0063] Figure 4 It is for point px i,j Schematic example diagram of the 8-neighborhood 0-1 sequence.
[0064] Figure 5 It is a schematic diagram for evaluating feature points.
[0065] Figure 6 It is a schematic diagram for detecting feature points with a sliding window.
[0066] Figure 7 It is a schematic diagram of feature points after refining the connected region.
[0067] Figure 8 It is a schematic diagram that G is a connected graph.
[0068] Figure 9 It is a schematic diagram that G is a non-connected graph.
[0069] Figure 10 It is a schematic diagram for connecting a non-connected graph into a connected graph.
[0070] Figure 11 It is a histogram of crack complexity C. Detailed Embodiment
[0071] The present invention will be further described in detail below in conjunction with embodiments and the accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0072] A method for fitting, analyzing and evaluating the complexity of road crack morphology. This method uses ground-penetrating radar to scan the road surface to obtain a grayscale image of the crack horizontal section, and then uses semantic segmentation to obtain a binary image of the crack; obtain the binary image of the road horizontal section, then use opening operation to filter noise, and use closing operation to connect the crack regions. At the same time, use contour detection to separate different crack regions and process them separately; after obtaining the preprocessed image, downsample the crack region to extract the skeleton of the crack region, and at the same time identify the feature points of the skeleton, and use the minimum spanning tree to connect the feature points. Finally, further simplify it to obtain an undirected graph that can represent the road crack morphology; count the edge orientations and the degrees of the nodes of the undirected graph to judge the shape of the crack; at the same time, the complexity of the crack morphology can also be evaluated by the complexity of the undirected graph.
[0073] Specifically, as Figure 1 , 2 , a method for fitting, analyzing and evaluating the complexity of road crack morphology, including the following steps:
[0074] Step 1, use the opening operation on the binary image of the road crack to filter the noise area;
[0075] Step 2, use the closing operation on the binary image of the road crack to splice the connected regions with a distance less than the set threshold as the same crack region of the binary image;
[0076] Step 3, detect the contours of all connected regions as crack regions, and separate each connected region to ensure that the subsequent algorithm only processes a single connected region;
[0077] Step 4, for a single connected region, downsample the region pixels and use the medial axis transformation to refine the connected region to obtain the internal skeleton of the connected region;
[0078] Step 5, detect the feature points of the connected region skeleton;
[0079] Step 6, judge whether all feature points are connected to each other: if so, use the minimum spanning tree to connect the feature points; if there are unconnected feature points, use the minimum spanning tree to connect the feature points for each connected component respectively to obtain a spanning forest, and finally merge the spanning forests to form a connected graph to obtain a new minimum spanning tree;
[0080] Step 7, perform a depth-first traversal of the new minimum spanning tree and simplify it to obtain an undirected graph that can describe the analysis and complexity of the road crack morphology;
[0081] Step 8, count the degrees of each node and the orientations of the edges of the undirected graph to judge what kind of morphology the road crack belongs to;
[0082] Step 9, count the number of edges, the number of articulation points in the undirected graph, and the weighted average of the orientations of all edges, so as to quantify the complexity of the road cracks.
[0083] In step 4, the medial axis transformation is a process of continuously eliminating pixels, and the specific process is as follows:
[0084] First, make the following definitions:
[0085] Traverse the binary graph P of a single connected region, where all pixel points px i,j of the binary graph P take values of 0 and 1; when traversing to px i,j , determine whether px i,j needs to be deleted; mark the 8-neighborhoods of px i,j in clockwise order as: Figure 3 Seq = {px
[0086] , px i-1,j-1 , px i,j-1 , px i+1,j-1 , px i+1,j , px i+1,j+1 , px i,j+1 , px i-1,j+1 , px i-1,j};
[0087] Let neighbor(px i,j ) be the sum of pixel values in the 8-neighborhood of px i,j , and circle(px i,j ) be the number of 0-1 in the 8-neighborhood of px i,j in the marked order sequence; as Figure 4 shown, the number of 0-1 in the sequence is 2, so circle(px i,j ) = 2, and in summary:
[0088] neighbor(px i,j ) = ∑ m,n=-1,0,1 px i+m,j+n - px i,j ;
[0089]
[0090] Traverse each point of the image, and make the following judgments for each point px i,j with a pixel value of 1:
[0091] 1) 2 ≤ neighbor(px i,j ) ≤ 6;
[0092] 2) circle(px i,j ) = 1;
[0093] 3) When it is an odd-numbered iteration, determine whether px i,j-1 × px i+1,j × px i,j+1 = 0 and px i+1,j × px i,j+1 × px i-1,j = 0 hold simultaneously. If so, condition 3) is satisfied;
[0094] When it is an even-numbered iteration, determine whether px i,j-1 × px i+1,j × px i-1,j = 0 and px i,j-1 × px i,j+1 × px i-1,j = 0 hold simultaneously. If so, condition 3) is satisfied;
[0095] If conditions 1), 2), and 3) are simultaneously satisfied, then delete this pixel point; loop through the image until no pixel points are deleted, then the medial axis transformation process is completed, and finally a skeleton binary image of the refined crack structure is obtained.
[0096] However, the internal skeleton obtained by the medial axis transformation only has pixel information and cannot quantitatively analyze the shape and complexity of the crack based on the skeleton. Therefore, it is necessary to find the feature points of the skeleton to reflect the spatial structure information of the crack.
[0097] Step 5, detecting the feature points of the connected region skeleton is performed in the following manner:
[0098] Use a fixed window to slide in any direction on the skeleton binary image of the crack structure, and compare the degree of pixel gray value change within the window before and after sliding: If there is a slide in any direction and the gray value change is greater than the set value, then it is considered that there is a corner feature point in this window.
[0099] For the window to be detected, define its intensity as:
[0100] E(u, v)= ∑ x,y W(x, y)[P(x + u, y + v)-P(x, y)] 2 ;
[0101] where (x, y) is the pixel point in the window, W(x, y) is the window function, (u, v) is a very small displacement; the window function is a uniform weight window or a Gaussian weight window, which provides weights for the pixels in the window; the larger E(u, v) is, the greater the difference in pixel values between the point (x, y) and its neighboring point (x + u, y + v), that is, it is necessary to detect the corner by maximizing this error function;
[0102] Applying Taylor expansion, we can obtain:
[0103]
[0104] In the formula, P x represents the partial derivative of the image matrix P in the x direction;
[0105] By synthesizing the formula of Taylor expansion, we can obtain:
[0106]
[0107] where
[0108]
[0109] By simply analyzing the eigenvalues of matrix M, the change amount of pixel values can be scored; let the score
[0110] R = min(λ1, λ2);
[0111] In the formula, λ1 and λ2 are the eigenvalues of M, and the derivative of M in the (x, y) direction is measured by the magnitudes of λ1 and λ2; as Figure 5 shown, when λ1 and λ2 are higher than the minimum value λ min , it is regarded as a corner (green area); when λ1 or λ2 is lower than the minimum value λ min , it is regarded as an edge (yellow area); when both λ1 and λ2 are lower than the minimum value λ min , it is regarded as a flat area (blue area); select those points where λ1 and λ2 are higher than the minimum value λ min , and the feature points can be obtained.
[0112] Correspondingly, use a sliding window to detect feature points, compare λ1 and λ2 after sliding, and determine whether the center of the window is a feature point; as Figure 6 shown.
[0113] Compare and identify the feature points of the refined image, as Figure 7 shown, where the green points are the identified feature points;
[0114] After detecting these feature points, a set of line segments passing through the feature points can be determined to represent the morphology of the connected region.
[0115] In step 6, based on the feature points, construct an undirected graph G = (V, E) to represent all possible connection methods of these feature points. Each feature point corresponds to a node v i ∈ V of the crack structure graph G. Since there are n(n - 1) / 2 connection methods for n nodes, which is a large number, it is more appropriate to use an adjacency matrix to represent the undirected graph G. For each pair of nodes v i , v j , check the undirected edge e i,j = (vi , v j ) corresponding line pixel set line(v i , v j ) is inside the connected region D, that is, to judge is true or false. Among them, line(v i , v j ) = {pt | cos(v j - pt, pt - v i ) = 1}.
[0116] If e i,j is inside the connected region, then
[0117] dist(v i , v j ) = ||v j - v i ||2;
[0118] weight(e i,j ) = dist(v i , v j );
[0119] Otherwise
[0120] weight(e i,j ) = INF;
[0121] Among them, dist(v i , v j ) represents the Euclidean distance between nodes v i , v j , weight(e i,j ) represents the weight of edge e in the adjacency matrix i,j . If e i,j = (v i , v j ) and its weight is INF, it means that there is no connecting edge between v i , v j . Finally, all possible connection methods G of the feature points are obtained. However, since feature point recognition cannot guarantee complete correctness, even in the case where the crack region is a simply connected region, there may still be a situation where some feature points are completely unconnected to some other feature points, that is, G is a non-connected graph. As Figure 8 , 9 shown.
[0122] To determine the most appropriate connection method between feature points, find the minimum spanning tree (MST) from the constructed undirected graph G.
[0123] If G is a non-connected graph, find the MST for each connected component independently to obtain a spanning forest. Since the MST is a spanning tree with the minimum total weight, the edges of the MST can connect feature points with the minimum redundancy of line segments in the same direction.
[0124] Let the crack structure graph G have n connected components, SG=(V, E) be a connected component of G, and T=(U, TE) be the minimum spanning tree of SG, where V and E represent the vertex set and edge set of the connected component respectively, and U and TE represent the vertex set and edge set of the corresponding minimum spanning tree respectively; then the steps of the Prim algorithm for constructing the minimum spanning tree T starting from vertex v from SG are as follows:
[0125] (1) Initialize U = {v}, V = V - U;
[0126] (2) Repeat the following steps until all nodes in V are added to U:
[0127] ① Select node u from U * , and select node v from V * such that among all the edges connecting one node from each of the two sets U and V, the edge with the minimum weight;
[0128]
[0129] ② Add to TE:
[0130]
[0131] ③ Add v * to U:
[0132] U = U ∪ {v *};
[0133] ④ Remove v * from V:
[0134] V = V - {v *};
[0135] Then the minimum spanning tree T of the connected component SG can be obtained; by using the Prim algorithm for each connected component, the minimum spanning forest F = {T i | 1 ≤ i ≤ n} can be obtained.
[0136] In step 6, the merged spanning forest forms a connected graph to obtain a new minimum spanning tree, which is specifically as follows: Since each crack corresponds to a connected region, its structure graph should not be a non-connected graph. Therefore, it is necessary to connect each connected component again to form a connected graph.
[0137] First, consider all the edges of the connected components as a set of pixel points, and calculate the shortest distance between every two sets of pixel points;
[0138] Secondly, use the endpoints of the connecting line segments corresponding to the shortest distance as new nodes and add them to the connected components;
[0139] Finally, use the connecting line segments as new edges to reorganize multiple connected components into a connected graph. Essentially, this is equivalent to regarding each connected component of the spanning forest as a node and using the Prim algorithm again to find the minimum spanning tree of each connected component.
[0140] The result of connecting multiple connected components into a connected graph is as Figure 10 shown.
[0141] In step 7, the new minimum spanning tree is depth-first traversed and simplified as follows:
[0142] Since the crack structure diagram G obtained by simply using the minimum spanning tree to connect feature points is relatively redundant, many edges actually represent the same extension direction. Therefore, the following algorithm is used to simplify the crack structure diagram:
[0143] (1) For the crack structure diagram G, select a node v with degree 1 start as the starting node for depth-first traversal (DFS);
[0144] (2) If the degree d(v current ) of the current node v reached by the depth-first traversal current ) ≠ 2, then retain v current ;
[0145] (3) If the degree d(v current ) of the current node v reached by the depth-first traversal current ) = 2, it means that v current has two adjacent edges e pre , e next , and two adjacent nodes v pre , v next , where v pre is the node that has been visited in the previous depth-first traversal, v next is the next node to be visited, and
[0146] e pre =(v pre , v current )#(3 - 27)
[0147] e next =(v current , v next )#(3 - 28)
[0148] Judge the two edges epre , e next The included angle between , i.e., e pre , e next The included angle of Then retain v current And continue to traverse; otherwise, delete v current , and at the same time connect v pre , v next , and continue to traverse;
[0149] After depth-first traversing all nodes, the final simplified result is obtained.
[0150] After the above operations, the finally simplified crack structure diagram is obtained.
[0151] Through the crack structure diagram G(V, E), characteristics such as the orientation of the crack structure, the number of joint points, the number of segments, and the total length of the edges can be obtained. Among them, the joint point refers to the node with a degree greater than 2. The joint points connect multiple edges, making G have a more complex structure and being more important than other nodes. These characteristics objectively reflect the complexity of the crack. Intuitively, the greater the difference in the orientation of the crack structure diagram, the more joint points, the more segments, and the greater the total length of the edges, the more complex the crack morphology.
[0152] Let |E| represent the number of edges of G, J represent the number of joint points of G, and L represent the total length of all edges. The orientation of the crack structure can be represented by the set Θ = {θ i | 0 < i < |E|} of the included angles between all edges and the positive x-axis. Calculate the standard deviation σ(Θ) of Θ, which objectively reflects the orientation complexity of G. Use the vector to measure the complexity of the crack morphology. Since the weights of the various components of are not equal, the components of are standardized according to the formula to eliminate the dimensional gap of the components. Suppose there are n crack samples in total, i,j represents the complexity vector of the i-th sample, and the components are c
[0153]
[0154] To obtain the standardized vector The L2 norm of is used to evaluate the crack complexity C, and the crack complexity histogram of the obtained test data set is as Figure 11 shown, and the mean variances of the various components are shown in Table 1.
[0155] Table 1 Mean variance table of edge orientation standard deviation, number of joint points, number of edges, and total edge length
[0156] Number of pictures 2000 Total number of cracks 2897 <![CDATA[The mean μ1 of σ(Θ)]]> 0.1854 <![CDATA[Standard deviation σ(Θ), σ1]]> 0.1628 <![CDATA[J mean μ2]]> 0.1346 <![CDATA[J standard deviation σ2]]> 0.4068 <![CDATA[L mean μ3]]> 149.9493 <![CDATA[L standard deviation σ3]]> 145.4438 <![CDATA[|E| mean μ4]]> 13.2506 <![CDATA[|E| Standard deviation σ4]]> 11.4275
[0157] Figure 11 Among them, the abscissa represents the crack complexity, and the ordinate represents the number in the corresponding complexity interval. From Figure 11 It can be observed that most of the crack complexities are very low, and 80.98% of the crack complexities C ∈ [0, 2]. This indicates that most of the cracks in this dataset have a low complexity level.
[0158] Based on the obtained undirected graph G, a parameterized crack structure morphology model can be easily obtained, and then the shape category of the crack can be determined and the crack complexity can be evaluated. The crack shapes are divided into linear cracks, curved cracks, and tree-shaped cracks. If the angle of the crack development direction remains unchanged and no bifurcation occurs, it is classified as a linear crack; if the angle of the crack development direction changes and no bifurcation occurs, it is classified as a curved crack; if a bifurcation appears in the crack development direction, it is classified as a tree-shaped crack. If it cannot be classified into the above categories, it is classified as other cracks.
[0159] First, perform a depth-first traversal of the structure graph G corresponding to the crack, and count the degrees of each node in G. If the degrees of all nodes are less than or equal to 2, the crack is a linear crack or a curved crack, that is, G is a single-branch tree; if G has a unique node with a degree greater than or equal to 3, the crack is a tree-shaped crack; otherwise, the crack is a general crack. At the same time, perform a depth-first traversal to count the included angles of the adjacent edges of each node in the single-branch tree G to further distinguish whether the crack is a linear crack or a curved crack. If the included angle between any two edges does not exceed the specified angle, the crack is a linear crack. Otherwise, the crack is a curved crack.
[0160] Furthermore, linear cracks can be further divided into transverse cracks and longitudinal cracks
[31] , where the transverse cracks are basically perpendicular to the road center line, and the longitudinal cracks are basically parallel to the route direction; according to the number of nodes with a degree of 2 and adjacent edges with a relatively large included angle, curved cracks can be further subdivided into L-shaped cracks, C-shaped cracks, and other curved cracks; similarly, according to the number of nodes with a degree of 3 or 4, tree-shaped cracks can be further subdivided into T-shaped cracks, cross-shaped cracks, and other tree-shaped cracks.
[0161] In the actual business scenario, since the crack structure graph obtained by MSTF can quantitatively analyze the morphological structure of the crack, therefore, only by giving the geometric properties corresponding to the required morphology, the number of crack morphology categories can be customized and increased or decreased as needed. There is no need to relabel the crack shape categories and retrain like machine learning methods such as neural networks and SVM.
[0162] Classify the crack shapes in the test dataset, and the obtained results are shown in Table 2.
[0163] Table 2 Quantity table of crack shapes
[0164]
[0165] As can be seen from the data in Table 2, the proportions of simple transverse cracks and longitudinal cracks are 28.53% and 48.49% respectively, far exceeding the remaining crack types. This is consistent with the conclusion of the crack complexity assessment in this embodiment: most cracks have a very low complexity. In other words, simply from the perspective of morphological structure, most of the cracks in this dataset have a low degree of damage.
[0166] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.
Claims
1. A method for fitting, analyzing and evaluating the complexity of road crack patterns, characterized in that, It includes the following steps: Step 1: Apply the opening operation to the binary image of road cracks to filter out noise regions; Step 2: Apply the closing operation to the binary image of road cracks, and splice the connected regions with a distance less than the set threshold as the same crack region of the binary image; Step 3: Detect the contours of all connected regions as crack regions, and separate each connected region to ensure that the subsequent algorithm only processes a single connected region; Step 4: For a single connected region, downsample the region pixels, and use the medial axis transformation to thin the connected region to obtain the internal skeleton of the connected region; Step 5: Detect the feature points of the connected region skeleton; Step 6: Judge whether all feature points are connected to each other: if so, use the minimum spanning tree to connect the feature points; if there are unconnected feature points, use the minimum spanning tree to connect the feature points for each connected component respectively to obtain a spanning forest, and finally merge the spanning forests to form a connected graph to obtain a new minimum spanning tree; Step 7: Depth-first traverse the new minimum spanning tree and simplify it to obtain an undirected graph that can describe the morphological analysis and complexity of road cracks; Step 8: Count the degrees of each node and the orientations of the edges in the undirected graph, and then the type of road crack can be judged; Step 9: Count the number of edges, the number of articulation points in the undirected graph, and the weighted average of the orientations of all edges, and then the complexity of the road crack can be quantified.
2. The method for fitting, analyzing and evaluating the complexity of road crack patterns according to claim 1, wherein In Step 4, the medial axis transformation is a process of continuously eliminating pixels, and the specific process is as follows: First, the following definitions are made: Traverse the binary image P of a single connected region, where all pixel points px of the binary image P i,j take values of 0 and 1; when traversing to px i,j , determine whether px i,j needs to be deleted; mark the 8-neighborhood of px i,j in clockwise order as: Seq = {px i-1,j-1 , px i,j-1 , px i+1,j-1 , px i+1,j , px i+1,j+1 , px i,j+1 , px i-1,j+1 , px i-1,j}; Let neighbor(px i,j ) be the sum of pixel values in the 8-neighborhood of px i,j , and circle(px i,j ) be the number of 0-1 in the 8-neighborhood of px i,j according to the marked order sequence 0-1; the number of 0-1 in the order sequence is 2, so circle(px i,j ) = 2. In summary, we have: neighbor(px i,j ) = ∑ m,n=-1,0,1 px i+m,j+n -px i,j ; Traverse each point of the image, and for each point px with a pixel value of 1 i,j Make the following judgments: 1) 2 ≤ neighbor(px i,j ) ≤ 6; 2) circle(px i,j ) = 1; 3) When it is an odd-numbered iteration, determine whether px i,j-1 × px i+1,j × px i,j+1 = 0 and px i+1,j × px i,j+1 × px i-1,j = 0 hold simultaneously. If so, condition 3) is satisfied; When it is an even-numbered iteration, judge px i,j-1 ×px i+1,j ×px i-1,j =0, px i,j-1 ×px i,j+1 ×px i-1,j =0 hold simultaneously. If so, condition 3) is satisfied; If conditions 1), 2), and 3) are simultaneously satisfied, then this pixel point is deleted; loop through the image until no pixel points are deleted, then the medial axis transformation process is completed, and finally the skeleton binary image of the thinned crack structure is obtained.
3. The method for fitting, analyzing and evaluating the complexity of road crack morphology according to claim 1, characterized in that Step 5, the detection of the feature points of the connected region skeleton is carried out in the following way: Use a fixed window to slide in any direction on the skeleton binary image of the crack structure, and compare the degree of change in pixel gray level within the window before and after sliding: if there is sliding in any direction and the gray level change value is greater than the set value, then it is considered that there are corner feature points in this window.
4. The method for fitting, analyzing and evaluating the complexity of road crack patterns according to claim 1, characterized in that In Step 6, let the crack structure graph G have n connected components, SG=(V,E) be a connected component of G, and T=(U,TE) be the minimum spanning tree of SG, where V and E respectively represent the vertex set and edge set of the connected component, and U and TE respectively represent the vertex set and edge set of the corresponding minimum spanning tree; then the prim algorithm for constructing the minimum spanning tree T starting from vertex v from SG is as follows: (1) Initialize U={v}, V=V-U; (2) Repeat the following steps until all nodes in V are added to U: ① Select a node u from U * and a node v from V * such that a node is selected from each of the two sets U and V to be connected, and the edge has the minimum weight; ② Add to TE: ③ Add v * to U: U = U ∪ {v *}; ④ Remove v * Remove from V: V = V - {v *}; The minimum spanning tree T of the connected component SG can be obtained; by using the Prim algorithm for each connected component, the minimum spanning forest F = {T i | 1 ≤ i ≤ n} can be obtained.
5. The method for fitting, analyzing and evaluating the complexity of road crack morphology according to claim 1, wherein In Step 6, the merging of the spanning forests to form a connected graph to obtain a new minimum spanning tree is specifically as follows: First, regard all the edges of the connected components as a pixel point set, and calculate the shortest distance between any two pixel point sets; Secondly, use the endpoints of the connection line segment corresponding to the shortest distance as new nodes to be added to the connected component; Finally, use the connection line segment as a new edge to reorganize multiple connected components into a connected graph.
6. The method for fitting, analyzing and complexity evaluating the road crack morphology according to claim 1, characterized in that In Step 7, the depth-first traversal and simplification of the new minimum spanning tree are specifically as follows: (1) For the crack structure diagram G, select the node v with degree 1 start as the starting node for depth - first traversal; (2) If the current node v reached by depth - first traversal current has a degree d(v current ) ≠ 2, then retain v current ; (3) If the current node v reached by the depth-first traversal current has a degree d(v current ), it means that v current has two adjacent edges e pre , e next , and two adjacent nodes v pre , v next , where v pre is the node that has been visited in the previous depth-first traversal, v next is the next node to be visited, and e pre =(v pre ,v current )#(3 - 27) e next = (v current , v next ) #(3 - 28) Judge the included angle between two edges e pre , e next . If i.e., the included angle of e pre , e next is then retain v current and continue traversing; otherwise delete v current , and at the same time connect v pre , v next , and continue traversing; After depth-first traversal of all nodes, the final simplified result is obtained.
7. A server, the server comprising a processor and a memory, wherein at least one program is stored in the memory, characterized in that, The program is loaded and executed by the processor to implement the road crack morphology fitting, analysis and complexity evaluation method according to any one of claims 1 to 6.
8. A computer-readable storage medium, in which at least one program is stored, characterized in that, The program is loaded and executed by the processor to implement the road crack morphology fitting, analysis and complexity evaluation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Asphalt pavement crack type rapid classification method
CN110929757A
Crack statistical classification method, device and equipment based on image recognition
CN115620059A
Seam network complexity quantitative description method and device based on topological structure
CN117150704A
AI visual inspection method and system for concrete structure crack identification and analysis
CN117876381A
Structural crack identification method and system based on data fusion and morphological expansion
CN118196593A