Processing method and system based on dual-energy X-ray security check image
By establishing a correction table, performing image calibration, dividing grayscale critical values, stretching and segmenting processing in security image processing, the problems of poor recognizable security image and noise are solved, high-quality and clear security image are achieved, and the accuracy and efficiency of security inspection are improved.
Patent Information
- Application Number
- CN202411672737.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, the poor recognizable degree and noise of security inspection images affect the picture judgment work of security inspectors.
By establishing a security image correction table, image calibration is performed by combining background image data and full-scale image data, greyscale data critical values are divided, and image stretching and background and foreground segmentation are performed.
It significantly improves the quality of security inspection images, reduces noise, enhances the recognizable image, and thus improves the accuracy and efficiency of security inspection.
Smart Images

Figure CN119624818A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a security inspection image processing technology, and in particular to a processing method and system based on dual-energy X-ray security inspection images. Background Art
[0002] Security inspection is an indispensable part of cargo transportation and passenger travel. Currently, X-ray machines are widely used in various security inspection scenarios. Trained staff can make a conclusion of safe release or interception and inspection by interpreting the two-dimensional scan images generated by the X-ray machine. As more advanced security inspection CT scanning equipment is gradually introduced into the venue, three-dimensional CT images provide more information for security inspectors, helping to more accurately identify objects that are prohibited from transportation or carrying. Although the quality of three-dimensional images is relatively low, it can improve the security inspectors' ability to identify threats. The subjectivity, experience dependence, and fatigue of security inspectors affect the reliability and stability of security inspections. Therefore, attempts at automated, semi-automated, or assisted identification tasks are particularly important.
[0003] X-ray security inspection equipment is widely used in security inspections in airports, subways, railways, etc. due to its advantages of low cost, high recognition and non-destructive testing. The security inspection images of the existing technology have poor recognition and noise. Summary of the invention
[0004] The present invention aims to solve the problem that the security inspection images in the prior art have poor recognizability and noise, which may affect the image judgment work of security inspectors, and provides a processing method and system based on dual-energy X-ray security inspection images.
[0005] In order to solve the above technical problems, the present invention is solved by the following technical solutions:
[0006] A processing method based on dual-energy X-ray security inspection images, the method comprising:
[0007] The security inspection image correction table is established by using the background image data empty and the full image data full of the security inspection machine.
[0008] Original image acquisition: real-time acquisition of original images from security inspection machines;
[0009] Calibration of security inspection images: Calibration of security inspection images is performed by combining the background image data empty of the security inspection machine, the full image data full of the security inspection machine and the original image of the security inspection machine;
[0010] Division of grayscale data critical values: statistical security inspection image data is used to divide grayscale data critical values;
[0011] Stretching of security inspection images, combining the division of grayscale data critical values to stretch security inspection images;
[0012] The background image of the security inspection image and the foreground image of the security inspection image are segmented and processed. The background image of the security inspection image and the foreground image of the security inspection image are segmented and processed for the stretched security inspection image.
[0013] Preferably, the security inspection image correction table is established by subtracting the full-scale image data full of the security inspection machine from the background image data empty of the security inspection machine.
[0014] Preferably, the calibration of the security inspection image includes:
[0015] The background image data empty of the security inspection machine and the full image data full of the security inspection machine are combined with the formula to complete the image correction;
[0016] Dst1[n]=(Src[n]-empty[n]) / (full[n]-empty[n]);
[0017] Where Dst1[n] is the calibration result of the nth point, and its value is between 0 and 1.0; Src[n] is the original package data of the nth point, empty[n] is the background mean value of the nth point, and full[n] is the full mean value of the nth point;
[0018] If the image needs to be corrected to 65535, Dst1[n]=Dst1[n]*65535;
[0019] Dst1[n]=(Src[n]-empty[n]) / (full[n]-empty[n])*65535;
[0020] Among them, the value range of n is [0, N-1], and N is the total number of detector points, that is, the image height.
[0021] Preferably, the division of grayscale data critical values is combined with security inspection image data, and a statistical method is used to obtain critical values for grayscale division:
[0022] The grayscale range of 60000 to 63500 is the critical grayscale range between background and valid data;
[0023] The grayscale range of 40000 to 55000 is the critical grayscale range for organic stretching;
[0024] The grayscale range of 17000 to 33000 is the critical grayscale range for mixture stretching;
[0025] The grayscale range of 800 to 2000 is the critical grayscale range for inorganic stretching;
[0026] A grayscale range less than 400 is the critical grayscale range of the indicator mode under the national standard or civil aviation standard.
[0027] 7. Preferably, the segmentation process of the background image and the foreground image of the security inspection image includes:
[0028] for Figure 2 The line segment 1 satisfies the linear function relationship: y = k*x + b;
[0029] Then stretch the curve to a grayscale 65535 curve, then we have
[0030] 65535=k1*x2+b; where x2 is the background segmentation parameter, which is a known variable, and b can be obtained;
[0031] According to the aforementioned correction relationship: y = x*(1 / (full-empty))-empty / (full-empty)*65535;
[0032] It can be concluded that k1 = 1 / (full-empty);
[0033] From the above relationship, we can get the equation that satisfies segment 1+segment 2+segment 3.
[0034] Preferably, the method further includes post-processing of the security inspection image, and performing post-processing on the segmented security inspection image.
[0035] In order to solve the above technical problems, the present invention also provides a processing system based on dual-energy X-ray security inspection images, which includes:
[0036] The security inspection image correction table establishment module establishes the security inspection image correction table through the background image data empty of the security inspection machine and the full image data full of the security inspection machine;
[0037] The original image acquisition module acquires the original image of the security inspection machine in real time;
[0038] The calibration module of the security inspection image combines the background image data empty of the security inspection machine, the full image data full of the security inspection machine and the original image of the security inspection machine to calibrate the security inspection image;
[0039] A grayscale data critical value division module is used to divide the grayscale data critical value by counting the security inspection image data;
[0040] The security inspection image stretching module combines the division of grayscale data critical values to stretch the security inspection image;
[0041] The background image and foreground image segmentation processing module of the security inspection image performs segmentation processing on the background image and foreground image of the security inspection image after stretching.
[0042] The present invention has significant technical effects due to the adoption of the above technical solution:
[0043] The present invention is developed using C++ language and QT. Based on the background image data, full-scale image data and original image data collected by the security inspection machine, the image calibration is completed through the basic normalization method. Then, through a large number of image analyses, the critical values of different response curves of the detector are obtained, and the image is processed by the image stretching method to obtain a high-quality and clear image with minimal difference.
[0044] The above method of the present invention can read the dual-energy X-ray original image in a proprietary format, which is convenient for users to use. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a flow chart of the present invention;
[0046] Figure 2 Calibration and background segmentation graphs for prior art;
[0047] Figure 3 This is a curve diagram of the first step of calibration and background segmentation of the present invention;
[0048] Figure 4 The second step curve diagram for calibration and background segmentation of the present invention;
[0049] Figure 5 It is a complete curve diagram of calibration and background segmentation of the present invention;
[0050] Figure 6-1 This is the image 1 obtained by the general method; Figure 6-2 is the image 1 obtained by the present invention;
[0051] Figure 7-1 This is the image 2 obtained by the general method; Figure 7-2 This is the image 2 obtained by the present invention. DETAILED DESCRIPTION
[0052] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0053] Example 1
[0054] Based on the dual-energy X-ray security inspection image processing method, Figure 1 The methods include:
[0055] The security inspection image correction table is established by using the background image data empty and the full image data full of the security inspection machine.
[0056] Original image acquisition: real-time acquisition of original images from security inspection machines;
[0057] Calibration of security inspection images: Calibration of security inspection images is performed by combining the background image data empty of the security inspection machine, the full image data full of the security inspection machine and the original image of the security inspection machine;
[0058] Division of grayscale data critical values: statistical security inspection image data is used to divide grayscale data critical values;
[0059] Stretching of security inspection images, combining the division of grayscale data critical values to stretch security inspection images;
[0060] The background image of the security inspection image and the foreground image of the security inspection image are segmented and processed. The background image of the security inspection image and the foreground image of the security inspection image are segmented and processed for the stretched security inspection image.
[0061] The security inspection image correction table is established by subtracting the full-scale image data of the security inspection machine from the background image data of the security inspection machine, empty.
[0062] The calibration of the security inspection image includes: the background image data of the security inspection machine, empty, and the full image data of the security inspection machine, combined with the formula to complete the image correction;
[0063] Dst1[n]=(Src[n]-empty[n]) / (full[n]-empty[n]);
[0064] Where Dst1[n] is the calibration result of the nth point, and its value is between 0 and 1.0; Src[n] is the original package data of the nth point, empty[n] is the background mean value of the nth point, and full[n] is the full mean value of the nth point;
[0065] If the image needs to be corrected to 65535, Dst1[n]=Dst1[n]*65535;
[0066] Dst1[n]=(Src[n]-empty[n]) / (full[n]-empty[n])*65535;
[0067] Among them, the value range of n is [0, N-1], and N is the total number of detector points, that is, the image height.
[0068] Division of grayscale data critical values Combined with security inspection image data, statistical methods are used to obtain critical values for grayscale division:
[0069] The grayscale range of 60000 to 63500 is the critical grayscale range between background and valid data;
[0070] The grayscale range of 40000 to 55000 is the critical grayscale range for organic stretching;
[0071] The grayscale range of 17000 to 33000 is the critical grayscale range for mixture stretching;
[0072] The grayscale range of 800 to 2000 is the critical grayscale range for inorganic stretching;
[0073] A grayscale range less than 400 is the critical grayscale range of the indicator mode under the national standard or civil aviation standard.
[0074] The segmentation process of the background image and the foreground image of the security inspection image includes:
[0075] for Figure 2 The line segment 1 satisfies the linear function relationship: y = k*x + b;
[0076] Then stretch the curve to a grayscale 65535 curve, then we have
[0077] 65535=k1*x2+b; where x2 is the background segmentation parameter, which is a known variable, and b can be obtained;
[0078] According to the aforementioned correction relationship: y = x*(1 / (full-empty))-empty / (full-empty)*65535;
[0079] It can be concluded that k1 = 1 / (full-empty);
[0080] From the above relationship, we can get the equation that satisfies segment 1+segment 2+segment 3.
[0081] Example 2
[0082] Based on Example 1, in this embodiment, the detectors used for the security inspection machine are all linear array detectors, which are basically calibrated point by point by column. When collecting background and full scale, this method usually collects no less than 100 columns in order to reduce errors, and then uses 60-80 columns to calculate the average value. The average value of the current pixel point is used as the background and full scale reference data for calibration. Since each calibration needs to use the difference between the full scale and the background as the benchmark, it is beneficial to calculate the difference in advance and establish a calibration table to improve the efficiency of later calculations.
[0083] Figure 2 The common foreground and background segmentation method is to determine a value NoiseWhiteValue between 0-65535, mostly around 60000, and directly set the points above this value after calibration to 65535, which is the background target value. This can solve some problems, but there will be a large gap between the values of NoiseWhiteValue and 65535, and many orange and white interlaced noises will be generated in the inorganic area, reducing the overall quality of the image.
[0084] It also includes post-processing of security inspection images, and performs various image post-processing on the segmented security inspection images to make them more recognizable and high-definition.
[0085] Combination Figure 3-Figure 5 Line segment 1+line segment 2+line segment 3 is the theoretical corrected curve. Theoretically, its linear relationship conforms to y=k*x+b, which can be obtained by the following two points:
[0086] 0=k*empty,
[0087] 65535 = k*xfull+b, where empty is the background value and xfull is the background segmentation value
[0088] According to the above two equations, the theoretical standard curve equation can be obtained.
[0089] Segment 1+Segment 2+Segment 5 is the background segmentation curve of the common method, and a fault will be formed in the middle, that is, when the calibration value is higher than the background segmentation value, all are forced to 65535, resulting in poor image quality, many noise points, and the effective area of high grayscale organic matter may be eliminated. Figure 6-1 and Figure 6-2 and Figure 7-1 and Figure 7-2 , with higher clarity and recognizability, further improving security inspection efficiency and accuracy.
[0090] Example 3
[0091] Based on the above embodiment, this embodiment is a processing system based on dual-energy X-ray security inspection images, which includes:
[0092] The security inspection image correction table establishment module establishes the security inspection image correction table through the background image data empty of the security inspection machine and the full image data full of the security inspection machine;
[0093] The original image acquisition module acquires the original image of the security inspection machine in real time;
[0094] The calibration module of the security inspection image combines the background image data empty of the security inspection machine, the full image data full of the security inspection machine and the original image of the security inspection machine to calibrate the security inspection image;
[0095] A grayscale data critical value division module is used to divide the grayscale data critical value by counting the security inspection image data;
[0096] The security inspection image stretching module combines the division of grayscale data critical values to stretch the security inspection image;
[0097] The background image and foreground image segmentation processing module of the security inspection image performs segmentation processing on the background image and foreground image of the security inspection image after stretching.
Claims
1. A processing method based on dual-energy X-ray security inspection images, the method comprising: The security inspection image correction table is established by using the background image data empty and the full image data full of the security inspection machine. Original image acquisition: real-time acquisition of original images from security inspection machines; Calibration of security inspection images: Calibration of security inspection images is performed by combining the background image data empty of the security inspection machine, the full image data full of the security inspection machine and the original image of the security inspection machine; Division of grayscale data critical values: statistical security inspection image data is used to divide grayscale data critical values; Stretching of security inspection images, combining the division of grayscale data critical values to stretch security inspection images; The background image of the security inspection image and the foreground image of the security inspection image are segmented and processed. The background image of the security inspection image and the foreground image of the security inspection image are segmented and processed for the stretched security inspection image.
2. The dual-energy X-ray security inspection image processing method according to claim 1, characterized in that: The security inspection image correction table is established by subtracting the full-scale image data of the security inspection machine from the background image data of the security inspection machine, empty.
3. The processing method based on dual-energy X-ray security inspection images according to claim 1 is characterized in that: The calibration of security inspection images includes: The background image data empty of the security inspection machine and the full image data full of the security inspection machine are combined with the formula to complete the image correction; Dst1[n]=(Src[n]-empty[n]) / (full[n]-empty[n]); Where Dst1[n] is the calibration result of the nth point, and its value is between 0 and 1.0; Src[n] is the original package data of the nth point, empty[n] is the background mean value of the nth point, and full[n] is the full mean value of the nth point; If the image needs to be corrected to 65535, Dst1[n]=Dst1[n]*65535; Dst1[n]=(Src[n]-empty[n]) / (full[n]-empty[n])*65535; Among them, the value range of n is [0, N-1], and N is the total number of detector points, that is, the image height.
4. The dual-energy X-ray security inspection image processing method according to claim 1, characterized in that: Division of grayscale data critical values Combined with security inspection image data, statistical methods are used to obtain critical values for grayscale division: The grayscale range of 60000 to 63500 is the critical grayscale range between background and valid data; The grayscale range of 40000 to 55000 is the critical grayscale range for organic stretching; The grayscale range of 17000 to 33000 is the critical grayscale range for mixture stretching; The grayscale range of 800 to 2000 is the critical grayscale range for inorganic stretching; A grayscale range less than 400 is the critical grayscale range of the indicator mode under the national standard or civil aviation standard.
5. The processing method based on dual-energy X-ray security inspection images according to claim 1 is characterized in that: The segmentation process of the background image and the foreground image of the security inspection image includes: For line segment 1, the linear function relationship is: y = k*x + b; If we stretch the curve to a grayscale of 65535, we have 65535=k1*x2+b; where x2 is the background segmentation parameter and b is a variable; According to the correction relationship: y = x*(1 / (full-empty))-empty / (full-empty)*65535; k1 = 1 / (full-empty); Thus, an equation satisfying segment 1+segment 2+segment 3 is obtained.
6. The dual-energy X-ray security inspection image processing method according to claim 1, characterized in that: The method also includes post-processing of the security inspection images, which is performed on the segmented security inspection images. The dual-energy X-ray security inspection image processing system is characterized by: The security inspection image correction table establishment module establishes the security inspection image correction table through the background image data empty of the security inspection machine and the full image data full of the security inspection machine; The original image acquisition module acquires the original image of the security inspection machine in real time; The calibration module of the security inspection image combines the background image data empty of the security inspection machine, the full image data full of the security inspection machine and the original image of the security inspection machine to calibrate the security inspection image; A grayscale data critical value division module is used to divide the grayscale data critical value by counting the security inspection image data; The security inspection image stretching module combines the division of grayscale data critical values to stretch the security inspection image; The background image and foreground image segmentation processing module of the security inspection image performs segmentation processing on the background image and foreground image of the security inspection image after stretching.