A method for extracting defects from a penetrant testing image of a welded spherical tank connecting shell

By optimizing the coefficients of preliminary saliency values ​​of color and texture features in penetrant inspection images, the problem of distinguishing welds from real cracks is solved, achieving higher accuracy and reliability in defect detection.

CN120747485BActive Publication Date: 2025-11-07SHAANXI JINXIN ELECTRIC APPLIANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511196149.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-11-07
Estimated Expiration
2045-08-26

AI Technical Summary

Technical Problem

In existing technologies, algorithms based on saliency detection cannot effectively distinguish between welds and actual cracks, resulting in inaccurate defect detection results in penetrant testing images of welded spherical tank connections.

Method used

By calculating the color and texture features of the penetrant inspection image, a preliminary saliency value optimization coefficient is constructed. Combined with the saliency detection algorithm, weld seams and real cracks are distinguished, thereby improving the accuracy of defect extraction.

Benefits of technology

It significantly improves the accuracy and reliability of defect extraction, reduces the risk of missed and false detections, and effectively suppresses artifact interference in the weld area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120747485B_ABST
    Figure CN120747485B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, in particular to a defect extraction method for a welded spherical tank connecting shell penetration detection image, which comprises the following steps: collecting a welded spherical tank connecting shell penetration detection image, and preprocessing the penetration detection image; based on color features and texture features of the penetration detection image, calculating a preliminary saliency value optimization coefficient of each pixel point in the penetration detection image; according to the preliminary saliency value optimization coefficient and a preliminary saliency value of each pixel point obtained through a saliency detection algorithm, calculating a final saliency value of each pixel point; and according to the final saliency value, determining a crack defect area in the penetration detection image, so as to realize defect extraction of the welded spherical tank connecting shell penetration detection image. Through the technical scheme, color and texture features can be comprehensively analyzed, cracks and welds can be effectively distinguished, and the accuracy and reliability of defect detection can be significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a defect extraction method for a penetration detection image of a welded spherical tank connecting shell. BACKGROUND

[0002] The connecting shell is a weak link in the structure of the spherical tank, and the welding quality thereof will directly affect the service life and safety performance of the equipment. In the long-term use process, due to factors such as material fatigue or manufacturing defects, micro cracks are prone to occur at the welded joint, and if not found in time, the micro cracks may expand to cause equipment failure, and even cause catastrophic accidents. The penetration detection is a non-destructive testing technology widely used for detecting surface open defects of metal materials. Through applying a liquid with high permeability on the surface of the component, the liquid penetrates into the surface cracks, and after removing the excess penetrant, the capillary action of the developer is used to absorb the penetrant in the cracks to the surface, thereby forming an amplified defect indication with a clear contrast with the background color, so that the micro cracks become visible.

[0003] At present, the computer vision technology is generally used to analyze the image formed after the penetration detection in the prior art. Among them, the saliency detection algorithm, such as the frequency-tuned saliency detection (FT) algorithm, is applied to defect recognition because it can quickly locate the most noticeable area in the image. The core idea of the FT algorithm is to quantify the saliency of each pixel point on the image in the Lab color space by calculating the Euclidean distance between the color value of the pixel point and the average color value of the entire image. The area with a higher saliency value is more likely to be identified as a target defect.

[0004] However, due to the high temperature effect in the welding process, the surface metallographic structure and roughness of the weld area are different from those of the base material, and part of the penetrant and developer may also be adsorbed and retained, thereby forming a strip-shaped area with a higher color contrast in the image. At this time, the saliency value of the pixel point in the weld area may be very close to that of the real crack defect area, which causes the traditional algorithm to be unable to effectively distinguish between the two, resulting in a large number of false defects, i.e., the problem of misjudging the intact weld area as a crack defect. SUMMARY

[0005] In order to solve the technical problem that the algorithm based on saliency detection in the prior art cannot effectively distinguish between the weld and the real crack, thereby causing the defect detection result to be inaccurate, the present application provides a defect extraction method for a penetration detection image of a welded spherical tank connecting shell, which can significantly improve the accuracy and reliability of defect extraction.

[0006] The application provides a defect extraction method for a welded spherical tank connecting shell penetration detection image, and the method comprises the following steps: collecting a welded spherical tank connecting shell penetration detection image, and preprocessing the penetration detection image; calculating a preliminary saliency value optimization coefficient of each pixel point in the penetration detection image based on color features and texture features of the penetration detection image; calculating a final saliency value of each pixel point according to the preliminary saliency value optimization coefficient and a preliminary saliency value of each pixel point obtained through a saliency detection algorithm; and determining a crack defect region in the penetration detection image according to the final saliency value, so as to realize defect extraction of the welded spherical tank connecting shell penetration detection image.

[0007] The application can correct the traditional saliency detection result by calculating the preliminary saliency value optimization coefficient, effectively distinguish the real crack region and the weld region which have similar color features but different texture features, thereby inhibiting the saliency of the weld region and enhancing the saliency of the crack region, and significantly improving the accuracy and reliability of defect extraction.

[0008] In one embodiment, the calculation of the preliminary saliency value optimization coefficient of each pixel point in the penetration detection image comprises: calculating a color saliency factor of each pixel point according to the difference between the RGB channel value of each pixel point and the mean value of the RGB channel value of all pixel points in the image, and the sum of the RGB three channel values of each pixel point; and calculating the preliminary saliency value optimization coefficient of each pixel point according to the texture feature of each pixel point in the grayscale image and the color saliency factor.

[0009] By step-by-step calculation of color features and texture features, the pixel points that may be defects in color are preliminarily screened out through the color saliency factor, and then further confirmed through the texture feature, so that the possibility of each pixel point belonging to a real defect can be more accurately evaluated.

[0010] In one embodiment, the color saliency factor satisfies the following relationship: ; in the formula the color saliency factor of the i-th pixel point is denoted as , , the absolute value of the difference between the R channel value, the G channel value and the B channel value of the i-th pixel point and the mean value of the R channel value, the G channel value and the B channel value of all pixel points in the image is respectively denoted as the sum of the R, G and B three channel values of the i-th pixel point is denoted as is a hyperparameter, which is used to prevent the value of from being 0, is a normalization function.

[0011] By comprehensively considering the difference between the color of the pixel point and the background color and the brightness of the pixel point itself, the bright color formed by the developing agent can be effectively highlighted, the interference of the dark noise points is inhibited, and the sensitivity to the color features of potential defects is improved.

[0012] In one embodiment, the preliminary saliency optimization coefficient of each pixel point is calculated according to the texture features of each pixel point in the grayscale image and the color highlighting factor, comprising: performing grayscale processing on the penetration detection image, and obtaining edge pixel points by using an edge detection operator; constructing a reference region with each pixel point as the center, and obtaining chain code values of edge pixel points in each reference region by using chain code technology; and calculating the preliminary saliency optimization coefficient of each pixel point according to the chain code value variation, the gradient amplitude range of edge pixel points in each reference region and the color highlighting factor.

[0013] By analyzing the chain code value variation and the gradient amplitude range of the edge pixel points, the morphological features of the defects can be accurately described from the texture level, and a quantitative basis is provided for distinguishing linear cracks from strip-shaped welds.

[0014] In one embodiment, the preliminary saliency optimization coefficient satisfies the relationship: ; in the formula the preliminary saliency optimization coefficient of the i-th pixel point, the color highlighting factor of the i-th pixel point, the number of edge pixel points in a reference region of a pixel point, the average value of the absolute value of the difference in chain code values between the u-th edge pixel point in the reference region of the i-th pixel point and its adjacent two edge pixel points, the range of the gradient amplitude of all edge pixel points in the reference region of the i-th pixel point, the value range adjustment coefficient of the preliminary saliency optimization coefficient of a pixel point.

[0015] By fusing the color and texture information dimensions, the enhancement effect on crack pixel points can be greatly improved while suppressing weld pixel points.

[0016] In one embodiment, the final saliency value satisfies the relationship: ; in the formula the final saliency value of the i-th pixel point, the preliminary saliency optimization coefficient of the i-th pixel point, the preliminary saliency value of the i-th pixel point.

[0017] By multiplying the preliminary saliency value by the optimization coefficient, the saliency value of the real defect region is enhanced, while the saliency value of the non-defect region is inhibited, and the signal-to-noise ratio of the final defect map is directly improved.

[0018] In one embodiment, the process of determining the crack defect region in the penetrant detection image according to the final saliency value is to traverse each pixel point in the penetrant detection image, and if the final saliency value of the pixel point is greater than a preset judgment threshold, it is determined that the pixel point belongs to a defect pixel point in the crack defect region.

[0019] In one embodiment, the pre-processing manner of the penetrant detection image is to convert the penetrant detection image from an RGB color space to a Lab color space, and to obtain a gray image by performing a gray processing on the penetrant detection image.

[0020] The technical solution of the present application has the following beneficial technical effects:

[0021] The present application can preliminarily lock the color abnormal region by constructing the color saliency factor, and can accurately distinguish the slender crack and the wide weld by analyzing the chain code and gradient features of the local edge to construct the preliminary saliency value optimization coefficient. Finally, by applying the optimization coefficient to the original preliminary saliency value to generate the final saliency value map, the saliency difference between the real crack and the weld interference region is effectively widened.

[0022] Further, the false interference of the weld region in the penetrant detection image can be effectively suppressed, and the saliency of the real crack defect can be enhanced, thereby significantly improving the accuracy and robustness of defect extraction and reducing the risk of missed detection and false detection. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 is a flowchart of a defect extraction method of a penetrant detection image of a welded spherical tank connecting shell according to an embodiment of the present application.

[0024] Figure 2 is a gray image corresponding to the original penetrant detection image according to an embodiment of the present application.

[0025] Figure 3 is a visualized schematic diagram of a color saliency factor calculated according to an embodiment of the present application.

[0026] Figure 4 is a visualized schematic diagram of a preliminary saliency value optimization coefficient calculated according to an embodiment of the present application.

[0027] Figure 5 is a visualized schematic diagram of a preliminary saliency value obtained according to an embodiment of the present application.

[0028] Figure 6 is a visualized schematic diagram of a final saliency value calculated according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application.

[0030] Figure 1 is a flowchart of a defect extraction method of a welded spherical tank connecting shell penetration detection image according to an embodiment of the present application. As shown in Figure 1 , the defect extraction method of the welded spherical tank connecting shell penetration detection image includes steps S101 to S104, which are described in detail below.

[0031] S101, collect the penetration detection image of the welded spherical tank connecting shell, and pre-process the penetration detection image.

[0032] In one embodiment, first, an industrial camera or a high-definition camera is used to shoot the surface of the welded spherical tank connecting shell after the penetration detection process (i.e. after coating the penetrant, cleaning, and coating the developer), to obtain the original RGB color image. The collected image contains the background, the weld, and the possible crack defects displayed by the developer.

[0033] In this optional embodiment, the collected original image can be pre-processed, which includes two parallel operations, including:

[0034] The original RGB image is converted to the Lab color space, which is more consistent with the visual perception of the human eye than the RGB color space. The L component represents the brightness, and the a and b components represent the color. This step is mainly to prepare for subsequent calculation of the preliminary saliency value of each pixel point using the saliency detection FT algorithm; and the original RGB image is grayed to obtain a gray image, as shown in Figure 2 . The gray image retains the brightness and texture information of the image, which is used for subsequent analysis of the texture features in the reference area of each pixel point.

[0035] In this way, by pre-processing the original image, the image data in different color spaces required for subsequent color analysis and texture analysis is obtained, providing data support for subsequent calculation.

[0036] S102, based on the color features and texture features of the penetration detection image, calculate the preliminary saliency value optimization coefficient of each pixel point in the penetration detection image.

[0037] In one embodiment, the color prominence factor of each pixel can be obtained by analyzing the RGB numerical characteristics of each pixel. Specifically, in penetrant testing, cracks and defects are typically marked with bright colors, such as red or yellow-green developers. However, most areas of the spherical tank shell surface are relatively uniform in color. Therefore, if a pixel belongs to a crack, its color should differ significantly from the overall background color of the image, and its brightness should be high to distinguish it from dark noise. The color prominence factor satisfies the following relationship:

[0038]

[0039] In the formula This represents the color highlighting factor of the i-th pixel. , , Let represent the absolute values ​​of the differences between the R-channel value, G-channel value, and B-channel value of the i-th pixel and the mean R-channel value, mean G-channel value, and mean B-channel value of all pixels in the image, respectively. This represents the sum of the R, G, and B channel values ​​of the i-th pixel. For example, hyperparameters. Its existence is to prevent The case where the value is 0 occurs. This is the normalization function.

[0040] Furthermore, in the formula The larger the value, the greater the probability that the color of the i-th pixel is a bright red or a vivid yellow-green under the action of the developer, and the larger the corresponding color prominence factor. In the formula... The larger the value, the less likely the i-th pixel is to be black, and the greater the likelihood that the i-th pixel is to be a bright red or a vivid yellow-green under the action of the developer. The larger the value, the greater the confidence that the i-th pixel is to be a bright red or a bright yellow-green under the action of the developer. The larger the corresponding color prominence factor, the greater the confidence.

[0041] In this optional embodiment, such as Figure 3 The diagram shown is a visualization of the color highlighting factor calculated according to an embodiment of this application, in which both crack and weld areas are highlighted, but the crack area is brighter.

[0042] In an optional embodiment, the texture features of each pixel in the grayscale image can be analyzed, and a preliminary saliency value optimization coefficient can be calculated by combining the color prominence factor. Specifically, although the color prominence factor can mark areas of color abnormality, it still cannot distinguish between cracks and welds. The typical texture of a crack is a thin line with sharp edges and an approximately straight direction; while the texture of a weld is a wide band with relatively blurred edges and a smooth curve.

[0043] Further, the obtained gray-scale image can be subjected to edge detection using a Canny operator to extract all edge pixel points in the image. Then, for each pixel point in the image, a neighborhood of, for example, 9x9 size is defined as the reference region of the pixel point.

[0044] Next, for each reference region, the texture features of the edge pixel points inside the reference region are analyzed. On the one hand, the straightness of the edge is analyzed. If there is an edge in the reference region, the 8-neighborhood chain code technique is used to encode each independent edge line segment. The chain code uses the numbers 0-7 to represent the 8 possible directions from the current pixel to the next adjacent edge pixel. The chain code value sequence of a straight line segment changes very little, for example, 0, 0, 0, 1, 0..., while the chain code value sequence of a curved line changes greatly, for example, 0, 1, 2, 2, 3.... By calculating the change amount of the chain code of all edge pixel points in the reference region and the chain code of the adjacent edge pixel points, the straightness of the edge can be evaluated.

[0045] On the other hand, the sharpness of the edge is analyzed. In the intermediate step of the Canny operator, the gradient amplitude of each pixel point can be obtained. The edge of a real crack has a sharp gray-scale change, and its gradient amplitude is large and has a wide range of variation. The edge of a weld, on the other hand, is relatively flat, and its gradient amplitude is small and has a narrow range of variation. Therefore, by calculating the range (i.e., the maximum value minus the minimum value) of the gradient amplitudes of all edge pixel points in the reference region, the sharpness of the edge can be evaluated.

[0046] In the optional embodiment, the preliminary saliency optimization coefficient satisfies the relationship:

[0047]

[0048] wherein represents the preliminary saliency optimization coefficient of the i-th pixel point, represents the color saliency factor of the i-th pixel point, represents the number of edge pixel points in the reference region of a pixel point, represents the average value of the absolute values of the differences in chain code values between the u-th edge pixel point and its adjacent two edge pixel points in the reference region of the i-th pixel point (if an edge pixel point is located at the two end points of a chain code, there will be only one adjacent edge pixel point, in which case represents the absolute value of the difference in chain code values between the u-th edge pixel point and its adjacent edge pixel point in the reference region of the i-th pixel point; represents the range of the gradient amplitudes of all edge pixel points in the reference region of the i-th pixel point, is a value range adjustment coefficient of the preliminary saliency optimization coefficient of a pixel point, and is, for example, Finally, the value range of the preliminary saliency value optimization coefficient of a pixel point is adjusted to the interval .

[0049] Further, in the formula The greater the value is, the greater the possibility that the i-th pixel point belongs to the potential crack defect region is based on the RGB value feature analysis. In order to more accurately classify the pixel point to the potential crack defect region on the surface of the welded spherical tank connecting shell, the final saliency value of the i-th pixel point needs to be greater, so the preliminary saliency value optimization coefficient of the i-th pixel point needs to be greater. In the formula The smaller the value is, the greater the possibility that the edge pixel point in the reference region of the i-th pixel point belongs to the potential crack defect region is. In order to more accurately classify the pixel point to the potential crack defect region on the surface of the welded spherical tank connecting shell, the final saliency value of the i-th pixel point needs to be greater, so the preliminary saliency value optimization coefficient of the i-th pixel point needs to be greater. In the formula The greater the value is, the greater the possibility that the edge pixel point in the reference region of the i-th pixel point belongs to the potential crack defect region is. In order to more accurately classify the pixel point to the potential crack defect region on the surface of the welded spherical tank connecting shell, the preliminary saliency value optimization coefficient of the i-th pixel point also needs to be greater.

[0050] In the optional embodiment, as shown in FIG. 6, a visual diagram of the preliminary saliency value optimization coefficient calculated according to the embodiment of the present application can be seen. Only the crack region is displayed, and the weld region is effectively suppressed. Figure 4

[0051] In this way, by calculating the color saliency factor, the potential defect region can be preliminarily enhanced from the color dimension, and by calculating the preliminary saliency value optimization coefficient by combining the color and texture information, a spatial weight map that can accurately reflect the possibility that a pixel point belongs to a real crack can be generated.

[0052] S103, the final saliency value of each pixel point is calculated according to the preliminary saliency value optimization coefficient and the preliminary saliency value of each pixel point obtained by the saliency detection algorithm:

[0053] In an optional embodiment, the greater the preliminary saliency value optimization coefficient of each pixel point is, the greater the possibility that the pixel point belongs to the potential crack defect region on the surface of the welded spherical tank connecting shell is. In order to more accurately classify the pixel point to the potential crack defect region on the surface of the welded spherical tank connecting shell, the final saliency value of the pixel point needs to be greater, so the final saliency value of the pixel point after optimization should be greater. Based on this, the final saliency value of the pixel point satisfies the relationship formula:

[0054]

[0055] wherein represents the final saliency value of the i-th pixel point, represents the preliminary saliency value optimization coefficient of the i-th pixel point, represents the preliminary saliency value of the i-th pixel point, which can be calculated according to the existing steps of the saliency detection FT algorithm. As Figure 5 shown, is a visualized schematic diagram of the obtained preliminary saliency value, at this time both the crack and the weld have a higher saliency.

[0056] In the optional embodiment, as Figure 6 shown, is a visualized schematic diagram of the final saliency value calculated, compared with Figure 5 , the brightness of the weld area is greatly weakened, while the brightness of the crack area is maintained.

[0057] In this way, by multiplying the optimization coefficient with the preliminary saliency value, the discrimination between the target crack and the interference weld is effectively improved.

[0058] S104, determining the crack defect area in the penetrant testing image according to the final saliency value, so as to realize the defect extraction of the penetrant testing image of the welded spherical tank connecting shell.

[0059] In an embodiment, after obtaining the visualized schematic diagram of the final saliency value, the defect extraction will be simpler, at this time the pixel points in the penetrant testing image can be traversed, if the final saliency value of the pixel point is greater than a preset judgment threshold, it is determined that the pixel point belongs to the defect pixel point of the crack defect area.

[0060] Further, the preset judgment threshold can be exemplarily 0.9, and the threshold can also be set by the Otsu and other adaptive threshold methods, and finally all the pixel points marked as defects jointly constitute the finally extracted crack defect area.

[0061] In this way, by performing simple threshold segmentation on the optimized final saliency value map, the crack defect area can be efficiently and accurately extracted.

[0062] It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the protection scope of the present application patent should be subject to the appended claims.

Claims

1. A method of defect extraction for a weld sphere tank connecting shell penetration detection image, characterized by, The method comprises the following steps: Collecting a penetration detection image of a welded spherical tank connecting shell, and preprocessing the penetration detection image; Based on the color features and texture features of the penetration detection image, a preliminary saliency value optimization coefficient of each pixel point in the penetration detection image is calculated, including: according to the difference between the RGB channel value of each pixel point and the average value of the RGB channel value of all pixel points in the image, and the sum of the RGB three channel values of each pixel point, a color saliency factor of each pixel point is calculated; the penetration detection image is grayed, and an edge pixel point is obtained by using an edge detection operator; a reference area is constructed with each pixel point as the center, and a chain code value of the edge pixel point in each reference area is obtained by using chain code technology; according to the chain code value variation, the gradient amplitude range of the edge pixel point in each reference area and the color saliency factor, a preliminary saliency value optimization coefficient of each pixel point is calculated, and the preliminary saliency value optimization coefficient satisfies the relationship: wherein represents the preliminary saliency value optimization coefficient of the i-th pixel point, represents the color saliency factor of the i-th pixel point, represents the number of edge pixel points in the reference region of a pixel point, represents the average value of the absolute value of the difference between the chain code values of the u-th edge pixel point and its adjacent two edge pixel points in the reference region of the i-th pixel point, represents the range of the gradient amplitude of all edge pixel points in the reference region of the i-th pixel point, is a value range adjustment coefficient of the preliminary saliency value optimization coefficient of a pixel point. According to the preliminary saliency value optimization coefficient and the preliminary saliency value of each pixel point obtained by a saliency detection algorithm, a final saliency value of each pixel point is calculated; According to the final saliency value, a crack defect area in the penetration detection image is determined, so as to realize defect extraction of the penetration detection image of the welded spherical tank connecting shell.

2. The method of claim 1, wherein the method is characterized by: The color saliency factor satisfies the relationship: In the formula represents the color saliency factor of the i-th pixel point, , , respectively represent the absolute value of the difference between the R channel value, the G channel value and the B channel value of the i-th pixel point and the average value of the R channel value, the G channel value and the B channel value of all pixel points in the image, represents the sum of the R, G and B channel values of the i-th pixel point, is a hyperparameter, which is used to prevent the value of 0 from occurring, is a normalization function.

3. The method of claim 1, wherein the method is characterized by: The final saliency value satisfies the relationship: wherein represents the final saliency value of the i-th pixel point, represents the preliminary saliency value optimization coefficient of the i-th pixel point, represents the preliminary saliency value of the i-th pixel point.

4. The method of claim 1, wherein the method is characterized by: The process of determining the crack defect area in the penetration detection image according to the final saliency value is to traverse each pixel point in the penetration detection image, if the final saliency value of a pixel point is greater than a preset judgment threshold, it is determined that the pixel point belongs to a defect pixel point in the crack defect area.

5. The method of claim 1, wherein the method is characterized by: The preprocessing method of the penetration detection image is to convert the penetration detection image from an RGB color space to a Lab color space, and to obtain a gray image by gray processing the penetration detection image.

Citation Information

Patent Citations

  • Saliency detection-based surface crack identification method

    CN107256547A

  • Metal washbasin defect rapid detection method based on computer vision

    CN116758083A