Method and system for automatically segmenting and quantifying structural body crack image
Through the automatic segmentation and quantification method of structural crack images, and through skeletonization processing and polyline extraction method, fracture polylines are generated, which solves the problem of low crack identification accuracy in the existing technology and achieves accurate identification of cracks in rocks and other structural bodies. and quantification.
Patent Information
- Application Number
- CN202410758377.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-10-18
AI Technical Summary
Existing crack identification methods based on machine learning or deep learning tend to identify intersecting cracks as one in structures such as rocks, which affects the accuracy of the identification results. Moreover, the layout of secondary blasting holes is affected by blasting cracks, leading to blasting The effect is not ideal.
The automatic segmentation and quantification method of structural crack images is used to collect crack images, perform skeletonization processing, extract endpoints and bifurcation points, use corrosion marking method and polyline extraction method to generate crack polylines, calculate the length, inclination angle and width of cracks, and improve Recognition accuracy.
All pixels on the crack skeleton of the structure are obtained through corrosion and marking, and the polyline extraction method is used to approximate key node coordinates and generate crack polylines, which can accurately identify each crack polyline, improve the recognition accuracy, and identify based on endpoints and intersections. Each crack line realizes the accurate quantification of cracks.
Smart Images

Figure CN118799346A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an image segmentation method, in particular to an automatic segmentation and quantification method and system for structural crack images. Background Art
[0002] In rock engineering, as modern society places increasingly higher demands on ecological environment and construction conditions, traditional rock blasting technology represented by explosive blasting has been increasingly restricted. Therefore, carbon dioxide (CO2) blasting technology has received extensive attention in the field of rock excavation and coal mining due to its advantages of low noise, environmental protection, low risk, and low vibration impact on surrounding buildings and residents. CO2 blasting technology relies on the instantaneous release of high-pressure CO2 generated by the phase change of liquid CO2. This powerful physical expansion causes the rock to crack, achieving the effect of explosive blasting. The effect of CO2 blasting depends on its blasting cracks. When the blasting effect is not ideal, it is difficult to carry out mechanical construction at the blasting cracks. Therefore, secondary CO2 blasting is generally required. At the same time, if the secondary blasting hole is connected to the crack, CO2 will be released, dissipating a large amount of impact energy and weakening the blasting effect. It can be seen that the layout of the secondary blasting hole is also affected by the blasting cracks. Therefore, the identification of CO2 blasting cracks is crucial.
[0003] Existing crack recognition methods based on machine learning or deep learning obtain crack features based on the connectivity of images, which will identify intersecting cracks as one, affecting the accuracy of the recognition results. Therefore, it is crucial to improve the recognition accuracy of cracks in structures such as rocks. Summary of the invention
[0004] Purpose of the invention: The purpose of the present invention is to provide a method and system that can accurately identify cracks and quantify their characteristics.
[0005] Technical solution: The method for automatic segmentation and quantification of structural crack images of the present invention comprises the following steps:
[0006] Collect structural crack images and obtain crack segmentation result images through crack segmentation models;
[0007] Performing skeletonization processing on the crack segmentation result image to obtain a crack skeleton;
[0008] Extracting the endpoints and bifurcation points of the cracks in the crack skeleton;
[0009] The endpoint and bifurcation point are used as the starting point and end point of the polyline, and the distance from each pixel point to the straight line between the pixel point and the starting point is determined on the crack skeleton. If the distance is greater than a threshold, the pixel point is a key node; the starting point, each key node and the end point are connected to generate a crack polyline;
[0010] The length, inclination and width of the crack are calculated in the crack skeleton and the crack polyline.
[0011] Furthermore, the overall nested edge detection model is trained using the annotated structural crack image to obtain the crack segmentation model.
[0012] Further, a skeletonization process is performed using the Zhang-Suen algorithm in the crack segmentation result image to obtain a crack skeleton;
[0013] Furthermore, the endpoints and bifurcation points of the cracks are extracted in the crack skeleton using a hit-miss algorithm.
[0014] Further, the endpoint and the bifurcation point are used as the starting point and the end point of the polyline, and the distance from each pixel point to the straight line between the pixel point and the starting point is determined on the crack skeleton from the starting point. If the distance is greater than a threshold, the pixel point is a key node; and the starting point, each key point and the end point are connected to generate a crack polyline, including:
[0015] (1) Select the starting pixel P whose endpoint is marked as the crack skeleton, and corrode the pixel P to 0;
[0016] (2) Based on the 8-neighborhood area, check the diagonal pixels P2, P4, P6, P8 adjacent to pixel P and the pixels P1, P3, P5, P7 adjacent to pixel P in turn, corrode the first pixel with a value of 1 to 0, and mark it as a pixel on the crack path;
[0017] (3) The marked pixel is taken as the next pixel P', and step (2) is performed again on the pixel P' until the pixel P' is an uncorroded or unmarked endpoint or bifurcation point, and the pixel is marked as the end pixel on the crack path, and the end pixel is corroded to 0;
[0018] (4) After all endpoints are corroded, select the bifurcation point marked as the starting pixel P of the crack skeleton and execute step (2); take the marked pixel as the next pixel P', and exclude the marked bifurcation point pixel, and execute step (2) until the neighborhood of pixel P' contains a bifurcation point that is inconsistent with the previous one, and the bifurcation point is the end pixel of the crack;
[0019] (5) When there are no crack pixels in the 8-neighborhood area of all bifurcation points, the search ends and the pixel points on each crack skeleton are obtained.
[0020] Further, the endpoint and the bifurcation point are used as the starting point and the end point of the polyline, and the distance from each pixel point to the straight line between the pixel point and the starting point is determined on the crack skeleton from the starting point. If the distance is greater than a threshold, the pixel point is a key node; and the starting point, each key point and the end point are connected to generate a crack polyline, including:
[0021] According to the pixel points [X1, Y1], [X2, Y2], ..., [X m ,Y m ], starting from the pixel [X1, Y1], try to move the pixel [X n ,Y n ] is used as the key node, and the straight line A*X+B*Y+C=0 is formed by using a linear function, where A, B, and C are constants;
[0022] Calculate [X1,Y1] and [X n ,Y n ] between any pixel [X k ,Y k ] to the straight line, and obtain a series of Euclidean distances (d2, d3, ..., d n-1 );
[0023] When there is a Euclidean distance greater than the threshold, the pixel [X n ,Y n ] is considered a key node; otherwise, try to move the next pixel [X n+1 ,Y n+1 ] as the key node and repeat the above steps until all pixel points are traversed to obtain the key nodes on each crack skeleton.
[0024] Furthermore, the length of the crack is the sum of the lengths of each segment of the crack fold line;
[0025] The inclination of the fracture is the weighted sum of the inclinations of each segment of the fracture fold line, and the weight of each segment of the discounted inclination is the ratio of the length of the segment to the length of the fracture;
[0026] In the crack skeleton, the intersection points of the vertical line of the crack skeleton and the crack edge are calculated, and the average value of the sum of the distances between the intersection points is the width of the crack.
[0027] The automatic segmentation and quantification system for structural crack images of the present invention comprises:
[0028] A crack segmentation unit is used to collect crack images of the structure and obtain a crack segmentation result map through a crack segmentation model;
[0029] A crack skeleton extraction unit, used for performing skeletonization processing on the crack segmentation result image to obtain a crack skeleton;
[0030] A key point extraction unit, used for extracting the endpoints and bifurcation points of the crack in the crack skeleton;
[0031] A crack polyline generating unit is used to use the endpoint and bifurcation point as the starting point and end point of the polyline, and to determine the distance from each pixel point to the straight line between the pixel point and the starting point on the crack skeleton, if the distance is greater than a threshold, the pixel point is a key node; and the starting point, each key node and the end point are connected to generate a crack polyline;
[0032] A crack quantification unit is used to calculate the length, inclination and width of the crack in the crack skeleton and the crack polyline.
[0033] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the method for automatic segmentation and quantification of structural crack images is implemented.
[0034] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the method for automatic segmentation and quantification of structural crack images is implemented.
[0035] Beneficial effects: Compared with the prior art, the advantages of the present invention are: the present invention obtains all pixel points on the crack skeleton of the structure through corrosion and marking, and then uses the broken line extraction method to approximate the key node coordinates to generate crack broken lines, and can identify each crack broken line according to the endpoints and intersections, thereby improving the recognition accuracy. Based on the crack broken line, the quantitative information of the crack can be accurately obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart of the automatic segmentation and quantification method of structural crack images of the present invention;
[0037] Figure 2 The original image and the annotated image according to the embodiment of the present invention;
[0038] Figure 3 The original image and the crack segmentation image of the embodiment of the present invention;
[0039] Figure 4 A schematic diagram of a generated crack line according to an embodiment of the present invention;
[0040] Figure 5 In the embodiment of the present invention, max Line graph of cracks from 0.1 to 10 pixels;
[0041] Figure 6 A line graph of cracks detected and marked according to an embodiment of the present invention;
[0042] Figure 7 This is a quantitative index diagram of a crack image according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The technical solution of the present invention is further described below in conjunction with the accompanying drawings. This embodiment is described by taking the identification of rock cracks caused by CO2 blasting as an example. The present invention is also applicable to the identification of cracks in other structures such as rock cracks, concrete cracks, and road cracks.
[0044] like Figure 1 As shown, the automatic segmentation and quantification method of structural crack images includes the following steps.
[0045] (1) Rock crack images induced by CO2 blasting are collected from actual projects and manually annotated. The original images and annotated images are rotated and flipped to establish a crack image segmentation sample database. The sample database is divided into a training sample set and a test sample set according to the requirements.
[0046] (2) Establish a holistic nested edge detection (HED) model and train the model using the sample images of the training sample set in step (1) as a driver.
[0047] (3) Input the sample images of the test sample set into the HED model obtained in step (2), output the crack segmentation results of the sample images in the test sample set, and verify the accuracy of the model prediction.
[0048] (4) Based on the Zhang-Suen algorithm, the crack segmentation result obtained in step (3) is skeletonized to obtain a crack skeleton map.
[0049] (5) Based on the hit-miss algorithm and the crack skeleton diagram obtained in step (4), the key points of the crack skeleton are obtained, including endpoints and bifurcation points.
[0050] (6) Based on the corrosion marking method and the broken line extraction method, the crack skeleton and key nodes are obtained based on steps (4) and (5), and the quantitative indicators of each crack are calculated, including the length, inclination and width of the crack.
[0051] In the step (1), on the marked image, white pixels represent cracks and black pixels represent background.
[0052] In the step (2), in the HED network, there are 13 convolutional layers, each of which consists of convolution, batch normalization (BN) and rectified linear unit (ReLU). Under the 2nd, 4th, 7th and 10th convolutional layers, the maximum pooling layer is used as spatial pooling. Therefore, there are 4 maximum pooling layers in total. In addition, the HED network has 5 side output layers, which are connected to the 2nd, 4th, 7th, 10th and 13th convolutional layers respectively. Finally, a weighted fusion output layer is added and connected to each side output layer.
[0053] In the step (2), in the convolution layer, convolution is first performed, which is a process of generating a set of local feature maps using a filter bank. Then, batch normalization is performed to reduce the offset of internal covariates, which is a normal distribution with a mean of 0 and a variance of 1. Finally, ReLU is performed, which is an activation function that describes nonlinear features. In addition, the convolution layer is a 3×3 convolution kernel with a step size of 1. The maximum pooling layer is used to achieve translation invariance to small spatial displacements in the image, while also reducing the parameter scale of the network. The maximum pooling is a 2×2 pixel window with a step size of 2. Deep supervision is applied to each side output layer to guide the side output towards the edge prediction of the desired feature. The receptive field size of each side output layer is the same as the receptive field size of the corresponding convolution layer. The weighted fusion output layer is used to learn how to combine outputs of multiple scales. The stochastic gradient descent (SGD) optimizer is used to minimize the loss function, which includes the side output layer loss function and the weighted fusion output layer loss function.
[0054] In step (4), the main idea of the Zhang-Suen algorithm is to peel off the crack layer by layer until its skeleton is obtained. The calculation of the algorithm is divided into two parts. In the first part, pixels that meet certain specific conditions will be deleted. These conditions are as follows:
[0055] 2≤N(P)≤6
[0056] S(P)=1
[0057] P1×P3×P5=0
[0058] P3×P5×P7=0
[0059] Where N(P) is the number of non-zero pixels in the 8 pixels adjacent to pixel P, and S(P) is the number of (0, 1) pairs in the ordered set (P1, P2), (P2, P3), …, (P8, P1).
[0060] In the second part, pixels that meet some other specific conditions are removed, which are as follows:
[0061] 2≤N(P)≤6
[0062] S(P)=1
[0063] P1×P3×P7=0
[0064] P1×P5×P7=0
[0065] In step (5), the hit-miss algorithm is a basic tool for detecting specific shape positions in morphology. Its principle is to use corrosion to filter the endpoints and bifurcation points of the crack skeleton line.
[0066] In the step (6), the pixel points and key nodes on each crack skeleton are obtained by the corrosion marking method and the broken line extraction method.
[0067] In the process of traversing the crack skeleton, the corrosion marking method includes two steps: corrosion and marking. Only the pixels that have been corroded and marked will not be traversed subsequently, avoiding repeated operations. Since the bifurcation point is connected to multiple crack skeletons, it is only marked but not corroded during the traversal process. First, the endpoint is selected as the starting pixel P of the crack skeleton, and the pixel P is corroded to 0. Based on the 8-neighborhood area, the diagonal pixels (P2, P4, P6, P8) adjacent to the pixel P and the pixels (P1, P3, P5, P7) adjacent to the pixel P are checked in turn. The first pixel with a value of 1 is corroded to 0 and marked as a pixel on the crack path. Then, the marked pixel is used as the next pixel P, and the same operation is performed again on the newly marked pixel P until the pixel P is an uncorroded (marked as 0) endpoint or bifurcation point, marked as the termination pixel on the crack path, and the endpoint pixel is corroded to 0. When all endpoints are marked by corrosion, select the bifurcation point marked as the starting pixel P of the crack skeleton. Based on the 8-neighborhood area, check the diagonal pixels adjacent to pixel P (P2, P4, P6, P8) and the pixels adjacent to pixel P (P1, P3, P5, P7) in turn. And corrode the first pixel with a value of 1 to 0 and mark it as a pixel on the crack path. Then, take the marked pixel as the next pixel P, and perform the same operation on the newly marked pixel P again, while excluding the previously marked bifurcation point pixels. Until the neighborhood of pixel P contains a bifurcation point that is inconsistent with the previous one, the bifurcation point is the end pixel of the crack. When there are no crack pixels in the 8-neighborhood area of all bifurcation points, the search ends. The pixel points on each crack skeleton are obtained by the corrosion marking method.
[0068] Based on the pixel points, the polyline extraction method is used to approximate the key node coordinates and generate the crack polyline. The approximation degree of the extracted skeleton line is determined by a value D max Decision, D max It is defined as the threshold Euclidean distance from the straight line connecting two consecutive key nodes to any crack skeleton pixel in these two key nodes. A crack skeleton contains m pixels, such as,
[0069] [X1,Y1],[X2,Y2],……,[X m ,Y m ]
[0070] Starting from the pixel [X1, Y1], try to move the pixel [X n ,Y n ] As a key node, a linear function can be used to represent the formed straight line.
[0071] A*X+B*Y+C=0
[0072] Where A, B, and C are constants, which can be obtained by using two pixel points [X1, Y1] and [X n ,Y n ] can be derived.
[0073] Calculate any pixel point [X k ,Y k The Euclidean distance of ] is:
[0074]
[0075] Therefore, for [X1,Y1] and [X n ,Y n ], we can get a series of Euclidean distances (d2, d3, ..., d n-1 ). When there is a value greater than D max When the Euclidean distance of the pixel [X n ,Y n ] is considered a key node. max When the value of n+1 ,Y n+1 ] as the key node. And so on, until the pixel [X m ,Y m ], the key nodes on the crack skeleton can be determined.
[0076] According to the two adjacent key nodes [X n ,Y n ] and [X n +1,Y n +1], calculate the pixel distance l between two key nodes n for:
[0077]
[0078] The length of the crack is:
[0079]
[0080] The inclination angle of the straight line formed between two key nodes is:
[0081]
[0082] The crack inclination is:
[0083]
[0084] Based on the pixel points on each crack skeleton, the intersection point between the vertical line of the crack skeleton and the crack edge is obtained, and the distance between the intersection points is expressed as w nRepresents. Traversing the crack skeleton, the width w of the crack is calculated as:
[0085]
[0086] The following is a specific experiment to illustrate the automatic segmentation and quantification method of structural crack images of the present invention.
[0087] Step 1: Collect 75 rock crack images induced by CO2 blasting from actual projects, and manually annotate these images using Photoshop software to establish a crack image segmentation sample database. The original images and annotated images are shown in Figure 1. Figure 2 As shown in (a) and (b) in .
[0088] 70 original images and annotated images are selected for rotation and flipping, and expanded into a dataset of 350 images as the training sample set. The remaining 5 original images are used as the test sample set.
[0089] Step 2: Compile a holistic nested edge detection (HED) model based on Python, and train the model using the sample images of the training sample set in step 1 as a driver.
[0090] In the HED model, its hyperparameters include learning rate of 0.0000001, weight decay of 0.0002, momentum of 0.9, batch size of 5, and loss weight of each edge output and final fusion layer of 1.0. The training process is set to 4000 epochs to avoid non-convergence due to insufficient training steps.
[0091] Step 3: Input the sample images of the test sample set into the HED model obtained in step 2, and output the crack segmentation results of the sample images in the test sample set. The results are as follows: Figure 3 As shown, Figure 3 (a) to (e) show five sets of original images and their segmented images.
[0092] To verify the accuracy of the model prediction, three performance indicators, namely precision, recall and F-measure, are used to evaluate the accuracy of the HED model for crack segmentation. The three indicators are as follows:
[0093]
[0094]
[0095]
[0096] Where TP is the correctly classified crack pixel, FP is the misclassified background pixel, and FN is the misclassified crack pixel. Table 1 summarizes the precision, recall, and F-measure results of the test sample set.
[0097] Table 1 Precision, recall and F-measure of the test sample set
[0098]
[0099] From the data in Table 1, we can see that the average values of precision, recall and F-measure of the test images are 75.00%, 97.99% and 84.66% respectively. This shows that the HED model has significant pixel-level accuracy in image recognition. Figure 3 As can be seen from Table 1, no matter it is a single crack or multiple cracks, the three indicators of the images in the test sample set are ranked as recall > F-measure > precision.
[0100] Step 4: Compile the Zhang-Suen algorithm based on Python, skeletonize the crack segmentation result obtained in step (3) and obtain the crack skeleton map.
[0101] Step 5: compile the hit-miss algorithm based on Python, and based on the crack skeleton diagram obtained in step (4), obtain the key points of the crack skeleton, including endpoints and bifurcation points.
[0102] Step 6: Based on Python, the corrosion marking method and broken line extraction method are compiled. Based on steps (4) and (5), the crack skeleton and key nodes are obtained to calculate the quantitative indicators of each crack, including crack length, inclination and width.
[0103] In the process of traversing the crack skeleton, the corrosion marking method includes two steps: corrosion and marking. Only the pixels marked by corrosion will not be traversed in the subsequent process, thus avoiding repeated operations. Since the bifurcation point is connected to multiple crack skeletons, it is only marked but not corroded during the traversal process.
[0104] In the broken line extraction method, D max The value of affects the number of key nodes extracted and the similarity between the approximated fracture line diagram and the fracture skeleton. The fracture line extraction method is used to approximate the key node coordinates and generate the fracture line, such as Figure 4 shown. Figure 4 K, K1 and K2 in are all pixel points on the crack skeleton. Figure 4 (a) is a diagram showing the method of determining the point that satisfies the Dmax value. Figure 4 (b) is the extracted line chart.
[0105] Figure 5 The crack line graph of a test sample and the corresponding key nodes are shown in Dmax Different values from 0.1 to 10 pixels. Finally, this embodiment will D max Set to 1 pixel to generate a reliable crack line diagram with a reasonable number of key nodes, such as Figure 6 As shown in Figure 2, the detection polyline comes from the model’s prediction, while the label polyline comes from the manual annotation of the real image.
[0106] The recognition results of the images in the five test sample sets were evaluated using quantitative indicators such as crack length, crack inclination and crack width to quantify the performance of the proposed method.
[0107] like Figure 7 As shown, the quantitative indicators of the segmented and annotated crack images are given. Figure 7 Figures (a) to (c) are comparisons of the detected values of the crack length, inclination, and width obtained by the present invention with the pre-marked values. It can be found that the calculation errors of the proposed method are mostly small for the crack length, crack inclination, and crack width. Therefore, through qualitative and quantitative analysis, the proposed method can effectively and accurately extract the crack occurrence. The results show that the proposed method can perform crack segmentation and quantification well.
[0108] The above-mentioned rock fracture image automatic segmentation and quantification method based on deep learning shows good performance in the fracture segmentation and quantification model established by Python, which can be used to identify rock fractures caused by CO2 blasting, and provide a reference for the CO2 blasting effect and guide the arrangement of secondary blasting holes.
[0109] The automatic segmentation and quantification system for structural crack images of the present invention comprises:
[0110] A crack segmentation unit is used to collect crack images of the structure and obtain a crack segmentation result map through a crack segmentation model;
[0111] A crack skeleton extraction unit, used for performing skeletonization processing on the crack segmentation result image to obtain a crack skeleton;
[0112] A key point extraction unit, used for extracting the endpoints and bifurcation points of the crack in the crack skeleton;
[0113] A crack polyline generating unit is used to use the endpoint and bifurcation point as the starting point and end point of the polyline, and to determine the distance from each pixel point to the straight line between the pixel point and the starting point on the crack skeleton, if the distance is greater than a threshold, the pixel point is a key node; and the starting point, each key node and the end point are connected to generate a crack polyline;
[0114] A crack quantification unit is used to calculate the length, inclination and width of the crack in the crack skeleton and the crack polyline.
[0115] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the method for automatic segmentation and quantification of structural crack images is implemented.
[0116] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, the method for automatic segmentation and quantification of structural crack images is implemented.
[0117] The computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and that can be accessed by a computer.
[0118] The processor is used to execute the computer program stored in the memory to implement each step of the method involved in the above embodiment.
Claims
1. A method for automatic segmentation and quantification of structural crack images, characterized in that: The steps include: Collect structural crack images and obtain crack segmentation result images through crack segmentation models; Performing skeletonization processing on the crack segmentation result image to obtain a crack skeleton; Extracting the endpoints and bifurcation points of the cracks in the crack skeleton; The endpoint and bifurcation point are used as the starting point and end point of the polyline, and the distance from each pixel point to the straight line between the pixel point and the starting point is determined on the crack skeleton. If the distance is greater than a threshold, the pixel point is a key node; the starting point, each key node and the end point are connected to generate a crack polyline; The length, inclination and width of the crack are calculated in the crack skeleton and the crack polyline.
2. The method for automatic segmentation and quantification of structural crack images according to claim 1, characterized in that: The overall nested edge detection model is trained using the annotated structural crack image to obtain the crack segmentation model.
3. The method for automatic segmentation and quantification of structural crack images according to claim 1, characterized in that: The Zhang-Suen algorithm is used to perform skeletonization processing on the crack segmentation result image to obtain a crack skeleton.
4. The method for automatic segmentation and quantification of structural crack images according to claim 1, characterized in that: The endpoints and bifurcation points of the cracks are extracted in the crack skeleton using a hit-miss algorithm.
5. The method for automatic segmentation and quantification of structural crack images according to claim 1, characterized in that: The endpoint and bifurcation point are used as the starting point and end point of the polyline, and the distance from each pixel point to the straight line between the pixel point and the starting point is determined on the crack skeleton. If the distance is greater than a threshold, the pixel point is a key node; Connecting the starting point, key points and end point to generate a crack polyline includes: (1) Select the starting pixel P whose endpoint is marked as the crack skeleton, and corrode the pixel P to 0; (2) Based on the 8-neighborhood area, check the diagonal pixels P2, P4, P6, P8 adjacent to pixel P and the pixels P1, P3, P5, P7 adjacent to pixel P in turn, corrode the first pixel with a value of 1 to 0, and mark it as a pixel on the crack path; (3) The marked pixel is taken as the next pixel P', and step (2) is performed again on the pixel P' until the pixel P' is an uncorroded or unmarked endpoint or bifurcation point, and the pixel is marked as the end pixel on the crack path, and the end pixel is corroded to 0; (4) After all endpoints are corroded, select the bifurcation point marked as the starting pixel P of the crack skeleton and execute step (2); take the marked pixel as the next pixel P', and exclude the marked bifurcation point pixel, and execute step (2) until the neighborhood of pixel P' contains a bifurcation point that is inconsistent with the previous one, and the bifurcation point is the end pixel of the crack; (5) When there are no crack pixels in the 8-neighborhood area of all bifurcation points, the search ends and the pixel points on each crack skeleton are obtained.
6. The method for automatic segmentation and quantification of structural crack images according to claim 5, characterized in that: The endpoint and bifurcation point are used as the starting point and end point of the polyline, and the distance from each pixel point to the straight line between the pixel point and the starting point is determined on the crack skeleton. If the distance is greater than a threshold, the pixel point is a key node; Connecting the starting point, key points and end point to generate a crack polyline includes: According to the pixel points [X1, Y1], [X2, Y2], ..., [X m ,Y m ], starting from the pixel [X1, Y1], try to move the pixel [X n ,Y n ] is used as the key node, and the straight line A*X+B*Y+C=0 is formed by using a linear function, where A, B, and C are constants; Calculate [X1,Y1] and [X n ,Y n ] between any pixel [X k ,Y k ] to the straight line, and obtain a series of Euclidean distances (d2, d3, ..., d n-1 ); When there is a Euclidean distance greater than the threshold, the pixel [X n ,Y n ] is considered a key node; otherwise, try to move the next pixel [X n+1 ,Y n+1 ] as the key node and repeat the above steps until all pixel points are traversed to obtain the key nodes on each crack skeleton.
7. The method for automatic segmentation and quantification of structural crack images according to claim 1, characterized in that: The length of the crack is the sum of the lengths of each segment of the crack line; The inclination of the fracture is the weighted sum of the inclinations of each segment of the fracture fold line, and the weight of each segment of the discounted inclination is the ratio of the length of the segment to the length of the fracture; In the crack skeleton, the intersection points of the vertical line of the crack skeleton and the crack edge are calculated, and the average value of the sum of the distances between the intersection points is the width of the crack.
8. A structural crack image automatic segmentation and quantification system, characterized in that: include: A crack segmentation unit is used to collect crack images of the structure and obtain a crack segmentation result map through a crack segmentation model; A crack skeleton extraction unit, used for performing skeletonization processing on the crack segmentation result image to obtain a crack skeleton; A key point extraction unit, used for extracting the endpoints and bifurcation points of the crack in the crack skeleton; A crack polyline generating unit is used to use the endpoint and bifurcation point as the starting point and end point of the polyline, and to determine the distance from each pixel point to the straight line between the pixel point and the starting point on the crack skeleton, if the distance is greater than a threshold, the pixel point is a key node; and the starting point, each key node and the end point are connected to generate a crack polyline; A crack quantification unit is used to calculate the length, inclination and width of the crack in the crack skeleton and the crack polyline.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is loaded into a processor, the method for automatic segmentation and quantification of structural crack images according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for automatic segmentation and quantification of structural crack images according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Curve fiber network structural morphology feature measurement method based on digital image processing
CN103673923A
Crack detection method and device
CN114155418A
Pavement crack repairing equipment and repairing path navigation method
CN116240783A
Line object extraction method based on semantic segmentation
CN116452809A
Rock tunnel working face crack trace identification method and system based on neural network
CN117710823A
Cited By
Method for determining concrete crack processing mode for image processing bridge
CN119478749A
A method for determining the treatment method of concrete cracks for bridges using image processing
CN119478749B
Asphalt pavement crack width quantification method, equipment and medium
CN120852427A
Bituminous pavement cross crack segmentation method and system
CN121639710A
Asphalt pavement intersection crack segmentation method and system
CN121639710B
