A method, device, and medium for detecting corrosion defects in an alloy furnace tube

By analyzing abnormal pixels on the surface of alloy furnace tubes through image acquisition and grayscale processing, the problem of incomplete detection of corrosion area morphology in existing technologies is solved, and accurate classification and morphological recognition of corrosion areas in alloy furnace tubes are achieved.

CN120707549BActive Publication Date: 2026-02-10ZUORAN JINGJIANG EQUIP MFG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510887115.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2026-02-10
Estimated Expiration
2045-06-30

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively detect the morphology of corrosion zones in alloy furnace tubes, especially as they are insensitive to isolated point corrosion, leading to the neglect of its hazards.

Method used

By acquiring images and processing grayscale data, abnormal pixels on the surface of alloy furnace tubes are analyzed, and edge pixels, undetermined pixels, and isolated pixels are classified. Combined with gradient and window analysis, the morphology of corrosion areas is identified.

Benefits of technology

It enables effective detection of corrosion areas in alloy furnace tubes, distinguishing between circular concentrated corrosion, strip-shaped concentrated corrosion, circular isolated corrosion, and strip-shaped isolated corrosion, thus improving the accuracy and comprehensiveness of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707549B_ABST
    Figure CN120707549B_ABST
Patent Text Reader

Abstract

The application discloses a kind of alloy furnace tube corrosion defect detection method, equipment and medium, it is related to corrosion defect detection field, solve the problem that cannot effectively detect the existing form of corrosion area in alloy furnace tube, including the surface of standard alloy furnace tube and the surface of alloy furnace tube to be detected is carried out image acquisition, obtain standard image and initial image, standard image and initial image are carried out gray processing, and the abnormal pixel point in actual gray image is handled, the abnormal pixel point in actual gray image of alloy furnace tube to be detected is analyzed, and the edge pixel point and the pixel point to be determined in actual gray image are analyzed, the pixel point to be determined in actual gray image of alloy furnace tube to be detected is analyzed, and internal pixel point and isolated pixel point are obtained, corrosion area and corrosion form of alloy furnace tube to be detected are analyzed according to different pixel points in actual gray image, the effective detection of the existing form of corrosion area in alloy furnace tube is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of corrosion defect detection technology, specifically a method, equipment and medium for detecting corrosion defects in alloy furnace tubes. Background Technology

[0002] Alloy furnace tubes are tubular devices made of alloy materials and used in high-temperature, high-pressure, or special corrosive environments. They play an important role in industrial production. The materials of alloy furnace tubes are mainly metal alloys, and common alloy systems include: iron-based alloys, nickel-based alloys, and cobalt-based alloys. Alloy furnace tubes are important pipelines in corrosive environments, and their performance directly affects the safety and production efficiency of the equipment.

[0003] Existing technologies typically involve quality inspection of corrosion defects on the surface of alloy furnace tubes to determine the severity of corrosion. However, existing technologies lack analysis of the morphology of corrosion areas. For example, while the resistance probe method can detect uniform corrosion rates, it is not sensitive to localized corrosion such as isolated point corrosion and easily overlooks the existence of isolated point corrosion, thus ignoring the different hazards caused by isolated point corrosion and concentrated corrosion.

[0004] Therefore, this invention proposes a method, equipment, and medium for detecting corrosion defects in alloy furnace tubes. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the present invention aims to provide a method, equipment, and medium for detecting corrosion defects in alloy furnace tubes.

[0006] The technical problem to be solved by this invention is:

[0007] How to effectively detect the morphology of corrosion zones in alloy furnace tubes.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] Firstly, a method for detecting corrosion defects in alloy furnace tubes, the method comprising:

[0010] Step S1: Image acquisition is performed on the surface of the standard alloy furnace tube and the alloy furnace tube to be tested, and a standard image and an initial image are obtained.

[0011] Step S2: Perform grayscale processing on the standard image and the initial image to obtain abnormal pixels in the actual grayscale image;

[0012] Step S3: Analyze the abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected, and obtain the edge pixels and undetermined pixels in the actual grayscale image.

[0013] Step S4: Analyze the undetermined pixels in the actual grayscale image of the alloy furnace tube to be tested, and obtain the internal pixels and isolated pixels.

[0014] Step S5: Analyze the corrosion area and corrosion morphology of the alloy furnace tube to be tested based on different pixels in the actual grayscale image.

[0015] Furthermore, the processing in step S2 includes the following sub-steps:

[0016] Step S21: Perform grayscale processing on the standard image to obtain the standard grayscale image of the standard alloy furnace tube. Similarly, perform grayscale processing on the initial image to obtain the actual grayscale image of the alloy furnace tube to be tested.

[0017] Step S22: Obtain the initial grayscale value CSHi of each pixel in the standard grayscale image of the standard alloy furnace tube, where i = 1, 2, ..., n, n is a positive integer, and i is the number of each pixel in the standard grayscale image of the standard alloy furnace tube.

[0018] Step S23: Calculate the mode of the initial grayscale values ​​of all pixels in the standard grayscale image of the standard alloy furnace tube. At the same time, sum the initial grayscale values ​​of all pixels and take the average value to obtain the average grayscale value PJZ of all pixels in the standard grayscale image.

[0019] Step S24, using the formula The standard deviation BZC of the initial grayscale values ​​of all pixels in the standard grayscale image is calculated.

[0020] Furthermore, the processing in step S2 includes the following sub-steps:

[0021] Step S25: Subtract the standard deviation of the initial gray values ​​of all pixels from the mode of the initial gray values ​​of all pixels in the standard gray image to obtain the first value; add the mode of the initial gray values ​​of all pixels in the standard gray image to the standard deviation of the initial gray values ​​of all pixels to obtain the second value.

[0022] Step S26: Construct a standard grayscale range with the first value as the left endpoint and the second value as the right endpoint;

[0023] Step S27: Obtain the actual grayscale value of each pixel in the actual grayscale image of the alloy furnace tube to be tested, and compare the actual grayscale value of each pixel in the actual grayscale image of the alloy furnace tube to be tested with the standard grayscale range.

[0024] If any pixel in the actual grayscale image of the alloy furnace tube to be inspected does not have an actual grayscale value within the standard grayscale range, then the corresponding pixel will be recorded as an abnormal pixel in the actual grayscale image.

[0025] If the actual grayscale values ​​of all pixels in the actual grayscale image of the alloy furnace tube to be inspected are within the standard grayscale range, no operation will be performed.

[0026] Furthermore, the analysis process in step S3 includes the following sub-steps:

[0027] Step S31: Obtain all abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected, and construct a plane rectangular coordinate system with one end of the actual grayscale image as the x-axis and the other end of the actual grayscale image perpendicular to the x-axis as the y-axis.

[0028] Step S32: Obtain the coordinates of all abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected;

[0029] Step S33: Calculate the gradient magnitude of abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected;

[0030] Step S34: Compare the gradient magnitude of abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected with the gradient threshold.

[0031] If the gradient magnitude of an abnormal pixel is greater than or equal to the gradient threshold, then the corresponding abnormal pixel is recorded as an edge pixel.

[0032] If the gradient magnitude of an abnormal pixel is less than the gradient threshold, the corresponding abnormal pixel is recorded as a pixel to be determined.

[0033] Furthermore, the calculation process in step S33 is as follows:

[0034] Step S331: Select any abnormal pixel as the center of the window and establish a detection window of a fixed size;

[0035] Step S332: Obtain the actual gray values ​​of all pixels within the detection window centered on the abnormal pixel (X, Y) and construct a gray matrix I (X, Y).

[0036] Step S333, through formula The horizontal gradient TDS of the abnormal pixels in the horizontal direction was calculated;

[0037] Similarly, through the formula The vertical gradient TDC of the abnormal pixel is calculated.

[0038] Step S334, using the formula The gradient magnitude (TDF) of the corresponding abnormal pixel is calculated.

[0039] Furthermore, the analysis process in step S4 includes the following sub-steps:

[0040] Step S41: Record the detection window centered on the undetermined pixel as the detection window, and obtain the number of abnormal pixels in the detection window excluding the center of the window.

[0041] Step S42: If any abnormal pixel exists in the window to be detected except for the center of the window, then the corresponding undetermined pixel is recorded as an internal pixel.

[0042] If there are no abnormal pixels in the window to be detected except at the center of the window, then the size of the window to be detected is increased until any abnormal pixel exists in the window to be detected except at the center of the window.

[0043] Step S43: Record the enlarged window to be inspected as the improved window to be inspected, and obtain the actual size of the improved window to be inspected;

[0044] Step S44: Compare the actual size of the improved window to be inspected with the standard size;

[0045] If the actual size of the improved detection window is larger than the standard size, the corresponding undetermined pixel will be recorded as an isolated pixel.

[0046] If the actual size of the window to be detected is less than or equal to the standard size, then the corresponding undetermined pixel point is recorded as an internal pixel point.

[0047] Furthermore, the analysis process in step S5 is as follows:

[0048] Step S51: Divide the number of abnormal pixels by the total number of pixels in the actual grayscale image to obtain the proportion of abnormal pixels in the actual grayscale image.

[0049] Step S52: Compare the proportion of abnormal pixels in the actual grayscale image with the proportion threshold.

[0050] If the proportion of abnormal pixels in the actual grayscale image is greater than or equal to the proportion threshold, then the corresponding area of ​​the alloy furnace tube to be detected in the actual grayscale image is recorded as the corrosion area.

[0051] If the proportion of abnormal pixels in the actual grayscale image is less than the proportion threshold, the corresponding area of ​​the alloy furnace tube to be detected in the actual grayscale image is recorded as a corrosion risk area.

[0052] Step S53: Analyze the existing morphology of corrosion within the corrosion area.

[0053] Furthermore, the analysis process in step S53 is as follows:

[0054] Step S531: Obtain the number of edge pixels, internal pixels, and isolated pixels in the eroded region;

[0055] Step S532: Summing up the number of edge pixels, internal pixels, and isolated pixels in the eroded area to obtain the total number of abnormal pixels in the eroded area;

[0056] Step S533: Mark the edge pixels and the inner pixels as the region erosion pixels in the erosion region, and sum the number of edge pixels and the number of inner pixels to obtain the number of region erosion pixels in the erosion region.

[0057] Step S534: Divide the number of regional eroded pixels by the total number of abnormal pixels to obtain the proportion of regional eroded pixels in the eroded area.

[0058] Similarly, the proportion of isolated pixels in the eroded region is obtained by dividing the number of isolated pixels by the total number of abnormal pixels.

[0059] Step S535: Connect all edge pixels to form a complete defect contour, calculate the area of ​​the defect contour as the area MJ of the eroded region, and record the contour side length of the defect contour as the perimeter ZC of the eroded region.

[0060] Step S536, using the formula XZ=4π×(MJ / ZC) 2 The shape factor XZ of the corroded region is calculated, where π is the constant of pi.

[0061] Step S537: Compare the proportion of regional eroded pixels in the eroded area with the proportion of isolated pixels, and compare the shape factor of the eroded area with the standard range.

[0062] Step S538: If the proportion of regional eroded pixels in the eroded area is greater than or equal to the proportion of isolated pixels and the shape factor of the eroded area belongs to the standard range, then the corresponding eroded area is recorded as a circular concentrated eroded area.

[0063] If the proportion of regional eroded pixels in the eroded area is greater than or equal to the proportion of isolated pixels and the shape factor of the eroded area does not belong to the standard range, then the corresponding eroded area is recorded as a strip-shaped concentrated eroded area.

[0064] If the proportion of regional eroded pixels in the eroded area is less than the proportion of isolated pixels and the shape factor of the eroded area is within the standard range, then the corresponding eroded area is recorded as a circular isolated eroded area.

[0065] If the proportion of regional eroded pixels in the eroded area is less than the proportion of isolated pixels and the shape factor of the eroded area does not belong to the standard range, then the corresponding eroded area is recorded as a strip-shaped isolated eroded area.

[0066] Secondly, an electronic device, characterized in that the electronic device comprises:

[0067] A memory that stores a computer program;

[0068] The processor is communicatively connected to the memory. When the computer program is executed by the processor, it implements the method for detecting corrosion defects in alloy furnace tubes.

[0069] Thirdly, a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the aforementioned method for detecting corrosion defects in alloy furnace tubes.

[0070] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0071] 1. This invention first acquires images of the surfaces of a standard alloy furnace tube and the alloy furnace tube to be tested, obtaining a standard image and an initial image. Then, grayscale processing is performed on the standard image and the initial image to obtain abnormal pixels in the actual grayscale image. After that, the abnormal pixels in the actual grayscale image of the alloy furnace tube to be tested are analyzed to obtain edge pixels and undetermined pixels in the actual grayscale image. This invention achieves preliminary classification of pixels in the actual grayscale image.

[0072] 2. The present invention also analyzes the undetermined pixels in the actual grayscale image of the alloy furnace tube to be tested, and obtains internal pixels and isolated pixels through analysis. Finally, based on the different pixels in the actual grayscale image, the corrosion area and corrosion morphology of the alloy furnace tube to be tested are analyzed. The present invention realizes the effective detection of the existence morphology of corrosion area in alloy furnace tube. Attached Figure Description

[0073] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.

[0074] Figure 1 This is a flowchart of the method of the present invention;

[0075] Figure 2 This is a schematic diagram of abnormal pixels in the present invention;

[0076] Figure 3 This is a schematic diagram of the detection window in this invention;

[0077] Figure 4 This is a schematic diagram of the undetermined pixel points in this invention;

[0078] Figure 5 This is a schematic diagram of the electronic device in this invention. Detailed Implementation

[0079] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0080] Example 1: Please refer to Figures 1-4 As shown, the technical solution provided by this invention is: a method for detecting corrosion defects in alloy furnace tubes, the method being as follows:

[0081] Step S1: Image acquisition is performed on the surface of the standard alloy furnace tube and the alloy furnace tube to be tested, and a standard image and an initial image are obtained.

[0082] In this embodiment, the data acquisition process in step S1 is as follows:

[0083] Step S11: Use an image acquisition device to acquire an image of the surface of the standard alloy furnace tube, and obtain a standard image of the standard alloy furnace tube.

[0084] Step S12: The surface of the alloy furnace tube to be inspected is captured by an image acquisition device and recorded as the initial image of the alloy furnace tube to be inspected.

[0085] It should be noted that the standard alloy furnace tube is an alloy furnace tube that has not been corroded at the factory. The image acquisition equipment can be a high-resolution, low-noise camera equipped with a light source. When acquiring the standard image and the initial image, it is necessary to do so in a well-lit environment to reduce environmental errors caused by lighting. The standard image and the initial image are RGB images that have not undergone grayscale processing.

[0086] Step S2: Perform grayscale processing on the standard image and the initial image to obtain abnormal pixels in the actual grayscale image;

[0087] Furthermore, the processing in step S2 includes the following sub-steps:

[0088] Step S21: Perform grayscale processing on the standard image to obtain the standard grayscale image of the standard alloy furnace tube. Similarly, perform grayscale processing on the initial image to obtain the actual grayscale image of the alloy furnace tube to be tested.

[0089] Step S22: Obtain the initial grayscale value CSHi of each pixel in the standard grayscale image of the standard alloy furnace tube, where i = 1, 2, ..., n, n is a positive integer, and i is the number of each pixel in the standard grayscale image of the standard alloy furnace tube.

[0090] Step S23: Calculate the mode of the initial grayscale values ​​of all pixels in the standard grayscale image of the standard alloy furnace tube. At the same time, sum the initial grayscale values ​​of all pixels and take the average value to obtain the average grayscale value PJZ of all pixels in the standard grayscale image.

[0091] Step S24, using the formula Calculate the standard deviation BZC of the initial gray values ​​of all pixels in the standard grayscale image;

[0092] Step S25: Subtract the standard deviation of the initial gray values ​​of all pixels from the mode of the initial gray values ​​of all pixels in the standard gray image to obtain the first value; add the mode of the initial gray values ​​of all pixels in the standard gray image to the standard deviation of the initial gray values ​​of all pixels to obtain the second value.

[0093] Step S26: Construct a standard grayscale range with the first value as the left endpoint and the second value as the right endpoint;

[0094] Step S27: Obtain the actual grayscale value of each pixel in the actual grayscale image of the alloy furnace tube to be tested, and compare the actual grayscale value of each pixel in the actual grayscale image of the alloy furnace tube to be tested with the standard grayscale range.

[0095] If any pixel in the actual grayscale image of the alloy furnace tube to be inspected does not have an actual grayscale value within the standard grayscale range, then the corresponding pixel will be recorded as an abnormal pixel in the actual grayscale image.

[0096] If the actual grayscale values ​​of all pixels in the actual grayscale image of the alloy furnace tube to be inspected are within the standard grayscale range, no operation will be performed.

[0097] Step S3: Analyze the abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected, and obtain the edge pixels and undetermined pixels in the actual grayscale image.

[0098] In this embodiment, the analysis process in step S3 includes the following sub-steps:

[0099] Step S31: Obtain all abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected, and construct a plane rectangular coordinate system with one end of the actual grayscale image as the x-axis and the other end of the actual grayscale image perpendicular to the x-axis as the y-axis.

[0100] Step S32: Obtain the coordinates of all abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected;

[0101] Please refer to the following explanation: Figure 2As shown, each square unit in the actual grayscale image is a pixel, and the number inside the square unit is the actual grayscale value of the corresponding pixel. In this example, only the actual grayscale values ​​of some pixels are listed. The square units in the image with shaded areas are abnormal pixels. However, a square unit is a region in a Cartesian coordinate system, and it is not possible to use a single point coordinate to represent the position of the corresponding pixel in the Cartesian coordinate system. Therefore, in this embodiment, the position of the abnormal pixel in the image is recorded as the coordinate of the corresponding abnormal pixel. For example, if the abnormal pixel is located vertically to the 6th pixel from the origin and horizontally to the 1st pixel from the origin, then the coordinate of the corresponding abnormal pixel is (6, 1).

[0102] Step S33: Calculate the gradient magnitude of abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected;

[0103] The calculation process in step S33 is as follows:

[0104] Step S331: Select any abnormal pixel as the center of the window and establish a detection window of a fixed size;

[0105] For example, the abnormal pixel with coordinates (6, 1) is selected as the center of the window. In this embodiment, a detection window with a length and width of 3 pixels is established. It should be explained that the length and width of the detection window must be equal, that is, the shape of the detection window is square.

[0106] Please refer to the following explanation: Figure 3 As shown, when the x-coordinate or y-coordinate of an abnormal pixel is 1, that is, when the abnormal pixel is on the coordinate axis, if a 3×3 detection window is established with the abnormal pixel as the center of the window, there will be a region without pixels. At this time, the actual gray value of the corresponding region without pixels is set to the actual gray value of the adjacent pixel. For example, if a 3×3 detection window is established with the abnormal pixel (1,2) as the center of the window, there is a region without pixels to the left of the abnormal pixel (1,2). At this time, the actual gray value of the pixel adjacent to the left region is filled into the left region.

[0107] Step S332: Obtain the actual gray values ​​of all pixels within the detection window centered on the abnormal pixel (X, Y) and construct a gray matrix I (X, Y).

[0108] In this embodiment, the actual gray value of the abnormal pixel corresponding to the center of the detection window is taken as the center element of the gray matrix, and the actual gray value of the pixel in the first row and first column of the detection window is taken as the element in the first row and first column of the gray matrix. Similarly, the actual gray value of the pixel in the kth row and kth column of the detection window is taken as the element in the kth row and kth column of the gray matrix.

[0109] Step S333, through formula The horizontal gradient TDS of the abnormal pixels in the horizontal direction was calculated;

[0110] Similarly, through the formula The vertical gradient TDC of the abnormal pixel is calculated.

[0111] It should be explained that the horizontal and vertical gradients are calculated based on the actual gray values ​​of the outlier pixels, and obtained through weighted summation.

[0112] For example, a detection window is established with the abnormal pixel at coordinates (6, 1) as the center, and a grayscale matrix is ​​constructed based on the actual grayscale values ​​of each pixel within the detection window:

[0113] ;

[0114] The formula TDS is calculated as follows: TDS = [(-1)×10 + 0×25 + 1×15] + [(-2)×15 + 0×50 + 2×10] + [(-1)×10 + 0×20 + 1×15] = 0;

[0115] TDC=[(-1)×10+(-2)×25+(-1)×15]+(0×15+0×50+0×10)+(1×10+2×20+1×15)=-10;

[0116] Step S334, using the formula The gradient magnitude (TDF) of the corresponding abnormal pixel is calculated.

[0117] Step S34: Compare the gradient magnitude of abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected with the gradient threshold.

[0118] If the gradient magnitude of an abnormal pixel is greater than or equal to the gradient threshold, then the corresponding abnormal pixel is recorded as an edge pixel.

[0119] If the gradient magnitude of an abnormal pixel is less than the gradient threshold, the corresponding abnormal pixel is recorded as a pixel to be determined.

[0120] It should be explained that locations with larger gradient magnitudes indicate a significant difference in actual grayscale values ​​between the two sides of the corresponding location, possibly situated at the boundary between the normal and eroded areas. Conversely, locations with smaller gradient magnitudes indicate a smaller difference in actual grayscale values ​​between the two sides of the corresponding location. However, due to the presence of anomalous pixels, locations with smaller gradient magnitudes may be within the eroded area or isolated erosion within the normal area. For example... Figure 4If the gradient magnitude of an abnormal pixel within the left-hand detection window is 0, but the abnormal pixel is surrounded by normal pixels, then the abnormal pixel may be an isolated pixel within a normal region. Figure 4 The gradient magnitude of the abnormal pixel corresponding to the center of the window in the right detection window is not 0, but all the pixels in the center of the window are abnormal pixels. Therefore, the abnormal pixels may be internal pixels of the eroded area.

[0121] Step S4: Analyze the undetermined pixels in the actual grayscale image of the alloy furnace tube to be tested, and obtain the internal pixels and isolated pixels.

[0122] In this embodiment, the analysis process in step S4 includes the following sub-steps:

[0123] Step S41: Record the detection window centered on the undetermined pixel as the detection window, and obtain the number of abnormal pixels in the detection window excluding the center of the window.

[0124] Step S42: If any abnormal pixel exists in the window to be detected except for the center of the window, then the corresponding undetermined pixel is recorded as an internal pixel.

[0125] If there are no abnormal pixels in the window to be detected except at the center of the window, then the size of the window to be detected is increased until any abnormal pixel exists in the window to be detected except at the center of the window.

[0126] Step S43: Record the enlarged window to be inspected as the improved window to be inspected, and obtain the actual size of the improved window to be inspected;

[0127] It should be noted that each time the size of the window to be detected is increased, it must be increased to an odd number. For example, if the current size of the window to be detected is 3×3, then the size of the window to be detected must be increased to 5×5.

[0128] Step S44: Compare the actual size of the improved window to be inspected with the standard size;

[0129] If the actual size of the improved detection window is larger than the standard size, the corresponding undetermined pixel will be recorded as an isolated pixel.

[0130] If the actual size of the window to be detected is less than or equal to the standard size, then the corresponding undetermined pixel point is recorded as an internal pixel point.

[0131] It should be explained that the standard size can be obtained from the analysis of the historical corrosion of the alloy furnace tube. For example, if the corrosion area in the historical corrosion test of the alloy furnace tube is large, a larger standard size can be selected. If the corrosion area in the historical corrosion test of the alloy furnace tube is small, a smaller standard size can be selected.

[0132] Step S5: Analyze the corrosion area and corrosion morphology of the alloy furnace tube to be tested based on different pixels in the actual grayscale image.

[0133] The analysis process in step S5 is as follows:

[0134] Step S51: Divide the number of abnormal pixels by the total number of pixels in the actual grayscale image to obtain the proportion of abnormal pixels in the actual grayscale image.

[0135] Step S52: Compare the proportion of abnormal pixels in the actual grayscale image with the proportion threshold.

[0136] If the proportion of abnormal pixels in the actual grayscale image is greater than or equal to the proportion threshold, it indicates that the corresponding area of ​​the alloy furnace tube to be detected in the actual grayscale image is severely corroded. Therefore, the corresponding area of ​​the alloy furnace tube to be detected in the actual grayscale image is recorded as the corroded area.

[0137] If the proportion of abnormal pixels in the actual grayscale image is less than the proportion threshold, it indicates that the corresponding area of ​​the alloy furnace tube to be detected in the actual grayscale image has a corrosion risk. Therefore, the corresponding area of ​​the alloy furnace tube to be detected in the actual grayscale image is recorded as a corrosion risk area.

[0138] It should be explained that the ratio threshold is set by the user according to their own requirements for detection accuracy. The corrosion risk area is the area where there is a risk of corrosion. In specific implementation, the corrosion risk area needs to be continuously monitored or further treated.

[0139] Step S53: Analyze the morphology of corrosion within the corrosion area. The analysis process is as follows:

[0140] Step S531: Obtain the number of edge pixels, internal pixels, and isolated pixels in the eroded region;

[0141] Step S532: Summing up the number of edge pixels, internal pixels, and isolated pixels in the eroded area to obtain the total number of abnormal pixels in the eroded area;

[0142] Step S533: Mark the edge pixels and the inner pixels as the region erosion pixels in the erosion region, and sum the number of edge pixels and the number of inner pixels to obtain the number of region erosion pixels in the erosion region.

[0143] Step S534: Divide the number of regional eroded pixels by the total number of abnormal pixels to obtain the proportion of regional eroded pixels in the eroded area.

[0144] Similarly, the proportion of isolated pixels in the eroded region is obtained by dividing the number of isolated pixels by the total number of abnormal pixels.

[0145] Step S535: Connect all edge pixels to form a complete defect contour, calculate the area of ​​the defect contour as the area MJ of the eroded region, and record the contour side length of the defect contour as the perimeter ZC of the eroded region.

[0146] Step S536, using the formula XZ=4π×(MJ / ZC) 2 The shape factor XZ of the corroded region is calculated, where π is the constant of pi.

[0147] Step S537: Compare the proportion of regional eroded pixels in the eroded area with the proportion of isolated pixels, and compare the shape factor of the eroded area with the standard range.

[0148] Step S538: If the proportion of regional eroded pixels in the eroded area is greater than or equal to the proportion of isolated pixels and the shape factor of the eroded area is within the standard range, it indicates that the corresponding eroded area is mainly a concentrated contiguous area and the erosion shape is close to a circle. Then, the corresponding eroded area is recorded as a circular concentrated eroded area.

[0149] If the proportion of regional eroded pixels in the eroded area is greater than or equal to the proportion of isolated pixels and the shape factor of the eroded area does not belong to the standard range, it indicates that the corresponding eroded area is mainly a concentrated contiguous area and the erosion shape is close to strip-shaped. Then the corresponding eroded area is recorded as a strip-shaped concentrated eroded area.

[0150] If the proportion of regional eroded pixels in the eroded area is less than the proportion of isolated pixels and the shape factor of the eroded area is within the standard range, it means that the corresponding eroded area is mainly the erosion of different isolated areas and the erosion shape of the isolated areas is close to a circle. Then the corresponding eroded area is recorded as a circular isolated eroded area.

[0151] If the proportion of regional eroded pixels in the eroded area is less than the proportion of isolated pixels and the shape factor of the eroded area does not belong to the standard range, it means that the corresponding eroded area is mainly the erosion of different isolated areas and the erosion shape of the isolated areas is close to stripes. Then the corresponding eroded area is recorded as a strip-shaped isolated eroded area.

[0152] In practice, the standard range can be between 0.7 and 1.

[0153] In this application, if a corresponding calculation formula appears, the above calculation formula is a dimensionless calculation. The weighting coefficient, proportional coefficient and other coefficients in the formula are set to quantify each parameter to obtain a result value. The size of the weighting coefficient and proportional coefficient is only required to not affect the proportional relationship between the parameter and the result value.

[0154] Example 2: This embodiment of the invention also provides an electronic device for running the aforementioned method for detecting corrosion defects in alloy furnace tubes; see [link to example]. Figure 5 The schematic diagram of an electronic device provided by the embodiment of the present invention shown above includes a memory and a processor. The memory is used to store one or more computer instructions, which are executed by the processor to realize the above-mentioned method for detecting corrosion defects in alloy furnace tubes.

[0155] Furthermore, Figure 5 The electronic device shown also includes a communication bus and a communication interface, with the processor, communication interface and memory connected via the communication bus;

[0156] The memory may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc. The communication bus can be an ISA bus, PCI bus, or EISA bus, etc. The communication bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The symbol is represented by only one double-headed arrow, but this does not mean that there is only one communication bus or one type of communication bus.

[0157] The processor may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above methods can be completed by integrated logic circuits in the processor's hardware or by software instructions. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0158] Example 3: This embodiment of the invention also provides a computer storage medium that stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the above-mentioned method for detecting corrosion defects in alloy furnace tubes. For specific implementation, please refer to the method embodiment, which will not be repeated here.

[0159] The computer program product for detecting corrosion defects in alloy furnace tubes provided in this embodiment of the invention includes a computer storage medium storing program code. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0160] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and / or device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0161] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0162] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; 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 or all of the technical features; and these 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.

Claims

1. A method for detecting corrosion defects in alloy furnace tubes, characterized in that, The methods include: Step S1: Image acquisition is performed on the surface of the standard alloy furnace tube and the alloy furnace tube to be tested, and a standard image and an initial image are obtained. Step S2: Perform grayscale processing on the standard image and the initial image to obtain abnormal pixels in the actual grayscale image; Step S3: Analyze the abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected, and obtain the edge pixels and undetermined pixels in the actual grayscale image. The analysis process for edge pixels and undetermined pixels is as follows: the gradient magnitude of abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected is compared with the gradient threshold, and the abnormal pixels are divided into edge pixels or undetermined pixels according to the relationship between the gradient magnitude and the gradient threshold. Step S4: Analyze the undetermined pixels in the actual grayscale image of the alloy furnace tube to be detected, and obtain the internal pixels and isolated pixels. The analysis process for internal and isolated pixels is as follows: when there are abnormal pixels in the window to be detected except for the center of the window, the corresponding undetermined pixel is recorded as an internal pixel; when there are no abnormal pixels, the undetermined pixel is recorded as an isolated pixel or an internal pixel based on the size relationship between the actual size and the standard size of the window to be detected. Step S5: Analyze the corrosion area and corrosion morphology of the alloy furnace tube to be tested based on different pixels in the actual grayscale image. Different pixels in the actual grayscale image include edge pixels, internal pixels and isolated pixels. The analysis process of corrosion morphology is as follows: calculate the first proportion of the sum of the number of edge pixels and internal pixels divided by the total number of abnormal pixels, and the second proportion of the number of isolated pixels divided by the total number of abnormal pixels. Based on the comparison between the first and second proportions, and the shape of the corrosion region calculated from the area and perimeter of the corrosion region, the corrosion morphology is classified according to its relationship with the standard interval.

2. The method for detecting corrosion defects in alloy furnace tubes according to claim 1, characterized in that, The processing procedure in step S2 includes the following sub-steps: Step S21: Perform grayscale processing on the standard image to obtain the standard grayscale image of the standard alloy furnace tube. Similarly, perform grayscale processing on the initial image to obtain the actual grayscale image of the alloy furnace tube to be tested. Step S22: Obtain the initial grayscale value CSHi of each pixel in the standard grayscale image of the standard alloy furnace tube, where i = 1, 2, ..., n, n is a positive integer, and i is the number of each pixel in the standard grayscale image of the standard alloy furnace tube. Step S23: Calculate the mode of the initial grayscale values ​​of all pixels in the standard grayscale image of the standard alloy furnace tube. At the same time, sum the initial grayscale values ​​of all pixels and take the average value to obtain the average grayscale value PJZ of all pixels in the standard grayscale image. Step S24, using the formula The standard deviation BZC of the initial grayscale values ​​of all pixels in the standard grayscale image is calculated.

3. The method for detecting corrosion defects in alloy furnace tubes according to claim 2, characterized in that, The processing in step S2 also includes the following sub-steps: Step S25: Subtract the standard deviation of the initial gray values ​​of all pixels from the mode of the initial gray values ​​of all pixels in the standard gray image to obtain the first value; add the mode of the initial gray values ​​of all pixels in the standard gray image to the standard deviation of the initial gray values ​​of all pixels to obtain the second value. Step S26: Construct a standard grayscale range with the first value as the left endpoint and the second value as the right endpoint; Step S27: Obtain the actual grayscale value of each pixel in the actual grayscale image of the alloy furnace tube to be tested, and compare the actual grayscale value of each pixel in the actual grayscale image of the alloy furnace tube to be tested with the standard grayscale range. If any pixel in the actual grayscale image of the alloy furnace tube to be inspected does not have an actual grayscale value within the standard grayscale range, then the corresponding pixel will be recorded as an abnormal pixel in the actual grayscale image. If the actual grayscale values ​​of all pixels in the actual grayscale image of the alloy furnace tube to be inspected are within the standard grayscale range, no operation will be performed.

4. The method for detecting corrosion defects in alloy furnace tubes according to claim 3, characterized in that, The analysis process in step S3 includes the following sub-steps: Step S31: Obtain all abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected, and construct a plane rectangular coordinate system with one end of the actual grayscale image as the x-axis and the other end of the actual grayscale image perpendicular to the x-axis as the y-axis. Step S32: Obtain the coordinates of all abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected; Step S33: Calculate the gradient magnitude of abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected; Step S34: Compare the gradient magnitude of abnormal pixels in the actual grayscale image of the alloy furnace tube to be detected with the gradient threshold. If the gradient magnitude of an abnormal pixel is greater than or equal to the gradient threshold, then the corresponding abnormal pixel is recorded as an edge pixel. If the gradient magnitude of an abnormal pixel is less than the gradient threshold, the corresponding abnormal pixel is recorded as a pixel to be determined.

5. The method for detecting corrosion defects in alloy furnace tubes according to claim 4, characterized in that, The calculation process in step S33 is as follows: Step S331: Select any abnormal pixel as the center of the window and establish a detection window of a fixed size; Step S332: Obtain the actual gray values ​​of all pixels within the detection window centered on the abnormal pixel (X, Y) and construct a gray matrix I (X, Y). Step S333, through formula The horizontal gradient TDS of the abnormal pixels in the horizontal direction was calculated; Similarly, through the formula The vertical gradient TDC of the abnormal pixel is calculated. Step S334, using the formula The gradient magnitude (TDF) of the corresponding abnormal pixel is calculated.

6. The method for detecting corrosion defects in alloy furnace tubes according to claim 5, characterized in that, The analysis process in step S4 includes the following sub-steps: Step S41: Record the detection window centered on the undetermined pixel as the detection window, and obtain the number of abnormal pixels in the detection window excluding the center of the window. Step S42: If any abnormal pixel exists in the window to be detected except for the center of the window, then the corresponding undetermined pixel is recorded as an internal pixel. If there are no abnormal pixels in the window to be detected except at the center of the window, then the size of the window to be detected is increased until any abnormal pixel exists in the window to be detected except at the center of the window. Step S43: Record the enlarged window to be inspected as the improved window to be inspected, and obtain the actual size of the improved window to be inspected; Step S44: Compare the actual size of the improved window to be inspected with the standard size; If the actual size of the improved detection window is larger than the standard size, the corresponding undetermined pixel will be recorded as an isolated pixel. If the actual size of the window to be detected is less than or equal to the standard size, then the corresponding undetermined pixel point is recorded as an internal pixel point.

7. The method for detecting corrosion defects in alloy furnace tubes according to claim 6, characterized in that, The analysis process in step S5 is as follows: Step S51: Divide the number of abnormal pixels by the total number of pixels in the actual grayscale image to obtain the proportion of abnormal pixels in the actual grayscale image. Step S52: Compare the proportion of abnormal pixels in the actual grayscale image with the proportion threshold. If the proportion of abnormal pixels in the actual grayscale image is greater than or equal to the proportion threshold, the corresponding area of ​​the alloy furnace tube to be detected in the actual grayscale image is recorded as the corrosion area. If the proportion of abnormal pixels in the actual grayscale image is less than the proportion threshold, the corresponding area of ​​the alloy furnace tube to be detected in the actual grayscale image is recorded as a corrosion risk area. Step S53: Analyze the existing morphology of corrosion within the corrosion area.

8. The method for detecting corrosion defects in alloy furnace tubes according to claim 7, characterized in that, The analysis process in step S53 is as follows: Step S531: Obtain the number of edge pixels, internal pixels, and isolated pixels in the eroded region; Step S532: Summing up the number of edge pixels, internal pixels, and isolated pixels in the eroded area to obtain the total number of abnormal pixels in the eroded area; Step S533: Mark the edge pixels and the inner pixels as the region erosion pixels in the erosion region, and sum the number of edge pixels and the number of inner pixels to obtain the number of region erosion pixels in the erosion region. Step S534: Divide the number of regional eroded pixels by the total number of abnormal pixels to obtain the proportion of regional eroded pixels in the eroded area. Similarly, the proportion of isolated pixels in the eroded region is obtained by dividing the number of isolated pixels by the total number of abnormal pixels. Step S535: Connect all edge pixels to form a complete defect contour, calculate the area of ​​the defect contour as the area MJ of the eroded region, and record the contour side length of the defect contour as the perimeter ZC of the eroded region. Step S536, using the formula XZ=4π×(MJ / ZC) 2 The shape factor XZ of the corroded region is calculated, where π is the constant of pi. Step S537: Compare the proportion of regional eroded pixels in the eroded area with the proportion of isolated pixels, and compare the shape factor of the eroded area with the standard range. Step S538: If the proportion of regional eroded pixels in the eroded area is greater than or equal to the proportion of isolated pixels and the shape factor of the eroded area belongs to the standard range, then the corresponding eroded area is recorded as a circular concentrated eroded area. If the proportion of regional eroded pixels in the eroded area is greater than or equal to the proportion of isolated pixels and the shape factor of the eroded area does not belong to the standard range, then the corresponding eroded area is recorded as a strip-shaped concentrated eroded area. If the proportion of regional eroded pixels in the eroded area is less than the proportion of isolated pixels and the shape factor of the eroded area is within the standard range, then the corresponding eroded area is recorded as a circular isolated eroded area. If the proportion of regional eroded pixels in the eroded area is less than the proportion of isolated pixels and the shape factor of the eroded area does not belong to the standard range, then the corresponding eroded area is recorded as a strip-shaped isolated eroded area.

9. An electronic device, characterized in that, The electronic device includes: A memory that stores a computer program; A processor, communicatively connected to the memory, implements the method described in any one of claims 1-8 when the computer program is executed by the processor.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Aluminum pipe quality detection method

    CN114943739A

  • Alloy defect quantitative detection method based on data processing

    CN115272322A