A crack monitoring method and terminal

By using a well-trained target detection network and skeleton algorithm, and leveraging an improved YOLOv8 network and full-dimensional dynamic convolution, concrete cracks can be automatically detected. This solves the problems of low efficiency and insufficient accuracy in existing crack monitoring technologies, and achieves efficient and accurate automated monitoring and early warning.

CN117523385BActive Publication Date: 2025-10-17JINQIANMAO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311304542.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-10
Publication Date
2025-10-17
Estimated Expiration
2043-10-10

AI Technical Summary

Technical Problem

In existing technologies, crack monitoring of concrete structures is inefficient and the identification effect is not accurate enough, making it difficult to achieve automated and timely alarms, which affects building safety.

Method used

A trained object detection network and skeleton algorithm are used to acquire images of the crack area through a high-definition camera. An improved YOLOv8 network and full-dimensional dynamic convolution are used in conjunction with the skeleton algorithm to extract crack images and calculate crack length and width for alarm purposes.

Benefits of technology

It improves the efficiency and accuracy of crack detection, realizes automated monitoring and early warning, reduces labor costs, and ensures building safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117523385B_ABST
    Figure CN117523385B_ABST
Patent Text Reader

Abstract

The application discloses a kind of crack monitoring method and terminal, and the image to be monitored is obtained crack area image by trained target detection network;The target detection network includes multiple detection heads of different scales;The crack area image is obtained crack image by skeleton algorithm;The length and width of crack in the crack image are calculated;The crack area image in the image to be monitored is obtained by the trained target detection network in the application, and then crack image is obtained according to skeleton algorithm, the crack area image in the image to be monitored is obtained by target detection network first, and then crack is extracted in crack area image by skeleton algorithm, to realize that crack is automatically extracted from the image obtained from camera, and the specific position of crack is calculated by confirming crack area first, to improve the efficiency and accuracy of obtaining crack.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing, in particular to a crack monitoring method and terminal. BACKGROUND

[0002] As one of the most widely used materials, concrete is widely used in civil engineering construction, such as road, bridge, building, tunnel, dam and other infrastructure construction. However, concrete materials are easily affected by the environment, and if not properly maintained, the damage to the concrete structure is inevitable. Among various damages to the concrete structure, the appearance of cracks, especially some visible cracks, will undoubtedly affect the safety of the overall structure of the building.

[0003] In the prior art, monitoring of changes in concrete structures is usually performed, and concrete monitoring is performed to detect possible hidden dangers and other abnormal phenomena as early as possible to prevent serious accidents. Since the construction period is generally long, if manual inspection is used, not only is the efficiency low, but also the time and labor costs are high, so automatic monitoring equipment such as high-definition cameras is usually used for fixed-point monitoring, but the recognition effect of many recognition methods is not accurate enough. How to realize automatic monitoring of cracks in the construction surface of concrete and timely alarm to solve the safety hazard is a problem to be solved. SUMMARY

[0004] The technical problem to be solved by the present application is to provide a crack monitoring method and terminal, which can automatically detect concrete cracks and improve recognition efficiency and accuracy.

[0005] To solve the above technical problems, one technical solution adopted by the present application is:

[0006] A crack monitoring method, comprising the steps of:

[0007] obtaining a crack region image from a to-be-monitored image through a trained target detection network; the target detection network comprises a plurality of detection heads of different scales;

[0008] obtaining a crack image from the crack region image through a skeleton algorithm;

[0009] calculating the length and width of the crack in the crack image, and alarming according to the length and width.

[0010] To solve the above technical problems, another technical solution adopted by the present application is:

[0011] A crack monitoring terminal, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0012] obtaining a crack region image from the to-be-monitored image through a trained target detection network; the target detection network comprises a plurality of detection heads of different scales;

[0013] obtaining a crack image from the crack region image through a skeleton algorithm;

[0014] calculating the length and width of the crack in the crack image, and performing an alarm according to the length and width.

[0015] The present application has the beneficial effects that: the crack region image is obtained through the trained target detection network, then the crack image is obtained according to the skeleton algorithm, the crack region image in the to-be-monitored image is obtained through the target detection network, the target detection network comprises a plurality of detection heads of different scales, which can better obtain the features in the image, especially can determine the scale of the detection head according to the features of the crack, magnify the advantages of the target detection network in finding the crack, and then extract the crack in the crack image through the skeleton algorithm, realize automatic extraction of the crack from the image obtained by the camera, and improve the efficiency and accuracy of obtaining the crack through the method of confirming the crack region first and then calculating the specific position of the crack. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 A step flow chart of a crack monitoring method according to an embodiment of the present application;

[0017] Figure 2 A structural schematic diagram of a crack monitoring terminal according to an embodiment of the present application;

[0018] Label explanation:

[0019] 1. A crack monitoring terminal; 2. A processor; 3. A memory. DETAILED DESCRIPTION

[0020] In order to make the technical content, purposes and effects of the present application clear, the following will be described in detail in combination with the embodiments and the accompanying drawings.

[0021] Please refer to Figure 1 A crack monitoring method, comprising the steps of:

[0022] obtaining a crack region image from the to-be-monitored image through a trained target detection network;

[0023] obtaining a crack image from the crack region image through a skeleton algorithm;

[0024] calculating the length and width of the crack in the crack image, and performing an alarm according to the length and width.

[0025] From the above description, the beneficial effects of the present application are that the crack region image in the to-be-monitored image is obtained through the trained target detection network, and the crack image is obtained through the skeleton algorithm, so that the crack in the image obtained by the camera is automatically extracted, and the efficiency and accuracy of obtaining the crack are improved through the method of confirming the crack region and then calculating the specific position of the crack.

[0026] Further, before the to-be-monitored image is obtained through the trained target detection network to obtain the crack region image, the method further comprises:

[0027] obtaining a target monitoring region image;

[0028] preprocessing the target monitoring region image to obtain the to-be-monitored image.

[0029] From the above description, after obtaining the target monitoring region image directly collected by the camera, preprocessing the target monitoring region image to obtain the to-be-monitored image and then performing subsequent operations can improve the efficiency and accuracy of subsequent calculations.

[0030] Further, the preprocessing the target monitoring region image to obtain the to-be-monitored image comprises:

[0031] converting the target monitoring region image to an HSV color space;

[0032] obtaining a light component and a reflection component according to a total variation model;

[0033] enhancing details of the reflection component to obtain a target reflection component, and adjusting the light component according to local brightness information to obtain a target light component;

[0034] merging the target reflection component and the target light component to obtain an enhanced brightness component, and converting the target detection region image to an RGB color space according to the enhanced brightness component to obtain the to-be-monitored image.

[0035] From the above description, after the image is converted to the HSV color space, the brightness component can be obtained, which is divided into the reflection component and the light component for enhancement, thereby improving the image enhancement effect.

[0036] Further, before the to-be-monitored image is obtained through the trained target detection network to obtain the crack region image, the method further comprises:

[0037] continuously obtaining a plurality of construction surface concrete images through the camera every interval of a preset time period;

[0038] obtaining a label of a crack region in the construction surface concrete image;

[0039] Train the initial target detection network according to the marking and the construction surface concrete image to obtain the trained target detection network.

[0040] As can be seen from the above description, a plurality of construction surface concrete images are continuously acquired by the camera every interval preset time period and are marked, serving as a training set of the initial target detection network, and the accuracy of the target detection network obtained by training can be improved by training based on the acquired real concrete image.

[0041] Further, the initial target detection network is an improved YOLOv8 network.

[0042] Before training the initial target detection network according to the marking and the construction surface concrete image, the method comprises the following steps of:

[0043] An detection head for detecting a feature map with a size of 160x160 pixels and a target size greater than 4x4 is added in the YOLOv8 network.

[0044] The convolution layer is changed to a full-dimensional dynamic convolution.

[0045] The loss function is changed to a mixed function combining Focal and EIoU.

[0046] As can be seen from the above description, the original YOLOv8 network is modified, and an additional detection head is added. Since the cracks in the photographed image are usually thin and narrow and are easy to be missed, an additional detection head for small targets is added to improve the detection capability for small targets, so that the cracks in the image can be better found. In addition, the original static convolution is replaced by a full-dimensional dynamic convolution, which can significantly improve the accuracy while maintaining a high inference speed.

[0047] Further, between the steps of acquiring the crack region image from the trained target detection network and obtaining the crack image from the crack region image by the skeleton algorithm, the method comprises the following steps of:

[0048] The crack region image is subjected to image segmentation to obtain a mask image comprising a crack region and a non-crack region.

[0049] The step of obtaining the crack image from the crack region image by the skeleton algorithm comprises the following steps of:

[0050] The mask image is subjected to the skeleton algorithm to obtain the crack image.

[0051] As can be seen from the above description, after the crack region image is acquired by the target detection network, image segmentation is performed to acquire the crack region and the non-crack region, which further reduces the calculation amount when the crack range is finally calculated, and the processing efficiency of the image is improved by layer-by-layer subdivision.

[0052] Further, the image segmentation of the crack region image to obtain the mask image including the crack region and the non-crack region comprises:

[0053] Converting the crack region image into a gray scale image;

[0054] Removing the noise in the gray scale image by median filtering to obtain a standard gray scale image;

[0055] Segmenting the standard gray scale image by the trained SegNet inference model to obtain a binary mask image;

[0056] Removing isolated noise points in the binary mask image and performing erosion and dilation to obtain the mask image including the crack region and the non-crack region.

[0057] As can be seen from the above description, after the image is converted into a gray scale image, the binary mask image including the crack region and the non-crack region is obtained by segmentation through the trained SeqNet inference model, which further simplifies the information in the image and reduces the data processing amount in the subsequent steps.

[0058] Further, the mask image is obtained by the skeleton algorithm to obtain a crack image, which comprises:

[0059] Obtaining the contour point group of the crack region in the mask image to form an initial contour point set;

[0060] Iterating all the contour points, when a target contour point is iterated, detecting the 8-pixel neighborhood corresponding to the target contour point, judging whether it only contains 3 connected pixels, if so, deleting the target contour point from the initial contour point set to obtain a first contour point set, and deleting the target contour point in the mask image;

[0061] Iterating all the contour points in the first contour point set, when a target contour point is iterated, detecting the 8-pixel neighborhood corresponding to the target contour point, judging whether it only contains 3 or 4 connected pixels, if so, deleting the target contour point from the first contour point set and deleting the target contour point in the mask image, and obtaining a second contour point set after the iteration is completed;

[0062] Iterating all the contour points in the second contour point set, when a target contour point is iterated, detecting the 8-pixel neighborhood corresponding to the target contour point, judging whether it only contains 3, 4 or 5 connected pixels, if so, deleting the target contour point from the second contour point set and deleting the target contour point in the mask image, and obtaining a third contour point set after the iteration is completed;

[0063] traversing all the contour points in the third contour point set, when a target contour point is traversed, detecting its corresponding 8-pixel neighborhood, judging whether it only contains 3, 4, 5 or 6 connected pixels, if yes, deleting the target contour point from the third contour point set and deleting the target contour point in the mask image, and obtaining a fourth contour point set after the traversal is completed;

[0064] traversing all the contour points in the fourth contour point set, when a target contour point is traversed, detecting its corresponding 8-pixel neighborhood, judging whether it only contains 3, 4, 5, 6 or 7 connected pixels, if yes, deleting the target contour point from the fourth contour point set and deleting the target contour point in the mask image, and obtaining an initial skeleton after the traversal is completed;

[0065] traversing all the pixel points in the initial skeleton, when a target pixel point is traversed, detecting its corresponding 8-pixel neighborhood, judging whether it only contains 3, 4, 5, 6 or 7 connected pixels, if yes, deleting the target pixel point from the initial skeleton, and obtaining a crack image after the traversal is completed.

[0066] As can be seen from the above description, the number of connected pixels in the judgment is gradually increased, the pixels in the contour field are gradually eliminated, and the last path is reserved to represent the crack, so that the actual length and actual width of the crack can be reasonably obtained.

[0067] Further, the calculating the length and width of the crack in the crack image comprises:

[0068] obtaining the actual length, actual width, pixel length and pixel width of the image picture to be monitored through laser ranging and camera parameters;

[0069] calculating the length pixel number and width pixel number of the crack according to the crack image;

[0070] obtaining the actual length of the crack according to the actual length, pixel length and length pixel number of the crack of the image picture to be monitored;

[0071] obtaining the actual width of the crack according to the actual width, pixel width and width pixel number of the crack of the image picture to be monitored.

[0072] As can be known from the above description, according to the ratio of the pixel length / width and the actual length / width when the original image is acquired, the actual length / width corresponding to the length / width of a single pixel can be acquired; then when the number of pixels corresponding to the crack is acquired, the corresponding actual length / width can be deduced, so as to obtain the actual length and the actual width of the crack to make a warning, and automatic monitoring and warning of the crack are realized, for example, the crack whose actual length or actual width exceeds a certain threshold value or both can be warned, or different threshold values can be set for the actual length and the actual width respectively.

[0073] Please refer to Figure 2 A crack monitoring terminal, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the crack monitoring method described above when executing the computer program.

[0074] The crack monitoring method and the terminal described above can be applied to scenarios in which automatic monitoring and warning of concrete cracks are required, for example, construction sites or monitoring of buildings in use, which will be described below through specific embodiments.

[0075] Please refer to Figure 1 Embodiment one of the present application is:

[0076] A crack monitoring method, comprising the steps of:

[0077] S1, acquiring a target monitoring area image; preprocessing the target monitoring area image to obtain a to-be-monitored image, comprising:

[0078] S11, converting the target monitoring area image to an HSV color space, i.e., hue (Hue), saturation (Saturation) and brightness (Value), and extracting a brightness component V; the HSV space not only conforms to the way in which humans perceive colors, but also describes colors very simply and completely, and the brightness channel is processed because the brightness of the image can be enhanced without serious color distortion;

[0079] S12, acquiring an illumination component and a reflection component from the brightness component V according to a total variation model; accurate high details are retained, noise amplification is suppressed, and a local search operation is used to constrain the reflection component, so that a variable corresponding to the reflection component is brought into a solving model to obtain an ideal reflectance image, and the objective function (i.e., the function for solving the total variation model) is as shown in the following formula:

[0080]

[0081] s.t.s≤l;

[0082] Wherein, alpha, beta and mu are regularization coefficients, omega is the original image; the first term |Dr| in the model is the first-order difference of the image reflection component r, which acts to constrain the properties of the piecewise constant (equivalent to the reflection component) of the reflectance through local difference operation; the second term |▽l| 2 is the difference term of the illumination component l, which acts to constrain the smoothness to ensure the spatial smoothness of the illumination image; the third term (l-r-s) 2 is the fidelity term, which constrains l and r+s to be close, s represents the gray image corresponding to the original image omega, and the last term l 2 is the experience term; finally, l and r are obtained by solving; since the image is composed of a series of discrete pixel points, the integral of the image is actually a summation; dx in the objective function represents the change of any point in the integral image, that is, the summation operation of the pixel points of the local difference term is constrained to be as small as possible.

[0083] First, assume that the gray image is composed of a reflection component R and an illumination component L, then the gray image S has S=RxL, wherein according to the characteristics of the reflection component and the illumination component, the size of R is between 0 and 1, and the size of L is between 0 and positive infinity, which means that L>S>0. In order to process the product form, first convert it to the logarithmic domain, s=log(S), l=log(L), r=log(R), s=l+r. Based on this assumption, r is a piecewise constant and changes dramatically; l is smooth, so the third term (l-r-s) 2 is to make the three close, that is, to make l-r=s so as to conform to the characteristics of the image itself, so that the final solution result is not too distorted; the model simultaneously considers the characteristics of the illumination component and the reflection component, and uses prior information to constrain the two variables differently, so that the illumination image and the reflectance image can be more accurately and reasonably decomposed;

[0084] S13, performing detail enhancement on the reflection component to obtain a target reflection component, and adjusting the illumination component according to local brightness information to obtain a target illumination component, comprising:

[0085] S131, after separating the reflection component, the illumination component can be processed separately to further improve the brightness and contrast, comprising:

[0086] (1) The amplification coefficient of the illumination component is calculated by using the image background brightness, and the brightness and contrast are adjusted by using the coefficient. Since the gamma correction is for global brightness adjustment, it cannot obtain good results for images with uneven illumination, and over-enhancement often occurs. Therefore, after the illumination information is extracted, the illumination component is adjusted according to the local brightness information of the image. By using different stretching curves for high-brightness and low-brightness pixel values, the phenomenon of local brightness over-enhancement is avoided. The image background brightness can be said to belong to environmental information. For example, some images are relatively dark in some parts, and some images are relatively bright in some parts. The brightness information is used to calculate the enhancement parameter to prevent the use of a uniform parameter during enhancement, so that the effect of images with uneven brightness is worse, such as brighter and darker. The main formula of the algorithm is as follows:

[0087]

[0088]

[0089] All the brightness values are in the 0-1 space, I(x, y) is the inverted brightness, and T(x, y) is the enhanced brightness value (the inverted T is the final enhanced brightness), and it is assumed that 0<β<1 and 1<γ, so that the two functions are equal, that is, β*X=X^γ, we can get the segmentation point X=β^(1 / (1-γ)) marking the boundary of the segmentation function, wherein the β coefficient is calculated according to the local brightness value VLE, that is, when VLE<sigma, a stronger stretching is used when the image brightness is low, and when VLE>sigam, a smaller stretching is used when the image brightness is high; sigma is a threshold parameter, and in an optional implementation, sigma is 0.05; the algorithm for adaptive adjustment according to the local characteristics of the image can greatly improve the robustness of the algorithm, so that the algorithm can play a better effect in the actual application process; that is, if I(x, y)≥β 1 / (γ-1) , it means that the illumination is dark (I(x, y) is the inverted brightness), so an exponential function is used for enhancement; otherwise, it means that the image region is too bright, and a linear function is used for adjustment, so as to maintain the details of the high-brightness part of the original image and prevent over-enhancement. The gradient of the non-linear mapping is large, so as to improve the brightness value and contrast of the low-illumination part;

[0090] S14, merging the target reflection component and the target illumination component to obtain an enhanced brightness component, and converting the target detection region image to the RGB color space according to the enhanced brightness component to obtain an enhanced target monitoring region image, that is, a to-be-monitored image;

[0091] S2, obtaining a crack region image by using the trained target detection network to process the to-be-monitored image;

[0092] Before step S2, the method further comprises:

[0093] S21, continuously acquire a plurality of construction surface concrete images every interval preset time period through the camera;

[0094] In an optional embodiment, a plurality of collection points are set and sampling is performed, and a high-definition camera is used to uniformly sample the monitoring points, that is, a plurality of construction surface concrete images are continuously acquired every interval time period;

[0095] S22, obtaining a mark of a crack area in the construction surface concrete image;

[0096] In an optional embodiment, the annotated tool is used to annotate the filtered scene knowledge data, that is, the filtered construction surface concrete image, and the area with cracks in the image is framed to generate a mark including coordinate and label data;

[0097] S23, training an initial target detection network according to the mark and the construction surface concrete image to obtain the trained target detection network;

[0098] In an optional embodiment, the construction surface concrete image after annotation but without mark is subjected to preprocessing in step S1 to obtain an enhanced training image, and the initial target detection network is trained according to the enhanced training image and the corresponding mark to obtain the trained target detection network;

[0099] The target detection network is an improved YOLOv8 network, and before step S23, the method further comprises:

[0100] S231, adding a detection head P2 / 4 for detecting a feature map with a size of 160X160 pixels and a target size greater than 4X4 in the YOLOv8 network, wherein 2 represents the number of the detection head, and 4 represents the size of the target detected by the detection head;

[0101] Specifically, the YOLOv8 has three detection heads by default, which can detect targets at multiple scales, and the detection sizes are:

[0102] P3 / 8: The size of the detection feature map is 80X80, which is used to detect targets with a size greater than 8X8;

[0103] P4 / 16: The size of the detection feature map is 40X40, which is used to detect targets with a size greater than 16X16;

[0104] P5 / 32: The size of the detection feature map is 20X20, which is used to detect targets with a size greater than 32X32; one detection head P2 / 4 is added for the characteristics of the crack, a detection feature map of 160X160 is added, which is used to detect targets with a size greater than 4X4, and can avoid missing detection and poor detection effect to a greater extent.

[0105] S232, change the convolution layer to full-dimensional dynamic convolution (ODConv); a single static convolution kernel is a common training paradigm for modern convolutional neural networks (CNNs), however, learning a linear combination of n convolution kernels that weigh their inputs depending on their attention can significantly improve the accuracy of lightweight CNNs while maintaining efficient inference speed; here, full-dimensional dynamic convolution is introduced, which uses a new multi-dimensional attention mechanism and parallel strategy to learn complementary attention for convolution kernels along all four dimensions of the kernel space;

[0106] S233, change the loss function to a hybrid function combining Focal and EIoU;

[0107] The loss function Focal is an improved version of the cross-entropy loss function for solving the class imbalance problem in binary classification, represented by the following formula:

[0108] Focal loss = -α t (1-pt) γ log(p t );

[0109] where α t is a weight factor, ranging from 0 to 1, used to solve the problem of positive and negative sample imbalance; γ is an adjustable focusing parameter, and a large class imbalance will affect the cross-entropy loss during training; the loss of misclassified samples accounts for the vast majority of the overall loss and dominates the gradient, Focal Loss, based on balancing the cross-entropy loss function, reduces the weight of easy-to-classify samples by adding an adjustable factor γ, focusing on the training of difficult samples, to solve the problem of difficult and easy sample imbalance, p t is the probability of hitting the target, for example, binary classification is 1 / 2, and n classes are each 1 / n;

[0110] EIoU proposes a loss function that directly penalizes the prediction results of width w and height h, defined as:

[0111]

[0112] where C w and C h are the width and height of the smallest enclosing box covering the two rectangular boxes. ρ(,) is the Euclidean distance calculation function, b is the center point of the predicted box B, b gt is the center point of the actual box B gt , w and w gt are the widths of the predicted box and the actual box, respectively, and h and h gtare the height of the predicted box and the actual box respectively; from which we can see that EIoU divides the loss function into three parts, IoU loss LIOU, distance loss L dis , and side length loss L asp . It can be seen that EIoU directly takes the side length as a penalty term, which can also solve the problem of possible side length being amplified by mistake to a certain extent;

[0113] By integrating the final Focal-EIoU loss, its expression is as follows:

[0114] L Focal-EIOU =IOU γ L EIOU ;

[0115]

[0116] Where γ is an empirical parameter, and the best trade-off value can be obtained from experiments, A represents the predicted box, and B represents the actual box;

[0117] In an optional implementation, further comprising: adjusting the hyperparameters of the improved YOLOv8 model by using evaluation indexes such as mIOU, and comprehensively training to obtain an optimal model;

[0118] S3, performing image segmentation on the crack area image to obtain a mask image including a crack area and a non-crack area, comprising:

[0119] S31, converting the crack area image into a grayscale image;

[0120] S32, removing noise in the grayscale image by median filtering to obtain a standard grayscale image;

[0121] S33, segmenting the standard grayscale image by using a trained SegNet inference model to obtain a binary mask image;

[0122] S34, removing isolated noise points in the binary mask image and performing erosion and expansion to form a plurality of closed connected domains, each connected domain representing a detected crack, to obtain a mask image including a crack area and a non-crack area;

[0123] In an optional implementation, the pixel value of the crack area belongs to a target pixel value, and the label is set to 1; the pixel value of the background and other areas is a non-target pixel value, and the label is set to 0;

[0124] Wherein, before step S33, comprising:

[0125] S331, collect the target area of the visualized crack in advance, manually crop and label, save as a data set, select SegNet algorithm, use transfer learning, train the data and obtain an inference model;

[0126] S4, obtain a crack image from the crack region image by using a skeleton algorithm, including: obtaining a crack image from the mask image by using a skeleton algorithm, including:

[0127] S41, obtain an initial contour point set by acquiring contour points of the crack region in the mask image;

[0128] S42, traverse all the contour points, when a target contour point is traversed, detect its corresponding 8-pixel neighborhood, judge whether it only contains 3 connected pixels, if so, delete the target contour point from the initial contour point set (erode) to obtain a first contour point set, and delete the target contour point in the mask image;

[0129] S43, traverse all the contour points in the first contour point set, when a target contour point is traversed, detect its corresponding 8-pixel neighborhood, judge whether it only contains 3 or 4 connected pixels, if so, delete the target contour point from the first contour point set and delete the target contour point in the mask image, and obtain a second contour point set after traversal is completed;

[0130] S44, traverse all the contour points in the second contour point set, when a target contour point is traversed, detect its corresponding 8-pixel neighborhood, judge whether it only contains 3, 4 or 5 connected pixels, if so, delete the target contour point from the second contour point set and delete the target contour point in the mask image, and obtain a third contour point set after traversal is completed;

[0131] S45, traverse all the contour points in the third contour point set, when a target contour point is traversed, detect its corresponding 8-pixel neighborhood, judge whether it only contains 3, 4, 5 or 6 connected pixels, if so, delete the target contour point from the third contour point set and delete the target contour point in the mask image, and obtain a fourth contour point set after traversal is completed;

[0132] S46, traverse all the contour points in the fourth contour point set, when a target contour point is traversed, detect its corresponding 8-pixel neighborhood, judge whether it only contains 3, 4, 5, 6 or 7 connected pixels, if so, delete the target contour point from the fourth contour point set and delete the target contour point in the mask image, and obtain an initial skeleton after traversal is completed;

[0133] S47, traversing all pixel points in the initial skeleton, when a target pixel point is traversed, detecting its corresponding 8-pixel neighborhood, judging whether it only contains 3, 4, 5, 6 or 7 connected pixels, if so, deleting the target pixel point from the initial skeleton, and obtaining a crack image after traversal is completed;

[0134] S5, calculating the length and width of the crack in the crack image, and performing warning according to the length and width, including:

[0135] S51, obtaining the actual length, actual width, pixel length and pixel width of the image picture to be monitored by laser ranging and camera parameters; then the unit actual length and unit actual width corresponding to each pixel can be calculated;

[0136] S52, calculating the length pixel number and width pixel number of the crack according to the crack image;

[0137] S53, obtaining the actual length of the crack according to the actual length, pixel length and length pixel number of the crack of the image picture to be monitored;

[0138] S54, obtaining the actual width of the crack according to the actual width, pixel width and width pixel number of the crack of the image picture to be monitored;

[0139] In an optional embodiment, the target monitoring area image is used instead of the image to be monitored;

[0140] S55, judging whether the actual length of the crack exceeds the length warning threshold and whether the actual width exceeds the width warning threshold, and setting to perform warning when any one or both are satisfied, saving the corresponding image to be monitored at the same time, urging relevant personnel to handle, and eliminating potential safety problems.

[0141] Please refer to Figure 2 , the second embodiment of the present application is:

[0142] A crack monitoring terminal 1, comprising a processor 2, a memory 3 and a computer program stored on the memory 3 and executable on the processor 2, the processor 2 executes the computer program to realize each step in the first embodiment.

[0143] In summary, the application provides a crack monitoring method and terminal, pre-acquires construction surface scene data for labeling, trains by using an improved YOLOv8 neural network, obtains a learned model, obtains a target image of a visual crack area by using the obtained model, and performs crack segmentation and skeleton extraction on a target area detected in the image, finally calculates actual length and width, and judges whether the length and width of the crack exceed a set threshold to perform alarm prompting and timely solve safety problems in construction. The application uses a high-definition camera, uses a neural network detection and segmentation model to segment and measure visual cracks on a construction surface, has high detection and calculation precision, can continuously monitor, does not need to consume labor to supervise, realizes automatic monitoring to avoid a series of safety problems, and has low operation cost.

[0144] The above is only an embodiment of the application, and does not limit the patent range of the application, and any equivalent transformation or direct or indirect application in the related technical field by using the content of the specification and drawings of the application is also included in the patent protection range of the application.

Claims

1. A crack monitoring method, characterized in that: Including steps: The image to be monitored is passed through a trained target detection network to obtain an image of the crack area; the target detection network includes multiple detection heads of different scales; Obtain a crack image by applying a skeleton algorithm to the crack region image; and calculate the length and width of the crack in the crack image; The steps of obtaining a crack region image from the image to be monitored through a trained target detection network and obtaining a crack image from the crack region image through a skeleton algorithm include: Segmenting the crack region image to obtain a mask image including the crack region and the non-crack region; The obtaining of a crack image from the crack region image by a skeleton algorithm comprises: Applying a skeleton algorithm to the mask image to obtain a crack image; The step of obtaining a crack image from the mask image through a skeleton algorithm includes: Acquire contour points of the crack area in the mask image to form an initial contour point set; Traversing all the contour points, when traversing to a target contour point, detecting its corresponding 8-pixel neighborhood to determine whether it contains only 3 connected pixels, and if so, deleting the target contour point from the initial contour point set to obtain a first contour point set, and deleting the target contour point from the mask image; Traversing all contour points in the first contour point set, when traversing to a target contour point, detecting its corresponding 8-pixel neighborhood to determine whether it contains only 3 or 4 connected pixels, and if so, deleting the target contour point from the first contour point set and deleting the target contour point from the mask image, and obtaining a second contour point set after the traversal is completed; Traversing all contour points in the second contour point set, when traversing to a target contour point, detecting its corresponding 8-pixel neighborhood to determine whether it contains only 3, 4, or 5 connected pixels, and if so, deleting the target contour point from the second contour point set and deleting the target contour point from the mask image, and obtaining a third contour point set after the traversal is completed; Traversing all contour points in the third contour point set, when traversing to a target contour point, detecting its corresponding 8-pixel neighborhood to determine whether it contains only 3, 4, 5, or 6 connected pixels, and if so, deleting the target contour point from the third contour point set and deleting the target contour point in the mask image, and obtaining a fourth contour point set after the traversal is completed; Traversing all contour points in the fourth contour point set, when traversing to a target contour point, detecting its corresponding 8-pixel neighborhood to determine whether it contains only 3, 4, 5, 6, or 7 connected pixels, and if so, deleting the target contour point from the fourth contour point set and deleting the target contour point from the mask image, and obtaining an initial skeleton after the traversal is completed; Traverse all the pixels in the initial skeleton. When the target pixel is traversed, detect its corresponding 8-pixel neighborhood to determine whether it contains only 3, 4, 5, 6 or 7 connected pixels. If so, delete the target pixel from the initial skeleton. After the traversal is completed, the crack image is obtained.

2. A crack monitoring method according to claim 1, characterized in that: Before obtaining the crack area image from the image to be monitored through the trained target detection network, the following steps are also included: Acquire images of the target monitoring area; The target monitoring area image is preprocessed to obtain an image to be monitored.

3. A crack monitoring method according to claim 2, characterized in that: The preprocessing of the target monitoring area image to obtain the image to be monitored includes: Convert the target monitoring area image to the HSV color space; Obtain illumination component and reflection component according to the total variation model; Performing detail enhancement on the reflection component to obtain a target reflection component, and adjusting the illumination component according to local brightness information to obtain a target illumination component; The target reflection component and the target illumination component are combined to obtain an enhanced brightness component, and the target detection area image is converted into an RGB color space according to the enhanced brightness component to obtain an image to be monitored.

4. A crack monitoring method according to claim 1, characterized in that: Before obtaining the crack area image from the image to be monitored through the trained target detection network, the method includes: At every preset time interval, a plurality of images of the construction surface concrete are continuously acquired through the camera; Obtaining a mark for a crack area in the construction surface concrete image; An initial target detection network is trained according to the mark and the construction surface concrete image to obtain the trained target detection network.

5. A crack monitoring method according to claim 4, characterized in that: The initial target detection network is an improved YOLOv8 network; The step of training the initial target detection network according to the marker and the construction surface concrete image includes: Add a detection head to the YOLOv8 network for detecting feature maps with a size of 160×160 pixels and objects larger than 4×4; Change the convolution layer to full-dimensional dynamic convolution; The loss function is changed to a hybrid function combining Focal and EIoU.

6. A crack monitoring method according to claim 1, characterized in that: The step of segmenting the crack region image to obtain a mask image including the crack region and the non-crack region includes: Converting the crack region image into a grayscale image; removing noise from the grayscale image by median filtering to obtain a standard grayscale image; Segment the standard grayscale image using the trained SegNet inference model to obtain a binary mask image; Isolated noise points in the binary mask image are removed and erosion and expansion are performed to obtain a mask image including crack areas and non-crack areas.

7. A crack monitoring method according to claim 1, characterized in that: Calculating the length and width of the crack in the crack image includes: Obtain the actual length, actual width, pixel length and pixel width of the image to be monitored through laser ranging and camera parameters; Calculating the number of pixels of the length and the number of pixels of the width of the crack according to the crack image; Obtaining the actual length of the crack according to the actual length and pixel length of the image to be monitored and the number of pixels of the length of the crack; The actual width of the crack is obtained according to the actual width of the image to be monitored, the pixel width and the number of pixels of the width of the crack.

8. A crack monitoring terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the crack monitoring method according to any one of claims 1 to 7 when executing the computer program.

Citation Information

Patent Citations

  • Crack detection method

    CN115240070A

  • Strip steel surface small target defect detection method and system based on super-resolution and YOLOv8

    CN116630301A