Bridge crack calibration method and device based on computer vision
Through a computer vision-based method, the edge features and lighting environment in bridge images are analyzed, and the problems of complex background and lighting interference in bridge crack detection are solved, achieving more accurate crack calibration and bridge safety assessment.
Patent Information
- Application Number
- CN202510678275.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-05-26
AI Technical Summary
Shadow interference caused by complex backgrounds and lighting environments on the bridge affects the detection accuracy of bridge cracks, and thus affects the safety assessment of bridges.
Using a computer vision-based method, by collecting grayscale images of the bridge, extracting edge profiles, analyzing the number of edge pixels and gradient directions in the neighborhood of edge pixels, calculating irregularities and edge coordination, combining these features to determine the discrimination coefficients, and then calibrating the cracks of the bridge.
Effectively distinguish between the true crack profile and other interference-formed profile, reduce detection errors, improve the accuracy of bridge crack detection, and ensure the safe use of bridges.
Smart Images

Figure CN120198512A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and particularly to a method and device for calibrating bridge cracks based on computer vision. Background Art
[0002] As an important transportation infrastructure, the safety and durability of bridges are of crucial importance. During the long-term use of bridges, due to various factors such as load effects, environmental erosion, and material aging, safety hazards such as cracks will appear in the bridge structure. It is necessary to calibrate bridge cracks and evaluate the safety status of bridges.
[0003] When visually detecting cracks on bridges, complex backgrounds on the bridges, such as scratches, marked patterns on the bridges, and shadows caused by the influence of the lighting environment, will interfere with the detection of bridge cracks, resulting in errors in the detection of bridge cracks, affecting the accuracy of calibrating bridge cracks, and further leading to inaccurate safety assessments of bridges. Summary of the Invention
[0004] In order to solve the above technical problems, a method and device for calibrating bridge cracks based on computer vision are provided to solve the existing problems.
[0005] The solution of this application to solve the technical problems is to provide a method and device for calibrating bridge cracks based on computer vision, including the following steps: In the first aspect, an embodiment of this application provides a method for calibrating bridge cracks based on computer vision, and the method includes the following steps: Collect the grayscale image of the bridge and extract all edge contours in the grayscale image; Obtain each suspected edge contour through the number of edge pixels in the neighborhood of each edge pixel on each edge contour and the average level of the grayscale values of the pixels within the edge contour; Extract the skeleton lines of each edge contour, analyze the similarity of the edges on both sides of the skeleton line of each suspected edge contour, and the length and width characteristics of each suspected edge contour, and determine the first evaluation value of each suspected edge contour; Analyze the deviation of the number of all edge pixels in the neighborhood of each edge pixel on each suspected edge contour and the deviation of the gradient direction of each edge pixel, and calculate the irregularity of each suspected edge contour; Calculate the edge coordination degree of each suspected edge contour by using the direction difference of the skeleton line between each suspected edge contour and the other edge contours and the length deviation of each suspected edge contour, and combine the irregularity to determine the second evaluation value of each suspected edge contour; Based on the first evaluation value and the second evaluation value, determine the discrimination coefficient of each suspected edge contour, evaluate each suspected edge contour, and calibrate the cracks on the bridge.
[0006] Preferably, the obtaining of each suspected edge contour includes: Count the number of all edge pixels in the neighborhood of any edge pixel on each edge contour; if the number is greater than or equal to a preset first value, record the any edge pixel as an intersection point; if the number is equal to a preset second value, record the any edge pixel as an end point; record the edge contour with the number of all end points greater than the number of all intersection points as a closed contour; Record the mean value of the gray values of all pixels within each closed contour as the average gray value; Obtain the segmentation threshold of the average gray value of all closed contours in the gray image, and record it as the first segmentation threshold; record the closed contours with the average gray value less than the first segmentation threshold as each suspected edge contour.
[0007] Preferably, the determining of the first evaluation value of each suspected edge contour includes: Calculate the aspect ratio of the minimum circumscribed rectangle of each suspected edge contour; Use the skeleton line to divide each suspected edge contour into two edge lines; calculate the similarity degree of the two edge lines; The first evaluation value is the product of the aspect ratio and the similarity degree.
[0008] Preferably, the calculating of the irregularity of each suspected edge contour includes: Count the number of all edge pixels in the local neighborhood of each edge pixel on each suspected edge contour, and record it as the neighborhood number; Record the difference between the neighborhood number of each edge pixel on each suspected edge contour and the mean value of the neighborhood numbers of all edge pixels as the quantity deviation; Calculate the tangent slope of each edge pixel through the gradient of each edge pixel; Record the difference between the tangent slope of each edge pixel and the mean value of the tangent slopes of all the other edge pixels in its local neighborhood as the direction deviation; The irregularity is the sum of the products of the quantity deviation and the direction deviation of all edge pixels on each suspected edge contour.
[0009] Preferably, the calculating of the edge cooperation degree of each suspected edge contour includes: Calculate the direction angle of each edge contour through the skeleton line of each edge contour; Dilate the width of the minimum circumscribed rectangle of each suspected edge contour, and record it as the dilation area; calculate the cumulative sum of the differences between the direction angles of each suspected edge contour and all the other edge contours within its dilation area; The segmentation threshold for obtaining the lengths of the skeleton lines of all edge contours in the grayscale image is denoted as the second segmentation threshold; The difference between the length of each suspected edge contour and the second segmentation threshold is denoted as the length deviation; perform a positive mapping on the length deviation; The edge synergy degree is the ratio of the result of the positive mapping to the cumulative sum.
[0010] Preferably, the second evaluation value is the product of the irregularity degree and the edge synergy degree.
[0011] Preferably, the discrimination coefficient is the normalized result of the product of the first evaluation value and the second evaluation value.
[0012] Preferably, evaluating each suspected edge contour includes: if the discrimination coefficient is greater than a preset threshold, it belongs to the crack contour; otherwise, it does not belong to the crack contour.
[0013] Preferably, calibrating the cracks on the bridge includes: calculating the normal direction for any skeleton point on the skeleton line of the crack contour, searching for edge pixel points on both sides along the normal direction, calculating the distance between the edge pixel points on both sides, which is denoted as the width of the any skeleton point; selecting the maximum value of the widths of all skeleton points on the skeleton line, and using the principle of pinhole camera imaging to obtain the maximum width of the crack on the bridge in the actual space, and calibrating the cracks on the bridge.
[0014] In a second aspect, an embodiment of the present application further provides a bridge crack calibration device based on computer vision, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the above-mentioned bridge crack calibration method based on computer vision are implemented.
[0015] The present application has at least the following beneficial effects: This application analyzes the situation where the edge contours in a grayscale image bifurcate to obtain closed contours. Based on the average level of the grayscale values of the pixel points within the closed contours and each suspected edge contour, the beneficial effect is that continuous and closed contours that may be formed by cracks are screened out, and the interference effects of other edge contours that are not cracks are eliminated. By analyzing the similarity of the shapes of the edges on both sides of the skeleton line of each suspected edge contour and the aspect ratio of each suspected edge contour, the first evaluation value of each suspected edge contour is determined. The beneficial effect is that it takes into account the narrow and long shape of each suspected edge contour and the change trend of the edges on both sides of the skeleton line to preliminarily evaluate the possibility that each suspected edge contour is formed by a crack. Secondly, by analyzing the number and gradient direction of the edge pixel points in the neighborhood of each edge pixel point, the irregularity of each suspected edge contour is calculated. The beneficial effect is that it takes into account the bifurcated situation formed by the cracking of each suspected edge contour and reflects the irregularity of the suspected edge contour. Further, by analyzing the consistency of the direction of each suspected edge contour with the directions of other unconnected and incompletely cracked short cracks that appear concomitantly around it, the edge coordination degree of each suspected edge contour is calculated, and the second evaluation value of each suspected edge contour is determined. The beneficial effect is that it takes into account the proximity of the directions of other cracks that appear concomitantly around it to the direction of the suspected edge contour and further reflects the possibility that the suspected edge contour is a crack. The discrimination coefficient of each suspected edge contour is determined to evaluate each suspected edge contour and calibrate the cracks on the bridge. The beneficial effect is that by capturing the fine features of the cracks, it can effectively distinguish the true crack contour from the contours formed by other interferences, reduce the detection error of other interferences on the bridge cracks, improve the accuracy of detecting cracks on the bridge, and more accurately calibrate the bridge cracks to ensure the safe use of the bridge. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The following further elaborates on the computer vision-based bridge crack calibration method of this application with reference to the drawings.
[0017] Figure 1 It is the flowchart of the steps of the computer vision-based bridge crack calibration method provided by the embodiment of this application; Figure 2 It is the flowchart of the steps of the method for obtaining the irregularity of each suspected edge contour provided by the embodiment of this application; Figure 3 It is the flowchart of the steps of the discrimination coefficient provided by the embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] To make the objectives, technical solutions, and advantages of this application clearer and more understandable, the following further elaborates on the method and device for calibrating bridge cracks based on computer vision proposed in this application in conjunction with the accompanying drawings and implementation examples. It should be understood that the specific implementation examples described herein are only used to explain this application and are not used to limit this application.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs.
[0020] Please refer to Figure 1 , which shows the flowchart of the steps of the method for calibrating bridge cracks based on computer vision provided in an embodiment of this application. The method includes the following steps: Step 1: Collect the grayscale image of the bridge and extract all edge contours in the grayscale image.
[0021] Collect the bridge image by using a drone equipped with a binocular high-definition camera. Since the collected bridge image is affected by factors such as light, noise, and interfering objects, the bridge image is denoised and grayscaled to remove the impurity information in the image and obtain the grayscale image of the bridge; In this embodiment, the median filtering algorithm is used for denoising. Among them, the median filtering algorithm and grayscaling are well-known technologies and will not be elaborated here. As other implementation manners, implementers can use other methods of existing technologies, such as mean filtering, etc. This embodiment does not make special restrictions on this.
[0022] Perform edge detection on the grayscale image to extract all edge contours in the grayscale image; In this embodiment, the Canny edge detection algorithm is used for edge detection. Among them, the Canny edge detection algorithm is a well-known technology and will not be elaborated here. As other implementation manners, implementers can use other methods of existing technologies, such as the Sobel operator, etc. This embodiment does not make special restrictions on this.
[0023] So far, the grayscale image of the bridge is obtained.
[0024] Step 2: Obtain each suspected edge contour based on the number of edge pixels in the neighborhood of each edge pixel on each edge contour and the average level of the grayscale values of the pixels within the edge contour; extract the skeleton lines of each edge contour, analyze the similarity of the edges on both sides of the skeleton line of each suspected edge contour, and the length and width characteristics of each suspected edge contour, and determine the first evaluation value of each suspected edge contour.
[0025] When cracks appear in a bridge, due to different illumination angles and shooting angles, the area where the cracks are located in the bridge image will present a shadow area that is completely different from other areas. At the same time, if there are damp areas in the bridge body image, there may also be some characteristics of the shadow areas that exist when cracks appear, which will interfere with the detection of cracks. However, compared with the areas where cracks actually exist, the gray values of the pixel points in the shadow areas formed by factors such as dampness are higher, and there are certain differences between the edges of the shadow areas formed and the edges of the real cracks; secondly, the edge contours corresponding to cracks are generally continuous and closed contours. By screening the closed contours, the interference effects of other factors are initially eliminated.
[0026] Based on the above analysis, obtain the suspected edge contours in the grayscale image, specifically: Count the number of all edge pixel points in the neighborhood of any edge pixel point on each edge contour; If the number is greater than or equal to a preset first value, record the any edge pixel point as an intersection point; if the number is equal to a preset second value, record the any edge pixel point as an end point; record the edge contour with the number of all end points greater than the number of all intersection points as a closed contour; In this embodiment, count the number of all edge pixel points in the 3×3 neighborhood of any edge pixel point on each edge contour; secondly, the preset first value is taken as 3, and the preset second value is taken as 1. As other implementation manners, the implementer can set them according to the actual situation.
[0027] Record the edge contour with the number of all end points greater than the number of all intersection points as a closed contour; It should be noted that if there are 3 or more edge pixel points in the 3×3 neighborhood of the any edge pixel point, it means that the any edge pixel point is an intersection point. If there is 1 edge pixel point in the 3×3 neighborhood of the any edge pixel point, it means that the any edge pixel point is an end point. And if the number of intersection points is greater than or equal to the number of end points, it means that the edge contour belongs to a closed edge contour. And when there are no end points and the number of intersection points is 0, it means that the edge contour belongs to a closed contour without branches. When the number of end points is greater than the number of intersection points, it means that the edge contour belongs to an unclosed edge contour.
[0028] Record the mean value of the gray values of all pixel points within each closed contour as the average gray value; Adopt a threshold segmentation algorithm to obtain the segmentation threshold of the average gray value of all closed contours in the grayscale image, denoted as the first segmentation threshold; Record the closed contour with the average gray value less than the first segmentation threshold as a suspected edge contour; In this embodiment, the Otsu threshold segmentation algorithm is used to obtain the segmentation threshold. The Otsu threshold segmentation algorithm is a well-known technology and will not be elaborated here. As other implementation manners, implementers can adopt other methods of the prior art, such as the cross-validation method, etc. This embodiment does not make special restrictions on this.
[0029] Furthermore, for the contours corresponding to cracks in the grayscale image, since the edge contours caused by cracking are mostly long and narrow in shape, while the edge contours caused by other factors will form different contours according to their respective formation reasons. For example, the edge contour of the shadow formed in the damp area in the grayscale image will have a diffusion-shaped shadow feature that spreads outward from the damp center. Therefore, analyzing the shape features of the suspected edge contours specifically includes: Calculate the aspect ratio of the minimum circumscribed rectangle of each suspected edge contour; It should be noted that the larger the aspect ratio, the greater the degree of narrowness of the suspected edge contour, and the greater the possibility that the suspected edge contour is a crack.
[0030] Secondly, the contour change trends on both sides of the crack in the grayscale image should be similar, while for the edge contour corresponding to the damp factor, the diffusion characteristics form symmetry in the contours on both sides, but their change trends are different. For example, if the edge contour formed by dampness is an ellipse, the two edge lines are symmetric, but the bending directions are different. Therefore, the change trends of the two edge lines are different. Therefore, by dividing each suspected edge contour into two segments and analyzing the similarity of the edge lines, specifically: Extract the skeleton lines of each edge contour; use the skeleton lines to divide each suspected edge contour into two edge lines; It should be noted that the process of extracting the skeleton lines is a well-known technology and will not be elaborated here.
[0031] Calculate the similarity degree of the two edge lines; In this embodiment, the shape context algorithm is used to calculate the similarity degree of the two edge lines. The shape context algorithm is a well-known technology and will not be elaborated here.
[0032] It should be noted that if the two edge lines are formed due to cracks, then the change trends of these two edge lines should be highly similar. The greater the similarity degree, the more likely the suspected edge contour is a crack.
[0033] Furthermore, based on the aspect ratio and the similarity degree, determine the first evaluation value to preliminarily evaluate the possibility that the suspected edge contour is a crack, specifically: Take the product of the aspect ratio and the similarity degree as the first evaluation value of each suspected edge contour; It should be noted that the larger the first evaluation value, the more likely the suspected edge contour is caused by a crack.
[0034] So far, the first evaluation value of each suspected edge contour is obtained.
[0035] Step 3: Analyze the deviation of the number of all edge pixels in the neighborhood of each edge pixel on each suspected edge contour, and the deviation of the gradient direction of each edge pixel, and calculate the irregularity of each suspected edge contour; use the direction difference of the skeleton lines between each suspected edge contour and the other edge contours, and the length deviation of each suspected edge contour, calculate the edge cooperation degree of each suspected edge contour, and combine the irregularity to determine the second evaluation value of each suspected edge contour.
[0036] Furthermore, for the cracks on the bridge body, there will be some small cracks in other directions along the main cracking direction during the cracking process. These small cracks are the unique irregular features of the cracks, and the pattern and other contour interferences in the bridge image will not have this feature. Therefore, analyze the bifurcation situation formed by the cracking of each suspected edge contour in the grayscale image, calculate the irregularity, and the step flow chart of the method for obtaining the irregularity of each suspected edge contour provided by the embodiment of the present application is as Figure 2 shown, specifically including: Count the number of all edge pixels in the local neighborhood of each edge pixel on each suspected edge contour, and record it as the neighborhood number of each edge pixel. In this embodiment, count the number of all edge pixels in the 5×5 neighborhood of each edge pixel on each suspected edge contour, and record it as the neighborhood number of each edge pixel.
[0037] Calculate the mean value of the neighborhood numbers of all edge pixels on each suspected edge contour, and record it as the average number. Record the difference between the neighborhood number of each edge pixel on each suspected edge contour and the average number as the quantity deviation. In this embodiment, record the absolute value of the difference between the neighborhood number of each edge pixel on each suspected edge contour and the average number as the quantity deviation.
[0038] Calculate the tangent slope of each edge pixel through the gradient of each edge pixel on each suspected edge contour. It should be noted that the process of obtaining the gradient of the edge pixel and calculating the tangent slope through the gradient is a well-known technology and will not be elaborated here; in this embodiment, the tangent slope of each edge pixel is measured by the ratio of the gradient of each edge pixel in the Y direction to the gradient in the X direction.
[0039] Record the mean value of the tangent slopes of the remaining all edge pixels in the local neighborhood of each edge pixel on each suspected edge contour as the average slope. In this embodiment, the mean value of the tangent slopes of all other edge pixels in the 5×5 neighborhood of each edge pixel on each suspected edge contour is denoted as the average slope.
[0040] The difference between the tangent slope of each edge pixel on each suspected edge contour and the average slope is denoted as the direction deviation; In this embodiment, the absolute value of the difference between the tangent slope of each edge pixel on each suspected edge contour and the average slope is denoted as the direction deviation.
[0041] The sum of the products of the quantity deviation and the direction deviation of all edge pixels on each suspected edge contour is taken as the irregularity of each suspected edge contour; In this embodiment, the calculation formula for the irregularity of each suspected edge contour is:
[0042] where, is the irregularity of the th suspected edge contour, is the quantity deviation of the th edge pixel on the th suspected edge contour, is the direction deviation of the th edge pixel on the th suspected edge contour, is the number of all edge pixels on the
[0043] It should be noted that the larger the quantity deviation, the greater the difference in the edge pixels contained in the local neighborhoods of different edge pixels, indicating that there are more intersection points on this suspected edge contour; secondly, the larger the direction deviation, the greater the direction difference of the remaining edge pixels in the local neighborhoods of each edge pixel, indicating that there is a forking situation on this suspected edge contour. The larger the obtained irregularity, the more irregular this suspected edge contour is, and the more it conforms to the characteristics of other small cracks caused by the crack splitting and the irregularity of the crack. Then the greater the possibility that this suspected edge contour is a crack.
[0044] Secondly, cracks will cause other short cracks that are not completely cracked and not connected to the cracks to appear around the bridge body. The directions of these cracks are similar to those of the cracks, while the interference of the corresponding edge contours of the patterns on the bridge will not show these characteristics. Therefore, by analyzing whether there are a large number of cracks with directions similar to those of the cracks around each suspected edge contour, to determine whether each suspected edge contour is the edge of a crack, and calculate the edge synergy degree, specifically: Through the skeleton line of each edge contour, calculate the direction angle of each edge contour; It should be noted that the direction angle can be obtained by the included angle between the skeleton line and the horizontal direction of the image, and the direction angle of each edge contour can be obtained.
[0045] Dilate the width of the minimum bounding rectangle of each suspected edge contour, and denote it as the dilation region; In this embodiment, taking the width as the dilation size, dilate the width of the minimum bounding rectangle of each suspected edge contour. Therefore, the width of the rectangle can be expanded to twice the original width on both the left and right sides. As other implementation manners, the implementer can set it according to the actual situation.
[0046] Calculate the cumulative sum of the differences between the direction angle of each suspected edge contour and the direction angles of all the remaining edge contours within its dilation region; In this embodiment, calculate the cumulative sum of the absolute values of the differences between the direction angle of each suspected edge contour and the direction angles of all the remaining edge contours within its dilation region.
[0047] Obtain the segmentation threshold of the length of the skeleton line of all edge contours in the grayscale image, and denote it as the second segmentation threshold; In this embodiment, the Otsu threshold segmentation algorithm is used to obtain the segmentation threshold. Among them, the Otsu threshold segmentation algorithm is a well-known technology and will not be elaborated here. As other implementation manners, the implementer can adopt other methods of the existing technology, such as the cross-validation method, etc. This embodiment does not make special restrictions on this.
[0048] Denote the difference between the length of each suspected edge contour and the second segmentation threshold as the length deviation; In this embodiment, denote the difference between the length of each suspected edge contour and the second segmentation threshold as the length deviation.
[0049] Perform a positive mapping on the length deviation; take the ratio of the result of the positive mapping to the cumulative sum as the edge coordination degree of each suspected edge contour; In this embodiment, when performing the positive mapping, use an exponential function to perform the positive mapping on the length deviation, and denote the length deviation as , and take The result of is used as the result of the positive mapping, where is an exponential function with the natural constant as the base; since the length deviation may be negative, by performing a positive mapping on the length deviation, the result of the positive mapping is greater than 0.
[0050] It should be noted that the greater the length deviation, the more likely the suspected edge contour is the edge contour formed by a crack. The smaller the sum, the closer the directions of the other incompletely cracked cracks accompanying the suspected edge contour are to the direction of the suspected edge contour. The greater the obtained edge synergy, the greater the possibility that the suspected edge contour is a crack.
[0051] Furthermore, based on the irregularity and the edge synergy, a second evaluation value is determined, specifically: The product of the irregularity and the edge synergy is used as the second evaluation value of each suspected edge contour; It should be noted that the greater the second evaluation value, the more likely the suspected edge contour is a crack.
[0052] Thus, the second evaluation value of each suspected edge contour is obtained.
[0053] Step 4: Based on the first evaluation value and the second evaluation value, determine the discrimination coefficient of each suspected edge contour, evaluate each suspected edge contour, and calibrate the cracks on the bridge.
[0054] Based on the above analysis, through the first evaluation value and the second evaluation value, calculate the discrimination coefficient to evaluate the possibility of each suspected edge contour being a bridge crack, specifically: The normalized result of the product of the first evaluation value and the second evaluation value is used as the discrimination coefficient of each suspected edge contour; In this embodiment, the sigmoid function is used for normalization processing. The sigmoid function is a well-known technology and will not be elaborated here. As other implementation manners, implementers can adopt other methods of existing technologies, such as the tanh function, etc. This embodiment does not make special restrictions on this.
[0055] It should be noted that the greater the discrimination coefficient, the greater the possibility that the suspected edge contour is a real crack. Among them, the step flowchart of the discrimination coefficient provided in the embodiment of the present application is as Figure 3 shown.
[0056] If the discrimination coefficient of each suspected edge contour in the grayscale image is greater than the preset threshold, the suspected edge contour belongs to the crack contour; otherwise, the suspected edge contour does not belong to the crack contour; In this embodiment, the preset threshold is set to 0.8. As other implementation manners, implementers can set it according to the actual situation.
[0057] Calculate the normal direction for any skeleton point on the skeleton line of the crack contour in the grayscale image, search for the edge pixel points on both sides along the normal direction, calculate the distance between the edge pixel points on both sides, and record it as the width of the any skeleton point. Take the maximum value of the widths of all skeleton points on the skeleton line as the maximum width of the crack contour. Using the pinhole camera imaging principle, determine the conversion relationship between the camera pixel coordinate system and the camera coordinate system according to the camera internal parameters and external parameters. Through the distance size of a single pixel point corresponding to the actual space, scale-convert the maximum width of the crack contour in the grayscale image in the actual space to obtain the maximum width of the crack on the bridge in the actual space; calibrate the cracks on the bridge.
[0058] Based on the same inventive concept as the above method, the embodiment of the present application also provides a bridge crack calibration device based on computer vision, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-mentioned methods for bridge crack calibration based on computer vision.
[0059] It should be understood that although Figure 1 the steps in the flowchart of Figure 1 are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover,
[0060] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combinations of these technical features do not conflict, they should all be considered as the scope recorded in this specification.
[0061] The above-described embodiments only represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limitations of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several deformations and improvements can still be made. Therefore, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application all belong to the protection scope of the technical solution of the present application.
Claims
1. A method for calibrating bridge cracks based on computer vision, characterized in that, The method includes the following steps: Collect the grayscale image of the bridge and extract all edge contours in the grayscale image; Obtain each suspected edge contour based on the number of edge pixels in the neighborhood of each edge pixel on each edge contour and the average level of the grayscale values of the pixels within the edge contour; Extract the skeleton lines of each edge contour, analyze the similarity of the edges on both sides of the skeleton line of each suspected edge contour, and the length-width characteristics of each suspected edge contour, and determine the first evaluation value of each suspected edge contour; Analyze the deviation of the number of all edge pixels in the neighborhood of each edge pixel on each suspected edge contour and the deviation of the gradient direction of each edge pixel, and calculate the irregularity of each suspected edge contour; Calculate the edge coordination degree of each suspected edge contour by using the direction difference of the skeleton lines between each suspected edge contour and the other edge contours and the length deviation of each suspected edge contour, and combine the irregularity to determine the second evaluation value of each suspected edge contour; Based on the first evaluation value and the second evaluation value, determine the discrimination coefficient of each suspected edge contour, evaluate each suspected edge contour, and calibrate the cracks on the bridge.
2. The method for calibrating bridge cracks based on computer vision according to claim 1, wherein, The obtaining of each suspected edge contour includes: Count the number of all edge pixels in the neighborhood of any edge pixel on each edge contour; if the number is greater than or equal to a preset first value, mark the any edge pixel as an intersection point; if the number is equal to a preset second value, mark the any edge pixel as an end point; mark the edge contour with the number of all end points greater than the number of all intersection points as a closed contour; Denote the mean of the grayscale values of all pixels within each closed contour as the average grayscale; Obtain the segmentation threshold of the average grayscale of all closed contours in the grayscale image, denoted as the first segmentation threshold; mark the closed contours with the average grayscale less than the first segmentation threshold as each suspected edge contour.
3. The method for calibrating bridge cracks based on computer vision according to claim 1, characterized in that, The determining of the first evaluation value of each suspected edge contour includes: Calculate the aspect ratio of the minimum circumscribed rectangle of each suspected edge contour; Divide each suspected edge contour into two edge lines by the skeleton line; calculate the similarity degree of the two edge lines; The first evaluation value is the product of the aspect ratio and the similarity degree.
4. The method for calibrating bridge cracks based on computer vision according to claim 1, wherein, The calculating of the irregularity of each suspected edge contour includes: Count the number of all edge pixels in the local neighborhood of each edge pixel on each suspected edge contour, denoted as the neighborhood number; Denote the difference between the neighborhood number of each edge pixel on each suspected edge contour and the mean of the neighborhood numbers of all edge pixels as the quantity deviation; Calculate the tangent slope of each edge pixel through the gradient of each edge pixel; Denote the difference between the tangent slope of each edge pixel and the mean of the tangent slopes of all other edge pixels in its local neighborhood as the direction deviation; The irregularity is the sum of the products of the quantity deviation and the direction deviation of all edge pixels on each suspected edge contour.
5. The method for calibrating bridge cracks based on computer vision according to claim 1, characterized in that, The calculating of the edge coordination degree of each suspected edge contour includes: Calculate the direction angle of each edge contour through the skeleton line of each edge contour; Dilate the width of the minimum bounding rectangle of each suspected edge contour, denoted as the dilation region; calculate the cumulative sum of the differences in the direction angles between each suspected edge contour and all the other edge contours within the dilation region. Obtain the segmentation threshold of the length of the skeleton lines of all the edge contours in the grayscale image, denoted as the second segmentation threshold. Denote the difference between the length of each suspected edge contour and the second segmentation threshold as the length deviation; perform a positive mapping on the length deviation. The edge cooperation degree is the ratio of the result of the positive mapping to the cumulative sum.
6. The method for calibrating bridge cracks based on computer vision according to claim 1, characterized in that, The second evaluation value is the product of the irregularity degree and the edge cooperation degree.
7. The method for calibrating bridge cracks based on computer vision according to claim 1, wherein The discrimination coefficient is the normalized result of the product of the first evaluation value and the second evaluation value.
8. The method for calibrating bridge cracks based on computer vision according to claim 1, characterized in that, Evaluating each suspected edge contour includes: if the discrimination coefficient is greater than a preset threshold, it belongs to the crack contour; otherwise, it does not belong to the crack contour.
9. The method for calibrating bridge cracks based on computer vision according to claim 8, characterized in that, Calibrating the cracks on the bridge includes: calculating the normal direction for any skeleton point on the skeleton line of the crack contour, searching for the edge pixel points on both sides along the normal direction, calculating the distance between the edge pixel points on both sides, denoted as the width of the any skeleton point; selecting the maximum value of the widths of all the skeleton points on the skeleton line, and using the pinhole camera imaging principle to obtain the maximum width of the crack on the bridge in the actual space, and calibrating the cracks on the bridge.
10. A bridge crack calibration device based on computer vision, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the computer vision-based bridge crack calibration method according to any one of claims 1-9.
Citation Information
Patent Citations
Method for detecting surface defects of whole-core flame-retardant conveying belt
CN116012384A
Bridge crack detection method and system
CN117237368A
Bridge workpiece machining track generation method, device, equipment, medium and product
CN119067938A
Roadway transition for a structural joint and methods for installing / changing such roadway transitions
DE102015209544A1
Controlling rules and variables for cutting
JP2015057295A
Cited By
Fabricated pipe gallery splicing construction intelligent monitoring method and system based on Internet of Things
CN120700939A
Inductor welding method and device for assembling inductor on power module
CN121305047A
Visual monitoring and early warning method and system for looseness of high-strength bolts of steel truss bridge
CN121640371A
New energy automobile wire harness terminal crimping quality on-line detection method
CN121962084A
Flange plate die forging buckling deformation visual detection method
CN122115460A