Method, System and Storage Medium for Identifying Degree of Steel Corrosion

By comparing RGB values and calculating the difference value of each pixel point in the steel photo, identifying the corrosion points and quantifying the degree of corrosion, the problem of unquantitative uniform distribution of corrosion in the prior art is solved, and simple and accurate corrosion recognition is achieved.

CN114862754BActive Publication Date: 2025-07-29NANJING IRON & STEEL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210267466.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-18
Publication Date
2025-07-29
Estimated Expiration
2042-03-18

AI Technical Summary

Technical Problem

The existing steel corrosion image processing technology cannot effectively quantify the uniformly distributed corrosion degree, and the processing process is complicated.

Method used

By reading the RGB three-channel value of each pixel point in the steel photo, we judge whether the pixel point is the background point, and calculate the difference between Ri-Bi to identify the corrosion point. Combined with the critical value of the corrosion point, the corrosion percentage is calculated to quantify the corrosion degree.

Benefits of technology

It realizes the accurate quantification of uniformly distributed corrosion on the steel surface, the calculation process is simple and easy to implement, and is suitable for identification of corrosion area during transportation and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114862754B_ABST
    Figure CN114862754B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, a system and a storage medium for identifying the rusting degree of steel. The method comprises the following steps: S1: Read and record the RGB three-channel values of each pixel point in the steel photo; S2: Determine whether the pixel point is a background point. If so, increment the background point count \(n_b\) by 1 and jump to step S5; S3: Determine whether the values of the RGB three-channel values \(R_i\), \(G_i\) and \(B_i\) of the pixel point satisfy \(R_i>G_i>B\)
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of steel analysis and testing, and particularly relates to a method, system and storage medium for identifying the degree of steel corrosion. Background Art

[0002] During the storage and transportation of steel, surface corrosion will inevitably occur, and the corrosion may affect the use performance of steel to varying degrees according to its severity. Therefore, evaluating the degree of steel corrosion is of great significance for product quality control.

[0003] Image processing technology is an effective way to quantify the visual evaluation of the degree of steel corrosion. However, the existing image processing technology for steel corrosion can only process the analysis of the scattered corrosion area of steel, and cannot quantify the degree of corrosion of steel with a uniform corrosion area, and the processing technology is complex. Summary of the Invention

[0004] Object of the Invention: The object of the present invention is to propose a method for identifying the degree of steel corrosion, which can quantify the uniform corrosion on the surface of steel during storage or transportation, and the calculation amount in the processing process is simple and easy to implement.

[0005] Another object of the present invention is to propose a system for identifying the degree of steel corrosion capable of implementing the above method and a storage medium storing a computer program instantiating the above identification method.

[0006] Technical Solution: The method for identifying the degree of steel corrosion according to the present invention includes the following steps:

[0007] S1: Read and record the RGB three-channel values of each pixel point in the steel photo;

[0008] S2: Read a pixel point, determine whether the pixel point is a background point. If so, increment the background point count n b by 1, and jump to step S5;

[0009] S3: Determine whether the RGB three-channel values R i , G i and B i of this pixel point satisfy R i >G i >B i . If not, jump to step S5;

[0010] S4: Calculate the value b i of R i -B i of this pixel point. If b i is greater than the preset corrosion point critical value, increment the corrosion point count n r by 1;

[0011] S5: Determine whether all pixel points in the steel photo have been traversed. If not, read the next pixel point and return to step S3;

[0012] S6: Calculate the corrosion percentage of the steel as n r / (w × h – n b ), where w and h are the pixel width and pixel height of the steel photo respectively.

[0013] Further, the step S2 includes:

[0014] S2.1: Calculate the average value of the maximum and minimum values among the three RGB channel values R i , G i and B i of this pixel point.

[0015] S2.2: Determine whether this average value is within the preset background pixel range. If so, this pixel point is a background point, and the background point count n b is incremented by 1, and then jump to step S5.

[0016] Before the step S1, it further includes:

[0017] S1.1: Convert the steel photo to the RGB24 standard format.

[0018] Further, the corrosion point threshold value in the step S4 is 15.

[0019] Further, the background pixel range in the step S2.2 is less than 30 or greater than 254.

[0020] Further, after the step S6, it further includes:

[0021] S7: Classify the corrosion degree of the steel according to the corrosion percentage of the steel.

[0022] The steel corrosion degree identification system described in the present invention includes: an image acquisition and preprocessing module, which is used to acquire a steel photo and preprocess the steel photo to obtain the RGB three-channel values of each pixel point of the steel photo; a background point discrimination module, which is used to traverse each pixel point of the steel photo and determine whether the pixel point is a background point according to the RGB three-channel values of each pixel point; a corrosion point discrimination module, which is used to traverse each pixel point of the steel photo and discriminate whether the pixel point is a corrosion point according to the RGB three-channel values of each pixel point; a corrosion degree identification module, which is used to calculate the ratio of the corrosion points to the steel pixel points in each steel photo as the corrosion degree of the steel.

[0023] The storage medium described in the present invention stores a computer program, and the computer program is set to implement the above-mentioned method for identifying the degree of steel corrosion when executed.

[0024] Beneficial effects: Compared with the prior art, the present invention has the following advantages: 1. By traversing each pixel of the steel photo, it can identify the uniformly distributed corrosion on the surface of the steel during conventional transportation or storage. 2. The identification process only requires simple comparison and difference calculation of the RGB values of each pixel, and the data calculation and processing process is simple and easy to implement. Description of the drawings

[0025] Figure 1 It is a flowchart of the method for identifying the degree of steel corrosion in the embodiment of the present invention;

[0026] Figure 2 It is a statistical chart of the RGB distribution of pixel points of a typical corroded steel photo;

[0027] Figure 3 It is a scatter plot of the RGB of pixel points of a typical corroded steel photo;

[0028] Figure 4 It is Figure 3 The projection on the GB plane;

[0029] Figure 5 It is Figure 3 The projection on the RG plane;

[0030] Figure 6 It is a statistical chart of the RGB distribution of pixel points of a typical non-corroded steel photo;

[0031] Figure 7 It is a scatter plot of the RGB of pixel points of a typical non-corroded photo;

[0032] Figure 8 It is Figure 7 The projection on the GB plane;

[0033] Figure 9 It is Figure 7 The projection on the RG plane;

[0034] Figure 10 It is the statistical distribution of the R - B value of a typical corroded steel photo satisfying R > G > B;

[0035] Figure 11 It is the statistical distribution of the R - B value of a typical non-corroded steel photo satisfying R > G > B;

[0036] Figure 12 It is the original picture of the steel in Example 1;

[0037] Figure 13 It is The picture processed by the identification method of the embodiment of the present invention;

[0038] Figure 12 Is the original picture of the steel in Example 2;

[0039] Figure 14 Is Figure 15 The picture processed by the identification method of the embodiment of the present invention. Specific implementation manners

[0040] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0041] Refer to Figure 14 , according to the identification method of the steel corrosion degree of the embodiment of the present invention, the following steps are included:

[0042] S1: Read and record the RGB three-channel values of each pixel point in the steel photo;

[0043] S2: Judge whether the pixel point is a background point. If so, the background point count n b Is incremented by 1, and jump to step S5;

[0044] S3: Judge whether the RGB three-channel values R i , G i And B i Of satisfy R i > G i > B i . If not, jump to step S5;

[0045] S4: Calculate the value b i Of R i - B i . If b i Is greater than the preset critical value of the rust point, the rust point count n r Is incremented by 1;

[0046] S5: Judge whether all pixel points in the steel photo have been traversed. If not, read the next pixel point and return to step S3;

[0047] S6: Calculate the corrosion percentage of the steel as n r / (w × h – n b ), where w and h are the pixel width and pixel height of the steel photo respectively.

[0048] According to the identification method of the above technical solution, by only performing certain comparisons and difference calculations on the RGB three-channel components of each pixel point of the steel photo, it is possible to identify whether the pixel point is a rust point. The calculation process is simple, with a small amount of calculation and easy to implement. During conventional transportation and storage, the rust is more evenly distributed and cannot form a large connected rust area. However, in the identification method of the invention embodiment, since each pixel point of the steel photo is traversed and judged, and edge recognition is performed on the boundary of the rust area, and the area enclosed by the boundary is calculated as the rust area, it is more suitable for identifying the evenly distributed rust area generated during transportation or storage, and the identification result is more accurate.

[0049] Among them, the conditions for determining whether a pixel point is a rust point in step S3 and step S4 are obtained by summarizing through statistical analysis of multiple typical steel rust photos. As Figure 1 shown, the darkest column in the figure is the quantity distribution of the component values of the pixel points on the B channel in the typical rust steel photo, the lighter column represents the quantity distribution of the component values on the G channel, and the lightest column represents the numerical distribution of the component values on the R channel. It can be seen from the figure that the average value of the component values on R is the largest, followed by G, and the smallest is B.

[0050] For the RGB data of the pixels of the typical rust steel photo, scatter plots are drawn with the R, G, and B channel components as three-dimensional points. As Figure 2 shown, their projections on the GB plane and the RG plane are respectively as Figure 3 and Figure 4 shown. It can be seen from the figure that the vast majority of pixel points (statistically accounting for 99%) satisfy R > B > G (above the 45-degree line passing through the origin in the figure), so this condition can be used as one of the discrimination conditions.

[0051] For the pixel points of the typical non-rust steel photo, numerical statistical charts and scatter plots of the component values of the RGB channels are respectively drawn. As Figure 5 shown, it can be seen that there are obvious differences in the RGB distribution of non-rust pixel points and rust part pixel points. The R, G, and B distributions of non-rust pixel points basically coincide, but there are still some non-rust pixel points that satisfy the R > B > G condition. Therefore, this condition cannot be used as the only condition for judging rust.

[0052] From the comparison of the scatter plots of rust steel and non-rust steel, it can be seen that the scatter points of the non-rust part are more concentrated near the 45-degree line passing through the origin. Therefore, to further distinguish the color characteristics of rust and non-rust pixel points, the pixel points of rust steel and non-rust steel that satisfy the R > G > B condition are selected, and the distribution statistics of the difference between R - B of these pixel points are respectively performed. The statistical results are as Figures 6 to 9 and Figure 10As shown, the mean of the R-B distribution of the rusted part is about 50, and the mean of the R-B distribution of the non-rusted part is about 8. To quantitatively distinguish between the two, considering the peak widths of the two distributions, there is a critical point for the difference in R-B between rusted pixels and non-rusted pixels. In the statistics of this embodiment, the proportion of R-B < 15 in the rusted part is only 0.9%, and the proportion of R-B > 15 in the non-rusted part is only 4%, both of which can be ignored. Therefore, the critical value b of R-B c can preferably be 15. Under different steel types and different shooting conditions, there may be deviations in the critical values of the rusted part and the non-rusted part. The critical value b c can be adaptively selected according to the actual statistical results.

[0053] In practice, the pixel points in the steel photo can be judged by the voting of a set of weak classifiers trained with the prior knowledge of the steel pixel points, such as the boosting or random forest method. In actual implementation, a pure color formed by the three primary colors or a mixture of the three primary colors is usually used as the background. To further reduce the calculation amount, it can be judged whether a pixel is a background point by determining whether the mean of the maximum and minimum values of the RGB three-component values of the pixel point is close to 0 or 255, and a small number of background points in the steel photo can be identified.

[0054] In this embodiment, referring to the national standard GB / T 8923.1-2011 - Preparation of steel substrates before application of paints and related products - Visual assessment of surface cleanliness - Part 1: Rust grades and preparation grades of uncoated steel substrates and of steel substrates after total removal of previous coatings, the rust degree of the identified steel is classified. When the rust percentage is below 20%, it is Class 1, and the appearance feature of Class 1 is that the steel surface as a whole shows blackish blue. When it is between 20% and 40%, it is Class 2, and the appearance feature of Class 2 is that a certain degree of rust can be seen with the naked eye, but it still mainly shows blackish blue. When it is between 40% and 60%, it is Class 3, and the appearance feature of Class 3 is that the steel mainly shows yellowish brown, but blackish blue parts can still be observed. When it is above 60%, it is Class 4, and the appearance feature of Class 4 is that the steel surface as a whole shows yellowish brown.

[0055] Referring to Figure 11 and Figure 12 , in Example 1, the width of the steel bar photo is 1279 pixels and the height is 1706 pixels. First, the photo is converted to the RGB24 standard format, and then all pixel points in the picture are traversed. The average value m of the maximum and minimum values of the RGB component values of the pixel point i satisfies m i < 30 or m i > 254 are identified as background points. The rust point critical value b c is taken as 15. The background points and rust points in Figure 13 are represented by white and black respectively, and the background point count nb = 61696, the number of rust spots counted n r = 711000. The calculated rust percentage is 34%, and the rust classification is Class 2.

[0056] Refer to Figure 12 and Figure 14 , in Example 2, a photo with a more severe rusting degree was taken, with a width and height of 1279 pixels and 1706 pixels respectively. The selection of the threshold value during the identification process of background points and rust points is the same as that in Example 1. The background points and rust points are represented by white and black respectively in Figure 15 Figure 15 , the number of background points counted n b = 71539, the number of rust spots counted n r = 1702944. The calculated rust percentage is 81%, and the rust classification is Class 4.

[0057] The steel rust degree identification system of the embodiments of the present invention can implement the above identification method, including an image acquisition and preprocessing module, a background point discrimination module, a rust point discrimination module, and a rust degree identification module. Among them, the image acquisition and preprocessing module is used to acquire a steel photo and preprocess the steel photo to obtain the RGB three-channel values of each pixel point of the steel photo; the background point discrimination module is used to traverse each pixel point of the steel photo and determine whether the pixel point is a background point according to the RGB three-channel values of each pixel point; the rust point discrimination module is used to traverse each pixel point of the steel photo and determine whether the pixel point is a rust point according to the RGB three-channel values of each pixel point; the rust degree identification module is used to calculate the ratio of the rust points to the steel pixel points in each steel photo as the rust degree of the steel. The storage medium of the embodiments of the present invention stores a computer program instantiated with the above steel rust degree identification method.

Claims

1. A method for identifying the degree of corrosion of steel, characterized in that It includes the following steps: S1: Read and record the RGB three-channel values of each pixel point in the steel photo; S2: Read a pixel and determine whether the pixel is a background pixel. If so, increment the background pixel count n b by 1 and jump to step S5; S3: Determine whether the RGB triple values R i , G i and B i of this pixel satisfy R i > G i > B i . If not, jump to step S5; S4: Calculate the R value of this pixel point i -B i to obtain the value b i . If b i is greater than the preset critical value of the rust point, then increment the rust point count n r by 1; S5: Determine whether all pixel points in the steel photo have been traversed. If not, read the next pixel point and return to step S3; S6: Calculate the corrosion percentage of the steel as n r / (w × h – n b ), where w and h are the pixel width and pixel height of the steel photo respectively; The said step S2 includes: S2.1: Calculate the average value of the maximum and minimum values among the three RGB channel values R i , G i and B i of this pixel point; S2.2: Determine whether the average value is within a preset background pixel range. If so, the pixel is a background pixel, and the background pixel count n b is incremented by 1, and the process jumps to step S5.

2. The method for identifying the degree of corrosion of steel according to claim 1, characterized in that, Before the said step S1, it also includes: S1.1: Convert the steel photo into the RGB24 standard format.

3. The method for identifying the degree of steel corrosion according to claim 1, characterized in that, The rust point critical value in the said step S4 is 15.

4. The method for identifying the degree of steel corrosion according to claim 2, characterized in that, The background pixel range in the said step S2.2 is less than 30 or greater than 254.

5. The method for identifying the degree of steel corrosion according to claim 1, wherein, After the said step S6, it also includes: S7: Classify the rust degree of the steel according to the rust percentage of the steel.

6. A storage medium stores a computer program, characterized in that, The said computer program is set to implement the identification method of the rust degree of the steel according to any one of claims 1 to 5 when running.

7. An identification system for the identification method of the degree of steel corrosion according to any one of claims 1 to 5, characterized in that, It includes: An image acquisition and preprocessing module, which is used to acquire the steel photo and preprocess the steel photo to obtain the RGB three-channel values of each pixel point of the steel photo; Background point discrimination module, which is used to traverse each pixel point of the steel photo and determine whether the pixel point is a background point according to the RGB three-channel values of each pixel point; calculate the RGB three-channel value R of the pixel point i , G i and B i the average value of the maximum and minimum values among the three values; determine whether the average value is within the preset background pixel range, and if so, the pixel point is a background point; A rust point discrimination module, which is used to traverse each pixel point of the steel photo and determine whether the pixel point is a rust point according to the RGB three-channel values of each pixel point; A rust degree identification module, which is used to calculate the ratio of the rust points to the steel pixel points in each steel photo as the rust degree of the steel.

Citation Information

Patent Citations

  • Chroma deviation and brightness deviation combined video moving object detection method

    CN101098462A

  • Principal-component-analysis-based video image background detection method

    CN102509076A