Image correction enhancement method
By generating dark field images and correction curves to eliminate bias errors, and using guide filtering to enhance the image, the problem of low signal-to-noise ratio and contrast of DR images is solved, significantly improving image quality, and supporting more accurate AI and manual image evaluation.
Patent Information
- Application Number
- CN202411218015.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2025-01-10
AI Technical Summary
In the prior art, the DR image signal-to-noise ratio, resolution and contrast of the serpentine tube welds of boiler high-temperature components are relatively low, which affects the accuracy of AI algorithms and manual graph evaluation.
By acquiring and processing DR images, dark field images and correction curves are generated, bias errors are eliminated, image signal-to-noise ratio is improved, and image enhancement is adopted using guide filtering to increase the contrast of defects.
It significantly improves the signal-to-noise ratio and resolution of DR images, enhances the contrast of defects, improves the accuracy of AI algorithms and manual graph evaluation, and ensures the quality of small-diameter tube defect detection.
Smart Images

Figure CN119295336A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and more particularly to an image correction and enhancement method. Background Art
[0002] Welding is a key process in the manufacturing of major power generation equipment, and its quality determines the safety and reliability of power generation equipment. According to external quality feedback over the years, more than 80% of the quality problems of power plant boilers are caused by weld quality. Therefore, effectively improving the welding quality of power plant boiler enterprises is very important to ensure production safety and help enterprises improve quality and efficiency.
[0003] In the petrochemical, energy and power, aerospace and other industries, small-diameter pipes (specifically pipes with a diameter of 100mm or less) are important parts of related equipment. The serpentine pipe is a small-diameter pipe and is a core component of power station boilers. The operating temperature is as high as 677℃ and the working pressure is 40MPa.
[0004] In the prior art, when X-ray imaging defects are detected on the serpentine and straight pipe welds of high-temperature boiler components, a DR imaging detection system (referred to as industrial television RTV in the industry) is required. Currently, in the DR imaging detection system, when evaluating defects on DR images of small-diameter pipe welds, the signal-to-noise ratio, resolution, and contrast of the DR images are low, which is not conducive to AI algorithm evaluation and manual evaluation. Summary of the invention
[0005] In order to overcome the defects in the above-mentioned prior art, the present invention discloses an image correction and enhancement method. The purpose of the present invention is to solve the problem that the signal-to-noise ratio, resolution and contrast of DR images in the prior art are low, which is not conducive to AI algorithm evaluation and manual evaluation. The present invention can greatly improve the image signal-to-noise ratio and resolution by correcting the DR image of the small-diameter pipe weld; and increase the contrast of the defect by enhancing the DR image of the small-diameter pipe weld.
[0006] In order to achieve the above objectives, the technical solution adopted by the present invention is: An image correction and enhancement method comprises the following steps: 1. Calibration curve generation S1. When no inspection workpiece is placed at the small-diameter pipe weld inspection station, several DR images on the inspection station are collected, and the several DR images are processed to obtain a dark field image and a correction curve; Preferably, step S1 includes: when no inspection workpiece is placed at the small-diameter pipe weld inspection station, opening the grating to the maximum position to expose the flat-panel detector, adjusting the movement of the X-ray machine head so that the X-ray machine is vertically aligned with the flat-panel detector to emit X-rays, and the flat-panel detector collects several DR images.
[0007] Preferably, step S1 comprises the following steps: S11. When no inspection workpiece is placed at the small-diameter pipe weld inspection station, a plurality of DR images with different grayscale values on the inspection station are collected, and the DR image with the lowest grayscale value is used as a dark field image; Preferably, step S11 includes: when no inspection workpiece is placed at the small-diameter pipe weld inspection station, first turn off the X-ray machine, use 10 frames of superposition and averaging to collect an image with a grayscale value of 0 as a dark field image, then turn on the X-ray machine, adjust the voltage, and use 10 frames of superposition and averaging to collect 4 DR images as bright field images when the image grayscale values are 10000, 20000, 30000, and 40000, respectively.
[0008] In the above steps, five DR images with gray values of 0, 10000, 20000, 30000, and 40000 are obtained. When acquiring images, 10-frame stacking and averaging are used to acquire DR images because: generating DR images by stacking and averaging multiple frames can effectively improve the signal-to-noise ratio of the image. S12, using a plurality of DR images with different gray values, respectively, and subtracting the dark field image to obtain a plurality of calibration reference images; In the above steps, the dark field image is subtracted from the five DR images to eliminate the bias error and obtain five calibration reference images.
[0009] S13, calculating the image grayscale mean value of each correction reference image as the standard correction value of each pixel response in the correction reference image, and obtaining a correction curve of the correction output changing with the grayscale response in different grayscale intervals.
[0010] Preferably, step S13 includes: for each correction reference image, averaging the image grayscale as the standard correction value of each pixel response, and based on the linear relationship between grayscale response and correction output, obtaining four correction curves of correction output changing with grayscale response in the grayscale ranges of 0-10000, 10000-20000, 20000-30000, and 30000-40000, respectively.
[0011] In the above steps, for each reference image, the image grayscale is averaged as the standard correction value of each pixel response. For each pixel, since the grayscale response and the correction output are in a linear relationship, four correction curves of the correction output changing with the grayscale response can be obtained in the intervals of 0-10000, 10000-20000, 20000-30000, and 30000-40000. Among them, for a pixel, the grayscale response is the grayscale value before correction, and the correction value or correction output is the grayscale value after correction.
[0012] In the above steps, the correction curve is set in this way because: after testing, the pixel correction effect is good and the signal-to-noise ratio of the image after correction is high.
[0013] 2. DR image correction of small diameter pipe weld S2. When the inspection workpiece is placed at the small-diameter pipe weld inspection station, a DR image of the small-diameter pipe weld at the inspection station is collected, and the DR image of the small-diameter pipe weld is corrected using a dark field image and a correction curve; Preferably, step S2 includes: when the inspection workpiece is placed at the small-diameter pipe weld inspection station, the DR image of the small-diameter pipe weld on the inspection station is collected as the original image, and the dark field image is subtracted from the original image to obtain a bias error elimination image, and then each pixel in the bias error elimination image is corrected using the correction curve.
[0014] Preferably, in step S2, DR images of the small-diameter pipe weld at the inspection station are collected by stacking and averaging 10 frames.
[0015] Preferably, in step S2, using the correction curve to correct each pixel in the bias error elimination image includes: first determining in which grayscale interval the pixel grayscale value is located, then calculating the pixel correction value based on the correction curve corresponding to the pixel grayscale value and the grayscale interval, and correcting the pixel using the correction value.
[0016] In step S2, the workpiece is placed, and the weld DR image is collected as the original image by superimposing and averaging 10 frames. The bias error is eliminated by subtracting the dark field image from the original image. Each pixel of the image after the error is eliminated is corrected. First, the interval of the pixel grayscale value is determined, and then the pixel correction value is calculated based on the grayscale value and the obtained correction curve.
[0017] In the above steps, the dark field image is subtracted from the DR image of the small-diameter pipe weld, which eliminates the bias error in the DR image and protects the DR image correction value from the influence of the detector hardware, mainly the leakage current of the photodiode and the zero drift of the charge amplifier.
[0018] In the above steps, the correction curve is used to calculate the pixel correction value in the small-diameter pipe weld DR image, and the correction value is used as the new grayscale value of the small-diameter pipe weld DR image to improve the signal-to-noise ratio of the small-diameter pipe weld DR image.
[0019] 3. Image Enhancement S3. Perform image enhancement processing on the corrected DR image of the small-diameter pipe weld to obtain a DR evaluation image of the small-diameter pipe weld.
[0020] Preferably, step S3 includes: The guided filtering method is used to perform guided filtering and smoothing on the corrected DR image M of the small-diameter pipe weld to obtain a smoothed image N. The guided filtering filter is an edge-preserving filter. Use the corrected small-diameter pipe weld DR image M to subtract the smoothed image N to obtain a detailed contour image; Multiply the detail contour image by the magnification factor a to magnify the detail contour image; The enlarged image is added to the smoothed image N to obtain the enhanced image I.
[0021] Preferably, in step S3, image enhancement includes: ; Among them, I is the enhanced image, M is the corrected DR image of the small-diameter pipe weld; N is the smoothed image; and a is the magnification factor.
[0022] Preferably, in step S3, the value of the amplification coefficient a is 3.
[0023] In step S2, the signal-to-noise ratio and resolution of the corrected image are improved, and step S3 performs image enhancement to maintain the edge information of the image while increasing the contrast. The specific method is to use guided filtering, set the corrected DR image as M, and use M as the guide image. At this time, the guided filter becomes an edge-preserving filter. After filtering, the smoothed image N is obtained. In order to enhance the details and suppress the noise at the same time, the smoothed image N is subtracted from the corrected DR image itself to obtain the details and contour information of the image. The details and contours are enlarged and multiplied by the enlargement coefficient a. Finally, the smoothed image N is added to obtain the final enhanced image I. The specific formula is: After actual processing, the actual enhancement effect is best when a is 3. The enhanced image I is the DR evaluation image of the small-diameter pipe weld. The DR evaluation image of the small-diameter pipe weld is then used to evaluate the defects in the image. Specifically, AI algorithm evaluation and manual evaluation can be used.
[0024] In the above steps, the formula The corrected DR image of the small-diameter pipe weld is enhanced to enhance the details of the DR image, making it easier to find tiny defects and improving the situation of misjudgment and omission of defects in the evaluation.
[0025] Beneficial effects of the present invention: The image correction and enhancement method provided by the present invention can make the defect details of the DR image more clearly visible, avoid a large amount of manual adjustment of image contrast to find defects, and improve the accuracy of computer image evaluation using AI algorithms.
[0026] The image correction and enhancement method provided by the present invention can greatly improve the image signal-to-noise ratio and resolution by correcting the DR image of the small-diameter pipe weld; by performing image enhancement on the DR image of the small-diameter pipe weld, the contrast of the defects can be increased, providing conditions for AI image review and manual defect determination, thereby ensuring the quality of small-diameter pipe defect detection.
[0027] Compared with the image processing of the existing RTV system, the image correction and enhancement method provided by the present invention can obtain a higher signal-to-noise ratio, resolution and contrast after correction and enhancement, which is more conducive to AI algorithm evaluation and manual evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a flow chart of the image correction and enhancement method of the present invention; Figure 2 is a DR image of grayscale 0 of the present invention; Figure 3 It is a DR image of grayscale 10000 of the present invention; Figure 4 It is a DR image of the present invention with a grayscale of 20000; Figure 5 It is a DR image of grayscale 30000 of the present invention; Figure 6 It is a DR image of the present invention with a grayscale of 40000; Figure 7 Correcting image 1 for the present invention; Figure 8 Correcting image 2 for the present invention; Fig. 9 Correcting image 3 for the present invention; Fig.10 Correcting image 4 for the present invention; Fig.11 Correcting image 5 for the present invention; Fig.12 The DR image after correction of the present invention; Fig.13 This is the enhanced DR image of the present invention. DETAILED DESCRIPTION
[0029] The concept, specific structure and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments and drawings to fully understand the purpose, characteristics and effects of the present invention.
[0030] Example 1 An image correction enhancement method, such as Figure 1 As shown, the following steps are included: S1. When no inspection workpiece is placed at the small-diameter pipe weld inspection station, several DR images on the inspection station are collected, and the several DR images are processed to obtain a dark field image and a correction curve; S2. When the inspection workpiece is placed at the small-diameter pipe weld inspection station, a DR image of the small-diameter pipe weld at the inspection station is collected, and the DR image of the small-diameter pipe weld is corrected using a dark field image and a correction curve; S3. Perform image enhancement processing on the corrected DR image of the small-diameter pipe weld to obtain a DR evaluation image of the small-diameter pipe weld.
[0031] Example 2 This embodiment further describes step S1 based on embodiment 1.
[0032] Step S1 includes: when no inspection workpiece is placed at the small-diameter pipe weld inspection station, the grating is opened to the maximum position to expose the flat-panel detector, the movement of the X-ray machine head is adjusted so that the X-ray machine is vertically aligned with the flat-panel detector to emit X-rays, and the flat-panel detector collects a number of DR images.
[0033] In this embodiment, the collected DR images need to be corrected first. Without placing the inspection workpiece, 5 DR images with grayscale values of approximately 0, 10000, 20000, 30000, and 40000 are collected by 10-frame superposition and averaging. The image with a grayscale value of 0 is a dark field image. Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 shown.
[0034] Specifically, when no inspection workpiece is placed at the small-diameter pipe weld inspection station, the X-ray machine is turned off first, and an image with a grayscale value of 0 is collected as a dark field image by using 10-frame superposition and averaging. Then the X-ray machine is turned on, the voltage is adjusted, and 4 DR images are collected as bright field images by using 10-frame superposition and averaging when the image grayscale values are 10000, 20000, 30000, and 40000. Five DR images with grayscale values of 0, 10000, 20000, 30000, and 40000 are obtained.
[0035] Secondly, the dark field image is subtracted from the five DR images to eliminate the bias error and obtain five calibration reference images, such as Figure 7 , Figure 8 , Fig. 9 , Fig.10 and Fig.11 shown.
[0036] Finally, for each reference image, the image grayscale average is used as the standard correction value of each pixel response. For each pixel, since the grayscale response and the correction output are in a linear relationship, four correction curves showing the change of correction output with grayscale response can be obtained in the intervals of 0-10000, 10000-20000, 20000-30000, and 30000-40000 respectively.
[0037] Example 3 This embodiment further describes step S2 based on embodiment 2.
[0038] In step S2, the workpiece is placed, and the weld DR image is collected by averaging 10 frames as the original image. The dark field image is subtracted from the original image to eliminate the bias error. Each pixel of the image after the error is eliminated is corrected. First, the interval of the pixel gray value is determined, and then the pixel correction value is calculated based on the gray value and the obtained correction curve. The corrected DR image is as follows: Fig.12 shown.
[0039] Example 4 This embodiment further describes step S3 based on embodiment 3.
[0040] In step S2, the signal-to-noise ratio and resolution of the corrected image are improved, and step S3 performs image enhancement to maintain the edge information of the image while increasing the contrast. The specific method is to use guided filtering, set the corrected DR image as M, and use M as the guide image. At this time, the guided filter becomes an edge-preserving filter. After filtering, the smoothed image N is obtained. In order to enhance the details and suppress the noise at the same time, the smoothed image N is subtracted from the corrected DR image itself to obtain the details and contour information of the image. The details and contours are enlarged and multiplied by the enlargement coefficient a. Finally, the smoothed image N is added to obtain the final enhanced image I. The specific formula is: After actual processing, when a is 3, the actual enhancement effect is the best. The enhanced DR image is as follows Fig.13 The enhanced image I is the DR evaluation image of the small-diameter pipe weld. The DR evaluation image of the small-diameter pipe weld is then used to evaluate the defects in the image. Specifically, AI algorithm evaluation and manual evaluation can be used.
[0041] The above is a specific description of the implementation mode of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention, and these equivalents or substitutions are all included in the scope defined by the claims of the present invention.
Claims
1. An image correction and enhancement method, characterized in that: The following steps are involved: S1. When no inspection workpiece is placed at the small-diameter pipe weld inspection station, several DR images on the inspection station are collected, and the several DR images are processed to obtain a dark field image and a correction curve; S2. When the inspection workpiece is placed at the small-diameter pipe weld inspection station, a DR image of the small-diameter pipe weld at the inspection station is collected, and the DR image of the small-diameter pipe weld is corrected using a dark field image and a correction curve; S3. Perform image enhancement processing on the corrected DR image of the small-diameter pipe weld to obtain a DR evaluation image of the small-diameter pipe weld.
2. The image correction and enhancement method according to claim 1, characterized in that: The S1 step includes the following steps: S11. When no inspection workpiece is placed at the small-diameter pipe weld inspection station, a plurality of DR images with different grayscale values on the inspection station are collected, and the DR image with the lowest grayscale value is used as a dark field image; S12, using a plurality of DR images with different gray values, respectively, and subtracting the dark field image to obtain a plurality of calibration reference images; S13, calculating the image grayscale mean value of each correction reference image as the standard correction value of each pixel response in the correction reference image, and obtaining a correction curve of the correction output changing with the grayscale response in different grayscale intervals.
3. The image correction and enhancement method according to claim 2, characterized in that: Step S11 includes: when no inspection workpiece is placed at the small-diameter pipe weld inspection station, first turn off the X-ray machine, use 10 frames of superposition and averaging to collect an image with a grayscale value of 0 as a dark field image, then turn on the X-ray machine, adjust the voltage, and use 10 frames of superposition and averaging to collect 4 DR images as bright field images when the image grayscale values are 10000, 20000, 30000, and 40000.
4. The image correction and enhancement method according to claim 2, characterized in that: Step S13 includes: for each correction reference image, the image grayscale average is used as the standard correction value of each pixel response, and based on the linear relationship between grayscale response and correction output, four correction curves of correction output changing with grayscale response are obtained in the grayscale ranges of 0-10000, 10000-20000, 20000-30000, and 30000-40000 respectively.
5. The image correction and enhancement method according to claim 1, characterized in that: Step S2 includes: when the inspection workpiece is placed at the small-diameter pipe weld inspection station, the DR image of the small-diameter pipe weld on the inspection station is collected as the original image, and the dark field image is subtracted from the original image to obtain a bias error elimination image, and then each pixel in the bias error elimination image is corrected using the correction curve.
6. The image correction and enhancement method according to claim 5, characterized in that: In step S2, DR images of the small-diameter pipe weld at the inspection station are collected by stacking and averaging 10 frames.
7. The image correction and enhancement method according to claim 5, characterized in that: In step S2, using the correction curve to correct each pixel in the bias error elimination image includes: first determining in which grayscale interval the pixel grayscale value is located, then calculating the pixel correction value according to the correction curve corresponding to the pixel grayscale value and the grayscale interval, and correcting the pixel using the correction value.
8. The image correction and enhancement method according to claim 1, characterized in that: The S3 steps include: The guided filtering method is used to perform guided filtering and smoothing on the corrected DR image M of the small-diameter pipe weld to obtain a smoothed image N. The guided filtering filter is an edge-preserving filter. Use the corrected small-diameter pipe weld DR image M to subtract the smoothed image N to obtain a detailed contour image; Multiply the detail contour image by the magnification factor a to magnify the detail contour image; The enlarged image is added to the smoothed image N to obtain the enhanced image I.
9. The image correction and enhancement method according to claim 8, characterized in that: In step S3, image enhancement includes: ; Among them, I is the enhanced image, M is the corrected DR image of the small-diameter pipe weld; N is the smoothed image; and a is the magnification factor.
10. The image correction and enhancement method according to claim 1, characterized in that: Step S1 includes: when no inspection workpiece is placed at the small-diameter pipe weld inspection station, the grating is opened to the maximum position to expose the flat-panel detector, the movement of the X-ray machine head is adjusted so that the X-ray machine is vertically aligned with the flat-panel detector to emit X-rays, and the flat-panel detector collects a number of DR images.