Metal surface corrosion area identification and rust remover dosage estimation method
By analyzing the grayscale and hue values of the rusted areas on the metal surface and combining them with the rust depth and diffusion degree, a rust remover demand fitting curve is constructed. This solves the problem of inaccurate rust remover dosage estimation in the existing technology and achieves more accurate rust remover dosage estimation.
Patent Information
- Application Number
- CN202510921164.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-07-04
AI Technical Summary
In the prior art, there is a deviation in the estimation of the amount of rust remover used in the rusted area of the metal surface, which cannot accurately reflect the depth and spread of the rust, resulting in inaccurate rust remover dosage.
By analyzing the grayscale and hue values of historical rusted areas, combined with the rust depth and diffusion degree, a fitting curve of rust remover demand is constructed to determine the amount of rust remover required in the current rusted area.
The accuracy of rust remover dosage estimation is improved, avoiding the rust remover dosage deviation caused by inaccurate rust depth and spread in traditional methods, and ensuring the reliability of rust removal effect.
Smart Images

Figure CN120747017A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image analysis, and in particular to a method for identifying rusted areas on metal surfaces and estimating the amount of rust remover used. Background Art
[0002] Metal surface rust occurs when metals undergo electrochemical reactions with moisture, oxygen, and acidic or alkaline substances in the environment, leading to oxidation and corrosion of the metal surface. Rusted areas typically exhibit color changes and increased surface roughness. In severe cases, these areas can lead to a decrease in mechanical properties and even structural failure. To prevent further rust, chemical rust removers are commonly used in industry.
[0003] Rust removers chemically react with rust products through their acidic or alkaline components, dissolving or loosening the rust layer, making it easier to remove mechanically. However, the amount of rust remover used must be precisely controlled: if the amount of rust remover is insufficient, the rust will not be completely removed, leaving a dense rust layer. This electrochemical corrosion micro-cells will form and accelerate secondary corrosion. If the amount of rust remover is excessive, it will cause excessive corrosion of the base metal and environmental pollution.
[0004] To estimate the amount of rust remover required, machine vision algorithms are typically used to extract rusted areas from metal surface images. The size of the rusted areas and the rust marks are then used to estimate the amount of rust remover required. However, rust formation not only forms a rust layer on the metal surface but can also penetrate deep into the metal, causing deep corrosion. Rusted areas can also spread outward, both of which require a large amount of rust remover. Therefore, the accuracy of traditional visual estimation methods is severely affected, and they are prone to large errors in the estimated amount of rust remover. Summary of the Invention
[0005] In order to solve the technical problem of deviation in the existing rust remover dosage estimation results, the present invention aims to provide a method for identifying rusted areas on metal surfaces and estimating the rust remover dosage. The technical solution adopted is as follows: An embodiment of the present invention provides a method for identifying rusted areas on a metal surface and estimating the amount of rust remover required, the method comprising the following steps: Obtaining each historical corroded area in a plurality of historical metal surface images, each current corroded area in a current metal surface image, and an actual amount of rust remover used in each historical corroded area; According to the gray value of each pixel point in each historical corrosion area, the gradient change characteristics and radial distribution characteristics of the historical corrosion area are analyzed to determine the corrosion depth of each historical corrosion area; Analyze the obvious spread of the historical corrosion area to the surrounding areas based on the grayscale value and hue value of each pixel in each historical corrosion area, and determine the spread degree of each historical corrosion area in combination with the corrosion depth; Analyzing the complexity and structural density of the metal surface in each historical rust area based on the grayscale value of each pixel in each historical rust area, and determining the rust remover requirement for each historical rust area in combination with the diffusion degree; Based on the rust remover demand of each current rusted area, the estimated rust remover usage of each current rusted area is determined by fitting a rust remover dosage curve constructed by the actual rust remover usage of each historical rusted area and the rust remover demand.
[0006] Furthermore, analyzing the gradient variation regularity and radial distribution characteristics of the historical corrosion regions according to the grayscale value of each pixel point in each historical corrosion region to determine the corrosion depth of each historical corrosion region includes: For each historical corrosion area, the gradient and gradient direction of each pixel in the neighborhood of each pixel are determined according to the grayscale value of each pixel in the historical corrosion area; According to the gradient and gradient direction of each pixel in the neighborhood of each pixel, the gradient change law index of each pixel is obtained; The corrosion depth of the historical corrosion area is determined based on the gradient change law index and coordinate position of each pixel point in the historical corrosion area.
[0007] Furthermore, the step of obtaining a gradient change regularity index of each pixel point based on the gradient and gradient direction of each pixel point in the neighborhood of each pixel point includes: Determine the gradient variance of all pixels within the neighborhood of each pixel based on the gradient of each pixel within the neighborhood of each pixel; Get the unit vector of each pixel's gradient direction in the neighborhood of each pixel, and take the sum of all the unit vectors in the same neighborhood as the gradient change direction of the corresponding pixel; Obtaining a gradient change regularity index for each pixel point based on the gradient variance corresponding to each pixel point and the modulus length of the gradient change direction;
[0008] The gradient variance is negatively correlated with the gradient change law index, and the modulus of the gradient change direction is positively correlated with the gradient change law index.
[0009] Furthermore, determining the corrosion depth of the historical corrosion area according to the gradient change law index and coordinate position of each pixel point in the historical corrosion area includes: Determine a centroid pixel point of the historical corrosion area, and determine a first distance between each pixel point in the historical corrosion area and the centroid pixel point based on the coordinate positions of each pixel point in the historical corrosion area and the centroid pixel point; Arrange the first distances of each pixel point, use the arranged first distances as the horizontal axis and the gradient change regularity index as the vertical axis, and construct a fitting curve, which is recorded as a regular distance fitting curve;
[0010] The corrosion depth of the historical corrosion area is determined based on the regular distance fitting curve and the gradient change regularity index of each pixel point in the historical corrosion area.
[0011] Furthermore, determining the corrosion depth of the historical corrosion area according to the regular distance fitting curve and the gradient change regularity index of each pixel point in the historical corrosion area includes: Calculating the average slope of the regular distance fitting curve and calculating the average value of the gradient change regularity index of all pixel points in the historical corrosion area; Determining the corrosion depth of the historical corrosion area according to the average slope and the average value of the gradient change law indicator; Among them, the average slope and the average value of the gradient change law index are both negatively correlated with the corrosion depth.
[0012] Furthermore, analyzing the obvious spread of the historical corrosion area to the surrounding areas based on the grayscale value and hue value of each pixel in each historical corrosion area, and determining the spread degree of each historical corrosion area in combination with the corrosion depth, includes: For each historical corrosion area, determine the first lateral spread factor of the historical corrosion area according to the grayscale value of each pixel in the historical corrosion area; Obtain the centroid pixel point and each boundary pixel point in the historical corrosion area, and obtain a number of rays starting from the centroid pixel point and passing through each boundary pixel point, which are recorded as extension lines; wherein the boundary pixel point is a pixel point on the boundary of the historical corrosion area; Determining a second lateral spread factor of the historical corrosion area according to the hue value of each metal pixel point and the hue value of each corrosion pixel point on each of the extension lines; Performing a fusion analysis on the first lateral spread factor, the second lateral spread factor, and the corrosion depth to obtain a diffusion degree of the historical corrosion area; The first lateral spread factor, the second lateral spread factor and the corrosion depth are all positively correlated with the diffusion degree.
[0013] Furthermore, determining the first lateral spread factor of the historical corrosion area according to the grayscale value of each pixel in the historical corrosion area includes: Performing superpixel segmentation on the historical rust area to obtain a number of pixel clusters, and then obtaining the centroid pixel and grayscale mean of each pixel cluster; determining a second distance between a centroid pixel point of each pixel cluster and a centroid pixel point in the historical corrosion area, and sorting all the second distances to obtain sorted second distances; The second distance after sorting is used as the horizontal axis and the grayscale mean is used as the vertical axis to construct a fitting curve, which is recorded as the grayscale distance fitting curve; The average slope of the grayscale distance fitting curve is calculated, and the average slope is used as the first lateral spread factor of the historical corrosion area.
[0014] Furthermore, determining the second lateral spread factor of the historical rust area according to the hue value of each metal pixel and the hue value of each rust pixel on each of the extension lines includes: For each extension line, the pixel points on the extension line that are located in the historical corrosion area are recorded as corrosion pixels, and the pixel points on the extension line that are not corrosion pixels are recorded as metal pixels; Calculate the average hue value of all rust pixels on the extension line, record it as the first hue average, and calculate the average hue value of all metal pixels on the extension line, record it as the second hue average; The second lateral spreading factor of the historical rust area is determined based on the difference between the first hue mean and the second hue mean corresponding to each extension line and the distribution of rust pixels on each extension line.
[0015] Furthermore, the second lateral spread factor of the historical corrosion area is determined based on the difference between the first hue mean and the second hue mean corresponding to each extension line and the distribution of the corrosion pixels on each extension line, including: Calculating the absolute value of the difference between the first hue mean and the second hue mean corresponding to the same extended line, and obtaining the absolute value of the difference for each extended line; Determining a second lateral spread factor of the historical corrosion area based on the absolute value of the difference and the number of corroded pixels of each extension line; The absolute value of the difference is negatively correlated with the second lateral spread factor, and the number of corroded pixels is positively correlated with the second lateral spread factor.
[0016] Furthermore, the complexity and structural density of the metal surface in each historical rust area are analyzed based on the grayscale value of each pixel in each historical rust area, and the rust remover requirement of each historical rust area is determined in combination with the diffusion degree, including: For each historical corrosion area, the complexity of the metal surface where the historical corrosion area is located is determined based on the number of edges in the normal metal surface area within the minimum bounding rectangle of the historical corrosion area and the mean gradient variance corresponding to all edges; wherein the normal metal surface area is the remaining area in the minimum bounding rectangle excluding the historical corrosion area; Obtain the grayscale variance of each pixel cluster corresponding to the historical rust area, and determine the structural density of the historical rust area based on the grayscale variance of all pixel clusters; Determining the rust remover requirement for the historically corroded area based on the complexity of the metal surface where the historically corroded area is located, the structural density of the historically corroded area, and the diffusion degree; The complexity of the metal surface where the historical rust area is located, the structural density, and the diffusion degree are all positively correlated with the demand for the rust remover.
[0017] The present invention has the following beneficial effects: When determining the rust remover requirement, the present invention not only takes into account the lateral and longitudinal diffusion of rust in the rusted area, but also takes into account the complexity and structural density of the metal surface in the rusted area. This effectively improves the numerical accuracy of the rust remover requirement, so that the rust remover dosage fitting curve obtained from the rust remover requirement has a higher reference value when estimating the rust remover dosage, which helps to avoid deviations in the rust remover dosage estimation results.
[0018] First, when determining the rust depth, the present invention quantifies the rust depth based on image features as the depth of the rusted area deepens. This avoids the drawback of ultrasonic detection, which can lead to deviations in depth information due to the influence of the rusting material itself, thereby obtaining a more accurate rust depth and further improving the accuracy of the subsequent determination of the degree of diffusion. Second, when analyzing the spread of rust in a rusted area, that is, determining the degree of diffusion of a historical rusted area, the transverse and longitudinal rust spread features are combined to determine the severity of the rust in the rusted area. This overcomes the drawback of existing methods that only extract the size of the rusted area and the rust marks to estimate the dosage of the rust remover, which can cause deviations, and facilitates obtaining a more reliable estimate of the rust remover dosage. Next, when analyzing the need for rust removal, not only the rust characteristics of the rusted area are analyzed, but also the reaction of the rust remover to the metal surface where the rusted area is located, that is, the rust removal effect of the rust remover is analyzed. This corresponds to the present invention's analysis of the complexity and structural density of the metal surface where the historical rusted area is located based on the grayscale value of each pixel in each historical rusted area, further improving the accuracy of the estimated rust remover dosage. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. 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 any creative work.
[0020] Figure 1 A flowchart of a method for identifying rusted areas on a metal surface and estimating the amount of rust remover provided in one embodiment of the present invention; Figure 2 A flowchart of the steps for determining the corrosion depth of a historically corroded area according to an embodiment of the present invention; Figure 3 A flowchart of the steps for determining the extent of diffusion of a historical corrosion area in an embodiment of the present invention; Figure 4 Schematic diagram of superpixel segmentation results of a historical corrosion area in an embodiment of the present invention; Figure 5 Schematic diagram of HSV of historical corrosion area in an embodiment of the present invention; Figure 6 A flowchart of the steps for determining the rust remover demand in a historically corroded area according to an embodiment of the present invention; Figure 7 Schematic diagram of the rust remover dosage fitting curve in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] To further illustrate the technical means and effects employed by the present invention to achieve its intended objectives, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementations, structures, features, and effects of the technical solutions proposed by the present invention. In the following description, references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0022] 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.
[0023] The application scenarios targeted by the present invention may be: In a real-world corrosion environment, rust not only forms an oxide layer on the metal surface but can also penetrate deep into the material along grain boundaries, creating corrosion to a considerable depth. Furthermore, due to the spreading effect of electrochemical corrosion, the rusted area can readily expand to the surrounding area. These factors significantly increase the amount of rust remover required, severely impacting the accuracy of traditional visual estimation methods. Consequently, large errors in rust remover dosage estimation are common in practical applications.
[0024] Specifically, an embodiment of the present invention provides a method for identifying rusted areas on metal surfaces and estimating the amount of rust remover used, such as Figure 1 As shown, the following steps are included: S1, obtaining each historical corroded area in a plurality of historical metal surface images, each current corroded area in a current metal surface image, and the actual amount of rust remover used in each historical corroded area.
[0025] Here, the historical metal surface image is the surface image of different metal parts to be derusted collected at past time points, and the current metal surface image is the surface image of the metal part to be derusted collected at the current time point; the historical rust area refers to the rusted area located in the historical metal surface image, and the current rust area refers to the rusted area located in the current metal surface image; the actual amount of rust remover used refers to the amount of rust remover actually used when derusting the historical rust area.
[0026] In this embodiment, by obtaining each historical rust area in a number of historical metal surface images, image analysis can be performed on each historical rust area to determine the rust remover demand of the historical rust area; then, by using the relationship between the rust remover demand and the actual rust remover usage of the historical rust area, the rust remover demand of the current rust area is obtained, and the rust remover usage of the current rust area can be estimated using the relationship between the rust remover demand and the actual rust remover usage.
[0027] As an exemplary embodiment, the above step S1 can be implemented by the following steps: The first step is to obtain several historical metal surface images and current metal surface images.
[0028] Specifically, in order to identify the rusted areas on the metal surface and estimate the amount of rust remover used in the rusted areas, it is necessary to obtain several historical metal surface images and current metal surface images. The metal surface images can be acquired by a high-resolution digital camera, which can ensure that clear and detailed rust images are captured.
[0029] Among them, in order to clearly capture the details of rust on the metal surface, you can use a camera capable of macro photography for image acquisition; at the same time, use a soft light source or a ring light source to reduce the impact of shadows and ensure that the rusted area in the image is clearly visible.
[0030] The second step is to obtain the actual amount of rust remover used in each historical rust area, each current rust area and each historical rust area.
[0031] First, obtain each historical rust area and each current rust area.
[0032] Specifically, a Gaussian filter is used to preprocess the historical metal surface image and the current metal surface image to obtain the preprocessed historical metal surface image and the current metal surface image; secondly, for the historical metal surface image and the current metal surface image, the RGB (red, green, blue) image can be converted into the HSV (hue, saturation, value) color space to obtain the historical metal surface image and the current metal surface image in the HSV color space, so as to better distinguish the rust color; then, the local binary pattern is used to obtain the texture features in the metal surface image, and the texture of the rust area will be more complex; then, based on the threshold of the color channel, the possible area is extracted, and the non-rusted area with similar color is excluded from the possible area in combination with the texture features, and the remaining possible area is used as the preliminary rust area; finally, for the preliminary rust area, the closed operation is used to connect the area, and the open operation is used to remove noise, so as to obtain each historical rust area in the historical metal surface image and each current rust area in the current metal surface image.
[0033] Among them, the image processing technologies used in the process of identifying the rusted area are all existing technologies and are not within the scope of protection of the present invention, and will not be elaborated here.
[0034] Secondly, the actual amount of rust remover used in each historical rust area was obtained.
[0035] After obtaining each historical rust area, the dosage of the rust remover used in the actual rust removal treatment of different historical rust areas is obtained from the data acquisition system, that is, the actual dosage of the rust remover in each historical rust area.
[0036] It should be noted that the actual amount of rust remover used is obtained by performing rust removal treatment based on the actual conditions of the rusted area, so under normal circumstances the actual amount of rust remover used is accurate and reliable.
[0037] So far, this embodiment has obtained the basic data for image analysis, namely, each historically corroded area, each currently corroded area, and the actual amount of rust remover used in each historically corroded area.
[0038] S2, analyzing the gradient change regularity and radial distribution characteristics of each historical corrosion area according to the grayscale value of each pixel point in each historical corrosion area, and determining the corrosion depth of each historical corrosion area.
[0039] Surface rust gradually spreads into the metal and onto the surface. The deeper the rust penetrates, the more severe it becomes, requiring a higher dosage of rust remover. Therefore, it's important to analyze the depth of rust in historically corroded areas. Rust depth indicates the severity of the downward spread of rust within a historically corroded area and is a key factor in calculating the extent of the spread of rust.
[0040] Existing ultrasonic techniques for measuring corrosion depth can hinder the penetration of ultrasound waves, as the rusted material itself can be more fragile than uncorroded metal. Ultrasonic signals may not penetrate thicker rust layers, making it difficult to obtain accurate corrosion depth information. Therefore, this embodiment uses actual corrosion image features from areas with varying historical corrosion history to quantitatively analyze corrosion depth, rather than directly measuring it with ultrasound.
[0041] In this embodiment, the process of determining the corrosion depth of each historical corrosion area remains consistent. For ease of description and understanding, any historical corrosion area is taken as an example to determine the corrosion depth of the historical corrosion area.
[0042] As an exemplary embodiment, the above-mentioned determination of the corrosion depth of the historical corrosion area can be performed by Figure 2 The steps S21 to S23 shown implement: S21, determining the gradient and gradient direction of each pixel in the neighborhood of each pixel according to the grayscale value of each pixel in the historical corrosion area.
[0043] In this embodiment, the neighborhood range specifically refers to an eight-neighborhood range, and the grayscale value of the pixel point can be obtained by grayscale processing the historical rust area.
[0044] Among them, the process of obtaining the grayscale value of the pixel point and determining the gradient and gradient direction through the grayscale value of the pixel point are both existing technologies and are not within the scope of protection of the present invention, and will not be elaborated here.
[0045] S22, obtaining a gradient change regularity index for each pixel point based on the gradient and gradient direction of each pixel point in the neighborhood of each pixel point.
[0046] Here, the gradient change law index refers to the gradient change stability and gradient direction consistency of all pixels within the eight-neighborhood range of the pixel point. The gradient change law index is one of the key calculation factors for the subsequent determination of the corrosion depth.
[0047] As an exemplary embodiment, the above step S22 can be implemented through the following sub-steps: In the first sub-step, based on the gradients of each pixel in the neighborhood of each pixel, the gradient variance of all pixels in the neighborhood of each pixel is determined.
[0048] In this embodiment, the gradient variance can characterize the gradient fluctuation of all pixels within the eight-neighborhood range of a single pixel. The smaller the gradient variance, the more stable the gradient change of the pixel within the eight-neighborhood range of the corresponding pixel, that is, the more regular the gradient change.
[0049] In the second sub-step, the unit vectors in the gradient direction of each pixel point in the neighborhood of each pixel point are obtained, and the sum of all the unit vectors in the same neighborhood range is used as the gradient change direction of the corresponding pixel point.
[0050] In this embodiment, when the gradient directions of the pixels in the eight-neighborhood area of the pixel point are more consistent, the sum of the gradient directions is larger.
[0051] In the third sub-step, the gradient change regularity index of each pixel point is obtained according to the gradient variance corresponding to each pixel point and the modulus of the gradient change direction.
[0052] In this embodiment, the gradient variance is negatively correlated with the gradient change law index, that is, the larger the gradient variance, the smaller the gradient change law index; the modulus of the gradient change direction is positively correlated with the gradient change law index, that is, the larger the modulus of the gradient change direction, the larger the gradient change law index.
[0053] For example, the calculation formula of the gradient change law index of the i-th pixel point can be: Where, Represents the gradient change law index of the i-th pixel point, th represents the hyperbolic tangent function, which is used to achieve normalization processing. The value of is limited to between 0 and 1. Indicates the gradient change direction corresponding to the i-th pixel point, Indicates the modulus of the gradient change direction of the i-th pixel point, represents the modulo length function, Represents the gradient variance corresponding to the i-th pixel.
[0054] In the calculation formula of the gradient change law index, The larger the value, the larger the modulus of the gradient change direction of the i-th pixel point and the smaller the gradient variance. This further indicates that the gradient directions of the surrounding pixels adjacent to the i-th pixel point are more consistent and the gradient sizes are more similar, and the gradient change regularity of the i-th pixel point is stronger, that is, the larger the gradient change regularity index of the i-th pixel point.
[0055] It should be noted that, in general, There is no possibility of zero. If there is an extreme case, the gradient variance If it is equal to zero, add a non-zero constant to the denominator of the fraction. The empirical value can be 0.01.
[0056] By referring to the calculation process of the gradient change regularity index of the i-th pixel point, the gradient change regularity index of each pixel point in the historical corrosion area can be obtained.
[0057] S23, determining the corrosion depth of the historical corrosion area according to the gradient change law index and coordinate position of each pixel point in the historical corrosion area.
[0058] As an exemplary embodiment, the above step S23 can be implemented through the following sub-steps: The first sub-step is to determine the centroid pixel point of the historical rust area, and determine the first distance between each pixel point in the historical rust area and the centroid pixel point based on the coordinate positions of each pixel point and the centroid pixel point in the historical rust area.
[0059] In this embodiment, the first distance refers to the length of the line connecting each pixel in the historical rust area and the centroid pixel, which is used to distinguish the subsequent second distance. The smaller the first distance, the closer the pixel in the historical rust area is to the centroid pixel.
[0060] In the second sub-step, the first distance of each pixel point is arranged, and the arranged first distance is used as the horizontal axis and the gradient change regularity index is used as the vertical axis to construct a fitting curve, which is recorded as the regular distance fitting curve.
[0061] Here, the regular distance fitting curve can show the fluctuation of the regular index of the gradient change as the first distance gradually increases.
[0062] In this embodiment, all first distances in the historical corrosion area are arranged in ascending order to obtain a first distance sequence. After obtaining the first distance sequence, a gradient change regularity indicator sequence corresponding to the first distance sequence is obtained. Based on the first distance sequence and the gradient change regularity indicator sequence, a fitting curve is constructed with the first distance as the horizontal axis and the gradient change regularity indicator as the vertical axis, and is recorded as a regular distance fitting curve.
[0063] It should be noted that the first distance and gradient change regularity index of any data point in the regular distance fitting curve belong to the same pixel point, that is, the regular distance fitting curve is obtained by fitting the coordinate points composed of the first distance and gradient change regularity index of each pixel point in the historical corrosion area.
[0064] In the third sub-step, the corrosion depth of the historical corrosion area is determined based on the regular distance fitting curve and the gradient change regularity index of each pixel point in the historical corrosion area.
[0065] Since rust on metal surfaces is caused by oxidation, the metal typically expands in volume after oxidation, causing the rusted parts to squeeze each other, resulting in an uneven, concave-convex texture on the uncorroded parts of the metal. Therefore, the more pronounced the unevenness of the metal surface, the deeper the rust. Therefore, in this embodiment, the average value of the gradient change regularity indicator for all pixels in the historical rust area is used as one of the key calculation factors for determining the rust depth.
[0066] As the depth of the rust increases, the overall gradient variation of the rust region decreases, and the rust region exhibits extruded convex features, making the texture changes more obvious within the rust region compared to the rust edge. Therefore, the gradient variation of the pixels within the rust region decreases as the first distance decreases. Therefore, in this embodiment, the average slope of the regular distance fitting curve is also used as a key calculation factor for determining the rust depth.
[0067] Specifically, the average slope of the regular distance fitting curve was calculated, and the average gradient change regularity index of all pixels in the historical corrosion area was calculated. The corrosion depth of the historical corrosion area was determined based on the average slope and the average gradient change regularity index. The average slope and the average gradient change regularity index both showed a negative correlation with the corrosion depth.
[0068] For example, the calculation formula for the corrosion depth of the j-th historical corrosion area can be: Where, represents the corrosion depth of the jth historical corrosion area, exp represents the exponential function with the natural constant e as the base, Used to achieve normalization processing of negative correlation of data, represents the average value of the gradient change law index of all pixels in the j-th historical corrosion area, Represents the average slope of the regular distance fitting curve of the j-th historical corrosion area.
[0069] The calculation formula for the corrosion depth is: The smaller the first distance, the more irregular the overall gradient change of the j-th historical corrosion area, and the gradient change regularity index of the pixel points in the j-th historical corrosion area increases with the increase of the first distance, indicating that the j-th historical corrosion area is squeezed more obviously and has more convex parts, so the corrosion depth of the i-th historical corrosion area is greater.
[0070] With reference to the above-mentioned process of determining the corrosion depth of the j-th historical corrosion area, the corrosion depth of each historical corrosion area can be obtained.
[0071] Thus, this embodiment obtains one of the key calculation factors for determining the diffusion degree of the historical corrosion area, namely, the corrosion depth of each historical corrosion area.
[0072] S3, analyzing the obvious spread of the historical corrosion area to the surrounding areas based on the grayscale value and hue value of each pixel in each historical corrosion area, and determining the spread degree of each historical corrosion area in combination with the corrosion depth.
[0073] Here, the degree of spread indicates the spread of rust within a historically corroded area. The more severe the rust spread, the greater the demand for rust remover. Rust spread can be analyzed from two perspectives: the apparent spread to the surrounding areas and the apparent spread downwards, also known as horizontal and vertical spread. Rust depth indicates the apparent downward spread of the historically corroded area, so it is necessary to analyze the apparent spread of the historically corroded area to determine the degree of spread.
[0074] In this embodiment, the diffusion degree of each historical corrosion area is determined in the same manner. For ease of description and understanding, any historical corrosion area is taken as an example to determine the diffusion degree of the historical corrosion area.
[0075] As an exemplary embodiment, the above determination of the diffusion degree of the historical corrosion area can be performed by Figure 3 The steps S31 to S34 shown implement: S31, determining a first lateral spreading factor of the historical corrosion area according to the grayscale value of each pixel point in the historical corrosion area.
[0076] Here, the first lateral spread factor can represent the obviousness of the rust traces near the rust edge in the historical rust area. The less obvious the rust traces at the rust edge, the more serious the lateral spread of the historical rust area, and the larger the first lateral spread factor.
[0077] When the rust spreads to the surrounding areas, the rust time at the rust edge is shorter than that at the rust center. Therefore, the rust area will show obvious rust marks at the rust center, while the rust marks at the rust edge are not obvious.
[0078] As an exemplary embodiment, the above step S31 can be implemented through the following sub-steps: In the first sub-step, superpixel segmentation is performed on the historical rust area to obtain several pixel clusters, and then the centroid pixel and grayscale mean of each pixel cluster are obtained.
[0079] In this embodiment, the implementation process of superpixel segmentation is a prior art and is not within the scope of protection of the present invention, so it will not be elaborated here. Among them, pixel clustering is also a pixel clustering cluster, and each pixel cluster has its corresponding centroid pixel and grayscale mean. The grayscale mean is obtained by calculating the average grayscale value of all pixels in a single pixel cluster. Among them, the schematic diagram of the superpixel segmentation result of the historical rust area is shown in FIG. Figure 4 shown.
[0080] The second sub-step is to determine the second distance between the centroid pixel of each pixel cluster and the centroid pixel in the historical corrosion area, and sort all the second distances to obtain sorted second distances.
[0081] In this embodiment, the centroid pixel point of the pixel cluster is first connected with the centroid pixel point in the historical rust area, and then the length of the connection is calculated, that is, the distance between the centroid pixel point of the pixel cluster and the centroid pixel point in the historical rust area is calculated, which is recorded as the second distance. Each pixel cluster has its corresponding second distance.
[0082] In order to analyze the distance between each pixel cluster and the center of the historical corrosion area, all second distances are sorted in ascending order to obtain the sorted second distances.
[0083] In the third sub-step, the sorted second distance is used as the horizontal axis and the grayscale mean is used as the vertical axis to construct a fitting curve, which is recorded as the grayscale distance fitting curve.
[0084] In this embodiment, the sorted second distances corresponding to all pixel clusters are used as the horizontal axis, and the grayscale mean values of the pixel clusters corresponding to the sorted second distances are used as the vertical axis to construct a fitting curve, which is recorded as a grayscale distance fitting curve. The grayscale distance fitting curve can represent the grayscale performance of the pixel clusters as the second distance increases.
[0085] The fourth sub-step is to calculate the average slope of the grayscale distance fitting curve and use the average slope as the first lateral spread factor of the historical corrosion area.
[0086] In this embodiment, the average slope refers to the average value of the slopes of all data points in the grayscale distance fitting curve. The average slope can characterize the overall trend change of the grayscale distance fitting curve. The larger the average slope, the larger the grayscale value of the cluster of pixel points with a larger second distance in the historical rust area, and the more consistent it is with the characteristics of the lateral spread of the historical rust area, that is, the characteristic that the rust marks at the rust edge are not obvious.
[0087] S32, obtaining the centroid pixel point and each boundary pixel point in the historical corrosion area, taking the centroid pixel point as the starting point and passing through each boundary pixel point to obtain a plurality of rays, which are recorded as extension lines.
[0088] Here, the boundary pixel points may be pixel points on the boundary of the historical rust area.
[0089] In this embodiment, the extension lines are obtained to facilitate the subsequent determination of the second lateral spread factor. Each extension line of the historical corrosion region starts at the centroid pixel and passes through the boundary pixel. The extension length of the extension line can be equal to the length of the extension line within the historical corrosion region.
[0090] It should be noted that the extension line is determined in order to analyze whether there is rust stains in the area surrounding the historical corrosion area. The extension line can be used to obtain the rusted pixel points located in the historical corrosion area, and the non-rusted pixel points, i.e., metal pixel points, surrounding the historical corrosion area can also be obtained, which is beneficial for the subsequent determination of the second lateral spread factor of the historical corrosion area.
[0091] S33: Determine a second lateral spreading factor of the historical rust area according to the hue value of each metal pixel and the hue value of each rust pixel on each extension line.
[0092] Here, the second lateral spread factor refers to the degree of rust visible outside the historical rust area. As the rust area spreads outward, rust may form on the normal metal surface, making rust more likely to spread. Therefore, it is necessary to analyze whether rust appears outside the historical rust area.
[0093] As the rusted area extends outward, the protruding portion of the rusted area is affected by the spread of rust, resulting in slight rust stains on the normal metal surface. The presence of rust stains indicates that the rust has spread strongly in the historical rusted area, and the hue direction of the rust stain in HSV space is highly similar to that of the rust. Therefore, this embodiment primarily quantifies the second lateral spread factor of the historical rusted area by analyzing the similarity between the hue of the metal pixels on the extension line and the hue of the rusted pixels.
[0094] As an exemplary embodiment, the above step S33 can be implemented through the following sub-steps: In the first sub-step, for each extension line, the pixel points on the extension line that are located in the historical rust area are recorded as rust pixels, and the pixel points on the extension line that are not rust pixels are recorded as metal pixels.
[0095] In this embodiment, after determining the rust pixels, it is necessary to obtain the number of rust pixels on the extension line to facilitate the subsequent determination of the distribution of rust pixels along the extension line. The more rust pixels distributed along the extension line, the greater the possibility of lateral rust spread. Metal pixels are pixels on a normal metal surface, and metal pixels can be used to analyze the presence of rust stains on normal metal surfaces.
[0096] In the second sub-step, the average hue value of all rusted pixels on the extension line is calculated, which is recorded as the first hue average, and the average hue value of all metal pixels on the extension line is calculated, which is recorded as the second hue average.
[0097] In this embodiment, the first hue mean is used to analyze the hue of the rusted pixels on the extension line, and the second hue mean is used to analyze the hue of the metal pixels on the extension line. Figure 5 shown.
[0098] In the third sub-step, the second lateral spreading factor of the historical rust area is determined based on the difference between the first hue mean and the second hue mean corresponding to each extension line and the distribution of the rust pixels on each extension line.
[0099] When analyzing the second lateral spread factor, the smaller the difference between the first hue mean and the second hue mean, the greater the possibility of rust stains appearing on the metal pixels on the extension line, and the greater the possibility of lateral rust spread; the fewer the number of rust pixels on the extension line, the less severe the rust on the extension line, and the less likely it is to cause lateral rust spread.
[0100] Specifically, the absolute value of the difference between the first hue mean and the second hue mean corresponding to the same extension line is calculated to obtain the absolute value of the difference of each extension line; based on the absolute value of the difference of each extension line and the number of rusted pixels, the second lateral spread factor of the historical rust area is determined; wherein, the absolute value of the difference is negatively correlated with the second lateral spread factor, and the number of rusted pixels is positively correlated with the second lateral spread factor.
[0101] For example, the calculation formula for the second lateral spread factor of the j-th historical corrosion area can be: Where, represents the second lateral spread factor of the jth historical corrosion area, M represents the number of extension lines of the jth historical corrosion area, Indicates the number of corroded pixels on the mth extension line of the jth historical corroded area, Represents the absolute value of the difference between the first hue mean and the second hue mean corresponding to the mth extension line of the jth historical corrosion area.
[0102] In the calculation formula of the second lateral spread factor, It can show the hue similarity between the metal pixel and the rust pixel on the mth extension line of the jth historical rust area. The larger , the greater the second lateral spread factor of the jth historical corrosion area; It can show the distribution of rusted pixels on the mth extension line of the jth historical rusted area. The larger it is, the greater the second lateral spread factor of the j-th historical corrosion area.
[0103] It should be noted that, in general, There is no possibility of zero. If there is an extreme case, the absolute value of the difference between the two hue means If it is equal to zero, add a non-zero constant to the denominator of the fraction. The empirical value can be 0.01.
[0104] S34, performing a fusion analysis on the first lateral spread factor, the second lateral spread factor, and the corrosion depth to obtain the diffusion degree of the historical corrosion area.
[0105] In this embodiment, the first lateral spread factor, the second lateral spread factor and the corrosion depth are all positively correlated with the degree of diffusion. The larger the first lateral spread factor, the second lateral spread factor and the corrosion depth, the greater the degree of diffusion of the historical corrosion area.
[0106] For example, the calculation formula for the diffusion degree of the j-th historical corrosion area can be: Where, Indicates the diffusion degree of the jth historical corrosion area, th represents the hyperbolic tangent function, which is used to achieve normalization processing. represents the corrosion depth of the jth historical corrosion area, represents the first lateral spread factor of the jth historical corrosion area, Represents the first lateral spread factor of the jth historical corrosion area.
[0107] In the calculation formula for the degree of diffusion, the greater the rust depth, the greater the longitudinal extension of the historical extension area, that is, the greater the longitudinal diffusion degree; the larger the first lateral diffusion factor, the less obvious the rust marks closer to the rust edge in the historical rust area, resulting in a greater lateral diffusion degree; the larger the second lateral diffusion factor, the more rust pixels there are on the extension line in the historical rust area, and the smaller the hue difference between the normal metal part and the rusted part, resulting in a greater lateral diffusion degree; therefore, when the rust depth, the first lateral diffusion factor, and the second lateral diffusion factor of the historical rust area are greater, the corresponding historical rust area has a greater diffusion degree.
[0108] By referring to the calculation formula of the diffusion degree of the j-th historical corrosion area, the diffusion degree of each historical corrosion area can be obtained.
[0109] Thus, this embodiment has obtained a quantitative indicator that can characterize the severity of corrosion in the historically corroded area, namely, the degree of diffusion.
[0110] S4, analyzing the complexity and structural density of the metal surface in each historical rust area according to the grayscale value of each pixel point in each historical rust area, and determining the rust remover requirement for each historical rust area in combination with the diffusion degree.
[0111] Here, the rust remover demand refers to the amount of rust remover required when performing rust removal treatment on a historically corroded area. A greater rust remover demand indicates a greater amount of rust remover required when performing rust removal treatment on a historically corroded area.
[0112] When analyzing the need for rust remover, in addition to analyzing the spread of rust in different historically corroded areas, we also analyze whether the metal surface where the historically corroded area is located will affect the rust removal effect. If the metal surface where the historically corroded area is located is likely to affect the rust removal effect, the amount of rust remover should be increased, and the need for rust remover will also be greater.
[0113] For the metal surface where the historical rust removal area is located, when the metal surface where the historical rust area is located has complex shapes, gaps or holes, part of the rust remover may penetrate into the historical rust area when spraying the rust remover, thereby reducing the amount of rust remover acting on the historical rust area of the metal surface, and more rust remover may be required to ensure thorough cleaning; when the rust products produced by metal rust are loose and porous, the rust remover can more easily penetrate to the bottom of the layer and the rust removal effect is better, but if the rust products are dense, the rust remover cannot penetrate well into the rust layer, and a larger dose of rust remover will be required.
[0114] In this embodiment, the rust remover demand of each historical corrosion area is determined in the same manner. To facilitate understanding and analysis, any historical corrosion area is taken as an example to determine the rust remover demand of the historical corrosion area.
[0115] As an exemplary embodiment, the above-mentioned determination of the rust remover demand of the historical rust area can be performed by Figure 6 Steps S41 to S43 shown implement: S41, determining the complexity of the metal surface where the historical corrosion area is located according to the number of edges in the normal metal surface area in the minimum circumscribed rectangle of the historical corrosion area and the mean value of the gradient variance corresponding to all edges.
[0116] Here, the normal metal surface area refers to the remaining area in the minimum circumscribed rectangle excluding the historical rust area; complexity refers to whether there are complex shapes, gaps or holes on the metal surface. The more edges there are and the larger the mean value of the gradient variance of the edges, the greater the complexity of the metal surface where the historical rust area is located.
[0117] In this embodiment, when the metal surface structure is more complex, there will be more edges in the corresponding metal surface area and larger gradient changes can be detected for more edges. Therefore, the product of the number of edges in the normal metal surface area and the mean of the gradient variance corresponding to all edges can be used as the complexity of the metal surface where the historical rust area is located.
[0118] The mean gradient variance is obtained by the gradient variance of all edges in the normal metal surface area in the minimum bounding rectangle of the historical rust area, and the gradient variance is obtained by the gradient of all edge pixels in a single edge.
[0119] S42, obtaining the grayscale variance of each pixel cluster corresponding to the historical corrosion area, and determining the structural density of the historical corrosion area based on the grayscale variance of all pixel clusters.
[0120] Here, the grayscale variance of a pixel cluster represents the degree of dispersion of the grayscale values of all pixels within a local area. A larger grayscale variance indicates more significant grayscale differences within the cluster, reflecting the density of the cluster. For example, a pixel cluster containing rust holes has large grayscale differences within it, resulting in a large grayscale variance. In dense areas, the grayscale variance tends to zero.
[0121] In this embodiment, the grayscale variance is obtained by analyzing the grayscale of all pixels in the same pixel cluster. The grayscale variance is negatively correlated with the structural density, that is, the larger the grayscale variance, the smaller the structural density. Therefore, the average grayscale variance of all pixel clusters is calculated first, and then the inverse of the average grayscale variance is used as the structural density of the historical rust area.
[0122] S43, determining the rust remover requirement of the historical rust area based on the complexity of the metal surface where the historical rust area is located, the structural density and the diffusion degree of the historical rust area.
[0123] In this embodiment, the complexity, structural density, and diffusion degree of the metal surface where the historical rust area is located are positively correlated with the demand for the rust remover.
[0124] For example, the calculation formula for the rust remover demand of the j-th historical corrosion area can be: Where, represents the rust remover demand of the jth historical rust area, th represents the hyperbolic tangent function, which is used to achieve normalization processing. represents the diffusion degree of the j-th historical corrosion area, represents the complexity of the metal surface where the j-th historical corrosion area is located, represents the average value of the grayscale variance of all pixel clusters corresponding to the j-th historical corrosion area, represents the rust remover demand of the jth historical corrosion area.
[0125] In the calculation formula of rust remover demand, The larger the value is, the greater the severity of the corrosion in the j-th historical corrosion area is, which means that the demand for rust remover in the j-th historical corrosion area is greater. The larger the value is, the more complex the metal surface of the j-th historical rust area is and the denser the metal rust surface is, which makes it more difficult to remove rust in the j-th historical rust area. The j-th historical rust area requires more rust remover during rust removal, so the j-th historical rust area has a greater demand for rust remover.
[0126] It should be noted that, in general, There is no possibility of zero. If there is an extreme case, the average value of the grayscale variance If it is equal to zero, add a non-zero constant to the denominator of the fraction. The empirical value can be 0.01.
[0127] With reference to the calculation process of the rust remover demand of the j-th historical rust area, the rust remover demand of each historical rust area can be obtained.
[0128] So far, this embodiment has obtained the rust remover demand of each historical rusted area in each historical metal surface image.
[0129] S5, based on the rust remover demand of each current rusted area, an estimated rust remover usage of each current rusted area is determined by a rust remover dosage fitting curve constructed by the actual rust remover usage of each historical rusted area and the rust remover demand.
[0130] Here, the estimated rust remover dosage is the estimated amount of rust remover required for the current rusted area. The rust remover dosage fitting curve shows how the rust remover dosage changes as the rust remover demand increases. This rust remover dosage fitting curve can be used to obtain the estimated rust remover dosage for the current rusted area.
[0131] In this embodiment, the method for determining the estimated amount of rust remover for each current corroded area is the same. For ease of description and understanding, any current corroded area is taken as an example to determine the estimated amount of rust remover for the current corroded area.
[0132] As an exemplary embodiment, the step of determining the estimated amount of rust remover required for the current rusted area includes: The first step is to obtain the rust remover demand of the current rust area by referring to the determination process of the rust remover demand of the historical rust area.
[0133] The second step is to construct a rust remover dosage fitting curve based on the rust remover demand and actual rust remover usage in each historical rust area.
[0134] Specifically, the rust remover demand of all historical rusted areas is arranged in ascending order, and the arranged rust remover demand is used as the horizontal axis, and the corresponding actual rust remover dosage is used as the vertical axis. The actual rust remover dosage is also the rust remover dosage, so as to construct a rust remover dosage fitting curve. The schematic diagram of the rust remover dosage fitting curve is shown as follows: Figure 7 shown.
[0135] The third step is to obtain the rust remover measurement of the rust remover demand in the current rusted area on the rust remover dosage fitting curve as the estimated rust remover dosage in the current rusted area.
[0136] With reference to the above-mentioned process of determining the estimated amount of rust remover for the current corroded area, the estimated amount of rust remover for each current corroded area can be obtained.
[0137] After obtaining the estimated amount of rust remover for each current rusted area, the rust removal equipment will locate the current rusted area on the metal surface and spray the corresponding amount of rust remover for rust removal according to the estimated amount of rust remover for the current rusted area.
[0138] In summary, the present invention determines the rust remover requirement by analyzing the rust diffusion characteristics of historically corroded areas and the rust removal effectiveness of the metal surface in the historically corroded areas. Combined with the actual rust remover usage in the historically corroded areas, a relationship function is constructed between the rust remover requirement and the actual rust remover usage. Thus, given the rust remover requirement for the current corroded area, the relationship function can be used to obtain an estimated rust remover usage for the current corroded area. By determining a rust remover requirement that takes into account a more comprehensive set of factors, the present invention helps improve the numerical accuracy of the estimated rust remover usage for the current corroded area.
[0139] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for identifying rusted areas on metal surfaces and estimating the amount of rust remover, characterized in that: The following steps are involved: Obtaining each historical corroded area in a plurality of historical metal surface images, each current corroded area in a current metal surface image, and an actual amount of rust remover used in each historical corroded area; According to the gray value of each pixel point in each historical corrosion area, the gradient change characteristics and radial distribution characteristics of the historical corrosion area are analyzed to determine the corrosion depth of each historical corrosion area; Analyze the obvious spread of the historical corrosion area to the surrounding areas based on the grayscale value and hue value of each pixel in each historical corrosion area, and determine the spread degree of each historical corrosion area in combination with the corrosion depth; Analyzing the complexity and structural density of the metal surface in each historical rust area based on the grayscale value of each pixel in each historical rust area, and determining the rust remover requirement for each historical rust area in combination with the diffusion degree; Based on the rust remover demand of each current rusted area, the estimated rust remover usage of each current rusted area is determined by fitting a rust remover dosage curve constructed by the actual rust remover usage of each historical rusted area and the rust remover demand.
2. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover according to claim 1, characterized in that: The step of analyzing the gradient variation characteristics and radial distribution characteristics of the historical corrosion regions according to the grayscale value of each pixel point in each historical corrosion region to determine the corrosion depth of each historical corrosion region includes: For each historical corrosion area, the gradient and gradient direction of each pixel in the neighborhood of each pixel are determined according to the grayscale value of each pixel in the historical corrosion area; According to the gradient and gradient direction of each pixel in the neighborhood of each pixel, the gradient change law index of each pixel is obtained; The corrosion depth of the historical corrosion area is determined based on the gradient change law index and coordinate position of each pixel point in the historical corrosion area.
3. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover according to claim 2, characterized in that: The step of obtaining the gradient change regularity index of each pixel point based on the gradient and gradient direction of each pixel point in the neighborhood of each pixel point includes: Determine the gradient variance of all pixels within the neighborhood of each pixel based on the gradient of each pixel within the neighborhood of each pixel; Get the unit vector of each pixel's gradient direction in the neighborhood of each pixel, and take the sum of all the unit vectors in the same neighborhood as the gradient change direction of the corresponding pixel; Obtaining a gradient change regularity index for each pixel point based on the gradient variance corresponding to each pixel point and the modulus length of the gradient change direction; The gradient variance is negatively correlated with the gradient change law index, and the modulus of the gradient change direction is positively correlated with the gradient change law index.
4. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover according to claim 2, wherein: Determining the corrosion depth of the historical corrosion area based on the gradient change law index and coordinate position of each pixel point in the historical corrosion area includes: Determine a centroid pixel point of the historical corrosion area, and determine a first distance between each pixel point in the historical corrosion area and the centroid pixel point based on the coordinate positions of each pixel point in the historical corrosion area and the centroid pixel point; Arrange the first distances of each pixel point, use the arranged first distances as the horizontal axis and the gradient change regularity index as the vertical axis, and construct a fitting curve, which is recorded as a regular distance fitting curve; The corrosion depth of the historical corrosion area is determined based on the regular distance fitting curve and the gradient change regularity index of each pixel point in the historical corrosion area.
5. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover according to claim 4, characterized in that: Determining the corrosion depth of the historical corrosion area based on the regular distance fitting curve and the gradient change regularity index of each pixel point in the historical corrosion area includes: Calculating the average slope of the regular distance fitting curve and calculating the average value of the gradient change regularity index of all pixel points in the historical corrosion area; Determining the corrosion depth of the historical corrosion area according to the average slope and the average value of the gradient change law indicator; Among them, the average slope and the average value of the gradient change law index are both negatively correlated with the corrosion depth.
6. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover according to claim 1, characterized in that: The method of analyzing the obvious spread of the historical corrosion area to the surrounding areas based on the grayscale value and hue value of each pixel point in each historical corrosion area and determining the spread degree of each historical corrosion area in combination with the corrosion depth includes: For each historical corrosion area, determine the first lateral spread factor of the historical corrosion area according to the grayscale value of each pixel in the historical corrosion area; Obtain the centroid pixel point and each boundary pixel point in the historical corrosion area, and obtain a number of rays starting from the centroid pixel point and passing through each boundary pixel point, which are recorded as extension lines; wherein the boundary pixel point is a pixel point on the boundary of the historical corrosion area; Determining a second lateral spread factor of the historical corrosion area according to the hue value of each metal pixel point and the hue value of each corrosion pixel point on each of the extension lines; Performing a fusion analysis on the first lateral spread factor, the second lateral spread factor, and the corrosion depth to obtain a diffusion degree of the historical corrosion area; The first lateral spread factor, the second lateral spread factor and the corrosion depth are all positively correlated with the diffusion degree.
7. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover according to claim 6, characterized in that: Determining the first lateral spread factor of the historical corrosion area according to the grayscale value of each pixel in the historical corrosion area includes: Performing superpixel segmentation on the historical rust area to obtain a number of pixel clusters, and then obtaining the centroid pixel and grayscale mean of each pixel cluster; determining a second distance between a centroid pixel point of each pixel cluster and a centroid pixel point in the historical corrosion area, and sorting all the second distances to obtain sorted second distances; The second distance after sorting is used as the horizontal axis and the grayscale mean is used as the vertical axis to construct a fitting curve, which is recorded as the grayscale distance fitting curve; The average slope of the grayscale distance fitting curve is calculated, and the average slope is used as the first lateral spread factor of the historical corrosion area.
8. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover according to claim 6, characterized in that: Determining the second lateral spread factor of the historical rust area according to the hue value of each metal pixel point and the hue value of each rust pixel point on each of the extension lines includes: For each extension line, the pixel points on the extension line that are located in the historical corrosion area are recorded as corrosion pixels, and the pixel points on the extension line that are not corrosion pixels are recorded as metal pixels; Calculate the average hue value of all rust pixels on the extension line, record it as the first hue average, and calculate the average hue value of all metal pixels on the extension line, record it as the second hue average; The second lateral spreading factor of the historical rust area is determined based on the difference between the first hue mean and the second hue mean corresponding to each extension line and the distribution of rust pixels on each extension line.
9. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover according to claim 8, characterized in that: The second lateral spread factor of the historical rust area is determined based on the difference between the first hue mean and the second hue mean corresponding to each extension line and the distribution of rust pixels on each extension line, including: Calculating the absolute value of the difference between the first hue mean and the second hue mean corresponding to the same extended line, and obtaining the absolute value of the difference for each extended line; Determining a second lateral spread factor of the historical corrosion area based on the absolute value of the difference and the number of corroded pixels of each extension line; The absolute value of the difference is negatively correlated with the second lateral spread factor, and the number of corroded pixels is positively correlated with the second lateral spread factor.
10. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover according to claim 1, characterized in that: The method of analyzing the complexity and structural density of the metal surface in each historical rust area based on the grayscale value of each pixel in each historical rust area and determining the rust remover requirement of each historical rust area in combination with the diffusion degree includes: For each historical corrosion area, the complexity of the metal surface where the historical corrosion area is located is determined based on the number of edges in the normal metal surface area within the minimum bounding rectangle of the historical corrosion area and the mean gradient variance corresponding to all edges; wherein the normal metal surface area is the remaining area in the minimum bounding rectangle excluding the historical corrosion area; Obtain the grayscale variance of each pixel cluster corresponding to the historical rust area, and determine the structural density of the historical rust area based on the grayscale variance of all pixel clusters; Determining the rust remover requirement for the historically corroded area based on the complexity of the metal surface where the historically corroded area is located, the structural density of the historically corroded area, and the diffusion degree; The complexity of the metal surface where the historical rust area is located, the structural density, and the diffusion degree are all positively correlated with the demand for the rust remover.
Citation Information
Patent Citations
Rust remover optimal proportioning method and system based on metal corrosion degree
CN114049354A
Steel bar polishing and derusting quality detection method
CN115100203A
Ship planking corrosion area identification and analysis method
CN115345875A
Method for removing rust from steel material
WO2022176278A1