A cargo inspection system and method for discriminating materials in X-ray imaging cargo inspection
By combining the image processing modules of CPU and GPU in the cargo inspection system, using multi-threading and parallel computing tasks, the problem of high demand for X-ray image processing computing resources in cargo inspection is solved, and efficient image processing and real-time material recognition is achieved.
Patent Information
- Application Number
- CN202411081500.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-07
- Filing Date
- 2024-08-07
- Publication Date
- 2025-02-14
AI Technical Summary
X-ray image processing in cargo inspection requires high computing tasks and consumes a lot of computing resources. Especially when processing X-ray images in real time, the prior art is difficult to meet the computing needs.
Using an image processing module combining a central processing unit (CPU) and a graphics processing unit (GPU), it improves the calculation through multi-threaded and parallel computing tasks, including image calibration, energy merging, noise filtering, grayscale value generation and material discrimination value generation. efficiency.
It significantly improves the image processing capability of the cargo inspection system, can efficiently process large amounts of data and identify different materials in the cargo in real time, meeting the high demand for computing resources.
Smart Images

Figure CN119439295A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a system and method for image processing in X-ray imaging cargo inspection. More particularly, the present invention relates to a system and method for material identification in X-ray imaging cargo inspection. Background Art
[0002] Image processing is used in cargo inspection systems to detect illegal or dangerous items that may be hidden within the cargo. Typically, image processing is performed by the central processing unit or CPU of the cargo inspection system. Initially, an X-ray scanner emits X-ray radiation that penetrates the cargo, and a radiation detector located on the opposite side of the X-ray scanner captures the X-ray radiation. The radiation detector generates an image of the X-ray attenuation pattern corresponding to the density of the material in the cargo. The image is then pre-processed to improve the image quality by performing noise reduction, image filtering, contrast enhancement, etc. Once the pre-processing is completed, the image is analyzed to identify specific materials based on their physical properties, since some materials may have specific densities or atomic numbers that are different from other materials in the cargo. By analyzing the X-ray images for these differences, the system can identify and distinguish different types of materials within the cargo. Any suspicious objects can then be detected based on material identification of any suspicious objects in the image.
[0003] US Patent Publication US2007 / 0269013 discloses an example of image processing performed in cargo inspection, which relates to an apparatus and method for generating X-rays with different energy levels and a material identification system thereof. The method includes the following steps: generating a first pulse voltage, a second pulse voltage, a third pulse voltage, and a fourth pulse voltage; generating a first electron beam with a first beam load and a second electron beam with a second beam load based on the first pulse voltage and the second pulse voltage, respectively; generating a first microwave with a first power and a second microwave with a second power based on the third pulse voltage and the fourth pulse voltage, respectively; accelerating the first electron beam and the second electron beam using the first microwave and the second microwave, respectively, to obtain the accelerated first electron beam and the second electron beam; using the accelerated first electron beam and the second electron beam to impact a target to generate the first X-ray and the second X-ray with different energy levels. The image processing and material identification system classifies the digital signals collected after the interaction between the inspected object and the dual-energy X-ray beam based on the calibration curve relationship obtained by scanning a substance with known material properties, so as to determine the material properties of the inspected object, such as organic matter, light metal, inorganic matter, heavy metal, etc.
[0004] Another example of image processing performed in cargo inspection is disclosed in US Patent Publication US2007 / 0286329, which relates to an energy spectrum modulation device, a material identification method and an apparatus thereof, and an image processing method capable of identifying materials in large and medium-sized objects (such as cargo containers, air cargo containers, etc.) by using X-rays with different energy levels. The energy spectrum modulation device includes: a first energy spectrum modulation part, which is used to modulate a first ray with a first energy spectrum; and a second energy spectrum modulation part, which is coupled to the first energy spectrum modulation part and is used to modulate a second ray with a second energy spectrum different from the first energy spectrum. When identifying an unknown material, a classification function value of the detection value of the detector is calculated based on two function values of the detection value. Then, the calculated value is compared with a predetermined classification function value to obtain an effective atomic number range of the material, and the material properties of the object are also determined.
[0005] Image processing of X-ray images in cargo inspection requires a high computational task that consumes a large amount of computing resources. This is due to the large amount of data generated by the X-ray detectors, and the complexity of the computational methods used for material discrimination. In addition, the need to process X-ray images in real time as the cargo moves through the X-ray scanners and detectors further increases the computational requirements.
[0006] Therefore, there is a need to improve image processing for cargo inspection in order to meet the above-mentioned computational demands. Summary of the invention
[0007] According to a first aspect of the present invention, a cargo inspection system (100) is disclosed. The cargo inspection system (100) includes: a gateway (110) having at least one radiation source (120) on one side and at least one radiation detector (130) on the other side; and an image processing module connected to the at least one radiation detector (130), wherein the image processing module is configured to generate one or more images based on multiple image frames of captured radiation and identify the material of the captured radiation. The image processing module is characterized by: at least one central processing unit or CPU; and at least one graphics processing unit or GPU connected to the CPU. The at least one CPU includes: a first CPU thread configured to obtain image frames of scanned cargo contents from the at least one radiation detector (130); a second CPU thread configured to perform image combination based on generated grayscale values; a third CPU thread configured to perform image combination on multiple material-identified image frames based on generated material identification values; and a fourth CPU thread configured to synthesize at least one unified material image. The at least one GPU includes a kernel engine having multiple GPU threads, wherein the kernel engine is configured to perform computing tasks of image calibration, energy merging, noise filtering, grayscale value generation, and material discrimination value generation, and wherein each GPU thread is configured to simultaneously perform one of the computing tasks of the kernel engine; and, at least one copy engine configured to perform data transfer between the GPU and the CPU.
[0008] Preferably, the image processing module further comprises a fifth CPU thread, wherein the fifth CPU thread is configured to display the composite grayscale image, at least one composite material identification image or at least one unified material image.
[0009] Preferably, the first copy engine of the GPU is configured to copy the image frame from the first thread of the CPU to the core engine of the GPU. In addition, the second copy engine is suitably configured to copy the grayscale value and the material discrimination value from the core engine to the second CPU thread and the third CPU thread respectively.
[0010] Preferably, the image processing module is also connected to a remote station or monitor.
[0011] According to a second aspect of the present invention, a method for identifying materials in X-ray imaging cargo inspection is disclosed. The method is characterized by the following steps: capturing radiation that penetrates a portion of the cargo, wherein the captured radiation takes the form of an image frame; sending a set of image frames to an image processing module at one instance; copying the set of image frames to a core engine of a GPU; performing a computational task of image calibration on the copied set of image frames to produce a calibrated set of image frames; performing a computational task of energy merging on the calibrated set of image frames to produce a merged set of image frames; performing a computational task of grayscale value generation in parallel with a computational task of noise filtering and material identification value generation, wherein the computational task of grayscale value generation generates multiple grayscale values in a 64-bit grayscale image format, the computational task of noise filtering generates a filtered set of image frames, and the computational task of grayscale value generation generates red, green, blue, and alpha values. or RGBA 64-bit format; once the plurality of grayscale values in the 64-bit grayscale image format have been generated, performing an image combination of the plurality of grayscale values generated based on the set of image frames with a plurality of grayscale values generated based on at least one previous set of image frames, wherein the image combination of the plurality of grayscale values produces a composite grayscale image; once the plurality of material discrimination values in the RGBA 64-bit format have been generated, performing an image combination of the plurality of material discrimination values generated based on the set of image frames with a plurality of material discrimination values generated based on at least one set of image frames, wherein the image combination of the plurality of material discrimination values produces a composite discrimination image; and synthesizing a unified material image by superimposing the composite discrimination image on the composite grayscale image. The computational task of image calibration includes: assigning different GPU threads to different pixels of the copied set of image frames; and, performing image calibration on different pixels of the copied set of image frames simultaneously by each assigned GPU thread. The computational task of energy merging includes: assigning different GPU threads to different pixels of the calibrated image frame set; and, each assigned GPU thread simultaneously interleaving each pixel line of a calibrated image frame at one energy level with another calibrated image frame at the same energy level.
[0012] Preferably, every two of the image frames correspond to a specific energy level of radiation.
[0013] Preferably, the image calibration is performed by adjusting each pixel value of the copied set of image frames and scaling each adjusted pixel value of the copied set of image frames.
[0014] Preferably, performing the computational task of grayscale value generation comprises: averaging the pixel values from each merged image frame at corresponding pixel coordinates to generate a mean grayscale image frame; and converting each pixel of the mean grayscale image frame to the 64-bit grayscale image format;
[0015] Preferably, performing the computational task of generating grayscale values comprises: selecting a merged image among the merged images; and converting each pixel of the selected merged image into the 64-bit grayscale image format.
[0016] Preferably, the computational task of performing noise filtering includes: assigning different GPU threads to different pixels of the merged image frame set; and, each assigned GPU thread simultaneously performs noise filtering on each pixel of the merged image frame set. The noise filtering is suitably performed using a bilateral filtering technique, and wherein the bilateral filtering technique includes: determining neighboring pixels around the filtered pixel based on a predetermined filter window size; calculating a range weight and a normalization factor for the filtered pixel; and determining a filtered pixel value and applying the filtered pixel value to the filtered pixel. Optionally, the noise filtering is suitably performed using a median filter, a Gaussian filter, a mean filter, a non-local mean filter, an adaptive manifold filter, a Perona-Malik diffusion, or a trilateral filter.
[0017] Preferably, the computational task of performing material discrimination value generation includes: calculating a function value for each pixel; determining the proximity of each function value to a plurality of trend lines on a pre-generated material classification curve; and, based on the proximity of the function value of each pixel to the trend lines on the pre-generated material classification curve, classifying each pixel into its corresponding material type. If more than two energy levels are emitted and captured, the computational task of performing material discrimination value generation also includes: selecting two additional pairs of energy levels as a second filter for material verification; calculating the function value of both the first energy level pair and the second energy level pair for each pixel; determining the proximity of each function value to the center of each of a plurality of pre-generated material clusters; and, based on the proximity of the function value of each pixel to the center of each pre-generated material cluster, classifying each pixel into its corresponding material group; and, generating each pixel value in red, green, blue, and alpha or RGBA channel colors based on a color lookup table to correspond to a specific material type or material group.
[0018] Preferably, the method further comprises the step of displaying the unified material image, the composite grayscale image or the composite material identification image.
[0019] According to a third aspect of the present invention, a method for identifying materials in X-ray imaging cargo inspection is disclosed. The method is characterized by the following steps: capturing radiation that penetrates a portion of the cargo, wherein the captured radiation takes the form of an image frame; sending a set of image frames to an image processing module at one instance; copying the set of image frames to a core engine of a GPU; performing a computational task of image calibration on the copied set of image frames to generate a calibrated set of image frames; performing a computational task of energy merging on the calibrated set of image frames to generate a merged set of image frames; determining whether there are sufficient computational resources to perform a computational task of grayscale value generation in parallel with the computational tasks of noise filtering and material discrimination value generation; if there are sufficient computational resources, performing a computational task of grayscale value generation in parallel with the computational tasks of noise filtering and material discrimination value generation, wherein the computational task of grayscale value generation generates multiple grayscale values in a 64-bit grayscale image format, the computational task of noise filtering generates a filtered set of image frames, and the computational task of grayscale value generation generates red, green, blue, and alpha or RGBA a plurality of material discrimination values in a 64-bit format; if insufficient computing resources exist, performing computing tasks of grayscale value generation, noise filtering, and material discrimination value generation, wherein the computing task of grayscale value generation generates a plurality of grayscale values in a 64-bit grayscale image format, the computing task of noise filtering produces a filtered image frame set, and the computing task of grayscale value generation generates a plurality of material discrimination values in a red, green, blue, and alpha or RGBA 64-bit format; once the plurality of grayscale values in the 64-bit grayscale image format have been generated, performing image combination of the plurality of grayscale values generated based on the image frame set with a plurality of grayscale values generated based on at least one previous image frame set, wherein the image combination of the plurality of grayscale values produces a composite grayscale image; once the RGBA The method comprises the steps of: generating a plurality of material discrimination values in a 64-bit format, performing image combination on the plurality of material discrimination values generated based on the set of image frames and the plurality of material discrimination values generated based on at least one set of image frames, wherein the image combination of the plurality of material discrimination values produces a composite material discrimination image; and synthesizing a unified material image by superimposing the composite material discrimination image on the composite grayscale image. The computational task of image calibration comprises: assigning different GPU threads to different pixels of the copied set of image frames; and, performing image calibration on different pixels of the copied set of image frames simultaneously by each assigned GPU thread. The computational task of energy merging comprises: assigning different GPU threads to different pixels of the calibrated set of image frames; and, interleaving each pixel line of a calibrated image frame at one energy level with another calibrated image frame at the same energy level by each assigned GPU thread.
[0020] Preferably, every two of the image frames correspond to a specific energy level of radiation.
[0021] Preferably, the image calibration is performed by adjusting each pixel value of the copied set of image frames and scaling each adjusted pixel value of the copied set of image frames.
[0022] Preferably, performing the computational task of grayscale value generation includes: averaging the pixel values from each merged image frame at corresponding pixel coordinates to generate a mean grayscale image frame; and converting each pixel of the mean grayscale image frame to the 64-bit grayscale image format.
[0023] Preferably, performing the computational task of generating grayscale values comprises: selecting a merged image among the merged images; and converting each pixel of the selected merged image into the 64-bit grayscale image format.
[0024] Preferably, the computational task of performing noise filtering includes: assigning different GPU threads to different pixels of the merged image frame set; and, each assigned GPU thread simultaneously performs noise filtering on each pixel of the merged image frame set. The noise filtering is suitably performed using a bilateral filtering technique, and wherein the bilateral filtering technique includes: determining neighboring pixels around the filtered pixel based on a predetermined filter window size; calculating a range weight and a normalization factor for the filtered pixel; and determining a filtered pixel value and applying the filtered pixel value to the filtered pixel. Optionally, the noise filtering is suitably performed using a median filter, a Gaussian filter, a mean filter, a non-local mean filter, an adaptive manifold filter, a Perona-Malik diffusion, or a trilateral filter.
[0025] Preferably, the computational task of performing material discrimination value generation includes: calculating a function value for each pixel; determining the proximity of each function value to a plurality of trend lines on a pre-generated material classification curve; and, classifying each pixel into its corresponding material type based on the proximity of the function value of each pixel to the trend lines on the pre-generated material classification curve. If there are more than two energy levels for emission and capture, the computational task of performing material discrimination value generation also includes: selecting two additional pairs of energy levels as a second filter for material verification; calculating the function value of both the first energy level pair and the second energy level pair for each pixel; determining the proximity of each function value to the center of each of a plurality of pre-generated material clusters; classifying each pixel into its corresponding material group based on the proximity of the function value of each pixel to the center of each pre-generated material cluster; and, generating each pixel value in red, green, blue, and alpha or RGBA channel colors based on a color lookup table to correspond to a specific material type or material group.
[0026] Preferably, the method further comprises the step of displaying a unified material image, a composite grayscale image or a composite material identification image. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0028] 1( ab ) illustrate an exemplary configuration of a cargo inspection system ( 100 ) for scanning cargo.
[0029] Figure 2 An example of a scan line is shown.
[0030] Figure 3 An exemplary grid structure of multiple GPU threads of a GPU of the cargo inspection system (100) is shown.
[0031] Figure 4 A method for distinguishing materials in X-ray imaging cargo inspection according to a first embodiment of the present invention is shown.
[0032] Figure 5 A method for distinguishing materials in X-ray imaging cargo inspection according to a second embodiment of the present invention is shown.
[0033] Figure 6 An exemplary image frame produced by a radiation detector (130) of a cargo inspection system (100) is shown.
[0034] Figure 7 An example of a calibrated set of image frames is shown.
[0035] Figure 8An example of a merged set of image frames is shown.
[0036] Fig. 9 An exemplary image of converted pixel values of a mean grayscale image frame is shown. DETAILED DESCRIPTION
[0037] Preferred embodiments of the present invention will be described below with reference to the accompanying drawings. In the following description, well-known functions or constructions are not described in detail because they would obscure the description with unnecessary detail.
[0038] First, reference is made to FIG. 1 (ab), which illustrates an exemplary configuration of a cargo inspection system (100) for scanning cargo. The cargo inspection system (100) is used to scan cargo transported by a vehicle such as a van or truck. The cargo inspection system (100) uses a radiation beam to scan the cargo as the cargo is driven through a gate (110). Generally, the cargo inspection system (100) includes: a gate (110) having at least one radiation source (120) on one side and at least one radiation detector (130) on the other side; and an image processing module.
[0039] The radiation source (120) can emit radiation beams at one or more energy levels. The radiation source (120) can be a linear particle accelerator or a cyclic linear accelerator. The radiation source is arranged on one side of the gateway (110).
[0040] The radiation detector (130) is arranged on the other side of the gate (110), which can be the upper side of the gate (110), or the opposite side of the radiation source (120). The radiation detector (130) captures and measures the radiation that penetrates the cargo. Therefore, the radiation detector (130) outputs one or more image frames based on the radiation captured at one or more energy levels. Each image frame is related to the radiation captured at a specific energy level. Each pixel value of the image frame includes the transmitted radiation and the attenuation characteristic value. Each image frame is a collection of multiple scan lines, wherein a scan line refers to a slice of the image captured at a specific time sequence when the cargo passes through the gate (110). Figure 2Exemplary scan lines are shown in . If there is more than one radiation detector (130), each radiation detector (130) can be aligned and positioned at different angles apart from the radiation source module (120) to capture different perspective angles, detect and capture radiation passing through the cargo at different perspective angles. Therefore, each radiation detector (130) outputs an image frame, which is a collection of multiple scan lines of the same energy level and the same perspective angle. For example, an image frame is a collection of 64 scan lines of the same energy level and the same perspective angle. By having multiple radiation detectors (130) that capture different perspective angles, each area of the cargo can be scanned when the cargo is driven through the gate (110). At least one radiation detector (130) is electrically connected to the image processing module.
[0041] The image processing module is configured to generate one or more images based on the image frames of the captured radiation. In addition, the image processing module is configured to discern materials in the X-ray imaging of the captured radiation for cargo inspection. The image processing module includes at least one central processing unit or CPU connected to at least one graphics processing unit or GPU.
[0042] The CPU has multiple CPU threads, each thread is configured to perform a specific computing function, so that the CPU can perform multiple computing functions simultaneously. The first CPU thread is configured to obtain an image frame of the scanned cargo content from at least one radiation detector (130).
[0043] The second CPU thread is configured to perform image combination based on grayscale values generated by the GPU on the current image frame and one or more previous image frames. The image combination includes aligning, blending and merging the grayscale values of the multiple image frames. Thus, the second CPU thread generates a composite grayscale image that is a combined and visually continuous panoramic view of the contents of the scanned cargo.
[0044] The third CPU thread is configured to perform image combination on multiple material-identified image frames based on material discrimination values generated by the GPU on the current image frame and one or more previous image frames. The image combination includes aligning, blending and merging the material discrimination values of multiple material-identified image frames for a specific material, and thereby generating a composite material discrimination image, which is a combined and visually continuous representation of the distribution of the specific material within the scanned cargo. The third CPU thread can also generate multiple composite material discrimination images, wherein each composite material discrimination image is a representation of the distribution of a specific material.
[0045] The fourth CPU thread is configured to synthesize a unified material image, wherein the unified material image is a unified image that incorporates multiple material distributions to provide a comprehensive view of material information within the scanned cargo. Different from incorporating multiple material distributions, the unified material image can also be incorporated into only one material distribution, and thus the fourth CPU thread can synthesize multiple unified material images.
[0046] The CPU may further include a fifth CPU thread configured to display at least one of the composite grayscale image, the composite material discrimination image, or at least one of the unified material images. Optionally, the computational functionality of the fifth CPU thread may be applicable to the first, second, third, or fourth CPU threads.
[0047] The GPU is configured to perform multiple computational tasks on an image frame, wherein the computational tasks include image calibration, energy merging, noise filtering, grayscale value generation, and material discrimination value generation. The GPU utilizes its multiple asynchronous execution streams, which are software abstractions that manage the parallel execution of the computational tasks of image calibration, energy merging, noise filtering, grayscale value generation, and material discrimination value generation. The multiple asynchronous execution streams provide a way to overlap computational tasks with data transfers between the CPU and the GPU. Due to the utilization of multiple asynchronous execution streams, the GPU achieves better performance by exploiting parallelism and reducing latency.
[0048] The GPU includes a core engine and at least one replication engine. The core engine is configured to perform computing tasks such as image calibration, energy merging, noise filtering, grayscale value generation, and material discrimination value generation. The core engine has multiple GPU threads, wherein each GPU thread is configured to simultaneously perform one of the computing tasks of the core engine. The GPU threads are organized in a hierarchical structure, wherein the GPU threads are grouped into multiple blocks, and the blocks are grouped into grids. This structure of the GPU threads allows efficient parallel execution of computing tasks on the core engine. Figure 3 An exemplary grid structure of GPU threads is shown. In the exemplary grid structure, there are 15 total GPU threads configured in a 3 by 5 grid, wherein a first computing task is assigned to 4 GPU threads in a 2 by 2 grid, and a second computing task is assigned to 9 GPU threads in a 3 by 3 grid.
[0049] At least one copy engine is configured to perform data transfer between the GPU and the CPU. Suitably, the GPU has two copy engines, wherein the first copy engine is configured to copy the image frame from the first thread of the CPU to the core engine of the GPU, and the second copy engine is configured to copy the grayscale value and the material discrimination value from the core engine to the second CPU thread and the third CPU thread of the CPU, respectively. It is understood that the GPU may have only one copy engine, whereby all data transfers are performed by the single copy engine.
[0050] The image processing module may also be connected to a remote station or monitor for displaying the image generated by the image processing module, whereby the displayed image may be at least one of a composite grayscale image, a composite material discrimination image, or at least one of a unified material image. Thus, an operator may also inspect the displayed image.
[0051] Reference now Figure 4 , showing a flow chart of a method for identifying materials in X-ray imaging cargo inspection according to a first embodiment of the present invention.
[0052] When the cargo enters the gate (110), the radiation source (120) emits a radiation beam that penetrates a portion of the cargo. At the same time, the radiation detector (130) captures and measures the radiation that penetrates the portion of the cargo, as described in step 1200. Accordingly, as described in step 1201, the radiation detector (130) sends the captured radiation to the image processing module in the form of image frames. Preferably, the radiation detector (130) sends a set of image frames to the image processing module at one instance, wherein every two image frames in the image frames correspond to a specific energy level of the emitted radiation beam. Figure 6 An exemplary set of image frames is shown in which a first image frame (10) and a second image frame (20) correspond to the same high energy level of the emitted radiation beam, and a third image frame (30) and a fourth image frame (40) correspond to the same low energy level of the emitted radiation beam.
[0053] Once the image frame set has been sent to the image processing module, the first CPU thread of the CPU receives the image frame set, as described in step 1202. The image frame set is then sent from the first CPU thread to the GPU. Next, the first copy engine of the GPU copies the image frame set to the core engine of the GPU, as described in step 1203. Then, the method proceeds to step 1204.
[0054] In step 1204, the core engine of the GPU performs the computational task of image calibration on the copied image frame set. The core engine performs the computational task of image calibration by the following operations: assigning different GPU threads to different pixels of the copied image frame set; and, simultaneously, performing image calibration on different pixels of the copied image frame set by each assigned GPU thread. Alternatively, each GPU thread can be assigned to multiple pixels to perform the computational task of image calibration simultaneously. Image calibration is essential when processing image frames to reduce noise in the image frame set so that objects of the cargo contents are more visible. Specifically, image calibration is performed by adjusting each pixel value of the copied image frame set and scaling each adjusted pixel value of the copied image frame set.
[0055] The adjustment of each pixel value of the replicated image frame set is performed by applying a first compensation value of the cargo inspection system, wherein the first compensation value is a compensation value for the hardware layout of the cargo inspection system. The first compensation value is predetermined based on radiometric measurements of a known reference object or a calibration phantom with well-characterized properties. The radiometric measurements of the known reference object or calibration phantom help identify spatial features and variations introduced by the hardware layout across different regions of the reference image, so the first compensation value can be calculated based on the spatial features and variations. By adjusting each pixel value of the replicated image frame set, the replicated image frame set is calibrated by taking into account the spatial variations introduced by the specific configuration and arrangement of components in the cargo inspection system. This ensures that radiometric measurements from different regions of the replicated image frame set are adjusted so that the radiometric measurements or pixel values are aligned with the expected spatial features and therefore reflect a consistent and accurate representation of the contents of the scanned cargo.
[0056] Scaling of each adjusted pixel value of the copied set of image frames is performed by normalizing each adjusted pixel value of the copied set of image frames using a second compensation value, wherein the second compensation value is a compensation value for dose fluctuations. The second compensation value is predetermined based on a difference between a measured or estimated X-ray dose value and a reference X-ray dose value. By scaling the adjusted pixel values of the copied set of image frames, the copied set of image frames is calibrated by taking into account X-ray dose fluctuations caused by factors such as X-ray source instability, changes in system settings, positioning of the scanned object, or other environmental conditions during X-ray imaging. By aligning the pixel values closer to the expected dose conditions, this ensures that the copied set of image frames accurately represents the material composition and characteristics of the scanned cargo.
[0057] As a result of the computational task of image calibration, a set of calibrated image frames is produced. Figure 7An example of the calibrated image frame set is shown, wherein the calibrated image frame set is Figure 6 The method further comprises generating a result of image calibration of the image frame set shown in . Specifically, the first calibrated image frame (11) is the result of image calibration performed on the first image frame (10), the second calibrated image frame (21) is the result of image calibration performed on the second image frame (20), the third calibrated image frame (31) is the result of image calibration performed on the third image frame (30), and the fourth calibrated image frame (41) is the result of image calibration performed on the fourth image frame (40). Once the calibrated image frame set is generated, the method proceeds to step 1205.
[0058] In step 1205, the core engine of the GPU performs the energy merging computing task on the calibrated image frame set. In the case where the calibrated image frame set has a pair of calibrated image frames at one energy level, the core engine merges the pair of calibrated image frames at the same energy level into a single image frame. The core engine performs the energy merging computing task by the following steps: assigning different GPU threads to different pixels of the calibrated image frame set; and, at the same time, each assigned GPU thread on different pixels of the calibrated image frame set interleaves a calibrated image frame at one energy level with each pixel line of another calibrated image frame at the same energy level. Alternatively, each GPU thread can be assigned to multiple pixels to perform the energy merging computing task simultaneously. As a result of the energy merging computing task, a merged image frame set is generated. Figure 8 An example of a merged set of image frames is shown as a result of the kernel engine processing Figure 7 The set of calibrated image frames shown is the result of energy merging, wherein the first merged image frame (12) is the result of merging the first calibrated image frame (11) and the second calibrated image frame (21), and the second merged image frame (22) is the result of merging the third calibrated image frame (31) and the fourth calibrated image frame (41).
[0059] Accordingly, the core engine of the GPU performs the calculation task of grayscale value generation in step 1206 in parallel with the calculation task of noise filtering in step 1208 and the material discrimination value generation in step 1209 .
[0060] In step 1206, the core engine of the GPU generates grayscale values of the merged image frame set by: averaging the pixel values from each merged image frame at the corresponding pixel coordinates to generate a mean grayscale image frame; and converting each pixel of the mean grayscale image frame to a 64-bit grayscale image format. Therefore, the calculation task of grayscale value generation generates multiple grayscale values in a 64-bit grayscale image format, which improves the signal-to-noise ratio and improves the image quality of the scanned goods by averaging the pixel values of the merged image frames at different energy levels. Then, as described in step 1207, the converted pixel values of the mean grayscale image frame are copied to the second CPU thread by the second copy engine of the GPU. Fig. 9 An exemplary image showing converted pixel values of a mean grayscale image frame is shown, wherein the mean grayscale image frame is based on Figure 8 Although the core engine of the GPU has been described as generating grayscale values by averaging pixel values from each merged image frame, the core engine of the GPU may also be adapted to generate grayscale values by selecting one of the merged images and converting each pixel of the selected merged image into a 64-bit grayscale image format.
[0061] Once the converted pixel values have been copied to the second CPU thread, the second CPU thread performs image combination on the grayscale values generated based on the image frame set and the grayscale values generated based on one or more previous image frame sets, as described in step 1211. Specifically, the image combination includes aligning, blending and merging the grayscale values based on the image frame set with the grayscale values generated based on one or more previous image frame sets. Thus, the second CPU thread generates a composite grayscale image, which is sent to the fourth CPU thread for synthesizing a unified material image. Optionally, the composite grayscale image can also be sent to the fifth CPU thread for displaying the composite grayscale image, as described in step 1214.
[0062] In parallel with step 1206, a computational task of noise filtering is performed on the merged image frame set to optimize the accuracy of material identification, as described in step 1208. The kernel engine performs the computational task of noise filtering by the following operations: assigning different GPU threads to different pixels of the merged image frame set, and simultaneously performing noise filtering on each pixel of the merged image frame set by each assigned GPU thread. Alternatively, each GPU thread can be assigned to multiple pixels to simultaneously perform the computational task of noise filtering. A bilateral filtering technique is appropriately used for noise filtering of the kernel engine. The bilateral filtering technique used smoothes the merged image frame set while maintaining its edges. Specifically, the bilateral filtering technique is performed on the filtered pixel by the following operations: determining neighboring pixels around the filtered pixel based on a predetermined filter window size; calculating a range weight and a normalization factor for the filtered pixel; and determining a filtered pixel value and applying the filtered pixel value to the filtered pixel. The range weight is a weighting factor assigned to each neighboring pixel based on the difference in intensity values between the filtered pixel and its neighboring pixels, and thus the range weight measures the similarity of intensities between pixels within the filter window. The range weight is calculated based on the following equation 1:
[0063] Range weight = exp(-(r(i,j) 2 ) / (2*σ r 2 ),[Equation 1]
[0064] where r(i,j) is derived based on the intensity value of the filtered pixel minus the intensity values of its neighboring pixels, and σ r is the intensity standard deviation parameter. The normalization factor is calculated based on the following equation 2:
[0065] Normalization factor = ∑(spatial weight * range weight), [Equation 2]
[0066] Wherein, the spatial weight is a predetermined weighting factor assigned to each neighboring pixel based on its spatial proximity to the pixel being filtered. The filter value is determined and applied to the pixel being filtered based on the following equation 3:
[0067]
[0068] Although a GPU thread will be required to access the GPU's shared memory or global memory for reading adjacent pixels to determine filtered pixel values, implementing bilateral filtering techniques that access shared memory reduces the number of global memory accesses and, therefore, shortens the time spent performing noise filtering on the merged set of image frames.
[0069] Although the bilateral filtering technique has been described as being appropriate for noise filtering, other image filtering techniques, such as median filters, Gaussian filters, mean filters, non-local mean filters, adaptive manifold filters, Perona-Malik diffusion, and trilateral filters, may also be employed for noise filtering by the kernel engine.
[0070] As a result of the computational task of performing noise filtering on the merged set of image frames, a filtered set of image frames is generated. The filtered set of image frames is then used by the core engine of the GPU to generate a material discrimination value, as described in step 1209. Specifically, the computational task of generating the material discrimination value includes: calculating a function value for each pixel; determining the proximity of each function value to a plurality of trend lines on a pre-generated material classification curve; and, classifying each pixel into its corresponding material type based on the proximity of the function value of each pixel to the trend line on the pre-generated material classification curve. The function value refers to the ratio of the emitted high energy level radiation to the emitted low energy level radiation. The function value is calculated based on the following equation 4:
[0071]
[0072] Each trend line on the pre-generated material classification curves is related to a specific material type. Examples of material types are organic, intermediate mixtures of organic and inorganic, inorganic, and heavy metals. If there is an overlapping area of the material curves during classification, one material will be prioritized over the others based on the distance between the function value and the material's trend line.
[0073] If more than two energy levels are emitted and captured, the computational task of material discrimination value generation may also include the following additional steps: selecting two additional energy level pairs as a second filter for material verification; calculating function values for both the first energy level pair and the second energy level pair for each pixel; determining the proximity of each function value to the center of each of a plurality of pre-generated material clusters; and, classifying each pixel into its corresponding material group based on the proximity of the function value of each pixel to the center of each pre-generated material cluster. The additional two pairs of energy levels are selected from any possible combination from multi-energy level radiation. The calculation of the function values for the first energy level pair and the second energy level pair is based on Equation 4. The center of each material cluster is appropriately determined by the K-means clustering algorithm.
[0074] After classifying the pixel into its material type or substance group, the kernel engine generates each pixel value in red, green, blue, and alpha (RGBA) channel colors based on a color lookup table to correspond to a specific material type or substance group. Thus, the kernel engine generates a material discrimination value in RGBA 64-bit format. Then, as described in step 1210, the material discrimination value is copied to the third CPU thread by the second copy engine of the GPU.
[0075] Once the material discrimination values have been copied to the third CPU thread, the third CPU thread performs an image combination of the material discrimination values generated based on the image frame set with the material discrimination values generated based on one or more previous image frame sets, as described in step 1212. Specifically, the image combination includes aligning, blending, and merging the material discrimination values generated based on the image frame set with the material discrimination values generated based on one or more previous image frame sets. Thus, the third CPU thread generates a composite material discrimination image, which is sent to the fourth CPU thread.
[0076] Once the fourth CPU thread receives the composite grayscale image and the composite material recognition image, the fourth CPU thread synthesizes a unified material image by superimposing the composite material recognition image onto the composite grayscale image, as described in step 1213. Thus, the unified material image incorporates the multiple material distributions to provide a comprehensive view of the material information within the scanned cargo.
[0077] Next, as described in step 1214, the fifth CPU thread displays the unified material image on the monitor or on the remote station. Therefore, the operator can check the cargo content based on the displayed unified material image. Optionally, the fifth CPU thread can also display a composite grayscale image or a composite material identification image.
[0078] Reference now Figure 5 , which shows a flow chart of a method for identifying materials in X-ray imaging cargo inspection according to a second embodiment of the present invention.
[0079] When the cargo enters the gate (110), the radiation source (120) emits a radiation beam that penetrates a portion of the cargo. At the same time, as described in step 2200, the radiation detector (130) captures and measures the radiation that penetrates the portion of the cargo. Next, as described in step 2201, the radiation detector (130) sends the captured radiation in the form of image frames to the image processing module. Preferably, the radiation detector (130) sends a set of image frames to the image processing module at an instance, wherein every two image frames in the image frames correspond to a specific energy level of the emitted radiation beam.
[0080] Once the image frame set has been sent to the image processing module, the first CPU thread of the CPU receives the image frame set, as described in step 2202. The image frame set is then sent from the first CPU thread to the GPU. Next, the first copy engine of the GPU copies the image frame set to the core engine of the GPU, as described in step 2203. The method then proceeds to step 2204.
[0081] In step 2204, the core engine of the GPU performs the image calibration calculation task on the copied image frame set. The core engine performs the image calibration calculation task by the following operations: assigning different GPU threads to different pixels of the copied image frame set; and, simultaneously, each assigned GPU thread performs image calibration on different pixels of the copied image frame set. Alternatively, each GPU thread can be assigned to multiple pixels to perform the image calibration calculation task simultaneously. The image calibration calculation task is similar to Figure 4 Step 1204 of the method, whereby image calibration is performed by adjusting each pixel value of the copied image frame set and scaling each adjusted pixel value of the copied image frame set. As a result of the computational task of image calibration, a calibrated image frame set is generated. Then, the method proceeds to step 2205.
[0082] In step 2205, the GPU core engine performs the energy merging calculation task on the calibrated image frame set. The energy merging calculation task is similar to Figure 4 Step 1205, whereby the computational task of image calibration is performed by the following operations: different GPU threads are assigned to different pixels of the calibrated image frame set; and, at the same time, each assigned GPU thread on different pixels of the calibrated image frame set interleaves each pixel line of a calibrated image frame at one energy level with another calibrated image frame at the same energy level. Alternatively, each GPU thread can be assigned to multiple pixels to perform the computational task of energy merging simultaneously. As a result of the computational task of energy merging, a merged image frame set is generated.
[0083] Therefore, as described in decision 2206, the GPU determines whether there are sufficient computing resources to perform the computational tasks of grayscale value generation in parallel with the computational tasks of noise filtering and material discrimination value generation.
[0084] As described in step 2207, if there are sufficient computing resources, the core engine of the GPU performs the computational tasks of grayscale value generation in parallel with the computational tasks of noise filtering and material discrimination value generation.
[0085] Therefore, at one example, the GPU's kernel engine starts the execution of a computing task for grayscale value generation, wherein the computing task for grayscale value generation includes: generating grayscale values of a set of merged image frames by averaging the pixel values from each merged image frame at the corresponding pixel coordinates to generate an average grayscale image frame; and converting each pixel of the average grayscale image frame into a 64-bit grayscale image format. Although it has been described that the GPU's kernel engine generates grayscale values by averaging the pixel values from each merged image frame, the GPU's kernel engine is also suitable for generating grayscale values by selecting one of the merged images and converting each pixel of the selected merged image into a 64-bit grayscale image format.
[0086] Based on this, the converted pixel values are then copied to the second CPU thread by the second copy engine of the GPU.
[0087] Once the converted pixel values have been copied to the second CPU thread, the second CPU thread performs an image combination on the grayscale values generated based on the image frame set and the grayscale values generated based on one or more previous image frame sets. Thus, the second CPU thread generates a composite grayscale image, which is sent to the fourth CPU thread for compositing a unified material image. Optionally, the composite grayscale image may also be sent to the fifth CPU thread for displaying the composite grayscale image, as described in step 2210.
[0088] At the same instance, the kernel engine of the GPU starts the computational task of noise filtering, wherein the computational task of noise filtering includes: assigning different GPU threads to different pixels of the merged image frame set; and, simultaneously, each assigned GPU thread performs noise filtering on each pixel of the merged image frame set. Alternatively, each GPU thread can be assigned to multiple pixels to simultaneously perform the computational task of noise filtering. Bilateral filtering technology is appropriately used for noise filtering of the kernel engine. Other image filtering techniques, such as median filter, Gaussian filter, mean filter, non-local mean filter, adaptive manifold filter, Perona-Malik diffusion and trilateral filter, can also be used for noise filtering by the kernel engine.
[0089] As a result of the computational task of performing noise filtering on the merged set of image frames, a filtered set of image frames is generated. The filtered set of image frames is then used by the core engine of the GPU to generate a material discrimination value. The computational task of generating the material discrimination value is similar to Figure 4 Step 1209 in the above. Therefore, the core engine generates a material identification value in RGBA 64-bit format. The material identification value is then copied to the third CPU thread by the second copy engine of the GPU.
[0090] Once the material discrimination values have been copied to the third CPU thread, the third CPU thread performs an image combination of the material discrimination values generated based on the image frame set with the material discrimination values generated based on one or more previous image frame sets. Thus, the third CPU thread generates a composite material discrimination image, which is sent to the fourth CPU thread. The method then proceeds to step 2209.
[0091] If the computing resources are insufficient, the GPU's core engine sequentially performs the computing tasks of grayscale value generation, noise filtering, and material discrimination value generation.
[0092] The computational task of grayscale value generation includes: generating grayscale values of the merged image frame set by averaging pixel values from each merged image frame at corresponding pixel coordinates to produce an average grayscale image frame; and converting each pixel of the average grayscale image frame into a 64-bit grayscale image format. Although it has been described that the core engine of the GPU generates grayscale values by averaging pixel values from each merged image frame, the core engine of the GPU is also suitable for generating grayscale values by selecting one of the merged images and converting each pixel of the selected merged image into a 64-bit grayscale image format.
[0093] Accordingly, the converted pixel values are then copied to the second CPU thread by the second copy engine of the GPU. Once the converted pixel values have been copied to the second CPU thread, the second CPU thread performs an image combination on the grayscale values generated based on the image frame set and the grayscale values generated based on one or more previous image frame sets. Thus, the second CPU thread generates a composite grayscale image, which is sent to the fourth CPU thread for synthesizing a unified material image. Optionally, the composite grayscale image can also be sent to the fifth CPU thread for displaying the composite grayscale image, as described in step 2210.
[0094] Next, the core engine of the GPU performs the computational task of noise filtering by assigning different GPU threads to different pixels of the merged image frame set and simultaneously performing noise filtering on each pixel of the merged image frame set by each assigned GPU thread. Alternatively, each GPU thread can be assigned to multiple pixels to simultaneously perform the computational task of noise filtering. Bilateral filtering techniques are appropriately used for noise filtering by the core engine. Other image filtering techniques, such as median filters, Gaussian filters, mean filters, non-local mean filters, adaptive manifold filters, Perona-Malik diffusion and trilateral filters can also be used for noise filtering by the core engine. As a result of the computational task of performing noise filtering on the merged image frame set, a filtered image frame set is generated. The filtered image frame set is then used by the core engine of the GPU to generate a material discrimination value. The computational task of generating the material discrimination value is similar to Figure 4 Step 1209. Therefore, the core engine generates a material identification value in RGBA 64-bit format. The material identification value is then copied to the third CPU thread by the second copy engine of the GPU.
[0095] Once the material discrimination values have been copied to the third CPU thread, the third CPU thread performs an image combination of the material discrimination values generated based on the image frame set with the material discrimination values generated based on one or more previous image frame sets. Thus, the third CPU thread generates a composite material discrimination image, which is sent to the fourth CPU thread. The method then proceeds to step 2209.
[0096] In step 2209, once the fourth CPU thread receives the composite grayscale image and the composite material recognition image, the fourth CPU thread synthesizes a unified material image by superimposing the composite material recognition image on the composite grayscale image.
[0097] In step 2210, the fifth CPU thread displays the unified material image on a monitor or on a remote station. Optionally, the fifth CPU thread may also display a composite grayscale image or a composite material discrimination image.
[0098] Although the embodiments of the present invention have been illustrated and described, these embodiments are not intended to illustrate and describe all possible forms of the present invention. On the contrary, the words used in the specification are descriptive rather than limiting, and various changes can be made without departing from the scope of the present invention.
Claims
1. A cargo inspection system (100), comprising: a) a gateway (110) having at least one radiation source (120) on one side and at least one radiation detector (130) on the other side, and b) an image processing module connected to the at least one radiation detector (130), wherein the image processing module is configured to generate one or more images based on a plurality of image frames of captured radiation and to discern the material of the captured radiation, Wherein, the image processing module is characterized in that: c) at least one central processing unit or CPU, wherein the at least one CPU comprises: i. a first CPU thread configured to obtain an image frame of the scanned cargo contents from the at least one radiation detector (130), ii. a second CPU thread configured to perform image combination based on the generated grayscale values, iii. a third CPU thread configured to perform image combination on a plurality of material-identified image frames based on the generated material identification values, and iv. a fourth CPU thread configured to synthesize at least one unified material image; and d) at least one graphics processing unit or GPU connected to the CPU, wherein the at least one GPU comprises: i. a kernel engine having a plurality of GPU threads, wherein the kernel engine is configured to perform computational tasks of image calibration, energy merging, noise filtering, grayscale value generation, and material discrimination value generation, and wherein each GPU thread is configured to simultaneously perform one of the computational tasks of the kernel engine, and ii. At least one copy engine configured to perform data transfer between the GPU and the CPU.
2. The cargo inspection system (100) according to claim 1, wherein: The image processing module also includes a fifth CPU thread configured to display the composite grayscale image, at least one composite material discrimination image, or at least one unified material image.
3. The cargo inspection system (100) according to claim 1, wherein: The first copy engine of the GPU is configured to copy the image frame from the first thread of the CPU to the kernel engine of the GPU.
4. The cargo inspection system (100) according to claim 3, wherein: The second copy engine is configured to copy the grayscale value and the material discrimination value from the kernel engine to the second CPU thread and the third CPU thread, respectively.
5. The cargo inspection system (100) according to claim 1, wherein: The image processing module is also connected to a remote station or monitor.
6. A method for identifying materials in X-ray imaging cargo inspection, It is characterized by the following steps: a) capture of radiation that penetrates a portion of the cargo, wherein: The captured radiation takes the form of image frames; b) sending the set of image frames to an image processing module at one instance; c) copying the image frame set to a kernel engine of a GPU; d) performing a computational task of image calibration on the copied image frame set to generate a calibrated image frame set, wherein the computational task of image calibration includes: i. assigning different GPU threads to different pixels of the copied image frame set, and ii. performing image calibration on different pixels of the copied image frame set simultaneously by each allocated GPU thread; e) performing an energy merging computing task on the calibrated image frame set to generate a merged image frame set, wherein the energy merging computing task comprises: i. assigning different GPU threads to different pixels of the calibrated image frame set, and ii. interleaving, by each assigned GPU thread, one calibrated image frame at one energy level simultaneously with each pixel line of another calibrated image frame at the same energy level; f) performing a grayscale value generation computational task in parallel with noise filtering and material discrimination value generation computational tasks, wherein the grayscale value generation computational task generates a plurality of grayscale values in a 64-bit grayscale image format, the noise filtering computational task produces a filtered set of image frames, and the grayscale value generation computational task generates a plurality of material discrimination values in red, green, blue, and alpha or RGBA 64-bit format; g) once the plurality of grayscale values in the 64-bit grayscale image format have been generated, performing an image combination of the plurality of grayscale values generated based on the set of image frames with a plurality of grayscale values generated based on at least one previous set of image frames, wherein the image combination of the plurality of grayscale values produces a composite grayscale image; h) once the plurality of material discrimination values in the RGBA 64-bit format have been generated, performing an image combination of the plurality of material discrimination values generated based on the set of image frames with a plurality of material discrimination values generated based on at least one set of image frames, wherein the image combination of the plurality of material discrimination values produces a composite material discrimination image; and i) synthesizing a unified material image by superimposing the composite material discrimination image on the composite grayscale image.
7. The method according to claim 6, wherein: Every two of the image frames correspond to a particular energy level of radiation.
8. The method according to claim 6, wherein: The image calibration is performed by adjusting each pixel value of the copied set of image frames and scaling each adjusted pixel value of the copied set of image frames.
9. The method according to claim 6, wherein: The calculation task of performing the gray value generation includes: a) averaging the pixel values from each merged image frame at corresponding pixel coordinates to generate a mean grayscale image frame, and b) converting each pixel of the mean grayscale image frame into the 64-bit grayscale image format.
10. The method according to claim 6, wherein: The calculation task of performing the gray value generation includes: a) selecting a merged image from the merged images; and b) Converting each pixel of the selected merged image to the 64-bit grayscale image format.
11. The method according to claim 6, wherein: The computational tasks for performing the noise filtering include: a) assigning different GPU threads to different pixels of the merged image frame set; and b) performing noise filtering on each pixel of the merged set of image frames simultaneously by each assigned GPU thread.
12. The method according to claim 11, wherein: The noise filtering is performed using a bilateral filtering technique, and wherein the bilateral filtering technique comprises: a) determining neighboring pixels around the pixel being filtered based on a predetermined filter window size, b) calculating a range weight and a normalization factor for said pixels being filtered, and c) determining a filtered pixel value and applying the filtered pixel value to said pixel being filtered.
13. The method according to claim 11, wherein: The noise filtering is performed using a median filter, a Gaussian filter, a mean filter, a non-local means filter, an adaptive manifold filter, a Perona-Malik diffusion or a trilateral filter.
14. The method according to claim 6, wherein: The computational tasks for performing the material identification value generation include: a) Calculate the function value for each pixel; b) determining how closely each function value corresponds to a plurality of trend lines on a pre-generated material classification curve; and c) classifying each pixel into its corresponding material type based on the proximity of the function value of each pixel to the trend line on the pre-generated material classification curve.
15. The method according to claim 14, wherein: If there are more than two energy levels for emission and capture, the computational task for generating the material discrimination value may further include: a) selecting two additional pairs of energy levels as a second filter for substance verification; b) calculating the function value of both the first energy level pair and the second energy level pair for each pixel; c) determining the proximity of each function value to the center of each of a plurality of pre-generated material clusters; and d) classifying each pixel into its corresponding material group based on the proximity of the function value of each pixel to the center of each pre-generated material cluster; and e) Generate each pixel value in red, green, blue and alpha or RGBA channel colors based on a color lookup table to correspond to a specific material type or substance group.
16. The method according to claim 6, wherein: The method further comprises the step of displaying the unified material image, the composite grayscale image or the composite material discrimination image.
17. A method for identifying materials in X-ray imaging cargo inspection, It is characterized by the following steps: a) capture of radiation that penetrates a portion of the cargo, wherein: The captured radiation takes the form of image frames; b) sending the set of image frames to an image processing module at one instance; c) copying the image frame set to a kernel engine of a GPU; d) performing a computational task of image calibration on the copied image frame set to generate a calibrated image frame set, wherein the computational task of image calibration includes: i. assigning different GPU threads to different pixels of the copied image frame set, and ii. performing image calibration on different pixels of the copied image frame set simultaneously by each allocated GPU thread; e) performing an energy merging computing task on the calibrated image frame set to generate a merged image frame set, wherein the energy merging computing task comprises: i. assigning different GPU threads to different pixels of the calibrated image frame set, and ii. interleaving, by each assigned GPU thread, one calibrated image frame at one energy level simultaneously with each pixel line of another calibrated image frame at the same energy level; f) determining whether there are sufficient computing resources to perform the computational tasks of grayscale value generation in parallel with the computational tasks of noise filtering and material discrimination value generation; g) if sufficient computing resources exist, executing a computational task of grayscale value generation in parallel with computational tasks of noise filtering and material discrimination value generation, wherein the computational task of grayscale value generation generates a plurality of grayscale values in a 64-bit grayscale image format, the computational task of noise filtering produces a set of filtered image frames, and the computational task of grayscale value generation generates a plurality of material discrimination values in a red, green, blue, and alpha or RGBA 64-bit format; h) if there are insufficient computing resources, performing computing tasks of grayscale value generation, noise filtering, and material discrimination value generation, wherein the computing task of grayscale value generation generates a plurality of grayscale values in a 64-bit grayscale image format, the computing task of noise filtering produces a set of filtered image frames, and the computing task of grayscale value generation generates a plurality of material discrimination values in a red, green, blue, and alpha or RGBA 64-bit format; i) once the plurality of grayscale values in the 64-bit grayscale image format have been generated, performing an image combination of the plurality of grayscale values generated based on the set of image frames with a plurality of grayscale values generated based on at least one previous set of image frames, wherein the image combination of the plurality of grayscale values produces a composite grayscale image; j) once the plurality of material discrimination values in the RGBA 64-bit format have been generated, performing an image combination of the plurality of material discrimination values generated based on the set of image frames with a plurality of material discrimination values generated based on at least one set of image frames, wherein the image combination of the plurality of material discrimination values produces a composite material discrimination image; and k) synthesizing a unified material image by superimposing the composite material discrimination image on the composite grayscale image.
18. The method according to claim 17, wherein: Every two of the image frames correspond to a particular energy level of radiation.
19. The method according to claim 17, wherein: The image calibration is performed by adjusting each pixel value of the copied image frame set and scaling each adjusted pixel value of the copied image frame set.
20. The method according to claim 17, wherein: The calculation task of performing the gray value generation includes: a) averaging the pixel values from each merged image frame at corresponding pixel coordinates to generate a mean grayscale image frame, and b) converting each pixel of the mean grayscale image frame into the 64-bit grayscale image format.
21. The method according to claim 17, wherein: The calculation task of performing the gray value generation includes: a) selecting a merged image from the merged images; and b) Converting each pixel of the selected merged image to the 64-bit grayscale image format.
22. The method according to claim 17, wherein: The computational tasks for performing the noise filtering include: a) assigning different GPU threads to different pixels of the merged image frame set; and b) performing noise filtering on each pixel of the merged set of image frames simultaneously by each assigned GPU thread.
23. The method according to claim 22, wherein: The noise filtering is performed using a bilateral filtering technique, and wherein the bilateral filtering technique comprises: a) determining neighboring pixels around the pixel being filtered based on a predetermined filter window size, b) calculating a range weight and a normalization factor for said pixels being filtered, and c) determining a filtered pixel value and applying the filtered pixel value to said pixel being filtered.
24. The method according to claim 22, wherein: The noise filtering is performed using a median filter, a Gaussian filter, a mean filter, a non-local means filter, an adaptive manifold filter, a Perona-Malik diffusion or a trilateral filter.
25. The method of claim 17, wherein: The computational tasks for performing the material identification value generation include: a) Calculate the function value for each pixel; b) determining how closely each function value corresponds to a plurality of trend lines on a pre-generated material classification curve; and c) classifying each pixel into its corresponding material type based on the proximity of the function value of each pixel to the trend line on the pre-generated material classification curve.
26. The method according to claim 25, wherein: If there are more than two energy levels for emission and capture, the computational task for generating the material discrimination value may further include: a) selecting two additional pairs of energy levels as a second filter for substance verification; b) calculating the function value of both the first energy level pair and the second energy level pair for each pixel; c) determining the proximity of each function value to the center of each of a plurality of pre-generated material clusters; d) classifying each pixel into its corresponding material group based on the proximity of the function value of each pixel to the center of each pre-generated material cluster; and e) Generate each pixel value in red, green, blue and alpha or RGBA channel colors based on a color lookup table to correspond to a specific material type or substance group.
27. The method of claim 17, wherein: The method further comprises the step of displaying the unified material image, the composite grayscale image or the composite material discrimination image.
Citation Information
Patent Citations
Device and method for generating x-rays having different energy levels and material discrimination system
US20070269013A1
Energy spectrum modulation apparatus, material discrimination method and device, image processing method
US20070286329A1