Data processing method and image correction method

By acquiring and fitting the scattering scale data of the security checking machine, the target correspondence relationship of the detector is generated, and the problem of inaccurate simulation deducting the scattering amount in the prior art is solved, and more accurate image correction and more efficient security checking process are achieved.

CN120182147AActive Publication Date: 2025-06-20HANGZHOU RAYIN TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510645800.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-06-20
Estimated Expiration
2045-05-20

AI Technical Summary

Technical Problem

The single-reliance simulation method in the prior art decisive scattering amounts, resulting in inaccurate representation of objects by X-ray transmission security machine, increasing security inspection difficulty and reducing efficiency.

Method used

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, 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, and then image correction is performed.

Benefits of technology

Effectively eliminate the fringes and tailing phenomena caused by X-ray scattering, improve the uniformity and clarity of the image, reduce the difficulty of security inspection, and improve security inspection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120182147A_ABST
    Figure CN120182147A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and an image correction method, and relates to the technical field of image processing, and the data processing method comprises the steps: obtaining scattering scale data of a security inspection machine, transmitting X-rays used for detection in the security inspection machine through an X-ray light seam, irradiating a detector through a parcel channel, and obtaining the scattering scale data of the security inspection machine; the scattering scale data is used for representing the scattering amount generated by the X-ray in the security inspection machine on the detection pixels at other positions when the X-ray irradiates the detection pixels at different positions of the detector; based on the scattering scale data, a target corresponding relation of the detection pixels at all positions in the detector is generated through fitting, and the target corresponding relation is used for representing the proportion of the scattering amount generated when the detection pixels at different positions are irradiated by the X-ray to the detection pixels at other positions in the total light intensity of the X-ray. According to the invention, the target corresponding relation is generated through the experimental scales, so that the scattering amounts of the detection pixels at different positions can be more accurately determined, and the subsequent more accurate correction of the image is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and particularly to a data processing method and an image correction method. Background Art

[0002] For an X-ray transmission type security inspection machine, such as a linear array X-ray transmission type security inspection machine, it mainly includes a ray source, a package channel, and a detector. Items to be inspected can be placed on the package channel. The ray source emits X-rays, which pass through the package channel and are finally received by the detector in the detection box. The detector outputs grayscale signals to form an image to characterize the situation of the items on the package channel.

[0003] Normally, for a uniform object, the grayscale values corresponding to its characterized image should be the same. However, in the image of a difficult-to-penetrate substance in an actual X-ray transmission type security inspection machine, there are usually white scattering stripes at the edge points of the detector pixels and trailing phenomena in the surrounding pixels, that is, the grayscale values of the characterized image of a uniform object are not all the same. This is mainly because X-rays are scattered in the security inspection machine.

[0004] Currently, scattering amounts are usually obtained through simulation and other methods and then deducted to improve the above situation. However, the correction by solely relying on the method of simulation may have a large deviation from the actual situation, which will affect the good characterization of the object, and may further interfere with security inspection personnel, resulting in high security inspection difficulty and low efficiency.

[0005] The above content is only used to assist in understanding the technical solution of this application, and does not represent 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, aiming to solve the technical problem that the method of solely relying on simulation to deduct the scattering amount in the related art affects the good characterization of the object, resulting in high security inspection difficulty and low efficiency.

[0007] To achieve the above purpose, this application proposes a data processing method, and the method includes: Obtain the scattering scale data of the security inspection machine; wherein, the X-rays used for detection in the security inspection machine are emitted through an X-ray slit and irradiated on the detector via the package channel, and the scattering scale data is used to characterize the scattering amount generated by the X-rays in the security inspection machine when irradiating the detection pixels at different positions on the detector on the detection pixels at other positions; Based on the scattering calibration data, a target correspondence relationship of the detection pixels at all positions in the detector is fitted and generated; wherein, the target correspondence relationship is used 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.

[0008] In one embodiment, the step of obtaining the scattering calibration data of the security inspection machine includes: When a test board is arranged on the package channel of the security inspection machine and the detector receives X-rays with different widths by moving the test board, measure the light intensity of the detection pixels at all positions when receiving X-rays with different widths; wherein, the test board is used to block the X-rays from irradiating at least part of the detection pixels at the positions of the detector. Divide the light intensities of the detection pixels at all positions when receiving the same width of X-rays into a set of data. For each set of data, compare the light intensities of all detection pixels with a preset value respectively, determine the first detection pixel whose light intensity is less than the preset value in the direction from the unblocked part by the test board to the blocked part by the test board as the target detection pixel blocked by the edge of the test board, and use the light intensities of other detection pixels that are spaced M detection pixels away from the target detection pixel in the direction blocked by the test board as the scattering amounts of the corresponding detection pixels, where M is an integer greater than or equal to 1. Take the light intensities or scattering amounts of the detection pixels at all positions in each set of data as the scattering calibration data of the security inspection machine.

[0009] In one embodiment, when the X-rays emitted through the X-ray slit irradiate the detector through the upper surface of the package channel and the moving direction of the test board is perpendicular to the X-ray slit, the shape of the test board is set as a right triangle, one right side of the right triangle is parallel to the moving direction of the test board, and the other right side is perpendicular to the moving direction of the test board.

[0010] In one embodiment, the step of when a test board is arranged on the package channel of the security inspection machine and the detector receives X-rays with different widths by moving the test board, measure the light intensity of the detection pixels at all positions when receiving X-rays with different widths includes: When a test board is arranged on the package channel of the security inspection machine, one right side of the test board is close to the left side of the package channel, and the detector receives X-rays with different widths by moving the test board, measure the light intensity of the detection pixels at all positions when receiving X-rays with different widths. A test board is provided on the package passage of the security inspection machine. One right-angled side of the test board is close to the right side of the package passage. When the detector receives X-rays of different widths by moving the test board, the light intensity of the detection pixels at all positions when receiving X-rays of different widths is measured. The step of dividing the light intensity of the detection pixels at all positions when receiving X-rays of the same width into a set of data includes: Dividing the light intensity of the detection pixels at all positions when one right-angled side of the test board is close to the left side of the package passage and receiving X-rays of the same width into a set of data, and dividing the light intensity of the detection pixels at all positions when one right-angled side of the test board is close to the right side of the package passage and receiving X-rays of the same width into a set of data.

[0011] In one embodiment, the step of obtaining the scatter scale data of the security inspection machine includes: A test board is provided on the package passage of the security inspection machine. When the detector receives X-rays of the same width but at different positions by moving the test board, the light intensity of the detection pixels at all positions when receiving X-rays of the same width but at different positions is measured; wherein, the test board is used to block the X-rays from irradiating at least part of the detection pixels of the detector. Dividing the light intensity of the detection pixels at all positions when receiving X-rays of the same width and at the same position into a set of data; For each detection pixel in each set of data, if the light intensity of the detection pixel is less than a preset value, then taking the light intensity as the scatter amount of the detection pixel; Taking the light intensity or scatter amount of the detection pixels at all positions in each set of data as the scatter scale data of the security inspection machine.

[0012] In one embodiment, when the X-rays emitted through the X-ray slit irradiate the detector through the upper surface of the package passage and the moving direction of the test board is perpendicular to the X-ray slit, the test board includes a first test board and a second test board. The shapes of the first test board and the second test board are both set as right-angled triangles. One right-angled side of the right-angled triangle is parallel to the moving direction of the test board, and the other right-angled side is perpendicular to the moving direction of the test board. The hypotenuse of the first test board is parallel to the hypotenuse of the second test board, and a preset width is provided between the hypotenuse of the first test board and the hypotenuse of the second test board.

[0013] In one embodiment, the target correspondence includes a scatter ratio function; The step of fitting and generating the target correspondence of the detection pixels at all positions in the detector based on the scattering scale data includes: Substitute each set of data in the scattering scale data into the following formula respectively to fit and generate the scattering ratio function of the th detection pixel ; where are all integers greater than 0 and less than or equal to , represents the number of detection pixels in the detector, represents the th detection pixel's scattering amount when blocked by the test board, represents the th detection pixel's light intensity when not blocked by the test board, represents the proportion of the scattering amount generated when the th detection pixel is irradiated by X-rays on the th detection pixel to the total light intensity of the X-rays.

[0014] In addition, to achieve the above object, the present application also proposes an image correction method, the method includes: Obtain the target correspondence of the detection pixels at all positions in the detector of the security inspection machine; wherein, the target correspondence is used to represent 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; Based on the target correspondence, correct the package image obtained by the security inspection machine when currently scanning the object to be imaged.

[0015] In an embodiment, the target correspondence includes a scattering ratio function; The step of correcting the package image obtained by the security inspection machine when currently scanning the object to be imaged based on the target correspondence includes: After normalizing the scattering ratio function of the th detection pixel , use it as each element in the -dimensional scattering ratio matrix of the security inspection machine; wherein, the element at the position in the scattering ratio matrix represents the proportion of the scattering amount generated when the th detection pixel is irradiated by X-rays on the th detection pixel to the total light intensity of the X-rays, are all integers greater than 0 and less than or equal to , represents the number of detection pixels in the detector; Based on the scattering ratio matrix, correct the -dimensional package image obtained by the current scanning of the object to be imaged by the security inspection machine; where is the end time of scanning the object to be imaged.

[0016] In one embodiment, the step of correcting the -dimensional package image obtained by the current scanning of the object to be imaged by the security inspection machine based on the scattering ratio matrix includes: Multiply the -dimensional scattering ratio matrix with the grayscale value matrix corresponding to the -dimensional package image to obtain the multiplied -dimensional grayscale value matrix, which is used to represent the corrected package image.

[0017] In addition, to achieve the above object, the present application also proposes a data processing device, the device includes: A first acquisition module, configured to acquire the scattering scale data of the security inspection machine; where the X-rays used for detection in the security inspection machine are emitted through an X-ray slit and irradiated on the detector through a package channel, and the scattering scale data is used to represent the scattering amount generated by the X-rays in the security inspection machine when irradiating the detection pixels at different positions on the detector on the detection pixels at other positions; A fitting module, configured to generate a target correspondence relationship of all the detection pixels at all positions in the detector based on the scattering scale data; where the target correspondence relationship is used to represent the proportion of the scattering amount generated by the X-rays irradiating the detection pixels at other positions on the detection pixels at different positions to the total light intensity of the X-rays.

[0018] In addition, to achieve the above object, the present application also proposes an image correction device, the device includes: A second acquisition module, configured to acquire the target correspondence relationship of all the detection pixels at all positions in the detector of the security inspection machine; where the target correspondence relationship is used to represent the proportion of the scattering amount generated by the X-rays irradiating the detection pixels at other positions on the detection pixels at different positions to the total light intensity of the X-rays; A correction module, configured to correct the package image obtained by the current scanning of the object to be imaged by the security inspection machine based on the target correspondence relationship.

[0019] In addition, to achieve the above object, the present application also proposes an electronic device, the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program is configured to implement the steps of the data processing method as described above, or implement the steps of the image correction method as described above.

[0020] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the data processing method described above are implemented, or the steps of the image correction method described above are implemented.

[0021] In addition, to achieve the above object, the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the data processing method described above are implemented, or the steps of the image correction method described above are implemented.

[0022] One or more technical solutions proposed by the present application have at least the following technical effects: Regarding the problem of scattering inside the security inspection machine in the related art, 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. Specifically, this influence is characterized by the scattering amount. Then, based on the scattering scale data, a target correspondence corresponding to the detection pixels at all positions in the detector is fitted and generated 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 in this way based on the experimental scale, it is convenient to more accurately determine the scattering amount received by the detection pixels at different positions, which helps to more accurately correct the image in the subsequent process. After correction, the image becomes more uniform, the scattering stripes are corrected, and the edges are clearer, and there is no longer a trailing phenomenon, which is convenient for security inspection personnel to use the image for security inspection, reduces the security inspection difficulty, and improves the security inspection efficiency. Description of the Drawings

[0023] The drawings here are incorporated into the description and form a part of this description, showing embodiments consistent with the present application and used together with the description to explain the principles of the present application.

[0024] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0025] Figure 1 is a schematic structural diagram of a linear array X-ray transmission type security inspection machine in the related art; Figure 2 is the original grayscale image of the penetration module of the test object A in the related art; Figure 3It is a schematic diagram of the gray value curves of a uniform lead plate at different detection pixel points in the related art; Figure 4 It is a schematic flowchart of the data processing method provided by this application; Figure 5 It is one of the schematic diagrams of the setting of the test board in the data processing method provided by this application; Figure 6 It is another schematic diagram of the setting of the test board in the data processing method provided by this application; Figure 7 It is yet another schematic diagram of the setting of the test board in the data processing method provided by this application; Figure 8 It is one of the schematic flowcharts of the image correction method provided by this application; Figure 9 It is another schematic flowchart of the image correction method provided by this application; Figure 10 It is a comparison chart of the measured gray values and the fitted gray values of a certain detection pixel point at different times in the image correction method provided by this application; Figure 11 It is a schematic diagram of the corrected package image in the image correction method provided by this application; Figure 12 It is a schematic structural diagram of the data processing device provided by this application; Figure 13 It is a schematic structural diagram of the image correction device provided by this application; Figure 14 It is a schematic structural diagram of the device provided by this application.

[0026] The realization of the purpose, functional features and advantages of this application will be further described in combination with the embodiments with reference to the accompanying drawings. Specific Embodiments

[0027] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.

[0028] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by those skilled 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" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion.

[0029] In the description of the embodiments of the present application, technical terms such as "first" and "second" are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity, specific order, or primary-secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "a plurality" is two or more, unless otherwise specifically defined.

[0030] Referring to "embodiments" in the present application means that the specific features, structures, or characteristics described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase at various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described in the present application may be combined with other embodiments.

[0031] In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, the character " / " in this text generally represents an "or" relationship between the associated objects before and after.

[0032] To better understand the technical solution of the present application, the following will be described in detail in conjunction with the accompanying drawings of the specification and specific implementation manners.

[0033] Figure 1 is a schematic structural diagram of a linear array X-ray transmission type security inspection machine in the related art. As Figure 1 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 gray values to form an image.

[0034] It should be noted that the gray value output by the detector when no X-ray is incident is called the background value. The gray value output by the detector when the X-ray is directly incident (under air conditions, no package is set in the package channel 2) is called the full-load value. Usually, after the detector 3 outputs the gray value, linear normalization correction can be performed. Linear normalization correction is to subtract the background value from the gray value of each pixel point and then divide by the difference between the full-load value and the background value. After normalization, the gray values of uniform objects are usually the same.

[0035] However, in the image of difficult-to-penetrate substances in the X-ray transmission type security inspection machine, for example Figure 2 is the original gray-scale image of the penetration module of the test object A in the related art. As Figure 2 shown, after normalization correction, there are white scattering stripes at the edge points of the detector pixels and trailing phenomena of the surrounding pixels. The penetration module of the test object A is shown by taking a three-quarter lead cake with a certain thickness installed on an iron ladder as an example.

[0036] In addition, Figure 3 is a schematic diagram of the gray value curve of a uniform lead plate at different detection pixel points in the related art, as Figure 3 shown. Experimental measurements have found that for a uniform lead plate, the response curves at different detection pixel points are not uniform either. The main reasons for the above phenomena are as follows: 1) X-rays are scattered in the security inspection machine, and the edge pixel points receive more scattered light.

[0037] 2) Due to the device structure, the edge pixel points and other detection pixel points are only affected by the fluorescence of the pixel points on one side inside the scintillator, and there is also a certain response inconsistency.

[0038] In response to this, the main methods for reducing the scattering effect in the X-ray detection device in the related art are as follows: 1) By adding hardware of devices that can block scattered light.

[0039] 2) Obtaining the scattering amount through simulation and other methods and then deducting it.

[0040] In the above methods, attaching lead, tungsten or other devices that can block scattered light to the edge of the detector for shielding can effectively reduce the influence of scattering, but it will bring problems such as blocking in the optical path structure and high cost; and relying solely on the method of simulation to deduct the scattering amount, the result may have a large deviation from the actual situation.

[0041] In view of the above problems, the present application provides a data processing method and an image correction method, aiming to obtain the scattering amount by using the method of experimental measurement calibration and perform scattering correction using a corresponding algorithm. 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, facilitating security inspectors to use the corrected image for security inspection, reducing the security inspection difficulty, and improving the security inspection efficiency.

[0042] 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 running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of implementing the above functions. Hereinafter, an electronic device will be taken as an example to illustrate the embodiments of the present application and the following embodiments.

[0043] The following specifically describes the embodiments of the present application and the following embodiments.

[0044] According to one aspect, an embodiment of the present application provides a data processing method. Referring to Figure 4 , Figure 4 is a schematic flowchart of the data processing method provided by the present application, including steps S401 to S402: Step S401: Obtain the scatter scale data of the security inspection machine; Among them, the X-rays used for detection in the security inspection machine are emitted through an X-ray slit and irradiated onto the detector via a package channel. The scatter scale data is used to characterize the amount of scatter generated by the X-rays in the security inspection machine when irradiating different positions of the detection pixels on the detector to the detection pixels at other positions.

[0045] It should be noted that the structure of the security inspection machine can refer to the above Figure 1 , where the ray source emits X-rays through an X-ray slit, and the X-rays will be irradiated onto the detector via the package channel to detect the package channel. The package channel can be provided or not provided with an object waiting for imaging.

[0046] It should also be noted that there are many detection pixels (which can also be called detection pixel points) on the detector. Each detection pixel will receive X-rays and correspondingly output a signal gray value, which characterizes the illumination intensity of the received X-rays. The received X-rays are not limited to the transmitted X-rays, but also include scattered X-rays.

[0047] Step S402: Based on the scatter scale data, fit and generate the target correspondence of the detection pixels at all positions in the detector; Among them, the target correspondence is used to characterize the proportion of the scatter amount generated by the detection pixels at different positions when the X-rays irradiate the detection pixels at other positions to the total light intensity of the X-rays.

[0048] For example, when there is X-ray irradiation at a certain detection pixel A and its total light intensity is 10,000, if at another detection pixel B blocked by a lead or tungsten plate, the gray value of the scatter generated by the X-ray irradiation at detection pixel A is 5, then the above-mentioned characterized proportion is 5 per ten thousand.

[0049] In some embodiments, the above-mentioned target correspondence can be characterized in the form of a scatter ratio function, a scatter ratio curve, etc.

[0050] It should be noted that in this application, a large amount of experimental data in the scatter scale data can be used to determine the fitting parameters in, for example, the scatter ratio function by methods such as the least squares method, so as to determine the scatter ratio function after determining the fitting parameters as the target correspondence, and this target correspondence can be used for subsequent scatter correction.

[0051] An embodiment of the present application provides a data processing method. Aiming at the problem of scattering inside the security inspection machine in the related art, the present application first obtains the scattering calibration data of the security inspection machine to characterize the influence of scattering between different detection pixels of the detector. Specifically, this influence is characterized by the scattering amount. Then, based on the scattering calibration data, a target correspondence corresponding to the detection pixels at all positions in the detector is generated by fitting, so as 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 generating the target correspondence in this way based on experimental calibration, it is convenient to more accurately determine the scattering amount received by the detection pixels at different positions, which helps to more accurately correct the image in the subsequent process. After correction, the image becomes more uniform, the scattering stripes are corrected, and the edges are clearer, and there is no longer a trailing phenomenon, which is convenient for security inspection personnel to use the image for security inspection, reduces the difficulty of security inspection, and improves the security inspection efficiency.

[0052] In some embodiments, a specific implementation manner for obtaining the scattering calibration data of the security inspection machine is provided. Specifically, the above step S401 can be implemented through the following steps: Step S401-11, when a test board is arranged on the package channel of the security inspection machine and the detector receives X-rays of different widths by moving the test board, measure the light intensity of all detection pixels when receiving X-rays of different widths; wherein, the test board is used to block the X-rays from irradiating at least some positions of the detection pixels of the detector; Step S401-12, divide the light intensities of all detection pixels when receiving X-rays of the same width into a set of data; Step S401-13, for each set of data, compare the light intensities of all detection pixels with a preset value respectively, and determine that the first detection pixel with a light intensity less than the preset value in the direction from the unblocked part by the test board to the blocked part by the test board is the target detection pixel blocked by the edge of the test board, and use the light intensity of other detection pixels that are M detection pixels away from the target detection pixel in the direction blocked by the test board as the scattering amount of the corresponding detection pixel, where M is an integer greater than or equal to 1; It should be noted that the above preset value can be set according to the actual situation to distinguish whether the detection pixel is blocked by the test board or not.

[0053] It should also be noted that the size of M can also be set according to the actual situation. Since the target detection pixels are the detection pixels blocked by the edge of the test board, it is considered that the light intensity received by the target detection pixels includes not only the direct amount of X-rays but also the scattered amount of X-rays scattered to the target detection pixels. Therefore, M detection pixels are spaced in the direction blocked by the test board. It is considered that the other detection pixels outside the M detection pixels only receive the scattered amount, and 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.

[0054] Step S401-14, taking the light intensity or scattered amount of the detection pixels at all positions in each group of data as the scattered scale data of the security inspection machine.

[0055] It should be noted that theoretically, the test board needs to be thick enough to completely block the transmission of X-rays. A lead plate or tungsten plate of a certain thickness can be selected. For example, a 5-mm lead plate is used. In this application, the material and thickness of the test board are not limited as long as it can block the transmission of X-rays. However, in actual situations, if the lead plate cannot completely block, it will not affect the test results and can still be used.

[0056] It should also be noted that when setting a test board on the package channel of the security inspection machine for testing, the relative position between the ray source and the detector in the security inspection machine needs to be referred 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.

[0057] Specifically, after setting the test board on the package channel of the security inspection machine, by moving the test board, the detector receives X-rays of different widths. In this case, measure the light intensity of the detection pixels at all positions when receiving X-rays of different widths, that is, obtain the gray values output by the detection pixels at all positions when receiving X-rays of different widths.

[0058] After obtaining the light intensity of the detection pixels at all positions when receiving X-rays of different widths, these data also 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.

[0059] In some embodiments, the above classification process can be implemented during the acquisition process. Specifically, when the test board is not moved, the detector receives X-rays of the same width. At this time, the measured light intensity of the detection pixels at all positions is used as the same group of data; then move the test board until the detector receives X-rays of other widths, and measure and divide a group of data according to similar steps as above, and so on, which will not be elaborated here.

[0060] After partitioning the data, for each set of data, first compare the light intensities of all detection pixels with a preset value respectively to distinguish which detection pixels are blocked by the test board and which are not, and determine the first detection pixel whose light intensity is less than the preset value in the direction from unblocked by the test board to blocked by the test board as the target detection pixel blocked by the edge of the test board. And take the light intensities of other detection pixels that are in the direction blocked by the test board and are M detection pixels away from the target detection pixel as the scattering amounts of the corresponding detection pixels, and consider that only the scattering amounts are received by these detection pixels. These scattering amounts are used together with the light intensities of other detection pixels in the same group as the scattering scale data for subsequent fitting to generate the target correspondence.

[0061] In some embodiments, the scattering amounts and light intensities in the above-mentioned same group of data can be normalized first and then used as the scattering scale data of the security inspection machine for the subsequent step of fitting to generate the target correspondence, which can improve the accuracy of generating the target correspondence to a certain extent.

[0062] In some embodiments, an implementation manner of the shape and setting position of a test board corresponding to the above experimental method for obtaining the scattering scale data of the security inspection machine is provided. When the X-ray emitted through the X-ray slit irradiates the detector through the upper surface of the package channel and the moving direction of the test board is perpendicular to the X-ray slit, the shape of the test board is set as a right triangle, one right side of the right triangle is parallel to the moving direction of the test board, and the other right side is perpendicular to the moving direction of the test board.

[0063] Specifically, Figure 5 is one of the schematic diagrams of the setting of the test board in the data processing method provided by the present application. As Figure 5 shown, taking the test board as a lead plate as an example, a feasible experimental schematic diagram is shown. Specifically, when the X-ray emitted through the X-ray slit irradiates the detector through the upper surface of the package channel and the moving direction of the test board is perpendicular to the X-ray slit, the present application sets the shape of the test board as a right triangle, and the two right sides of the right triangle are respectively parallel and perpendicular to the moving direction of the test board, and the hypotenuse passes through the long strip detector corresponding to below the X-ray slit.

[0064] It should be noted that the transportation speed of the belt on the package channel can be set slow enough. After the belt drives the test board to start moving, the irradiation position of the X-ray in the channel slowly moves in the detector arrangement direction, and the gray values of all detection pixels in the detector at each moment are saved. In this way, for a single detection pixel point, the gray value curve in the time direction is the scattering amount curve of X-rays with different widths to this detection pixel point.

[0065] It should also be noted that by adjusting the placement angle of the test board or the belt speed, the amount of data for the experimental scale can be adjusted, and more scale data results in a more accurate fitting result.

[0066] In some embodiments, when a test board is provided on the package channel of the security inspection machine and the detector receives X-rays of different widths by moving the test board, a specific implementation method for measuring the light intensity of detection pixels at all positions when receiving X-rays of different widths may include: When a test board is provided on the package channel of the security inspection machine, one right-angled side of the test board is close to the left side of the package channel, and the detector receives X-rays of different widths by moving the test board, measure the light intensity of detection pixels at all positions when receiving X-rays of different widths; When a test board is provided on the package channel of the security inspection machine, one right-angled side of the test board is close to the right side of the package channel, and the detector receives X-rays of different widths by moving the test board, measure the light intensity of detection pixels at all positions when receiving X-rays of different widths; Correspondingly, a specific implementation method for dividing the light intensity of detection pixels at all positions when receiving X-rays of the same width into a set of data may include: Divide the light intensity of detection pixels at all positions when one right-angled side of the test board is close to the left side of the package channel and receiving X-rays of the same width into a set of data, and divide the light intensity of detection pixels at all positions when one right-angled side of the test board is close to the right side of the package channel and receiving X-rays of the same width into a set of data.

[0067] Specifically, as Figure 5 shown, it shows the situation of performing a right-side scattering test after one right-angled side of the test board is close to the left side of the package channel. According to the measurement steps in the above embodiments, the scattering amount transmitted from the right side of detection pixels at other positions to different positions in the detector can be measured.

[0068] Figure 6 is the second schematic diagram of the setting of the test board in the data processing method provided by the present application. As Figure 6 shown, taking the test board as a lead plate as an example, it shows the situation of performing a left-side scattering test after one right-angled side of the test board is close to the right side of the package channel. According to the measurement steps in the above embodiments, the scattering amount transmitted from the left side of detection pixels at other positions to different positions in the detector can be measured.

[0069] It should be noted that there is usually a difference between the scattering amount obtained from the right - hand side scattering test and the scattering amount obtained from the left - hand side scattering test. Both can be used as scattering calibration data to fit and generate the target correspondence relationship. Alternatively, after data processing such as taking the average of these two parts of the scattering amounts, they can be used as part of the scattering calibration data. This application does not limit this.

[0070] In some other embodiments, another specific implementation method for obtaining the scattering calibration data of the security inspection machine is provided. The above - mentioned step S401 can be implemented through the following steps: Step S401 - 21: When a test plate is provided on the package channel of the security inspection machine and the detector receives X - rays of the same width but at different positions by moving the test plate, measure the light intensity of all detection pixels when receiving X - rays of the same width but at different positions. Among them, the test plate is used to block the X - rays from irradiating at least some positions of the detection pixels of the detector; Step S401 - 22: Divide the light intensities of all detection pixels when receiving X - rays of the same width and at the same position into a set of data; Step S401 - 23: For each detection pixel in each set of data, if the light intensity of the detection pixel is less than a preset value, then use the light intensity as the scattering amount of the detection pixel; It should be noted that the above - mentioned preset value can be set according to the actual situation to distinguish whether the detection pixel is blocked by the test plate or not. Since the width of the X - rays of the same width formed by the above - mentioned test plate is usually small, 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 scattering amount, and its light intensity is used as the scattering amount of the detection pixel, which is convenient for subsequent fitting with the light intensities of other detection pixels in the same group to generate the target correspondence relationship.

[0071] Step S401 - 24: Use the light intensities or scattering amounts of all detection pixels in each set of data as the scattering calibration data of the security inspection machine.

[0072] It should be noted that theoretically, the test plate needs to be thick enough to completely block the transmission of X - rays. A lead plate or tungsten plate of a certain thickness can be selected. For example, a 5 - mm lead plate is used. This application does not limit the material and thickness of the test plate as long as it can achieve blocking the transmission of X - rays. However, in actual situations, if the lead plate cannot completely block, it does not affect the test results and can still be used.

[0073] It should also be noted that when a test board is set on the package 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, so as to ensure that the test board can block at least part of the X-rays from irradiating the detector.

[0074] Specifically, Figure 7 is the third schematic diagram of the setting of the test board in the data processing method provided by this application. As Figure 7 shown, taking the test board as a lead plate (including lead plate 1 and lead plate 2) as an example, after setting the test board on the package channel of the security inspection machine, by moving the test board, the detector receives X-rays of the same width but at different positions. In this case, measure the light intensity of all detection pixels when receiving X-rays of the same width but at different positions, that is, obtain the gray values output by all detection pixels when receiving X-rays of the same width but at different positions.

[0075] After obtaining the light intensity of all detection pixels when receiving X-rays of the same width but at different positions, it is also necessary to classify these data. Specifically, the light intensity of all detection pixels when receiving X-rays of the same width and at the same position is divided into the same group of data.

[0076] In some embodiments, the above classification process can be implemented during the acquisition process. Specifically, when the test board is not moved, the detector receives X-rays of the same width and the X-rays irradiate at the same position. At this time, measure the light intensity of all detection pixels as the same group of data; then move the test board to a position where the X-rays irradiate at other positions, and measure and divide a group of data according to similar steps as above, and so on, which will not be elaborated here.

[0077] After dividing the data, for each group of data and 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 scattered amount of the detection pixel. These scattered amounts are used together with the light intensity of other detection pixels in the same group as the scattered scale data for subsequent fitting to generate the target correspondence.

[0078] In some embodiments, the scattered amounts and light intensities in the above same group of data can be normalized first and then used as the scattered scale data of the security inspection machine for subsequent steps of fitting to generate the target correspondence, which can improve the accuracy of subsequent generation of the target correspondence to a certain extent.

[0079] In some embodiments, when the X-rays emitted through the X-ray slit irradiate 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. The shapes of the first test plate and the second test plate are both set as right triangles. One right side of the right triangle is parallel to the moving direction of the test plate, and the other right side is perpendicular to the moving direction of the test plate. The hypotenuse of the first test plate is parallel to the hypotenuse of the second test plate, and a preset width is provided between the hypotenuse of the first test plate and the hypotenuse of the second test plate.

[0080] Specifically, as Figure 7 shown, taking the test plate as a lead plate as an example, a feasible experimental schematic diagram is shown. Specifically, when the X-rays emitted through the X-ray slit irradiate 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 provided in the present application includes a first test plate and a second test plate. The shapes of the first test plate and the second test plate are both set as right triangles. The two right sides of the right triangle are respectively parallel to the moving direction of the test plate and perpendicular to the moving direction of the test plate. Moreover, the hypotenuse of the first test plate is parallel to the hypotenuse of the second test plate, and a preset width is provided between the hypotenuse of the first test plate and the hypotenuse of the second test plate.

[0081] It should be noted that the above preset width can be set according to the actual situation and is usually set to be small.

[0082] It should be noted that the transportation speed of the belt on the wrapping channel can be set to be slow enough. After the belt drives the test plate to start moving, the irradiation position of the X-rays in the channel slowly moves in the arrangement direction of the detectors, and the gray values of all detection pixels in the detectors at each moment are saved. In this way, for a single detection pixel point, the gray value curve in the time direction is the scattering amount curve of the X-rays with the same width but irradiated at different positions on this detection pixel point.

[0083] It should also be noted that by adjusting the placement angle of the test plate or the belt speed, the amount of scale data can be adjusted, and more scale data can obtain a more accurate fitting result.

[0084] In some embodiments, the target correspondence may include a scattering ratio function; A specific implementation manner of fitting and generating the target correspondence of the detection pixels at all positions in the detector based on the scattering scale data may include: Substituting each set of data in the scattering scale data into the following formula respectively to fit and generate the scattering ratio function of the : ; Among them, are all integers greater than 0 and less than or equal to . represents the number of detection pixels in the detector, represents the th detection pixel's scattering amount when blocked by the test board, represents the th detection pixel's illumination intensity when not blocked by the test board, represents the proportion of the scattering amount generated when the th detection pixel is irradiated by X-rays to the th detection pixel in the total light intensity of the X-rays.

[0085] Specifically, after obtaining the scattering scale data, a suitable mathematical form can be constructed, taking the scattering ratio function of X-rays at different positions as fitting parameters. In each set of multiple sets of data, taking the scattering amounts of some detection pixels as independent variables and the illumination intensities of other detection pixels as fitting quantities, perform least squares fitting on the scattering ratio function . Save the fitted scattering ratio function as template data.

[0086] Combined with the change rule of the gray value of the detection pixel points, the empirical formula form of the scattering ratio function used after multiple attempts in this application is: ; Among them, and are parameters that specifically need to be obtained by fitting. It can be understood that as long as and are determined by fitting, the scattering ratio function can be determined by fitting; is set because the measured curve needs to be fitted by adding multiple functions with exponential forms. In different measurement situations, can take different numbers, and its purpose is to make the function fit the measured curve better. Taking the gray values of each detection pixel collected at different times as observed values and combining the above two formulas for fitting, the fitting parameters and can be obtained. Substitute them into the formula of , and the scattering ratio function can be calculated.

[0087] It should be noted that the function form here is an empirical formula obtained according to the variation law of experimental data, which can be determined according to the specific experimental situation in different optical path structures. The above formula form is adopted for fitting here to reduce the number of fitting parameters and obtain a simpler fitting form.

[0088] 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. Based on this technical concept, more simple transformations in various forms are within the protection scope of the present application.

[0089] According to another aspect, an image correction method is further provided in an embodiment of the present application. Referring to Figure 8 , Figure 8 is one of the schematic flowcharts of the image correction method provided by the present application, including steps S801 to S802: Step S801, obtaining the target correspondence of the detection pixels at all positions in the detector of the security inspection machine; Wherein, the target correspondence is used 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 in the total light intensity of the X-rays; Step S802, based on the target correspondence, correcting the package image obtained by the security inspection machine when currently scanning the object to be imaged.

[0090] Specifically, after scanning the object to be imaged arranged on the package channel with X-rays to obtain the package image output by the detector, the target correspondence (such as the scattering ratio function) obtained in any of the above embodiments can be used to perform scattering correction on the package image, and the corrected package image is output.

[0091] An embodiment of the present application provides an image correction method. Aiming at the problem of scattering inside the security inspection machine in the related art, the present application first obtains the target correspondence generated by fitting through experimental calibration, which is convenient for more accurately determining the scattering amount received by the detection pixels at different positions. Then, after using the security inspection machine to scan the object to be imaged to obtain the package image output by the detector, the package image can be subjected to scattering correction based on the obtained target correspondence. After correction, the image becomes more uniform, the scattering stripes are corrected, the edges are clearer, and there is no longer a trailing phenomenon, which is convenient for security inspection personnel to use this image for security inspection, reduces the security inspection difficulty, and improves the security inspection efficiency.

[0092] In some embodiments, a specific implementation manner of image correction based on the target correspondence is provided. The target correspondence includes a scattering ratio function. Specifically, the above step S802 specifically includes the following steps: Step S802-1, the Scattering ratio function of a detection pixel After normalization, it serves as each element in the -dimensional scattering ratio matrix of the security inspection machine; where, in the scattering ratio matrix, the -th element represents the -th detection pixel when irradiated by X-rays on the -th detection pixel, and the proportion of the scattered amount generated to the total light intensity of the X-rays, are all integers greater than 0 and less than or equal to , represents the number of detection pixels in the detector; Step S802-2, based on the scattering ratio matrix, correct the -dimensional package image obtained by the security inspection machine when currently scanning the object to be imaged; where, is the end time of scanning the object to be imaged.

[0093] Specifically, first normalize the scattering ratio function of the -th detection pixel, and use it as each element in the -dimensional scattering ratio matrix of the security inspection machine. The matrix elements in the scattering ratio matrix are, for example: For example: .

[0094] In the scattering ratio matrix, the element at the -th position , represents the -th detection pixel when irradiated by X-rays on the -th detection pixel, and the proportion of the scattered amount generated to the total light intensity of the X-rays. This scattering ratio matrix is a -dimensional matrix, and the matrix of the package image obtained by the security inspection machine when currently scanning the object to be imaged is a -dimensional matrix. The gray value matrix corresponding to the package image is, for example: ; where, represents the gray value of the -th detection pixel at the -th moment.

[0095] In some embodiments, a specific implementation manner of correcting an image based on the scattering ratio matrix is provided. The above step S802-2 may include the following steps: Multiply the -dimensional scattering ratio matrix by the gray value matrix corresponding to the -dimensional package image to obtain the multiplied A grayscale value matrix of a dimension, which is used to represent the corrected parcel image.

[0096] Specifically, the grayscale value matrix of the corrected parcel image is the scattering ratio matrix multiplied by the grayscale value matrix corresponding to the parcel image, that is: .

[0097] Here, the scattering ratio matrix is a dimensional matrix, and the matrix of the parcel image obtained by the current scanning of the object to be imaged by the security inspection machine is a dimensional matrix. After multiplication, the grayscale value matrix of the corrected parcel image is also a dimensional matrix. It can be seen that this correction process does not affect the dimension of the image matrix.

[0098] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the image correction method of the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.

[0099] The following examples illustrate the data processing method and image correction method provided by the embodiments of the present application, mainly including the following processes: Figure 9 is the second flow chart of the image correction method provided by the present application. As Figure 9 shown, it mainly includes the following processes: 1) Experimental calibration. First, measure the calibration to obtain the scattering amounts of X-rays at different positions on different detector pixels. It can also be understood that when X-rays irradiate the detection pixels at different positions of the detector, the scattering amounts generated on the detection pixels at other positions.

[0100] Specifically, it can be specifically implemented through the following steps: ① Prepare a lead plate or tungsten plate thick enough to completely block the transmission of X-rays as the above test plate. In the experiment of the present application, a 5-mm lead plate is used. Place the lead plate in the shape of Figure 5 in the parcel channel of the security inspection machine in the manner of Figure 5 . Here, it is considered that X-rays can penetrate to the detector at the positions without the lead plate blocking, while the detector with the lead plate blocking cannot receive the directly transmitted X-rays and can only receive the scattered rays.

[0101] ②When the X-ray is on the right side of the lead plate, collect the signals generated by the X-rays at different positions in all detectors. Specifically, the transportation speed of the belt on the package channel of the security inspection machine can be set slow enough. After the belt starts to move, the irradiation position of the X-ray in the package channel slowly moves in the detector arrangement direction, and save the gray values of all detection pixels in the detector at each moment. In this way, for a single detection pixel, the gray value curve in the time direction is the scattering amount curve of the X-rays with different widths on this detection pixel.

[0102] ③After measuring the X-ray on the right side of the lead plate, flip and place the test plate tooling, as Figure 6 shown, repeat the above steps to measure the situation of the X-ray on the left side of the lead plate.

[0103] ④If the belt speed does not support adjustment, corresponding experimental scale data can also be obtained by manually moving the lead plate multiple times. 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, the present 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 is not necessarily triangular. It only needs to ensure that the content of the collected data is the signal generated by the detector when receiving X-rays with different widths.

[0104] 2) Data analysis. Construct a mathematical model to analyze and calculate the scattering amounts of the X-rays at different positions in different detection pixels.

[0105] Specifically, it can be specifically implemented through the following steps: ①Read the collected experimental scale data, subtract the corresponding background gray values, and perform normalization correction according to the gray values collected under air conditions. In this way, a gray image reflecting the X-ray intensity received by the detector is obtained.

[0106] ②For a single pixel point, in the case of being blocked by a thick lead plate, the non-zero gray value is the response generated by the surrounding scattered light. As the position of the lead plate moves, the change in the gray value of the detection pixel point is the change in the scattering amount of different X-rays on this detection pixel point. If the lead plate cannot completely block, it has no impact on the result.

[0107] ③It is considered that the gray value is a linear superposition of the scattering amounts generated by the X-rays at different positions. Construct a suitable mathematical form, take the ratio of the X-rays at different positions as the fitting parameters, take the gray values of all detectors at the same moment as the independent variables, and take the gray value of the target analysis pixel point as the fitting quantity, and perform least squares fitting on the data to obtain the scattering parameters of the X-rays at different positions on this detection pixel point.

[0108] ④Perform the same calculation for all detected pixel points, and finally obtain the scattering ratios of the X-rays at different positions received by all detected pixel points.

[0109] ⑤Save the scattering ratio matrix as template data.

[0110] Denote the detected pixel affected by the X-rays at the position of the detected pixel as the scattering ratio , denote the X-ray intensity at a certain moment as , then its scattering amount is: ; Combined with the variation law of the gray value of the detected pixel points, the empirical formula form of the scattering ratio function used after multiple attempts is: ; where and are fitting parameters. Regarding the gray values of each detected pixel collected at different moments as observables and performing fitting by combining the above two formulas, the fitting parameters and can be obtained. Substitute them into the formula of , and the scattering ratio function can be calculated.

[0111] It should be noted that the function form here is an empirical formula obtained according to the variation law of the experimental data and can be determined according to the specific experimental situation in different optical path structures. The above formula form is adopted here for fitting to reduce the number of fitting parameters and obtain a simpler fitting form.

[0112] Figure 10 is a comparison chart of the measured gray value and the fitted gray value of a certain detected pixel point at different times in the image correction method provided by this application. As shown in Figure 10 , it can be seen that the consistency between the two is good.

[0113] 3) Image correction. According to the experimental calibration data, after reading the wrapped image and multiplying it according to the formula matrix, the wrapped image after scattering correction is obtained.

[0114] Specifically, it can be specifically implemented through the following steps: ①For the wrapped image, first read its original gray value signal of the detector and perform linear normalization correction; ②Load the scattering ratio function for correction calculation; ③According to the formula Perform scatter correction calculation, multiply the gray value matrix of the wrapped image by the scatter ratio matrix to obtain the gray value matrix of the corrected wrapped image; ④Perform subsequent image processing on the wrapped image after scatter correction.

[0115] Specifically, after obtaining the scatter ratio function, calculate the scatter ratio matrix denoted as , where the matrix elements are: .

[0116] The gray value matrix corresponding to the wrapped image For example, it is: ; The gray value matrix of the wrapped image after correction is the product of the scatter ratio matrix and the gray value matrix corresponding to the wrapped image , that is: .

[0117] Figure 11 is a schematic diagram of the corrected wrapped image in the image correction method provided by this application. As Figure 11 shown, compared with Figure 2 , it can be seen that after correction, the image becomes more uniform and the white stripes are effectively removed.

[0118] In the embodiments of this application, there are at least the following beneficial effects: 1) The method of this application can effectively remove scatter stripes in X-ray images, etc., improve the image quality, and the data measured by the experimental measurement method is accurate and reliable. Before scatter correction, white stripes will appear in the edge pixels of the detector, and it will be brighter in the edge area of the module; after correction, the image becomes more uniform, the scatter stripes are corrected, and the edge is clearer.

[0119] 2) The method of this application is simple and fast. Only need to place the lead plate tooling for measurement in the channel and perform the wrapping operation to obtain the required calibration data. At the same time, the data content collected is the continuous change of the width of the X-ray, and the influence on each detector pixel point can be accurately obtained. By adjusting the placement angle of the tooling or the belt speed, the amount of calibration data can be adjusted, and more calibration data can obtain a more accurate fitting result.

[0120] 3) The method of this application does not depend on the optical path structure and X-ray machine type, and the method does not require the lead plate to completely block the X-ray. For high-energy ray devices, the scatter influence can also be calibrated, and the adaptability is strong.

[0121] The present application also provides a data processing device. Figure 12 It is a schematic structural diagram of the data processing device provided by the present application. As Figure 12 shown, the data processing device includes: A first acquisition module 1201, configured to acquire the scattering scale data of the security inspection machine; wherein, the X-ray used for detection in the security inspection machine is emitted through an X-ray slit and irradiates the detector through a package channel, and the scattering scale data is used to characterize the scattering amount generated by the X-ray in the security inspection machine when irradiating the detection pixels at different positions on the detector on the detection pixels at other positions; A fitting module 1202, configured to generate a target correspondence relationship of the detection pixels at all positions in the detector based on the scattering scale data; wherein, the target correspondence relationship is used to characterize the proportion of the scattering amount generated when the detection pixels at different positions are irradiated by the X-ray on the detection pixels at other positions to the total light intensity of the X-ray.

[0122] The data processing device provided by the present application adopts the data processing method in the above embodiment, and can solve the technical problems that the single reliance on the method of simulation and simulation to deduct the influence of the scattering amount on the good characterization of the object leads to high security inspection difficulty and low efficiency. Compared with the prior art, the beneficial effects of the data processing device provided by the present application are the same as those of the data processing method provided by the above embodiment, and other technical features in the data processing device are the same as those disclosed in the method of the above embodiment, and will not be elaborated here.

[0123] The present application also provides an image correction device. Figure 13 It is a schematic structural diagram of the image correction device provided by the present application. As Figure 13 shown, the image correction device includes: A second acquisition module 1301, configured to acquire 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 characterize the proportion of the scattering amount generated when the detection pixels at different positions are irradiated by the X-ray on the detection pixels at other positions to the total light intensity of the X-ray; A correction module 1302, configured to correct the package image obtained by the security inspection machine when currently scanning the object to be imaged based on the target correspondence relationship.

[0124] The image correction device provided by the present application adopts the image correction method in the above embodiment, and can solve the technical problems that the single reliance on the method of simulation and simulation to deduct the influence of the scattering amount on the good characterization of the object leads to high security inspection difficulty and low efficiency. Compared with the prior art, the beneficial effects of the image correction device provided by the present application are the same as those of the image correction method provided by the above embodiment, and other technical features in the image correction device are the same as those disclosed in the method of the above embodiment, and will not be elaborated here.

[0125] The present application provides an electronic device, which includes: 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 embodiments, or execute the image correction method in the above embodiments.

[0126] Refer to the following Figure 14 , Figure 14 which is a schematic structural diagram of the device provided by the present application, showing a schematic structural diagram of the device suitable for implementing the embodiments of the present application. The device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Player: portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 14 The device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.

[0127] As Figure 14As shown, the device may include a processing device 1401 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1402 or a program loaded from a storage device 1403 into a random access memory (RAM: Random Access Memory) 1404. In the RAM 1404, various programs and data required for the operation of the device are also stored. The processing device 1401, the ROM 1402, and the RAM 1404 are connected to each other through a bus 1405. An input / output (I / O) interface 1406 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1406: an input device 1407 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1408 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1403 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1409. The communication device 1409 may allow the device to communicate with other devices wirelessly or wiredly 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 may be implemented or had alternatively.

[0128] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 1403, or installed from the ROM 1402. When the computer program is executed by the processing device 1401, the above functions defined in the methods of the embodiments disclosed in the present application are executed.

[0129] The device provided in the present application adopts the data processing method or the image correction method in the above embodiments, and can solve the technical problems that the single dependence on the method of analog simulation to deduct the influence of the scattering amount on the good characterization of the object leads to high security inspection difficulty and low efficiency. Compared with the prior art, the beneficial effects of the device provided in the present application are the same as the beneficial effects of the data processing method or the image correction method provided in the above embodiments, and other technical features in the device are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.

[0130] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0131] As described above, the above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all of them should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

[0132] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the data processing method or image correction method in the above embodiments.

[0133] The computer-readable storage medium provided by this application can 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 of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0134] The above computer-readable storage medium can be included in the device; or it can exist separately without being assembled into the device.

[0135] The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed by the device, the device is caused to perform the following steps: Obtain the scattering calibration data of the security inspection machine; wherein, the X-rays used for detection in the security inspection machine are emitted through an X-ray slit and irradiated onto the detector via a package channel, and the scattering calibration data is used to characterize the scattering amount generated on the detection pixels at other positions when the X-rays in the security inspection machine irradiate the detection pixels at different positions; Based on the scattering calibration data, fit and generate the target correspondence of the detection pixels at all positions in the detector; wherein, the target correspondence is used to characterize the proportion of the scattering amount generated when the detection pixels at different positions are irradiated by the X-rays on the detection pixels at other positions to the total light intensity of the X-rays; Or, perform the following steps: Obtain the target correspondence of the detection pixels at all positions in the detector of the security inspection machine; wherein, the target correspondence is used to characterize the proportion of the scattering amount generated when the detection pixels at different positions are irradiated by the X-rays on the detection pixels at other positions to the total light intensity of the X-rays; Based on the target correspondence, correct the package image obtained by the security inspection machine when currently scanning the object to be imaged.

[0136] Computer program code for performing the operations of the present application can be written in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages - such as Java, Smalltalk, C++, and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN: Local Area Network) or a wide area network (WAN: Wide Area Network), or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).

[0137] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than that noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0138] The modules described in the embodiments of the present application can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.

[0139] The readable storage medium provided by the present application is a computer-readable storage medium, and the computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above data processing method or image correction method, which can solve the technical problems that the single reliance on the method of analog simulation to deduct the influence of scattered light on the good characterization of an object leads to high security inspection difficulty and low efficiency. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the data processing method or image correction method provided by the above embodiments, and will not be elaborated herein.

[0140] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the steps of the data processing method or image correction method as described above.

[0141] The computer program product provided by the present application can solve the technical problems that the single reliance on the method of analog simulation to deduct the influence of scattered light on the good characterization of an object leads to high security inspection difficulty and low efficiency. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the data processing method or image correction method provided by the above embodiments, and will not be elaborated herein.

[0142] The above are only some embodiments of the present application, and thus do not limit the scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields, is included in the protection scope of the present application.

Claims

1. A data processing method, characterized in that: The method comprises: Acquire scattering calibration data of the security inspection machine; wherein 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, and the scattering calibration data is used to characterize the scattering amount generated by the detection pixels at different positions of the detector when the X-rays in the security inspection machine irradiate the detection pixels at other positions; 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.

2. The method according to claim 1, characterized in that The step of obtaining the scattering scale data of the security inspection machine includes: A test board 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 board, the light intensity of the detection pixels at all positions when receiving X-rays of different widths is measured; wherein the test board is used to shield the X-rays from irradiating the detection pixels at at least part of the 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 intensities of all detection pixels are compared with preset values, and the first detection pixel whose illumination 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 illumination intensities of other detection pixels in the direction blocked by the test board and spaced M detection pixels from the target detection pixel are taken 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.

3. The method according to claim 2, characterized in that When the X-rays emitted through the X-ray slit irradiate 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 a right triangle, 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.

4. The method according to claim 3, characterized in that 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 board is provided on the parcel passage of the security inspection machine, a right-angled side of the test board is close to the left side of the parcel passage, and the detector receives X-rays of different widths by moving the test board, measuring the light intensity of detection pixels at all positions when receiving X-rays of different widths; A test board is provided on the parcel passage of the security inspection machine, a right-angled side of the test board is close to the right side of the parcel passage, and the detector receives X-rays of different widths by moving the test board, measuring the light intensity of detection pixels at all positions when receiving X-rays of different widths; 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: 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 parcel 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 parcel channel and receives X-rays of the same width is divided into a group of data.

5. The method according to claim 1, characterized in that The step of obtaining the scattering scale data of the security inspection machine includes: A test board 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 board, the light intensity of the detection pixels at all positions when receiving X-rays of the same width but at different positions is measured; wherein the test board is used to shield the detection pixels at at least part of the positions of the detector from being irradiated by the X-rays; Divide the light intensity of detection pixels at all positions that receive X-rays of the same width and are located at the same position 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.

6. The method according to claim 5, characterized in that When the X-rays emitted through the X-ray slit are irradiated onto the detector via the upper surface of the parcel 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 spaced apart by a preset width.

7. The method according to any one of claims 2 to 6, characterized in that: The target correspondence relationship includes a scattering ratio function; The step of fitting and generating the target correspondence relationship of the 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 ratio of the scattering amount produced when a detection pixel is detected to the total intensity of the X-ray.

8. An image correction method, characterized in that: The method comprises: Obtaining the target correspondence of the detection pixels at all positions in the detector of the security inspection machine; wherein the target correspondence is used 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; Based on the target corresponding relationship, the package image currently obtained by the security inspection machine scanning the object to be imaged is corrected.

9. The method according to claim 8, characterized in that The target correspondence relationship includes a scattering ratio function; The step of correcting the package image currently obtained by the security inspection machine scanning the object to be imaged based on the target corresponding relationship 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; wherein the first element in the scattering ratio matrix The element characterization of position The detection pixels are irradiated by X-rays at The ratio of the scattering amount generated by each detection pixel to the total intensity of the X-rays 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 to obtain dimensional package image for correction; where, is the end time of scanning the object to be imaged.

10. The method according to claim 9, characterized in that 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, get the multiplied dimensional gray value matrix used to represent the corrected parcel image.

Citation Information

Patent Citations

  • Systems and methods for scatter correction of image

    CN111526796A

  • Image artifact removing method and system, electronic equipment and storage medium

    CN115797485A

  • Medical X-ray imaging scattering correction method and device and storage medium

    CN118593003A

  • Method for scattered radiation correction of X-ray image of object of patient, involves locating portion at edge of detector elements to receive scattered radiation data such that scattering radiation data corrects image data

    DE102012200150A1

  • Intra-detector scatter correction

    US20120163695A1