A method for identifying rusted areas of a metal surface and estimating the amount of rust remover

By analyzing the grayscale and hue values ​​of the rusted area, and combining them with the rust depth and diffusion degree, a fitting curve for the rust remover demand was constructed. This solved the problem of inaccurate estimation of rust remover dosage in the rusted area and achieved more accurate estimation of rust remover dosage.

CN120747017BActive Publication Date: 2026-02-03SHENZHEN LINDA FINE CHEM DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510921164.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2026-02-03
Estimated Expiration
2045-07-04

AI Technical Summary

Technical Problem

In existing technologies, the estimation of rust remover dosage in rusted areas is inaccurate and cannot accurately reflect the depth and spread of rust, resulting in inaccurate rust remover dosage.

Method used

By analyzing the grayscale and hue values ​​of historical rusted areas, and combining them with the rust depth and diffusion degree, a fitting curve for the demand of rust remover is constructed to determine the amount of rust remover needed for the current rusted area.

Benefits of technology

It improves the accuracy of rust remover dosage estimation, avoids the deviation in rust remover dosage caused by inaccurate rust depth and spread in traditional methods, and ensures rust removal effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120747017B_ABST
    Figure CN120747017B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image analysis, and particularly relates to a metal surface rust area identification and rust remover dosage estimation method, comprising: obtaining each historical rust area, rust remover actual dosage and each current rust area; according to the gray value and hue value of each pixel point in each historical rust area, and in combination with the rust depth of the corresponding historical rust area, the diffusion degree of each historical rust area is determined; according to the complexity and structure density of the metal surface where each historical rust area is located in combination with the diffusion degree, the rust remover requirement degree of each historical rust area is determined; based on the rust remover requirement degree of the current rust area, the rust remover dosage fitting curve obtained from the historical rust area is used to determine the rust remover estimated dosage of each current rust area. Through perfecting the rust remover requirement degree obtained by analyzing the rust related factors of the rust area, the numerical accuracy of the rust remover estimated dosage can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image analysis technology, specifically to a method for identifying rusted areas on metal surfaces and estimating the amount of rust remover needed. Background Technology

[0002] Metal surface corrosion occurs when metals react electrochemically with moisture, oxygen, and acidic or alkaline substances in the environment, leading to oxidation and rust on the metal surface. Rusted areas typically exhibit characteristics such as color changes and increased surface roughness; in severe cases, it can cause a decline in the material's mechanical properties and even structural failure. To prevent further corrosion, chemical rust removers are commonly used in industry.

[0003] Rust removers work by reacting chemically with rust products through their acidic or alkaline components, dissolving or loosening the rust layer to facilitate mechanical removal. However, the amount of rust remover used needs to be precisely controlled: insufficient rust removal results in incomplete rust removal, leaving a dense rust layer, and the resulting electrochemical micro-cells accelerate secondary corrosion; excessive rust remover, on the other hand, will cause excessive corrosion of the base metal and environmental pollution.

[0004] For estimating the amount of rust remover needed, current methods typically employ machine vision algorithms to extract rusted areas from metal surface images, using the size of these areas and the rust marks to estimate the required amount of rust remover. However, the rusting process not only forms a rust layer on the metal surface but can also penetrate into the metal, causing deep corrosion. Furthermore, the rust can spread outwards, both of which require a significant amount of rust remover. Therefore, the accuracy of traditional visual estimation methods is severely affected, easily leading to large deviations in the estimated amount of rust remover needed. Summary of the Invention

[0005] To address the technical problem of inaccurate estimation results for existing rust remover dosage, the present invention aims to provide a method for identifying rusted areas on metal surfaces and estimating rust remover dosage. The specific technical solution adopted is as follows:

[0006] One embodiment of the present invention provides a method for identifying rusted areas on a metal surface and estimating the amount of rust remover needed. The method includes the following steps:

[0007] Acquire each historical rusted area in several historical metal surface images, each current rusted area in the current metal surface image, and the actual amount of rust remover used in each historical rusted area;

[0008] Based on the grayscale values ​​of each pixel in each historical rust region, the gradient variation pattern and radial distribution characteristics of the historical rust region are analyzed to determine the rust depth of each historical rust region.

[0009] According to the gray value and the hue value of each pixel point in each historical rust area, the obvious situation of the historical rust area spreading to the surrounding is analyzed, and the diffusion degree of each historical rust area is determined in combination with the rust depth.

[0010] According to the gray value of each pixel point in each historical rust area, the complexity and the structure density of the metal surface where the historical rust area is located are analyzed, and the rust remover demand degree of each historical rust area is determined in combination with the diffusion degree.

[0011] Based on the rust remover demand degree of each current rust area, the rust remover estimated amount of each current rust area is determined through the rust remover actual amount of each historical rust area and the rust remover demand degree of the rust remover amount fitting curve constructed.

[0012] Further, the rust depth of each historical rust area is determined according to the gradient change rule feature and the radial distribution characteristic of each pixel point in each historical rust area, including:

[0013] For each historical rust area, the gradient and the gradient direction of each pixel point in the neighborhood range of each pixel point are determined according to the gray value of each pixel point in the historical rust area.

[0014] According to the gradient and the gradient direction of each pixel point in the neighborhood range of each pixel point, the gradient change rule index of each pixel point is obtained.

[0015] According to the gradient change rule index and the coordinate position of each pixel point in the historical rust area, the rust depth of the historical rust area is determined.

[0016] Further, the gradient change rule index of each pixel point is obtained according to the gradient and the gradient direction of each pixel point in the neighborhood range of each pixel point, including:

[0017] According to the gradient of each pixel point in the neighborhood range of each pixel point, the gradient variance of all pixel points in the neighborhood range of each pixel point is determined.

[0018] The unit vector in the gradient direction of each pixel point in the neighborhood range of each pixel point is obtained, and the sum of all unit vectors in the same neighborhood range is taken as the gradient change direction of the corresponding pixel point.

[0019] According to the gradient variance and the length of the gradient change direction corresponding to each pixel point, the gradient change rule index of each pixel point is obtained.

[0020] Wherein, the gradient variance and the gradient change rule index are negatively correlated, and the length of the gradient change direction and the gradient change rule index are positively correlated.

[0021] Furthermore, determining the corrosion depth of the historical corrosion area based on the gradient change pattern and coordinate position of each pixel in the historical corrosion area includes:

[0022] Determine the centroid pixel of the historical corrosion area, and determine the first distance between each pixel in the historical corrosion area and the centroid pixel based on the coordinate positions of each pixel in the historical corrosion area and the centroid pixel.

[0023] Arrange the first distance for each pixel, use the arranged first distance as the horizontal axis and the gradient change law index as the vertical axis to construct a fitting curve, which is denoted as the law distance fitting curve.

[0024] Based on the regularity of the fitted curve and the gradient change pattern of each pixel in the historical rust area, the rust depth of the historical rust area is determined.

[0025] Further, determining the corrosion depth of the historical corrosion area based on the fitted curve and the gradient change index of each pixel in the historical corrosion area includes:

[0026] Calculate the average slope of the fitted curve of the regularity, and calculate the average value of the gradient change regularity index of all pixels in the historical rust area;

[0027] The corrosion depth of the historical corrosion area is determined based on the average slope and the average value of the gradient change law index.

[0028] The average slope and the average value of the gradient change law index are both negatively correlated with the corrosion depth.

[0029] Furthermore, the step of analyzing the obvious spread of historical rust areas based on the grayscale and hue values ​​of each pixel in each historical rust area, and determining the degree of diffusion of each historical rust area in conjunction with the rust depth, includes:

[0030] For each historical corrosion area, the first lateral spread factor of the historical corrosion area is determined based on the gray value of each pixel in the historical corrosion area;

[0031] Obtain the centroid pixel and each boundary pixel in the historical corrosion area. Starting from the centroid pixel, obtain several rays through each boundary pixel, which are denoted as extension lines. The boundary pixels are the pixels on the boundary of the historical corrosion area.

[0032] The second lateral propagation factor of the historical corrosion area is determined based on the hue value of each metal pixel and the hue value of each rust pixel on each of the aforementioned extension lines.

[0033] By performing a fusion analysis on the first lateral spread factor, the second lateral spread factor, and the corrosion depth, the degree of diffusion of the historical corrosion area is obtained.

[0034] Among them, the first lateral spread factor, the second lateral spread factor, and the corrosion depth are all positively correlated with the degree of diffusion.

[0035] Further, determining the first lateral spread factor of the historical corrosion region based on the grayscale value of each pixel in the historical corrosion region includes:

[0036] The historical rust area is segmented into several pixel clusters by superpixel segmentation, and then the centroid pixel and grayscale mean of each pixel cluster are obtained.

[0037] Determine the second distance between the centroid pixel of each pixel cluster and the centroid pixel in the historical corrosion region, sort all the second distances, and obtain the sorted second distances;

[0038] Using the second distance after sorting as the horizontal axis and the mean gray value as the vertical axis, construct a fitting curve, denoted as the gray-scale distance fitting curve.

[0039] Calculate the average slope of the gray-scale distance fitting curve and use the average slope as the first lateral spread factor of the historical corrosion area.

[0040] Further, determining the second lateral propagation factor of the historical corrosion area based on the hue values ​​of each metal pixel on each of the extended lines and the hue values ​​of each rust pixel includes:

[0041] For each extension line, the pixels located within the historical corrosion area on the extension line are recorded as corrosion pixels, and the pixels that are not corrosion pixels on the extension line are recorded as metal pixels.

[0042] Calculate the average hue value of all rusted pixels on the extension line, and record it as the first hue average. Calculate the average hue value of all metallic pixels on the extension line, and record it as the second hue average.

[0043] Based on the difference between the average first hue and the average second hue corresponding to each extension line, and combined with the distribution of rust pixels on each extension line, the second lateral propagation factor of the historical rust area is determined.

[0044] Further, determining the second lateral propagation factor of the historical corrosion area based on the difference between the average first hue and the average second hue corresponding to each extension line, combined with the distribution of rust pixels on each extension line, includes:

[0045] Calculate the absolute value of the difference between the mean value of the first hue and the mean value of the second hue corresponding to the same extension line, and obtain the absolute value of the difference for each extension line;

[0046] The second lateral propagation factor of the historical corrosion area is determined based on the absolute value of the difference between each extension line and the number of rusted pixels.

[0047] 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.

[0048] Furthermore, the step of analyzing 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, and combining this with the diffusion degree, to determine the rust remover requirement for each historical rusted area, includes:

[0049] 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 of all edges; wherein, the normal metal surface area is the remaining area in the minimum bounding rectangle excluding the historical corrosion area.

[0050] Obtain the grayscale variance of each pixel cluster corresponding to the historical rust area, and determine the structural compactness of the historical rust area based on the grayscale variance of all pixel clusters.

[0051] The rust removal agent requirement for the historical rust area is determined based on the complexity of the metal surface where the historical rust area is located, the structural density of the historical rust area, and the degree of diffusion.

[0052] The complexity of the metal surface where the historical rust area is located, the density of the structure, and the degree of diffusion are all positively correlated with the demand for the rust remover.

[0053] The present invention has the following beneficial effects:

[0054] When determining the rust remover requirement, this invention not only considers the lateral and longitudinal diffusion of rust in the rusted area, but also the complexity and density of the metal surface where the rusted area is located. This effectively improves the numerical accuracy of the rust remover requirement, making the rust remover dosage fitting curve obtained from the rust remover requirement more valuable as a reference when estimating the amount of rust remover needed, and helps to avoid deviations in the rust remover dosage estimation results.

[0055] First, in determining the rust depth, this invention quantifies the rust depth based on image features as the rust area deepens. This avoids the bias in depth information caused by the rust material itself when using ultrasonic detection, resulting in a more accurate numerical rust depth and further improving the accuracy of the subsequent determination of the diffusion degree. Second, in analyzing the rust spread in the rust area, i.e., determining the diffusion degree of historical rust areas, the invention combines lateral and longitudinal rust spread characteristics to determine the severity of rust in the rust area. This overcomes the shortcomings of existing methods that only extract the size of the rust area and rust traces to estimate the dosage of rust remover, leading to more reliable estimates of rust remover dosage. Third, in analyzing the rust removal requirement, the invention analyzes not only the rust characteristics of the rust area but also the reaction of the rust remover to the metal surface where the rust area is located, i.e., the rust removal effect of the rust remover. Correspondingly, this invention analyzes the complexity and structural density of the metal surface where the historical rust area is located based on the gray value of each pixel in each historical rust area, further improving the accuracy of the estimated dosage of rust remover. Attached Figure Description

[0056] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 A flowchart illustrating the steps 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;

[0058] Figure 2 This is a flowchart illustrating the steps for determining the corrosion depth of historically corroded areas in an embodiment of the present invention.

[0059] Figure 3 This is a flowchart illustrating the steps for determining the extent of historical corrosion in an embodiment of the present invention.

[0060] Figure 4 This is a schematic diagram of the superpixel segmentation results of the historical corrosion area in an embodiment of the present invention;

[0061] Figure 5 This is a schematic diagram of the HSV of the historical corrosion area in an embodiment of the present invention;

[0062] Figure 6 This is a flowchart illustrating the steps for determining the rust remover requirement in historically rusted areas in an embodiment of the present invention.

[0063] Figure 7This is a schematic diagram of the rust removal dosage fitting curve in an embodiment of the present invention. Detailed Implementation

[0064] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the specific implementation methods, structures, features, and effects of the technical solution proposed according to the present invention are described in detail below with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0065] Unless otherwise defined, 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 pertains.

[0066] The application scenarios targeted by this invention can be:

[0067] In real-world corrosion environments, rust not only forms an oxide layer on the metal surface but can also penetrate along grain boundaries into the material, creating rust of a certain depth. Simultaneously, due to the propagation effect of electrochemical corrosion, the rusted area will continuously expand outwards. These factors significantly increase the actual amount of rust remover required, severely impacting the accuracy of traditional visual estimation methods. Consequently, large deviations in rust remover dosage estimations are frequently observed in practical applications.

[0068] Specifically, one embodiment of the present invention provides a method for identifying rusted areas on metal surfaces and estimating the amount of rust remover needed, such as... Figure 1 As shown, it includes the following steps:

[0069] S1, obtain each historical rusted area in several historical metal surface images, each current rusted area in the current metal surface image, and the actual amount of rust remover used in each historical rusted area.

[0070] Here, historical metal surface images are surface images of different metal parts to be rusted that were collected at past time points, while current metal surface images are surface images of metal parts to be rusted that were collected at the current time point; historical rust areas refer to the rust areas located in historical metal surface images, while current rust areas refer to the rust areas located in current metal surface images; actual rust remover dosage refers to the actual amount of rust remover used when treating historical rust areas.

[0071] In this embodiment, by acquiring each historical rusted area from several historical metal surface images, image analysis can be performed on each historical rusted area to determine the rust remover requirement of the historical rusted area; then, by utilizing the relationship between the rust remover requirement of the historical rusted area and the actual amount of rust remover used, the rust remover requirement of the current rusted area can be obtained, and the rust remover usage of the current rusted area can be estimated using the relationship between the rust remover requirement and the actual amount of rust remover used.

[0072] As an exemplary implementation, step S1 described above can be achieved through the following steps:

[0073] The first step is to acquire several historical images of the metal surface and the current image of the metal surface.

[0074] Specifically, in order to identify rusted areas on a metal surface and estimate the amount of rust remover used in those areas, it is necessary to acquire several historical and current images of the metal surface. These images can be obtained using a high-resolution digital camera, which ensures that clear and detailed rust images are captured.

[0075] In order to capture the details of rust on the metal surface, a camera capable of macro photography can be used for image acquisition; at the same time, soft light sources or ring light sources can be used to reduce the influence of shadows and ensure that the rusted areas in the image are clearly visible.

[0076] The second step is to obtain the actual amount of rust remover used in each historical rusted area, each current rusted area, and each historical rusted area.

[0077] First, obtain information on each historical corrosion area and each current corrosion area.

[0078] Specifically, Gaussian filtering is used to preprocess the historical and current metal surface images to obtain preprocessed historical and current metal surface images. Secondly, the RGB (red, green, blue) images are converted to HSV (hue, saturation, lightness) color space to obtain historical and current metal surface images in the HSV color space, allowing for better differentiation of rust colors. Then, local binary mode is used to obtain texture features in the metal surface images, as the texture of rusted areas is more complex. Next, based on color channel thresholds, possible regions are extracted, and non-rusted regions with similar colors are excluded from the possible regions by combining texture features, with the remaining possible regions serving as preliminary rusted regions. Finally, for the preliminary rusted regions, closing operations are used to connect regions, and opening operations are used to remove noise, thus obtaining each historical rusted region in the historical metal surface image and each current rusted region in the current metal surface image.

[0079] The image processing techniques used in the identification of rusted areas are all existing technologies and are not within the scope of protection of this invention, so they will not be described in detail here.

[0080] Secondly, obtain the actual amount of rust remover used in each historical rusted area.

[0081] After obtaining the historical rust areas, the dosage of 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 amount of rust remover used in each historical rust area.

[0082] It should be noted that the actual amount of rust remover used is determined based on the specific rust removal process of the affected area. Therefore, the actual amount of rust remover used is generally accurate and reliable.

[0083] Thus, this embodiment has obtained the basic data for image analysis, namely, each historical rusted area, each current rusted area, and the actual amount of rust remover used in each historical rusted area.

[0084] S2, based on the grayscale value of each pixel in each historical rust region, analyze the gradient change pattern and radial distribution characteristics of the historical rust region to determine the rust depth of each historical rust region.

[0085] Rust on a metal surface gradually spreads into the metal and further into the surface. The deeper the rust penetrates, the more severe the corrosion, requiring a larger dosage of rust remover. Therefore, it is necessary to analyze the rust depth of historical rust areas. Here, rust depth characterizes the severity of downward rust diffusion from historical rust areas and is one of the key calculation factors for subsequent analysis of the extent of diffusion in historical rust areas.

[0086] Existing methods for obtaining rust depth using ultrasonic technology face challenges. The rust itself may affect the penetration of ultrasonic waves, and the rust layer may be more fragile than uncorroded metal, making it difficult for ultrasonic signals to penetrate thicker rust layers and thus hindering the acquisition of accurate rust depth information. Therefore, this embodiment quantifies and analyzes rust depth using actual rust image features from different historical rust areas, rather than directly measuring rust depth using ultrasonic sampling.

[0087] 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 used as an example to determine the corrosion depth of the historical corrosion area.

[0088] As an exemplary implementation, the above-mentioned determination of the corrosion depth of historical corrosion areas can be achieved through... Figure 2 Steps S21 to S23 shown are implemented as follows:

[0089] S21, determine the gradient and gradient direction of each pixel in the neighborhood of each pixel based on the gray value of each pixel in the historical rust area.

[0090] In this embodiment, the neighborhood range specifically refers to the eight-neighbor range, and the grayscale value of the pixel can be obtained by performing grayscale processing on the historical rust area.

[0091] The processes of obtaining the grayscale value of a pixel and determining the gradient and gradient direction based on the grayscale value of the pixel are existing technologies and are not within the scope of protection of this invention. They will not be described in detail here.

[0092] S22: Based on the gradient and gradient direction of each pixel within its neighborhood, obtain the gradient change pattern index of each pixel.

[0093] Here, the gradient change law index refers to the stability of the gradient change of all pixels within the eight neighborhoods of a pixel and the consistency of the gradient direction. The gradient change law index is one of the key calculation factors for determining the corrosion depth.

[0094] As an exemplary implementation, step S22 described above can be achieved through the following sub-steps:

[0095] The first sub-step is to determine the gradient variance of all pixels in the neighborhood of each pixel based on the gradient of each pixel in the neighborhood of each pixel.

[0096] In this embodiment, the gradient variance can characterize the gradient change fluctuation of all pixels within the eight-neighborhood of a single pixel. The smaller the gradient variance, the stronger the stability of the gradient change of the corresponding pixel within the eight-neighborhood, that is, the stronger the regularity of the gradient change.

[0097] The second sub-step involves obtaining the unit vectors along the gradient direction of each pixel within its neighborhood, and using the sum of all unit vectors within the same neighborhood as the gradient change direction of the corresponding pixel.

[0098] In this embodiment, the more consistent the gradient directions of pixels within the eight-neighborhood of a pixel are, the larger the sum of the gradient directions.

[0099] The third sub-step involves obtaining the gradient change pattern index for each pixel based on the gradient variance and the magnitude of the gradient change direction corresponding to each pixel.

[0100] In this embodiment, the gradient variance and the gradient change law index are negatively correlated, that is, the larger the gradient variance, the smaller the gradient change law index; the magnitude of the gradient change direction and the gradient change law index are positively correlated, that is, the larger the magnitude of the gradient change direction, the larger the gradient change law index.

[0101] For example, the formula for calculating the gradient change index of the i-th pixel can be: In the formula, This represents the gradient change index of the i-th pixel, where th represents the hyperbolic tangent function, used to achieve normalization. The value is limited to between 0 and 1. This indicates the direction of gradient change corresponding to the i-th pixel. This represents the magnitude of the gradient change direction at the i-th pixel. This represents the modulo-length function. This represents the gradient variance corresponding to the i-th pixel.

[0102] In the calculation formula of the gradient change law index, The larger the value, the larger the magnitude of the gradient change direction of the i-th pixel and the smaller the gradient variance. This further indicates that the gradient directions of the surrounding pixels adjacent to the i-th pixel are more consistent and the gradient magnitudes are more similar. The stronger the regularity of the gradient change of the i-th pixel, that is, the larger the gradient change regularity index of the i-th pixel.

[0103] It should be noted that, under normal circumstances There is no possibility that the gradient variance is zero. However, if an extreme case exists, the gradient variance may be zero. If the value is zero, then add a non-zero constant to the denominator of the fraction. An empirical value of 0.01 can be used.

[0104] By referring to the calculation process of the gradient change pattern index of the i-th pixel, the gradient change pattern index of each pixel in the historical corrosion area can be obtained.

[0105] S23. Determine the corrosion depth of the historical corrosion area based on the gradient change pattern and coordinate position of each pixel in the historical corrosion area.

[0106] As an exemplary implementation, step S23 described above can be achieved through the following sub-steps:

[0107] The first sub-step is to determine the centroid pixel of the historical rust area, and to determine the first distance between each pixel in the historical rust area and the centroid pixel based on the coordinates of each pixel in the historical rust area and the centroid pixel.

[0108] In this embodiment, the first distance refers to the length of the line connecting each pixel in the historical corrosion area to the centroid pixel, which is used to distinguish the subsequent second distance. The smaller the first distance, the closer the pixel in the historical corrosion area is to the centroid pixel.

[0109] The second sub-step involves arranging the first distances of each pixel, using the arranged first distances as the horizontal axis and the gradient change pattern index as the vertical axis to construct a fitting curve, denoted as the regular distance fitting curve.

[0110] Here, the fluctuation of the gradient change index can be shown by fitting the regular distance curve.

[0111] 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 law index sequence corresponding to the first distance sequence is obtained. Based on the first distance sequence and the gradient change law index sequence, the first distance is used as the horizontal axis and the gradient change law index is used as the vertical axis to construct a fitting curve, which is denoted as the law distance fitting curve.

[0112] It should be noted that the first distance and gradient change pattern index of any data point in the regular distance fitting curve belong to the same pixel. In other words, the regular distance fitting curve is obtained by fitting the coordinate points composed of the first distance and gradient change pattern index of each pixel in the historical rust area.

[0113] The third sub-step involves determining the corrosion depth of the historical corrosion area based on the regular distance fitting curve and the gradient change pattern index of each pixel in the historical corrosion area.

[0114] Since rust on a metal surface is caused by metal oxidation, the volume of oxidized metal usually increases, leading to the compression of rusted parts. This results in an uneven, textured surface, and the more pronounced the unevenness, the greater the rust depth. Therefore, in this embodiment, the average gradient variation index of all pixels in the historical rust area is used as one of the key calculation factors for determining the rust depth.

[0115] As the rust depth increases, the overall gradient change in the rusted area decreases, and the rusted area exhibits a compressed, convex characteristic, making the internal texture changes more pronounced compared to the rust edge. Therefore, the gradient change of pixels within the rusted area decreases as the first distance decreases. Thus, in this embodiment, the average slope of the regular distance fitting curve is also used as one of the key calculation factors for determining the rust depth.

[0116] Specifically, the average slope of the fitted curve is calculated, and the average value of the gradient change pattern index for all pixels in the historical corrosion area is calculated. Based on the average slope and the average value of the gradient change pattern index, the corrosion depth of the historical corrosion area is determined. Notably, both the average slope and the average value of the gradient change pattern index are negatively correlated with the corrosion depth.

[0117] For example, the formula for calculating the corrosion depth of the j-th historical corrosion area can be: In the formula, Let represent the corrosion depth of the j-th historical corrosion region, and exp represent an exponential function with the natural constant e as the base. Used to perform normalization processing for negative correlation of data. This represents the average value of the gradient variation index for all pixels in the j-th historical corrosion region. This represents the average slope of the fitted curve for the regular distance of the j-th historical corrosion area.

[0118] In the formula for calculating corrosion depth, The smaller the value, the more irregular the overall gradient change of the j-th historical corrosion region is. Furthermore, the gradient change regularity index of the pixels in the j-th historical corrosion region increases with the increase of the first distance, indicating that the j-th historical corrosion region is squeezed more obviously and has more protruding parts. Therefore, the corrosion depth of the i-th historical corrosion region is greater.

[0119] Referring to the process for determining the corrosion depth of the j-th historical corrosion area, the corrosion depth of each historical corrosion area can be obtained.

[0120] Thus, this embodiment obtains one of the key calculation factors for determining the extent of diffusion of historical rust areas, namely the rust depth of each historical rust area.

[0121] S3. Analyze the obvious spread of historical rust areas to the surrounding areas based on the grayscale and hue values ​​of each pixel in each historical rust area, and determine the degree of diffusion of each historical rust area in combination with the rust depth.

[0122] Here, the degree of diffusion indicates the extent of rust spread in the historical rust area. The more severe the rust spread, the greater the demand for rust remover. The rust spread can be analyzed from two perspectives: the extent of outward and downward spread, which are also known as lateral and longitudinal spread. Rust depth can characterize the extent of downward spread in the historical rust area; therefore, it is necessary to analyze the extent of outward spread in the historical rust area to determine the degree of diffusion in the historical rust area.

[0123] In this embodiment, the degree of diffusion of each historical corrosion area is determined in the same way. For ease of description and understanding, any historical corrosion area is taken as an example to determine the degree of diffusion of the historical corrosion area.

[0124] As an exemplary implementation, the determination of the diffusion degree of historical rust areas can be achieved through... Figure 3 Steps S31 to S34 shown are implemented as follows:

[0125] S31, determine the first lateral spread factor of the historical corrosion area based on the gray value of each pixel in the historical corrosion area.

[0126] Here, the first lateral spread factor can characterize the extent of rust traces near the rust edge in the historical rust area. The less obvious the rust traces at the rust edge, the more severe the lateral spread in the historical rust area, and the larger the first lateral spread factor.

[0127] When rust spreads outwards from the rusted area, the rusting time at the edges is shorter than at the rusted center. Therefore, the rusted area will exhibit the characteristic of obvious rust marks at the rusted center and inconspicuous rust marks at the rusted edges.

[0128] As an exemplary implementation, step S31 described above can be achieved through the following sub-steps:

[0129] The first sub-step involves superpixel segmentation of the historical rust area to obtain several pixel clusters, and then obtaining the centroid pixel and grayscale mean of each pixel cluster.

[0130] In this embodiment, the superpixel segmentation process is existing technology and is not within the scope of protection of this invention; therefore, it will not be described in detail here. Pixel clusters, also known as pixel classification clusters, each have their corresponding centroid pixel and average grayscale value. The average grayscale value is obtained by calculating the average grayscale values ​​of all pixels in a single pixel cluster. A schematic diagram of the superpixel segmentation result for the historical rust region is shown below. Figure 4 As shown.

[0131] The second sub-step involves determining the second distance between the centroid pixel of each pixel cluster and the centroid pixel in the historical rust region, sorting all the second distances, and obtaining the sorted second distances.

[0132] In this embodiment, the centroid pixels of the pixel clusters are first connected to the centroid pixels in the historical corrosion area, and then the length of the connection is calculated, that is, the distance between the centroid pixels of the pixel clusters and the centroid pixels in the historical corrosion area is calculated, which is denoted as the second distance. Each pixel cluster has its corresponding second distance.

[0133] To analyze the distance of each pixel cluster from the center of the historical corrosion area, all the second distances are sorted in ascending order to obtain the sorted second distances.

[0134] The third sub-step involves using the sorted second distance as the horizontal axis and the grayscale mean as the vertical axis to construct a fitting curve, denoted as the grayscale distance fitting curve.

[0135] In this embodiment, the sorted second distances corresponding to all pixel clusters are used as the x-axis, and the average grayscale value of the pixel clusters corresponding to the sorted second distances is used as the y-axis to construct a fitting curve, denoted as the grayscale distance fitting curve. The grayscale distance fitting curve can represent the grayscale performance of pixel clusters as the second distance increases.

[0136] The fourth sub-step involves calculating the average slope of the grayscale distance fitting curve and using the average slope as the first lateral spread factor for the historical corrosion area.

[0137] In this embodiment, the average slope refers to the average of the slopes of all data points in the gray-scale distance fitting curve. The average slope can characterize the overall trend change of the gray-scale distance fitting curve. The larger the average slope, the larger the gray value of the pixel cluster with the larger second distance in the historical rust area, which is more in line with the characteristics of the horizontal spread of the historical rust area, that is, the characteristic that the rust traces at the rust edge are not obvious.

[0138] S32: Obtain the centroid pixel and each boundary pixel in the historical rust area. Starting from the centroid pixel, obtain several rays through each boundary pixel, which are denoted as extension lines.

[0139] Here, the boundary pixels can be pixels on the boundary of the historical rust area.

[0140] In this embodiment, the extension lines are obtained to facilitate the subsequent determination of the second lateral propagation factor. The starting point of each extension line in the historical corrosion area is the centroid pixel, and it passes through the boundary pixels. The extension length of the extension line can be equal to the length of the extension line inside the historical corrosion area.

[0141] It should be noted that the purpose of determining the extension line is to analyze whether there will be rust stains in the area surrounding the historical rust area. The extension line can obtain the rusted pixel part located in the historical rust area, as well as the non-rusted pixel part, i.e. the metal pixel part, in the area surrounding the historical rust area, which is helpful for subsequently determining the second lateral spread factor of the historical rust area.

[0142] S33, determine the second lateral spread factor of the historical corrosion area based on the hue value of each metal pixel on each extension line and the hue value of each rust pixel.

[0143] Here, the second lateral propagation factor refers to the degree of rust stains appearing on the outer part of the historically corroded area. As the corroded area spreads outward, rust stains may form on normal metal surfaces, making rust propagation more likely. Therefore, it is necessary to analyze whether rust stains appear on the outer part of the historically corroded area.

[0144] As the rusted area extends outwards, the protruding parts of the rusted area are affected by the rust spread, resulting in slight rust stains on the normal metal surface. The presence of rust stains indicates a strong rust spread effect in the historical rusted area, and the hue direction of the rust stains in the HSV space will have a high similarity to that of the rust. Therefore, this embodiment mainly analyzes the similarity between the hue of the metal pixels and the hue of the rust pixels on the extension line to quantify the second lateral spread factor of the historical rusted area.

[0145] As an exemplary implementation, step S33 described above can be achieved through the following sub-steps:

[0146] The first sub-step involves, for each extension line, recording the pixels located within the historical corrosion area on the extension line as corrosion pixels and recording the pixels that are not corrosion pixels on the extension line as metal pixels.

[0147] In this embodiment, after identifying the rusted pixels, it is necessary to obtain the number of rusted pixels on the extension line to facilitate subsequent determination of the distribution of rusted pixels on the extension line. The more rusted pixels distributed on the extension line, the greater the possibility of lateral rust propagation. Metal pixels are pixels on a normal metal surface, and the occurrence of rust stains on a normal metal surface can be analyzed through metal pixels.

[0148] The second sub-step is to calculate the average hue value of all rusted pixels on the extension line, which is recorded as the first hue average, and to calculate the average hue value of all metal pixels on the extension line, which is recorded as the second hue average.

[0149] In this embodiment, the hue performance of rust pixels on the extension line is analyzed using the first hue mean, and the hue performance of metallic pixels on the extension line is analyzed using the second hue mean. The HSV diagram of the historical rust area is shown below. Figure 5 As shown.

[0150] The third sub-step involves determining the second lateral propagation factor of the historical rust area based on the difference between the average first hue and the average second hue corresponding to each extension line, combined with the distribution of rust pixels on each extension line.

[0151] When analyzing the second lateral spread factor, the smaller the difference between the mean of the first hue and the mean of the second hue, 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 rusted pixels on the extension line, the less severe the rust on the extension line, and the less likely the lateral rust spread will occur.

[0152] Specifically, the absolute value of the difference between the mean value of the first hue and the mean value of the second hue corresponding to the same extension line is calculated to obtain the absolute value of the difference for each extension line; based on the absolute value of the difference for each extension line and the number of rusted pixels, the second lateral spread factor of the historical rusted area is determined; among them, 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.

[0153] For example, the formula for calculating the second lateral spread factor of the j-th historical corrosion region can be: In the formula, Let M represent the second lateral spread factor of the j-th historical corrosion region, and M represent the number of extension lines of the j-th historical corrosion region. This represents the number of rusted pixels on the m-th extension line of the j-th historical rust region. This represents the absolute value of the difference between the mean value of the first hue and the mean value of the second hue corresponding to the m-th extension line of the j-th historical corrosion area.

[0154] In the formula for calculating the second lateral spread factor, It can represent the hue similarity between metal pixels and rust pixels on the m-th extension line of the j-th historical rust region. The larger the value, the larger the second lateral spread factor of the j-th historical corrosion region; It can show the distribution of rust pixels on the m-th extension line of the j-th historical rust region. The larger the value, the larger the second lateral spread factor of the j-th historical corrosion area.

[0155] It should be noted that, under normal circumstances There is no possibility that the absolute value of the difference between the two hue means is zero. However, in extreme cases, the absolute value of the difference between the two hue means could be zero. If the value is zero, then add a non-zero constant to the denominator of the fraction. An empirical value of 0.01 can be used.

[0156] S34, by combining the first lateral spread factor, the second lateral spread factor, and the corrosion depth, the diffusion degree of the historical corrosion area is obtained.

[0157] 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 greater the first lateral spread factor, the second lateral spread factor, and the corrosion depth, the greater the degree of diffusion in the historical corrosion area.

[0158] For example, the formula for calculating the diffusion degree of the j-th historical corrosion area can be: In the formula, The degree of diffusion of the j-th historical corrosion region is represented by th, which represents the hyperbolic tangent function used for normalization. This represents the corrosion depth of the j-th historical corrosion area. This represents the first lateral spread factor of the j-th historical corrosion region. This represents the first lateral spread factor of the j-th historical corrosion region.

[0159] In the formula for calculating the degree of diffusion, the greater the rust depth, the greater the longitudinal extension of the historical extension area, i.e., the greater the longitudinal diffusion degree; the greater the first lateral diffusion factor, the less obvious the rust traces are closer to the rust edge in the historical rust area, resulting in a greater lateral diffusion degree; the greater 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, the greater the rust depth, the first lateral diffusion factor, and the second lateral diffusion factor of the historical rust area, the greater the diffusion degree of the corresponding historical rust area.

[0160] By referring to the formula for calculating the diffusion degree of the j-th historical corrosion area, the diffusion degree of each historical corrosion area can be obtained.

[0161] Thus, this embodiment obtains a quantitative indicator that can characterize the severity of corrosion in historically corroded areas, namely, the degree of diffusion.

[0162] S4. Analyze the complexity and structural density of the metal surface where the historical rusted area is located based on the gray value of each pixel in each historical rusted area, and determine the rust remover requirement for each historical rusted area by combining the diffusion degree.

[0163] Here, the rust remover demand refers to the amount of rust remover required when treating historically rusted areas. The higher the rust remover demand, the greater the amount of rust remover needed when treating historically rusted areas.

[0164] When analyzing the demand for rust removers, in addition to analyzing the rust spread in different historical rust areas, it was also analyzed whether the metal surface of the historically rusted areas would affect the rust removal effect. If the metal surface of the historically rusted areas easily affects the rust removal effect, the amount of rust remover should be increased, and the demand for rust remover will be greater in this case.

[0165] When the metal surface of a historically rusted area has a complex shape, gaps, or holes, some of the rust remover may penetrate into the historically rusted area during spraying. This results in a reduction in the amount of rust remover used on the historically rusted area of ​​the metal surface, and more rust remover may be needed to ensure thorough cleaning. When the rust products produced by metal rusting are loose and porous, the rust remover can penetrate to the bottom layer more easily, resulting in better rust removal. However, if the rust products are dense, the rust remover cannot penetrate into the rust layer well, thus requiring a larger dose of rust remover.

[0166] In this embodiment, the method for determining the rust remover requirement of each historical rusted area is the same. For ease of understanding and analysis, the rust remover requirement of any historical rusted area is determined as an example.

[0167] As an exemplary implementation, the determination of rust remover requirements for historically rusted areas can be achieved through... Figure 6 Steps S41 to S43 shown are implemented as follows:

[0168] S41. Determine the complexity of the metal surface where the historical rusted area is located based on the number of edges in the normal metal surface region within the minimum bounding rectangle of the historical rusted area and the mean gradient variance of all edges.

[0169] Here, the normal metal surface area refers to the area remaining in the smallest bounding 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 gradient variance of the edges, the greater the complexity of the metal surface where the historical rust area is located.

[0170] In this embodiment, when the metal surface structure is relatively complex, there will be more edges in the corresponding metal surface area and the gradient changes of more edges can be detected. Therefore, the product of the number of edges in the normal metal surface area and the mean of the gradient variance of all edges can be used as the complexity of the metal surface where the historical rust area is located.

[0171] The mean gradient variance is obtained by the gradient variance of all edges in the normal metal surface region within the minimum bounding rectangle of the historical rust region, while the gradient variance is obtained by the gradient of all edge pixels in a single edge.

[0172] S42, obtain the grayscale variance of each pixel cluster corresponding to the historical corrosion area, and determine the structural compactness of the historical corrosion area based on the grayscale variance of all pixel clusters.

[0173] Here, the gray-level variance of a pixel cluster can characterize the dispersion of gray-level values ​​of all pixels within a local region. The larger the gray-level variance, the more significant the difference in gray-level values ​​among the pixels within the corresponding pixel cluster, which can reflect the density of the corresponding pixel cluster. For example, a pixel cluster may contain rust holes, in which the difference in gray-level values ​​among the pixels is large, i.e., the gray-level variance is large, while the gray-level variance of a dense region tends to be 0.

[0174] 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 structure density, that is, the larger the grayscale variance, the smaller the structure density. Therefore, the average grayscale variance of all pixel clusters is calculated first, and then the reciprocal of the average grayscale variance is used as the structure density of the historical corrosion area.

[0175] S43. Determine the rust removal agent requirement for historically corroded areas based on the complexity of the metal surface where the historically corroded areas are located, the structural density of the historically corroded areas, and the degree of diffusion.

[0176] In this embodiment, the complexity, structural density, and diffusion degree of the metal surface where the historical rust area is located are all positively correlated with the demand for rust remover.

[0177] For example, the formula for calculating the rust remover requirement of the j-th historical rust area can be: In the formula, The rust remover requirement for the j-th historical rust zone is represented by th, where th represents the hyperbolic tangent function used for normalization. This indicates the degree of diffusion of the j-th historical corrosion area. This represents the complexity of the metal surface where the j-th historical corrosion region is located. This represents the average grayscale variance of all pixel clusters corresponding to the j-th historical corrosion region. This indicates the rust remover demand for the j-th historical rust area.

[0178] In the formula for calculating the rust remover requirement, The larger the value, the greater the severity of corrosion in the j-th historical corrosion area, indicating that the j-th historical corrosion area requires more rust remover. The larger the value, the greater the complexity of the metal surface in the j-th historical rust area and the denser the rust surface, making rust removal in the j-th historical rust area more difficult. Therefore, the j-th historical rust area requires more rust remover during rust removal treatment, hence the greater the demand for rust remover in the j-th historical rust area.

[0179] It should be noted that, under normal circumstances There is no possibility that the variance of the grayscale value is zero. However, in extreme cases, the average value of the grayscale variance may be zero. If the value is zero, then add a non-zero constant to the denominator of the fraction. An empirical value of 0.01 can be used.

[0180] Referring to the calculation process of the rust remover requirement for the j-th historical rusted area, the rust remover requirement for each historical rusted area can be obtained.

[0181] Thus, this embodiment has obtained the rust remover requirement for each historical rusted area in each historical metal surface image.

[0182] S5. Based on the rust remover demand of each current rusted area, the estimated rust remover dosage of each current rusted area is determined by fitting the rust remover dosage curve constructed from the actual rust remover dosage and rust remover demand of each historical rusted area.

[0183] Here, the estimated rust remover dosage refers to the estimated amount of rust remover needed for rust removal treatment of the current rusted area, obtained through speculation. The rust remover dosage fitting curve can show how the rust remover dosage changes as the demand for rust remover increases. The estimated rust remover dosage for the current rusted area can be obtained through the rust remover dosage fitting curve.

[0184] In this embodiment, the method for determining the estimated amount of rust remover for each current rusted area is the same. For ease of description and understanding, any current rusted area is taken as an example to determine the estimated amount of rust remover for the current rusted area.

[0185] As an exemplary implementation, the step of determining the estimated amount of rust remover needed for the current rusted area includes:

[0186] The first step is to determine the current rust removal agent requirement for the rusted area by referring to the process of determining the rust removal agent requirement for historical rusted areas.

[0187] The second step is to construct a rust removal dosage fitting curve based on the rust removal agent demand and actual rust removal agent usage in each historical rusted area.

[0188] Specifically, the demand for rust remover in all historically corroded areas is arranged in ascending order. The ordered demand is used as the horizontal axis, and the actual amount of rust remover used is used as the vertical axis. The actual amount of rust remover used is the dosage, and a rust removal dosage fitting curve is constructed. A schematic diagram of the rust removal dosage fitting curve is shown below. Figure 7 As shown.

[0189] The third step is to obtain the required amount of rust remover for the current rusted area from the rust removal dosage fitting curve, and use this as the estimated amount of rust remover needed for the current rusted area.

[0190] By referring to the process described above for determining the estimated amount of rust remover needed for the current rusted area, the estimated amount of rust remover needed for each current rusted area can be obtained.

[0191] After obtaining the estimated amount of rust remover needed 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 to remove rust.

[0192] In summary, this invention determines the rust remover demand by analyzing the rust diffusion characteristics of historical rusted areas and the rust removal effect on the metal surface where these areas are located. Combined with the actual rust remover usage in historical rusted areas, a relationship function is constructed between the rust remover demand and the actual rust remover usage. Therefore, given the rust remover demand for the current rusted area, the estimated rust remover usage for that area can be obtained using this relationship function. This invention, by determining a more comprehensive rust remover demand, helps improve the accuracy of the estimated rust remover usage for the current rusted area.

[0193] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and should all be included within 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 needed, characterized in that, Includes the following steps: Acquire each historical rusted area in several historical metal surface images, each current rusted area in the current metal surface image, and the actual amount of rust remover used in each historical rusted area; Based on the grayscale values ​​of each pixel in each historical rust region, the gradient variation pattern and radial distribution characteristics of the historical rust region are analyzed to determine the rust depth of each historical rust region. Based on the grayscale and hue values ​​of each pixel in each historical rust region, analyze the obvious spread of the historical rust region to the surrounding areas, and combine this with the rust depth to determine the degree of diffusion of each historical rust region. Based on the grayscale value of each pixel in each historical rust region, the complexity and structural density of the metal surface in which the historical rust region is located are analyzed. Combined with the diffusion degree, the rust remover requirement of each historical rust region is determined. Based on the rust remover demand of each current rusted area, the estimated rust remover dosage for each current rusted area is determined by constructing a rust remover dosage fitting curve using the actual rust remover dosage and the rust remover demand of each historical rusted area.

2. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover as described in claim 1, characterized in that, The step of analyzing the gradient variation characteristics and radial distribution features of each pixel in each historical rust region based on its grayscale value to determine the rust depth of each historical rust region includes: For each historical corrosion area, the gradient and gradient direction of each pixel in the neighborhood of each pixel are determined based on the gray value of each pixel in the historical corrosion area. Based on the gradient and gradient direction of each pixel within its neighborhood, an index of the gradient change pattern of each pixel is obtained. The corrosion depth of the historical corrosion area is determined based on the gradient change pattern and coordinate position of each pixel 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 pattern index of each pixel based on the gradient and gradient direction of each pixel within its neighborhood includes: Based on the gradients of each pixel within its neighborhood, determine the gradient variance of all pixels within the neighborhood of each pixel. Obtain the unit vectors in the gradient direction of each pixel within the neighborhood of each pixel, and use the sum of all unit vectors in the same neighborhood as the gradient change direction of the corresponding pixel. Based on the gradient variance and the magnitude of the gradient change direction corresponding to each pixel, the gradient change pattern index of each pixel is obtained. The gradient variance is negatively correlated with the gradient change law index, while the magnitude 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 as described in claim 2, characterized in that, The process of determining the corrosion depth of a historical corrosion area based on the gradient change pattern and coordinate position of each pixel in the historical corrosion area includes: Determine the centroid pixel of the historical corrosion area, and determine the first distance between each pixel in the historical corrosion area and the centroid pixel based on the coordinate positions of each pixel in the historical corrosion area and the centroid pixel. Arrange the first distance for each pixel, use the arranged first distance as the horizontal axis and the gradient change law index as the vertical axis to construct a fitting curve, which is denoted as the law distance fitting curve. Based on the regularity of the fitted curve and the gradient change pattern of each pixel in the historical rust area, the rust depth of the historical rust area is determined.

5. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover as described in claim 4, characterized in that, The step of determining the corrosion depth of the historical corrosion area based on the fitted curve and the gradient change index of each pixel in the historical corrosion area includes: Calculate the average slope of the fitted curve of the regularity, and calculate the average value of the gradient change regularity index of all pixels in the historical rust area; The corrosion depth of the historical corrosion area is determined based on the average slope and the average value of the gradient change law index. 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 as described in claim 1, characterized in that, The analysis of the extent of the spread of historical rust areas based on the grayscale and hue values ​​of each pixel in each historical rust area, combined with the rust depth, determines the degree of diffusion of each historical rust area, including: For each historical corrosion area, the first lateral spread factor of the historical corrosion area is determined based on the gray value of each pixel in the historical corrosion area; Obtain the centroid pixel and each boundary pixel in the historical corrosion area. Starting from the centroid pixel, obtain several rays through each boundary pixel, which are denoted as extension lines. The boundary pixels are the pixels on the boundary of the historical corrosion area. The second lateral spread factor of the historical corrosion area is determined based on the hue value of each metal pixel and the hue value of each rust pixel on each of the aforementioned extension lines. By performing a fusion analysis on the first lateral spread factor, the second lateral spread factor, and the corrosion depth, the degree of diffusion of the historical corrosion area is obtained. Among them, the first lateral spread factor, the second lateral spread factor, and the corrosion depth are all positively correlated with the degree of diffusion.

7. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover as described in claim 6, characterized in that, The step of determining the first lateral spread factor of the historical corrosion area based on the grayscale value of each pixel in the historical corrosion area includes: The historical rust area is segmented into several pixel clusters by superpixel segmentation, and then the centroid pixel and grayscale mean of each pixel cluster are obtained. Determine the second distance between the centroid pixel of each pixel cluster and the centroid pixel in the historical corrosion region, sort all the second distances, and obtain the sorted second distances; Using the second distance after sorting as the horizontal axis and the mean gray value as the vertical axis, construct a fitting curve, denoted as the gray-scale distance fitting curve. Calculate the average slope of the gray-scale distance fitting curve and use the average slope 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 as described in claim 6, characterized in that, The step of determining the second lateral propagation factor of the historical corrosion area based on the hue values ​​of each metal pixel on each of the extended lines and the hue values ​​of each rust pixel includes: For each extension line, the pixels located within the historical corrosion area on the extension line are recorded as corrosion pixels, and the pixels that are not corrosion pixels on the extension line are recorded as metal pixels. Calculate the average hue value of all rusted pixels on the extension line, and record it as the first hue average. Calculate the average hue value of all metallic pixels on the extension line, and record it as the second hue average. Based on the difference between the average first hue and the average second hue corresponding to each extension line, and combined with the distribution of rust pixels on each extension line, the second lateral propagation factor of the historical rust area is determined.

9. The method for identifying rusted areas on metal surfaces and estimating the amount of rust remover as described in claim 8, characterized in that, The step of determining the second lateral propagation factor of the historical corrosion area based on the difference between the average first hue and the average second hue corresponding to each extension line, combined with the distribution of rust pixels on each extension line, includes: Calculate the absolute value of the difference between the mean value of the first hue and the mean value of the second hue corresponding to the same extension line, and obtain the absolute value of the difference for each extension line; The second lateral propagation factor of the historical corrosion area is determined based on the absolute value of the difference between each extension line and the number of rusted pixels. 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.

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 process involves analyzing the grayscale values ​​of each pixel in each historical rust region to determine the complexity and structural density of the metal surface in which the historical rust region is located, and combining this with the degree of diffusion to determine the rust remover requirement for each historical rust region, 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 of 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 compactness of the historical rust area based on the grayscale variance of all pixel clusters. The rust removal agent requirement for the historical rust area is determined based on the complexity of the metal surface where the historical rust area is located, the structural density of the historical rust area, and the degree of diffusion. The complexity of the metal surface where the historical rust area is located, the density of the structure, and the degree of diffusion 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