Data processing method and image correction method
By acquiring and fitting the scattering scale data of the security checker, the target correspondence relationship of the detection pixels in the detector is generated, and the problem of uneven image of the X-ray transmission security checker is solved, thereby achieving clearer image correction and higher security check efficiency.
Patent Information
- Application Number
- CN202510645800.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-05-20
AI Technical Summary
In the prior art, X-ray transmission security machine has an uneven image due to scattering phenomenon during image processing, resulting in scattering and scattering stripes and tailings, which affects the security inspection effect and efficiency.
By acquiring the scattering scale data of the security checker, fit the target correspondence relationship of the detection pixels at all positions in the detector, use the scattering amount to characterize the scattering ratio of the detection pixels at different positions when they are irradiated by X-rays, and image correction is performed.
Effectively eliminate scattered stripes and tailing phenomena, improve image uniformity, reduce security inspection difficulty, and improve security inspection efficiency.
Smart Images

Figure CN120182147B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a data processing method and an image correction method. Background Art
[0002] For X-ray transmission type security inspection machines, such as linear array X-ray transmission type security inspection machines, they mainly include a radiation source, a package channel and a detector. Items to be inspected can be placed on the package channel. The radiation source will emit X-rays, allowing the X-rays to pass through the package channel and eventually be received by the detector in the detection box. The detector outputs a grayscale signal to form an image to characterize the situation of the items on the package channel.
[0003] Normally, for uniform objects, the grayscale values corresponding to their representation images should all be the same. However, in the images of difficult-to-penetrate materials in actual X-ray transmission security inspection machines, there are usually white scattered stripes at the edge points of the detector pixels, and there is a tailing phenomenon in the surrounding pixels. In other words, the grayscale values of the representation images of uniform objects are not all the same. This is mainly because the X-rays are scattered in the security inspection machine.
[0004] Currently, simulation and other methods are usually used to obtain the scattering amount and then deduct it to improve the above situation. However, when relying solely on simulation methods to deduct the scattering amount, the correction may deviate significantly from the actual situation, which will affect the good representation of the object and may cause interference to security personnel, resulting in high difficulty and low efficiency in security inspections.
[0005] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention
[0006] The main purpose of this application is to provide a data processing method and an image correction method, which aims to solve the technical problem in the related art that the method of relying solely on simulation to deduct the influence of scattering to well characterize the object leads to high difficulty and low efficiency in security inspection.
[0007] To achieve the above objectives, the present application proposes a data processing method, which includes:
[0008] Obtaining scatter calibration data for the security inspection machine; wherein X-rays used for detection in the security inspection machine are emitted through the X-ray slit and irradiated onto the detector via the package channel. The scatter calibration data is used to represent the amount of scattering caused by the X-rays in the security inspection machine on detection pixels at different locations of the detector when the X-rays irradiate detection pixels at other locations;
[0009] Based on the scattering scale data, a target correspondence relationship of detection pixels at all positions in the detector is fitted and generated; wherein the target correspondence relationship is used to characterize the ratio of the scattering amount generated when detection pixels at different positions are irradiated by X-rays on detection pixels at other positions to the total light intensity of the X-rays.
[0010] In one embodiment, the step of obtaining the scattering scale data of the security inspection machine includes:
[0011] A test plate is provided on the parcel passage of the security inspection machine, and when the detector receives X-rays of different widths by moving the test plate, the light intensity of detection pixels at all positions when receiving X-rays of different widths is measured; wherein the test plate is used to block the X-rays from irradiating detection pixels at at least some positions of the detector;
[0012] The illumination intensity of the detection pixels at all positions when receiving X-rays of the same width is divided into a group of data;
[0013] For each set of data, the illumination intensity of all detection pixels is compared with a preset value, and the first detection pixel whose illumination intensity is less than the preset value along the direction from the test board to the test board is determined to be the target detection pixel blocked by the edge of the test board. The illumination intensity of other detection pixels in the direction blocked by the test board and spaced M detection pixels away from the target detection pixel is used as the scattering amount of the corresponding detection pixel, where M is an integer greater than or equal to 1.
[0014] The light intensity or scattering amount of the detection pixels at all positions in each set of data is used as the scattering scale data of the security inspection machine.
[0015] In one embodiment, when the X-rays emitted through the X-ray slit are irradiated onto the detector via the upper surface of the wrapping channel, and the moving direction of the test plate is perpendicular to the X-ray slit, the shape of the test plate is set to be a right triangle, one right-angled side of the right triangle is parallel to the moving direction of the test plate, and the other right-angled side is perpendicular to the moving direction of the test plate.
[0016] In one embodiment, when a test plate is provided on the parcel passage of the security inspection machine and the detector receives X-rays of different widths by moving the test plate, the step of measuring the light intensity of detection pixels at all positions when receiving X-rays of different widths includes:
[0017] A test plate is provided on the parcel passage of the security inspection machine, with one right-angled side of the test plate close to the left side of the parcel passage. The test plate is moved so that the detector receives X-rays of different widths. The light intensity of detection pixels at all positions when receiving X-rays of different widths is measured;
[0018] A test plate is provided on the parcel passage of the security inspection machine, with one right-angled side of the test plate close to the right side of the parcel passage. The test plate is moved so that the detector receives X-rays of different widths. The light intensity of detection pixels at all positions when receiving X-rays of different widths is measured;
[0019] The step of dividing the illumination intensity of detection pixels at all positions when receiving X-rays of the same width into a group of data comprises:
[0020] The light intensity of the detection pixels at all positions when a right-angled edge of the test plate is close to the left side of the wrapping channel and receives X-rays of the same width is divided into a group of data, and the light intensity of the detection pixels at all positions when a right-angled edge of the test plate is close to the right side of the wrapping channel and receives X-rays of the same width is divided into a group of data.
[0021] In one embodiment, the step of obtaining the scattering scale data of the security inspection machine includes:
[0022] A test plate is provided on the parcel passage of the security inspection machine, and when the detector receives X-rays of the same width but at different positions by moving the test plate, the light intensity of detection pixels at all positions when receiving X-rays of the same width but at different positions is measured; wherein the test plate is used to block the X-rays from irradiating the detection pixels at at least some positions of the detector;
[0023] The light intensity of the detection pixels at all positions that receive X-rays of the same width and are located at the same position is divided into a group of data;
[0024] For each detection pixel in each set of data, if the illumination intensity of the detection pixel is less than a preset value, the illumination intensity is used as the scattering amount of the detection pixel;
[0025] The light intensity or scattering amount of the detection pixels at all positions in each set of data is used as the scattering scale data of the security inspection machine.
[0026] In one embodiment, when the X-rays emitted through the X-ray slit are irradiated onto the detector via the upper surface of the wrapping channel, and the moving direction of the test plate is perpendicular to the X-ray slit, the test plate includes a first test plate and a second test plate, and the shapes of the first test plate and the second test plate are both set to be right triangles, one right-angled side of the right-angled triangle is parallel to the moving direction of the test plate, and the other right-angled side is perpendicular to the moving direction of the test plate, the hypotenuse of the first test plate is set in parallel with the hypotenuse of the second test plate, and the hypotenuse of the first test plate and the hypotenuse of the second test plate are separated by a preset width.
[0027] In one embodiment, the target correspondence includes a scatter ratio function;
[0028] The step of fitting and generating target correspondences of detection pixels at all positions in the detector based on the scattering scale data comprises:
[0029] Substitute each set of data in the scattering scale data into the following formula to generate the first The scattering ratio function of the detection pixels :
[0030] ;
[0031] in, Both are greater than 0 and less than or equal to integer, Characterizes the number of detection pixels in the detector, Characterization The scattering amount of each detection pixel when it is blocked by the test board, Characterization The light intensity of each detection pixel when it is not blocked by the test board, Characterization The detection pixels are irradiated by X-rays at the The ratio of the scattering amount generated when a detection pixel is detected to the total intensity of the X-ray.
[0032] In addition, to achieve the above objectives, the present application also proposes an image correction method, which includes:
[0033] Obtaining a target correspondence relationship for detection pixels at all positions in the detector of the security inspection machine; wherein the target correspondence relationship is used to represent the ratio of the scattering amount generated when detection pixels at different positions are irradiated by X-rays on detection pixels at other positions to the total light intensity of the X-rays;
[0034] Based on the target correspondence, the package image currently obtained by the security inspection machine scanning the object to be imaged is corrected.
[0035] In one embodiment, the target correspondence includes a scatter ratio function;
[0036] The step of correcting the package image currently scanned by the security inspection machine and obtained by the security inspection machine based on the target correspondence includes:
[0037] The first The scattering ratio function of the detection pixels After normalization, the security inspection machine Each element in the scattering ratio matrix of dimension 1 is The element of position represents the The detection pixels are irradiated by X-rays at the The ratio of the scattering amount generated by each detection pixel to the total X-ray intensity is Both are greater than 0 and less than or equal to integer, Characterizing the number of detection pixels in the detector;
[0038] Based on the scattering ratio matrix, the security inspection machine currently scans the object to be imaged. dimensional package image for correction; where, is the end time of scanning the object to be imaged.
[0039] In one embodiment, the scattering ratio matrix is used to obtain the current image of the object to be imaged by the security inspection machine. The steps of correcting the dimensional package image include:
[0040] Will The scattering ratio matrix of Dimensional package image corresponding to the gray value matrix matrix multiplication, the multiplied dimensional grayscale value matrix used to represent the corrected parcel image.
[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes a data processing device, which includes:
[0042] A first acquisition module is configured to acquire scatter calibration data of the security inspection machine. The X-rays used for detection in the security inspection machine are emitted through the X-ray slit and irradiated onto the detector via the package channel. The scatter calibration data is used to represent the amount of scattering caused by the X-rays in the security inspection machine on detection pixels at different positions of the detector when the X-rays irradiate detection pixels at other positions.
[0043] A fitting module is used to fit and generate a target correspondence relationship for detection pixels at all positions in the detector based on the scattering scale data; wherein the target correspondence relationship is used to characterize the ratio of the scattering amount generated when detection pixels at different positions are irradiated by X-rays on detection pixels at other positions to the total light intensity of the X-rays.
[0044] In addition, to achieve the above-mentioned purpose, the present application also proposes an image correction device, which includes:
[0045] The second acquisition module is used to obtain the target correspondence relationship of the detection pixels at all positions in the detector of the security inspection machine; wherein the target correspondence relationship is used to represent the ratio of the scattering amount generated when the detection pixels at different positions are irradiated by the detection pixels at other positions by the X-ray to the total light intensity of the X-ray;
[0046] The correction module is used to correct the package image currently scanned by the security inspection machine and obtained by the security inspection machine based on the target corresponding relationship.
[0047] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored on the memory and runnable on the processor, wherein the computer program is configured to implement the steps of the data processing method described above, or to implement the steps of the image correction method described above.
[0048] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, it implements the steps of the data processing method described above, or implements the steps of the image correction method described above.
[0049] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the data processing method described above, or implements the steps of the image correction method described above.
[0050] One or more technical solutions proposed in this application have at least the following technical effects:
[0051] In response to the problem of scattering inside the security inspection machine in the related technology, the present application first obtains the scattering scale data of the security inspection machine to characterize the influence of scattering between different detection pixels of the detector, and specifically characterizes this influence through the scattering amount, and then based on the scattering scale data, fits and generates the target correspondence corresponding to the detection pixels at all positions in the detector to characterize the proportion of the scattering amount generated when the detection pixels at different positions are irradiated by X-rays on the detection pixels at other positions to the total light intensity of the X-rays. By fitting and generating the target correspondence based on this experimental scale, it is convenient to more accurately determine the scattering amount received by the detection pixels at different positions, which helps to correct the image more accurately later. After correction, the image becomes more uniform, the scattering stripes are corrected, the edges are clearer, and there is no tailing phenomenon, which makes it easier for security personnel to use the image for security inspection, reduces the difficulty of security inspection, and improves the efficiency of security inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0054] Figure 1 This is a schematic diagram of the structure of a linear array X-ray transmission security inspection machine in the related art;
[0055] Figure 2 is the original grayscale image of the penetration module of the test object A in the related art;
[0056] Figure 3 It is a schematic diagram of the grayscale value curve of a uniform lead plate at different detection pixel points in the related art;
[0057] Figure 4 It is a flowchart of the data processing method provided by this application;
[0058] Figure 5 This is one of the schematic diagrams for setting up the test board in the data processing method provided in this application;
[0059] Figure 6 This is the second schematic diagram of the test board setting in the data processing method provided by this application;
[0060] Figure 7 This is the third schematic diagram of the test board setting in the data processing method provided by this application;
[0061] Figure 8 This is one of the flow charts of the image correction method provided by this application;
[0062] Figure 9 This is the second flowchart of the image correction method provided by this application;
[0063] Figure 10 This is a comparison chart of the measured grayscale value and the fitted grayscale value of a detection pixel at different times in the image correction method provided by this application;
[0064] Figure 11 is a schematic diagram of a package image after correction in the image correction method provided by this application;
[0065] Figure 12 It is a structural diagram of the data processing device provided by this application;
[0066] Figure 13 It is a structural schematic diagram of the image correction device provided by this application;
[0067] Figure 14 It is a structural diagram of the device provided in this application.
[0068] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0069] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0070] Unless otherwise defined, all technical and scientific terms used in this application have the same meanings as commonly understood by technicians in the technical field to which this application belongs; the terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0071] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly indicate the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is two or more, unless otherwise specifically defined.
[0072] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0073] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0074] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0075] Figure 1 This is a schematic diagram of the structure of a linear array X-ray transmission type security inspection machine in the related technology, such as Figure 1 As shown, the ray source 1 emits X-rays, which pass through the package channel 2 and are finally received by multiple detectors 3 in the detection box. The detectors 3 output grayscale values to form an image.
[0076] It should be noted that the grayscale value output by the detector when no X-rays are incident is called the background value. The grayscale value output by the detector when X-rays are directly incident (under air conditions, with no package in package channel 2) is called the full load value. Typically, linear normalization is performed after the grayscale values output by detector 3. This linear normalization subtracts the background value from the grayscale value of each pixel, then divides the result by the difference between the full load value and the background value. After normalization, the grayscale values of uniform objects are generally consistent.
[0077] However, in the image of hard-to-penetrate materials in the X-ray transmission type security inspection machine, for example Figure 2 is the original grayscale image of the penetration module of the test body A in the related art, such as Figure 2 As shown in the figure, after normalization correction, there are white scattered stripes at the edge of the detector pixels and tailing of the surrounding pixels. The penetration module of test object A is shown by taking a three-quarter lead cake of a certain thickness installed on an iron ladder as an example.
[0078] also, Figure 3 This is a schematic diagram of the grayscale value curve of a uniform lead plate at different detection pixel points in the related art, such as Figure 3 As shown in the figure, experimental measurements show that the response curve of a uniform lead plate at different detection pixel points is not uniform. The main reasons for the above phenomenon are:
[0079] 1) X-rays are scattered in the security inspection machine, and edge pixels receive more scattered light.
[0080] 2) Due to the device structure, the edge pixels and other detection pixels are only affected by the fluorescence of the pixels on one side inside the scintillator, and there is also a certain inconsistency in the response.
[0081] In view of this, the methods for reducing the scattering effect in X-ray detection devices in related technologies mainly include:
[0082] 1) By adding hardware that blocks scattered light.
[0083] 2) Obtain the scattering amount through simulation and other methods and then deduct it.
[0084] In the above method, the edge of the detector is covered with devices such as lead or tungsten that can block scattered light, which can effectively reduce the impact of scattering. However, it will bring about problems such as blockage in the optical path structure and high cost. The method of relying solely on simulation to deduct the scattering amount may result in a large deviation from the actual result.
[0085] In response to the above problems, the present application provides a data processing method and an image correction method, which aims to obtain the scattering amount using an experimental measurement scale and use a corresponding algorithm to perform scattering correction. This method can effectively eliminate the stripes caused by the Compton scattering effect of X-rays, and the stripes and tails caused by the inconsistency of edge pixel scattering, etc., making it easier for security personnel to use the corrected image for security inspections, reducing the difficulty of security inspections and improving security inspection efficiency.
[0086] It should be noted that the execution subject of the embodiments of the present application can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of performing the above functions. The following uses electronic devices as an example to illustrate the embodiments of the present application and the following embodiments.
[0087] The following embodiments of the present application and the following embodiments are described in detail.
[0088] According to one aspect, the present invention provides a data processing method, referring to Figure 4 , Figure 4 : is a flow chart of the data processing method provided by this application, including steps S401~S402:
[0089] Step S401, obtaining the scattering scale data of the security inspection machine;
[0090] Among them, the X-rays used for detection in the security inspection machine are emitted through the X-ray slit and irradiated to the detector through the package channel. The scattering scale data is used to characterize the scattering amount generated by the X-rays in the security inspection machine on the detection pixels at different positions of the detector when they are irradiated to the detection pixels at other positions.
[0091] It should be noted that the structure of the security inspection machine can refer to the above Figure 1 , the X-ray source emits X-rays through the X-ray slit, and the X-rays will irradiate the detector through the package channel to detect the package channel. The package channel can be set up with or without a package waiting for imaging objects.
[0092] It should also be noted that there are many detection pixels (also called detection pixel points) on the detector. Each detection pixel will receive X-rays and output a corresponding signal grayscale value, which represents the light intensity of the received X-rays. The received X-rays are not limited to transmitted X-rays, but also include scattered X-rays.
[0093] Step S402, generating target correspondences of detection pixels at all positions in the detector by fitting based on the scattering scale data;
[0094] The target correspondence relationship is used to represent the ratio of the scattering amount generated when detection pixels at different positions are irradiated by X-rays on detection pixels at other positions to the total light intensity of the X-rays.
[0095] For example, if X-rays are irradiated at a certain detection pixel A and the total light intensity is 10,000, if the grayscale value of the scattered light caused by the X-rays at another detection pixel B blocked by a lead or tungsten plate is 5, then the ratio represented above is 5 / 10,000.
[0096] In some embodiments, the target correspondence relationship may be represented by a scattering ratio function, a scattering ratio curve, or the like.
[0097] It should be noted that the present application can utilize a large amount of experimental data in the scattering calibration data to determine the fitting parameters in, for example, the scattering ratio function through methods such as the least squares method, thereby determining the scattering ratio function after the fitting parameters are determined as the target correspondence, and the target correspondence can be used for subsequent scattering correction.
[0098] An embodiment of the present application provides a data processing method. To address the problem of scattering inside a security inspection machine in related technologies, the present application first obtains scattering scale data of the security inspection machine to characterize the influence of scattering between different detection pixels of the detector, specifically characterizing this influence through the amount of scattering. Then, based on the scattering scale data, a target correspondence relationship corresponding to the detection pixels at all positions in the detector is fitted and generated to characterize the ratio of the scattering amount generated when the detection pixels at different positions are irradiated by X-rays on the detection pixels at other positions to the total light intensity of the X-rays. By fitting and generating the target correspondence relationship in this way based on the experimental scale, it is convenient to more accurately determine the amount of scattering received by the detection pixels at different positions, which helps to more accurately correct the image subsequently. After correction, the image becomes more uniform, the scattering stripes are corrected, the edges are clearer, and there is no more tailing phenomenon, which makes it convenient for security personnel to use the image for security inspection, reduces the difficulty of security inspection, and improves the efficiency of security inspection.
[0099] In some embodiments, a specific implementation method for obtaining the scattering scale data of the security inspection machine is provided. Specifically, the above step S401 can be implemented by the following steps:
[0100] Step S401-11, when a test plate is provided on the parcel channel of the security inspection machine and the test plate is moved so that the detector receives X-rays of different widths, measuring the light intensity of detection pixels at all positions when receiving X-rays of different widths; wherein the test plate is used to block the X-rays from irradiating detection pixels at at least some positions of the detector;
[0101] Step S401-12, dividing the illumination intensity of detection pixels at all positions when receiving X-rays of the same width into a group of data;
[0102] Step S401-13: For each set of data, the illumination intensities of all detection pixels are compared with a preset value. The first detection pixel whose illumination intensity is less than the preset value along the direction from the detection panel to the detection panel is determined to be the target detection pixel blocked by the edge of the test panel. The illumination intensities of the other detection pixels in the direction blocked by the test panel and spaced M detection pixels from the target detection pixel are used as the scattering amount of the corresponding detection pixel, where M is an integer greater than or equal to 1.
[0103] It should be noted that the above preset values can be set according to actual conditions to distinguish whether the detection pixels are blocked by the test board or not.
[0104] It should also be noted that the size of M can also be set according to actual conditions. Since the target detection pixel is the detection pixel blocked by the edge of the test board, it is believed that the light intensity received by the target detection pixel includes not only the direct amount of X-rays but also the scattered amount of X-rays scattered to the target detection pixel. Therefore, M detection pixels are spaced in the direction blocked by the test board, and it is believed that the other detection pixels outside the M detection pixels only receive the scattered amount. The light intensity of these detection pixels that only receive the scattered amount is used as the scattered amount, which is convenient for subsequent fitting with the light intensity of other detection pixels in the same group to generate the target correspondence relationship.
[0105] Step S401-14: The light intensity or scattering amount of the detection pixels at all positions in each set of data is used as the scattering scale data of the security inspection machine.
[0106] It should be noted that the test plate theoretically needs to be thick enough to completely block X-ray transmission. A lead plate or tungsten plate of a certain thickness can be used, for example, a 5mm lead plate. This application does not limit the material or thickness of the test plate, as long as it can block X-ray transmission. However, in practice, if a lead plate cannot completely block the X-rays, it will not affect the test results and can be used as well.
[0107] It should also be noted that when setting up a test board on the parcel channel of the security inspection machine for testing, it is necessary to refer to the relative position between the radiation source and the detector in the security inspection machine to determine the specific setting position of the test board to ensure that the test board can block at least part of the X-rays from irradiating the detector.
[0108] Specifically, after setting up the test board on the parcel channel of the security inspection machine, the test board is moved so that the detector receives X-rays of different widths. In this case, the light intensity of the detection pixels at all positions when receiving X-rays of different widths is measured, that is, the grayscale values output by the detection pixels at all positions when receiving X-rays of different widths are obtained.
[0109] After obtaining the light intensity of the detection pixels at all positions when receiving X-rays of different widths, these data need to be classified. Specifically, the light intensity of the detection pixels at all positions when receiving X-rays of the same width is divided into the same group of data.
[0110] In some embodiments, the classification process can be implemented during the acquisition process. Specifically, when the test plate is not moved, the detector receives X-rays of the same width. At this time, the light intensity of the detection pixels at all positions is measured as a single set of data. When the test plate is moved until the detector receives X-rays of a different width, similar steps are followed to measure and classify the data into a single set. This process is repeated and will not be further described here.
[0111] After dividing the data, for each group of data, the light intensities of all detection pixels are first compared with the preset values to distinguish which detection pixels are blocked by the test board and which detection pixels are not blocked by the test board, and the first detection pixel whose light intensity is less than the preset value along the direction from not blocked by the test board to blocked by the test board is determined as the target detection pixel blocked by the edge of the test board, and the light intensities of other detection pixels in the direction blocked by the test board and M detection pixels away from the target detection pixel are used as the scattering amount of the corresponding detection pixels. It is considered that these detection pixels only receive the scattering amount. These scattering amounts are used together with the light intensities of other detection pixels in the same group as scattering scale data for subsequent fitting to generate the target correspondence relationship.
[0112] In some embodiments, the scattering amount and light intensity in the same set of data can be normalized first, and then used as the scattering scale data of the security inspection machine for subsequent fitting steps to generate target correspondence relationships, which can improve the accuracy of the subsequent generation of target correspondence relationships to a certain extent.
[0113] In some embodiments, a method for implementing a test plate shape and placement corresponding to the aforementioned experimental method for obtaining scattering calibration data for security inspection machines is provided. When X-rays emitted through the X-ray slit irradiate the detector via the upper surface of the package passage, and the test plate's movement direction is perpendicular to the X-ray slit, the test plate is configured to be shaped like a right triangle, with one right-angled side of the triangle parallel to the test plate's movement direction and the other right-angled side perpendicular to the test plate's movement direction.
[0114] Specifically, Figure 5 This is one of the schematic diagrams of the test board in the data processing method provided in this application, such as Figure 5 As shown, a schematic diagram of a feasible experiment is shown, taking a lead plate as an example. Specifically, when X-rays emitted through the X-ray slit irradiate the detector via the upper surface of the package channel, and the movement direction of the test plate is perpendicular to the X-ray slit, the test plate is configured in the form of a right triangle, with two right-angled sides of the triangle parallel to and perpendicular to the movement direction of the test plate, respectively, and the hypotenuse passing through the corresponding long detector below the X-ray slit.
[0115] It should be noted that the conveyor speed of the package channel can be set to be sufficiently slow. When the belt starts to move the test board, the X-ray irradiation position in the channel slowly moves in the direction of the detector arrangement, and the grayscale values of all detection pixels in the detector at each moment are stored. In this way, for a single detection pixel, the grayscale value curve in the time direction is the curve of the scattering amount of X-rays of different widths at that detection pixel.
[0116] It should also be noted that the amount of experimental scale data can be adjusted by adjusting the placement angle of the test board or the belt speed, and more scale data can lead to more accurate fitting results.
[0117] In some embodiments, when a test plate is provided on the parcel channel of the security inspection machine and the detector receives X-rays of different widths by moving the test plate, a specific implementation method of measuring the illumination intensity of detection pixels at all positions when receiving X-rays of different widths may include:
[0118] A test plate is provided on the parcel passage of the security inspection machine, with one right-angled side of the test plate close to the left side of the parcel passage. The test plate is moved so that the detector receives X-rays of different widths. The light intensity of detection pixels at all positions when receiving X-rays of different widths is measured;
[0119] A test plate is provided on the parcel passage of the security inspection machine, with one right-angled side of the test plate close to the right side of the parcel passage. The test plate is moved so that the detector receives X-rays of different widths. The light intensity of detection pixels at all positions when receiving X-rays of different widths is measured;
[0120] Accordingly, a specific implementation of dividing the illumination intensity of detection pixels at all positions when receiving X-rays of the same width into a group of data may include:
[0121] The light intensity of the detection pixels at all positions when a right-angled edge of the test plate is close to the left side of the wrapping channel and receives X-rays of the same width is divided into a group of data, and the light intensity of the detection pixels at all positions when a right-angled edge of the test plate is close to the right side of the wrapping channel and receives X-rays of the same width is divided into a group of data.
[0122] Specifically, if Figure 5 As shown, it shows the situation where a right-side scattering test is performed after a right-angled edge of the test plate is close to the left side of the wrapping channel. According to the measurement steps in the above embodiment, the amount of scattering of detection pixels at different positions in the detector by detection pixels at other positions transmitted from the right side can be measured.
[0123] Figure 6 This is the second schematic diagram of the test board setting in the data processing method provided by this application, such as Figure 6 As shown, taking the test plate as a lead plate as an example, it shows the situation where a left-side scattering test is performed after a right-angled edge of the test plate is close to the right side of the wrapping channel. According to the measurement steps in the above embodiment, the amount of scattering of detection pixels at different positions in the detector by detection pixels at other positions transmitted from the left side can be measured.
[0124] It should be noted that there is usually a difference between the scattering amount obtained from the above-mentioned scattering test on the right and the scattering amount obtained from the scattering test on the left. Both can be used as scattering calibration data to fit and generate the target correspondence relationship. The two parts of the scattering amount can also be averaged and other data processed before being used as part of the scattering calibration data. This application does not impose any restrictions on this.
[0125] In other embodiments, another specific implementation method for obtaining the scattering scale data of the security inspection machine is provided. The above step S401 can be implemented by the following steps:
[0126] Step S401-21, when a test plate is provided on the parcel channel of the security inspection machine and the test plate is moved so that the detector receives X-rays of the same width but at different positions, measuring the light intensity of detection pixels at all positions when receiving X-rays of the same width but at different positions; wherein the test plate is used to block the X-rays from irradiating detection pixels at at least some positions of the detector;
[0127] Step S401-22, dividing the illumination intensities of all detection pixels at the same position when receiving X-rays of the same width into a group of data;
[0128] Step S401-23: for each detection pixel in each set of data, if the illumination intensity of the detection pixel is less than a preset value, the illumination intensity is used as the scattering amount of the detection pixel;
[0129] It should be noted that the above-mentioned preset values can be set according to actual conditions to distinguish whether the detection pixel is blocked by the test board or not. Since the width of the X-rays of the same width formed by the above-mentioned test board is usually small, if the light intensity of the detection pixel here is less than the preset value, it can be considered that the detection pixel only receives the scattered amount, and its light intensity is used as the scattering amount of the detection pixel, which is convenient for subsequent fitting with the light intensity of other detection pixels in the same group to generate the target correspondence relationship.
[0130] Step S401-24: The light intensity or scattering amount of the detection pixels at all positions in each set of data is used as the scattering scale data of the security inspection machine.
[0131] It should be noted that the test plate theoretically needs to be thick enough to completely block X-ray transmission. A lead plate or tungsten plate of a certain thickness can be used, for example, a 5mm lead plate. This application does not limit the material or thickness of the test plate, as long as it can block X-ray transmission. However, in practice, if a lead plate cannot completely block the X-rays, it will not affect the test results and can be used as well.
[0132] It should also be noted that when setting up a test board on the parcel channel of the security inspection machine for testing, it is necessary to refer to the relative position between the radiation source and the detector in the security inspection machine to determine the specific setting position of the test board to ensure that the test board can block at least part of the X-rays from irradiating the detector.
[0133] Specifically, Figure 7 This is the third schematic diagram of the test board setting in the data processing method provided by this application, such as Figure 7 As shown, taking the test plate as a lead plate (including lead plate 1 and lead plate 2) as an example, after the test plate is set on the parcel channel of the security inspection machine, the test plate is moved so that the detector receives X-rays of the same width but at different positions. In this case, the light intensity of the detection pixels at all positions is measured when they receive X-rays of the same width but at different positions, that is, the grayscale values output by the detection pixels at all positions when they receive X-rays of the same width but at different positions are obtained.
[0134] After obtaining the light intensity of the detection pixels at all positions when they receive X-rays of the same width but located at different positions, these data need to be classified. Specifically, the light intensity of the detection pixels at all positions when they receive X-rays of the same width and are located at the same position are divided into the same group of data.
[0135] In some embodiments, the classification process can be implemented during the acquisition process. Specifically, when the test plate is not moved, the detector receives X-rays of the same width and the X-rays are irradiated at the same location. In this case, the light intensity of the detection pixels at all locations is measured as a single set of data. After the test plate is moved so that the X-rays are irradiated at other locations, similar steps are used to measure and classify the data into a single set. This process is repeated and will not be further described here.
[0136] After dividing the data, for each group of data, for each detection pixel in each group of data, if the light intensity of the detection pixel is less than the preset value, it can be considered that the detection pixel only receives the scattered amount, and the corresponding light intensity is used as the scattering amount of the detection pixel. These scattered amounts are used together with the light intensities of other detection pixels in the same group as scattering scale data for subsequent fitting to generate target correspondence relationships.
[0137] In some embodiments, the scattering amount and light intensity in the same set of data can be normalized first, and then used as the scattering scale data of the security inspection machine for subsequent fitting steps to generate target correspondence relationships, which can improve the accuracy of the subsequent generation of target correspondence relationships to a certain extent.
[0138] In some embodiments, when the X-rays emitted through the X-ray slit are irradiated onto the detector via the upper surface of the wrapping channel, and the moving direction of the test plate is perpendicular to the X-ray slit, the test plate includes a first test plate and a second test plate, and the shapes of the first test plate and the second test plate are both set to be right triangles, one right-angled side of the right-angled triangle is parallel to the moving direction of the test plate, and the other right-angled side is perpendicular to the moving direction of the test plate, the hypotenuse of the first test plate is set in parallel with the hypotenuse of the second test plate, and the hypotenuse of the first test plate and the hypotenuse of the second test plate are separated by a preset width.
[0139] Specifically, if Figure 7 As shown, a schematic diagram of a feasible experiment is shown, taking the test plate as a lead plate as an example. Specifically, when X-rays emitted through the X-ray slit are irradiated onto the detector via the upper surface of the package channel, and the movement direction of the test plate is perpendicular to the X-ray slit, the test plate provided in the present application includes a first test plate and a second test plate, wherein the first test plate and the second test plate are both configured in the shape of a right triangle, with the two right-angled sides of the right triangle being parallel to and perpendicular to the movement direction of the test plate, respectively, and the hypotenuse of the first test plate is arranged parallel to the hypotenuse of the second test plate, and the hypotenuse of the first test plate is spaced apart by a preset width.
[0140] It should be noted that the above preset width can be set according to actual conditions and is usually set to be smaller.
[0141] It should be noted that the conveyor speed of the package channel can be set to be sufficiently slow. When the belt starts to move the test board, the X-ray irradiation position in the channel slowly moves in the direction of the detector arrangement, and the grayscale values of all detection pixels in the detector at each moment are stored. In this way, for a single detection pixel, the grayscale value curve in the time direction is the scattering curve of X-rays of the same width but irradiated at different positions on the detection pixel.
[0142] It should also be noted that the amount of scale data can be adjusted by adjusting the placement angle of the test board or the belt speed, and more scale data can lead to more accurate fitting results.
[0143] In some embodiments, the target correspondence may include a scatter ratio function;
[0144] A specific implementation of fitting and generating target correspondences of detection pixels at all positions in the detector based on the scattering scale data may include:
[0145] Substitute each set of data in the scattering scale data into the following formula to generate the first The scattering ratio function of the detection pixels :
[0146] ;
[0147] in, Both are greater than 0 and less than or equal to integer, Characterizes the number of detection pixels in the detector, Characterization The scattering amount of each detection pixel when it is blocked by the test board, Characterization The light intensity of each detection pixel when it is not blocked by the test board, Characterization The detection pixels are irradiated by X-rays at the The ratio of the scattering amount generated when a detection pixel is detected to the total intensity of the X-ray.
[0148] Specifically, after obtaining the scattering scale data, a suitable mathematical form can be constructed to calculate the scattering ratio function of X-rays at different positions. As fitting parameters, in each set of multiple data, the scattering amount of some detection pixels is used as the independent variable, and the light intensity of other detection pixels is used as the fitting amount to calculate the scattering ratio function. Perform least squares fitting and save the fitted scattering ratio function as template data.
[0149] Combined with the grayscale value variation law of the detected pixel points, the empirical formula of the scattering ratio function used by this application after multiple attempts is as follows:
[0150] ;
[0151] in, and For the parameters that need to be fitted, it can be understood that as long as the fitting is determined and , we can fit and determine the scattering ratio function ; The setting is because the measured curve needs to be fitted by adding multiple exponential functions. In different measurement situations, The purpose is to make the function and the measurement curve fit better. The grayscale value of each detection pixel collected at different times is regarded as the observation value, and the fitting parameters can be obtained by combining the above two formulas for fitting. and , substitute it into The scattering ratio function can be calculated from the formula.
[0152] It should be noted that the function form here is an empirical formula obtained based on the variation law of experimental data. It can be determined according to specific experimental conditions in different optical path structures. The above formula is used for fitting here in order to reduce the number of fitting parameters and obtain a simpler fitting form.
[0153] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data processing method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0154] According to another aspect, the present application also provides an image correction method, referring to Figure 8 , Figure 8 This is one of the flowcharts of the image correction method provided in this application, including steps S801~S802:
[0155] Step S801, obtaining the target correspondence relationship of the detection pixels at all positions in the detector of the security inspection machine;
[0156] The target correspondence relationship is used to represent the ratio of the scattering amount generated when the detection pixels at different positions are irradiated by X-rays on the detection pixels at other positions to the total light intensity of the X-rays;
[0157] Step S802: Based on the target correspondence, the package image currently obtained by the security inspection machine scanning the object to be imaged is corrected.
[0158] Specifically, after an object to be imaged, which is set on a package channel, is scanned using X-rays to obtain a package image output by a detector, the package image can be subjected to scatter correction using the target correspondence relationship (e.g., a scatter ratio function) obtained in any of the above embodiments to obtain a corrected package image for output.
[0159] An embodiment of the present application provides an image correction method. To address the problem of scattering inside a security inspection machine in related technologies, the present application first obtains a target correspondence relationship generated by fitting using an experimental scale, so as to more accurately determine the amount of scattering experienced by detection pixels at different positions. Then, after the security inspection machine is used to scan the imaging object to obtain a package image output by the detector, scattering correction can be performed on the package image based on the obtained target correspondence relationship. After correction, the image becomes more uniform, the scattering stripes are corrected, the edges are clearer, and there is no tailing phenomenon. This makes it easier for security personnel to use the image for security inspection, reduces the difficulty of security inspection, and improves security inspection efficiency.
[0160] In some embodiments, a specific implementation method for image correction based on a target correspondence relationship is provided. The target correspondence relationship includes a scattering ratio function, and the above step S802 specifically includes the following steps:
[0161] Step S802-1: The scattering ratio function of the detection pixels After normalization, the security inspection machine Each element in the scattering ratio matrix of dimension 1 is The element of position represents the The detection pixels are irradiated by X-rays at the The ratio of the scattering amount generated by each detection pixel to the total intensity of the X-ray is Both are greater than 0 and less than or equal to integer, Characterizing the number of detection pixels in the detector;
[0162] Step S802-2: Based on the scattering ratio matrix, the current scanning object to be imaged by the security inspection machine is obtained. dimensional package image for correction; where, is the end time of scanning the object to be imaged.
[0163] Specifically, first The scattering ratio function of the detection pixels After normalization, it is used as a security inspection machine Each element in the scattering ratio matrix of the dimension, the matrix elements in the scattering ratio matrix For example:
[0164] .
[0165] In the scattering ratio matrix Position elements , representing the The detection pixels are irradiated by X-rays at the The ratio of the scattering amount generated when a detection pixel is detected to the total intensity of the X-ray is the ratio of the scattering amount generated when a detection pixel is detected to the total intensity of the X-ray. The scattering ratio matrix is: dimensional matrix, the matrix of the package image obtained by the security inspection machine currently scanning the object to be imaged is Dimensional matrix, wrapping the gray value matrix corresponding to the image For example:
[0166] ;
[0167] in, Indicates the Detection pixels in Grayscale value at the moment.
[0168] In some embodiments, a specific implementation of image correction based on a scatter ratio matrix is provided. The above step S802-2 may include the following steps:
[0169] Will The scattering ratio matrix of Dimensional package image corresponding to the gray value matrix matrix multiplication, the multiplied dimensional grayscale value matrix used to represent the corrected parcel image.
[0170] Specifically, the gray value matrix of the corrected package image is is the scattering ratio matrix Grayscale value matrix corresponding to the wrapped image The product of , that is:
[0171] .
[0172] Here the scattering ratio matrix is dimensional matrix, the matrix of the package image obtained by the security inspection machine currently scanning the object to be imaged is Dimensional matrix, after multiplication, the gray value matrix of the corrected package image Also for It can be seen that the correction process does not affect the dimension of the image matrix.
[0173] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the image correction method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0174] The following examples illustrate the data processing method and image correction method provided in the embodiments of the present application, which mainly include the following processes:
[0175] Figure 9 This is the second flow chart of the image correction method provided by this application, such as Figure 9 As shown, it mainly includes the following processes:
[0176] 1) Experimental Scale. First, the scale is measured to determine the amount of X-ray scattering at different detector pixels. This can also be understood as the amount of X-ray scattering caused by pixels at different detector locations when X-rays strike them.
[0177] Specifically, it can be implemented through the following steps:
[0178] ① Prepare a lead plate or tungsten plate that is thick enough to completely block the transmission of X-rays as the above-mentioned test plate. In the experiment of this application, a 5mm lead plate is used. Figure 5 The shape of the lead plate is first Figure 5 It is placed in the parcel channel of the security inspection machine. Here, it is assumed that the X-rays in the position without the lead plate can be transmitted to the detector, while the detector blocked by the lead plate cannot receive the directly transmitted X-rays and can only receive scattered rays.
[0179] ② When the X-ray is positioned to the right of the lead plate, the signals generated by X-rays at different locations on all detectors are collected. Specifically, the speed of the belt conveyor in the security inspection machine's parcel channel can be set sufficiently slow. Once the belt begins to move, the X-ray exposure position in the parcel channel slowly shifts in the direction of the detector arrangement, and the grayscale values of all detection pixels in the detectors at each moment are stored. Thus, for a single detection pixel, the grayscale value curve over time represents the scattering amount of X-rays of different widths at that detection pixel.
[0180] ③After measuring the X-ray on the right side of the lead plate, turn the test plate fixture over and place it, as shown in the following figure: Figure 6 As shown, repeat the above steps to measure the X-ray situation on the left side of the lead plate.
[0181] ④ If the belt speed does not support adjustment, the lead plate can also be moved manually multiple times to obtain the corresponding experimental scale data. For example, use lead plates of different lengths to block the X-ray slit in turn, and then save the data. For different models of X-ray devices, because the relative positions of the X-ray source, the package channel and the detector are different, this application can also change the position of the lead plate to obtain the required scattering scale data. For example, for the side view of the security inspection machine, the lead plate can be erected in the channel. Similarly, the shape of the lead plate does not have to be a triangle. It is only necessary to ensure that the content of the collected data is the signal generated when the detector receives X-rays of different widths.
[0182] 2) Data Analysis: Construct a mathematical model to analyze and calculate the amount of X-ray scattering at different detection pixels at different locations.
[0183] Specifically, it can be implemented through the following steps:
[0184] ① Read the collected experimental calibration data, subtract the corresponding background grayscale value, and perform normalization correction based on the grayscale value collected under air conditions. This will produce a grayscale image that reflects the X-ray intensity received by the detector.
[0185] ② For a single pixel, when blocked by a thick lead plate, non-zero grayscale values are a response to scattered light from the surrounding area. As the lead plate moves, the change in the grayscale value of the detected pixel reflects the change in the amount of X-ray scattering at that pixel. If the lead plate does not completely block the image, this does not affect the results.
[0186] ③ The grayscale value is considered to be the linear superposition of the scattering amount produced by X-rays at different positions. A suitable mathematical form is constructed, with the ratio of X-rays at different positions as the fitting parameter, the grayscale values of all detectors at the same moment as the independent variable, and the grayscale value of the target analysis pixel as the fitting variable. The data is fitted using the least squares method to obtain the scattering parameters of X-rays at different positions for each detection pixel.
[0187] ④ The same calculation is performed on all detection pixels, and finally the scattering ratio of X-rays at different positions received by all detection pixels is obtained.
[0188] ⑤Save the scattering ratio matrix as template data.
[0189] Note the detection pixels Detected pixels The scattering ratio of the X-rays affected by the position is , record the X-ray intensity at a certain moment as , then its scattering for:
[0190] ;
[0191] Combined with the gray value variation law of the detection pixel point, the empirical formula of the scattering ratio function used after multiple attempts is as follows:
[0192] ;
[0193] in, and The grayscale values of each detection pixel collected at different times are regarded as observation quantities. By fitting with the above two formulas, the fitting parameters can be obtained. and , substitute it into The scattering ratio function can be calculated from the formula.
[0194] It should be noted that the function form here is an empirical formula obtained based on the variation law of experimental data. It can be determined according to specific experimental conditions in different optical path structures. The above formula is used for fitting here in order to reduce the number of fitting parameters and obtain a simpler fitting form.
[0195] Figure 10This is a comparison chart of the measured grayscale value and the fitted grayscale value of a detection pixel at different times in the image correction method provided by this application, such as Figure 10 As shown, it can be seen that the two are in good agreement.
[0196] 3) Image correction: Based on the experimental calibration data, read the package image and perform matrix multiplication according to the formula to obtain the scattering-corrected package image.
[0197] Specifically, it can be implemented through the following steps:
[0198] ① For the package image, first read the original grayscale value signal of its detector and perform linear normalization correction;
[0199] ② Load the scattering ratio function for correction calculation;
[0200] ③According to the formula Perform scatter correction calculation, multiply the gray value matrix of the package image by the scatter ratio matrix to obtain the gray value matrix of the corrected package image;
[0201] ④ Perform subsequent image processing on the scatter-corrected package image.
[0202] After obtaining the scattering ratio function, the scattering ratio matrix is calculated as , where the matrix elements are:
[0203] .
[0204] Gray value matrix corresponding to the wrapped image For example:
[0205] ;
[0206] Gray value matrix of the corrected package image is the scattering ratio matrix Grayscale value matrix corresponding to the wrapped image The product of , that is:
[0207] .
[0208] Figure 11 is a schematic diagram of a package image corrected in the image correction method provided by this application, such as Figure 11 As shown, compared with Figure 2 ,It can be seen that after correction, the image becomes more uniform and the white stripes are ,effectively removed.
[0209] In the embodiments of the present application, there are at least the following beneficial effects:
[0210] 1) This method effectively removes scattered light fringes from X-ray images, improving image quality. The experimental measurements yielded accurate and reliable data. Before scatter correction, white fringes appeared on the edge pixels of the detector, and the module edge area was brighter. After correction, the image became more uniform, the scattered light fringes were corrected, and the edges were sharper.
[0211] 2) This method is simple and rapid. Simply placing the lead sheet fixture used for measurement in the channel and wrapping it around it yields the required calibration data. The data collected simultaneously captures the continuous variation in X-ray width, accurately capturing its impact on each detector pixel. Adjusting the fixture's placement angle or belt speed allows for adjustments to the amount of calibration data, resulting in more accurate fitting results.
[0212] 3) The method of the present application is independent of the optical path structure and the X-ray machine model, and does not require the lead plate to completely block the X-rays. For high-energy radiation devices, the scattering effect can also be calibrated, and the method has strong adaptability.
[0213] The present application also provides a data processing device, Figure 12 This is a schematic diagram of the structure of the data processing device provided by this application. Figure 12 As shown, the data processing device includes:
[0214] The first acquisition module 1201 is configured to acquire scatter calibration data of the security inspection machine. The X-rays used for detection in the security inspection machine are emitted through the X-ray slit and irradiated onto the detector via the package channel. The scatter calibration data is used to represent the amount of scattering caused by the X-rays irradiating detection pixels at different locations on the detector.
[0215] The fitting module 1202 is used to fit and generate a target correspondence relationship for the detection pixels at all positions in the detector based on the scattering scale data; wherein the target correspondence relationship is used to represent the ratio of the scattering amount generated when the detection pixels at different positions are irradiated by X-rays on the detection pixels at other positions to the total light intensity of the X-rays.
[0216] The data processing device provided in this application, utilizing the data processing methods described in the aforementioned embodiments, can address the technical issues associated with relying solely on simulation methods to accurately characterize objects by subtracting the effects of scattering, leading to increased security inspection difficulty and low efficiency. Compared to the prior art, the data processing device provided in this application achieves the same beneficial effects as the data processing methods described in the aforementioned embodiments. Other technical features of the data processing device are the same as those disclosed in the aforementioned embodiments and are not further elaborated here.
[0217] This application also provides an image correction device, Figure 13 This is a schematic diagram of the structure of the image correction device provided by this application. Figure 13 As shown, the image correction device includes:
[0218] The second acquisition module 1301 is used to obtain the target correspondence relationship of the detection pixels at all positions in the detector of the security inspection machine; wherein the target correspondence relationship is used to represent the ratio of the scattering amount generated by the detection pixels at different positions when the detection pixels are irradiated by the X-rays at other positions to the total light intensity of the X-rays;
[0219] The correction module 1302 is configured to correct the package image currently obtained by the security inspection machine scanning the object to be imaged based on the target correspondence relationship.
[0220] The image correction device provided in this application, utilizing the image correction method described in the aforementioned embodiments, can address the technical issues associated with relying solely on simulation methods to deduct the effects of scattering to accurately characterize objects, leading to increased security inspection difficulty and low efficiency. Compared to the prior art, the image correction device provided in this application achieves the same beneficial effects as the image correction method described in the aforementioned embodiments. Other technical features of the image correction device are the same as those disclosed in the aforementioned embodiments and are not further elaborated here.
[0221] The present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the data processing method in the above-mentioned embodiment, or to execute the image correction method in the above-mentioned embodiment.
[0222] Reference below Figure 14 , Figure 14 is a schematic diagram of the structure of the device provided in this application, which shows a schematic diagram of the structure of a device suitable for implementing the embodiments of this application. The devices in the embodiments of this application may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 14 The device shown is only an example and should not limit the functions and scope of use of the embodiments of the present application.
[0223] like Figure 14 As shown, the device may include a processing device 1401 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1402 or programs loaded from a storage device 1403 into a random access memory (RAM) 1404. RAM 1404 also stores various programs and data required for device operation. Processing device 1401, ROM 1402, and RAM 1404 are interconnected via a bus 1405. An input / output (I / O) interface 1406 is also connected to the bus. Typically, the following systems may be connected to I / O interface 1406: input devices 1407, such as a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1408, such as a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1403, such as a magnetic tape or hard disk; and communication device 1409. Communication device 1409 can allow the device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows a device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have instead.
[0224] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1403, or installed from a ROM 1402. When the computer program is executed by the processing device 1401, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0225] The device provided in this application, utilizing the data processing method or image correction method described in the aforementioned embodiments, can address the technical issues associated with relying solely on simulation methods to deduct the effects of scattering to accurately characterize objects, leading to increased security inspection difficulty and low efficiency. Compared to the prior art, the device provided in this application offers the same beneficial effects as the data processing method or image correction method described in the aforementioned embodiments. Other technical features of this device are the same as those disclosed in the aforementioned embodiments and are not further elaborated here.
[0226] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0227] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0228] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, wherein the computer-readable program instructions are used to execute the data processing method or the image correction method in the above-mentioned embodiment.
[0229] The computer-readable storage medium provided herein may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or other types of systems, systems, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including, but not limited to, wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0230] The computer-readable storage medium may be included in the device, or may exist independently without being incorporated into the device.
[0231] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a device, the device performs the following steps:
[0232] Obtaining scatter calibration data for the security inspection machine; wherein X-rays used for detection in the security inspection machine are emitted through the X-ray slit and irradiated onto the detector via the package channel. The scatter calibration data is used to represent the amount of scattering caused by the X-rays in the security inspection machine on detection pixels at different locations of the detector when the X-rays irradiate detection pixels at other locations;
[0233] Based on the scattering scale data, a target correspondence relationship is fitted to generate the target correspondence relationship of the detection pixels at all positions in the detector; wherein the target correspondence relationship is used to represent the ratio of the scattering amount generated by the detection pixels at different positions when the detection pixels are irradiated by the X-rays at other positions to the total light intensity of the X-rays;
[0234] Alternatively, perform the following steps:
[0235] Obtaining a target correspondence relationship for detection pixels at all positions in the detector of the security inspection machine; wherein the target correspondence relationship is used to represent the ratio of the scattering amount generated when detection pixels at different positions are irradiated by X-rays on detection pixels at other positions to the total light intensity of the X-rays;
[0236] Based on the target correspondence, the package image currently obtained by the security inspection machine scanning the object to be imaged is corrected.
[0237] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0238] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0239] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0240] The computer-readable storage medium provided in this application is a computer-readable storage medium storing computer-readable program instructions (i.e., a computer program) for executing the aforementioned data processing method or image correction method. This computer-readable storage medium can address the technical issue of relying solely on simulation methods to accurately characterize objects by subtracting the effects of scattering, resulting in high security inspection difficulty and low efficiency. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the data processing method or image correction method provided in the aforementioned embodiments and are not further elaborated here.
[0241] The present application also provides a computer program product, comprising a computer program, which implements the steps of the above-mentioned data processing method or image correction method when executed by a processor.
[0242] The computer program product provided in this application can address the technical problem of relying solely on simulation methods to accurately characterize objects by subtracting the effects of scattering, resulting in increased security inspection difficulty and low efficiency. Compared to existing technologies, the beneficial effects of the computer program product provided in this application are similar to those of the data processing methods or image correction methods provided in the aforementioned embodiments, and are not further elaborated here.
[0243] The above descriptions are only some embodiments of the present application and do not limit the scope of the present application. All equivalent structural transformations made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the scope of protection of the present application.
Claims
1. A data processing method, characterized in that: The method comprises: Obtaining scatter calibration data for the security inspection machine; wherein X-rays used for detection in the security inspection machine are emitted through the X-ray slit and irradiated onto the detector via the package channel. The scatter calibration data is used to represent the amount of scattering caused by the X-rays in the security inspection machine on detection pixels at different locations of the detector when the X-rays irradiate detection pixels at other locations; Based on the scattering scale data, a target correspondence relationship is fitted to generate the target correspondence relationship of the detection pixels at all positions in the detector; wherein the target correspondence relationship is used to represent the ratio of the scattering amount generated by the detection pixels at different positions when the detection pixels are irradiated by the X-rays at other positions to the total light intensity of the X-rays; The step of obtaining the scattering scale data of the security inspection machine includes: A test plate is provided on the parcel passage of the security inspection machine, and when the detector receives X-rays of different widths by moving the test plate, the light intensity of detection pixels at all positions when receiving X-rays of different widths is measured; wherein the test plate is used to block the X-rays from irradiating detection pixels at at least some positions of the detector; The illumination intensity of the detection pixels at all positions when receiving X-rays of the same width is divided into a group of data; For each set of data, the illumination intensity of all detection pixels is compared with a preset value, and the first detection pixel whose illumination intensity is less than the preset value along the direction from the test board to the test board is determined to be the target detection pixel blocked by the edge of the test board. The illumination intensity of other detection pixels in the direction blocked by the test board and spaced M detection pixels away from the target detection pixel is used as the scattering amount of the corresponding detection pixel, where M is an integer greater than or equal to 1. The light intensity or scattering amount of the detection pixels at all positions in each set of data is used as the scattering scale data of the security inspection machine; or, The step of obtaining the scattering scale data of the security inspection machine includes: A test plate is provided on the parcel passage of the security inspection machine, and when the detector receives X-rays of the same width but at different positions by moving the test plate, the light intensity of detection pixels at all positions when receiving X-rays of the same width but at different positions is measured; wherein the test plate is used to block the X-rays from irradiating the detection pixels at at least some positions of the detector; The light intensity of the detection pixels at all positions that receive X-rays of the same width and are located at the same position is divided into a group of data; For each detection pixel in each set of data, if the illumination intensity of the detection pixel is less than a preset value, the illumination intensity is used as the scattering amount of the detection pixel; The light intensity or scattering amount of the detection pixels at all positions in each set of data is used as the scattering scale data of the security inspection machine.
2. The method according to claim 1, wherein When the X-rays emitted through the X-ray slit are irradiated onto the detector via the upper surface of the wrapping channel, and the moving direction of the test plate is perpendicular to the X-ray slit, the shape of the test plate is set to be a right triangle, one right-angled side of the right triangle is parallel to the moving direction of the test plate, and the other right-angled side is perpendicular to the moving direction of the test plate.
3. The method according to claim 2, wherein The step of measuring the light intensity of detection pixels at all positions when receiving X-rays of different widths, when a test plate is provided on the parcel channel of the security inspection machine and the detector receives X-rays of different widths by moving the test plate, comprises: A test plate is provided on the parcel passage of the security inspection machine, with one right-angled side of the test plate close to the left side of the parcel passage. The test plate is moved so that the detector receives X-rays of different widths. The light intensity of detection pixels at all positions when receiving X-rays of different widths is measured; A test plate is provided on the parcel passage of the security inspection machine, with one right-angled side of the test plate close to the right side of the parcel passage. The test plate is moved so that the detector receives X-rays of different widths. The light intensity of detection pixels at all positions when receiving X-rays of different widths is measured; The step of dividing the illumination intensity of detection pixels at all positions when receiving X-rays of the same width into a group of data includes: The light intensity of the detection pixels at all positions when a right-angled edge of the test plate is close to the left side of the wrapping channel and receives X-rays of the same width is divided into a group of data, and the light intensity of the detection pixels at all positions when a right-angled edge of the test plate is close to the right side of the wrapping channel and receives X-rays of the same width is divided into a group of data.
4. The method according to claim 1, wherein When the X-rays emitted through the X-ray slit are irradiated on the detector via the upper surface of the wrapping channel, and the moving direction of the test plate is perpendicular to the X-ray slit, the test plate includes a first test plate and a second test plate, and the shapes of the first test plate and the second test plate are both set to be right triangles, one right-angled side of the right-angled triangle is parallel to the moving direction of the test plate, and the other right-angled side is perpendicular to the moving direction of the test plate, the hypotenuse of the first test plate is set in parallel with the hypotenuse of the second test plate, and the hypotenuse of the first test plate and the hypotenuse of the second test plate are separated by a preset width.
5. The method according to any one of claims 1 to 4, characterized in that The target correspondence relationship includes a scattering ratio function; The step of fitting and generating target correspondences of detection pixels at all positions in the detector based on the scattering scale data comprises: Substitute each set of data in the scattering scale data into the following formula to generate the first The scattering ratio function of the detection pixels : ; in, Both are greater than 0 and less than or equal to integer, Characterizes the number of detection pixels in the detector, Characterization The scattering amount of each detection pixel when it is blocked by the test board, Characterization The light intensity of each detection pixel when it is not blocked by the test board, Characterization The detection pixels are irradiated by X-rays at the The ratio of the scattering amount generated when a detection pixel is detected to the total intensity of the X-ray.
6. An image correction method, characterized in that: The method comprises: Based on the data processing method according to any one of claims 1 to 5, a target correspondence relationship is obtained for detection pixels at all positions in a detector of a security inspection machine; wherein the target correspondence relationship is used to represent the ratio of the scattering amount generated by detection pixels at different positions when X-rays are irradiated on detection pixels at other positions to the total light intensity of the X-rays; Based on the target correspondence, the package image currently obtained by the security inspection machine scanning the object to be imaged is corrected.
7. The method according to claim 6, wherein The target correspondence relationship includes a scattering ratio function; The step of correcting the package image currently scanned by the security inspection machine and obtained by the security inspection machine based on the target correspondence includes: The first The scattering ratio function of the detection pixels After normalization, the security inspection machine Each element in the scattering ratio matrix of dimension 1 is The element of position represents the The detection pixels are irradiated by X-rays at the The ratio of the scattering amount generated by each detection pixel to the total X-ray intensity is Both are greater than 0 and less than or equal to integer, Characterizing the number of detection pixels in the detector; Based on the scattering ratio matrix, the security inspection machine currently scans the object to be imaged. dimensional package image for correction; where, is the end time of scanning the object to be imaged.
8. The method according to claim 7, wherein The scattering ratio matrix is based on the current scanning of the object to be imaged by the security inspection machine. The steps of correcting the dimensional package image include: Will The scattering ratio matrix of Dimensional package image corresponding to the gray value matrix matrix multiplication, the multiplied dimensional grayscale value matrix used to represent the corrected parcel image.
Citation Information
Patent Citations
Medical X-ray imaging scattering correction method and device and storage medium
CN118593003A