A kind of detection method, device and equipment
By combining the information of X-ray detectors and terahertz antennas in the safety detection equipment, the problem that X-ray images are difficult to accurately identify the types of objects to be measured is solved, and high-precision type recognition and image optimization are achieved.
Patent Information
- Application Number
- CN202411480410.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-10-22
AI Technical Summary
When existing X-ray images are used for safe detection, it is difficult to accurately identify the type of objects to be tested, which can easily lead to erroneous detection results.
An X-ray detector and a terahertz antenna are deployed on the transmission device. By combining X-ray images and terahertz information, the target type of object to be measured is determined, and the terahertz information is used to optimize the X-ray image quality and improve the recognition accuracy.
It improves the accuracy and detection accuracy of the type of objects to be measured, reduces the probability of error detection, improves the quality of the X-ray image, and can intuitively reflect the motion of the object to be measured.
Smart Images

Figure CN119006938B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a type detection method, device and equipment. Background Art
[0002] The X-ray generator can emit X-rays to the object to be measured, and the X-ray detector receives the X-rays that pass through the object to be measured and images the object to be measured based on the X-rays. That is, the X-ray detector can capture an X-ray image of the object to be measured and analyze the internal structure of the object to be measured based on the X-ray image.
[0003] With the popularization of security inspection needs, there are more and more security inspection equipment, and security inspection equipment usually uses X-ray technology to achieve security inspection. For example, the security inspection equipment may include an X-ray generator and an X-ray detector, and the object to be tested may be placed on a transmission device. During the movement of the transmission device, the X-ray detector may collect an X-ray image of the object to be tested, and the security inspection equipment may analyze the internal structure of the object to be tested based on the X-ray image to obtain the type of the object to be tested.
[0004] As the number of security inspection scenarios increases, the accuracy requirements for security detection equipment are getting higher and higher, and security detection equipment is required to accurately identify the type of the object to be detected. However, when using X-ray images to determine the type of the object to be detected, incorrect detection results may be obtained, and the type of the object to be detected cannot be accurately identified. Summary of the invention
[0005] The present application provides a type detection method, wherein at least one object to be detected is placed on a transmission device, and during the movement of the transmission device, an X-ray detector is used to collect an X-ray image of the object to be detected, and a terahertz antenna is used to collect terahertz information of the object to be detected. The method comprises:
[0006] Acquire associated target X-ray images and target terahertz information, wherein the difference between the acquisition time of the target terahertz information and the acquisition time of the target X-ray image is a preset time length;
[0007] Determining a target position of the object to be measured in a reference direction, a measurement height of the object to be measured, and a first candidate category based on the target terahertz information, wherein the reference direction is a direction perpendicular to a moving direction of the transmission device;
[0008] Determine at least one pixel position of the object to be detected and a second candidate category corresponding to each pixel position based on the target X-ray image;
[0009] Based on the target position and the measurement height, determine the reference pixel position corresponding to the object to be measured on the target X-ray image; select the second candidate category corresponding to the reference pixel position from the second candidate categories corresponding to the at least one pixel position; based on the first candidate category and the second candidate category corresponding to the reference pixel position, determine the target category corresponding to the object to be measured.
[0010] The present application provides a type detection device, wherein at least one object to be detected is placed on a transmission device. During the movement of the transmission device, an X-ray detector is used to collect an X-ray image of the object to be detected, and a terahertz antenna is used to collect terahertz information of the object to be detected. The device comprises:
[0011] An acquisition module, used to acquire associated target X-ray images and target terahertz information, wherein the difference between the acquisition time of the target terahertz information and the acquisition time of the target X-ray image is a preset time length;
[0012] a determination module, configured to determine a target position of the object to be measured in a reference direction, a measurement height of the object to be measured, and a first candidate category of the object to be measured based on the target terahertz information, wherein the reference direction is a direction perpendicular to the movement direction of the transmission device; and to determine at least one pixel position of the object to be measured and a second candidate category corresponding to each pixel position based on the target X-ray image;
[0013] A processing module is used to determine the reference pixel position corresponding to the object to be measured on the target X-ray image based on the target position and the measurement height; select the second candidate category corresponding to the reference pixel position from the second candidate categories corresponding to the at least one pixel position; and determine the target category corresponding to the object to be measured based on the first candidate category and the second candidate category corresponding to the reference pixel position.
[0014] The present application provides a detection device, which includes an X-ray detector and a terahertz antenna. At least one object to be detected is placed on a transmission device. During the movement of the transmission device, the X-ray detector is used to collect X-ray images of the object to be detected, and the terahertz antenna is used to collect terahertz information of the object to be detected; the detection device also includes: a processor and a machine-readable storage medium, the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the type detection method of the above example.
[0015] The present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the type detection method of the above example is implemented.
[0016] The present application provides a machine-readable storage medium, which stores machine-executable instructions that can be executed by a processor; wherein the processor is used to execute the machine-executable instructions to implement the above-mentioned example type detection method.
[0017] It can be seen from the above technical solutions that in the embodiment of the present application, an X-ray detector and a terahertz antenna are deployed in the detection equipment. During the movement of the transmission device, the X-ray detector is used to collect the X-ray image of the object to be measured, and the terahertz antenna is used to collect the terahertz information of the object to be measured. In this way, the target type corresponding to the object to be measured can be determined by combining the X-ray image and the terahertz information. The recognition accuracy of the detection equipment is very high and the type of the object to be measured can be accurately identified. By adding a terahertz antenna to the detection equipment, terahertz information can be obtained, and the terahertz information is combined with the X-ray image. By coupling the information of the two, the object to be measured is detected together, reducing the probability of detection errors. By optimizing the X-ray image through terahertz information, the movement of the object to be measured can be intuitively reflected, and the quality of the X-ray image can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a schematic flow chart of a species detection method in one embodiment of the present application;
[0019] Figure 2 is a schematic diagram of the structure of a detection device in one embodiment of the present application;
[0020] Figure 3 is a schematic flow chart of a species detection method in one embodiment of the present application;
[0021] Figure 4 is a schematic diagram of the working principle of a terahertz antenna in one embodiment of the present application;
[0022] Figure 5 is a schematic diagram of the X-ray imaging principle in one embodiment of the present application;
[0023] Figure 6 is a schematic flow chart of a species detection method in one embodiment of the present application;
[0024] Figure 7 is a schematic structural diagram of a type detection device in one embodiment of the present application;
[0025] Figure 8 It is a hardware structure diagram of a detection device in one embodiment of the present application. DETAILED DESCRIPTION
[0026] The present application embodiment proposes a type detection method, which can be applied to a detection device (such as a safety detection device), which can include an X-ray detector and a terahertz antenna. At least one object to be detected is placed on a transmission device. During the movement of the transmission device, the object to be detected moves synchronously with the transmission device. The X-ray detector is used to collect X-ray images of the object to be detected, and the terahertz antenna is used to collect terahertz information of the object to be detected. Figure 1 FIG. 4 is a flow chart of the method, which includes:
[0027] Step 101: Acquire associated target X-ray images and target terahertz information, wherein the difference between the acquisition time of the target terahertz information and the acquisition time of the target X-ray image is a preset time length.
[0028] For example, in the movement direction of the transmission device, if the terahertz antenna is located in front of the X-ray detector, the difference between the acquisition time of the target X-ray image and the acquisition time of the target terahertz information is a preset time length; or, if the X-ray detector is located in front of the terahertz antenna, the difference between the acquisition time of the target terahertz information and the acquisition time of the target X-ray image is a preset time length.
[0029] For example, the preset duration can be determined based on the distance between the terahertz antenna and the X-ray detector, and the movement speed of the transmission device, and the movement speed of the transmission device is a fixed value.
[0030] Step 102: determine the target position of the object to be measured in a reference direction, the measurement height of the object to be measured, and the first candidate type based on the target terahertz information, where the reference direction is a direction perpendicular to the moving direction of the transmission device.
[0031] Step 103: Determine at least one pixel position of the object to be detected and a second candidate category corresponding to each pixel position based on the target X-ray image.
[0032] Step 104: determine a reference pixel position corresponding to the object to be measured on the target X-ray image based on the target position and the measurement height; select a second candidate category corresponding to the reference pixel position from second candidate categories corresponding to at least one pixel position of the object to be measured; and determine a target category corresponding to the object to be measured based on the first candidate category and the second candidate category corresponding to the reference pixel position.
[0033] Exemplarily, determining the target position of the object to be measured in a reference direction, the measured height of the object to be measured and the first candidate category based on the target terahertz information may include but is not limited to: if the target terahertz information includes a transmit and receive delay, determining the first distance between the terahertz antenna and the object to be measured based on the transmit and receive delay; determining the measured height of the object to be measured based on the difference between a configured second distance and the first distance; wherein the transmit and receive delay represents the time length from the terahertz antenna sending a signal to receiving a signal, and the second distance represents the distance between the terahertz antenna and a transmission device; determining the target position based on the position of the terahertz antenna in the reference direction; if the target terahertz information includes a target signal feature, querying a configured first mapping table through the target signal feature to obtain a first candidate category corresponding to the target signal feature; wherein the first mapping table includes a mapping relationship between signal features and candidate categories.
[0034] The pixel position is used to characterize the position of the object to be tested on the target X-ray image. Exemplarily, determining at least one pixel position of the object to be tested and the second candidate category corresponding to each pixel position based on the target X-ray image may include but is not limited to: determining at least one pixel position corresponding to the object to be tested on the target X-ray image; for each pixel position, determining the target color value of the pixel position based on the target X-ray image; querying the configured second mapping table based on the target color value, and determining the candidate category corresponding to the target color value as the second candidate category corresponding to the pixel position; wherein the second mapping table may include a mapping relationship between color values and candidate categories. Alternatively, for each pixel position, determine the atomic number of the pixel position based on the target X-ray image, and determine the second candidate category corresponding to the pixel position based on the atomic number. Of course, these are just two examples, and there is no limitation on the implementation method of determining the second candidate category corresponding to the pixel position based on the target X-ray image.
[0035] Exemplarily, determining the reference pixel position corresponding to the object to be measured on the target X-ray image based on the target position and the measurement height may include, but is not limited to: substituting the target position and the measurement height into a configured spatial position conversion function to obtain a reference pixel position corresponding to the target position and the measurement height; wherein the spatial position conversion function may include y=a*x+b*h+c; x represents the target position, h represents the measurement height, and y represents the reference pixel position; a, b, and c are acquired parameter values.
[0036] Exemplarily, determining the target type corresponding to the object to be tested based on the first candidate type and the second candidate type corresponding to the reference pixel position may include but is not limited to: if the first candidate type includes at least one candidate type and the second candidate type includes at least one candidate type, then determining the intersection of the first candidate type and the second candidate type, and determining the target type corresponding to the object to be tested based on the intersection.
[0037] Exemplarily, after determining the target type corresponding to the object to be tested based on the first candidate type and the second candidate type corresponding to the reference pixel position, the target X-ray image can also be optimized to obtain an optimized X-ray image. For example, based on the mapping relationship between the spatial position in the world coordinate system and the pixel position in the image coordinate system, the pixel position to be optimized corresponding to the target position in the target X-ray image is determined, the color value of the pixel position to be optimized is modified to the first color value corresponding to the target type, and the color value of the reference pixel position is modified to the second color value (for example, the second color value can be a fixed color value that has been configured) to obtain an optimized X-ray image.
[0038] Exemplarily, if a first candidate type of the object to be measured is determined based on the target terahertz information, and a second candidate type of the object to be measured is not determined based on the target X-ray image, the first candidate type is determined as the target type corresponding to the object to be measured; a first color value corresponding to the target type is obtained, and the color value of the reference pixel position of the target X-ray image is adjusted based on the first color value corresponding to the target type.
[0039] It can be seen from the above technical solutions that in the embodiment of the present application, an X-ray detector and a terahertz antenna are deployed in the detection equipment. During the movement of the transmission device, the X-ray detector is used to collect the X-ray image of the object to be measured, and the terahertz antenna is used to collect the terahertz information of the object to be measured. In this way, the target type corresponding to the object to be measured can be determined by combining the X-ray image and the terahertz information. The recognition accuracy of the detection equipment is very high and the type of the object to be measured can be accurately identified. By adding a terahertz antenna to the detection equipment, terahertz information can be obtained, and the terahertz information is combined with the X-ray image. By coupling the information of the two, the object to be measured is detected together, reducing the probability of detection errors. By optimizing the X-ray image through terahertz information, the movement of the object to be measured can be intuitively reflected, and the quality of the X-ray image can be improved.
[0040] The technical solution of the embodiment of the present application is described below in conjunction with specific application scenarios.
[0041] With the popularization of security inspection needs, there are more and more security detection equipment, which includes X-ray generators and X-ray detectors. During the movement of the transmission device, the X-ray detector collects X-ray images of the object to be tested, analyzes the object to be tested based on the X-ray image, and obtains the type of the object to be tested. With the increase in security inspection scenarios, the accuracy requirements for security detection equipment are getting higher and higher, and security detection equipment is required to accurately identify the type of the object to be tested. However, when using X-ray images to determine the type of the object to be tested, erroneous detection results may be obtained, and the type of the object to be tested cannot be accurately identified.
[0042] In view of the above findings, a type detection method is proposed in an embodiment of the present application. An X-ray detector and a terahertz antenna can be deployed in the detection equipment. The X-ray detector is used to collect X-ray images of the object to be detected, and the terahertz antenna is used to collect terahertz information of the object to be detected. In this way, the terahertz information can be combined with the X-ray image to jointly detect the object to be detected, thereby reducing the probability of detection errors.
[0043] A type detection method is proposed in an embodiment of the present application. The method can be applied to a detection device. The detection device can be a security detection device (such as a security inspection machine, etc.) or other types of detection devices. There is no limitation on this, as long as the detection device can complete the type detection of the object to be detected.
[0044] Type detection refers to detecting the type of the object to be detected, and the type can be carbon, iron, hydrogen, nitrogen, oxygen, etc., that is, the type of element type. Alternatively, the type can also be electronic products, liquids, corrosive items, metals, batteries, radioactive objects, ceramics, cosmetics, etc., that is, the type of object type. Of course, the above are just examples of the types of objects to be detected, and there is no limitation to this.
[0045] Exemplarily, the detection equipment may include an X-ray generator, an X-ray detector, a terahertz antenna and a transmission device, that is, on the basis of the X-ray generator and the X-ray detector, an additional terahertz antenna is deployed to combine the terahertz information with the X-ray image to jointly detect the object to be detected.
[0046] See also Figure 2 As shown, it is a schematic diagram of the structure of the detection equipment. The detection equipment may include an X-ray generator, an X-ray detector, a terahertz antenna and a transmission device. There is no limitation on the structure of the detection equipment.
[0047] X-ray generators can also be called X-ray sources (X-ray generators can include but are not limited to X-ray machines, accelerators and radioactive isotopes), X-ray detectors can also be called X-ray sensors (X-ray detectors can include but are not limited to single-energy detectors, pseudo-dual-energy detectors and energy spectrum detectors), X-ray detectors can include but are not limited to area array detectors and linear array detectors, etc. Linear array detectors can include TDI (Tim Delay Integration) detectors, etc., and area array detectors can include flat panel detectors, etc. X-ray generators can emit X-rays to the object to be measured, and X-ray detectors receive X-rays that pass through the object to be measured, and image the object to be measured based on the X-rays, that is, the X-ray detector can collect X-ray images of the object to be measured, and analyze the object to be measured based on the X-ray images.
[0048] The transmission device can also be called a transport device. The transmission device can be a device for uniform (or variable) speed transport. The object to be tested can be placed on the transmission device. During the movement of the transmission device, the object to be tested moves synchronously with the transmission device. Figure 2 In the example, the transmission device moves from right to left, and the movement speed is V. Based on this, the object to be measured also moves from right to left, and the movement speed is V.
[0049] Terahertz antennas can also be called terahertz transceiver antennas or terahertz detectors. Terahertz antennas are devices used to transmit and receive terahertz signals. The terahertz (THz) wave in a terahertz antenna usually refers to electromagnetic waves with a frequency of 0.1 to 10 THz. Terahertz imaging and spectroscopy will be the main technologies for terahertz applications. Terahertz has the characteristics of high frequency and ultra-short pulses (picosecond level), which makes terahertz have high spatial resolution and time resolution. The energy of terahertz is very small and will not cause damage to matter.
[0050] When a terahertz antenna is deployed in the detection device, a terahertz antenna array may be deployed. The terahertz antenna array may include multiple terahertz antennas, such as N terahertz antennas, that is, the terahertz antenna array is composed of N terahertz antennas, and N may be a positive integer. Figure 2 In this paper, 12 terahertz antennas are taken as an example.
[0051] For example, the direction perpendicular to the moving direction of the transmission device may be referred to as the reference direction. The moving direction of the transmission device is the direction of the horizontal plane, and the reference direction is also the direction of the horizontal plane. The reference direction may be perpendicular to the moving direction. Figure 2 In the embodiment, the movement direction of the transmission device is from right to left, therefore, the reference direction may be from bottom to top, or the reference direction may be from top to bottom.
[0052] When the terahertz antenna array is deployed in the detection equipment, multiple terahertz antennas are deployed in the reference direction, that is, the position of the terahertz antenna is the position of the terahertz antenna in the reference direction. For example, taking the reference direction from bottom to top as an example, the position of the terahertz antenna represents the distance between the terahertz antenna and the lower edge of the transmission device (or other position). Assuming that the distance between the terahertz antenna 1 and the lower edge of the transmission device is a1, the position of the terahertz antenna is recorded as a1, assuming that the distance between the terahertz antenna 2 and the lower edge of the transmission device is a2, the position of the terahertz antenna is recorded as a2, and so on.
[0053] For example, taking the reference direction from top to bottom as an example, the position of the terahertz antenna represents the distance between the terahertz antenna and the upper edge of the transmission device. Assuming that the distance between the terahertz antenna 1 and the lower edge of the transmission device is b1, the position of the terahertz antenna is recorded as b1, assuming that the distance between the terahertz antenna 2 and the lower edge of the transmission device is b2, the position of the terahertz antenna is recorded as b2, and so on.
[0054] In summary, after the terahertz antenna array and the transmission device are deployed, the positional relationship between each terahertz antenna in the terahertz antenna array and the transmission device is fixed. Therefore, the position of each terahertz antenna in the terahertz antenna array can be known, that is, the position of each terahertz antenna is pre-configured.
[0055] In the above application scenario, the embodiment of the present application proposes a type detection method, which can be applied to the detection device, see Figure 3 FIG. 4 is a flow chart of the method, which may include:
[0056] Step 301: During the movement of the object to be measured, an X-ray image of the object to be measured is collected by an X-ray detector, and terahertz information of the object to be measured is collected by a terahertz antenna.
[0057] For example, when the type of the object to be tested needs to be detected, the object to be tested can be placed on the transmission device (one or more objects to be tested can be placed). During the movement of the transmission device, the object to be tested moves synchronously with the transmission device. For example, see Figure 2 As shown, taking the transmission device moving from right to left as an example, and the movement speed of the transmission device is V, based on this, the object to be measured also moves from right to left, and the movement speed of the object to be measured is V, that is, maintaining the movement speed V at a uniform speed.
[0058] X-ray images can be collected periodically by an X-ray detector. When the object to be measured moves into the collection range of the X-ray detector, the X-ray image of the object to be measured is collected by the X-ray detector. In the process of collecting X-ray images, the X-ray generator emits X-rays to the object to be measured, and the X-ray detector receives the X-rays that pass through the object to be measured, and images the object to be measured based on the X-rays to obtain an X-ray image.
[0059] Terahertz information can be collected periodically through the terahertz antenna. When the object to be measured moves into the collection range of the terahertz antenna, the terahertz information of the object to be measured is collected through the terahertz antenna. In the process of collecting terahertz information, the terahertz antenna can send a terahertz signal to the object to be measured, receive the terahertz signal reflected by the object to be measured, and obtain the terahertz information of the object to be measured based on the terahertz signal.
[0060] In summary, it can be seen that during the movement of the object to be measured, multiple frames of X-ray images can be collected by the X-ray detector. For each frame of X-ray image, the X-ray image may include information of the object to be measured (the object to be measured is in the collection range of the X-ray detector), or may not include information of the object to be measured (the object to be measured is not in the collection range of the X-ray detector). In addition, multiple groups of terahertz information can be collected by the terahertz antenna. For each group of terahertz information, the terahertz information may include information of the object to be measured (the object to be measured is in the collection range of the terahertz antenna), or may not include information of the object to be measured (the object to be measured is not in the collection range of the terahertz antenna).
[0061] Step 302: Acquire the associated target X-ray image and target terahertz information, where the difference between the acquisition time of the target terahertz information and the acquisition time of the target X-ray image is a preset time length.
[0062] Exemplarily, a preset time length may be preconfigured, and the preset time length may be determined based on the distance between the terahertz antenna and the X-ray detector, and the movement speed of the transmission device, and the movement speed of the transmission device is a fixed value. For example, assuming that the distance between the terahertz antenna and the X-ray detector is d, and the movement speed of the transmission device is V, the reference time length is calculated as d / V. Obviously, after the reference time length, the object to be measured will move from the collection range of the terahertz antenna to the collection range of the X-ray detector, or the object to be measured will move from the collection range of the X-ray detector to the collection range of the terahertz antenna.
[0063] Based on this, the preset duration can be a reference duration, or the preset duration can be greater than the reference duration, and the difference between the preset duration and the reference duration is less than a threshold, that is, the difference between the two is relatively small, or the preset duration can be less than the reference duration, and the difference between the reference duration and the preset duration is less than a threshold.
[0064] Exemplarily, in the direction of motion of the transmission device, if the terahertz antenna is located in front of the X-ray detector (i.e., the object to be measured will move from the collection range of the terahertz antenna to the collection range of the X-ray detector), the difference between the collection time of the target X-ray image and the collection time of the target terahertz information is a preset time length. Alternatively, in the direction of motion of the transmission device, if the X-ray detector is located in front of the terahertz antenna (i.e., the object to be measured will move from the collection range of the X-ray detector to the collection range of the terahertz antenna), the difference between the collection time of the target terahertz information and the collection time of the target X-ray image is a preset time length.
[0065] For example, during the movement of the object to be measured, multiple frames of X-ray images can be collected by the X-ray detector, and the collection time of each frame of X-ray image can be known. Also, multiple groups of terahertz information can be collected by the terahertz antenna, and the collection time of each group of terahertz information can be known.
[0066] Assuming that the terahertz antenna is located in front of the X-ray detector, if the acquisition time of the first set of terahertz information is t1, the sum of t1 and the preset time length is calculated as t1', and the X-ray image at the acquisition time t1' is determined. Based on this, the X-ray image at the acquisition time t1' and the terahertz information at the acquisition time t1 are used as the associated target X-ray image and target terahertz information. If the acquisition time of the second set of terahertz information is t2, the sum of t2 and the preset time length is calculated as t2', and the X-ray image at the acquisition time t2' is determined. Based on this, the X-ray image at the acquisition time t2' and the terahertz information at the acquisition time t2 are used as the associated target X-ray image and target terahertz information. By analogy, multiple sets of associated target X-ray images and target terahertz information can be obtained, and a set of associated target X-ray images and target terahertz information will be used as an example for explanation later.
[0067] Step 303: determine the target position of the object to be measured in the reference direction, the measurement height of the object to be measured, and the first candidate type of the object to be measured based on the target terahertz information.
[0068] Exemplarily, in order to obtain the measured height of the object to be measured, the following steps may be adopted:
[0069] Step S11: If the target terahertz information includes a transceiver delay, and the transceiver delay represents the time length from when the terahertz antenna sends a signal to when it receives a signal, then a first distance between the terahertz antenna and the object to be measured is determined based on the transceiver delay, where the first distance represents the vertical distance between the terahertz antenna and the object to be measured.
[0070] For example, the terahertz antenna can emit a terahertz signal vertically downward. If the object to be measured is not located below the terahertz antenna, the terahertz signal is reflected by the transmission device below the terahertz antenna, and the terahertz antenna can receive the terahertz signal reflected by the transmission device. If the object to be measured is located below the terahertz antenna, the terahertz signal is reflected by the object to be measured below the terahertz antenna, and the terahertz antenna can receive the terahertz signal reflected by the object to be measured. In either case, the terahertz antenna can emit a terahertz signal, and the time when the terahertz signal is emitted is recorded as t1, and the terahertz antenna can receive a terahertz signal, and the time when the terahertz signal is received is recorded as t2. Based on this, the time length from the terahertz antenna emitting a signal to receiving a signal is t2-t1, that is, the transceiver delay is t2-t1, and the target terahertz information includes the transceiver delay, and the transceiver delay is recorded as .
[0071] Based on this, the first distance between the terahertz antenna and the object to be measured can be determined based on the transmission and reception delay. For example, the first distance between the terahertz antenna and the object to be measured can be determined using the following formula: .
[0072] In the above formula, c Indicates the transmission speed of the terahertz signal. If the terahertz signal is reflected by the object to be measured, then d Indicates the first distance between the terahertz antenna and the object to be measured. If the terahertz signal is reflected by the transmission device, then d represents the second distance between the terahertz antenna and the transmission device. Obviously, if d is equal to the second distance between the terahertz antenna and the transmission device (the second distance can be pre-configured), it means that the object to be measured is not located under the terahertz antenna, that is, there is no object to be measured under the terahertz antenna. d If the distance is less than the second distance, it means that the object to be measured is located below the terahertz antenna, that is, there is an object to be measured below the terahertz antenna.
[0073] Step S12: determining the measurement height of the object to be measured based on the difference between the configured second distance and the first distance, where the second distance may represent the distance between the terahertz antenna and the transmission device (ie, the vertical distance).
[0074] For example, the difference between the second distance and the first distance can be used as the measured height of the object to be measured. Obviously, if the object to be measured is located below the terahertz antenna, the first distance represents the distance between the terahertz antenna and the object to be measured, and the second distance represents the distance between the terahertz antenna and the transmission device. Therefore, the difference between the second distance and the first distance is the measured height of the object to be measured. For example, the following formula can be used to determine the measured height of the object to be measured: In the above formula, It can represent the second distance between the terahertz antenna and the transmission device, H objT It can indicate the measured height of the object to be measured.
[0075] Exemplarily, in order to obtain the target position of the object to be measured, the following method may be adopted: determining the target position of the object to be measured in the reference direction based on the position of the terahertz antenna in the reference direction.
[0076] For example, when a terahertz antenna array is deployed in a detection device, multiple terahertz antennas are deployed in a reference direction, that is, the position of the terahertz antenna is the position of the terahertz antenna in the reference direction. Taking the reference direction as the direction from bottom to top as an example, the position of the terahertz antenna represents the distance between the terahertz antenna and the lower edge of the transmission device. For example, assuming that the distance between the terahertz antenna 1 and the lower edge of the transmission device is a1, the position of the terahertz antenna is recorded as a1, assuming that the distance between the terahertz antenna 2 and the lower edge of the transmission device is a2, the position of the terahertz antenna is recorded as a2, and so on.
[0077] Based on this, if the object to be measured is located below the terahertz antenna 1 (such as the terahertz antenna 1 detects d If the distance is less than the second distance, the position a1 of the terahertz antenna 1 can be used as the target position of the object to be measured in the reference direction. d = equal to the second distance), the position a1 of the terahertz antenna 1 may not be used as the target position of the object to be measured in the reference direction. Similarly, after performing the above operation on each terahertz antenna of the terahertz antenna array, the target position of the object to be measured in the reference direction may be obtained.
[0078] One object to be measured may correspond to one target position, that is, the object to be measured is only located under one terahertz antenna, and the target position corresponds to one measurement height. Alternatively, one object to be measured may correspond to multiple target positions, that is, the object to be measured is simultaneously located under multiple terahertz antennas, and multiple target positions correspond to multiple measurement heights. For example, the object to be measured corresponds to target position a1 and target position a2, target position a1 corresponds to height h1, target position a2 corresponds to height h2, target position a1 indicates the position of terahertz antenna 1, height h1 is the measurement height of the object to be measured determined by terahertz antenna 1, target position a2 indicates the position of terahertz antenna 2, and height h2 is the measurement height of the object to be measured determined by terahertz antenna 2.
[0079] Exemplarily, in order to obtain the first candidate category of the object to be tested, the following method can be adopted: if the target terahertz information includes a target signal feature, the configured first mapping table is queried through the target signal feature (the first mapping table may include a mapping relationship between the signal feature and the candidate category), and the first candidate category corresponding to the target signal feature is obtained. The first candidate category may include at least one candidate category.
[0080] For example, a first mapping table may be preconfigured. To obtain the first mapping table, the following method may be used: a sample object of candidate type A (i.e., it is known that the candidate type of the sample object is candidate type A) is placed on a transmission device. During the movement of the transmission device, the terahertz antenna collects terahertz information of the sample object, and the terahertz information includes the signal characteristics of the sample object. Therefore, the mapping relationship between the signal characteristics of the sample object and the candidate type A of the sample object may be recorded in the first mapping table. Similarly, a sample object of candidate type B may be placed on the transmission device, so that the mapping relationship between the signal characteristics of the sample object and the candidate type B of the sample object is recorded in the first mapping table, and so on.
[0081] For example, a terahertz antenna can emit a terahertz signal vertically downward. If the object to be measured is located below the terahertz antenna, the terahertz signal is reflected by the object to be measured, and the terahertz antenna can receive the terahertz signal reflected by the object to be measured, thereby obtaining the target signal characteristics of the terahertz signal, and the target terahertz information includes the target signal characteristics. The target signal characteristics may include but are not limited to at least one of the following: power spectrum characteristics, peak characteristics, and peak frequency characteristics of the terahertz signal, and there is no limitation on this target signal characteristic.
[0082] For example, after obtaining the target signal characteristics of the object to be tested, the first mapping table can be queried through the target signal characteristics to obtain the first candidate category of the object to be tested. The first candidate category may include one candidate category or multiple candidate categories. For example, if multiple objects to be tested are stacked under the terahertz antenna, the target signal characteristics of the terahertz signals reflected by these objects to be tested may correspond to multiple candidate categories. For another example, if the signal characteristics corresponding to different candidate categories are the same or similar, then the target signal characteristics of the terahertz signal reflected by a single object to be tested may also correspond to multiple candidate categories.
[0083] In summary, it can be seen that based on the target terahertz information, the target position of the object to be measured in the reference direction, the measurement height of the object to be measured and the first candidate type of the object to be measured can be determined.
[0084] See also Figure 4 As shown in FIG. 1 , it is a schematic diagram of the working principle of the terahertz antenna. Object 1 (the object to be tested on the left), object 2 (the object to be tested in the middle), and object 3 (the object to be tested on the right) are placed on the transmission device. Assuming that the terahertz antenna array is composed of N terahertz antennas, taking 12 terahertz antennas as an example, the target terahertz information collected by the terahertz antenna array at time t is ,in, It represents the target terahertz information collected by the i-th terahertz antenna at time t.
[0085] For the object to be measured 1, based on the target terahertz information collected by the terahertz antenna 1, the target position a2 of the object to be measured 1 in the reference direction, the measurement height h1 of the object to be measured 1 and the first candidate category C1 of the object to be measured 1 can be determined. In addition, the remaining terahertz antennas cannot collect the target terahertz information for the object to be measured 1, and the target position, measurement height and first candidate category of the object to be measured 1 cannot be obtained.
[0086] For the object to be measured 2, based on the target terahertz information collected by the terahertz antenna 5, the target position a5, the measurement height h2 and the first candidate category C2 of the object to be measured 2 can be determined. Based on the target terahertz information collected by the terahertz antenna 6, the target position a6, the measurement height h3 and the first candidate category C3 of the object to be measured 2 can be determined. The target position a6 is different from the target position a5, the measurement height h3 is the same as or different from the measurement height h2, and the first candidate category C3 is the same as or different from the first candidate category C2.
[0087] For the object to be measured 3 , based on the target terahertz information collected by the terahertz antenna 10 , the target position a10 , the measurement height h4 , and the first candidate category C4 of the object to be measured 3 can be determined.
[0088] For example, assuming that the object to be tested is placed in the The lower side of the terahertz antenna, the terahertz information collected by the terahertz antenna array is , The terahertz information corresponding to the position of the object to be measured is indicated by the terahertz information, and the other terahertz information corresponding to the position of the object to be measured is indicated by the terahertz information corresponding to the position of the object to be measured. After processing the terahertz information corresponding to each terahertz antenna, it can be determined whether there is an object to be measured. If there is an object to be measured, the measurement height of the object to be measured, the target position of the object to be measured, and the first candidate type of the object to be measured are determined based on the terahertz information, that is, the three-dimensional matrix information of the object to be measured is finally obtained. , They represent the target position, the measurement height and the first candidate category respectively. The first candidate category is a preliminary fuzzy category, which can include multiple candidate categories. The true category of the object to be measured cannot be finally confirmed, and it needs to be analyzed in combination with the X-ray image.
[0089] Step 304: Determine at least one pixel position of the object to be detected and a second candidate category corresponding to each pixel position based on the target X-ray image.
[0090] For example, the pixel position corresponding to the object to be tested on the target X-ray image can be determined. For example, the X-ray generator emits X-rays to the object to be tested, and the X-ray detector receives the X-rays passing through the object to be tested, and images the object to be tested to obtain a target X-ray image. The target X-ray image at time t is , that is, the target X-ray image includes color values of K pixel positions.
[0091] If the object to be tested is within the acquisition range of the X-ray detector at time t, then there is a pixel position corresponding to the object to be tested on the target X-ray image among the K pixel positions, and the pixel position corresponding to the object to be tested on the target X-ray image can be determined. For example, the target X-ray image is input into a trained machine learning model to obtain the pixel position corresponding to the object to be tested on the target X-ray image. Other methods can also be used to determine the pixel position corresponding to the object to be tested on the target X-ray image, and there is no limitation on this.
[0092] In addition, if the object to be tested is not in the collection range of the X-ray detector at time t, the pixel position corresponding to the object to be tested on the target X-ray image does not exist in the K pixel positions. In this way, the pixel position corresponding to the object to be tested on the target X-ray image cannot be known.
[0093] Exemplarily, in order to obtain the second candidate category of the object to be tested, the following method can be adopted: for each pixel position of the object to be tested, the target color value of the pixel position (i.e., the pixel position corresponding to the object to be tested on the target X-ray image) is determined based on the target X-ray image, and the configured second mapping table (the second mapping table may include a mapping relationship between color values and candidate categories) is queried based on the target color value to obtain the candidate category corresponding to the target color value, and the candidate category corresponding to the target color value is determined as the second candidate category corresponding to the pixel position. The second candidate category may include at least one candidate category, that is, for each color value, the color value may correspond to one candidate category, and the color value may also correspond to multiple candidate categories.
[0094] For example, the second mapping table may be preconfigured. To obtain the second mapping table, the following method may be used: a sample object of candidate type A is placed on a transmission device. During the movement of the transmission device, the X-ray detector collects an X-ray image of the sample object, and the color value of the sample object (i.e., the color value of the pixel position corresponding to the sample object on the X-ray image) is determined based on the X-ray image. In this way, the mapping relationship between the color value of the sample object and the candidate type A of the sample object may be recorded in the second mapping table. Similarly, a sample object of candidate type B may be placed on a transmission device, so that the mapping relationship between the color value of the sample object and the candidate type B of the sample object is recorded in the second mapping table, and so on.
[0095] For example, if the object to be tested is within the acquisition range of the X-ray detector, the pixel position corresponding to the object to be tested on the target X-ray image can be determined, and the target color value of the pixel position can be determined. The pixel value of the pixel position can be a color value, and the color value is used as the target color value.
[0096] For example, after obtaining the target color value of the object to be tested, the second mapping table can be queried through the target color value to obtain the second candidate category of the object to be tested. The second candidate category may include one candidate category or multiple candidate categories. For example, if there are multiple stacked objects to be tested, these objects to be tested may correspond to the same pixel position on the target X-ray image, so that the target color value may correspond to multiple candidate categories. For another example, if the color values corresponding to different candidate categories are the same or similar, then the target color value corresponding to one object to be tested may also correspond to multiple candidate categories.
[0097] Exemplarily, in order to obtain the second candidate type of the object to be tested, the following method can also be used: for each pixel position of the object to be tested, the atomic number of the pixel position is determined based on the target X-ray image, and the second candidate type corresponding to the pixel position is determined based on the atomic number. For example, the atomic number refers to the sequence number of an element in the periodic table, which is numerically equal to the nuclear charge number (i.e., the number of protons) of the nucleus or the number of electrons outside the nucleus of a neutral atom. Obviously, the atomic numbers of substances of different candidate types are different. In this way, the second candidate type corresponding to the pixel position can be determined based on the atomic number.
[0098] In summary, it can be seen that based on the target X-ray image, the pixel position corresponding to the object to be tested on the target X-ray image can be determined to determine the second candidate type of the object to be tested. For example, the following information is obtained: , Indicates the pixel position of the object to be tested on the target X-ray image. Indicates the second candidate category. The second candidate category is a preliminary fuzzy category. The second candidate category includes multiple candidate categories. The true category of the object to be tested cannot be finally confirmed and needs to be analyzed in combination with terahertz information.
[0099] In a possible implementation, based on multiple X-ray images and multiple terahertz information, associated target X-ray images and target terahertz information are first acquired based on a preset time duration. The pixel position of the object to be measured and the second candidate category of the object to be measured are determined based on the target X-ray image, and the target position of the object to be measured, the measurement height of the object to be measured, and the first candidate category of the object to be measured are determined based on the target terahertz information.
[0100] In another possible implementation, based on multiple X-ray images and multiple terahertz information, for each X-ray image, a pixel position of the object to be measured and a second candidate type of the object to be measured can be determined based on the X-ray image. For each terahertz information, a target position of the object to be measured, a measurement height of the object to be measured, and a first candidate type of the object to be measured can be determined based on the terahertz information.
[0101] On this basis, a data set can be acquired based on a preset time length, which data set includes the associated pixel position of the object to be measured, the second candidate type of the object to be measured, the target position of the object to be measured, the measured height of the object to be measured and the first candidate type of the object to be measured, and subsequent processing is performed based on the data set.
[0102] For example, the pixel position and the second candidate category in the data set correspond to an X-ray image, the target position, the measurement height and the first candidate category in the data set correspond to terahertz information, and the acquisition time of the X-ray image and the acquisition time of the terahertz information meet the requirements of the preset time length.
[0103] Step 305 : determining a reference pixel position corresponding to the object to be measured on the target X-ray image based on the target position of the object to be measured (the target position of the object to be measured in the reference direction) and the measured height of the object to be measured.
[0104] For example, see Figure 5 As shown, this is a schematic diagram of the principle of X-ray imaging. Figure 5 The target X-ray image is shown, and the target X-ray image shows the internal situation of the object to be measured. Figure 5 It can be seen that for the pixel position corresponding to the object to be measured on the target X-ray image, the pixel position is related to the target position of the object to be measured and the measured height of the object to be measured, that is, the pixel position (that is, the pixel position represented by the information received by the X-ray detector) is the coupling position of the target position and the measured height.
[0105] Since the pixel position is related to the target position of the object to be measured and the measured height of the object to be measured, the corresponding pixel position of the object to be measured on the target X-ray image can be determined based on the target position of the object to be measured and the measured height of the object to be measured. For the convenience of distinction, the pixel position is recorded as the reference pixel position.
[0106] For example, a spatial position conversion function can be pre-configured, the input data of the spatial position conversion function is the target position and the measured height, and the output data of the spatial position conversion function is the reference pixel position. There is no restriction on this spatial position conversion function as long as the above input-output relationship is satisfied.
[0107] Based on this, after obtaining the target position of the object to be measured and the measured height of the object to be measured based on the target terahertz information, the target position and the measured height can be substituted into the spatial position conversion function to obtain the reference pixel position corresponding to the target position and the measured height. The reference pixel position is calculated based on the target position and the measured height, rather than being obtained by analyzing the target X-ray image.
[0108] Exemplarily, the spatial position conversion function can be expressed as , X 0 Indicates the target position of the object to be measured, H 0 Indicates the measured height of the object to be measured, Y 0 represents the reference pixel position, f Represents the spatial position conversion function, spatial position conversion function f It can be configured based on experience and there is no limit on this. Obviously, the target position X 0 and measure height H 0 Substitute into the spatial position conversion function f Afterwards, the reference pixel position can be obtained Y 0 .
[0109] In a possible implementation, the spatial position conversion function f It can include y=a*x+b*h+c. Of course, this is just a spatial position conversion function. f For example, in this spatial position transformation function f In the formula, x can represent the target position of the object to be measured, h can represent the measured height of the object to be measured, y can represent the reference pixel position of the object to be measured, and a, b, and c are the acquired parameter values. Obviously, after substituting the target position x and the measured height h into the formula, the reference pixel position y can be obtained.
[0110] Exemplarily, regarding the values of a, b, and c, a sample object (such as multiple sample objects) can be placed on a transmission device. During the movement of the transmission device, the terahertz information of the sample object can be collected by the terahertz antenna, and the X-ray image of the sample object can be collected by the X-ray detector. The target position of the sample object and the measured height of the sample object are determined based on the terahertz information, and the pixel position of the sample object is determined based on the X-ray image. Then, multiple sets of data (each set of data includes the target position, the measured height, and the pixel position) are substituted into the spatial position conversion function f , you can get the values of a, b, and c.
[0111] Step 306: Determine the target category corresponding to the object to be measured based on the first candidate category corresponding to the target position and the measured height and the second candidate category corresponding to the reference pixel position. For example, first select the second candidate category corresponding to the reference pixel position from the second candidate categories corresponding to at least one pixel position of the object to be measured, and then determine the target category based on the first candidate category and the second candidate category.
[0112] For example, in step 303, the target position, measurement height and first candidate category of the object to be measured can be determined based on the target terahertz information. In step 304, the pixel position (such as multiple pixel positions) and the second candidate category of the object to be measured can be determined based on the target X-ray image (each pixel position corresponds to the second candidate category, and the second candidate categories corresponding to different pixel positions are the same or different). In step 305, the reference pixel position of the object to be measured can be determined based on the target position and the measurement height. On this basis, the pixel position that matches the reference pixel position can be found from all the pixel positions of the target X-ray image (that is, this pixel position is the same as the reference pixel position), and the second candidate category corresponding to this pixel position is used as the second candidate category corresponding to the reference pixel position. Then, the target category corresponding to the object to be measured can be determined based on the first candidate category and the second candidate category.
[0113] Exemplarily, if the first candidate category includes at least one candidate category, and the second candidate category includes at least one candidate category, then the intersection of the first candidate category and the second candidate category is determined, and the target category corresponding to the object to be tested is determined based on the intersection. For example, if the intersection is a candidate category, then the candidate category is used as the target category corresponding to the object to be tested. Alternatively, if the intersection is at least two candidate categories, then both of the at least two candidate categories are used as the target category corresponding to the object to be tested, or, a candidate category is randomly selected from the at least two candidate categories, and the selected candidate category is used as the target category corresponding to the object to be tested. Alternatively, if the intersection is empty, the target category corresponding to the object to be tested cannot be determined.
[0114] Exemplarily, regarding the fusion of target terahertz information and X-ray information (such as target X-ray images), since the target terahertz information can obtain the spatial position of the object to be measured (such as target position + measurement height), the target X-ray image can obtain the pixel position of the object to be measured, and the pixel position in the target X-ray image is related to the spatial position of the object to be measured (such as target position + measurement height), therefore, the target terahertz information and the target X-ray image can be fused based on this association relationship.
[0115] For the target terahertz information, the target position + measured height + first candidate category can be stored, and for the target X-ray image, the pixel position + second candidate category can be stored. Since the target terahertz information is stored in the form of spatial position (such as target position + measured height), the reference pixel position can be determined based on the spatial position, and then the second candidate category corresponding to the reference pixel position can be found from the stored data of the target X-ray image. In this way, a three-dimensional matrix can be obtained. , Y trepresents the reference pixel position, which is determined based on the target position and the measured height. C t represents the first candidate category corresponding to the target position and the measured height, C t ' indicates the second candidate category corresponding to the reference pixel position.
[0116] In summary, it can be seen that the first candidate category and the second candidate category can be associated based on the reference pixel position, and then the first candidate category and the second candidate category can be fused. The first candidate category and the second candidate category are both one-dimensional vectors, representing possible categories to be determined. The intersection of the first candidate category and the second candidate category is taken, that is, , and obtain the target category (final category) corresponding to the object to be tested. Obviously, by fusing the candidate categories, the category of the object to be tested can be determined more accurately.
[0117] Step 307: Generate an optimized X-ray image based on the target X-ray image. For example, the target X-ray image may be optimized to obtain an optimized X-ray image.
[0118] For example, since the X-ray generator emits X-rays at an angle and the X-ray detector receives X-rays at an angle, it is possible that two objects to be tested do not overlap when viewed from top to bottom, but overlap when viewed from the angle of the X-ray detector. In this case, the color on the target X-ray image is the superposition of the two objects to be tested. In this case, based on the target terahertz information, the two objects to be tested can be separated in space, that is, the position information of this part of the X-rays can be separated. Decoupling , so that the two objects to be tested can be imaged separately at different positions of the target X-ray image, thereby optimizing the X-ray image.
[0119] During the movement of the object to be measured, the object to be measured moves in a straight line. However, since the X-ray generator emits X-rays at an angle and the X-ray detector receives X-rays at an angle, the pixel position of the object to be measured in the target X-ray image does not move in a straight line, and the movement of the object to be measured cannot be intuitively reflected.
[0120] Based on the above findings, in this embodiment, the target X-ray image can be optimized to obtain an optimized X-ray image. For example, the target X-ray image can be optimized in the following manner: based on the mapping relationship between the spatial position in the world coordinate system and the pixel position in the image coordinate system, the pixel position to be optimized corresponding to the target position (the pixel position corresponding to the object to be measured on the optimized X-ray image matches the target position) in the target X-ray image is determined, the color value of the pixel position to be optimized is modified to the first color value corresponding to the target type, and the color value of the reference pixel position is modified to the second color value to obtain the optimized X-ray image.
[0121] For example, based on the target terahertz information, the target position of the object to be measured can be determined. The target position is the position of the terahertz antenna in the reference direction. The target position can be understood as the spatial position in the world coordinate system. In addition, the mapping relationship between the spatial position in the world coordinate system and the pixel position in the image coordinate system is known. The mapping relationship can be pre-calibrated or obtained in other ways, and there is no restriction on this. Based on this, the mapping relationship can be queried through the target position to obtain the pixel position to be optimized corresponding to the target position in the target X-ray image, and the pixel position to be optimized can be recorded as pixel position A.
[0122] For example, after obtaining the target type corresponding to the object to be tested, the first color value corresponding to the target type can also be determined. Referring to step 304, a second mapping table can be pre-configured, and the second mapping table can include a mapping relationship between color values and candidate types. On this basis, the second mapping table can be queried by the target type to obtain the first color value corresponding to the target type.
[0123] For example, after obtaining the pixel position A corresponding to the target position in the target X-ray image and the first color value corresponding to the target type, the color value of the pixel position A in the target X-ray image can be modified to the first color value corresponding to the target type, thereby optimizing the target X-ray image.
[0124] After the color value of the pixel position A is modified to the first color value corresponding to the target type, the modified X-ray image can be used as the optimized X-ray image. Alternatively, after the color value of the pixel position A is modified to the first color value corresponding to the target type, the color value of the reference pixel position in the target X-ray image can also be modified to a second pixel value (for example, a preconfigured fixed color value), and the modified X-ray image can be used as the optimized X-ray image.
[0125] For example, the reference pixel position is the pixel position corresponding to the object to be measured on the target X-ray image, which is determined based on the target position of the object to be measured and the measured height of the object to be measured. The second pixel value can be determined according to the image display requirements. Taking the second pixel value as a configured fixed color value as an example, the fixed color value can be a pre-configured empirical value, or a color value representing the background, and there is no restriction on this fixed color value. Based on this, the color value of the reference pixel position in the target X-ray image can be modified to the fixed color value.
[0126] For the remaining positions in the target X-ray image except the pixel position A and the reference pixel position, the pixel values of the remaining positions may be modified or may not be modified.
[0127] In summary, an optimized X-ray image can be obtained. Based on the optimized X-ray image, even if two objects to be tested do not overlap when observed from top to bottom, but overlap when observed from the angle of the X-ray detector, the two objects to be tested can be separated in space, so that the two objects to be tested can be imaged separately at different positions of the optimized X-ray image. During the movement of the object to be tested, if the object to be tested moves in a straight line, the pixel position of the object to be tested in the optimized X-ray image moves in a straight line, and both are pixel positions corresponding to the target position of the object to be tested (because the target position of the object to be tested is the position of the terahertz antenna in the reference direction, and the position of the terahertz antenna in the reference direction remains unchanged, therefore, the pixel position corresponding to the target position remains unchanged), thereby intuitively reflecting the movement of the object to be tested.
[0128] Exemplarily, if a first candidate type of the object to be measured is determined based on the target terahertz information, and a second candidate type of the object to be measured is not determined based on the target X-ray image, the first candidate type is determined as the target type corresponding to the object to be measured; in addition, a first color value corresponding to the target type is obtained, and the color value of the reference pixel position of the target X-ray image is adjusted based on the first color value corresponding to the target type.
[0129] For example, terahertz information can also include transmission information, that is, a terahertz receiving antenna is installed under the transmission device, and the terahertz signal is received by the terahertz receiving antenna. The terahertz signal is used for imaging, and the terahertz image can assist in detecting thin materials (i.e., the object to be detected) that cannot be detected by X-ray imaging.
[0130] Based on this, for thin materials that cannot be detected by X-ray imaging, the terahertz antenna can obtain the first candidate type and spatial position (such as target position and measurement height) of the object to be detected. The process is referred to the above embodiment. Then, it is determined whether the target X-ray image contains the candidate type of the object to be detected. If the second candidate type of the object to be detected is determined based on the target X-ray image, the above steps are used to complete the detection.
[0131] If not, that is, the second candidate category of the object to be measured is not determined based on the target X-ray image, the first candidate category is determined as the target category corresponding to the object to be measured. And, the reference pixel position of the object to be measured in the X-ray image is determined based on the target position and the measured height. Then, the first color value corresponding to the target category is obtained (such as querying the second mapping table to obtain the first color value corresponding to the target category). The color value corresponding to the reference pixel position in the target X-ray image is modified based on the first color value corresponding to the target category, so that the color value of the object to be measured exists in the X-ray image, thereby generating the color value of the object to be measured in the X-ray image.
[0132] In one possible implementation, see Figure 6 The figure shows a flow chart of the species detection method.
[0133] Terahertz information is collected through a terahertz antenna. For example, a terahertz antenna continuously transmits a terahertz signal to a specified area, and the terahertz signal is received by the terahertz antenna to measure and obtain terahertz information. Also, an X-ray image is collected through an X-ray detector. For example, an X-ray generator can continuously transmit X-rays to a specified area, and an X-ray detector can receive the X-rays to generate an X-ray image.
[0134] Based on the terahertz information, the target position of the object to be measured, the measured height of the object to be measured and the first candidate type of the object to be measured are obtained. And based on the X-ray image, the pixel position corresponding to the object to be measured on the X-ray image and the second candidate type of the object to be measured are obtained.
[0135] Multidimensional data time matching is performed based on a preset time length, that is, a data set is obtained based on the preset time length, and the data set includes the associated pixel position of the object to be measured, the second candidate type of the object to be measured, the target position of the object to be measured, the measured height of the object to be measured and the first candidate type of the object to be measured.
[0136] Position information matching is performed, that is, the reference pixel position corresponding to the object to be measured on the X-ray image is determined based on the target position of the object to be measured and the measured height of the object to be measured. The first candidate category of the object to be measured and the second candidate category of the object to be measured are associated based on the reference pixel position.
[0137] Multi-dimensional data information fusion is performed, for example, the target category corresponding to the object to be detected can be determined based on the first candidate category of the object to be detected and the second candidate category of the object to be detected. In addition, multi-dimensional data image fusion is performed, for example, an optimized X-ray image is generated based on the target X-ray image.
[0138] In a possible implementation, the detection device may be composed of three parts: a control system, a hardware system, and a data processing system. The control system includes a sensing unit and a control unit, which are used to detect whether an object to be detected enters the detection device and adjust the parameters of the detection device. The hardware system includes an X-ray generator, an X-ray detector, a transmission device, and a terahertz antenna. The hardware system is used to transmit and receive X-rays (implemented by the X-ray generator and the X-ray detector), drive the object to be detected to move (implemented by the transmission device and), and transmit and receive terahertz signals (implemented by the terahertz antenna). The data processing system includes a data acquisition unit, a signal processing unit, an image processing unit, and an image display unit. The data acquisition unit completes the data acquisition of the X-ray detector (i.e., obtaining the X-ray image) and the data acquisition of the terahertz antenna (i.e., obtaining the terahertz information). The signal processing unit is used to perform processing based on the terahertz information, and the image processing unit is used to perform processing based on the X-ray image. The image display unit is used to display the optimized X-ray image.
[0139] It can be seen from the above technical scheme that in the embodiment of the present application, an X-ray detector and a terahertz antenna can be deployed on the detection device. During the movement of the transmission device, the X-ray detector is used to collect the X-ray image of the object to be detected, and the terahertz antenna is used to collect the terahertz information of the object to be detected. In this way, the target type corresponding to the object to be detected can be determined by combining the X-ray image and the terahertz information. The recognition accuracy of the detection device is very high, and the type of the object to be detected can be accurately identified. By adding a terahertz antenna to the detection device, terahertz information can be obtained, and then the terahertz information is combined with the X-ray image. By coupling the information of the two, the object to be detected is detected together, reducing the probability of detection errors. Terahertz information can be either terahertz information obtained by reflection or terahertz information obtained by transmission. The reflection signal is mainly used for material identification, and the transmission signal is mainly used for imaging. By adding a terahertz antenna, terahertz information is obtained, and the position information and material information of the object to be detected are obtained. By optimizing the X-ray image through terahertz information, the movement of the object to be detected is intuitively reflected, and the quality of the X-ray image can be improved.
[0140] Based on the same application concept as the above method, a type detection device is proposed in the embodiment of the present application. At least one object to be detected is placed on a transmission device. During the movement of the transmission device, the X-ray detector is used to collect the X-ray image of the object to be detected, and the terahertz antenna is used to collect the terahertz information of the object to be detected. Figure 7FIG. 1 is a schematic diagram of the structure of the device, and the device may include:
[0141] An acquisition module 71 is used to acquire associated target X-ray images and target terahertz information, wherein the difference between the acquisition time of the target terahertz information and the acquisition time of the target X-ray image is a preset time length;
[0142] a determination module 72, configured to determine a target position of the object to be measured in a reference direction, a measurement height of the object to be measured, and a first candidate category of the object to be measured based on the target terahertz information, wherein the reference direction is a direction perpendicular to the movement direction of the transmission device; and to determine at least one pixel position of the object to be measured and a second candidate category corresponding to each pixel position based on the target X-ray image;
[0143] The processing module 73 is used to determine the reference pixel position corresponding to the object to be measured on the target X-ray image based on the target position and the measurement height; select the second candidate category corresponding to the reference pixel position from the second candidate categories corresponding to the at least one pixel position; and determine the target category corresponding to the object to be measured based on the first candidate category and the second candidate category corresponding to the reference pixel position.
[0144] Exemplarily, the device is applied to a detection device, which includes the X-ray detector and the terahertz antenna; in the movement direction of the transmission device, if the terahertz antenna is located in front of the X-ray detector, the difference between the acquisition time of the target X-ray image and the acquisition time of the target terahertz information is a preset time length; or, if the X-ray detector is located in front of the terahertz antenna, the difference between the acquisition time of the target terahertz information and the acquisition time of the target X-ray image is a preset time length; wherein the preset time length is determined based on the distance between the terahertz antenna and the X-ray detector, and the movement speed of the transmission device, and the movement speed is a fixed value.
[0145] Exemplarily, the determination module 72 is specifically used to determine the target position of the object to be measured in the reference direction, the measured height of the object to be measured and the first candidate type of the object to be measured based on the target terahertz information: if the target terahertz information includes a transmit and receive delay, then determine the first distance between the terahertz antenna and the object to be measured based on the transmit and receive delay; determine the measured height of the object to be measured based on the difference between a configured second distance and the first distance; wherein the transmit and receive delay represents the time length from the terahertz antenna sending a signal to receiving a signal, and the second distance represents the distance between the terahertz antenna and a transmission device; determine the target position based on the position of the terahertz antenna in the reference direction; if the target terahertz information includes a target signal feature, then query the configured first mapping table through the target signal feature to obtain the first candidate type corresponding to the target signal feature; wherein the first mapping table includes a mapping relationship between signal features and candidate types.
[0146] Exemplarily, when the determination module 72 determines at least one pixel position of the object to be detected and the second candidate category corresponding to each pixel position based on the target X-ray image, it is specifically used to: determine at least one pixel position corresponding to the object to be detected on the target X-ray image;
[0147] For each pixel position, determine the target color value of the pixel position based on the target X-ray image; query a configured second mapping table based on the target color value, and determine the candidate category corresponding to the target color value as the second candidate category corresponding to the pixel position; wherein the second mapping table includes a mapping relationship between color values and candidate categories; or,
[0148] For each pixel position, the atomic number of the pixel position is determined based on the target X-ray image, and the second candidate category corresponding to the pixel position is determined based on the atomic number.
[0149] Exemplarily, when the processing module 73 determines the reference pixel position corresponding to the object to be measured on the target X-ray image based on the target position and the measured height, it is specifically used to: substitute the target position and the measured height into a spatial position conversion function to obtain the reference pixel position corresponding to the target position and the measured height; the spatial position conversion function includes y=a*x+b*h+c; x represents the target position, h represents the measured height, and y represents the reference pixel position; a, b, and c are acquired parameter values.
[0150] Exemplarily, when the processing module 73 determines the target type corresponding to the object to be tested based on the first candidate type and the second candidate type corresponding to the reference pixel position, it is specifically used to: if the first candidate type includes at least one candidate type and the second candidate type includes at least one candidate type, then determine the intersection of the first candidate type and the second candidate type, and determine the target type corresponding to the object to be tested based on the intersection of the first candidate type and the second candidate type.
[0151] Exemplarily, the processing module 73 is also used to determine the target type corresponding to the object to be tested based on the first candidate type and the second candidate type corresponding to the reference pixel position, and then determine the pixel position to be optimized corresponding to the target position in the target X-ray image based on the mapping relationship between the spatial position in the world coordinate system and the pixel position in the image coordinate system, modify the color value of the pixel position to be optimized to the first color value corresponding to the target type, and modify the color value of the reference pixel position to the second color value, so as to obtain an optimized X-ray image.
[0152] Exemplarily, the processing module 73 is also used to determine the first candidate type as the target type corresponding to the object to be measured if the first candidate type of the object to be measured is determined based on the target terahertz information and the second candidate type of the object to be measured is not determined based on the target X-ray image; obtain a first color value corresponding to the target type, and adjust the color value of the reference pixel position of the target X-ray image based on the color value.
[0153] Based on the same application concept as the above method, a detection device is proposed in the embodiment of the present application, the detection device includes an X-ray detector and a terahertz antenna, at least one object to be detected is placed on a transmission device, during the movement of the transmission device, the X-ray detector is used to collect X-ray images of the object to be detected, and the terahertz antenna is used to collect terahertz information of the object to be detected. Figure 8 As shown, the detection device also includes: a processor 81 and a machine-readable storage medium 82, wherein the machine-readable storage medium 82 stores machine-executable instructions that can be executed by the processor 81; the processor 81 is used to execute the machine-executable instructions to implement the type detection method disclosed in the above example of this application.
[0154] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the type detection method disclosed in the above example of the present application can be implemented.
[0155] The above-mentioned machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device, which may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.
[0156] An embodiment of the present application further provides a computer program product, including a computer program. When the computer program is executed by a processor, the type detection method disclosed in the above example of the present application can be implemented.
[0157] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0158] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A species detection method, It is characterized in that At least one object to be measured is placed on a transmission device. During the movement of the transmission device, an X-ray detector is used to collect an X-ray image of the object to be measured, and a terahertz antenna is used to collect terahertz information of the object to be measured. The method includes: Acquire associated target X-ray images and target terahertz information, wherein the difference between the acquisition time of the target terahertz information and the acquisition time of the target X-ray image is a preset time length; Determining a target position of the object to be measured in a reference direction, a measurement height of the object to be measured, and a first candidate category based on the target terahertz information, wherein the reference direction is a direction perpendicular to a moving direction of the transmission device; Determine at least one pixel position of the object to be detected and a second candidate category corresponding to each pixel position based on the target X-ray image; Based on the target position and the measurement height, determine the reference pixel position corresponding to the object to be measured on the target X-ray image; select the second candidate category corresponding to the reference pixel position from the second candidate categories corresponding to the at least one pixel position; based on the first candidate category and the second candidate category corresponding to the reference pixel position, determine the target category corresponding to the object to be measured.
2. The method according to claim 1, It is characterized in that The method is applied to a detection device, wherein the detection device comprises the X-ray detector and the terahertz antenna; In the moving direction of the transmission device, if the terahertz antenna is located in front of the X-ray detector, the difference between the acquisition time of the target X-ray image and the acquisition time of the target terahertz information is a preset time length; Alternatively, if the X-ray detector is located in front of the terahertz antenna, the difference between the acquisition time of the target terahertz information and the acquisition time of the target X-ray image is a preset time length; The preset duration is determined based on the distance between the terahertz antenna and the X-ray detector, and the movement speed of the transmission device, and the movement speed is a fixed value.
3. The method according to claim 1, It is characterized in that The step of determining the target position of the object to be measured in the reference direction, the measurement height of the object to be measured, and the first candidate category based on the target terahertz information includes: If the target terahertz information includes a transceiver delay, a first distance between the terahertz antenna and the object to be measured is determined based on the transceiver delay; and a measured height of the object to be measured is determined based on a difference between a configured second distance and the first distance; wherein the transceiver delay represents the time length from when the terahertz antenna sends a signal to when it receives a signal, and the second distance represents the distance between the terahertz antenna and a transmission device; Determine the target position based on the position of the terahertz antenna in the reference direction; If the target terahertz information includes a target signal feature, a configured first mapping table is queried through the target signal feature to obtain a first candidate category corresponding to the target signal feature; wherein the first mapping table includes a mapping relationship between signal features and candidate categories.
4. The method according to claim 1, It is characterized in that Determining at least one pixel position of the object to be detected and a second candidate category corresponding to each pixel position based on the target X-ray image, comprising: Determine at least one pixel position corresponding to the object to be detected on the target X-ray image; For each pixel position, determine the target color value of the pixel position based on the target X-ray image; query a configured second mapping table based on the target color value, and determine the candidate category corresponding to the target color value as the second candidate category corresponding to the pixel position; wherein the second mapping table includes a mapping relationship between color values and candidate categories; or, For each pixel position, the atomic number of the pixel position is determined based on the target X-ray image, and the second candidate category corresponding to the pixel position is determined based on the atomic number.
5. The method according to claim 1, It is characterized in that Determining a reference pixel position corresponding to the object to be measured on the target X-ray image based on the target position and the measurement height includes: Substituting the target position and the measured height into a configured spatial position conversion function to obtain the reference pixel position corresponding to the target position and the measured height; The spatial position conversion function includes y=a*x+b*h+c; x represents the target position, h represents the measurement height, y represents the reference pixel position; a, b, c are the acquired parameter values.
6. The method according to claim 1, It is characterized in that The determining the target category corresponding to the object to be detected based on the first candidate category and the second candidate category corresponding to the reference pixel position includes: If the first candidate category includes at least one candidate category and the second candidate category includes at least one candidate category, an intersection of the first candidate category and the second candidate category is determined, and a target category corresponding to the object to be detected is determined based on the intersection.
7. The method according to claim 1, It is characterized in that After determining the target type corresponding to the object to be detected based on the first candidate type and the second candidate type corresponding to the reference pixel position, the method further includes: Based on the mapping relationship between the spatial position in the world coordinate system and the pixel position in the image coordinate system, the pixel position to be optimized corresponding to the target position in the target X-ray image is determined, the color value of the pixel position to be optimized is modified to the first color value corresponding to the target type, and the color value of the reference pixel position is modified to the second color value to obtain an optimized X-ray image.
8. The method according to claim 1, It is characterized in that The method further comprises: If a first candidate type of the object to be measured is determined based on the target terahertz information, and a second candidate type of the object to be measured is not determined based on the target X-ray image, determining the first candidate type as the target type corresponding to the object to be measured; A first color value corresponding to the target type is acquired, and a color value of the reference pixel position of the target X-ray image is adjusted based on the first color value.
9. A species detection device, It is characterized in that At least one object to be measured is placed on the transmission device. During the movement of the transmission device, the X-ray detector is used to collect X-ray images of the object to be measured, and the terahertz antenna is used to collect terahertz information of the object to be measured. The device includes: An acquisition module, used to acquire associated target X-ray images and target terahertz information, wherein the difference between the acquisition time of the target terahertz information and the acquisition time of the target X-ray image is a preset time length; a determination module, configured to determine a target position of the object to be measured in a reference direction, a measurement height of the object to be measured, and a first candidate category of the object to be measured based on the target terahertz information, wherein the reference direction is a direction perpendicular to the movement direction of the transmission device; and to determine at least one pixel position of the object to be measured and a second candidate category corresponding to each pixel position based on the target X-ray image; A processing module is used to determine the reference pixel position corresponding to the object to be measured on the target X-ray image based on the target position and the measurement height; select the second candidate category corresponding to the reference pixel position from the second candidate categories corresponding to the at least one pixel position; and determine the target category corresponding to the object to be measured based on the first candidate category and the second candidate category corresponding to the reference pixel position.
10. A detection device, It is characterized in that The detection device includes an X-ray detector and a terahertz antenna. At least one object to be detected is placed on the transmission device. During the movement of the transmission device, the X-ray detector is used to collect X-ray images of the object to be detected, and the terahertz antenna is used to collect terahertz information of the object to be detected. The detection device further includes: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; The processor is used to execute machine executable instructions to implement the method described in any one of claims 1-8.
