An automatic recognition method for concrete surface damage
By grayscale and edge extraction of the damaged images of concrete surfaces, combined with the circular corner point detection template to identify the angle of the edge corner point, the problem of the inability to distinguish between damage and non-damage in the prior art is solved, and automatic identification with high accuracy is achieved.
Patent Information
- Application Number
- CN202210023992.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-11
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2042-01-11
AI Technical Summary
The prior art cannot effectively distinguish between damage, alkaline and stains on concrete surfaces, resulting in a decrease in recognition accuracy.
By obtaining the disease image of the damaged area on the concrete surface, after grayscale processing, the edge of the damaged area is extracted using the Soble operator, and the morphological operation is used to clear the noise, and the foreground object and background are divided. Then, the circular corner point detection template is used to find the angle change point of the edge corner point, extract the broken edge contour and area area, and locate the coordinate position of the broken edge contour.
Automatic identification of concrete surface damage is realized, the accuracy of identification is improved, and it can effectively distinguish between damaged and non-damaged areas.
Smart Images

Figure CN114359251B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automatic image recognition, and particularly to an automatic recognition method for concrete surface damage. Background Art
[0002] At present, automatic image recognition is widely used in life, such as face recognition, license plate number recognition, animal recognition, leather damage recognition, etc. When automatic image recognition is used in the field of concrete surface detection, it is mainly to recognize cracks on the concrete surface. The existing technical solution is to judge whether there are cracks by whether there are connected regions in the binary image of the image taken of the concrete surface. Specifically, after image processing such as grayscale conversion and noise reduction, the binary image of the target is obtained, and it is determined whether there are connected regions in the binary image. If there are connected regions, it is determined as damage or crack.
[0003] However, the above technical solution cannot effectively distinguish the damage, efflorescence and surface stains on the concrete surface. When the gray value of the efflorescence or stain area is close to the gray value of the damage, a connected region similar to the damage will also be formed after binarization. If only relying on the connected region to identify, it is impossible to effectively distinguish the damage diseases on the concrete surface, affecting the accuracy of automatic image recognition of concrete surface damage. Summary of the Invention
[0004] Aiming at the deficiencies of the existing technology, the present invention proposes an automatic recognition method for concrete surface damage to solve the technical problem that in the existing technology, only by determining whether there are connected regions in the binary image to identify the damage of the concrete, it is impossible to effectively distinguish the damage diseases on the concrete surface, affecting the recognition accuracy.
[0005] The technical solution adopted by the present invention is an automatic recognition method for concrete surface damage, including the following steps:
[0006] S1. Obtain the disease image of the damaged part of the concrete surface, and calculate the actual size of the unit pixel through size calibration;
[0007] S2. Convert the disease image into a grayscale image to obtain the first target image;
[0008] S3. Segment the foreground object of the first target image from the background to obtain the third target image;
[0009] S4. Perform binarization processing on the third target image to obtain the fourth target image;
[0010] S5. Calculate the area of the foreground object in the fourth target image;
[0011] S6. Based on the area of the foreground object, use a circular corner detection template to find the mutation points of the edge corner angles, extract the damaged edge contour, the total length of the contour, and the area of the damaged area; locate the coordinate positions of the damaged edge contour.
[0012] Further, when obtaining the disease image of the damaged part on the concrete surface in step S1, the actual size of the image corresponding to the pixel size of the disease image is calibrated according to the following formula:
[0013]
[0014] In the above formula, L is the distance from the crack plane to the lens focus, η is the resolution per pixel, f is the focal length of the camera, is the area of a unit pixel.
[0015] Further, in step S2, the disease image is converted into a grayscale image according to the following formula:
[0016] Gray = 0.299R + 0.587G + 0.114B
[0017] where Gray represents the grayscale of the image, R represents red, G represents green, and B represents blue.
[0018] Further, step S3 includes: calculating the pixel changes in the horizontal and vertical directions of the first target image using the Soble operator, extracting the edges of the damaged area, and using the opening operation of morphology to remove isolated noise points, closing the central hole in the damaged area, and segmenting the foreground object and the background to obtain the third target image.
[0019] Further, when performing binarization processing on the third target image in step S4, the foreground object is processed as 255 and the background is processed as 0.
[0020] Further, when calculating the area of the foreground object in the fourth target image in step S5, the area threshold is set to 1 square centimeter, and the connected regions with an actual size smaller than the area threshold are cleared and processed as the background.
[0021] Further, the circular corner detection template in step S5 is a polygon obtained by subtracting 4 corner pixels from a 5×5 square of pixels, with a total of 21 pixel units.
[0022] Further, step S5 includes:
[0023] Based on the area of the foreground object, use the circular corner detection template to traverse the damaged contour edge and calculate the operation area S of the circular corner detection template at the detection point i ;
[0024] Based on the operation area of the circular corner detection template being S iBased on the corresponding relationship between the contour points and the angles, the contour point angles of the detection points are obtained;
[0025] According to the contour point angles of the detection points and the angle threshold, it is determined whether the detection points are edge corner angle mutation points.
[0026] Furthermore, the angle thresholds are 90° and 270°. The convex points less than or equal to 90° or the concave points greater than or equal to 270° are defined as edge corner angle mutation points.
[0027] Furthermore, Gaussian filtering is used to smooth the first target image to reduce noise, and the gray histogram is used to equalize it to enhance the contrast, obtaining the second target image;
[0028] The foreground object of the second target image is segmented from the background to obtain the third target image.
[0029] As can be seen from the above technical solutions, the beneficial technical effects of the present invention are as follows:
[0030] Using a circular corner detection template to find the edge corner angle mutation points, extracting the damaged edge contour, the damaged area, and the total pixel length of the contour, and positioning the coordinate position of the damaged edge contour to identify the concrete surface damage, it is possible to realize the automatic identification of the concrete surface damage and greatly improve the accuracy of automatic identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0032] Figure 1 It is the flowchart of the method of Embodiment 1 of the present invention;
[0033] Figure 2 It is the schematic diagram of the circular corner detection template of Embodiment 1 of the present invention;
[0034] Figure 3 It is the schematic diagram of the edge corner angle mutation point of Embodiment 1 of the present invention;
[0035] Figure 4 It is the flowchart of the method of Embodiment 2 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0036] The following will describe in detail the embodiments of the technical solutions of the present invention with reference to the drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention, so they are only examples and cannot be used to limit the protection scope of the present invention.
[0037] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application shall have the ordinary meanings understood by those skilled in the art to which this invention pertains.
[0038] Example 1
[0039] On the concrete surface, due to the certain regularity of the edges of stains or water stains, the edges are often relatively smooth, with strong continuity of the first derivative at the edges, fewer corner mutation points, while for the edges of damaged areas, the disorder of the first derivative is stronger, the continuity of its first derivative is poorer, and there are more corner mutation points. Therefore, for areas with similar areas, the number of corner points between damaged and non-damaged areas differs greatly. Based on this difference, the present invention provides an automatic recognition method for concrete surface damage, as Figure 1 shown, which specifically includes the following steps:
[0040] S1. Obtain the disease image of the damaged part on the concrete surface, and calculate the actual size of a unit pixel through size calibration
[0041] In a specific implementation manner, an image acquisition device such as a camera or a webcam is used to photograph the damaged part on the concrete surface. When photographing, the lens is parallel to the concrete surface.
[0042] After the photographing is completed, the obtained disease image is in RGB format, and the actual size of the image corresponding to the pixel size of the disease image is calibrated according to the following formula:
[0043]
[0044] In the above formula, L is the distance from the crack plane to the lens focus, in mm; η is the resolution per pixel, in mm; f is the focal length of the camera, in mm; R 1 is the image resolution of the lens; S C is the size of the complementary metal oxide semiconductor sensor in the image acquisition device, in mm 2 ; is also called the unit pixel area.
[0045] S2. Convert the disease image into a grayscale image to obtain the first target image
[0046] In a specific implementation manner, the RGB format disease image is converted into a grayscale image according to the following formula:
[0047] Gray = 0.299R + 0.587G + 0.114B
[0048] Among them, Gray represents the grayscale of the image, R represents red, G represents green, and B represents blue.
[0049] S3. Segment the foreground object of the first target image from the background to obtain a third target image.
[0050] In a specific implementation, the Sobel operator is used on the first target image to calculate the pixel changes in the horizontal and vertical directions, extract the edges of the damaged area, and use the morphological opening operation to remove isolated noise points and close the central hole in the damaged area, so as to segment the foreground object from the background and obtain the third target image. To obtain a more accurate segmentation effect, a 3×3 Sobel operator is preferably used, as follows:
[0051]
[0052] S4. Binarize the third target image to obtain a fourth target image.
[0053] The third target image contains a foreground object and a background. In a specific implementation, the foreground object is processed as 255 and the background is processed as 0.
[0054] S5. Calculate the area of the foreground object in the fourth target image.
[0055] In the case of large color interference on the concrete surface or small damaged areas, foreground objects may be formed. Since they have little impact on the overall concrete structure, in a specific implementation, an area threshold with an actual size of 1 square centimeter is set, and connected areas with an actual size smaller than the area threshold are cleared and processed as the background.
[0056] S6. According to the area of the foreground object, use a circular corner detection template to find the angle mutation points of the edge corners, extract the damaged edge contour and the total length of the contour, as well as the area of the damaged area; locate the coordinate positions of the damaged edge contour.
[0057] According to the area of the foreground object, use the circular corner detection template to traverse the damaged contour edge. When the edge pixel point to be traversed is at the center of the detection template, each pixel grid of the detection template is set as the unit "1". Let the number of pixels of the contour of the i-th point on the damaged edge above the corner detection template be N 1 , and the number of pixels of the remaining damaged area above the template be N 2 . Let the contour points on the template be calculated at 0.5 units, and the remaining damaged area pixel points on the template be calculated at 1 unit. Then the circular corner detection template operation area of the i-th point is S i = 0.5N 1 + 1N 2 .
[0058] To obtain a more accurate extraction effect, in a specific implementation, such as Figure 2As shown, the circular corner detection template is a polygon obtained by subtracting 4 corner pixels from a 5×5 square of pixels, with a total of 21 pixel units. Taking the edge angle of 180° as an example, the calculation process of the operation area S i of the circular corner detection template is described as follows:
[0059] As Figure 3 shown, the pixel grid area numbered "3" represents the position of the contour on the template, the pixel grid area numbered "2" represents the position of the foreground object excluding the contour on the template, and the unnumbered area on the other side represents the position of the background object on the template. It can be seen from Figure 3 that the local contour of the detection point is smooth, and there is no angular mutation in the pixel points on both sides. Then, the edge angle of this detection point is defined as 180°. Through the formula S i = 0.5N 1 + 1N 2 calculation, its S i is obtained as 10.5. For other edge angles, the corresponding relationship between the edge angle and the S i value is calculated by the above method, and the specific results are as follows:
[0060] When the contour point angle is 30°, the operation area S i of the circular corner detection template is 2.0;
[0061] When the contour point angle is 45°, the operation area S i of the circular corner detection template is 3.0;
[0062] When the contour point angle is 60°, the operation area S i of the circular corner detection template is 4.5;
[0063] When the contour point angle is 90°, the operation area S i of the circular corner detection template is 5.5;
[0064] When the contour point angle is 120°, the operation area S i of the circular corner detection template is 7.5;
[0065] When the contour point angle is 135°, the operation area S i of the circular corner detection template is 8.0;
[0066] When the contour point angle is 150°, the operation area S i of the circular corner detection template is 9.5;
[0067] When the contour point angle is 180°, the operation area S i of the circular corner detection template is 10.5;
[0068] When the contour point angle is 210°, the operation area S iis 11.5;
[0069] The contour point angle is 120°, and the operation area S of the circular corner detection template i is 7.5;
[0070] The contour point angle is 135°, and the operation area S of the circular corner detection template i is 8.0;
[0071] The contour point angle is 150°, and the operation area S of the circular corner detection template i is 9.5;
[0072] The contour point angle is 180°, and the operation area S of the circular corner detection template i is 10.5;
[0073] The contour point angle is 210°, and the operation area S of the circular corner detection template i is 11.5;
[0074] The contour point angle is 225°, and the operation area S of the circular corner detection template i is 13.0;
[0075] The contour point angle is 240°, and the operation area S of the circular corner detection template i is 13.5;
[0076] The contour point angle is 270°, and the operation area S of the circular corner detection template i is 15.5;
[0077] The contour point angle is 300°, and the operation area S of the circular corner detection template i is 16.5;
[0078] The contour point angle is 315°, and the operation area S of the circular corner detection template i is 18.0;
[0079] The contour point angle is 330°, and the operation area S of the circular corner detection template i is 19.0.
[0080] From the comparison relationship between the above contour point angles and the operation area of the circular corner detection template, different S values can be obtained iThe corresponding contour point angles. Based on the contour point angles of the corner points (corner points include convex points and concave points), the edge corner point angle mutation points can be obtained. For the contour edge, its angle is about 180°. For convex points, its angle is less than 180°. For concave points, its angle is greater than 180°. Since the edge of non-damaged diseases is often relatively smooth, the angle is closer to 180°. At the corner points of the damaged edge, the angle value of its concave or convex angle is far from 180°. In this embodiment, let the angle thresholds be 90° and 270°. The convex points less than or equal to 90° or the concave points greater than or equal to 270° are defined as the edge corner point angle mutation points, which are used as the classification basis for concrete damaged disease images and non-damaged images (such as efflorescence or stain areas).
[0081] Connecting multiple edge corner point angle mutation points can obtain the damaged edge contour and the total length of the contour. The damaged area can also be calculated based on the area enclosed by the contour, and the coordinate position of the damaged edge contour can be located.
[0082] By adopting the technical solution of this embodiment, using a circular corner point detection template to find the edge corner point angle mutation points, extracting the damaged edge contour, the damaged area and the total pixel length of the contour, and locating the coordinate position of the damaged edge contour to identify the concrete surface damage; it can realize the automatic identification of concrete surface damage and greatly improve the accuracy of automatic identification.
[0083] Embodiment 2
[0084] In the technical solution of Embodiment 1, when segmenting the foreground object and the background of the first target image, during the process of converting the collected disease image into a grayscale image to obtain the first target image, due to the influence of noise and contrast, the obtained first target image is not clear enough, which will further affect the segmentation effect of the foreground object and the background of the first target image.
[0085] To solve the above technical problems, on the basis of Embodiment 1, it is further optimized and the following technical solution is adopted:
[0086] Use Gaussian filtering to smooth the first target image to reduce noise, and use the grayscale histogram to equalize it to enhance the contrast to obtain the second target image.
[0087] Segment the foreground object and the background of the second target image to obtain the third target image.
[0088] By adopting the technical solution of this embodiment, a clearer segmentation effect of the foreground object and the background can be obtained, and the accuracy of automatic identification of concrete surface damage can be further improved.
[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered by the scope of the claims and the specification of the present invention.
Claims
1. An automatic recognition method for concrete surface damage, characterized in that, it includes the following steps: S1. Obtain the disease image of the damaged part of the concrete surface, and calculate the actual size of a unit pixel through size calibration; calibrate the actual size of the image corresponding to the pixel size of the disease image according to the following formula: In the above formula, L is the distance from the crack plane to the camera focus, η is the resolution per pixel, f is the focal length of the camera, is the unit pixel area; S2. Convert the disease image into a grayscale image to obtain the first target image; S3. Segment the foreground object of the first target image from the background to obtain the third target image; S4. Perform binarization processing on the third target image to obtain the fourth target image; S5. Calculate the area of the foreground object in the fourth target image; S6. Based on the area of the foreground object, find the edge corner angle mutation points using a circular corner detection template, including: Based on the area of the foreground object, traverse the edge of the damaged contour using the circular corner detection template. The edge pixel points to be traversed are at the center of the detection template. Each pixel grid of the detection template is unit "1". The number of pixels of the contour of the i-th point on the damaged edge on the corner detection template is N 1 , and the number of pixels of the remaining damaged area on the template is N 2 . Calculate the contour points on the template by 0.5 units, and calculate the damaged area pixel points on the template by 1 unit. The operation area of the circular corner detection template for the i-th point is S i = 0.5N 1 + 1N 2 ; Calculate the area as S according to the circular corner detection template operation i Based on the corresponding relationship between the contour point angle, obtain the contour point angle of the detection point; according to the contour point angle of the detection point and the angle threshold, determine whether the detection point is an edge corner angle mutation point; Extract the damaged edge contour, the total length of the contour, and the damaged area according to the edge corner point angle mutation points; including: connecting multiple edge corner point angle mutation points to obtain the damaged edge contour and the total length of the contour, calculating the damaged area according to the area circled by the contour, and positioning the coordinate position of the damaged edge contour according to the area circled by the contour.
2. The automatic recognition method for concrete surface damage according to claim 1, characterized in that, in step S2, convert the disease image into a grayscale image according to the following formula: Gray = 0.299R + 0.587G + 0.114B where Gray represents the grayscale of the image, R represents red, G represents green, and B represents blue.
3. The automatic recognition method for concrete surface damage according to claim 1, characterized in that, step S3 includes: calculating the pixel changes in the horizontal and vertical directions of the first target image using the Soble operator, extracting the edges of the damaged area, and using the opening operation of morphology to remove isolated noise points and close the central hole of the damaged area, and segment the foreground object from the background to obtain the third target image.
4. The automatic recognition method for concrete surface damage according to claim 1, characterized in that, when performing binarization processing on the third target image in step S4, process the foreground object as 255 and the background as 0.
5. The automatic recognition method for concrete surface damage according to claim 1, characterized in that, when calculating the area of the foreground object in the fourth target image in step S5, set the area threshold to 1 square centimeter, and clear the connected areas with an actual size smaller than the area threshold and process them as the background.
6. The automatic recognition method for concrete surface damage according to claim 1, characterized in that, the circular corner point detection template in step S5 is a polygon obtained by subtracting 4 corner pixel points from a 5×5 square of pixels, with a total of 21 pixel units.
7. The automatic recognition method for concrete surface damage according to claim 6, characterized in that, the angle threshold is 90° and 270°, and the convex points less than or equal to 90° or the concave points greater than or equal to 270° are defined as edge corner point angle mutation points.
8. The automatic recognition method for concrete surface damage according to claim 1, characterized in that, perform smoothing processing on the first target image using Gaussian filtering to reduce noise, and perform equalization processing on it using the grayscale histogram to enhance the contrast to obtain the second target image; Segment the foreground object of the second target image from the background to obtain a third target image.