A method for detecting and maintaining anti-corrosion coatings for water conservancy projects
By analyzing the surface image of the pipeline in water conservancy engineering, the severity of the crack is calculated, and the lack of rapid detection and maintenance methods in existing technology has been solved, and the accurate detection and effective maintenance of the pipeline surface cracks are realized.
Patent Information
- Application Number
- CN202411397896.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-09
AI Technical Summary
The prior art lacks effective rapid detection and maintenance methods to detect and repair cracks in anti-corrosion coatings in water conservancy projects, resulting in corrosive media being able to contact the metal surface, thereby causing pipeline corrosion.
Obtain the surface image of the pipeline through the image processing technology, and obtain the grayscale image for pre -processing, analyze the gradient gradient changes and shapes of each connecting domain, calculate the initial impact of each crack, and modify the impact on the surface area occupied by the cracks. Get the severity of the crack, so as to determine whether to maintain it.
The accurate detection and severity assessment of the surface cracks on the pipeline can be achieved, which can quickly determine whether it is necessary to maintain it, thereby extending the service life of the pipeline and preventing corrosion.
Smart Images

Figure CN118898618B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a method for detecting and maintaining an anti-corrosion coating of a water conservancy project. Background Art
[0002] Water conservancy projects are a general term for various engineering facilities built to control, utilize and protect water resources and eliminate water disasters. Pipelines are the main channels for water delivery and drainage in water conservancy projects. They play an important role in the smooth implementation of water conservancy projects. Through pipelines, water resources can be transported from the water source to where they are needed, such as farmland irrigation, urban water supply, etc. In long-distance, high-flow and high-pressure water delivery projects, many pipelines, especially metal pipelines, are exposed to complex and changeable environments for a long time and are easily corroded by various corrosive media, resulting in thinning of pipeline wall thickness.
[0003] In order to deal with the above problems, anti-corrosion coatings are often used in the prior art to protect metal pipes. By applying one or more layers of anti-corrosion coatings on the surface of metal pipes, a dense protective barrier can be formed to effectively isolate the metal pipes from corrosive media, thereby slowing down or preventing the corrosive media from corroding the metal pipes, extending their service life, and ensuring the long-term stable operation of water supply projects.
[0004] However, although the anti-corrosion coating can provide good protection in the early stage, as time goes by and the environment factors affect it, the coating itself may crack. These defects will weaken the protective effect of the coating on the metal pipe, allowing the corrosive medium to have the opportunity to contact the metal surface, causing the corrosion process of the metal pipe. However, the existing technology does not have an effective and rapid detection and maintenance method for anti-corrosion coatings. Summary of the invention
[0005] In order to solve the above technical problems, the purpose of the present invention is to provide a method for detecting and maintaining anti-corrosion coatings for water conservancy projects to solve the above problems. In order to achieve the above purpose, the technical solution adopted by the present invention is as follows: The present application provides a method for detecting and maintaining anti-corrosion coatings for water conservancy projects, the method comprising: obtaining a pipeline surface image, the pipeline surface image containing at least one crack; preprocessing the pipeline surface image to obtain a grayscale image; obtaining the initial influence of each crack in the pipeline surface image according to the grayscale gradient change and shape analysis of each connected domain in the grayscale image; correcting each of the initial influences according to the area of the pipeline surface occupied by the crack in the grayscale image to obtain the crack severity of each crack; judging whether the pipeline corresponding to the pipeline surface image needs maintenance according to the crack severity.
[0006] In a possible implementation, the pipeline surface image is preprocessed to obtain a grayscale image, including: grayscale processing the pipeline surface image to obtain a grayscale image; and grayscale adaptive equalization processing is performed on the grayscale image to obtain a grayscale image.
[0007] In a possible implementation, the initial influence of each crack in the pipeline surface image is obtained according to the grayscale gradient change and shape analysis of each connected domain in the grayscale image, including: performing background separation on the grayscale image to obtain at least one connected domain; performing skeleton line extraction processing on each connected domain one by one; calculating a directional consistency evaluation value of the connected domain according to the gradient change of each pixel point in each connected domain; judging whether the connected domain is a crack according to the directional consistency evaluation value of each connected domain; and calculating the initial influence of each crack according to the angle relationship between the skeleton line corresponding to each crack and the pipeline axis and the grayscale value change in the crack.
[0008] In a possible implementation, background separation is performed on the grayscale image to obtain at least one connected domain, including: performing threshold calculation on the grayscale image to obtain a division threshold; based on the division threshold, separating at least one connected domain in the grayscale image, wherein the grayscale value of each pixel in the connected domain is less than the division threshold, and the number of pixels in the connected domain is greater than a preset value.
[0009] In a possible implementation, a directional consistency evaluation value of the connected domain is calculated based on the gradient change of each pixel point in each connected domain, including: recording the intersection of a target grayscale gradient line segment corresponding to each pixel point in the connected domain and a skeleton line as a reference point, wherein the target grayscale gradient line segment is a line segment along the grayscale gradient direction of the pixel point in the connected domain; respectively calculating the angle between the grayscale gradient direction corresponding to each pixel point in the connected domain and the positive direction of the target normal, wherein the positive direction of the target normal line is the positive direction of the normal line of the reference point on the skeleton line; and calculating the directional consistency evaluation value based on the angle corresponding to each pixel point in the connected domain.
[0010] In a possible implementation, judging whether the connected domain is a crack according to the directional consistency evaluation value of each connected domain includes: if the directional consistency evaluation value of the connected domain is greater than or equal to a first threshold, then the connected domain is a crack.
[0011] In a possible implementation, the initial influence of each crack is calculated based on the angle relationship between the skeleton line corresponding to each crack and the pipeline axis and the grayscale value change in the crack, including: segmenting a crack to obtain multiple crack segments, the segmentation is divided based on bifurcation points, and the bifurcation points are detected by a preset detection algorithm on the skeleton line; the directional influence is calculated based on the angle relationship between each crack segment and the pipeline axis; the depth influence corresponding to each crack segment is calculated based on the grayscale value of each crack segment and the grayscale value average of the background area, and the background area is obtained by separating the background; the initial influence is calculated based on the directional influence, the grayscale value average of the background area and all the depth influences.
[0012] In a possible implementation, the degree of directional influence is calculated based on the angular relationship between each crack segment and the pipeline axis, including: respectively calculating the minimum angle between each crack segment and the pipeline axis, and performing mean calculation to obtain the average angle; and calculating the degree of directional influence based on the average angle and the directional consistency evaluation value.
[0013] In a possible implementation, an initial influence degree is calculated based on the directional influence degree, the mean grayscale value of the background area and all the depth influence degrees, including: performing variance calculation on all the depth influence degrees to obtain a variance value; and calculating the initial influence degree based on the variance value, the directional consistency evaluation value, the mean grayscale value of the background area and the directional influence degree.
[0014] In a possible implementation, each of the initial influence degrees is corrected according to the surface area of the pipeline occupied by the crack in the grayscale image to obtain the crack severity of each crack, including: taking the column where the pipeline axis is located as the original column and assigning label values to each column of pixels on both sides of the original column in sequence, wherein the label values are successively increased along both sides from the original column and the label values of the pixels in each column are the same; making a circumscribed rectangle for each of the cracks; calculating the shape correction factor corresponding to each of the cracks according to the label value of each pixel in each of the cracks and the label value of each pixel in its circumscribed rectangle; and correcting the initial influence degree according to the shape correction factor corresponding to each of the cracks to obtain the crack severity of each crack.
[0015] The present invention has the following beneficial effects:
[0016] In the present invention, the development characteristics of the crack itself in the image and the gray value change characteristics are first taken into account. The initial impact of the crack is effectively measured by the shape, size and gray value of the crack. Then, combined with the characteristic that the pipeline is usually cylindrical, considering that the projection of the crack on the image plane produces deformation and distortion, the initial impact is further corrected by correcting the surface area of the crack in the pipeline to achieve accurate judgment of the crack severity, and finally achieve targeted treatment of each crack. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A schematic flow chart of a method for detecting and maintaining an anti-corrosion coating for a water conservancy project provided in Embodiment 1 of the present invention;
[0019] Figure 2 An exemplary pipeline surface image according to an embodiment 1 of the present invention;
[0020] Figure 3 A schematic flow chart of step S2 provided in Example 1 of the present invention;
[0021] Figure 4 A schematic flow chart of step S3 provided in Example 1 of the present invention;
[0022] Figure 5 This is a flowchart of step S4 provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0023] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the anti-corrosion coating detection and maintenance method for water conservancy projects proposed by the present invention, its specific implementation method, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0024] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0025] Example:
[0026] The specific scheme of the anti-corrosion coating detection and maintenance method for water conservancy projects provided by the present invention is described in detail below in conjunction with the accompanying drawings.
[0027] In this embodiment, we use image processing technology to identify cracks in pipeline surface images, and determine whether these cracks require targeted maintenance based on the grayscale value and morphological characteristics of the cracks. Figure 1 , which shows a schematic flow chart of a method for detecting and maintaining an anti-corrosion coating of a water conservancy project provided by an embodiment of the present invention, which comprises steps S1 to S5.
[0028] S1. Acquire a pipeline surface image, wherein the pipeline surface image contains at least one crack.
[0029] To facilitate subsequent image analysis and processing, this embodiment preferentially uses a ring light source for auxiliary lighting when capturing pipeline surface images to ensure uniform image illumination and improve image quality. Figure 2 The exemplary pipeline surface image shown shows that there are not only several cracks on the pipeline surface, but also defects in the coating construction process, such as bubbles and black round holes formed by impurities that have not been cleaned and covered by the coating. Cracks usually have a greater impact than bubbles, because cracks will directly cause coating failure, and may cause coating shedding or corrosion, while bubbles generally only affect the appearance and smoothness of the coating. Therefore, this embodiment mainly detects cracks and excludes the influence of other defects such as bubbles.
[0030] S2. Preprocess the pipeline surface image to obtain a grayscale image.
[0031] In this embodiment, the degree of recognition of cracks formed on the pipeline surface can be improved through pretreatment. Figure 3 Specifically, this step may include step S21 and step S22.
[0032] S21, performing grayscale processing on the pipeline surface image to obtain a grayscale image.
[0033] Among them, it should be noted that grayscale processing is a processing method for converting a color image into a grayscale image, which reduces the color information in the image and only retains the brightness information, thereby realizing the conversion from color to black and white, wherein each pixel of the grayscale image is represented by a grayscale value, and the grayscale range is 0-255, where 255 represents the brightest (white) and 0 represents the darkest (black). Since the influence of color does not need to be considered in this embodiment, the grayscale image can be simplified and the color information can be reduced through grayscale processing, but the basic characteristics of the image are retained, which is conducive to speeding up the data processing speed. At the same time, the specific process of grayscale processing is the prior art and will not be repeated in this embodiment.
[0034] S22, performing grayscale adaptive equalization processing on the grayscale image to obtain a grayscale image.
[0035] Among them, in this step, the grayscale adaptive equalization method can significantly improve the detail expression of each area in the image. Specifically, the grayscale adaptive equalization process dynamically adjusts the grayscale distribution of the grayscale image, making the originally darker crack area brighter, while the originally brighter background area becomes dimmer. This adjustment process can significantly enhance the detail expression of the image visually, thereby significantly improving the quality and readability of the grayscale image.
[0036] For those skilled in the art, the following two processing methods can be used to implement grayscale adaptive equalization processing: Adaptive Histogram Equalization (Adaptive Histogram Equalization, referred to as AHE) and Contrast Limited Adaptive Histogram Equalization (Contrast Limited Adaptive Histogram Equalization, referred to as CLAHE). Adaptive histogram equalization dynamically adjusts the grayscale distribution of each area by analyzing the local area of the image, thereby achieving the effect of enhancing details. Contrast-limited adaptive histogram equalization adds contrast limitations on the basis of adaptive histogram equalization to avoid image noise problems caused by excessive enhancement, thereby maintaining detail enhancement while effectively controlling the contrast of the image, making the image more natural. In practical applications, those skilled in the art can flexibly select a suitable processing method according to the number of defects contained in the pipeline surface image. In this embodiment, no specific restrictions are made to this, and technicians can flexibly select and adjust according to actual conditions.
[0037] S3. Obtaining the initial influence of each crack in the pipeline surface image according to the grayscale gradient change and shape analysis of each connected domain in the grayscale image.
[0038] like Figure 2 As shown in , the common defects of pipeline surface anti-corrosion coating are mainly cracks, so it is particularly important to effectively measure the initial impact of cracks based on the shape, size and gray value of the cracks. Figure 4 , Figure 4 It is shown in FIG. 1 that this step includes steps S31 to S35.
[0039] S31. Perform background separation on the grayscale image to obtain at least one connected domain.
[0040] In this embodiment, it is considered that in the grayscale image, the cracks in the anti-corrosion coating are usually shown as darker areas, which form a greater contrast with the background with higher brightness, that is, the grayscale value of the pixels constituting the cracks is lower than the grayscale value of the background pixels. Therefore, in this embodiment, this feature is used to perform background separation on the grayscale image. Specifically, this step includes step S311 and step S312.
[0041] S311, performing threshold calculation on the grayscale image to obtain a segmentation threshold.
[0042] In this embodiment, Otsu's method is specifically used to calculate the threshold division. Among them, Otsu's method is an adaptive threshold determination method. By analyzing the histogram of the image, an optimal threshold can be automatically selected to optimize the image segmentation effect. The advantage of this method is that it can dynamically determine a most suitable threshold according to the specific content and characteristics of the image, thereby avoiding the subjectivity and uncertainty that may be introduced when the threshold is set manually. In this embodiment, by adopting Otsu's method, the accuracy and reliability of image processing can be significantly improved, and the accuracy and stability of the image segmentation results can be ensured. In addition, for professional and technical personnel in this field, in addition to Otsu's method, other various threshold determination methods can also be selected, such as global threshold method or adaptive threshold method. In this embodiment, no specific restrictions are made, and those skilled in the art can flexibly choose according to actual conditions and needs.
[0043] S312. Separate at least one of the connected domains and at least one of the connected domains in the grayscale image based on the division threshold, wherein the grayscale value of each pixel in the connected domain is less than the division threshold, and the number of pixels in the connected domain is greater than a preset value.
[0044] Specifically, in this embodiment, the preset value is 4, the main purpose of which is to prevent noise points appearing during the pipeline surface image capture process from interfering with the image quality.
[0045] S32, performing skeleton line extraction processing on each of the connected domains one by one.
[0046] Among them, the skeleton line mentioned in this step can be extracted by a morphological thinning algorithm or a mathematical morphological algorithm. Specifically, the morphological thinning algorithm makes the target shape in the grayscale image more refined and clear by gradually removing the pixels in the image. The mathematical morphological algorithm operates the image by using structural elements to extract, analyze and process the morphological features of the grayscale image. The specific operation processes of the morphological thinning algorithm and the mathematical morphological algorithm are all prior art and will not be repeated in this embodiment.
[0047] S33, calculating a direction consistency evaluation value of the connected domain according to the gradient change of each pixel point in each of the connected domains.
[0048] In this embodiment, the characteristics of cracks in local areas are taken into account. Specifically, these cracks show relatively consistent and continuous regularity in shape, direction and characteristics. Therefore, the gray gradient direction of the pixels in these crack areas is usually consistent with the direction of the cracks. This consistency helps to better identify and analyze the characteristics of the cracks. Correspondingly, when black circular holes appear in the anti-corrosion coating on the surface of the pipeline during the formation process, the gray gradient direction of the edge pixels of these circular holes will show different characteristics. Since the shapes and sizes of these circular holes are irregular, the gray gradient direction of the edge pixels will point to the inside or outside of the circular holes, showing diversity. This diversity makes the gray gradient direction of the pixels in the circular hole area and the gray gradient direction of the pixels in the crack area significantly different. Therefore, in this embodiment, one of the connected domains will be selected as an example of an exemplary calculation process based on the above characteristics, and specific reference can be made to steps S331-S333.
[0049] S331. Record the intersection of the target grayscale gradient line segment corresponding to each pixel point in the connected domain and the skeleton line as a reference point, wherein the target grayscale gradient line segment is a line segment along the grayscale gradient direction of the pixel point in the connected domain.
[0050] It should be noted that if there are multiple intersections between the target grayscale gradient line segment and the skeleton line, the nearest intersection point of the pixel point is used as the reference point.
[0051] S332, respectively calculating the angle between the grayscale gradient direction corresponding to each pixel point in the connected domain and the positive direction of the target normal line, where the positive direction of the target normal line is the positive direction of the normal line of the reference point on the skeleton line.
[0052] S333. Calculate the direction consistency evaluation value based on the angle corresponding to each pixel point in the connected domain.
[0053] In this embodiment, The calculation formula of the direction consistency evaluation value is as follows:
[0054]
[0055] In the formula, Indicates Direction consistency evaluation value of connected domains; represents the normalization function; Indicates The number of pixels in a connected domain; Indicates The first The normal direction of the reference point of the pixel on the skeleton line is the same as the positive direction of the The angle between the grayscale gradient directions of the pixels, .
[0056] In the above calculation formula, The smaller the angle, the The more concentrated the grayscale gradient directions of the pixels in a connected domain are, the greater the corresponding directional consistency is.
[0057] S34. Determine whether each connected domain is a crack according to the directional consistency evaluation value of each connected domain.
[0058] In this embodiment, the threshold is used as the basis for judging whether the connected domain is a crack. Specifically, if the directional consistency evaluation value of the connected domain is greater than or equal to the first threshold, the connected domain is a crack. The first threshold is 0.8. It should be noted that the selection of the threshold is not fixed, but can be adjusted according to actual conditions. In this embodiment, there is no restriction on the specific value of the threshold, and those skilled in the art make a selection based on the specific application scenario.
[0059] S35. Calculate the initial impact of each crack based on the angle between the skeleton line corresponding to each crack and the pipeline axis and the change of the gray value in the crack.
[0060] In this embodiment, the application environment involved is mainly in water conservancy projects. In the actual operation process, the pipeline will face various complex working conditions. Due to the particularity of water conservancy projects, the water flow velocity and pressure in the pipeline will change continuously, and this change will cause the surface to bear uneven force. In some local areas, due to stress concentration, cracks may be caused. As time goes by, the water flow continues, and the stress transfer causes the cracks to expand in different directions, forming multiple branches. In addition, the change of water temperature is also a factor that cannot be ignored, especially in some special working conditions, such as seasonal changes or large temperature differences between day and night. The alternating changes in temperature will cause thermal expansion and contraction. This physical phenomenon will cause stress inside the coating, which will then cause cracks.
[0061] From the above analysis, we can see that the forces on the pipeline during use are often not evenly distributed. Different positions may be subjected to forces of different magnitudes and directions, resulting in different crack expansion speeds and methods in different sections. Therefore, the turning point of the crack usually means that the crack development direction has changed. When the angle between the development direction of all crack segments in the same crack and the main extension direction is smaller, it means that all crack segments on the crack are more in line with the direction of stress concentration, so it is easier to expand, and the crack expansion rate will also be faster.
[0062] From the above analysis, we can know that in actual application, the external forces it bears are often not evenly distributed. This means that different positions of the pipeline may be subjected to forces of different sizes and directions. This uneven distribution of force will cause cracks to appear in different parts of the pipeline, and the speed and mode of expansion of these cracks will also vary depending on the location of the pipeline. Specifically, when the crack expands in different sections of the pipeline, its direction and speed may change. Especially at the turning point of the crack, this usually indicates that the direction of the crack has changed. The existence of this turning point actually reflects the complex stress state experienced by the crack during its expansion. Furthermore, if the development direction of all crack segments in the same crack has a small angle with the main extension direction, this indicates that these crack segments are more in line with the direction of stress concentration during the expansion process. In other words, when the direction of the crack segment is consistent with the direction of stress concentration, the crack is more likely to expand in this direction. Therefore, when the angle is smaller, the crack expansion rate will be correspondingly faster.
[0063] Therefore, in this embodiment, the initial influence degree is calculated in combination with the above contents. For details, please refer to step S351 to step S354.
[0064] S351, segmenting a crack into multiple crack segments, wherein the segmentation is based on bifurcation points, and the bifurcation points are obtained by detecting skeleton lines using a preset detection algorithm.
[0065] Specifically, the preset detection algorithm in this embodiment can be a Hough transform algorithm, a Canny edge detection algorithm, a region growing algorithm, and a cluster segmentation algorithm. The above four algorithms can all detect bifurcation points, which will not be described in detail in this embodiment. That is, in this embodiment, the bifurcation points are first detected on the skeleton line, and the skeleton line is segmented according to the bifurcation points on the skeleton line of each crack, and the partial crack area corresponding to each skeleton line segment is used as each crack segment.
[0066] S352. Calculate the degree of directional influence based on the angle relationship between each crack segment and the pipeline axis.
[0067] For those skilled in the art, the degree of directional influence can be obtained by calculating the average value of the angles between each crack segment and the pipeline axis, and normalizing the average value. The degree of directional influence can also be obtained by the calculation method of steps S3511-S3512 provided in this embodiment.
[0068] S3511. Calculate the minimum angle between each crack segment and the pipeline axis respectively, and perform mean calculation to obtain the average angle.
[0069] Specifically, the two end points of the crack segment can be connected to form a line segment, and the angle between the line segment and the pipeline axis can be calculated based on the line segment. Finally, the main extension direction of the crack can be obtained by using the average angle and the pipeline axis. It should be noted that the pipeline axis mentioned in this embodiment can be photographed in a way that the horizontal line or vertical line of the pipeline surface image is parallel to the pipeline axis, or one of the center lines is overlapped with the pipeline axis. In this way, the position of the pipeline axis can be directly determined based on the pipeline surface image itself, which is convenient for calculating the angle.
[0070] S3512. Calculate the degree of directional influence based on the average angle and the directional consistency evaluation value.
[0071] In this embodiment, The calculation formula of the degree of direction influence is as follows:
[0072]
[0073] In the formula, Indicates The degree to which a crack affects the direction of the pipeline; Indicates Direction consistency evaluation value of connected domains; Indicates The number of crack segments in a crack; Indicates The first crack The crack segment and The angle between the main extension directions of the cracks.
[0074] In the above calculation formula, the directional consistency evaluation value The larger the value, the more likely the connected domain is a crack. The greater the initial impact of each crack on the pipeline. The smaller the The crack segment and The more consistent the main extension directions of the cracks are, the faster the expansion rate is, and the greater the impact on the direction of the pipeline is.
[0075] S353. Calculate the depth influence degree corresponding to each crack segment based on the grayscale value of each crack segment and the grayscale value average of the background area, wherein the background area is obtained by separating the background.
[0076] In this embodiment, we continue to The calculation formula of depth influence is as follows:
[0077]
[0078] In the formula, Indicates The first crack The depth of each crack segment affects the degree of impact; Indicates The first crack The grayscale mean of all pixels on the crack segment; Represents the grayscale mean of all pixels in the background area; Represents the absolute value calculation function.
[0079] In this embodiment, it is considered that the deeper the crack is, the lower its brightness on the image. Specifically, when the crack appears on the grayscale image of the pipe surface, its grayscale value will decrease accordingly. This is because the presence of the crack causes the light reflection in the area to weaken, thereby reducing the grayscale value. Therefore, when calculating the grayscale difference of the crack segment , this value will become larger. The larger the difference is, the greater the depth influence of the 𝑖th crack segment is. In this way, in this embodiment, the grayscale mean index can be used to accurately express the depth information of the crack.
[0080] S354: Calculate an initial influence degree based on the direction influence degree, the grayscale value average of the background area and all the depth influence degrees.
[0081] In order to clarify the calculation process of the initial influence, please refer to step S3541-step S3542.
[0082] S3541. Perform variance calculation on all the depth influence degrees to obtain a variance value.
[0083] S3542. Calculate an initial influence degree based on the variance value, the directional consistency evaluation value, the grayscale value mean of the background area and the directional influence degree.
[0084] In this embodiment, we continue to The calculation formula of the initial influence degree is as follows:
[0085]
[0086] in, Indicates The initial impact of a crack on the pipeline; Indicates The grayscale mean of all pixels on a crack, Indicates The degree of influence of each crack on the direction of the pipeline, Indicates The variance of the depth influence of all crack segments of a crack; Represents the grayscale mean of all pixels in the background area; Represents the absolute value calculation function.
[0087] In the above calculation formula, if the variance Big, No. The more inconsistent the depth of all crack segments of a crack, the more uneven the stress distribution, the more severe the damage to the anti-corrosion coating, and the greater the initial impact on the pipeline. and A more accurate characterization of the initial impact degree is performed from the overall depth impact degree and directional impact degree respectively.
[0088] S4. Correct each of the initial influence degrees according to the area of the crack in the grayscale image that occupies the pipe surface, and obtain the crack severity of each crack.
[0089] In this embodiment, it is taken into consideration that since the pipeline is usually cylindrical, when collecting the pipeline surface image, the curved structure of the pipeline will cause the projection on the image plane to be deformed and distorted, which means that the area directly obtained through the image cannot accurately reflect the true size of the crack and the circumscribed rectangle on the actual surface of the pipeline. At the same time, the more complex the crack, the more stress will be concentrated in more locations, causing the local area to bear higher stress levels, which will increase the possibility of further crack expansion and more easily affect the protective effect of the surface anti-corrosion coating. Complex cracks will also destroy the continuity and uniformity of the surface anti-corrosion coating material. In severe cases, it will weaken the overall structural strength of the pipeline. Therefore, in this embodiment, the initial impact degree will also be corrected in combination with the crack's occupation of the pipeline surface area. Specifically, see Figure 5 , the figure shows that this step also includes steps S41 to S44.
[0090] S41, taking the column where the pipeline axis is located as the original column and assigning label values to each column of pixels on both sides of the original column, wherein the label values are increased from the original column along both sides and the label values of each column of pixels are the same.
[0091] For example, in this embodiment, the label value of the middle column of the grayscale image is set to 1, and label values 2, 3, 4, 5, etc. are assigned to each column on the left and right starting from the middle column.
[0092] S42, making a circumscribed rectangle for each of the cracks.
[0093] S43, calculating a shape correction factor corresponding to each of the cracks according to the label value of each pixel point in each of the cracks and the label value of each pixel point in its circumscribed rectangle.
[0094] In this embodiment, The calculation formula of the shape correction factor is as follows:
[0095]
[0096] in, Indicates The shape correction factor of the crack; Indicates The first crack The number of pixels in the column; Indicates The circumscribed rectangle of the crack The number of pixels in the column; is a sine function; Indicates The total number of cracks; Indicates The total number of columns of the circumscribed rectangles of the cracks; Indicates The first crack The normalized value of the column label value; Indicates The circumscribed rectangle of the crack The normalized value of the label value of the column. and The calculation of is the result obtained by normalization calculation in the prior art, which will not be described in detail in this embodiment. It should be noted that when When it reaches 0, the denominator is replaced by a preset constant 0.1 for calculation. The preset constant can be adjusted by itself and will not be further described here.
[0097] In the above calculation formula, For the The first crack The weighting coefficients of the columns, Indicates that the The first crack The normalized value of the difference between the label value of the column and the label value of the middle column is limited to Between, because Inside, The function is monotonically increasing. As the number of columns increases, the corresponding weights will also increase.
[0098] S44. Correcting the initial influence degree according to the shape correction factor corresponding to each crack to obtain the crack severity of each crack.
[0099] From the above analysis, it can be seen that the bending characteristics of the pipeline will cause image distortion, which will affect the measurement of the crack area and make it different from the actual crack area. Therefore, it is not accurate enough to determine the shape correction factor of the crack based solely on the ratio of the crack area to the area of the corresponding circumscribed rectangle. Therefore, in order to improve the accuracy of the evaluation, it is necessary to consider the relationship between the collected grayscale image of the pipeline surface and the bending characteristics of the pipeline. Through this relationship, this embodiment can more accurately evaluate the actual impact of the crack on the pipeline. Specifically, the calculation formula for the crack severity is as follows:
[0100]
[0101] In the formula, Indicates The severity of each crack on the pipeline; Indicates The initial impact of a crack on the pipeline, Indicates The number of crack segments in a crack; Indicates The shape correction factor of the crack; is the normalization function.
[0102] Through the above analysis and calculation, in step S4, the shape correction factor of each crack is obtained according to the ratio of the area of each crack to the area of the corresponding circumscribed rectangle. The larger the shape correction factor, the simpler the crack, and the smaller the shape correction factor, the more complex the crack. That is, the accuracy of the crack severity of each crack on the pipeline can be improved based on the initial influence of the shape correction factor.
[0103] S5. Determine whether the pipeline corresponding to the pipeline surface image needs maintenance according to the severity of the crack.
[0104] Through the above process, the crack severity of each crack on the pipeline is obtained in this embodiment. Different crack severities require different maintenance methods and measures.
[0105] Therefore, in this embodiment, different crack severity levels are still divided by threshold judgment. Take the judgment process as an example:
[0106]
[0107] in, Indicates The severity of the crack in the pipeline.
[0108] In this case, a detailed defect grade classification will be carried out for each crack identified. For those cracks rated as level 1 defects, it is recommended to use anti-corrosion coatings with good compatibility with the original coating for local repair to ensure the integrity and consistency of the coating. For cracks rated as level 3 defects, a temporary protective layer needs to be added to the corresponding parts of the pipeline, such as wrapping anti-corrosion tape, to enhance the protection effect of the area. For pipelines rated as level 3 defects, due to the severity of the cracks and the large impact range, it is recommended to replace the entire section of the pipeline to ensure the normal operation of the water delivery system.
[0109] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0110] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A method for detecting and maintaining anti-corrosion coatings for water conservancy projects, characterized in that: The method comprises: Acquire a pipeline surface image, wherein the pipeline surface image contains at least one crack; Preprocessing the pipeline surface image to obtain a grayscale image; Obtaining the initial influence of each crack in the pipeline surface image according to the grayscale gradient change and shape analysis of each connected domain in the grayscale image; Correcting each of the initial influence degrees according to the area of the crack in the grayscale image that occupies the pipe surface, to obtain the crack severity of each crack; Determining whether the pipeline corresponding to the pipeline surface image needs maintenance according to the severity of the crack; The initial influence degree of each crack in the pipeline surface image is obtained according to the grayscale gradient change and shape analysis of each connected domain in the grayscale image, including: Performing background separation on the grayscale image to obtain at least one connected domain; Performing skeleton line extraction processing on each of the connected domains one by one; Calculate the direction consistency evaluation value of the connected domain according to the gradient change of each pixel point in each connected domain; Determining whether each connected domain is a crack according to the directional consistency evaluation value of each connected domain; The initial influence degree of each crack is calculated based on the angle relationship between the skeleton line corresponding to each crack and the pipeline axis and the change of the gray value in the crack; Correcting each of the initial impacts according to the area of the crack in the grayscale image that occupies the pipe surface, and obtaining the crack severity of each crack, including: The column where the pipeline axis is located is taken as the original column and label values are assigned to each column of pixels on both sides of the original column. The label values increase from the original column along both sides and the label values of each column of pixels are the same. Draw a circumscribed rectangle for each of the cracks; The shape correction factor corresponding to each crack is calculated according to the label value of each pixel point in each crack and the label value of each pixel point in its circumscribed rectangle; The initial influence degree is corrected according to the shape correction factor corresponding to each crack to obtain the crack severity of each crack.
2. The method for detecting and maintaining the anti-corrosion coating of a water conservancy project according to claim 1 is characterized in that: Preprocessing the pipeline surface image to obtain a grayscale image includes: Performing grayscale processing on the pipeline surface image to obtain a grayscale image; The grayscale image is processed by grayscale adaptive equalization to obtain a grayscale image.
3. The method for detecting and maintaining the anti-corrosion coating of a water conservancy project according to claim 1 is characterized in that: Performing background separation on the grayscale image to obtain at least one connected domain includes: Performing threshold calculation on the grayscale image to obtain a segmentation threshold; At least one connected domain is separated in the grayscale image based on the division threshold, the grayscale value of each pixel in the connected domain is less than the division threshold, and the number of pixels in the connected domain is greater than a preset value.
4. The method for detecting and maintaining the anti-corrosion coating of a water conservancy project according to claim 1, characterized in that: The direction consistency evaluation value of the connected domain is calculated according to the gradient change of each pixel point in each connected domain, including: The intersection of the target grayscale gradient line segment corresponding to each pixel point in the connected domain and the skeleton line is recorded as a reference point, wherein the target grayscale gradient line segment is a line segment along the grayscale gradient direction of the pixel point in the connected domain; Calculate the angle between the grayscale gradient direction corresponding to each pixel point in the connected domain and the positive direction of the target normal line, where the positive direction of the target normal line is the positive direction of the normal line of the reference point on the skeleton line; The direction consistency evaluation value is calculated based on the angle corresponding to each pixel in the connected domain.
5. The method for detecting and maintaining the anti-corrosion coating of a water conservancy project according to claim 1 is characterized in that: Judging whether each connected domain is a crack according to the directional consistency evaluation value of each connected domain includes: If the direction consistency evaluation value of the connected domain is greater than or equal to a first threshold, the connected domain is a crack.
6. The method for detecting and maintaining the anti-corrosion coating of a water conservancy project according to claim 1 is characterized in that: The initial impact of each crack is calculated based on the angle between the skeleton line corresponding to each crack and the pipeline axis and the change of the gray value in the crack, including: Segmenting a crack to obtain multiple crack segments, wherein the segmentation is based on bifurcation points, and the bifurcation points are obtained by detecting skeleton lines using a preset detection algorithm; The degree of directional influence is calculated based on the angle relationship between each crack segment and the pipeline axis; The depth influence degree corresponding to each crack segment is calculated based on the gray value of each crack segment and the gray value average of the background area, and the background area is obtained by separating the background; An initial influence degree is calculated based on the directional influence degree, the grayscale value mean of the background area and all the depth influence degrees.
7. The method for detecting and maintaining the anti-corrosion coating of a water conservancy project according to claim 6 is characterized in that: The degree of directional influence is calculated based on the angle relationship between each crack segment and the pipeline axis, including: Calculating the minimum angle between each crack segment and the pipeline axis respectively, and performing mean calculation to obtain an average angle; The degree of directional influence is calculated based on the average angle and the directional consistency evaluation value.
8. The method for detecting and maintaining the anti-corrosion coating of a water conservancy project according to claim 6 is characterized in that: The initial influence degree is calculated based on the directional influence degree, the gray value mean of the background area and all the depth influence degrees, including: Performing variance calculation on all the depth influence degrees to obtain a variance value; An initial influence degree is calculated based on the variance value, the direction consistency evaluation value, the gray value mean of the background area and the direction influence degree.
Citation Information
Patent Citations
Mixture of coal and other materials, new material obtained by mixing coal and other materials, dust removal and treatment of haze
CN107174867A
Processing method for long and narrow pattern spot splitting line
CN107845139A