CN118961771A - Data correction method, device, equipment and program product - Google Patents
- ️Fri Nov 15 2024
Disclosure of Invention
The embodiment of the application provides a data correction method, a device, equipment and a program product, which are used for solving the defects that in the prior art, large-area artifacts are possibly generated and the correction effect is poor due to the fact that errors of a linear array detector and a ray source are corrected through prestored correction template parameters.
In a first aspect, the present application provides a data correction method applied to a security inspection machine, the security inspection machine including a backscatter detector and a transmission detector, comprising:
Acquiring back scattering original data acquired by the back scattering detector and transmission original data acquired by the transmission detector, wherein the back scattering original data and the transmission original data comprise scanning information of an object to be detected;
acquiring a backscattering parameter of the backscattering detector and a transmission parameter of the transmission detector;
determining back-scattering correction data and mask data according to the back-scattering original data and the back-scattering parameters, wherein the mask data is used for indicating an area where an object is located and an area where the object is not located;
and determining transmission correction parameters according to the mask data and the transmission parameters, and correcting the transmission original data through the transmission correction parameters to obtain transmission correction data.
In one possible embodiment, the transmission parameters include a transmitted bright field parameter and a transmitted dark field parameter, and determining a transmission correction parameter based on the mask data and the transmission parameters includes:
determining an update bias factor according to the mask data and the transmission original data;
Updating the transmitted bright field parameters according to the updating bias factors to obtain first bright field parameters;
and determining the transmission correction parameter according to the first bright field parameter and the transmission dark field parameter.
In one possible implementation manner, the mask data includes mask values corresponding to a plurality of pixels respectively, the mask values are a first preset value or a second preset value, the transmission original data includes transmission original values corresponding to a plurality of pixels respectively, and determining the update bias factor according to the mask data and the transmission original data includes:
Determining a plurality of target pixels with the mask value being the second preset value in the plurality of pixels, wherein the area where the plurality of target pixels are located is the object-free area;
for any one target pixel, determining a product between a mask value corresponding to the target pixel and a transmission original value corresponding to the target pixel as a first value;
determining the product between the first value and a preset correction coefficient as an updating bias value corresponding to the target pixel;
the updating bias factors comprise updating bias values respectively corresponding to the target pixels.
In one possible implementation manner, updating the transmitted bright-field parameter according to the updating bias factor to obtain a first bright-field parameter includes:
And respectively updating the parameter value of each target pixel in the transmission bright field parameters according to the updated bias values respectively corresponding to the target pixels to obtain a first bright field parameter.
In one possible embodiment, the back-scattering parameters include back-scattering bright-field parameters and back-scattering dark-field parameters, and determining back-scattering correction data and mask data from the back-scattering raw data and back-scattering parameters includes:
Determining a back-scattering correction parameter according to the back-scattering bright field parameter and the back-scattering dark field parameter;
Correcting the back-scattering original data according to the back-scattering correction parameters to obtain back-scattering correction data;
performing stitching processing on the back-scattering correction data to obtain a back-scattering correction image;
and determining mask data corresponding to the back-scattering correction image according to the back-scattering correction data.
In one possible implementation manner, the backscatter correction data includes backscatter correction values corresponding to a plurality of pixels in the backscatter correction image, and determining mask data corresponding to the backscatter correction image according to the backscatter correction data includes:
acquiring a preset threshold value;
judging whether a backscattering correction value corresponding to any one pixel is larger than a preset threshold value or not;
if yes, determining a mask value corresponding to the pixel as a first preset value;
If not, determining the mask value corresponding to the pixel as a second preset value;
The mask data comprises mask values corresponding to a plurality of pixels in the back-scattering correction image.
In one possible embodiment, the security inspection machine further comprises a first display screen and a second display screen, the method further comprising:
Generating a back-scatter correction image according to the back-scatter correction data, and displaying the back-scatter correction image on the first display screen;
and generating a transmission correction image according to the transmission correction data, and displaying the transmission correction image on the second display screen.
In a second aspect, the present application provides a data correction device for use in a security inspection machine comprising a backscatter detector and a transmission detector, comprising:
The first acquisition module is used for acquiring back scattering original data acquired by the back scattering detector and transmission original data acquired by the transmission detector, wherein the back scattering original data and the transmission original data comprise scanning information of an object to be detected;
a second acquisition module for acquiring a back-scattering parameter of the back-scattering detector and a transmission parameter of the transmission detector;
The first determining module is used for determining back scattering correction data and mask data according to the back scattering original data and the back scattering parameters, wherein the mask data is used for indicating the area where the object is located and the area where the object is not located;
and the second determining module is used for determining transmission correction parameters according to the mask data and the transmission parameters, correcting the transmission original data through the transmission correction parameters and obtaining transmission correction data.
In a possible implementation manner, the transmission parameters include a transmission bright field parameter and a transmission dark field parameter, and the second determining module is specifically configured to:
determining an update bias factor according to the mask data and the transmission original data;
Updating the transmitted bright field parameters according to the updating bias factors to obtain first bright field parameters;
and determining the transmission correction parameter according to the first bright field parameter and the transmission dark field parameter.
In a possible implementation manner, the mask data includes mask values corresponding to a plurality of pixels, where the mask values are a first preset value or a second preset value, the transmission raw data includes transmission raw values corresponding to a plurality of pixels, and the second determining module is specifically configured to:
Determining a plurality of target pixels with the mask value being the second preset value in the plurality of pixels, wherein the area where the plurality of target pixels are located is the object-free area;
for any one target pixel, determining a product between a mask value corresponding to the target pixel and a transmission original value corresponding to the target pixel as a first value;
determining the product between the first value and a preset correction coefficient as an updating bias value corresponding to the target pixel;
the updating bias factors comprise updating bias values respectively corresponding to the target pixels.
In one possible implementation, the second determining module is specifically configured to:
And respectively updating the parameter value of each target pixel in the transmission bright field parameters according to the updated bias values respectively corresponding to the target pixels to obtain a first bright field parameter.
In a possible implementation manner, the back-scattering parameters include back-scattering bright-field parameters and back-scattering dark-field parameters, and the first determining module is specifically configured to:
Determining a back-scattering correction parameter according to the back-scattering bright field parameter and the back-scattering dark field parameter;
Correcting the back-scattering original data according to the back-scattering correction parameters to obtain back-scattering correction data;
performing stitching processing on the back-scattering correction data to obtain a back-scattering correction image;
and determining mask data corresponding to the back-scattering correction image according to the back-scattering correction data.
In one possible implementation manner, the backscatter correction data includes backscatter correction values corresponding to a plurality of pixels in the backscatter correction image, and the first determining module is specifically configured to:
acquiring a preset threshold value;
judging whether a backscattering correction value corresponding to any one pixel is larger than a preset threshold value or not;
if yes, determining a mask value corresponding to the pixel as a first preset value;
If not, determining the mask value corresponding to the pixel as a second preset value;
The mask data comprises mask values corresponding to a plurality of pixels in the back-scattering correction image.
In a possible implementation manner, the security inspection machine further comprises a first display screen and a second display screen, and the device further comprises a display module, wherein the display module is used for:
Generating a back-scatter correction image according to the back-scatter correction data, and displaying the back-scatter correction image on the first display screen;
and generating a transmission correction image according to the transmission correction data, and displaying the transmission correction image on the second display screen.
In a third aspect, the present application provides an electronic device comprising: a processor, and a memory communicatively coupled to the processor;
The memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for performing the method of any of the first aspects when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a computer, implements the method according to any of the first aspects.
The embodiment of the application provides a data correction method, a device, equipment and a program product, which are characterized in that back scattering original data collected by a back scattering detector and transmission original data collected by a transmission detector are obtained, the back scattering original data and the transmission original data comprise scanning information of an object to be detected, back scattering parameters of the back scattering detector and transmission parameters of the transmission detector are obtained, back scattering correction data and mask data are determined according to the back scattering original data and the back scattering parameters, the mask data are used for indicating an area where the object is located and an area where the object is not located, the transmission correction parameters are determined according to the mask data and the transmission parameters, and the transmission correction data are corrected through the transmission correction parameters, so that the transmission correction data are obtained. Therefore, since the back-scattering original data and the transmission original data are collected at the same time, the transmission correction parameters can be updated in real time through the back-scattering related data, and the correction is carried out through the updated transmission correction parameters, so that the large-area artifacts can be removed, and the correction effect is improved.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that although the terms "first", "second", etc. are used to describe various information in the embodiments of the present application, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. Alternatively, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the application.
It should be understood that the terms "comprises" and "comprising" specify the presence of stated features, steps, operations, but do not preclude the presence, addition, or addition of one or more other features, steps, operations. The term "and/or" and the like as used herein may be construed as inclusive, or meaning any one or any combination. Alternatively, "a and/or B" means "any of the following: a, A is as follows; b, a step of preparing a composite material; a and B). In addition, the character "/" herein generally indicates that the front-rear association object is an "or" relationship.
The security inspection machine can utilize the penetrating capacity of rays to perform non-contact scanning on the inspected object so as to realize security inspection. The security inspection machine can uniformly transmit objects through a conveyor belt and is provided with a ray source and a linear array detector to carry out continuous line scanning imaging on the objects.
Next, the structure of the security inspection machine will be exemplified with reference to fig. 1.
Fig. 1 is a schematic structural diagram of a security inspection machine according to an embodiment of the present application. Referring to fig. 1, fig. 1 may be a security inspection machine 100. The security inspection machine 100 may include at least a radiation source 101, a front collimator 102, a back scatter detector 103, a back scatter collimator 104, and a transmission detector 105.
The object to be inspected can be driven by the conveyor belt of the security inspection machine to pass through the scanning range of the ray source 101, and the transmission detector 105 and the back scattering detector 103 simultaneously receive the transmission X-rays and the back scattering X-rays from the same position of the object to be inspected, so as to generate a transmission image and a back scattering image.
The radiation source 101 may penetrate the object to be inspected by emitting X-rays, and acquire internal structure and composition information of the object to be inspected using physical phenomena such as transmission, scattering, and the like. The X-rays can penetrate through various materials such as ceramics, woodiness, metal, leather, rubber and the like, so that the detailed inspection of the internal structure of the object is realized.
The front collimator 102 can be used for limiting and calibrating the emitting direction and range of the X-rays, ensuring that the X-rays irradiate on an object to be detected at a specific angle and shape, reducing the scattering and radiation range of the X-rays, and improving the detection precision and safety.
The backscatter detector 103 can be used to receive backscattered X-rays from the object under examination. When the X-rays penetrate the object to be examined, part of the rays interact with atoms and molecules inside the object and back scatter. The backscatter detector 103 can generate a backscatter image of the object to be inspected by capturing the backscatter radiation. The back-scattered image may highlight substances (e.g. explosives, drugs, etc.) composed of low atomic number elements, which have a strong scattering ability for X-rays.
The backscatter collimator 104 may be used in conjunction with the backscatter detector 103 to further limit and calibrate the receiving direction and range of the backscattered X-rays, reduce the influence of external interference and stray rays on the detection result, and improve the sharpness and accuracy of the backscatter image.
The transmission detector 105 may be used to receive X-rays transmitted through the object under examination. When X-rays penetrate through an object to be inspected, the intensity of the X-rays is changed due to the influence of the internal structure and composition of the object. The transmission detector 105 can generate a transmission image of the object to be inspected by measuring these changed X-ray intensities. The transmission image can clearly display the outline and the internal structure of the object, and is helpful for security inspection personnel to rapidly identify and judge the safety of the object.
The linear array detector may include a transmission detector 105 and a backscatter detector 103.
Ideally, the linear array detector responds substantially uniformly to the radiation source that is outputting a stable dose. In practice, due to errors in manufacturing and geometry of the line detectors, the response of the line detectors to receive radiation may not be the same in the case of stable radiation output. Moreover, output dose may be unstable due to errors in the production and manufacture of the radiation source, as well as target shifts that occur during long-term operation. At present, in order to solve errors caused by the linear array detector and the ray source, the original data acquired by the linear array detector can be corrected according to pre-stored correction parameters.
In the correction process, due to errors of the linear array detector and the ray source, correction is performed through pre-stored correction template parameters, so that large-area artifacts can be generated, and the correction effect is poor.
In order to solve the technical problems, an embodiment of the present application provides a data correction method, which determines back-scattering correction data and mask data according to back-scattering raw data and back-scattering parameters acquired by a back-scattering detector, updates transmission correction parameters in real time through the mask data, and corrects the transmission raw data acquired by the transmission detector according to the transmission correction parameters to obtain transmission correction data. Therefore, since the back-scattering original data and the transmission original data are collected at the same time, the transmission correction parameters can be updated in real time through the back-scattering related data, and the correction is carried out through the updated transmission correction parameters, so that the large-area artifacts can be removed, and the correction effect is improved.
The technical scheme shown in the application is described in detail by specific examples. It should be noted that the following embodiments may exist independently or may be combined with each other, and for the same or similar content, the description will not be repeated in different embodiments.
Fig. 2 is a flow chart of a data correction method according to an embodiment of the present application. The execution main body of the embodiment of the application can be a security inspection machine or a data correction system arranged in the security inspection machine. The data correction system may be implemented by software or by a combination of software and hardware. Referring to fig. 2, the method includes:
s201, acquiring back scattering original data acquired by a back scattering detector and transmission original data acquired by a transmission detector.
The back-scattered raw data and the transmitted raw data include scan information of the object to be inspected.
The back-scattered raw data and the transmitted raw data are acquired simultaneously.
The back scattering original data can be acquired by a back scattering detector when the detected object moves on the conveyor belt at a uniform speed.
The transmission original data can be acquired by a transmission detector when the detected object moves on the conveyor belt at a uniform speed.
The back-scattering raw data collected by the back-scattering detector and the transmission raw data collected by the transmission detector can be acquired in response to X-rays emitted by the object to be measured passing through the ray source.
S202, acquiring a back scattering parameter of a back scattering detector and a transmission parameter of a transmission detector.
The backscatter parameter may be an average of a plurality of acquired data sampled by the backscatter detector over a preset time period while the conveyor belt is stationary.
The transmission parameter may be an average of a plurality of acquired data sampled by the transmission detector over a predetermined period of time while the conveyor belt is stationary.
The collected data may be photon count data obtained by collection.
The back-scattering parameters may include back-scattering bright-field parameters and back-scattering dark-field parameters.
The backscatter bright field parameter may be a response parameter of the backscatter detector when the source of radiation is on and there is no object to be detected. The back-scattered bright field parameter may be used to represent the response of the back-scattered detector in the unobstructed condition.
The back-scattered dark field parameter may be used to represent a response parameter of the back-scattered detector when the source is off and there is no object to be detected. The backscatter dark field parameters can be used to represent background noise and bias of the backscatter detectors.
The transmission parameters may include a transmission bright field parameter and a transmission dark field parameter.
The transmitted bright field parameter may be a response parameter of the transmission detector when the radiation source is on and no object is detected. The transmitted bright field parameter may be used to represent the response of the transmission detector in the clear condition.
The transmitted dark field parameter may be used to represent a response parameter of the transmission detector when the radiation source is off and there is no object to be detected. The transmitted dark field parameters may be used to represent background noise and bias of the transmission detector.
The backscattering parameters of the backscattering detector and the transmission parameters of the transmission detector can be acquired in the storage space.
S203, determining back scattering correction data and mask data according to the back scattering original data and back scattering parameters.
Mask data may separate certain regions from other regions in the image, and mask data may be used to indicate regions where objects are located and regions where objects are not located.
The back-scatter correction data may be back-scatter data after removing the influence of noise and offset, etc.
The backscatter correction data may be used to generate a scanned image corresponding to the backscatter detector.
The back-scattering raw data may be corrected according to the back-scattering parameters to obtain back-scattering correction data, and the mask data may be determined according to the back-scattering correction data.
S204, determining transmission correction parameters according to the mask data and the transmission parameters, and correcting the transmission original data through the transmission correction parameters to obtain transmission correction data.
The transmission correction parameters may be used to correct the raw data acquired by the transmission detector.
The transmission correction parameters may be determined from the mask data and the transmission parameters. Since the mask data is determined from the simultaneously acquired backscatter data, the transmission correction parameters are also determined in real time.
The transmission correction data may be transmission data from which the influence of noise, bias, and other interference factors is removed.
The transmission correction data may be used to generate a scanned image corresponding to the transmission detector.
The transmission parameters can be updated according to the mask data to obtain updated transmission parameters, transmission correction parameters are determined according to the updated transmission parameters, and transmission original data is corrected through the transmission correction parameters to obtain transmission correction data.
Alternatively, the transmission correction parameters may be determined from the mask data and the transmission parameters by: determining an updating bias factor according to the mask data and the transmission original data; updating the transmitted bright field parameters according to the updating bias factors to obtain first bright field parameters; and determining a transmission correction parameter according to the first bright field parameter and the transmission dark field parameter.
Wherein the update bias factor may be used to update the transmitted bright field parameters.
The first bright field parameter may be an updated transmitted bright field parameter.
The transmission correction parameter may be a correction parameter obtained by removing a transmission dark field parameter from the first bright field parameter.
For example, assume that the original data is transmitted asMask data isThe transmitted bright field parameters areThe first bright field parameter isThe transmitted dark field parameter isThe transmission correction parameter is. Wherein, May be used to represent the coordinates of a plurality of pixels.
Based on the mask data and the transmission raw data, determining the update bias factor may be:
wherein, The preset correction coefficient is a constant.
Updating the transmitted bright field parameters according to the updated bias factors, wherein the obtaining of the first bright field parameters may be:
The determining the transmission correction parameter from the first bright-field parameter and the transmitted dark-field parameter may be:
The mask data may include a first preset value and a second preset value.
For example, the first preset value is 0 and the second preset value is 1.
For another example, the first preset value is-1 and the second preset value is 1.
Alternatively, the transmission raw data may be corrected by the following formula to obtain transmission correction data:
wherein, In order to transmit the correction data,In order to correct the scaling factor,In order to transmit the dark-field parameters,In order to be a transmission correction parameter,To transmit the raw data.
Optionally, the security inspection machine further comprises a first display screen and a second display screen, and after determining the back-scattering correction data and the transmission correction data, the correction image may be displayed, specifically by: generating a back-scatter correction image according to the back-scatter correction data and displaying the back-scatter correction image on the first display screen; a transmission correction image is generated based on the transmission correction data and displayed on the second display screen.
The back-scattering correction image may be a scanned image detected by a back-scattering detector, and the transmission correction image may be a scanned image detected by a transmission detector. The scan image may include scan information of the object under test.
According to the data correction method provided by the embodiment, the back scattering original data collected by the back scattering detector and the transmission original data collected by the transmission detector are obtained, the back scattering original data and the transmission original data comprise scanning information of an object to be detected, back scattering parameters of the back scattering detector and transmission parameters of the transmission detector are obtained, back scattering correction data and mask data are determined according to the back scattering original data and the back scattering parameters, the mask data are used for indicating areas where the object is located and areas where the object is not located, the transmission correction parameters are determined according to the mask data and the transmission parameters, and the transmission original data are corrected through the transmission correction parameters, so that the transmission correction data are obtained. Therefore, since the back-scattering original data and the transmission original data are collected at the same time, the transmission correction parameters can be updated in real time through the back-scattering related data, and the correction is carried out through the updated transmission correction parameters, so that the large-area artifacts can be removed, and the correction effect is improved.
In one possible implementation manner, the mask data may include mask values corresponding to a plurality of pixels, where the mask values are a first preset value or a second preset value, and the first preset value may be used to indicate that an object exists at a position where the pixel exists, and the second preset value may be used to indicate that an object does not exist at a position where the pixel exists.
Next, a process (S204) of determining the transmission correction parameter based on the mask data and the transmission parameter will be explained with reference to fig. 3.
Fig. 3 is a flowchart of another data correction method according to an embodiment of the present application. On the basis of the above embodiment, the method will be described in detail with reference to fig. 3. The method comprises the following steps:
S301, determining a plurality of target pixels with mask values of a second preset value from the plurality of pixels.
The plurality of pixels may be a plurality of pixels in the backscatter corrected image. The number of pixels in the back-scatter corrected image is the same as the number of pixels in the transmission corrected image, the same as the pixels in the image corresponding to the transmission raw data, and the same as the pixels in the image corresponding to the back-scatter raw data.
The mask values may include a first preset value and a second preset value.
For example, the first preset value may be 0 and the second preset value may be 1.
The region where the plurality of target pixels are located is an object-free region.
A plurality of pixels having a mask value of the second preset value may be determined among the plurality of pixels, and the plurality of pixels may be determined as the plurality of target pixels.
In the following, an explanation will be given by taking any one of a plurality of target pixels as an example.
S302, determining the product of a mask value corresponding to the target pixel and a transmission original value corresponding to the target pixel as a first value.
The first value may be used to update the transmitted bright field parameter.
For example, the second preset value may be 1, and the transmission original value may beThe first value may be。
S303, determining the product of the first value and a preset correction coefficient as an update bias value corresponding to the target pixel.
The update bias value may be a value for updating the correspondence of the target pixel.
For example, the first value isThe preset correction coefficient may beUpdating the offset value to。
The updating bias factors comprise updating bias values corresponding to the target pixels respectively.
S304, respectively updating the parameter value of each target pixel in the transmitted bright field parameters according to the updated bias values respectively corresponding to the target pixels to obtain a first bright field parameter.
The first bright field parameter may include updated parameter values for a plurality of pixels, respectively.
The parameter values corresponding to the pixels in the transmitted bright field parameter can be determined, and the parameter value corresponding to each target pixel and the updated bias value corresponding to each target pixel are added to obtain the first bright field parameter.
S305, determining a transmission correction parameter according to the first bright field parameter and the transmission dark field parameter.
The transmitted dark field parameters may be removed from the first bright field parameters to obtain the transmission correction parameters.
For example, assume that the first bright field parameter isThe transmitted dark field parameter isThe transmission correction parameter is。
The implementation content of each step in the embodiment of the present application may refer to the description of the corresponding step or operation in the above method embodiment, and repeated descriptions are omitted.
According to the data correction method provided by the embodiment, a plurality of target pixels with mask values of second preset values are determined in a plurality of pixels, the areas where the plurality of target pixels are located are object-free areas, the product between the mask values corresponding to the target pixels and transmission original values corresponding to the target pixels is determined to be a first value for any one of the target pixels, the product between the first value and a preset correction coefficient is determined to be an update bias value corresponding to the target pixels, the parameter value of each target pixel in the transmission bright-field parameters is updated according to the update bias values corresponding to the plurality of target pixels respectively, the first bright-field parameters are obtained, and the transmission correction parameters are determined according to the first bright-field parameters and the transmission dark-field parameters. Therefore, since the back-scattering original data and the transmission original data are collected at the same time, the transmission correction parameters can be updated in real time through the back-scattering related data, and the correction is carried out through the updated transmission correction parameters, so that the large-area artifacts can be removed, and the correction effect is improved.
Next, a process (S203) of determining back-scatter correction data and mask data from back-scatter raw data and back-scatter parameters will be explained with reference to fig. 4.
Fig. 4 is a flowchart of another data correction method according to an embodiment of the present application. On the basis of the above embodiment, see fig. 4, the method comprises:
s401, determining a back-scattering correction parameter according to the back-scattering bright field parameter and the back-scattering dark field parameter.
The back-scattered dark field parameters may be removed from the back-scattered bright field parameters to determine back-scattered correction parameters.
For example, assume that the backscatter bright field parameter isThe back-scattered dark field parameter isThe backscattering correction parameters were。
S402, correcting the back-scattering original data according to the back-scattering correction parameters to obtain back-scattering correction data.
The back-scatter correction data includes back-scatter correction values corresponding to a plurality of pixels in the back-scatter correction image, respectively.
The back-scatter raw data may be corrected by the following formula to obtain back-scatter corrected data:
wherein, In order to transmit the correction data,In order to correct the scaling factor,In order to transmit the dark-field parameters,In order to be a transmission correction parameter,To transmit the raw data.
S403, performing stitching processing on the back-scattering correction data to obtain a back-scattering correction image.
And according to the coordinates of each pixel, the corresponding back-scattering correction values of a plurality of pixels in the back-scattering correction data can be spliced to obtain a back-scattering correction image.
S404, determining mask data corresponding to the back-scattering correction image according to the back-scattering correction data.
A preset algorithm can be acquired, and mask data corresponding to the backscatter corrected image is determined according to the preset algorithm and the backscatter corrected data.
The preset algorithm may be a threshold algorithm or a semantic segmentation model, which is not limited herein.
Alternatively, mask data corresponding to the backscatter corrected image may be determined from the backscatter corrected data by: acquiring a preset threshold value; for any pixel, judging whether the backscattering correction value corresponding to the pixel is larger than a preset threshold value; if yes, determining a mask value corresponding to the pixel as a first preset value; if not, determining the mask value corresponding to the pixel as a second preset value; the mask data comprises mask values corresponding to a plurality of pixels in the back-scattering correction image.
Alternatively, mask data corresponding to the backscatter corrected image may be determined from the backscatter corrected data by: acquiring a preset semantic segmentation model; inputting the backscatter correction values corresponding to the pixels into the semantic segmentation model to obtain mask values corresponding to the pixels; the mask data comprises mask values corresponding to a plurality of pixels in the back-scattering correction image.
The implementation content of each step in the embodiment of the present application may refer to the description of the corresponding step or operation in the above method embodiment, and repeated descriptions are omitted.
According to the data correction method provided by the embodiment, the back-scattering correction parameters are determined according to the back-scattering bright field parameters and the back-scattering dark field parameters, the back-scattering original data are corrected according to the back-scattering correction parameters to obtain back-scattering correction data, the back-scattering correction data are spliced to obtain a back-scattering correction image, and mask data corresponding to the back-scattering correction image are determined according to the back-scattering correction data. Therefore, since the back scattering original data and the transmission original data are collected at the same time, the transmission correction parameters can be updated in real time through the mask data, and the correction is carried out through the updated transmission correction parameters, so that the large-area artifacts can be removed, and the correction effect is improved.
Fig. 5 is a schematic structural diagram of a data correction device according to an embodiment of the present application. Referring to fig. 5, the data correction device 500 may be applied to a security inspection machine including a backscatter detector and a transmission detector, the data correction device 500 including a first acquisition module 501, a second acquisition module 502, a first determination module 503, and a second determination module 504, wherein,
A first acquisition module 501, configured to acquire back-scattering raw data acquired by the back-scattering detector and transmission raw data acquired by the transmission detector, where the back-scattering raw data and the transmission raw data include scan information of an object to be detected;
a second acquisition module 502, configured to acquire a back-scattering parameter of the back-scattering detector and a transmission parameter of the transmission detector;
A first determining module 503, configured to determine, according to the back-scattering raw data and the back-scattering parameters, back-scattering correction data and mask data, where the mask data is used to indicate an area where an object is located and an area where the object is not located;
And a second determining module 504, configured to determine a transmission correction parameter according to the mask data and the transmission parameter, and correct the transmission original data according to the transmission correction parameter, so as to obtain transmission correction data.
In a possible implementation, the transmission parameters include a transmitted bright field parameter and a transmitted dark field parameter, and the second determining module 504 is specifically configured to:
determining an update bias factor according to the mask data and the transmission original data;
Updating the transmitted bright field parameters according to the updating bias factors to obtain first bright field parameters;
and determining the transmission correction parameter according to the first bright field parameter and the transmission dark field parameter.
In a possible implementation manner, the mask data includes mask values corresponding to a plurality of pixels, where the mask values are a first preset value or a second preset value, and the transmission raw data includes transmission raw values corresponding to a plurality of pixels, and the second determining module 504 is specifically configured to:
Determining a plurality of target pixels with the mask value being the second preset value in the plurality of pixels, wherein the area where the plurality of target pixels are located is the object-free area;
for any one target pixel, determining a product between a mask value corresponding to the target pixel and a transmission original value corresponding to the target pixel as a first value;
determining the product between the first value and a preset correction coefficient as an updating bias value corresponding to the target pixel;
the updating bias factors comprise updating bias values respectively corresponding to the target pixels.
In one possible implementation, the second determining module 504 is specifically configured to:
And respectively updating the parameter value of each target pixel in the transmission bright field parameters according to the updated bias values respectively corresponding to the target pixels to obtain a first bright field parameter.
In a possible implementation manner, the back-scattering parameters include back-scattering bright-field parameters and back-scattering dark-field parameters, and the first determining module 503 is specifically configured to:
Determining a back-scattering correction parameter according to the back-scattering bright field parameter and the back-scattering dark field parameter;
Correcting the back-scattering original data according to the back-scattering correction parameters to obtain back-scattering correction data;
performing stitching processing on the back-scattering correction data to obtain a back-scattering correction image;
and determining mask data corresponding to the back-scattering correction image according to the back-scattering correction data.
In one possible implementation manner, the backscatter correction data includes backscatter correction values corresponding to a plurality of pixels in the backscatter correction image, and the first determining module 503 is specifically configured to:
acquiring a preset threshold value;
judging whether a backscattering correction value corresponding to any one pixel is larger than a preset threshold value or not;
if yes, determining a mask value corresponding to the pixel as a first preset value;
If not, determining the mask value corresponding to the pixel as a second preset value;
The mask data comprises mask values corresponding to a plurality of pixels in the back-scattering correction image.
Fig. 6 is a schematic structural diagram of another data correction device according to an embodiment of the present application. On the basis of the above embodiment, referring to fig. 6, the security inspection machine further includes a first display screen and a second display screen, and the apparatus 500 includes a display module 505, where the display module 505 is configured to:
Generating a back-scatter correction image according to the back-scatter correction data, and displaying the back-scatter correction image on the first display screen;
and generating a transmission correction image according to the transmission correction data, and displaying the transmission correction image on the second display screen.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Referring to fig. 7, an electronic device 700 may include: memory 701, processor 702, transceiver 703.
Memory 701 is used to store program instructions;
the processor 702 is configured to execute the program instructions stored in the memory, so as to cause the electronic device 700 to perform the method described above.
The transceiver 703 may include: a transmitter and/or a receiver. The transmitter may also be referred to as a transmitter, a transmit port, a transmit interface, or the like, and the receiver may also be referred to as a receiver, a receive port, a receive interface, or the like. The memory 701, the processor 702, and the transceiver 703 are illustratively interconnected by a bus 704.
Embodiments of the present application also provide a computer program product executable by a processor for implementing the above method when the computer program product is executed.
The data correction device, the electronic device, the computer readable storage medium and the computer program product according to the embodiments of the present application can execute the technical scheme shown in the embodiments of the data correction method, and the implementation principle and the beneficial effects are similar, and are not repeated here.
All or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a readable memory. The program, when executed, performs steps including the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (ROM), random-access memory (random access memory, RAM), flash memory, hard disk, solid state disk, magnetic tape (MAGNETIC TAPE), floppy disk (floppy disk), optical disk (optical disk), and any combination thereof.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-executable instructions. These computer-executable instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer-executable instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer-executable instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the embodiments of the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims and the equivalents thereof, the present application is also intended to include such modifications and variations.