Asphalt pavement intersection crack segmentation method and system
By setting search rules and algorithm analysis, the endpoints and nodes of cross cracks in asphalt pavement are accurately identified. Combined with first-order linear fitting and distance threshold, the automatic segmentation and classification of cross cracks are realized, solving the problems of low efficiency and insufficient accuracy in traditional methods. It is suitable for large-scale asphalt pavement inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ROADMAINT CO LTD
- Filing Date
- 2025-10-15
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies struggle to accurately identify and classify cross cracks on asphalt pavements. Traditional manual inspection is inefficient and highly subjective, while machine vision technology lacks an effective endpoint and node determination mechanism, making it impossible to accurately identify intersections and extension directions. This results in easily biased fitted lines, making it difficult to separate cross cracks and classify them accurately.
The algorithm uses a set search rule to determine the crack endpoints and nodes, combines depth-first search or breadth-first search algorithms to analyze connectivity, determines the crack direction based on first-order linear fitting, creates a fitted straight line using the least squares method, and segments the crack by combining a distance threshold.
It enables accurate identification and classification of cross cracks, reduces the labor intensity of manual inspection, improves the efficiency of crack treatment, adapts to the inspection needs of asphalt pavement under different working conditions, and provides refined crack information for pavement distress assessment and maintenance.
Smart Images

Figure CN121639710B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of pavement distress identification technology, specifically relating to a method and system for segmenting cross cracks in asphalt pavement. Background Technology
[0002] During highway maintenance, asphalt pavement is widely used due to its excellent road performance. However, during its service life, it is prone to defects such as cracking, block cracks, longitudinal cracks, and transverse cracks due to the effects of vehicle load, natural environment, and material aging. Among these, cross cracks are difficult to accurately identify and classify due to their complex shape.
[0003] According to the "Highway Technical Condition Assessment Standard" (JTG 5210-2018), asphalt pavement cracks need to be classified according to type for targeted maintenance. However, in actual engineering projects, cracks often exist in an intersecting form, breaking the characteristics of a single crack and making it difficult for traditional identification methods to accurately distinguish boundaries and types. Traditional manual inspection is inefficient and highly subjective, and its accuracy in classifying intersecting cracks is insufficient. Existing machine vision automatic recognition technology has been applied in the detection of single cracks, but for intersecting cracks, it lacks an effective endpoint and node determination mechanism, cannot accurately identify intersection points and extension directions, and the fitted lines are prone to deviation, making it difficult to separate and accurately classify intersecting cracks. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a method and system for dividing cross cracks in asphalt pavement, so as to solve or partially solve the problems mentioned in the background art.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for segmenting cross cracks in asphalt pavement, comprising the following steps:
[0006] Read the crack mesh identification results, which include the coordinates of the crack mesh center point, and load the data from the crack mesh identification results into a data carrier;
[0007] Based on the crack mesh identification results in the data carrier, crack endpoints are determined using set search rules. The set search rules include single-row crack search rules and double-row crack search rules. Single-row crack endpoints are determined using the single-row crack search rules, and double-row crack endpoints are determined using the double-row crack search rules.
[0008] Based on the crack mesh identification results in the data carrier, crack nodes are determined using a set judgment rule. The set judgment rule first creates a two-dimensional mesh and marks the crack point location, then traverses the mesh through structural elements to mark blocky and non-blocky regions. In the non-blocky regions, a connectivity judgment method is used to search for nodes and filter out redundant nodes.
[0009] Based on the determined crack endpoints and crack nodes, a depth-first search algorithm or a breadth-first search algorithm is used to determine the connectivity between the crack endpoints and crack nodes. A data point connectivity table is constructed based on the connectivity between the crack endpoints and crack nodes. The connection direction is preset to check whether the crack endpoints can reach the crack nodes, and the connectivity results are output.
[0010] Based on the connectivity results, a first-order linear fit is performed on the crack endpoints and crack nodes, and the least squares method is used to create a fitted straight line and extract the slope of the line. The crack direction is determined based on the slope.
[0011] Crack segmentation is performed based on the first-order linear fitting result and the determined crack direction. Crack segmentation is based on the distance from the data point to the fitted line and a set distance threshold to determine whether the data point is near the fitted line.
[0012] As a preferred method for segmenting cross cracks in asphalt pavement, the crack mesh identification results are read from a txt input file, and the data carrier for loading the data is a two-dimensional array. The data loaded into the two-dimensional array is preprocessed to remove data whose coordinates exceed the pavement detection range and duplicate data.
[0013] As a preferred method for segmenting cross cracks in asphalt pavement, the single-row crack search rule is as follows:
[0014] Two pixels that are connected and satisfy 8-neighbor connectivity equal to 1 or 8-neighbor connectivity equal to 2 are considered adjacent. Adjacent pixels conform to a preset connectivity combination, which includes combinations of top and top right, top right and right, right and bottom right, bottom right and bottom, bottom and bottom left, bottom left and left, left and top left, and top left and top.
[0015] The double-row crack search rule is as follows:
[0016] First, check whether all pixels within a square area centered at a specified location are crack points. Then, define the outer neighborhood of the pixels within the square area and check whether the connected points of the outer neighborhood are adjacent. If they are adjacent, they are determined to be endpoints, and the farthest points among the pixels within the square area are modified as endpoints. Different connected directions correspond to different farthest points.
[0017] As a preferred method for segmenting cross cracks in asphalt pavement, the structural element is a 4×4 structural element, and the connectivity determination method used is the T-shaped connectivity determination method; the rule for filtering redundant nodes is: if the distance between two nodes is less than or equal to a preset distance, then only one node is retained;
[0018] When traversing a mesh using a structuring element, if the mesh edge region is smaller than the structuring element size, the traversal check is performed based on the actual size of the edge region.
[0019] As a preferred scheme for the segmentation method of cross cracks in asphalt pavement, in the process of constructing a data point connectivity table based on the connectivity of the crack endpoints and the crack nodes, the constructed data point connectivity table is an adjacency table. When constructing the adjacency table, the coordinates of each data point are used as an index to record the data points that exist within the preset connection direction range. The preset connection direction is an 8-neighborhood direction, including up, down, left, right, upper left, upper right, lower left, and lower right.
[0020] Based on the connectivity results, during the first-order linear fitting process for the crack endpoints and crack nodes, the fitting operation is carried out according to the connectivity status, specifically as follows:
[0021] Perform a first-order linear fit between the endpoints connected to the node, and perform a first-order linear fit between the endpoints that are not connected to the node but are connected to each other.
[0022] When creating a fitted line using the least squares method, a polynomial object is created by finding the polynomial that minimizes the sum of squared errors between the polynomial curve and the data points. This polynomial object is the fitted line, and the slope is extracted from the fitting result.
[0023] As a preferred method for segmenting cross cracks in asphalt pavement, the rule for determining the crack direction based on the slope is as follows: when the absolute value of the slope is greater than 1, it is determined to be a longitudinal crack; when the absolute value of the slope is less than 1, it is determined to be a transverse crack.
[0024] The distance threshold is set and adjusted according to the actual application scenario. When adjusting, factors such as road surface detection accuracy, crack width and image resolution are taken into account, and the optimal threshold is determined through multiple experiments.
[0025] As a preferred method for segmenting cross cracks in asphalt pavements, the crack segmentation process based on the first-order linear fitting result and the determined crack direction specifically includes:
[0026] 1) Prepare basic data, which includes crack endpoints, crack nodes, crack data point matrix, crack data points excluding blocky regions, and all crack data points. When there are cracks in the crack data point matrix, the corresponding positions are marked with a specified value.
[0027] 2) Use a depth-first search algorithm to determine the connectivity between crack endpoints and crack nodes;
[0028] 3) For crack endpoints that are not connected to crack nodes, further determine the connectivity between crack endpoints;
[0029] 4) For crack endpoints that are not connected to crack nodes but are connected to each other, a straight line between the two points is obtained by first-order linear fitting. Based on the vertical distance from the point to the straight line, data points near the fitted straight line are selected from the crack data points in the blocky region as the segmented crack data points. At the same time, the crack data points in the blocky region are updated and the data points that have participated in the judgment are deleted.
[0030] 5) For the crack endpoints connected to the crack nodes, fit a straight line between the crack endpoints and the crack nodes. Based on the vertical distance from the point to the straight line, filter crack data points from the crack data points in the removed block regions, update the crack data points in the removed block regions, and complete the crack segmentation.
[0031] When updating and removing crack data points in blocky regions, a mark-and-delete method is used to mark the identified data points; when there is a crack in the crack data point matrix, the corresponding mark value is 1.
[0032] Secondly, the present invention provides an asphalt pavement cross-crack segmentation system, comprising:
[0033] The data reading module is used to read the crack mesh identification results, which include the coordinates of the center point of the crack mesh, and to load the data in the crack mesh identification results into the data carrier.
[0034] The endpoint determination module is used to determine the crack endpoints based on the crack mesh identification results in the data carrier by using a set search rule. The set search rule includes a single-row crack search rule and a double-row crack search rule. The single-row crack endpoints are determined by the single-row crack search rule, and the double-row crack endpoints are determined by the double-row crack search rule.
[0035] The node determination module is used to determine crack nodes based on the crack mesh identification results in the data carrier by using a set determination rule. The set determination rule first creates a two-dimensional mesh and marks the crack point location, then traverses the mesh through structural elements to mark blocky regions and non-blocky regions, and uses a connectivity determination method to search for nodes in non-blocky regions and filters out redundant nodes.
[0036] The connectivity analysis module is used to determine the connectivity between the determined crack endpoints and crack nodes using a depth-first search algorithm or a breadth-first search algorithm, construct a data point connectivity table based on the connectivity between the crack endpoints and crack nodes, check whether the crack endpoints can reach the crack nodes through a preset connection direction, and output the connectivity results.
[0037] The linear fitting module is used to perform first-order linear fitting on the crack endpoints and crack nodes based on the connectivity results, and to create a fitted straight line using the least squares method and extract the slope of the straight line, and to determine the crack direction based on the slope.
[0038] The crack segmentation module is used to segment cracks based on the first-order linear fitting result and the determined crack direction. The crack segmentation determines whether the data point is near the fitted line based on the distance from the data point to the fitted line and a set distance threshold.
[0039] As a preferred solution for the asphalt pavement cross-crack segmentation system, the crack mesh identification results read in the data reading module are derived from a txt input file. The data carrier for loading the data is a two-dimensional array. The data loaded into the two-dimensional array is preprocessed to remove data whose coordinates exceed the pavement detection range and duplicate data.
[0040] As a preferred solution for the asphalt pavement cross-crack segmentation system, the single-row crack search rule in the endpoint determination module is as follows:
[0041] Two pixels that are connected and satisfy 8-neighbor connectivity equal to 1 or 8-neighbor connectivity equal to 2 are considered adjacent. Adjacent pixels conform to a preset connectivity combination, which includes combinations of top and top right, top right and right, right and bottom right, bottom right and bottom, bottom and bottom left, bottom left and left, left and top left, and top left and top.
[0042] In the endpoint determination module, the double-row crack search rule is as follows:
[0043] First, check whether all pixels within a square area centered at a specified location are crack points. Then, define the outer neighborhood of the pixels within the square area and check whether the connected points of the outer neighborhood are adjacent. If they are adjacent, they are determined to be endpoints, and the farthest points among the pixels within the square area are modified as endpoints. Different connected directions correspond to different farthest points.
[0044] As a preferred solution for the asphalt pavement cross-crack segmentation system, the node determination module includes:
[0045] The structuring element is a 4×4 structuring element, and the connectivity determination method used is the T-shaped connectivity determination method; the rule for filtering redundant nodes is: if the distance between two nodes is less than or equal to the preset distance, then only one node is retained; when traversing the mesh using the structuring element, if the mesh edge region is smaller than the size of the structuring element, then the traversal check is based on the actual size of the edge region.
[0046] As a preferred solution for the asphalt pavement cross-crack segmentation system, the connectivity analysis module includes:
[0047] The constructed data point connectivity table is an adjacency table. When constructing the adjacency table, the coordinates of each data point are used as the index to record the data points that exist within the preset connection direction range. The preset connection direction is an 8-neighborhood direction, including up, down, left, right, upper left, upper right, lower left, and lower right.
[0048] As a preferred solution for the asphalt pavement cross-crack segmentation system, the linear fitting module includes:
[0049] Perform a first-order linear fit between the endpoints connected to the node, and perform a first-order linear fit between the endpoints that are not connected to the node but are connected to each other.
[0050] When creating a fitted line using the least squares method, a polynomial object is created by finding the polynomial that minimizes the sum of squared errors between the polynomial curve and the data points. This polynomial object is the fitted line, and the slope is extracted from the fitting result.
[0051] In the linear fitting module, the rule for determining the direction of a crack based on its slope is as follows: when the absolute value of the slope is greater than 1, it is determined to be a longitudinal crack; when the absolute value of the slope is less than 1, it is determined to be a transverse crack.
[0052] The distance threshold is set and adjusted according to the actual application scenario. When adjusting, factors such as road surface detection accuracy, crack width and image resolution are taken into account, and the optimal threshold is determined through multiple experiments.
[0053] Thirdly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for segmenting cross cracks in asphalt pavement as described in the first aspect or any possible implementation thereof.
[0054] Fourthly, the present invention provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform steps in the asphalt pavement cross-crack segmentation method of the first aspect or any possible implementation thereof.
[0055] The beneficial effects of the technical solution provided by this invention are as follows:
[0056] First, this invention determines the endpoints and nodes of cracks by setting specific rules, analyzes the connectivity of endpoints and nodes by combining depth-first search or breadth-first search algorithms, and then determines the crack direction and completes the segmentation based on first-order linear fitting. This can accurately identify the intersection points, extension paths and boundaries of intersecting cracks, effectively solving the problems of difficult segmentation and misclassification of types of intersecting cracks in traditional technologies, and providing a reliable basis for accurate crack classification.
[0057] Secondly, from data loading of crack mesh identification results to endpoint node determination, connectivity analysis, linear fitting and crack segmentation, this invention constructs a fully automated processing mechanism that can complete cross crack segmentation without manual intervention, greatly reducing the labor intensity of manual inspection and significantly improving crack processing efficiency. It is suitable for large-scale asphalt pavement crack detection scenarios.
[0058] Third, in crack endpoint determination, search rules are designed separately for single-row cracks and double-row cracks; in connectivity analysis, depth-first search and breadth-first search algorithms can be switched; in crack segmentation, the distance threshold can be adjusted according to actual scenarios such as pavement detection accuracy and crack width to avoid the limitations of fixed rules and enable the technology to adapt to the needs of asphalt pavement cross crack treatment under different working conditions.
[0059] Fourth, this invention achieves accurate classification of longitudinal and transverse cracks through slope determination. The segmentation results can accurately reflect the actual shape and type information of the cracks, providing refined data for subsequent pavement distress level assessment and maintenance plan formulation, which helps to extend the service life of asphalt pavement and reduce maintenance costs.
[0060] Fifth, this invention standardizes the entire data processing logic from crack mesh data reading and preprocessing to data point screening and updating. By marking and deleting identified data points, it avoids duplicate analysis, improves data processing efficiency and accuracy, and facilitates subsequent data backtracking and result verification, ensuring the reliability of crack segmentation results. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in this invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0062] Figure 1 This is a schematic diagram of the process for dividing cross cracks in asphalt pavement according to an embodiment of the present invention;
[0063] Figure 2 This is a schematic diagram of the T-shaped connection in the asphalt pavement cross crack segmentation method provided in the embodiment of the present invention;
[0064] Figure 3 This is a schematic diagram of the first-order linear fitting and crack determination results in the asphalt pavement cross-crack segmentation method provided in the embodiment of the present invention.
[0065] Figure 4 This is a schematic diagram of the crack segmentation result in the asphalt pavement cross crack segmentation method provided in the embodiment of the present invention;
[0066] Figure 5 This is a schematic diagram of an asphalt pavement cross-crack segmentation system provided in an embodiment of the present invention;
[0067] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0069] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this invention should have the ordinary meaning understood by those skilled in the art to which this invention pertains. The terms "comprising" or "including," or similar words used in the embodiments of this invention, mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects.
[0070] In the field of highway infrastructure maintenance, asphalt pavement is widely used in the construction of highways at all levels due to its excellent road performance. However, due to repeated vehicle loads, long-term effects from the natural environment (such as temperature changes and precipitation erosion), and aging of pavement materials, asphalt pavement is prone to various cracks and defects during its service life. These cracks not only affect the smoothness of the pavement and driving comfort, but also allow rainwater to seep into the pavement structure, accelerating the damage to the base and subbase layers and shortening the pavement's service life. Therefore, accurate identification and classification of asphalt pavement cracks is a key prerequisite for pavement maintenance decisions.
[0071] According to the specifications of the "Highway Technical Condition Assessment Standard" (JTG5210-2018), asphalt pavement cracks need to be classified into different types such as alligator cracks, block cracks, longitudinal cracks, and transverse cracks. The causes, development patterns, and maintenance methods of each type of crack differ significantly, and accurate classification is the foundation for subsequent targeted maintenance operations. However, in actual engineering scenarios, asphalt pavement cracks often do not exist independently in a single form. Due to the complex service environment and the coupling effect of multiple factors, different types of cracks easily form intersecting patterns (such as longitudinal cracks intersecting with transverse cracks, cracks intersecting with the edges of alligator crack areas, etc.). The existence of such intersecting cracks disrupts the morphological characteristics of a single crack, making it difficult for traditional crack identification methods to accurately distinguish crack boundaries and types.
[0072] In existing asphalt pavement crack identification technologies, traditional manual inspection methods rely on on-site observation and experience judgment by inspectors, which is not only inefficient and labor-intensive, but also susceptible to subjective factors, making it difficult to guarantee the accuracy of segmentation and classification of intersecting cracks. Although machine vision-based automatic identification technology has achieved some application in single crack detection, for intersecting crack scenarios, existing algorithms mostly lack effective endpoint and node determination mechanisms, and cannot accurately identify the intersection points and extension directions of intersecting cracks. This leads to deviations in the fitted crack lines, making it difficult to effectively segment intersecting cracks, and consequently, it is impossible to accurately classify them into specific crack types such as longitudinal or transverse.
[0073] Furthermore, existing technologies do not make full use of crack mesh data in the crack data processing process, and lack a systematic process from data loading and feature extraction to connectivity analysis, making it difficult to efficiently process complex crack data. At the same time, in the determination of crack direction and the setting of segmentation threshold, fixed rules or empirical values are mostly used, without considering adaptive adjustments under different road conditions and detection accuracy requirements, which further affects the universality and accuracy of cross crack segmentation.
[0074] It is evident that current asphalt pavement crack identification technology has significant shortcomings in the segmentation and classification of intersecting cracks, failing to meet the needs of pavement maintenance for refined crack evaluation. There is an urgent need to develop a technical solution capable of accurately determining crack endpoints and nodes, effectively analyzing connectivity, and automatically segmenting and classifying intersecting cracks, providing reliable data support for the precise maintenance of asphalt pavement cracks. The following are the specific details of an embodiment of this invention.
[0075] See Figure 1 This invention provides a method for segmenting cross cracks in asphalt pavement, comprising the following steps:
[0076] Step S1: Read the crack mesh identification results, which include the coordinates of the crack mesh center points. Load the data from the crack mesh identification results into the data carrier. The crack mesh identification results are the basic data source for all subsequent crack processing steps. The coordinates of the crack mesh center points can locate the spatial position of the crack in the road surface, providing a coordinate reference for subsequent endpoint and node determination and crack segmentation. Loading the data into the data carrier transforms the original discrete coordinate data into a structured and computable format, facilitating data retrieval, storage, and subsequent analysis operations by computer programs, and avoiding low processing efficiency or errors caused by the disorganized nature of the original data.
[0077] In step S1, the crack mesh identification result is read from a txt input file. The data carrier for loading the data is a two-dimensional array. The data loaded into the two-dimensional array is preprocessed to remove data whose coordinates exceed the road surface detection range and duplicate data.
[0078] Specifically, a TXT input file is chosen as the storage format for the crack mesh identification results. The TXT format is versatile, small in size, and easy to read, compatible with different detection devices and data processing software, facilitating data transmission and sharing between different systems. A two-dimensional array is used as the data carrier. The row and column structure of the two-dimensional array corresponds to the planar coordinate system of the road surface, and each array element can be directly associated with the coordinates of the center point of a road surface mesh, intuitively and efficiently reflecting the distribution pattern of cracks on the road surface. The data loaded into the two-dimensional array is preprocessed to remove data whose coordinates exceed the road surface detection range and to eliminate invalid interference data. This type of data may be generated due to detection equipment errors or environmental interference; retaining it would cause subsequent analysis to focus on non-target areas, affecting the accuracy of the results. Duplicate data is also removed to avoid data redundancy, reduce the computational load on the computer, and improve data processing efficiency.
[0079] Step S2: Based on the crack mesh identification results in the data carrier, crack endpoints are determined using predefined search rules. These search rules include single-row crack search rules and double-row crack search rules. Single-row crack endpoints are determined using the single-row crack search rules, and double-row crack endpoints are determined using the double-row crack search rules. Crack endpoints are the start and end positions of cracks, and determining the endpoints is a prerequisite for subsequent analysis of crack extension direction and the segmentation of intersecting cracks. Because asphalt pavement cracks, in their actual formation process, are affected by factors such as load and environment, they can exhibit two different forms: single-row and double-row. The endpoint characteristics of these two forms differ significantly. Single-row crack endpoints are often the termination of a single pixel extension, while double-row crack endpoints are the synchronous termination of two pixel lines. Therefore, separate search rules need to be designed. Corresponding rules are used for different crack forms to avoid missed or misjudged endpoints due to a fixed determination method, ensuring accurate location of endpoints regardless of crack form.
[0080] In this embodiment, in step S2, the single-row crack search rule is: two pixels that satisfy 8-neighbor connectivity equal to 1, or 8-neighbor connectivity equal to 2 and are connected are adjacent points, and adjacent points conform to a preset connectivity combination. The preset connectivity combination includes combinations of top and top right, top right and right, right and bottom right, bottom right and bottom, bottom and bottom left, bottom left and left, left and top left, and top left and top.
[0081] Among them, the 8-neighborhoods are:
[0082] (-1, 0): indicates the top edge of the current pixel.
[0083] (1, 0): indicates the bottom edge of the current pixel.
[0084] (0, -1): Indicates the left side of the current pixel.
[0085] (0, 1): indicates the right side of the current pixel.
[0086] (-1, -1): Represents the top left corner of the current pixel.
[0087] (-1, 1): Represents the top right corner of the current pixel.
[0088] (1, -1): Represents the bottom left corner of the current pixel.
[0089] (1, 1): Represents the bottom right corner of the current pixel.
[0090] To satisfy the condition that the 8-neighbor connectivity is equal to 2 and that the two connected pixels are adjacent, the connected pixels must satisfy the following connectivity combinations: (top, top right) or (top right, right) or (right, bottom right) or (bottom right, bottom) or (bottom left, bottom left) or (bottom left, top left) or (top left, top left).
[0091] Specifically, 8-neighborhood connectivity refers to the connection relationship between a given pixel and pixels in the eight directions (up, down, left, right, upper left, upper right, lower left, and lower right) in the crack. This indicator directly reflects the extension state of a pixel within the crack. When 8-neighborhood connectivity equals 1, it means that the pixel is connected to only one adjacent pixel and is at the "end" of the crack, meeting the core characteristics of an endpoint, and can therefore be directly identified as an endpoint. When 8-neighborhood connectivity equals 2, it is necessary to further determine whether the two connected pixels are "adjacent points" and meet the preset 8 connectivity combinations. If the two connected pixels are diagonally opposite, the central pixel may be an ordinary point in the crack rather than an endpoint. Only when the two connected pixels are in consecutive adjacent directions does it indicate that the central pixel is at the turning end of the crack, meeting the endpoint characteristics.
[0092] In this embodiment, in step S2, the double-row crack search rule is as follows: first, check whether all pixels in the square area centered at the specified position are crack points; then, define the outer neighborhood of the pixels in the square area, check whether the connected points of the outer neighborhood are adjacent; if they are adjacent, they are determined to be endpoints, and the far-distance points in the pixels in the square area are modified as endpoints, with different far-distance points corresponding to different connected directions.
[0093] Specifically, it checks whether the four pixel values of a square region are the same, takes the top left corner as the center point, determines whether the 2×2 square is a crack point, defines the outer 12 neighborhood of the four pixels, and checks whether the two connected points of the outer 12 neighborhood are adjacent. If they are adjacent, they are determined to be endpoints.
[0094] The 12 neighborhoods are as follows:
[0095] (-1, 0): indicates the top edge of the current pixel.
[0096] (-1, 1): Represents the top right edge of the current pixel.
[0097] (-1, 2): Represents the top two edges of the current pixel.
[0098] (0, 2): indicates the right side of the current pixel.
[0099] (1, 2): Represents the bottom right edge of the current pixel.
[0100] (2, 2): Represents the bottom right two edges of the current pixel.
[0101] (2, 1): This indicates the bottom right edge of the current pixel.
[0102] (2, 0): indicates the bottom edge of the current pixel.
[0103] (2, -1): Represents the bottom left two sides of the current pixel.
[0104] (1, -1): Represents the bottom left edge of the current pixel.
[0105] (0, -1): Indicates the left side of the current pixel.
[0106] (-1, -1): Represents the top left edge of the current pixel.
[0107] Starting from the top and top right, we sequentially check whether two neighboring regions are adjacent to determine the endpoints of the double-row cracks. Further, we modify the endpoint determination process by using the farthest point (the farthest point in the crack direction) among the four points, using different farthest points as endpoints for different connectivity directions. After this rule processing, the endpoints can be determined.
[0108] Specifically, the core characteristic of double-row cracks is that the two lines run parallel. Therefore, by first checking whether all pixels within a square area centered at a specified location are crack points, the core region of the double-row cracks can be quickly located. The square area covers the cross-sectional area of the double-line cracks. If the area contains only crack points, it indicates that the region belongs to the main part of the double-row cracks, rather than a single-row crack or isolated noise points. The outer neighborhood is defined, and the connectivity of the points is checked to determine whether the core region is at the "end" of the crack: if the connectivity of the outer neighborhood is adjacent, it indicates that the crack does not extend beyond this region, which meets the "termination characteristic" of the endpoint. The farthest point within the square area is modified as the endpoint because the endpoint of the double-row crack is the common termination position of both lines. The farthest point, i.e., the point far from the crack interior along the crack extension direction, more accurately represents the synchronous termination position of the two lines. Furthermore, different connectivity directions correspond to different farthest points, which can adapt to the endpoint characteristics of the double-row cracks under different extension directions, ensuring the accuracy of endpoint positioning.
[0109] Step S3: Based on the crack mesh identification results in the data carrier, crack nodes are determined using a set judgment rule. This rule first creates a two-dimensional mesh and marks the crack point locations. Then, it traverses the mesh using structural elements to mark blocky and non-blocky regions. In non-blocky regions, a connectivity judgment method is used to search for nodes, and redundant nodes are filtered out. Only by finding nodes can the "branching points" of intersecting cracks be clearly identified, thus distinguishing crack branches in different directions. Creating a two-dimensional mesh and marking crack point locations transforms discrete crack points into a visual mesh distribution, facilitating intuitive observation of crack intersections. Marking blocky and non-blocky regions by traversing the mesh using structural elements reveals densely intersecting crack points within blocky regions, making it difficult to accurately identify single intersecting nodes. Cracks in non-blocky regions tend to extend linearly, with clearer intersection features. Therefore, focusing on searching for nodes in non-blocky regions reduces interference from blocky regions and improves node search efficiency. Filtering out redundant nodes avoids redundant analysis caused by nodes being too close together. Redundant nodes will cause repeated calculations in subsequent connectivity analysis and linear fitting, affecting the efficiency and accuracy of crack segmentation. By filtering out redundant nodes, the most representative nodes can be retained, ensuring that subsequent steps can proceed efficiently.
[0110] In this embodiment, in step S3, the structural element is a 4×4 structural element, and the connectivity determination method used is the T-shaped connectivity determination method; the rule for filtering redundant nodes is: if the distance between two nodes is less than or equal to a preset distance, then only one node is retained; when using the structural element to traverse the mesh, if the mesh edge area is smaller than the size of the structural element, then the traversal check is based on the actual size of the edge area.
[0111] See Figure 2 A 4×4 structural element was chosen. This size effectively covers the cross-sectional area of the double-row cracks, avoiding the omission of blocky areas formed by the double-row cracks, while also preventing small non-blocky areas from being misidentified as blocky areas due to excessive size. This balances the accuracy and coverage of blocky area identification. A T-shaped connectivity determination method was employed. The intersection of intersecting cracks often forms a "T" shape. By identifying crack points conforming to the T-shaped structure—that is, crack points extending from a central crack point in three perpendicular directions—intersecting nodes can be located, avoiding the misidentification of dense, non-intersecting crack points as nodes.
[0112] The filtering rule of retaining only one node if the distance between two nodes is less than or equal to a preset distance is because nodes that are too close are often duplicates of the same intersection point, rather than multiple true intersection points. Filtering ensures that only one core node is retained at each intersection point, simplifying the subsequent analysis process. For cases where the mesh edge region is too small for the structural element size, the actual size is used for traversal and inspection to avoid missing blocky areas or nodes in the edge region. Although the edge region is small, it may still contain cracks and intersections. Skipping the inspection due to structural element size limitations will lead to missed node detection, affecting the overall segmentation result.
[0113] Step S4: Based on the determined crack endpoints and crack nodes, the connectivity of the crack endpoints and crack nodes is determined using either a depth-first search algorithm or a breadth-first search algorithm. A data point connectivity table is constructed based on the connectivity of the crack endpoints and crack nodes. The connection direction is preset to check whether the crack endpoint can reach the crack node, and the connectivity result is output. Intersecting cracks are formed by the convergence of multiple crack branches. Each branch contains one or more endpoints and nodes. Only by determining the connectivity between endpoints and nodes can the endpoints of different branches be distinguished, laying the foundation for subsequent targeted linear fitting. The depth-first search algorithm, by first delving into a branch until the endpoint and then backtracking, is suitable for exploring long-distance, linearly extending crack branches. The breadth-first search algorithm, by first traversing all surrounding adjacent points and expanding layer by layer, is suitable for exploring short-distance, densely distributed crack branches. The two algorithms can be flexibly selected according to the actual extension characteristics of the crack to ensure the comprehensiveness of the connectivity judgment. Constructing a data point connectivity table transforms the abstract connectivity relationships into structured tabular data, facilitating subsequent quick lookups of nodes corresponding to a specific endpoint or other endpoints, improving data retrieval efficiency. By checking whether the endpoints can reach the nodes through the preset connection direction, the effective range of connectivity judgment is limited. Only endpoints and nodes that can be directly reached within the preset direction belong to the same crack branch, avoiding misjudging discrete points that are not on the same branch as connected, and ensuring the accuracy of connectivity results.
[0114] In this embodiment, in step S4, during the process of constructing a data point connectivity table based on the connectivity between the crack endpoints and the crack nodes, the constructed data point connectivity table is an adjacency table. When constructing the adjacency table, the coordinates of each data point are used as an index to record the data points that exist within the preset connection direction range. The preset connection direction is an 8-neighborhood direction, including up, down, left, right, upper left, upper right, lower left, and lower right.
[0115] Specifically, choosing an adjacency list as the format for the data point connectivity table allows for efficient storage of sparse connectivity relationships. In crack data points, most points are connected to only a few neighboring points. Adjacency lists avoid storing large amounts of invalid, disconnected information, as is done with two-dimensional matrices, significantly saving storage space and improving the speed of connected point lookups. Using data point coordinates as an index, where each coordinate is a unique identifier, the target data point can be directly located, avoiding query errors caused by index confusion. The default connection direction is an 8-neighbor direction. Since the extension direction of cracks on the road surface is random, the 8-neighbor direction comprehensively covers all possible extension paths, ensuring that no connected points are missed due to direction omissions, thus guaranteeing the integrity of the connectivity record.
[0116] In the process of performing first-order linear fitting on the crack endpoints and crack nodes based on the connectivity results, the fitting operation is carried out according to the connectivity situation. Specifically, first-order linear fitting is performed between each endpoint connected to the node, and first-order linear fitting is performed between endpoints that are not connected to the node but are connected to each other. When creating the fitting line using the least squares method, a polynomial object is created by finding the polynomial that minimizes the sum of squared errors between the polynomial curve and the data points. The polynomial object is the fitting line, and the slope is extracted from the fitting result.
[0117] Specifically, fitting is categorized by connectivity because "endpoints connected to nodes" belong to the "main branches" of intersecting cracks, while "endpoints not connected to nodes but connected to each other" belong to the "independent branches" of intersecting cracks. The extension paths of these two types of branches differ; fitting them separately ensures that the fitted line for each branch accurately reflects its actual extension direction, avoiding line deviations caused by fitting points from different branches together. The least squares method is used to create the fitted line. By minimizing the sum of squared errors between the data points and the fitted line, the influence of individual noise points on the fitting result can be minimized, resulting in a line that most closely approximates the actual extension trend of the crack. Crack data points may have slight offsets due to detection errors; the least squares method can offset these offsets through error balancing, ensuring the accuracy of the fitted line. A polynomial object is created as the fitted line, transforming the fitting result into a computable mathematical model. This facilitates subsequent calculations of parameters such as the line slope and the distance from a point to the line using mathematical formulas, providing a quantitative basis for crack direction determination and segmentation. The slope is extracted because it is a core indicator reflecting the line direction, allowing for direct determination of the crack's longitudinal or transverse attributes. See the first-order linear fitting and crack determination results for details. Figure 3 .
[0118] Step S5: Based on the connectivity results, perform first-order linear fitting on the crack endpoints and crack nodes, and use the least squares method to create a fitted straight line and extract the slope of the line. Determine the crack direction based on the slope. Cracks are essentially diseases that extend linearly along a certain direction; the fitted straight line can mathematically represent their extension trend. The slope of the extracted line is directly related to the angle of inclination: the larger the absolute value of the slope, the closer the line is to the vertical direction; the smaller the absolute value of the slope, the closer the line is to the horizontal direction. Determining the crack direction by the slope transforms the abstract extension trend into a clear longitudinal / lateral classification, providing a basis for subsequent targeted maintenance according to crack type, and also providing a directional benchmark for the division of intersecting cracks.
[0119] In this embodiment, in step S5, the rule for determining the direction of the crack based on the slope is as follows: when the absolute value of the slope is greater than 1, it is determined to be a longitudinal crack; when the absolute value of the slope is less than 1, it is determined to be a transverse crack. The distance threshold is set and adjusted according to the actual application scenario. When adjusting, the optimal threshold is determined through multiple experiments, taking into account factors such as road surface detection accuracy, crack width, and image resolution.
[0120] Specifically, a slope with an absolute value greater than 1 is defined as a longitudinal crack, and a slope less than 1 as a transverse crack. This is based on the mathematical relationship between slope and the angle of inclination of a straight line: when the absolute value of the slope is greater than 1, the angle of inclination of the straight line is greater than 45°, which is closer to the vertical direction, i.e., the longitudinal direction of the road surface, along the road's extension direction; when the absolute value of the slope is less than 1, the angle of inclination of the straight line is less than 45°, which is closer to the horizontal direction, i.e., the transverse direction of the road surface, perpendicular to the road's extension direction. This rule conforms to the conventional definitions of longitudinal and transverse cracks in highway engineering, ensuring that the judgment results are consistent with the actual engineering needs. The distance threshold is a key criterion for subsequent judgment of whether a data point belongs to a certain crack and needs to be adjusted according to the actual scenario: if the road surface detection accuracy requirement is high, the threshold should be reduced to avoid misclassifying non-crack points as crack points; if the crack width is large, the threshold should be increased to ensure that points at the crack edge can be included; if the image resolution is high, even small distance differences can reflect crack characteristics, and the threshold can be appropriately reduced. The optimal threshold is determined through multiple experiments to ensure that the threshold can both cover real crack points and eliminate noise interference, thereby improving the accuracy of crack segmentation.
[0121] Step S6: Based on the first-order linear fitting result and the determined crack direction, crack segmentation is performed. Crack segmentation is based on the distance from the data point to the fitted line and a set distance threshold to determine whether the data point is near the fitted line. The closer the distance, the more likely the data point belongs to that crack branch; if the distance exceeds the threshold, the data point may belong to other crack branches or noise. By using the distance and threshold criteria, data points from different crack branches can be accurately distinguished, achieving the splitting of intersecting cracks. The core problem of intersecting cracks is that data points from different branches are mixed together. By using distance judgment, data points can be classified and filtered according to branch affiliation. Each branch corresponds to a set of fitted lines and data points, ultimately completing the segmentation of intersecting cracks and obtaining independent longitudinal or transverse crack branches.
[0122] In this embodiment, step S6, the process of crack segmentation based on the first-order linear fitting result and the determined crack direction, specifically includes:
[0123] 1) Prepare basic data, which includes crack endpoints, crack nodes, crack data point matrix, crack data points excluding blocky regions, and all crack data points. When there are cracks in the crack data point matrix, the corresponding positions are marked with a specified value.
[0124] Specifically, crack endpoints and nodes serve as "reference points" for segmentation, used to determine the location of the fitted straight line. The crack data point matrix, by "marking crack points with specified values," visually reflects the spatial distribution of crack points, facilitating rapid location of target data points. Removing crack data points from blocky regions is the core objective of segmentation. Blocky region data points are disorganized and have already been excluded in previous steps; this data improves segmentation efficiency. All crack data points are used for subsequent verification and backtracking of segmentation results. If segmentation results are abnormal, the cause of the problem can be investigated by examining all data points. The crack data point matrix is marked with specified values, distinguishing between "crack points" and "non-crack points" based on numerical differences, facilitating rapid filtering of target data by the computer program and avoiding data confusion.
[0125] 2) Use a depth-first search algorithm to determine the connectivity between crack endpoints and crack nodes;
[0126] Specifically, the connectivity analysis in the initial steps may introduce minor biases due to data preprocessing or fitting operations. Secondary judgments can correct these biases, ensuring the accuracy of connectivity relationships. A depth-first search algorithm is used because it can deeply explore the extension paths of crack branches, and is particularly suitable for long-distance branches in intersecting cracks. It can accurately confirm whether endpoints and nodes belong to the same branch, providing a reliable connectivity basis for subsequent branch-based segmentation.
[0127] 3) For crack endpoints that are not connected to crack nodes, further determine the connectivity between crack endpoints;
[0128] Specifically, endpoints not connected to nodes may belong to independent crack branches. The connectivity between these endpoints determines the extent of the independent branches. If two endpoints are connected, they belong to the same independent branch and need to be fitted with the same straight line; if they are not connected, they belong to different independent branches and need to be fitted with separate straight lines. Further determining this connectivity can prevent the endpoints of different independent branches from being mixed together for segmentation, ensuring that each independent branch can be accurately identified and split, thus improving the comprehensiveness of cross-crack segmentation.
[0129] 4) For crack endpoints that are not connected to crack nodes but are connected to each other, a straight line between the two points is obtained by first-order linear fitting. Based on the vertical distance from the point to the straight line, data points near the fitted straight line are selected from the crack data points in the blocky region as the segmented crack data points. At the same time, the crack data points in the blocky region are updated and the data points that have participated in the judgment are deleted.
[0130] Specifically, straight lines are fitted to connected independent endpoints to determine the extension direction of independent branches. Data points are filtered based on the perpendicular distance from the point to the line, as perpendicular distance most accurately reflects the proximity of the data point to the line, avoiding judgment bias caused by tilt distance. The filtered data points are used as the segmented crack data points, marking the completion of the segmentation of independent branches. Crack data points in blocky regions are updated and removed, and data points that have already participated in the judgment are deleted to prevent these data points from being repeatedly used in the segmentation of other branches. If data points whose ownership has been determined participate in the judgment again, it will cause data points from different branches to be mixed, affecting the segmentation accuracy. The deletion operation ensures that subsequent segmentation only targets data points whose ownership has not been determined, improving efficiency and accuracy.
[0131] 5) For the crack endpoints connected to the crack nodes, fit a straight line between the crack endpoints and the crack nodes. Based on the vertical distance from the point to the straight line, filter crack data points from the crack data points in the removed block regions, update the crack data points in the removed block regions, and complete the crack segmentation.
[0132] Specifically, the endpoints connected to the nodes belong to the main branches of the intersecting cracks. By fitting the straight line between the endpoints and the nodes, the extension direction of the main branch can be determined. Data points are filtered based on vertical distance to identify all data points belonging to the main branch, thus completing the segmentation of the main branch. Updating the data points and completing the segmentation signifies that all branches of the intersecting cracks have been split, ultimately resulting in multiple independent crack branches with clearly defined directions, achieving the segmentation of the intersecting cracks.
[0133] In this process, when updating and removing crack data points in blocky regions, a marker-deletion method is used, marking the identified data points. When a crack is present in the crack data point matrix, the corresponding position is marked with a value of 1. Physical deletion results in permanent data loss; if subsequent segmentation results need to be backtracked or corrected, the original data cannot be retrieved. Marker-deletion, on the other hand, only identifies the ownership status of data points through markers, while the original data is still preserved, facilitating subsequent data verification, anomaly detection, or result correction. After this process, crack segmentation is achieved, with the following effect: Figure 4 As shown, Figure 4 The diagram shows that the overall crack is divided into four crack regions. In Figures (1)-(4), the orange dots represent the specific crack regions that have been divided, the dots in the red boxes are nodes, the dots in the green triangles are endpoints, and the dots in the blue boxes are undivided crack points. It can be seen that the method of the present invention can realize the automatic calculation of crack segmentation in asphalt pavement, thereby improving the efficiency and accuracy of automatic crack segmentation.
[0134] It should be noted that the method of this embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this embodiment, and these multiple devices will interact with each other to complete the asphalt pavement cross-crack segmentation method.
[0135] It should be noted that the above description describes some embodiments of the present invention. In some cases, the described actions or steps can be performed in a different order than that shown in the above embodiments and the desired result can still be achieved. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0136] See Figure 5 Based on the same inventive concept, corresponding to any of the above embodiments, this invention also provides an asphalt pavement cross-crack segmentation system, comprising:
[0137] The data reading module 100 is used to read the crack mesh identification results, which include the coordinates of the center point of the crack mesh, and to load the data in the crack mesh identification results into the data carrier.
[0138] Endpoint determination module 200 is used to determine crack endpoints based on the crack mesh identification results in the data carrier by using set search rules. The set search rules include single-row crack search rules and double-row crack search rules. Single-row crack endpoints are determined by the single-row crack search rules, and double-row crack endpoints are determined by the double-row crack search rules.
[0139] The node determination module 300 is used to determine crack nodes based on the crack mesh identification results in the data carrier by using a set determination rule. The set determination rule first creates a two-dimensional mesh and marks the crack point location, then traverses the mesh through structural elements to mark blocky regions and non-blocky regions, and uses a connectivity determination method to search for nodes in non-blocky regions and filters out redundant nodes.
[0140] The connectivity analysis module 400 is used to determine the connectivity between the determined crack endpoints and the determined crack nodes using a depth-first search algorithm or a breadth-first search algorithm, construct a data point connectivity table based on the connectivity between the crack endpoints and the crack nodes, check whether the crack endpoints can reach the crack nodes through a preset connection direction, and output the connectivity results.
[0141] The linear fitting module 500 is used to perform first-order linear fitting on the crack endpoints and crack nodes based on the connectivity results, and to create a fitted straight line using the least squares method and extract the slope of the straight line, and to determine the crack direction based on the slope.
[0142] The crack segmentation module 600 is used to segment cracks based on the first-order linear fitting result and the determined crack direction. The crack segmentation determines whether the data point is near the fitted line based on the distance from the data point to the fitted line and a set distance threshold.
[0143] In this embodiment, the crack mesh identification result read by the data reading module 100 comes from a txt input file. The data carrier for loading the data is a two-dimensional array. The data loaded into the two-dimensional array is preprocessed to remove data whose coordinates exceed the road surface detection range and duplicate data.
[0144] In this embodiment, the single-row crack search rule in the endpoint determination module 200 is as follows:
[0145] Two pixels that are connected and satisfy 8-neighbor connectivity equal to 1 or 8-neighbor connectivity equal to 2 are considered adjacent. Adjacent pixels conform to a preset connectivity combination, which includes combinations of top and top right, top right and right, right and bottom right, bottom right and bottom, bottom and bottom left, bottom left and left, left and top left, and top left and top.
[0146] In the endpoint determination module 200, the double-row crack search rule is as follows:
[0147] First, check whether all pixels within a square area centered at a specified location are crack points. Then, define the outer neighborhood of the pixels within the square area and check whether the connected points of the outer neighborhood are adjacent. If they are adjacent, they are determined to be endpoints, and the farthest points among the pixels within the square area are modified as endpoints. Different connected directions correspond to different farthest points.
[0148] In this embodiment, the node determination module 300 includes:
[0149] The structuring element is a 4×4 structuring element, and the connectivity determination method used is the T-shaped connectivity determination method; the rule for filtering redundant nodes is: if the distance between two nodes is less than or equal to the preset distance, then only one node is retained; when traversing the mesh using the structuring element, if the mesh edge region is smaller than the size of the structuring element, then the traversal check is based on the actual size of the edge region.
[0150] In this embodiment, the connectivity analysis module 400 includes:
[0151] The constructed data point connectivity table is an adjacency table. When constructing the adjacency table, the coordinates of each data point are used as the index to record the data points that exist within the preset connection direction range. The preset connection direction is an 8-neighborhood direction, including up, down, left, right, upper left, upper right, lower left, and lower right.
[0152] In this embodiment, the linear fitting module 500 includes:
[0153] Perform a first-order linear fit between the endpoints connected to the node, and perform a first-order linear fit between the endpoints that are not connected to the node but are connected to each other.
[0154] When creating a fitted line using the least squares method, a polynomial object is created by finding the polynomial that minimizes the sum of squared errors between the polynomial curve and the data points. This polynomial object is the fitted line, and the slope is extracted from the fitting result.
[0155] In the linear fitting module 500, the rule for determining the direction of a crack based on the slope is as follows: when the absolute value of the slope is greater than 1, it is determined to be a longitudinal crack; when the absolute value of the slope is less than 1, it is determined to be a transverse crack.
[0156] The distance threshold is set and adjusted according to the actual application scenario. When adjusting, factors such as road surface detection accuracy, crack width and image resolution are taken into account, and the optimal threshold is determined through multiple experiments.
[0157] The system described in the above embodiments is used to implement a corresponding method for dividing cross cracks in asphalt pavement in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0158] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for segmenting cross cracks in asphalt pavement as described in any of the above embodiments.
[0159] Figure 6 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 710, a memory 720, an input / output interface 730, a communication interface 740, and a bus 750. The processor 710, memory 720, input / output interface 730, and communication interface 740 are interconnected internally via the bus 750.
[0160] The processor 710 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0161] The memory 720 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 720 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 720 and is called and executed by the processor 710.
[0162] The input / output interface 730 is used to connect input / output modules to enable information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0163] The communication interface 740 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0164] Bus 750 includes a pathway for transmitting information between various components of the device, such as processor 710, memory 720, input / output interface 730, and communication interface 740.
[0165] It should be noted that although the above-described device only shows the processor 710, memory 720, input / output interface 730, communication interface 740, and bus 750, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0166] The electronic devices described above are used to implement a corresponding method for dividing cross cracks in asphalt pavement in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0167] Based on the same inventive concept, corresponding to any of the above embodiments, the present invention also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute an asphalt pavement cross-crack segmentation method as described in any of the above embodiments.
[0168] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0169] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute a method for dividing cross cracks in asphalt pavement as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0170] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention is limited to these examples; within the framework of the invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity.
[0171] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of the invention, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of the invention, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of the invention will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of the invention, it will be apparent to those skilled in the art that the embodiments of the invention may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0172] Although the invention has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAMDRAM) may be used with the embodiments discussed.
[0173] The embodiments of this invention are intended to cover all such substitutions, modifications, and variations falling within the scope of the claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this invention should be included within the scope of protection of this invention.
Claims
1. A method for segmenting cross cracks in asphalt pavement, characterized in that, Includes the following steps: Read the crack mesh identification results, which include the coordinates of the crack mesh center point, and load the data from the crack mesh identification results into a data carrier; Based on the crack mesh identification results in the data carrier, crack endpoints are determined using set search rules. The set search rules include single-row crack search rules and double-row crack search rules. Single-row crack endpoints are determined using the single-row crack search rules, and double-row crack endpoints are determined using the double-row crack search rules. The single-row crack search rule is as follows: two pixels that are connected and satisfy 8-neighbor connectivity equal to 1 or 8-neighbor connectivity equal to 2 are adjacent points, and the adjacent points conform to a preset connectivity combination. The preset connectivity combination includes combinations of top and top right, top right and right, right and bottom right, bottom right and bottom, bottom and bottom left, bottom left and left, left and top left, and top left and top. The double-row crack search rule is as follows: First, check whether all pixels in the square area centered at the specified position are crack points. Then, define the outer neighborhood of the pixels in the square area and check whether the connected points of the outer neighborhood are adjacent. If they are adjacent, they are determined to be endpoints, and the far-distance points in the pixels in the square area are modified as endpoints. Different connected directions correspond to different far-distance points. Based on the crack mesh identification results in the data carrier, crack nodes are determined using a set judgment rule. The set judgment rule first creates a two-dimensional mesh and marks the crack point location, then traverses the mesh through structural elements to mark blocky and non-blocky regions. In the non-blocky regions, a connectivity judgment method is used to search for nodes and filter out redundant nodes. Based on the determined crack endpoints and crack nodes, a depth-first search algorithm or a breadth-first search algorithm is used to determine the connectivity between the crack endpoints and crack nodes. A data point connectivity table is constructed based on the connectivity between the crack endpoints and crack nodes. The connection direction is preset to check whether the crack endpoints can reach the crack nodes, and the connectivity results are output. Based on the connectivity results, a first-order linear fit is performed on the crack endpoints and crack nodes, and the least squares method is used to create a fitted straight line and extract the slope of the line. The crack direction is determined based on the slope. Crack segmentation is performed based on the first-order linear fitting result and the determined crack direction. Crack segmentation is based on the distance from the data point to the fitted line and a set distance threshold to determine whether the data point is near the fitted line.
2. The method for segmenting cross cracks in asphalt pavement according to claim 1, characterized in that, The crack mesh identification results are read from a txt input file. The data carrier for loading the data is a two-dimensional array. The data loaded into the two-dimensional array is preprocessed to remove data whose coordinates exceed the road surface detection range and duplicate records.
3. The asphalt pavement intersection cracking segmentation method of claim 1, wherein, The structural element is a 4×4 structural element, and the connectivity determination method used is the T-shaped connectivity determination method; the rule for filtering redundant nodes is: if the distance between two nodes is less than or equal to a preset distance, then only one node is retained; When traversing a mesh using a structuring element, if the mesh edge region is smaller than the structuring element size, the traversal check is performed based on the actual size of the edge region.
4. The asphalt pavement intersection cracking segmentation method of claim 1, wherein, In the process of constructing a data point connectivity table based on the connectivity of the crack endpoints and the crack nodes, the constructed data point connectivity table is an adjacency table. When constructing the adjacency table, the coordinates of each data point are used as an index to record the data points that exist within the preset connection direction range. The preset connection direction is an 8-neighborhood direction, including up, down, left, right, upper left, upper right, lower left, and lower right. Based on the connectivity results, during the first-order linear fitting process for the crack endpoints and crack nodes, the fitting operation is carried out according to the connectivity status, specifically as follows: Perform a first-order linear fit between the endpoints connected to the node, and perform a first-order linear fit between the endpoints that are not connected to the node but are connected to each other. When creating a fitted line using the least squares method, a polynomial object is created by finding the polynomial that minimizes the sum of squared errors between the polynomial curve and the data points. This polynomial object is the fitted line, and the slope is extracted from the fitting result.
5. The asphalt pavement intersection cracking segmentation method of claim 1, wherein, The rule for determining the direction of a crack based on its slope is as follows: if the absolute value of the slope is greater than 1, it is determined to be a longitudinal crack; if the absolute value of the slope is less than 1, it is determined to be a transverse crack. The distance threshold is set and adjusted according to the actual application scenario. When adjusting, factors such as road surface detection accuracy, crack width and image resolution are taken into account, and the optimal threshold is determined through multiple experiments.
6. The asphalt pavement intersection cracking segmentation method of claim 1, wherein, The crack segmentation process based on the first-order linear fitting result and the determined crack direction specifically includes: 1) Prepare basic data, which includes crack endpoints, crack nodes, crack data point matrix, crack data points excluding blocky regions, and all crack data points. When there are cracks in the crack data point matrix, the corresponding positions are marked with a specified value. 2) Use a depth-first search algorithm to determine the connectivity between crack endpoints and crack nodes; 3) For crack endpoints that are not connected to crack nodes, further determine the connectivity between crack endpoints; 4) For crack endpoints that are not connected to crack nodes but are connected to each other, a straight line between the two points is obtained by first-order linear fitting. Based on the vertical distance from the point to the straight line, data points near the fitted straight line are selected from the crack data points in the blocky region as the segmented crack data points. At the same time, the crack data points in the blocky region are updated and the data points that have participated in the judgment are deleted. 5) For the crack endpoints connected to the crack nodes, fit a straight line between the crack endpoints and the crack nodes. Based on the vertical distance from the point to the straight line, filter crack data points from the crack data points in the removed block regions, update the crack data points in the removed block regions, and complete the crack segmentation. When updating and removing crack data points in blocky regions, a mark-and-delete method is used to mark the identified data points; when there is a crack in the crack data point matrix, the corresponding mark value is 1.
7. An asphalt pavement cross crack segmentation system, comprising: include: The data reading module is used to read the crack mesh identification results, which include the coordinates of the center point of the crack mesh, and to load the data in the crack mesh identification results into the data carrier. The endpoint determination module is used to determine the crack endpoints based on the crack mesh identification results in the data carrier by using a set search rule. The set search rule includes a single-row crack search rule and a double-row crack search rule. The single-row crack endpoints are determined by the single-row crack search rule, and the double-row crack endpoints are determined by the double-row crack search rule. In the endpoint determination module, the single-row crack search rule is: two pixels that satisfy 8-neighbor connectivity equal to 1, or 8-neighbor connectivity equal to 2 and are connected are adjacent points, and the adjacent points conform to a preset connectivity combination. The preset connectivity combination includes combinations of top and top right, top right and right, right and bottom right, bottom right and bottom, bottom and bottom left, bottom left and left, left and top left, and top left and top. In the endpoint determination module, the double-row crack search rule is as follows: first, check whether all pixels in the square area centered at the specified position are crack points; then, define the outer neighborhood of the pixels in the square area, check whether the connected points of the outer neighborhood are adjacent; if they are adjacent, they are determined to be endpoints, and the far-distance points in the pixels in the square area are modified as endpoints, with different far-distance points corresponding to different connected directions. The node determination module is used to determine crack nodes based on the crack mesh identification results in the data carrier by using a set determination rule. The set determination rule first creates a two-dimensional mesh and marks the crack point location, then traverses the mesh through structural elements to mark blocky regions and non-blocky regions, and uses a connectivity determination method to search for nodes in non-blocky regions and filters out redundant nodes. The connectivity analysis module is used to determine the connectivity between the determined crack endpoints and crack nodes using a depth-first search algorithm or a breadth-first search algorithm, construct a data point connectivity table based on the connectivity between the crack endpoints and crack nodes, check whether the crack endpoints can reach the crack nodes through a preset connection direction, and output the connectivity results. The linear fitting module is used to perform first-order linear fitting on the crack endpoints and crack nodes based on the connectivity results, and to create a fitted straight line using the least squares method and extract the slope of the straight line, and to determine the crack direction based on the slope. The crack segmentation module is used to segment cracks based on the first-order linear fitting result and the determined crack direction. The crack segmentation determines whether the data point is near the fitted line based on the distance from the data point to the fitted line and a set distance threshold.
8. The asphalt pavement cross crack segmentation system of claim 7, wherein, In the data reading module, the crack mesh identification result is read from a txt input file. The data carrier for loading the data is a two-dimensional array. The data loaded into the two-dimensional array is preprocessed to remove data whose coordinates exceed the road surface detection range and duplicate data. In the node determination module: The structural element is a 4×4 structural element, and the connectivity determination method used is the T-shaped connectivity determination method; the rule for filtering redundant nodes is: if the distance between two nodes is less than or equal to a preset distance, then only one node is retained; When traversing a mesh using a structuring element, if the mesh edge region is smaller than the structuring element size, the traversal check is performed based on the actual size of the edge region.
9. The asphalt pavement cross crack segmentation system of claim 7, wherein, In the connectivity analysis module: The constructed data point connectivity table is an adjacency table. When constructing the adjacency table, the coordinates of each data point are used as the index to record the data points that exist within the preset connection direction range. The preset connection direction is an 8-neighborhood direction, including up, down, left, right, upper left, upper right, lower left, and lower right. In the linear fitting module: Perform a first-order linear fit between the endpoints connected to the node, and perform a first-order linear fit between the endpoints that are not connected to the node but are connected to each other. When creating a fitted line using the least squares method, a polynomial object is created by finding the polynomial that minimizes the sum of squared errors between the polynomial curve and the data points. This polynomial object is the fitted line, and the slope is extracted from the fitting result. The rule for determining the crack direction based on the slope is: when the absolute value of the slope is greater than 1, it is determined to be a longitudinal crack; when the absolute value of the slope is less than 1, it is determined to be a transverse crack. The distance threshold is set and adjusted according to the actual application scenario. When adjusting, factors such as road surface detection accuracy, crack width and image resolution are taken into account, and the optimal threshold is determined through multiple experiments.