Image processing method and system based on X-ray
By pre-processing, denoising and combining enhancement processing on X-ray images, the problem of poor clarity of X-ray images in the prior art is solved, and high-quality and high-resolution image processing effect is achieved.
Patent Information
- Application Number
- CN202411562684.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, X-ray images have poor clarity, low quality, and are difficult to effectively process.
By acquiring the original X-ray image, pre-processing, denoising and combining enhancement processing, image processing is performed using the GPU, multiple enhancement processing and correction coefficient correction, combined with algorithms such as Sobel edge detection and contrast-limited adaptive histogram equalization.
It realizes the acquisition of clear, high-quality, and high-recognition dual-energy X-ray images, enhancing the detail and recognizable image while reducing noise.
Smart Images

Figure CN119540087A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to X-ray image processing technology, and in particular to an X-ray-based image processing method and system. Background Art
[0002] X-ray baggage inspection systems are used for carry-on baggage inspections at airports and large-scale event venues. These systems typically generate grayscale images representing the amount of X-ray transmission or color images that are color-coded based on the material being identified. In typical operation, inspectors visually inspect the images to confirm the presence of hazardous materials. If any hazardous materials are found, the baggage is opened for inspection.
[0003] Such as prior art 1: CN201911138764.6, which includes image distortion correction, low interest The three main steps are grayscale segmentation and low grayscale contrast enhancement. However, the image clarity is poor and the quality is low. Summary of the Invention
[0004] The present invention addresses the problem of poor clarity and low quality of X-ray images in the prior art and provides an X-ray-based image processing method and system.
[0005] In order to solve the above technical problems, the present invention is solved by the following technical solutions: Based on X-ray image processing methods, the method includes: Acquisition of X-ray images, through real-time acquisition or direct acquisition of X-ray raw images, the formats of X-ray raw images include .xstd format images and .xraw format images; Preprocessing of X-ray original images: preprocessing the collected X-ray original images to obtain processed X-ray image data; the X-ray original image data includes dark field detector data and no-load detector data; Loading X-ray image data, loading the pre-processed X-ray image data into the GPU; De-noising of X-ray images, performing de-noising on the X-ray image data and the pre-processed X-ray image; The combined enhancement processing of the X-ray image is performed on the X-ray image after the denoising processing, and the X-ray image after the combined enhancement processing is displayed.
[0006] Preferably, the preprocessing of the X-ray image includes: Correction of X-ray images: correction of X-ray images is performed using dark field detector data and no-load detector data; ; in, is the total number of points on the detection board, For the The corrected data of the point, is the original data of the nth point, For the The background average value of the points; is the full-scale average value of the nth point.
[0007] Preferably, the combined enhancement processing of the X-ray image includes: The first enhancement processing of the X-ray image is to perform the first enhancement processing on the X-ray image after the denoising processing according to Algorithm 1, and perform the first correction of the correction coefficient A; Second enhancement processing of the X-ray image: the X-ray image after the first enhancement processing is subjected to a second enhancement processing by using Algorithm 2, and a second correction coefficient B is corrected; The third enhancement processing of the X-ray image is to perform the third enhancement processing on the X-ray image after the second enhancement processing using Algorithm 3, and perform the third correction of the correction coefficient C.
[0008] Preferably, the first enhancement processing algorithm 1 of the X-ray image includes obtaining a first correction coefficient A through a first operator A1 and a second operator A2; A = a1 * A1 + a2 * A2, where a1 and a2 are coefficients.
[0009] Preferably, the X-ray image after the first enhancement processing is subjected to a second enhancement processing by using Algorithm 2, wherein Algorithm 2 is a Sobel edge detection operator, and the Sobel edge detection operator includes an edge operator SobelX in the X direction and an edge operator SobelY in the Y direction.
[0010] Preferably, the X-ray image after the second enhancement processing is subjected to a third enhancement processing by using Algorithm 3, where Algorithm 3 is contrast-limited adaptive histogram equalization.
[0011] Preferably, the X-ray image data includes the coefficient laplacianIntensity of the operator A1, the coefficient m_unsharpMaskIntensity of the operator A2, the coefficient m_claheRate of the algorithm 3, the separately added edge processing parameter IsEdge and the gamma algorithm coefficient Normal_gamma.
[0012] In order to solve the above technical problems, the present invention further provides an X-ray image processing system, which includes: An X-ray original image acquisition module acquires X-ray original images in real time or directly. The formats of X-ray original images include .xstd format images and .xraw format images; An X-ray original image preprocessing module preprocesses the collected X-ray original image to obtain a processed X-ray image; An X-ray image data loading module, which loads the pre-processed X-ray image data into the GPU; An X-ray image denoising processing module performs denoising processing based on X-ray image data and pre-processed X-ray images; The X-ray image combination enhancement processing module performs combination enhancement processing on the X-ray image after the denoising processing, and displays the X-ray image after the combination enhancement processing.
[0013] The present invention has significant technical effects due to the adoption of the above technical solutions: The method designed by the present invention can obtain a clear, high-quality, high-recognition and low-noise dual-energy X-ray image.
[0014] The present invention adopts a combined enhancement method and gives different weights to them, which not only highlights the details and enhances the image, but also does not generate too much noise, making the X-ray image highly recognizable and high-definition. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flow chart of the present invention; Figure 2 is a flowchart of the combined enhancement processing of X-ray images of the present invention; Figure 3-1 Image 1 before combined enhancement processing of the present invention; Figure 3-2 Image 1 after combined enhancement processing of the present invention; Figure 4-1 enhancing the original image for the present invention combination; Figure 4-2 Enhance the image after AB correction by the combination of the present invention; Figure 4-3 Enhance the image after C correction for the present invention combination; Figure 4-4 Enhance the image after C correction for the present invention combination; Figure 4-5 This is the result image after the combination enhancement of the present invention. DETAILED DESCRIPTION
[0016] The present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0017] Example 1 Based on X-ray image processing methods, the method includes: Acquisition of X-ray images, through real-time acquisition or direct acquisition of X-ray raw images, the formats of X-ray raw images include .xstd format images and .xraw format images; Preprocessing of X-ray original images: preprocessing the collected X-ray original images to obtain processed X-ray image data; the X-ray original image data includes dark field detector data and no-load detector data; X-ray image data includes dark field detector data and airborne detector data; Loading X-ray image data, loading the pre-processed X-ray image data into the GPU; De-noising of X-ray images, performing de-noising on the X-ray image data and the pre-processed X-ray image; The combined enhancement processing of the X-ray image is performed on the X-ray image after the denoising processing, and the X-ray image after the combined enhancement processing is displayed. Figure 3-1 , 4-1 is the image before enhancement, Figure 3-2 , 4-2 is the enhanced image; it can be seen from the image that after the enhancement process, the image clarity is higher and the recognizability is stronger.
[0018] The preprocessing of X-ray images includes: correction of X-ray images, which is performed using dark field detector data and no-load detector data; ; in, is the total number of points on the detection board, For the The corrected data of the point, is the original data of the nth point, For the The background average value of the points; is the full-scale average value of the nth point.
[0019] The combined enhancement processing of the X-ray image includes: a first enhancement processing of the X-ray image, performing the first enhancement processing on the X-ray image after the denoising processing by using Algorithm 1, and performing the first correction of the correction coefficient A; Second enhancement processing of the X-ray image: the X-ray image after the first enhancement processing is subjected to a second enhancement processing by using Algorithm 2, and a second correction coefficient B is corrected; The third enhancement processing of the X-ray image is to perform the third enhancement processing on the X-ray image after the second enhancement processing using Algorithm 3, and perform the third correction of the correction coefficient C.
[0020] The first enhancement processing algorithm 1 of the X-ray image includes obtaining a first correction coefficient A through a first operator A1 and a second operator A2; A = a1 * A1 + a2 * A2, where a1 and a2 are coefficients.
[0021] The X-ray image after the first enhancement processing is subjected to a second enhancement processing by using Algorithm 2, wherein Algorithm 2 is a Sobel edge detection operator, and the Sobel edge detection operator includes an edge operator SobelX in the X direction and an edge operator SobelY in the Y direction.
[0022] The X-ray image after the second enhancement processing is subjected to a third enhancement processing by using Algorithm 3, where Algorithm 3 is contrast-limited adaptive histogram equalization.
[0023] For , the X-ray image data includes the coefficient laplacianIntensity of operator A1, the coefficient m_unsharpMaskIntensity of operator A2, the coefficient m_claheRate of algorithm 3, the separately added edge processing parameter IsEdge and the gamma algorithm coefficient Normal_gamma.
[0024] The image denoising is performed by using bilateral filtering with a pixel weight of 0.21; the operator is shown in Table 1; Table 1 Bi-standard filter operator table Example 2 Based on Example 1, this embodiment is based on an X-ray image processing system, which includes: An X-ray original image acquisition module acquires X-ray original images in real time or directly. The formats of X-ray original images include .xstd format images and .xraw format images; An X-ray original image preprocessing module preprocesses the collected X-ray original image to obtain a processed X-ray image; An X-ray image data loading module, which loads the pre-processed X-ray image data into the GPU; An X-ray image denoising processing module performs denoising processing based on X-ray image data and pre-processed X-ray images; The X-ray image combination enhancement processing module performs combination enhancement processing on the X-ray image after the denoising processing, and displays the X-ray image after the combination enhancement processing.
[0025] Example 3 Based on the above embodiment, this embodiment is developed using C++ language and OpenGL graphics interface library, providing convenient image input and enhanced image display windows. It reads the original dual-energy X-ray grayscale image data, performs image preprocessing, and then exchanges data between the CPU and GPU. The original data is loaded into the GPU and further processed through the OpenGL interface. With the help of traditional morphological methods, the image is processed to obtain an enhanced high-quality and clear image. Algorithm 1 is a combination algorithm, the first operator A1 is shown in Table 2, and the second operator A2 is shown in Table 3: Table 2 The first operator A1 table Table 3 The second operator A2 table A = a1 * A1 + a2 * A2 is a combinatorial operator, where a1 and a2 are coefficients; Algorithm 2 is an optimized Sobel edge detection operator. To enhance the lines in the X and Y directions and highlight them, the operators are as follows, with a default coefficient of 1: The operator for enhancing X in Algorithm 2 is shown in Table 4: The operator for enhancing Y in Algorithm 2 is shown in Table 5. The enhanced image is Figure 4-2 ; Table 4 Operator table for enhancing X Table 5 Operator table for enhancing Y Algorithm 3 is an optimized contrast-limited adaptive histogram equalization method. The coefficient weight is the largest, affecting the overall display effect of the image. Combining the above three algorithms, repeatedly taking values and continuously optimizing until the best enhancement effect is achieved, the final coefficient is output for use.
[0026] The enhanced image after correction factor C is Figure 4-4 ; For images with too large correction coefficients, the value is 4-3; the final output image is Figure 4-5 .
Claims
1. Based on the X-ray image processing method, the method includes: Acquisition of X-ray images, through real-time acquisition or direct acquisition of X-ray raw images, the formats of X-ray raw images include images in .xstd format and images in .xraw format; Preprocessing of X-ray original images, preprocessing the collected X-ray original images to obtain processed X-ray image data; X-ray raw image data includes dark field detector data and no-load detector data; Loading of X-ray image data, loading the preprocessed X-ray image data into the GPU; De-noising of X-ray images, performing de-noising on the X-ray image data and the pre-processed X-ray image; Combination enhancement processing of X-ray images, performing combination enhancement processing on the X-ray images after denoising, and displaying the X-ray images after combination enhancement processing; Combined enhancement processing of X-ray images includes: The first enhancement processing of the X-ray image is to perform the first enhancement processing on the X-ray image after the denoising processing through Algorithm 1, and perform the first correction of the correction coefficient A; Second enhancement processing of the X-ray image, performing a second enhancement processing on the X-ray image after the first enhancement processing through Algorithm 2, and performing a second correction of the correction coefficient B; The third enhancement processing of the X-ray image is to perform the third enhancement processing on the X-ray image after the second enhancement processing through Algorithm 3, and perform the third correction of the correction coefficient C.
2. The X-ray image processing method according to claim 1, characterized in that: The preprocessing of X-ray images includes: Correction of X-ray images: correction of X-ray images is performed using dark field detector data and no-load detector data; ; in, is the total number of points on the detection board, For the The corrected data of the point, is the original data of the nth point, For the The background average value of the points; is the full-scale average value of the nth point.
3. The X-ray image processing method according to claim 1, characterized in that: The first enhancement processing algorithm 1 of the X-ray image includes obtaining a first correction coefficient A through a first operator A1 and a second operator A2; A = a1 *A1 + a2 * A2, where a1 and a2 are coefficients.
4. The X-ray image processing method according to claim 1, characterized in that: For the X-ray image after the first enhancement processing, the second enhancement processing is performed through Algorithm 2, where Algorithm 2 is a Sobel edge detection operator, and the Sobel edge detection operator includes an edge operator SobelX in the X direction and an edge operator SobelY in the Y direction.
5. The X-ray image after the second enhancement processing is subjected to a third enhancement processing by using Algorithm 3, where Algorithm 3 is contrast-limited adaptive histogram equalization.
6. The X-ray image processing method according to claim 1, characterized in that: For, the X-ray image data includes the coefficient laplacianIntensity of operator A1, the coefficient m_unsharpMaskIntensity of operator A2, the coefficient m_claheRate of algorithm 3, the separately added edge processing parameter IsEdge and the gamma algorithm coefficient Normal_gamma.
7. Based on the X-ray image processing system, it is characterized by: include: An X-ray original image acquisition module acquires X-ray original images in real time or directly. The formats of X-ray original images include images in .xstd format and images in .xraw format; An X-ray original image preprocessing module preprocesses the collected X-ray original image to obtain a processed X-ray image; An X-ray image data loading module, which loads the pre-processed X-ray image data into the GPU; An X-ray image denoising processing module performs denoising processing based on X-ray image data and pre-processed X-ray images; The X-ray image combination enhancement processing module performs combination enhancement processing on the X-ray image after the denoising processing, and displays the X-ray image after the combination enhancement processing.
Citation Information
Patent Citations
Image processing method for channel type X-ray security inspection equipment
CN110889807A