X-ray image line data supplementing method compatible with different models
By calculating and supplementing line data, the image height of different models of X-ray security inspection equipment is made consistent, solving the problem of inconsistent image height, realizing unified display and processing, and facilitating the application of centralized image interpretation systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING HANGXING MACHINERY MFG CO LTD
- Filing Date
- 2022-12-21
- Publication Date
- 2026-04-10
AI Technical Summary
Due to differences in models and parameters, existing X-ray security inspection equipment produces X-ray images of the same package from the same viewing angle with inconsistent heights. This makes it difficult to adapt to image processing at different heights and to uniformly display and handle abnormal situations such as excessive image position offset.
By acquiring the original X-ray image data of the object and the target height, comparing and calculating the height difference, supplementing the line data, constructing a blank data array and inserting it into the original image data, and integrating multi-view image data to achieve a unified height.
It achieves adaptive processing of image height for different models of X-ray security inspection equipment, outputting X-ray images of uniform height, which facilitates unified display and processing by the subsequent centralized image interpretation system.
Smart Images

Figure CN115775320B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of security inspection equipment, and particularly relates to an X-ray image line data supplementing method compatible with different models. BACKGROUND
[0002] X-ray security inspection equipment is a commonly used special equipment for non-invasive inspection of articles in bags and packages through X-ray imaging. When X-rays pass through the articles, the internal structures of the articles with different material compositions, different densities and different thicknesses can absorb X-rays to different extents. The greater the density and thickness, the more X-rays are absorbed. The smaller the density and thickness, the less X-rays are absorbed. By recording the intensity of the transmitted X-rays and converting the data through calculation, the material of the object can be accurately analyzed, and different colors can be used for differentiation to obtain the image seen by the security inspector on the screen. Due to the large number of X-ray security inspection equipment models on the market, the parameter configurations for X-rays are different due to reasons such as the on-site environment.
[0003] Under different models of equipment, the X-ray images generated by the same package at the same viewing angle are inconsistent in height, making it difficult to display the X-ray images and draw the dangerous goods marking box in a unified manner. The existing image processing technology of security inspection equipment mainly discusses the identification of dangerous goods in X-ray images, and realizes the highlighting and identification of dangerous goods through deep learning or other image processing technologies. Such software products and hardware products have certain requirements for images, cannot adapt to images of different heights, and are difficult to handle abnormal situations such as large image position offset. Therefore, there is an urgent need for a data processing method for X-ray images compatible with different models to process and supplement the original image data, so that the image data can be displayed at a uniform height, laying a foundation for subsequent unified image processing interpretation. SUMMARY
[0004] In view of the above analysis, the present application aims to provide an X-ray image line data supplementing method compatible with different models to solve the problem that the X-ray images generated by the same package at the same viewing angle are inconsistent in height for different models of X-ray security inspection equipment, and the existing image processing technology of security inspection equipment cannot adapt to images of different heights and is difficult to handle abnormal situations such as large image position offset.
[0005] The main purpose of the present application is achieved through the following technical solutions:
[0006] The present application provides an X-ray image line data supplementing method compatible with different models, comprising the following steps:
[0007] Step 1: obtaining the original X-ray image data of the article and the target height;
[0008] Step 2: comparing the height of the original X-ray image with the target height;
[0009] If the target height is higher than the original image height, line data supplement is performed;
[0010] If the target height is not higher than the original height, no supplement is needed, and the original data is outputted;
[0011] Step 3: Line data supplement is performed on the original image data of the first view to obtain a line data set A1 of the first view;
[0012] Step 4: The original image data of the second view is processed to obtain a line data set A2 of the second view;
[0013] Step 5: The line data set A1 of the first view and the line data set A2 of the second view are integrated to obtain a line data set A of the dual-view X-ray radiogram;
[0014] Step 6: The dual-view X-ray radiogram is outputted.
[0015] Further, the target height is the maximum number of the heights of the X-ray original image data obtained by different models of X-ray security inspection equipment.
[0016] Further, in the step 2, the comparison of the original X-ray image height and the target height includes:
[0017] The height difference ΔH of the original X-ray image data height and the target height is calculated to obtain a height difference value diff_top of the top of the image to be supplemented and a height difference value diff_bottom of the bottom of the image to be supplemented.
[0018] Further, if the blank data is selected to be supplemented at the top of the original image, the diff_top is equal to the ΔH;
[0019] If the blank data is selected to be supplemented at the bottom of the original image, the diff_bottom is equal to the ΔH;
[0020] If the blank data is selected to be supplemented at the top and the bottom of the original image, the diff_top is equal to 1 / 2ΔH, and the diff_bottom is equal to 1 / 2ΔH.
[0021] Further, in the step 3, the line data supplement includes the following steps:
[0022] S31: Extracting the image data, image enhancement data, image color data, color index, low-energy data, and high-energy data array in each column of line data of the original image of the first view;
[0023] S32: Constructing the top blank data array and the bottom blank data array of the image data, the image enhancement data, the image color data, the color index, the low-energy data, and the high-energy data in each column of line data, respectively;
[0024] S33: Inserting the blank data array constructed in step S32 into the image data, the image enhancement data, the image color data, the color index, the low-energy data, and the high-energy data array of the original image corresponding line data, respectively;
[0025] S34: Integrating the image data, the image enhancement data, the image color data, the color index, the low-energy data, and the high-energy data after inserting the blank data array to obtain the line data set A1 under the first view angle.
[0026] Further, in step S32, the top blank data array and the bottom blank data array of the image data, the image enhancement data, the image color data, the color index, the low-energy data, and the high-energy data in each column of line data are constructed, respectively, including constructing the blank data array length and the blank data array element value of the top blank data array and the bottom blank data array, respectively.
[0027] Further, the top blank data array length is diff_top, and the bottom blank data array length is diff_bottom.
[0028] The blank data array element value is fixed and determined by the X-ray image renderer. For different image data, the blank data array element corresponding value is:
[0029] The image data (xrayData): 65530;
[0030] The image enhancement data (xrayDataEnhanced): 65530;
[0031] The image color data (material): 50;
[0032] The color index (colorIndex): 50;
[0033] The low-energy data (lowdata): 65530;
[0034] The high-energy data (highdata): 65530.
[0035] Further, in step S33, inserting the blank data array constructed in step S32 into the image data, the image enhancement data, the image color data, the color index, the low-energy data, and the high-energy data array of the original image corresponding line data, respectively, includes:
[0036] If it is the top blank data array, the insertion starts from the second data position of the corresponding data array.
[0037] If the bottom blank data array, from the corresponding data array from the second last position inserted.
[0038] Further, the step 4, processing the original image data under the second view, to get the second view of the line data set A2 includes:
[0039] Determine whether the original image under the second view exists data, if there is data, for the original image data under the second view line data supplement, get the second view of the line data set A2;
[0040] If the original image data is empty, directly output the original blank data, the second view of the line data set A2 obtained is empty data set;
[0041] In step 5, the line data set A of the dual view X-ray radiograph is {A1, A2}.
[0042] Further, the line data supplement method is suitable for different model X-ray security equipment centralized image interpretation scene.
[0043] Compared with the prior art, the present application can achieve at least one of the following beneficial effects:
[0044] 1. The method of the present application uses software algorithm to process the original image generated by X-ray security equipment with different models and different parameters, and makes the obtained X-ray image highly uniform by supplementing line data, which is convenient for subsequent display and processing of X-ray image.
[0045] 2. The method of the present application realizes adaptive processing of different X-ray image heights, and lays a foundation for subsequent unified image processing interpretation.
[0046] 3. The method of the present application can be applied to different model X-ray security equipment centralized image interpretation scene, by connecting multiple models of X-ray machine into the same centralized image interpretation system, processing different size X-ray images output by X-ray security equipment with different models and different parameters, outputting X-ray images with uniform height, making it applicable to the same centralized image interpretation system, and displaying and processing in the image interpretation system, which is convenient for subsequent intelligent interpretation or manual interpretation. BRIEF DESCRIPTION OF DRAWINGS
[0047] The accompanying drawings are included to provide a further understanding of the embodiments, and are incorporated in and constitute a part of this specification, illustrate embodiments of the application, and together with the description serve to explain the principles of the application, and should not be considered as limiting the scope of the application, in which the same reference numerals refer to the same components throughout the drawings.
[0048] Figure 1 The line data supplement flowchart of the present application;
[0049] Figure 2 The method flowchart of the present application. Detailed Implementation
[0050] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the examples of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0051] This invention provides a method for supplementing X-ray image line data compatible with different X-ray machine models, comprising the following steps:
[0052] Step 1: Obtain the original X-ray image data of the object and the target height;
[0053] Step 2: Compare the height of the original X-ray image with the height of the target; if the target height is higher than the original image height, perform line data supplementation; if the target height is not higher than the original height, no supplementation is needed, and the original data is output.
[0054] Step 3: Perform line data supplementation processing on the original image data from the first perspective to obtain the line data set A1 from the first perspective;
[0055] Step 4: Process the raw image data from the second perspective to obtain the line data set A2 from the second perspective;
[0056] Step 5: Integrate the line data set A1 from the first viewpoint and the line data set A2 from the second viewpoint to obtain the line data set A of the dual-view X-ray image;
[0057] Step 6: Output dual-view X-ray images.
[0058] Currently, there are numerous models of X-ray security inspection equipment on the market. Due to factors such as the on-site environment, the parameter configurations for X-rays vary. This results in inconsistent X-ray image heights for the same package from the same viewing angle across different equipment models, posing challenges for subsequent centralized image interpretation. Existing security inspection equipment image processing technologies use deep learning or other image processing techniques to highlight and identify hazardous materials in X-ray images. However, these methods cannot adapt to images of different heights and struggle to handle anomalies such as excessive image positional shifts. The method of this invention can connect multiple X-ray machine models to a single centralized image interpretation system. This system processes X-ray images of varying sizes output by X-ray security inspection equipment with different models and parameters, then outputs X-ray images of a uniform height, making them suitable for use within the same centralized image interpretation system. This unified display and processing facilitates subsequent intelligent or manual interpretation.
[0059] Specifically, in the step 1, the inputted original image data refers to a set of line data collected by an X-ray security inspection device, and the inputted target height is determined according to subsequent image display and processing requirements. Preferably, the maximum height of the X-ray original image data obtained by N X-ray security inspection devices of different models is taken as the target height.
[0060] It should be noted that the method of the present application is applicable to single-view and double-view X-ray security inspection devices. For single-view models, there is only data under the first view; for double-view models, there is data under the first view and the second view. When the line data is supplemented according to the method of the present application, the first view data is processed first, and then the second view data is processed. A complete X-ray image data includes a plurality of column line data.
[0061] Specifically, in the step 2, the line data includes line data under the first view and the second view, and each column line data under each view includes image data (XRayData), image enhancement data (XRayDataEnhanced), image color data (Material), color index (ColorIndex), low-energy data (LowData), and high-energy data (HighData). The six types of image data are all composed of ushort arrays.
[0062] In the step 2, comparing the height of the original X-ray image with the target height includes: calculating the height difference ΔH of the original X-ray image data height and the target height, obtaining the height difference value diff_top to be supplemented at the top of the image and the height difference value diff_bottom to be supplemented at the bottom of the image.
[0063] It should be noted that each column line data stores all data information (i.e. image data, image enhancement data, image color data, color index, low-energy data, and high-energy data) in the image display process of the column. Therefore, the supplement of the line data can be equivalent to the expansion of the original image. In order to increase the height of the original image while not affecting other characteristics of the original image, the method of the present application supplements blank data above or below the original image to increase the overall image height. If blank data is supplemented above the original image, then diff_top is equal to ΔH; if blank data is supplemented below the original image, then diff_bottom is equal to ΔH; if blank data is supplemented above and below the original image, then diff_top is equal to 1 / 2ΔH, and diff_bottom is equal to 1 / 2ΔH, i.e. the same height of blank data is supplemented above and below the original image, and diff_top and diff_bottom are both half of ΔH.
[0064] Specifically, in step 3, the line data supplementing includes the following steps:
[0065] S31: Extracting image data, image enhancement data, image color data, color index, low energy data, and high energy data in each column of line data of the original image under the first view angle;
[0066] S32: Constructing top blank data array and bottom blank data array of the image data, image enhancement data, image color data, color index, low energy data, and high energy data in each column of line data, respectively;
[0067] S33: Inserting the blank data array constructed in step S32 into the image data, image enhancement data, image color data, color index, low energy data, and high energy data array of the original image corresponding line data, respectively;
[0068] S34: Integrating the image data, image enhancement data, image color data, color index, low energy data, and high energy data after inserting the blank data array to obtain the line data set A1 under the first view angle.
[0069] It should be noted that in step S32, the top blank data array and the bottom blank data array of the image data, the image enhancement data, the image color data, the color index, the low energy data, and the high energy data in each column of line data are constructed, respectively, including constructing the blank data array length and the blank data array element value, respectively. The blank data array length is diff_top and diff_bottom, respectively, as described above, the size of diff_top and diff_bottom is determined by selecting the blank data supplement above and / or below the original image; the blank data array element value is fixed, determined by the X-ray image renderer, for different image data, the blank data array element corresponding value is:
[0070] Image data (xrayData): 65530
[0071] Image enhancement data (xrayDataEnhanced): 65530
[0072] Image color data (material): 50
[0073] Color index (colorIndex): 50
[0074] Low energy data (lowdata): 65530
[0075] High energy data (highdata): 65530
[0076] It should be noted that in step S33, when the empty data array is inserted into the corresponding image data, image enhancement data, image color data, color index, low energy data, and high energy data array, if it is a top blank data array, it is inserted after the corresponding data array header seal, that is, from the second data position in the array; if it is a bottom blank data array, it is inserted before the corresponding data array tail seal, that is, from the second last position in the array. The header seal and the tail seal respectively refer to the first value and the last value in the ushort array of the above six types of image data (image data, image enhancement data, image color data, color index, low energy data, and high energy data). That is, the first value and the last value in the ushort array of the six types of image data are fixed values, which are determined by the X-ray image data structure itself, and are called header seal and tail seal respectively. Specifically, the image data ushort array starts with 65530 and ends with 65530, and the middle can be any ushort value; the image enhancement data ushort array starts with 65530 and ends with 65530, and the middle can be any ushort value; the image color data ushort array starts with 50 and ends with 50, and the middle can be any ushort value; the color index ushort array starts with 50 and ends with 50, and the middle can be any ushort value; the low energy data ushort array starts with 64182 and ends with 65530, and the middle can be any ushort value; the high energy data ushort array starts with 64172 and ends with 65530, and the middle can be any ushort value. The height of the line data set A1 under the first view obtained finally is equal to the target height.
[0077] Specifically, after completing the first view line data supplement, step 4, processing the original image data under the second view to obtain the line data set A2 under the second view includes: judging whether the original image under the second view exists data, if the data exists, then the line data supplement is carried out for the original image data under the second view, the line data supplement method is consistent with the line data supplement method under the first view, and the line data set A2 under the second view is obtained; if the original image data under the second view is empty, then the line data set A2 under the second view obtained is empty data set, that is, there is no data in A2.
[0078] Specifically, in step 5, the line data set A1 under the first view and the line data set A2 under the second view are integrated to obtain the line data set A of the dual-view X-ray radiograph, and the line data set A of the dual-view X-ray radiograph is {A1, A2}.
[0079] The height of the line data set A of the double-view X-ray radiograph output by the different types of X-ray security inspection equipment treated by the method is equal to the target height, that is, the method processes the original images generated by the X-ray security inspection equipment with different types and different parameters, and makes the height of the obtained X-ray image equal to the target height by supplementing the line data, so that the image height is consistent, which is convenient for subsequent display and processing of the X-ray image. The method is applied to the access of multiple types of X-ray machines to the same set of centralized image judgment system, processes the X-ray images of different sizes output by the X-ray security inspection equipment with different types and different parameters, and outputs the X-ray images with uniform height, so that they can be applied to the same set of centralized image judgment system and are uniformly displayed and processed in the image judgment system, which is convenient for subsequent intelligent interpretation or manual interpretation.
[0080] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. The computer readable storage medium includes a magnetic disk, an optical disk, a read-only memory, a random access memory, etc.
[0081] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for supplementing X-ray image line data compatible with different models, characterized by, The method comprises the following steps: Step 1: obtaining original X-ray image data of an object, target height; Step 2: comparing the height of the original X-ray image with the target height; If the target height is higher than the original image height, line data is supplemented; If the target height is not higher than the original height, no supplement is needed, and the original data is outputted; Step 3: supplementing line data for the original image data of the first view to obtain a line data set A1 under the first view; Step 4: processing the original image data under the second view to obtain a line data set A2 under the second view; Step 5: integrating the line data set A1 under the first view and the line data set A2 under the second view to obtain a line data set A of the dual-view X-ray radiograph; Step 6: outputting the dual-view X-ray radiograph; In step 2, comparing the height of the original X-ray image with the target height comprises: calculating the height difference ΔH of the original X-ray image data height and the target height to obtain the height difference value diff_top needed to be supplemented at the top of the image and the height difference value diff_bottom needed to be supplemented at the bottom of the image; If blank data is selected to be supplemented at the top of the original image, the diff_top is equal to the ΔH; If blank data is selected to be supplemented at the bottom of the original image, the diff_bottom is equal to the ΔH; If blank data is selected to be supplemented at the top and the bottom of the original image, the diff_top is equal to 1 / 2ΔH, and the diff_bottom is equal to 1 / 2ΔH; In step 3, the line data supplementing comprises the following steps: S31: extracting image data, image enhancement data, image color data, color index, low-energy data and high-energy data array in each column of line data of the original image under the first view; S32: respectively constructing top blank data array and bottom blank data array of the image data, the image enhancement data, the image color data, the color index, the low-energy data and the high-energy data in each column of line data; S33: respectively inserting the blank data array constructed in step S32 into the image data, the image enhancement data, the image color data, the color index, the low-energy data and the high-energy data array of the corresponding line data of the original image; S34: integrating the image data, the image enhancement data, the image color data, the color index, the low-energy data and the high-energy data after the blank data array is inserted to obtain the line data set A1 under the first view.
2. The line data supplementing method according to claim 1, characterized by, The target height is the maximum number of the height of the X-ray original image data obtained by different models of X-ray security inspection equipment.
3. The line data supplementing method according to claim 1, characterized by, In step S32, respectively constructing the top blank data array and the bottom blank data array of the image data, the image enhancement data, the image color data, the color index, the low-energy data and the high-energy data in each column of line data comprises respectively constructing the blank data array length and the blank data array element value of the top blank data array and the bottom blank data array.
4. The line data supplementing method according to claim 1, characterized by, The top blank data array length is diff_top, and the bottom blank data array length is diff_bottom; The blank data array element value is fixed and determined by an X-ray image renderer, and for different image data, the blank data array element corresponding value is: Image data (xrayData) : 65530; Image enhanced data (xrayDataEnhanced) : 65530; Image color data (material) : 50; Color index (colorIndex) : 50; Low energy data (lowdata) : 65530; High energy data (highdata) : 65530.
5. The line data supplementing method according to claim 1, characterized by, In the step S33, the blank data array constructed in the step S32 is inserted into the image data, the image enhanced data, the image color data, the color index, the low energy data, and the high energy data array of the original image corresponding line data respectively, including: If it is a top blank data array, the insertion starts from the second data position in the corresponding data array; If it is a bottom blank data array, the insertion starts from the second last position in the corresponding data array.
6. The line data supplementing method according to claim 1, characterized by, In the step 4, the original image data under the second view angle is processed to obtain a line data set A2 under the second view angle, including: Judging whether the original image under the second view angle exists data, if the original image under the second view angle exists data, the line data supplement is carried out for the original image data under the second view angle to obtain the line data set A2 under the second view angle; if the original image data is empty, the original blank data is directly outputted to obtain the line data set A2 under the second view angle as a blank data set; In the step 5, the line data set A of the dual-view X-ray radiograph is A = {A1, A2}.
7. The line data replenishment method according to any one of claims 1 to 6, characterized by, The line data supplement method is suitable for the centralized judgment scene of different models of X-ray security inspection equipment.
Citation Information
Patent Citations
Non-destructive inspection of material in container
US20050105680A1
X-ray Image Processing System and Method Thereof
US20090034685A1