Defect detection method of explosive welding of composite plate based on X-ray image

By calculating the lead type tendency index and weld tendency index, adaptively adjusting the input scale in the multi-scale Retinex algorithm, the problem of oversharpening images in the prior art is solved, and the accuracy and image quality of detection of explosive welding defects of composite sheets is achieved.

CN119831985BActive Publication Date: 2025-05-09BAOJI HUIXIN METAL COMPOSITE MATERIAL
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510300391.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-05-09
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

In the prior art, the multi-scale Retinex algorithm may introduce excessive sharpening, resulting in the image becoming rough and even artifacts, affecting the visual quality of X-ray images of composite sheets and the accuracy of explosive welding defect detection.

Method used

By calculating the lead-type tendency index and weld tendency index of pixel points, the input scale in the multi-scale Retinex algorithm is adaptively adjusted to enhance the local characteristics of the weld area and suppress the characteristics of the non-weld area, and the enhanced image is obtained for defect detection.

Benefits of technology

It effectively improves the accuracy of detection of explosive welding defects of composite sheets, reduces the occurrence of false detection and missed detection, and improves the quality and visual effect of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831985B_ABST
    Figure CN119831985B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and more specifically, the present invention relates to a composite plate explosive welding defect detection method based on X-ray images, comprising: collecting an X-ray image of a composite plate weld as a target image; calculating the type tendency index of each pixel in the target image, and calculating the weld tendency index of the pixel based on the type tendency index of the pixel and the gray value of the pixel, and using the weld tendency index to calculate the input scale of each pixel under each basic scale under a multi-scale Retinex algorithm. The present invention processes the target image through an adaptive scale, so that the features of the weld area in the target image can be more effectively enhanced, and at the same time, the features of the area outside the weld are suppressed, reducing the influence of the area outside the weld in the target image on subsequent defect detection, thereby improving the detection accuracy of composite plate explosive welding defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and more specifically, to a composite plate explosive welding defect detection method based on X-ray images. Background Art

[0002] Explosive welding is a special solid-state welding process that uses the high-energy instantaneous impact generated by the explosion of explosives to achieve metallurgical bonding of two metals under high pressure to produce composite plates. Composite plates are used in aerospace, nuclear energy, pressure vessel manufacturing and other fields, and their quality requirements are extremely strict. To ensure that the composite plates meet the quality standards. X-ray images are usually used to detect the welding quality to determine whether there are defects. However, X-ray images usually have low contrast, and smaller defects such as welding slag and microcracks are not obvious in the X-ray images of composite plates, which may cause some explosive welding defects to be missed. At the same time, composite plates welded by explosive welding are usually made of different materials. If their densities are similar, the contrast of the X-ray image will be further reduced, making it difficult to distinguish defects.

[0003] In the related technology, for example, the Chinese patent application document with publication number CN117314830A discloses an X-ray image weld defect detection method and system, which uses a tested Transformer model to monitor X-ray image data information with welds in real time for identification, and determines whether there are weld defects and anomalies; when the weld defects and anomalies exist, the X-ray image data information is marked and counted.

[0004] In the prior art, a multi-scale Retinex algorithm is usually used to enhance the image to improve the image contrast, so that the explosive welding defects in the X-ray image of the composite plate can be easier to identify. However, the multi-scale Retinex algorithm may introduce over-sharpening, causing the image to become rough or even have artifacts, affecting the visual quality of the X-ray image of the composite plate, and further affecting the defect detection of explosive welding of the composite plate. Summary of the invention

[0005] The present invention provides a composite plate explosive welding defect detection method based on X-ray images, aiming to solve the problem that the multi-scale Retinex algorithm in the related technology may introduce over-sharpening, causing the image to become rough or even have artifacts, affecting the visual quality of the composite plate X-ray image, and further affecting the defect detection of composite plate explosive welding.

[0006] The present invention provides a composite plate explosive welding defect detection method based on X-ray images, comprising: collecting an X-ray image of a composite plate weld as a target image; calculating a type tendency index of each pixel point in the target image, and calculating a weld tendency index of the pixel point based on the type tendency index of the pixel point and the gray value of the pixel point, and using the weld tendency index to calculate the input scale of each pixel point under each basic scale under a multi-scale Retinex algorithm, and using the input scale of each pixel point to replace the basic scale to perform image enhancement processing to obtain an enhanced image, and performing explosive welding defect detection based on the enhanced image; wherein the calculation formula of the input scale of each pixel point is: ; In the formula, Pixel At the basic scale The input scale, is the pixel point in the target image The weld tendency index, is the pixel point in the target image The mean value of the weld tendency index of all pixels in the neighborhood, For the A basic scale, When respectively represents the basic scale 15, the basic scale 80 and the basic scale 200, The natural constant An exponential function with as the base; the type tendency index of the pixel point reflects the degree of local grayscale difference of all pixels within the neighborhood of the pixel point; the weld tendency index of the pixel point is negatively correlated with the type tendency index of the pixel point, and is positively correlated with the possibility that the pixel point belongs to the non-type area. By calculating the type tendency index (reflecting the degree of local grayscale difference) and the weld tendency index (based on the weighted calculation of the type tendency index), the method can effectively extract the local features of the weld area in the image. The weld area usually has different grayscale changes and texture features from the surrounding area. Through these tendency indices, the method can focus on the weld itself, thereby improving the accuracy of weld detection.

[0007] Further, performing explosive welding defect detection based on the enhanced image includes: using a target detection algorithm to detect defects in the enhanced image. The target detection algorithm can accurately locate the location of the defect in the image, and obtain the ability to recognize the defect features through training. If the image quality is poor or there is a lot of noise, the enhanced image technology can improve the image quality, reduce noise interference, and thus reduce the occurrence of false detection and missed detection.

[0008] Furthermore, the calculation formula of the weld tendency index of the pixel point is: ; In the formula, is the pixel in the image The weld tendency index, Pixel The lead type preference index, Pixel The mean gray value of the pixels in the column, Pixel The gray value of is the set of pixels in the non-lead area, is the set of pixels in the typeface area, is the sigmoid function.

[0009] Furthermore, the set of pixels in the non-type area and the set of pixels in the type area are obtained, including: clustering the pixels based on the type tendency index of the pixels to obtain two clusters, taking the cluster with the smallest type tendency index of all pixels in the cluster as the non-type cluster, and the other cluster as the type area cluster, wherein the pixels in the non-type cluster are taken as the set of pixels in the non-type area, and the pixels in the type cluster are taken as the set of pixels in the type area. Through the clustering algorithm, the pixels are assigned to different clusters, so that the type area and the non-type area in the image can be accurately divided into fine regions.

[0010] Furthermore, the lead type tendency index of each pixel is calculated, and the calculation formula is: ; In the formula, is the pixel point in the target image The lead type preference index, Pixel The local grayscale difference degree, Pixel The gray value of is the pixel point in the target image The variance of the local grayscale differences of all pixels in the row, is a standard normalization function, where the local grayscale difference of a pixel is the variance of the grayscale values ​​of all pixels in the neighborhood of the pixel. Based on the local grayscale difference of the pixel and the variance of the local grayscale difference of the entire row, the method evaluates the detail changes of the image. This method emphasizes the characteristics of the local grayscale changes of the image, so it can better capture the tiny details in the image.

[0011] Furthermore, the size of the neighborhood range of the pixel point is determined, including: obtaining the maximum circumscribed circle of each lead type from the historical target image; calculating the average value of the radius of the maximum circumscribed circle of all lead types, and taking any pixel point as the center and the range with the average value as the radius as the neighborhood range of the pixel point. Determining the neighborhood range by the maximum circumscribed circle of the lead type in the historical image can adaptively adjust the neighborhood scale to adapt to the geometric features of the target object, and can effectively enhance the extraction of local features.

[0012] Furthermore, the size of the pixel neighborhood range is determined, including: calculating the average grayscale value of each column of pixels in the target image, and constructing an average sequence in the order of the column index corresponding to the average value; calculating the average value of the difference between each data in the average sequence and the data on both sides of its adjacent data to obtain a difference sequence; based on the column index corresponding to the value greater than a preset threshold in the difference sequence as the peak width segmentation point, the distance between the nearest peak width segmentation points on both sides of each peak in the histogram is taken as the width of the peak, the average value of all peak widths is calculated, and the range with the average value of all peak widths as the radius is used as the pixel neighborhood range.

[0013] Furthermore, the pixels are clustered based on the typeface tendency index of the pixels, wherein the clustering algorithm adopts the Kmeans clustering algorithm.

[0014] Furthermore, the empirical value of the preset threshold is 2.

[0015] Furthermore, collecting the X-ray image of the weld of the composite plate includes: collecting the X-ray image of the weld of the composite plate using a digital X-ray device.

[0016] Beneficial effect: By processing the target image with adaptive scale, the features of the weld area in the target image can be more effectively enhanced, while the features of the area outside the weld are suppressed, reducing the influence of the area outside the weld in the target image on subsequent defect detection, thereby improving the detection accuracy of explosive welding defects in composite plates. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a flowchart schematically illustrating target image enhancement according to an embodiment of the present invention;

[0018] Figure 2 FIG. 4 is a schematic diagram schematically showing a column index according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0020] In one embodiment, the type tendency index of the pixel point is obtained by the grayscale value of the pixel point in the X-ray image of the composite plate. The weld tendency index of the pixel point is calculated by the type tendency index of the pixel point in the X-ray image of the composite plate and the grayscale value of the pixel point. The weld tendency index is used to calculate the input scale of each pixel point under each basic scale under the multi-scale Retinex algorithm, and the input scale of each pixel point is used instead of the basic scale to enhance the image to obtain an enhanced image, and the composite plate explosive welding defect detection is performed based on the enhanced image, which can effectively enhance the weld features in the X-ray image of the composite plate, make the explosive welding defects easier to be identified, and improve the accuracy of the composite plate explosive welding defect detection. The specific steps are as follows.

[0021] like Figure 1 As shown, S101: collecting an X-ray image of the weld of the composite plate as a target image.

[0022] In one embodiment, an X-ray image of the weld of the composite plate is collected by a digital X-ray device, and the X-ray image is used as a target image for subsequent enhancement processing of the target image.

[0023] S102: Calculate the typeface inclination index of each pixel in the target image.

[0024] Specifically, since the main body of the detection of explosive welding defects in composite plates is the weld of the plate, and the plates constituting different composite plates have different characteristics in material and size, and thus the welds in different composite plates also have different characteristics, it is impossible to accurately obtain the weld area in the image by a single threshold method. At the same time, the lead type in the target image has prominent color features, which increases the difficulty of weld identification in the image. In order to reduce the influence of the lead type part in the target image on the determination of the composite plate weld area, the present invention obtains the lead type tendency index of the pixel point according to the grayscale value of the pixel point in the composite plate target image.

[0025] In one embodiment, the typeface tendency index of each pixel is calculated using the following formula: ; In the formula, is the pixel point in the target image The lead type preference index, Pixel The local grayscale difference degree, Pixel The gray value of is the pixel point in the target image The variance of the local grayscale differences of all pixels in the row, is a standard normalization function, wherein the local grayscale difference degree of the pixel point is the variance of the grayscale values ​​of all pixels within the neighborhood of the pixel point.

[0026] In the formula, It reflects the local grayscale difference of the pixel points. Since the lead type in the target image is composed of lines with a certain higher grayscale value, there is a certain difference in grayscale value between the lines that constitute the lead type and the base color of the plate in the image. The larger the value, the smaller the pixel The more likely it is to be near the typeface, the more likely the pixel The larger the lead type tendency index is; The smaller the value, the smaller the pixel The smaller the probability of the pixel being near the typeface, the The smaller the type tendency index. is the absolute value of the gray value of the pixel. Since the lead type in the composite plate X-ray image has a relatively high gray value, The larger it is, the more likely the pixel is near the typeface, and the greater the typeface tendency index of the pixel is. The smaller it is, the less likely the pixel is to be near the type, and the smaller the type tendency index of the pixel is. It reflects the difference in the degree of local grayscale difference between each pixel in the row where the pixel is located. Since the lead characters in the composite plate X-ray image are arranged horizontally, the pixels near the lead characters in the composite plate X-ray image have a higher local grayscale difference, and the pixels outside the lead characters in the image have a lower local grayscale difference. When there is no lead character in the row where the pixel is located, the pixels in this row have a lower local grayscale difference. When there is lead character in the row where the pixel is located, there are both pixels with high grayscale value differences and pixels with low grayscale value differences in this row. Therefore The larger the value, the more likely it is that there is lead type in the row where the pixel is located, and the greater the lead type tendency index of the pixel; The smaller it is, the less likely it is that there will be type in the row where the pixel is located, and the smaller the type tendency index of the pixel is.

[0027] In one embodiment, the method for determining the size of the pixel neighborhood range includes: calculating the average grayscale value of each column of pixels in the target image ( Figure 2 ), construct an average value sequence in the order of column indexes corresponding to the average values; calculate the average value of the difference between each data in the average value sequence and the data on both sides of its adjacent data to obtain a difference sequence; based on the column index corresponding to the value greater than the preset threshold in the difference sequence as the peak width segmentation point, the distance between the peak width segmentation points on both sides of each peak in the histogram is taken as the width of the peak, calculate the average value of all peak widths, and take the range of the average value of all peak widths as the radius as the pixel point area range, so that the pixel point area range is equal to the lead type size in the target image. Among them, the empirical value of the preset threshold is 2.

[0028] It should be noted that the peak value in the target image represents the intensity of the features in the image, and the distance between the peak width segment points represents the width of different areas in the target image. Calculating the average of these widths can help define the size of typical features in the image, such as the size of the typeface, and ensure that the neighborhood range of the pixel point matches the size of the structural features (such as the typeface) in the image. This allows the features in the neighborhood to be fully considered and enhanced in image processing, while avoiding excessive processing of irrelevant areas, ultimately improving the accuracy of explosive welding defect detection.

[0029] In another embodiment, the maximum circumscribed circle of each lead type is obtained from the historical target image, the average radius of the maximum circumscribed circle of all the lead types is calculated, and the range with any pixel point as the center and the average value as the radius is used as the neighborhood range of the pixel point.

[0030] S103: Calculate the weld inclination index of the pixel points in the target image.

[0031] In one embodiment, the multi-scale Retinex algorithm is implemented by weighted summing up single-scale Retinex algorithms under multiple different parameters, wherein the result obtained by the small-scale Retinex may cause some areas in the image to be over-enhanced, while the result obtained by the large-scale Retinex may lose some image details, which is not conducive to the detection of explosive welding defects in composite plates. In order to effectively enhance part of the weld area in the image, the present invention calculates the weld tendency index of the pixel point through the lead type tendency index and the gray value of the pixel point in the target image of the composite plate, wherein the lead type tendency index of the pixel point reflects the degree of local grayscale difference of all pixels within the neighborhood range of the pixel point, wherein the local grayscale difference degree of the pixel point is the variance of the grayscale values ​​of all pixels within the neighborhood range of the pixel point.

[0032] In one embodiment, the calculation formula of the weld tendency index of the pixel point is: ; In the formula, is the pixel in the image The weld tendency index, Pixel The lead type preference index, Pixel The mean gray value of the pixels in the column, Pixel The gray value of is the set of pixels in the non-lead area, is the set of pixels in the typeface area, is the sigmoid function.

[0033] In the above formula, Pixels There is a certain distance between the lead characters in the target image, and the pixels in the weld area may be Since the pixels in the target image belonging to the weld area are relative to The other pixels in have higher grayscale values, so The larger the value of The more likely it is to be in the weld area, the The larger the weld tendency index is; The smaller the value of The less likely the pixel is to be in the weld area, the The smaller the weld tendency index is. The larger the value, the stronger the lead type feature of the pixel. The lower the probability of being in the weld area, the The smaller the weld tendency index is; The smaller the value of, the smaller the lead type feature of the pixel point. The higher the probability of the pixel being in the weld area, The larger the weld tendency index. Pixels Near the typeface, since the typeface is usually set on both sides of the weld, The pixel points in the range are less likely to be in the weld area of ​​the composite plate, so When the pixel The weld tendency index is set to 0 to avoid the influence of the pixels in the lead area on the detection of explosive welding defects.

[0034] In one embodiment, a set of non-lead type area pixel points and a set of type area pixel points are obtained, including: clustering the pixel points based on the type tendency index of the pixel points to obtain two clusters, taking the cluster with the smallest type tendency index of all pixel points in the cluster as the non-lead type cluster, and the other cluster as the type area cluster, wherein the pixel points in the non-lead type cluster are taken as the set of non-lead type area pixel points, and the pixel points in the type cluster are taken as the set of type area pixel points.

[0035] S104: Calculate the input scale of each pixel at each basic scale under the multi-scale Retinex algorithm.

[0036] Specifically, since the results obtained by the small-scale Retinex in the multi-scale Retinex algorithm may cause some areas in the image to be over-enhanced, and the results obtained by the large-scale Retinex may lose some image details, which is not conducive to the detection of explosive welding defects in composite plates, in order to effectively enhance the weld area in the image and at the same time reduce the influence of areas outside the weld on the detection of explosive welding defects in composite plates, the method calculates the input scale of each pixel through the weld tendency index of the pixel point, and uses the input scale of each pixel point instead of the basic scale to perform image enhancement processing to obtain an enhanced image, and performs explosive welding defect detection based on the enhanced image.

[0037] In one embodiment, the calculation formula of the input scale of each pixel at each basic scale is: ; In the formula, Pixel At the basic scale The input scale, is the pixel point in the target image The weld tendency index, is the pixel point in the target image The mean value of the weld tendency index of all pixels in the neighborhood, For the A basic scale, When respectively represents the basic scale 15, the basic scale 80 and the basic scale 200, The natural constant An exponential function with base .

[0038] In the formula, The larger the value, the more pixels The more obvious the weld features are, the more pixels The more likely it is to be in the weld area, the more refined the processing is needed to capture local details, so the pixels The smaller the scale, the more local details and textures should be enhanced; The smaller the value, the smaller the pixel The weaker the weld feature, the more pixels The more likely it is that the pixel is not in the weld area, the less detail enhancement is needed. A larger scale should be used to enhance local details and textures to avoid excessive sharpening introduced by image enhancement, which will cause the image to become rough or even have artifacts. The value reflects the pixel The overall weld tendency in the area, The larger the value, the more pixels Most pixels in the neighborhood of show high weld characteristics, indicating that the entire area may belong to the weld area. In order to highlight the local details and texture changes in the weld area, a smaller scale should be used to enhance the local details and texture of the weld area. The smaller the value, the more pixels The less obvious the weld area in the neighborhood is, the more likely the area is a non-weld area. A larger input scale should be used to avoid introducing noise due to excessive detail enhancement.

[0039] By adopting the above method and dynamically adjusting the input scale, in image processing, different processing scales can be determined under the multi-scale Retinex algorithm according to the weld tendency index of each pixel and the weld tendency of its neighborhood, thereby adaptively enhancing the local details of the weld area, avoiding over-sharpening of the background area or non-weld area, improving the image quality and effectively reducing noise or artifacts.

[0040] S105: Using a multi-scale Retinex algorithm to enhance the target image and obtain an enhanced image.

[0041] Specifically, in the process of using the multi-scale Retinex algorithm to process the target image of the composite plate, the original basic scale is replaced by the input scale of each pixel point, the target image is enhanced to obtain an enhanced image, and finally, explosive welding defect detection is performed based on the enhanced image. Specifically, the explosive welding defects in the enhanced image are detected using the target detection algorithm.

[0042] According to the above steps, the target image is processed by adaptive scaling so that the features of the weld area in the target image can be more effectively enhanced. At the same time, the features of the area outside the weld are suppressed, which reduces the influence of the area outside the weld in the target image on subsequent defect detection, thereby improving the detection accuracy of explosive welding defects in composite plates.

Claims

1. A composite plate explosive welding defect detection method based on X-ray images, characterized in that: include: Collecting X-ray images of the weld of the composite plate as target images; The lead type tendency index of each pixel in the target image is calculated, which reflects the degree of local grayscale difference of all pixels in the neighborhood of the pixel, and the expression is: ; In the formula, is the pixel point in the target image The typeface tendency index, Pixel The local grayscale difference degree, Pixel The gray value of is the pixel point in the target image The variance of the local grayscale differences of all pixels in the row, is a standard normalization function, wherein the local grayscale difference of the pixel point is the variance of the grayscale values ​​of all pixels within the neighborhood of the pixel point; Calculate the weld tendency index of the pixel point: ; In the formula, is the pixel in the image The weld tendency index, Pixel The mean gray value of the pixels in the column, Pixel The gray value of is the set of pixels in the non-lead area, is the set of pixels in the typeface area, is the sigmoid function; The weld tendency index is used to calculate the input scale of each pixel point under each basic scale under the multi-scale Retinex algorithm, and the input scale of each pixel point is used instead of the basic scale to perform image enhancement processing to obtain an enhanced image, and explosive welding defect detection is performed based on the enhanced image; Among them, the calculation formula for the input scale of each pixel is: ; In the formula, Pixel At the basic scale The input scale, is the pixel point in the target image The mean value of the weld tendency index of all pixels in the neighborhood, For the A basic scale, When respectively represents the basic scale 15, the basic scale 80 and the basic scale 200, The natural constant An exponential function with base .

2. The composite sheet material explosive welding defect detection method based on X-ray images according to claim 1 is characterized in that: Performing explosive welding defect detection based on the enhanced image includes: The defects in the enhanced image are detected using an object detection algorithm.

3. The composite sheet material explosive welding defect detection method based on X-ray images according to claim 1 is characterized in that: Get the set of pixels in the non-lead type area and the set of pixels in the lead type area, including: The pixels are clustered based on their type tendency index to obtain two clusters. The cluster with the smallest type tendency index of all pixels in the cluster is taken as a non-type cluster, and the other cluster is taken as a type area cluster, wherein the pixels in the non-type cluster are taken as a set of non-type area pixel points, and the pixels in the type cluster are taken as a set of type area pixel points.

4. The composite sheet material explosive welding defect detection method based on X-ray images according to claim 1 is characterized in that: Determine the size of the pixel neighborhood, including: Obtain the maximum circumscribed circle of each lead character from the historical target image; Calculate the average value of the radius of the largest circumscribed circle of all lead characters, and take any pixel point as the center and the range with the average value as the radius as the neighborhood range of the pixel point.

5. The composite sheet material explosive welding defect detection method based on X-ray images according to claim 1 is characterized in that: Determine the size of the pixel neighborhood, including: Calculate the average grayscale value of each column of pixels in the target image, and construct an average sequence according to the order of column indexes corresponding to the average values; Calculate the average value of the difference between each data in the average value sequence and the data on both sides of it to obtain a difference sequence; Based on the column index corresponding to the value greater than the preset threshold in the difference sequence as the peak width segmentation point, the distance between the nearest peak width segmentation points on both sides of each peak in the histogram is taken as the width of the peak, the average value of all peak widths is calculated, and the range with the average value of all peak widths as the radius is taken as the pixel point area range.

6. The composite plate explosive welding defect detection method based on X-ray images according to claim 3 is characterized in that: The pixels are clustered based on the typeface tendency index of the pixels, wherein the clustering algorithm adopts the Kmeans clustering algorithm.

7. The composite sheet material explosive welding defect detection method based on X-ray images according to claim 5 is characterized in that: The empirical value of the preset threshold is 2.

8. The composite sheet material explosive welding defect detection method based on X-ray images according to any one of claims 1 to 7, characterized in that: Acquire X-ray images of composite plate welds, including: Digital X-ray equipment is used to collect X-ray images of composite plate welds.

Citation Information

Patent Citations

  • X-ray image weld defect detection method and system

    CN117314830A

  • Method for welding and repairing copper surface defect of aluminum-copper composite board transition joint

    CN102059430A

  • Detection method for automatically identifying and detecting weld defects

    CN110570410A