Detector gain automatic configuration method, device and system and storage mediumTechnical Field
The invention relates to the technical field of radiation imaging, in particular to a method, a device and a system for automatically configuring detector gain and a storage medium.
Background
Since the 90's of the 20 th century, radiation-type inspection systems have become a mature technology for the inspection of large container cargo vehicles without opening the container. As shown in fig. 1, a typical radiation type inspection system includes a radiation source 1, a detector 2 including a plurality of pixel points, a data processing unit 3, and a control unit 4. The radiation source 1 generates a ray bundle penetrating through the container under the control of the control unit 4, a pixel point in the detector 2 receives the transmission beam penetrating through the container, the detector converts the detected transmission beam into detection data and sends the detection data to the data processing unit 3, and the data processing unit 3 reconstructs the received detection data into an image in the container to be displayed by the control unit 4. In order to adapt to different detection requirements and special requirements of users, a radiation type inspection system gradually develops from a single inspection mode to multiple purposes and multiple modes, gains of detectors of the existing detector system need to be manually set according to a fixed configuration table, reconfiguration needs to be carried out when the system is started every time, and the detectors after the configuration cannot automatically adjust gain parameters according to the actual conditions of the system in the detection process.
Disclosure of Invention
The invention aims to provide a method, a device and a system for automatically configuring the gain of a detector and a storage medium, so as to solve the problem that the radiation type inspection system in the prior art cannot automatically set the gain parameter of the detector.
Therefore, the invention provides a detector gain automatic configuration method, which comprises the following steps:
acquiring a gain parameter of the detector;
and if the gain parameter is not in the gain configuration range of the detector or the difference between the gain parameter and the user gain configuration parameter is not in an allowable range, configuring the gain parameter of the detector according to the difference, and then returning to the step of acquiring the gain parameter of the detector.
Optionally, in the above method for automatically configuring the detector gain, before the step of obtaining the gain parameter of the detector, the method further includes the following steps:
and acquiring a user gain configuration parameter, and configuring the gain parameter of the detector according to the user gain configuration parameter.
Optionally, in the above method for automatically configuring a detector gain, if the gain parameter is within a gain configuration range of the detector and a difference between the gain parameter and a user gain configuration parameter is within an allowable range, the method further includes the following steps:
acquiring an air value of the detector, wherein the air value is measured according to the following modes: under the condition that no shielding object exists between the detector and the radiation source, the detector collects radiation beams emitted by the radiation source, and detection data obtained by converting the collected radiation beams are used as the air value;
if the ratio of the air value to the upper limit value of the air value is not in a preset ratio range, reconfiguring the gain parameter of the detector according to the difference between the ratio and the preset ratio range, and then returning to the step of acquiring the gain parameter of the detector.
Optionally, in the above method for automatically configuring the detector gain, the predetermined ratio of the air value to the upper limit of the air value is in a range from 50% to 95%.
Optionally, the above method for automatically configuring the detector gain further includes the following steps:
and if the times of reconfiguring the gain parameters of the detector reach the set times, sending prompt information of failure of gain configuration of the detector.
The invention also provides a detector gain automatic configuration device, which comprises:
the gain acquisition module is used for acquiring gain parameters of the detector;
and the gain configuration module is used for configuring the gain parameter of the detector according to the difference value when the gain parameter is not in the gain configuration range of the detector or the difference value between the gain parameter and the user gain configuration parameter is not in an allowable range.
Optionally, the above detector gain automatic configuration apparatus further includes:
and the initialization module is used for acquiring user gain configuration parameters and configuring the gain parameters of the detector according to the user gain configuration parameters.
Optionally, the above detector gain automatic configuration apparatus further includes:
the air value acquisition module is used for acquiring an air value of the detector, and the air value is measured according to the following modes: under the condition that no shielding object exists between the detector and the radiation source, the detector collects radiation beams emitted by the radiation source, and detection data obtained by converting the collected radiation beams are used as the air value;
and the gain configuration module is used for reconfiguring the gain parameter of the detector according to the difference between the ratio and the preset proportion range when the ratio of the air value to the upper limit value of the air value is not in the preset proportion range.
Optionally, in the above detector gain automatic configuration device, in the gain configuration module, the predetermined ratio of the air value to the air value upper limit value is in a range from 50% to 95%.
Optionally, the above detector gain automatic configuration apparatus further includes:
and the prompting module is used for sending the prompting information of the detector gain configuration failure when the times of reconfiguring the gain parameters of the detector reach the set times.
The present invention also provides a storage medium storing computer instructions for performing the method of automatically configuring the detector gain as set forth in any one of the above when executed by a computer.
The invention also provides a system for automatically configuring the gain of a detector, which comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to:
acquiring a gain parameter of the detector;
and if the gain parameter is not in the gain configuration range of the detector or the difference between the gain parameter and the user gain configuration parameter is not in an allowable range, configuring the gain parameter of the detector according to the difference, and then returning to the step of acquiring the gain parameter of the detector.
Compared with the prior art, the scheme provided by the invention at least has the following technical effects:
the invention provides a method, a device and a system for automatically configuring a detector gain and a storage medium, which are used for automatically configuring a gain parameter of a detector. In the configuration process, gain parameters of the detector are acquired first, then user gain configuration parameters are used as a reference, and when the gain parameters of the detector are not in the gain configuration range of the detector or the difference value between the gain parameters and the user gain configuration parameters is not in an allowable range, the gain parameters of the detector are reconfigured until the conditions are met at the same time. By the scheme, the gain of the detector can be automatically configured in real time in the working process of the detector, so that the gain parameter of the detector can meet the limitation of the gain configuration range of the detector and the requirement of a user.
Drawings
FIG. 1 is a block diagram of a radiation-type inspection system;
FIG. 2 is a flow chart of a method for automatically configuring the gain of a detector according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method for automatically configuring the gain of a detector according to another embodiment of the present invention;
FIG. 4 is a schematic block diagram of an apparatus for automatically configuring the gain of a detector according to an embodiment of the present invention;
fig. 5 is a schematic block diagram of a system for automatically configuring the gain of a detector according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
The present embodiment provides an automatic detector gain configuration method, which is applied in a data processing unit of a radiation type inspection system, and is used for automatically configuring gain parameters of a detector in the radiation type inspection system, as shown in fig. 2, including the following steps:
s101: acquiring a gain parameter of the detector; as shown in fig. 1, the data processing unit 3 is in communication connection with the detector 2, and is capable of acquiring detection data of each pixel in the detector 2 and acquiring a gain parameter of each pixel. The gain parameter of the detector in this step may be a list or a matrix including the gain parameter of each pixel.
S102: judging whether the gain parameter is in a gain configuration range of the detector, and the difference value between the gain parameter and a user gain configuration parameter is in an allowable range, if so, determining that the gain configuration of the detector has no problem and ending the gain verification, and if not, executing a step S103; accordingly, the user gain configuration parameters of the detector are a list or a matrix including the user gain configuration parameters of each pixel of the detector. And when comparing, comparing the actual gain parameter and the user gain configuration parameter of the same pixel point. The user gain configuration parameters may be pre-stored in the data processing unit 3, and for each pixel, the gain parameter must be within an allowable gain configuration range, and the gain configuration range, whether the gain is discrete or continuous, are stored in the data processing unit 3. The user gain configuration parameters may be the gain configuration parameters correctly set last time. When the detector works for the first time, the gain parameter of each pixel point can adopt a default gain parameter, and the default gain parameter can be any value in the configuration range of the gain parameter of the pixel point. After the detector starts to work, whether the input user gain configuration parameters exist or not can be detected in real time, and once the input user gain configuration parameters are detected, the user gain configuration parameters can be endowed to the detector.
And S103, configuring the gain parameter of the detector according to the difference value, and then returning to S101.
In the above scheme, after the data processing unit 3 is started, the detector gain check is first started, and when the check result is not qualified, the gain parameter of the detector is reconfigured, or before step S101, the method further includes the following steps: and acquiring a user gain configuration parameter, and configuring the gain parameter of the detector according to the user gain configuration parameter. As mentioned above, the user gain configuration parameter may be the gain configuration parameter correctly configured last time, or may be the gain configuration parameter input by the user after startup.
Ideally, the acquired gain parameter of the detector should be the same as the user gain configuration parameter, but in practical application, the parameters may be inconsistent due to factors such as external environment interference, and at this time, the actual gain parameter of the detector output signal may not be the same as the expected gain parameter or the difference value is not within the allowable range. By the scheme, the gain parameters of the detector are reconfigured under the condition until the difference value between the actually detected gain parameters of the detector and the user gain configuration parameters is within the allowable range. When reconfiguration is performed, reconfiguration may be performed according to a difference between a gain parameter of the detector and a user gain configuration parameter, for example, if the gain parameter of the detector is smaller than the user gain configuration parameter, the gain configuration parameter of the current detector needs to be amplified when reconfiguration is performed, or the user gain configuration parameter needs to be used for reconfiguration. By the aid of the scheme, the gain of the detector can be automatically configured in real time in the working process of the detector without manual adjustment of a user, so that the gain parameter of the detector can meet the limitation of the gain configuration range of the detector and the requirement of the user.
Example 2
In this embodiment, an automatic detector gain configuration method is provided, which is applied to a data processing unit of a radiation type inspection system, and is used for automatically configuring gain parameters of a detector in the radiation type inspection system, as shown in fig. 3, and includes the following steps:
s201: gain parameters of the detector are obtained.
S202: judging whether the gain parameter is in a gain configuration range of the detector, and the difference value between the gain parameter and a user gain configuration parameter is in an allowable range, if so, executing a step S203, otherwise, executing a step S205;
s203: acquiring an air value of the detector, wherein the air value is measured according to the following modes: under the condition that no shielding object exists between the detector to be detected and the radiation source (the shielding object generally refers to other objects except for necessary fixed sealing materials between the radiation source and the detector, such as an object to be inspected), the detector to be detected collects the radiation beam emitted by the radiation source, and detection data obtained by converting the collected radiation beam is used as the air value. Specifically, the method comprises the following steps: air sampling begins → air data is acquired after radiation source radiation dose is stabilized → air sampling ends, and then step S204 is performed.
S204: comparing the ratio of the air value to the upper limit of the air value (i.e. the upper limit of the reading of the detector) with a predetermined ratio range, if the ratio of the air value to the upper limit of the air value is not within the predetermined ratio range, executing step S206, and if the ratio of the air value to the upper limit of the air value is within the predetermined ratio range, ending; in this step, the predetermined proportion range may be selected from 50% to 95%, or different predetermined proportion ranges may be set for the detectors at different positions according to empirical values.
S205: configuring a gain parameter of the detector according to the difference value, and then returning to S201; for example, if the gain parameter of the detector is smaller than the user gain configuration parameter, the gain configuration parameter of the current detector needs to be amplified during reconfiguration, or the user gain configuration parameter needs to be reconfigured.
S206: returning to S201 after the gain parameters of the detector are reconfigured according to the difference between the ratio and the preset ratio range; for example, if the ratio is smaller than the lower limit of the predetermined ratio range, the gain configuration parameter of the current detector needs to be amplified.
The embodiment adds the saturation check detection function on the basis of the embodiment 1, and can automatically reconfigure the gain parameter of the detector when the detector is saturated, so that the gain parameter of the detector can adapt to the requirements of different detection environments, and is more suitable for the requirements of multi-purpose and multi-mode inspection.
Example 3
In the scheme of embodiment 1 or embodiment 2, when the gain parameter of the detector is abnormal, the gain parameter of the detector can be automatically reconfigured until the gain parameter of the detector meets the judgment condition. However, in order to eliminate the problem of device failure of the detector itself and improve the inspection efficiency, the gain parameter of the detector cannot be reconfigured endlessly, so the scheme provided in this embodiment further includes the following steps: and if the times of reconfiguring the gain parameters of the detector reach the set times, sending prompt information of failure of gain configuration of the detector.
In a specific implementation, a parameter may be set for characterizing the number of times the detector is reconfigured, the initial value of the parameter being zero, and once the gain parameter of the detector is reconfigured once, the parameter is increased by one. The set times can be set to 10,15 and the like, and once the number of times of reconfiguring the detector reaches the set times, the reconfiguration is abandoned, and the alarm information is directly sent out, so that the influence on the inspection efficiency caused by repeated reconfiguration in the case of detector failure and the like is avoided.
Example 4
The present embodiment provides an apparatus for automatically configuring a detector gain, as shown in fig. 4, including:
a gain obtaining module 301, configured to obtain a gain parameter of the detector; as shown in fig. 1, the data processing unit 3 is in communication connection with the detector 2, and is capable of acquiring detection data of each pixel in the detector 2 and acquiring a gain parameter of each pixel. The gain parameter of the detector in this step may be a list or a matrix including the gain parameter of each pixel.
A gain configuration module 302, configured to configure the gain parameter of the detector according to the difference value when the gain parameter is not within the gain configuration range of the detector or the difference value between the gain parameter and the user gain configuration parameter is not within an allowable range. Accordingly, the user gain configuration parameters of the detector are a list or a matrix including the user gain configuration parameters of each pixel of the detector. And when comparing, comparing the actual gain parameter and the user gain configuration parameter of the same pixel point. The user gain configuration parameters may be pre-stored in the data processing unit 2, and for each pixel, the gain parameter must be within an allowable gain configuration range, and the gain configuration range, whether the gain is discrete or continuous, are stored in the data processing unit 2. The user gain configuration parameters may be the gain configuration parameters correctly set last time. When the detector works for the first time, the gain parameter of each pixel point can adopt a default gain parameter, and the default gain parameter can be any value of the pixel point within the configuration range of the gain parameter of the detector. After the detector starts to work, whether the input user gain configuration parameters exist or not can be detected in real time, and once the input user gain configuration parameters are detected, the user gain configuration parameters can be endowed to the detector.
In the above scheme, after the data processing unit 3 is started, the detection gain check is first started, and when the check result is not qualified, the gain parameter of the detector is configured again, or the gain parameter of the detector is set first, that is, the apparatus further includes an initialization module 303, configured to obtain the user gain configuration parameter, and configure the gain parameter of the detector according to the user gain configuration parameter. As mentioned above, the user gain configuration parameter may be the gain configuration parameter correctly set last time, or may be the gain configuration parameter input by the user after startup.
Ideally, the acquired gain parameter of the detector should be the same as the user gain configuration parameter, but in practical application, the parameters may be inconsistent due to factors such as external environment interference, and at this time, the actual gain parameter of the detector output signal may not be the same as the expected gain parameter or the difference value is not within the allowable range. By the scheme, the gain parameters of the detector are reconfigured under the condition until the difference value between the actually detected gain parameters of the detector and the user gain configuration parameters is within the allowable range. When reconfiguration is performed, reconfiguration may be performed according to a difference between a gain parameter of the detector and a user gain configuration parameter, for example, if the gain parameter of the detector is smaller than the user gain configuration parameter, the gain configuration parameter of the current detector needs to be amplified when reconfiguration is performed, or the user gain configuration parameter needs to be used for reconfiguration. By the aid of the scheme, the gain of the detector can be automatically configured in real time in the working process of the detector without manual adjustment of a user, so that the gain parameter of the detector can meet the limitation of the gain configuration range of the detector and the requirement of the user.
Further, the above apparatus further comprises: an air value obtaining module 304, configured to obtain an air value of the detector, where the air value is measured according to the following manner: under the condition that no shielding object exists between the detector to be detected and the radiation source (the shielding object generally refers to other objects except for necessary fixed sealing materials between the radiation source and the detector, such as an object to be inspected), the detector to be detected collects the radiation beam emitted by the radiation source, and detection data obtained by converting the collected radiation beam is used as the air value. Specifically, the method comprises the following steps: air sampling begins → air data is acquired after radiation source radiation dose is stabilized → air sampling ends.
The gain configuration module 302 is configured to reconfigure the gain parameter of the detector according to a difference between the ratio and the predetermined ratio range when the ratio of the air value to the upper limit value of the air value is not within the predetermined ratio range. The predetermined proportion range can be selected from 50% -95%, or different predetermined proportion ranges can be set for detectors at different positions according to empirical values. For example, if the gain parameter of the detector is smaller than the user gain configuration parameter, the gain configuration parameter of the current detector needs to be amplified during reconfiguration.
The scheme is added with the function of saturation check detection, and when the detector is saturated, the gain parameter of the detector can be automatically reconfigured, so that the gain parameter of the detector meets the requirements of different detection environments, and the method is more suitable for the requirements of multi-purpose and multi-mode inspection.
In the above scheme, when the gain parameter of the detector is abnormal, the gain parameter of the detector can be automatically reconfigured until the gain parameter of the detector meets the judgment condition. However, in order to eliminate the problem of device failure of the detector and improve the inspection efficiency, the gain parameter of the detector cannot be reconfigured endlessly, and to solve the problem, the apparatus may further include a prompt module 305 for sending a prompt message indicating that the gain configuration of the detector fails when the number of times of reconfiguring the gain parameter of the detector reaches a set number of times. In a specific implementation, a parameter may be set for characterizing the number of times the detector is reconfigured, the initial value of the parameter being zero, and once the gain parameter of the detector is reconfigured once, the parameter is increased by one. The set times can be set to 10,15 and the like, and once the number of times of reconfiguring the detector reaches the set times, the reconfiguration is abandoned, and the alarm information is directly sent out, so that the influence on the inspection efficiency caused by repeated reconfiguration in the case of detector failure and the like is avoided.
Example 5
The present embodiment provides a storage medium storing computer instructions for performing the method of automatically configuring the detector gain according to any one of embodiments 1 to 3 when the computer instructions are executed by a computer.
Example 6
The present embodiment provides a system for automatically configuring a detector gain, as shown in fig. 5, including:
at least one processor 401; and the number of the first and second groups,
a memory 402 communicatively coupled to the at least one processor; wherein,
the memory 402 stores instructions executable by the one processor 401 to cause the at least one processor 401 to:
acquiring a gain parameter of the detector;
and if the gain parameter is not in the gain configuration range of the detector or the difference between the gain parameter and the user gain configuration parameter is not in an allowable range, configuring the gain parameter of the detector according to the difference, and then returning to the step of acquiring the gain parameter of the detector. The gain parameter of the detector may be a list or a matrix including the gain parameter of each pixel. Accordingly, the user gain configuration parameters of the detector are a list or a matrix including the user gain configuration parameters of each pixel of the detector. And when comparing, comparing the actual gain parameter and the user gain configuration parameter of the same pixel point.
Ideally, the acquired gain parameter of the detector should be the same as the user gain configuration parameter, but in practical application, the parameters may be inconsistent due to factors such as external environment interference, and at this time, the actual gain parameter of the detector output signal may not be the same as the expected gain parameter or the difference value is not within the allowable range. By the scheme, the gain parameters of the detector are reconfigured under the condition until the difference value between the actually detected gain parameters of the detector and the user gain configuration parameters is within the allowable range. When reconfiguration is performed, reconfiguration may be performed according to a difference between a gain parameter of the detector and a user gain configuration parameter, for example, if the gain parameter of the detector is smaller than the user gain configuration parameter, the gain configuration parameter of the current detector needs to be amplified when reconfiguration is performed, or the user gain configuration parameter needs to be used for reconfiguration. By the aid of the scheme, the gain of the detector can be automatically configured in real time in the working process of the detector without manual adjustment of a user, so that the gain parameter of the detector can meet the limitation of the gain configuration range of the detector and the requirement of the user.
In some embodiments, the allowable range of the difference between the gain parameter and the user gain configuration parameter means that the gain parameter is completely consistent with the user gain configuration parameter. In other embodiments, the allowable range of the difference between the gain parameter and the user gain configuration parameter is that the value of the gain parameter is 0.8 times to 1.2 times of the user gain configuration parameter.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor 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 processor 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 program 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 program 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.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.