Intelligent concrete micro-crack size identification method based on DP-FindContours and seal reference frame
Through the combination of DP-FindContours and seal reference frames, the automated and intelligent detection of concrete cracks is achieved, and the time-consuming and cost-effective problems in the existing technology are solved, and the size of micro cracks can be quickly and accurately identified.
Patent Information
- Application Number
- CN202411917788.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-07-01
AI Technical Summary
The existing concrete crack detection methods rely on manual and expensive equipment, are time-consuming and labor-intensive, and are difficult to accurately identify the size of micro cracks.
Using a method based on DP-FindContours and seal reference frames, a regional convolutional neural network is used to locate cracks, combine the Douglas-Puk function to refine the crack contour, and convert pixels and millimeters through the seal reference frame to achieve automated identification of crack size.
It realizes fast, accurate and economical millimeter-level size identification of concrete cracks, reduces inspection costs, and improves the automation and intelligence of inspection.
Smart Images

Figure CN120236116A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of concrete structure damage monitoring in structural health monitoring, and particularly relates to an intelligent detection method for concrete crack size based on deep learning and computer vision. Background Art
[0002] Due to its wide sources, simple technology, durability and other advantages, concrete has been widely used in infrastructure such as buildings, bridges, and road surfaces. Under the long-term influence of loads and material property degradation, concrete cracks may appear on the surface of concrete structures, leading to a decline in the safety and reliability of the structures. Since cracks are one of the important indicators characterizing the bearing capacity of structures, it is very necessary to detect and evaluate them, which can provide effective information for the maintenance and repair of structures. At present, in most actual projects, crack detection still requires a large amount of manual participation. However, these conventional detection methods are time-consuming, inefficient, costly, and are also affected by the professional ability and engineering experience of the detection personnel.
[0003] In recent years, artificial intelligence and deep learning have been considered as key components for optimizing damage detection methods in the field of structural health monitoring. The combination of computer vision-based algorithms and image capture devices provides a new way for fast, automatic, and accurate crack detection. The developed methods include threshold segmentation, edge detection, convolutional neural networks, etc. They can effectively identify and segment the position and shape of cracks in images, but cannot quantify size information such as the length and width of cracks. In order to obtain more feature information, some visual assistance technologies are used to measure damage size, such as using binocular cameras or lidar to capture the true size of cracks. However, these methods require additional expensive equipment, are relatively complex to operate, and are vulnerable to the accuracy of the instrument itself. They can only detect cracks with larger sizes and have a low recognition accuracy for micro-cracks. Summary of the Invention
[0004] In order to improve the robustness of concrete crack detection and achieve convenient, fast, and accurate millimeter-level recognition of crack size, the present invention proposes an intelligent recognition method for concrete micro-crack size based on DP-FindContours and stamp reference frames. This method first uses a region convolutional neural network to locate cracks, extracts the bounding boxes and pixel-level contours of concrete cracks from images, and then proposes an optimized DP-FindContours algorithm based on the Douglas-Peucker function to accurately identify the pixel-level contours of micro-cracks, and uses a pre-designed stamp reference frame for scale conversion between pixels and millimeters to help the detection personnel quickly obtain the true size information of cracks and quantify the millimeter-level length, area, and maximum width of cracks.
[0005] Existing methods for detecting concrete cracks rely on a large amount of manual labor and expensive instruments and equipment, which are not only time-consuming and laborious but also uneconomical. The framework proposed in the present invention, through the optimized DP-Findcontours algorithm and the pre-stamped reference frame, only needs to take a single on-site crack image with a mobile phone to directly obtain the millimeter-scale size information of the damage, greatly helping inspectors to quickly detect and evaluate the cracks in the concrete structure and reducing the cost of damage detection.
[0006] To achieve the object of the present invention, the present invention is realized through the following technical solutions:
[0007] An intelligent recognition method for the size of concrete micro-cracks based on DP-FindContours and a stamp reference frame, comprising the following steps:
[0008] S1. Obtain a two-dimensional image of the concrete crack taken on-site, and construct a training and test data set; subsequently, based on this data set, train a region convolutional neural network model, extract feature maps, and return all bounding boxes (referred to as anchor boxes) that may contain cracks;
[0009] Adopt the following performance evaluation indicators to evaluate the crack recognition model, and iteratively update the weights of the model until the model evaluation is qualified.
[0010] The performance indicators include:
[0011] Classification loss (cls_loss), used to calculate whether the anchor box is correctly classified (foreground (crack) or background):
[0012]
[0013] In the formula, N cls is the total number of anchor boxes in the calculation of the classification loss, and p i refers to the probability of the predicted classification of the anchor box. When the anchor box is completely a positive sample, p i * = 1, and when it is completely a negative sample, p i * = 0. L cls (p i , p i * ) is the logarithmic loss of positive and negative samples:
[0014]
[0015] Bounding box regression loss (box_loss):
[0016]
[0017] In the formula, N regTo calculate the total number of anchor boxes in the regression loss, λ is a hyperparameter, and t i is the vector {t x , t y , t w , t h}, representing the offset predicted by the anchor box during the training phase, where x, y, w, and h respectively refer to the relative center coordinate differences (x, y) and the width and height of the anchor box. t i * and t i have the same dimension, representing the actual offset of the anchor box during the training phase. L reg (t i , t i * ) is the regression loss between the prediction and the actual offset:
[0018]
[0019] In the formula, σ is a parameter controlling the smoothing region, and here it is taken as 3.
[0020] S2. Use the non-maximum suppression algorithm (Non-maximum suppression, NMS) to select the anchor box with the highest confidence and remove the remaining anchor boxes with a high overlap with the selected box, ensuring that only one optimal anchor box is output for each crack.
[0021] S3. Mark the reference box, that is, cover a pre-designed rectangular seal next to the concrete crack to be detected. The size of the seal is M×N, and the content includes the name, contact information of the inspector, and a QR code. Obtain the crack image containing the complete seal and convert it from an RGB three-channel image to a single-channel grayscale image.
[0022] S4. Use the model M trained in step S1 to identify the cracks in the image, output the optimal anchor box through step S2, and automatically crop the detected crack target bounding box.
[0023] S5. Denoise the crack image and use the Gaussian filter and Canny gradient algorithm to detect the strong and weak edges of the image.
[0024] S6. Extract the pixel-level contour of the crack in the target bounding box and refine the crack contour extraction based on the optimized FindContours algorithm (DP-FindContours) proposed by the Douglas-Peucker function.
[0025] The specific steps of the DP-FindContours algorithm are as follows:
[0026] Assume that the pixel point at the i-th row and j-th column in the picture is (i, j), and f ij represents the gray value of the pixel point. Then the crack image can be expressed as F = {fij}, where pixels with gray values of 0 and 1 are called 0-pixels and 1-pixels respectively. Obtain the boundary from the boundary starting point, and assign a unique number B to each newly discovered boundary k . Consider the border of the crack image as the first boundary B1. Scan the image from left to right and top to bottom. When scanning the gray value of a certain pixel point, perform the following operations:
[0027] (1) If f ij = 0 and f i,j+1 = 1, then the point (i, j) is the starting point of the outer boundary; if f ij = 1 and f i,j+1 = 0, then the point (i, j) is the starting point of the hole boundary, and update the number of the currently tracked boundary to B k+1 .
[0028] (2) According to the types (outer boundary or hole boundary) of the previous boundary B k and the current new boundary B k+1 , the parent boundary of the current boundary B k+1 can be obtained.
[0029] (3) Taking (i, j) as the center and (i, j + 1) as the starting point, search clockwise to see if there is a 1-pixel point in the connected domain of (i, j). If it exists, let (p1, q1) be the first 1-pixel point in the clockwise direction; otherwise, continue scanning from the point (i, j + 1) until reaching the lower-right vertex of the image.
[0030] (4) Taking (i, j) as the center and (p1, q1) as the starting point, search counterclockwise to see if there is a 1-pixel point in the connected domain of (i, j). If it exists, let (i, j) be B k ; if it is a pixel point that has been checked, continue scanning from the point (i, j + 1) until reaching the lower-right vertex of the image.
[0031] (5) Save the boundary topological sequence obtained in steps (1) to (4) as the extracted contour, calculate the areas of all contours and sort them, and take the contour with the largest area as the crack contour.
[0032] (6) Approximately represent the crack contour as a series of curve segments, connect a straight line between the two end points of each curve segment, find the point on the contour that is farthest from the straight line, and calculate the distance from the point to the straight line. Then compare the size of this distance with the pre-given threshold. If it is less than the threshold, take this straight line segment as the approximation of the contour; if it is greater than the threshold, divide the curve into two segments at this point, and then repeat this operation for the two segments respectively.
[0033] When all the curve segments are processed, connect the broken lines formed by each segmentation point in sequence, and delete the redundant points near the contour, then the refined pixel-level contour of the microcrack can be extracted.
[0034] S7. Pixel and millimeter scale conversion;
[0035] Apply DP-FindContours to extract the contour of the seal, and calculate the pixel-level perimeter R p and the pixel-level area A p , and according to the known actual size of the seal, calculate the millimeter-level length conversion ratio P r and the area conversion ratio P a of a single pixel in the image respectively:
[0036]
[0037] S8. Quantify the millimeter-level size of the concrete crack, and obtain the pixel perimeter R crack and the area A crack .
[0038] Since the crack width can be ignored compared to the length, in actual calculation, the pixel length is approximately half of the pixel perimeter. According to the length conversion ratio obtained in step S7, the true length of the crack is:
[0039]
[0040] In the formula, L is the true length of the crack, with the unit of mm, R crack is the pixel perimeter of the crack, with the unit of pixel, P r is the length conversion ratio of a single pixel, with the unit of mm / pixel.
[0041] According to the area conversion ratio obtained in step S7, the true area of the crack is:
[0042] S = P a A crack (8)
[0043] In the formula, S is the true area of the crack, with the unit of mm 2 , A crack is the pixel area of the crack, with the unit of pixel, P a is the area conversion ratio of a single pixel, with the unit of mm 2 / pixel.
[0044] The maximum pixel width of the crack is characterized by the largest inscribed circle. Calculate and store the parameter space values corresponding to each center and radius combination within the contour, and then select the circle with the largest radius. Its diameter is used as the maximum pixel width of the crack. According to the length conversion ratio, the maximum width of the crack can be obtained as follows:
[0045] W max =P r D crack (9) In the formula, W max is the maximum width of the crack, in mm, D crack is the diameter of the largest inscribed circle, in pixel.
[0046] Where the present invention is not involved, it is applicable to the prior art.
[0047] The beneficial effects of the present invention are as follows:
[0048] An optimized DP-FindContours micro-crack contour extraction algorithm is proposed to refine the pixel-level contour of concrete cracks from the images taken on site, improving the accuracy of size recognition; a seal reference frame is designed, and according to the scale ratio conversion, the millimeter-level actual size of concrete cracks is quantified to help engineers quickly evaluate and record the true damage of cracks on site; the problems of time-consuming, laborious and uneconomical of the existing crack detection methods are solved, realizing the automation and intelligence of concrete crack detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is the overall flowchart of the present invention;
[0050] Figure 2 is the core layer architecture of the regional convolutional neural network in the present invention;
[0051] Figure 3 is the curve graph of the evaluation index of the crack recognition model in the embodiment of the present invention;
[0052] Figure 4 is the schematic diagram of using NMS to output the optimal anchor box in the embodiment of the present invention;
[0053] Figure 5 is the rectangular seal reference object designed in the embodiment of the present invention;
[0054] Figure 6 is the schematic diagram of cropping the target bounding box of the concrete crack in the embodiment of the present invention;
[0055] Figure 7 is the schematic diagram of size quantization of five groups of representative samples of concrete crack images in the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0056] The following further details the embodiments of the present invention in conjunction with the accompanying drawings. Taking five groups of concrete cracks with different sizes and shapes as examples, the technical solutions of the present invention are described.
[0057] The design concept of the present invention is as follows: Obtain the two-dimensional image of the concrete crack, construct the training and test data sets, train the regional convolutional neural network model, and output the optimal anchor box through non-maximum suppression; pre-stamp beside the crack to be detected, use the pre-trained model to identify the crack bounding box and crop it; construct a refined contour extraction algorithm for concrete cracks based on the Douglas-Peucker function to extract the pixel-level contour of the micro-crack; after inputting the new crack image and preprocessing, perform pixel and millimeter scale conversion according to the stamp reference box; obtain the pixel-level perimeter, area, and maximum inscribed circle diameter of the crack, and quantify the true millimeter-scale size of the concrete crack according to the conversion ratio.
[0058] An intelligent identification method for the size of concrete micro-cracks based on DP-FindContours and stamp reference box, the process is as Figure 1 shown, including the following steps:
[0059] S1. Obtain the two-dimensional image of the concrete crack taken on site and construct the training and test data sets. Based on this data set, train the regional convolutional neural network. The core layer architecture for extracting the feature map is as Figure 2 shown, and then return all the anchor boxes that may contain cracks. The change curves of the classification loss and bounding box regression loss in this embodiment with the number of training iteration steps are as Figure 3 shown. The figure also shows the evaluation metrics for the test set, including Precision and Recall, and their formulas are as follows:
[0060]
[0061] In the formula, TP is the true positive sample, FP is the false positive sample, and FN is the false negative sample.
[0062] S2. Use the non-maximum suppression algorithm to select the anchor box with the highest confidence and eliminate the remaining anchor boxes with a high overlap with the selected box, ensuring that only one optimal anchor box (bounding box) is output for each crack, as Figure 4 shown.
[0063] S3. Mark the pre-designed stamp reference box beside the concrete crack to be detected, as Figure 5 shown. The actual size of the stamp is 25mm×50mm. Input the new crack image containing the complete stamp, uniformly resize it to 800×600, and convert the pixel at the point with coordinates (x, y) in the original image to a gray pixel through the average weight of the R, G, and B three components:
[0064] gray(x,y) = 0.299 * red(x,y) + 0.587 * green(x,y) + 0.114 * blue(x,y) (12)
[0065] S4. Apply the pre-trained model in step S1 to identify cracks in the image, output the optimal anchor box through step S2, and automatically crop the bounding box containing the target crack. Let the abscissa value x of the target center point centre , and the ordinate value y of the target center point centre , the width W of the target, and the height H of the target. Then the numerical calculation formulas for the four vertices (x1, y1), (x1, y2), (x2, y1), and (x2, y2) of the target box are formula (13). Then, according to the four obtained values of x1, y1, x2, and y2, crop in the horizontal and vertical directions of the crack image respectively to extract the target bounding box of the crack, as Figure 6 shown. Apply Gaussian filtering and Canny algorithm to the cropped image again to denoise and obtain a binary crack image.
[0066]
[0067] S5. Crack image denoising. In this case, a (3, 3) Gaussian kernel is used as a template to scan each pixel in the image, and then the Canny non-differential edge detection method is applied to detect the strong and weak edges of the crack image. If a point belongs to the edge, it is marked as white; if it does not belong to the edge, it is marked as black. During the process of generating the binary image, the minimum threshold is set to 50 and the maximum threshold is set to 210.
[0068] S6. Extract the pixel-level contour of the crack, as Figure 7 shown. The pixels in the 0th row, 599th row, 0th column, and 799th column of the crack image form the border of this picture, and the pixels with gray values of 0 and 1 are called 0 pixels and 1 pixels respectively. When all the pixels in the connected domain are 0 pixels, the connected domain is called a 0 connected domain; when all the pixels in the connected domain are 1 pixels, the connected domain is called a 1 connected domain. Let S1 be a 1 connected domain and S2 be a 0 connected domain. When S2 directly surrounds S1, the boundary between S2 and S1 is the outer boundary; when S1 directly surrounds S2, the boundary between S1 and S2 is the hole boundary. Let S1 and S3 be 1 connected domains and S2 be a 0 connected domain. When S2 directly surrounds S1 and S3 directly surrounds S2, let the boundary between S1 and S2 be B1 and the boundary between S2 and S3 be B2, then B2 is the parent boundary of B1.
[0069] Regard the border of the crack image as the first boundary B1, scan the image from left to right and from top to bottom. When scanning the gray value of a certain pixel point, if f ij = 0 and f i,j+1= 1, then the point (i, j) is the starting point of the outer boundary; if f ij ≥ 1 and f i,j+1 = 0, then the point (i, j) is the starting point of the hole boundary, and update the number of the currently tracked boundary to B k+1 . According to the type of the previous boundary B k and the current new boundary B k+1 , obtain the parent boundary of the current boundary B k+1 . Taking (i, j) as the center and (i, j + 1) as the starting point, search clockwise to see if there is a 1-pixel point in the connected domain of (i, j). If there is, let (p1, q1) be the first 1-pixel point in the clockwise direction; otherwise, continue scanning from the point (i, j + 1) until reaching the bottom-right vertex of the image. Taking (i, j) as the center and (p1, q1) as the starting point, search counterclockwise to see if there is a 1-pixel point in the connected domain of (i, j). If there is, let (i, j) be B k ; if it is a pixel point that has been checked, continue scanning from the point (i, j + 1) until reaching the bottom-right vertex of the image. Take the contour with the largest area as the crack contour. Then perform refinement processing to remove redundant points near the contour, approximately represent the crack contour as a series of curve segments, connect a straight line between the first and last points of each curve segment, find the point on the contour that is farthest from the straight line, and calculate the distance from the point to the straight line. Compare the size of this distance with a pre-given threshold. If it is less than the threshold, take this straight-line segment as the approximation of the contour; if it is greater than the threshold, divide the curve into two segments at this point, and then repeat the operation. Finally, connect the broken lines formed by each segmentation point in sequence. The size of the threshold is calculated by a certain proportion of the contour perimeter, and the proportion is set to 0.01 here.
[0070] S7. Pixel and millimeter scale conversion. The conversion ratio between the pixel size and the actual size is achieved by calculating the perimeter and area of the stamp reference frame. In this embodiment, DP-FindContours is applied again to identify the stamp contour, as Figure 7 shown. Then, use the ArcLength function in OpenCV to calculate the perimeter of the closed contour and the ContourArea function to calculate the area of the contour. Given that the perimeter of the stamp is 150 mm and the area is 1250 mm 2 , the pixel-level perimeter of the contour obtained by the above method is R p , and the pixel-level area is A p . Then the millimeter length and area conversion ratios P r , P a are respectively:
[0071]
[0072] S8. Quantify the millimeter-scale size of the concrete crack. According to the pixel perimeter and pixel area of the crack contour obtained in step S5, calculate the true length and area respectively.
[0073] Further, in step S1, the core layer of the region convolutional neural network uses Darknet-53 to extract feature maps and widely uses residual connections to alleviate the problem of gradient disappearance during training. The convolutional module consists of Convolution, Batchnorm, and SiLU activation functions. At the same time, global average pooling is used to perform prediction, and the batch normalization layer is used as a regularizer to stabilize model training and accelerate convergence.
[0074] In step S3, the pre-designed stamp reference object has a size of 25mm×50mm, and its content includes the name, contact information of the inspector, and a QR code. The QR code is set to facilitate recording data each time for long-term observation, and the size information of the crack damage in the current photo can be obtained by scanning the QR code.
[0075] In step S4, the center point coordinate values of the target bounding box are normalized. Therefore, to obtain the actual coordinates of the four corner points, the width or height of the entire image needs to be multiplied.
[0076] In step S5, Gaussian filtering uses a Gaussian kernel of (3,3) to scan each pixel in the image and performs weighted averaging on the entire image. During the process of generating a binary image using the Canny gradient algorithm, the minimum threshold is set to 50, and the maximum threshold is set to 210.
[0077] In step S6, in order to improve the accuracy of extracting the micro-crack contour, an optimized DP-FindContours algorithm is proposed based on the Douglas-Peucker function. The contour is divided into multiple curve segments, and redundant points near the contour are deleted by comparing the threshold to extract the refined crack pixel-level contour.
[0078] In step S7, the ratio conversion between pixels and millimeters is achieved by calculating the perimeter and area of the reference box. In the present invention, the ArcLength function is used to calculate the perimeter of the closed contour, and the ContourArea function is used to calculate the area of the contour.
[0079] In step S8, approximate the perimeter of the extracted crack contour as twice the crack length, and use the maximum inscribed circle to represent the maximum width of the crack. Adjust the parameters of the gradient threshold and the minimum distance from the center of the circle, calculate and store the parameter space values corresponding to each combination of the center and radius, and then select the circle with the largest radius, and its diameter is used as the maximum pixel width of the crack.
[0080] In step S4, the trained region convolutional neural network model is used to directly identify the crack bounding boxes in the image, realizing the rapid detection of concrete cracks. In step S6, the DP-FindContours refined crack contour extraction algorithm is proposed, improving the detection accuracy and robustness of micro-cracks. At the same time, in steps S7 and S8, based on the method of scale ratio conversion of the reference object, the real millimeter size of the concrete cracks rather than the pixel size is quantified, further helping engineers accurately evaluate the real damage situation of the cracks on site, and realizing the automation and intelligence of concrete crack detection.
[0081] In this embodiment, the pixel sizes and conversion ratios of the five groups of crack representative samples are shown in Table 1. The maximum pixel width of the crack is characterized by the maximum inscribed circle. In order to compare the crack sizes obtained by this method with the actual sizes, size measuring instruments such as crack width gauges and vernier calipers are used to measure the actual length and maximum width of the cracks. The size quantification and instrument measurement comparison results of the five groups of crack representative samples are shown in Table 2. It can be seen from Table 2 that the real crack sizes obtained by this method are relatively close to the actual values measured by the instruments. The overall accuracy can reach over 90%, the length error is within 7%, and the width error is within 8%. When the maximum width is greater than 1 mm, the error is small, basically about 3%; when the maximum width is less than 1 mm, the error increases to about 7%. It can be seen that the proposed intelligent recognition method for the size of concrete micro-cracks based on DP-FindContours and the stamp reference frame can perform relatively accurate size conversion.
[0082] Table 3 shows the crack width recognition results of different methods, including the proposed method and other computer vision detection methods such as binocular cameras and laser point clouds. It can be seen that compared with the existing methods, the error of the proposed intelligent recognition method for the size of concrete micro-cracks based on DP-FindContours and the stamp reference frame is reduced by 20% - 30%, and it can accurately identify micro-cracks with a width of 0.5 mm - 1 mm. However, the methods based on binocular cameras and laser point clouds are affected by the instruments themselves and are difficult to identify micro-cracks within 1 mm, and the error is relatively high.
[0083] Table 1. Pixel Sizes and Conversion Ratios of Five Groups of Crack Representative Samples
[0084]
[0085] Table 2. Comparison Results of Size Quantification and Instrument Measurement of Five Groups of Crack Representative Samples
[0086]
[0087] Table 3. Comparison of Crack Width Detection Results between the Proposed Method and Existing Computer Vision Methods
[0088]
[0089] The above embodiments describe the basic principles, main features and technical routes of the present invention, and also show the effectiveness and superiority of the present invention in the rapid detection of micro-cracks in concrete. It should be emphasized that the embodiments described in the present invention are illustrative rather than restrictive, and do not limit the patent scope of the present invention accordingly. All those directly or indirectly modified by those skilled in the art according to the technical solution of the present invention are equally included in the patent protection scope of the present invention. The scope of protection required by the present invention is defined by the appended claims and their equivalents.
Claims
1. An intelligent identification method for concrete micro-crack size based on DP-FindContours and stamp reference frame, characterized in that: The following steps are involved: S1. Obtain the two-dimensional image of concrete cracks taken on site and construct the training and testing data sets; then train the regional convolutional neural network model based on the data set, extract feature maps and return all bounding boxes that may contain cracks, i.e. anchor boxes; S2, using the non-maximum suppression algorithm NMS to select the anchor frame with the highest confidence, and remove the remaining anchor frames with high overlap with the selected frame, to ensure that only one optimal anchor frame is output for each crack; S3, marking the reference frame, that is, stamping a pre-designed rectangular stamp next to the concrete crack to be detected, with the stamp size of M×N; Get the crack image containing the complete stamp and convert it from RGB three-channel to a single-channel grayscale image; S4, using the model M trained in step S1 to identify cracks in the image, outputting the optimal anchor box through step S2, and automatically cropping the detected crack target bounding box; S5, crack image denoising, using Gaussian filtering and Canny gradient algorithm to detect strong and weak edges of the image; S6. Extract the pixel-level contour of the crack in the target bounding box, and propose an optimized FindContours algorithm based on the Douglas-Peucker function, namely the DP-FindContours algorithm to refine the crack contour extraction; S7, pixel and millimeter scale conversion; Apply DP-FindContours to extract the outline of the seal and calculate the pixel-level perimeter R of the outline p and pixel-level area A p , according to the known actual size of the seal, calculate the millimeter-level length conversion ratio P of a single pixel in the image r and area conversion ratio P a : S8. Quantify the millimeter size of concrete cracks and obtain the pixel perimeter R of the cracks crack and area A crack .
2. According to claim 1, the method for intelligent identification of concrete micro-crack size based on DP-FindContours and stamp reference frame is characterized in that: Step S1 uses the following performance evaluation indexes to evaluate the crack identification model, and after the evaluation, iteratively updates the weight of the model until the model is evaluated as qualified; The performance indicators include: Classification loss cls_loss is used to calculate whether the anchor box is correctly classified: Where N cls To calculate the total number of anchor boxes in the classification loss, p i Refers to the probability of the anchor box predicting the classification; when the anchor box is completely a positive sample, p i * =1, when it is completely negative sample, p i * =0. cls (p i ,p i * ) is the logarithmic loss of positive and negative samples: Bounding box regression loss box_loss: Where N reg To calculate the total number of anchor boxes in the regression loss, λ is a hyperparameter, t i is the vector {t x ,t y ,t w ,t h }, represents the offset predicted by the anchor box during the training phase, where x, y, w, and h refer to the center relative coordinate difference (x, y) and the width and height of the anchor box, respectively, and t i * With t i The dimensions are the same, indicating the actual offset of the anchor box during the training phase; L reg (t i ,t i * ) is the regression loss of the predicted and actual offsets: Where σ is the parameter that controls the smoothing area, which is 3 here.
3. According to claim 1, the method for intelligent identification of concrete micro-crack size based on DP-FindContours and stamp reference frame is characterized in that: In step S3, the size of the seal reference object is 25mm×50mm, and the content includes the inspector's name, contact information and a QR code. The QR code is set to facilitate the recording of each data for long-term observation. The size information of the crack damage in the current photo can be obtained by scanning the QR code.
4. According to claim 1, the method for intelligent identification of concrete micro-crack size based on DP-FindContours and stamp reference frame is characterized in that: In step S4, the model pre-trained in step S1 is used to identify cracks in the image, the optimal anchor box is output through step S2, and the bounding box containing the target crack is automatically cropped; let the horizontal coordinate value x of the target center point be centre , the ordinate value y of the target center point centre , the width W of the target, and the height H of the target, then the numerical calculation formulas of the four vertices (x1, y1), (x1, y2), (x2, y1) and (x2, y2) of the target box are as follows: Formula (13); then, according to the obtained four values of x1, y1, x2, y2, the crack image is cropped in the horizontal and vertical directions respectively to extract the target boundary box of the crack, and the cropped image is denoised again using Gaussian filtering and Canny algorithm to obtain a binary crack image; 5. According to claim 1, the method for intelligent identification of concrete micro-crack size based on DP-FindContours and stamp reference frame is characterized in that: Step S6, the specific steps of the DP-FindContours algorithm are as follows: Assume that the pixel at the i-th row and j-th column in the image is (i, j), f ij represents the gray value of the pixel point, then the crack image can be expressed as F = {f ij }, where pixels with grayscale values of 0 and 1 are called 0 pixels and 1 pixels respectively; get the boundary from the boundary starting point and assign a unique number B to each newly discovered boundary k ; Consider the border of the crack image as the first boundary B1, scan the image from left to right and from top to bottom, and when the gray value of a certain pixel is scanned, perform the following operations: (1) If f ij = 0 and f i,j+1 =1, then point (i,j) is the starting point of the outer boundary; if f ij =1 and f i,j+1 = 0, then point (i, j) is the starting point of the hole boundary, and the number of the currently tracked boundary is updated to B k+1 ; (2) According to the previous boundary B k and the current new boundary B k+1 Type, you can get the current boundary B k+1 parent bounds; (3) With (i, j) as the center and (i, j+1) as the starting point, search in a clockwise direction to see if there is a 1-pixel point in the connected domain of (i, j); if so, let (p1, q1) be the first 1-pixel point in the clockwise direction; otherwise, continue scanning from point (i, j+1) until the vertex at the lower right corner of the image ends; (4) With (i, j) as the center and (p1, q1) as the starting point, search counterclockwise to see if there is a 1-pixel point in the connected domain of (i, j); if so, let (i, j) be B k ; If it is a pixel that has been checked, continue scanning from point (i, j+1) until it ends at the lower right corner of the image; (5) saving the boundary topology sequence obtained in operation steps (1) to (4) as the extracted contour, calculating the areas of all contours and sorting them, and taking the contour with the largest area as the contour of the crack; (6) Approximate the crack contour as a series of curve segments, connect a straight line between the first and last points of each curve segment, find the point on the contour with the largest distance from the straight line, and calculate the distance between the point and the straight line; then compare the distance with a predetermined threshold value, if it is less than the threshold, take the straight line segment as the approximation of the contour; if it is greater than the threshold, divide the curve into two segments at the point, and repeat this operation for the two segments respectively; When all curve segments are processed, the broken lines formed by each segmentation point are connected in sequence, and the redundant points near the contour are deleted, so that the refined pixel-level contour of the tiny crack can be extracted.
6. The method for intelligently identifying the size of concrete micro cracks based on DP-FindContours and a stamp reference frame according to claim 5, characterized in that: The size of the threshold is calculated by the ratio of the contour perimeter, and the ratio is set to 0.
01.
7. The method for intelligently identifying the size of concrete micro cracks based on DP-FindContours and a stamp reference frame according to claim 1, characterized in that: Step S8: crack pixel perimeter R crack and area A crack The calculation method is as follows: The true length of the crack is: Where, L is the actual length of the crack, in mm, R crack is the pixel perimeter of the crack, in pixels, P r The length conversion ratio of a single pixel, in mm / pixel; The actual area of the crack is: S=P a A crack (8) Where S is the actual area of the crack, in mm 2 ,A crack is the crack pixel area, in pixels, P a The area conversion ratio of a single pixel, in mm 2 / pixel; The maximum width of the crack is: W max =P r D crack (9) Where W max is the maximum width of the crack, in mm, D crack The diameter of the largest inscribed circle, in pixels.
Citation Information
Cited By
Crack real-time detection method and device based on coin reference
CN121010590A