Security inspection image artifact removal method, device, security inspection machine, electronic device and medium

By detecting the package in the security inspection machine and updating the bright field correction data, the problem that the bright field correction and artifacts cannot be performed when the X-ray of the security inspection machine is continuously turned on, and the effect of eliminating artifacts is achieved.

CN113781327BActive Publication Date: 2025-04-25ZHEJIANG HUASHI INTELLIGENT INSPECTION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110923132.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-12
Publication Date
2025-04-25
Estimated Expiration
2041-08-12

AI Technical Summary

Technical Problem

When the X-ray is continuously turned on, the security inspection machine cannot perform bright field correction, resulting in artifact problems.

Method used

By obtaining the security image to be displayed, the package is detected and the detection results are determined, including areas without the package in the security image. The scanning line diagram corresponding to the area is detected from the corresponding first scanning line diagram data, the bright field correction data is updated based on the scanning line diagram, the second scanning line diagram data is generated, and the package image generated from the data is displayed.

Benefits of technology

The artifacts caused by ray source attenuation or belt offset are eliminated, and the bright field correction is achieved by determining whether there is a package and the location of the package when the X-ray of the security inspection machine is continuously turned on.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113781327B_ABST
    Figure CN113781327B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, security inspection machine, electronic device and medium for removing artifacts from security inspection images, wherein the method for removing artifacts from security inspection images comprises: obtaining a security inspection image to be displayed; detecting a package in the security inspection image and determining a corresponding detection result, wherein the detection result includes a first area in the security inspection image where there is no package; detecting a first scan line graph corresponding to the first area from the first scan line graph data corresponding to the security inspection image, and updating the bright field correction data corresponding to the first area using the first scan line graph; processing the first scan line graph data with the updated bright field correction data to generate the second scan line graph data corresponding to the security inspection image, and displaying the package image generated by the second scan line graph data. Through the present application, the problem that the security inspection machine X-ray is continuously turned on and bright field correction cannot be performed and artifacts are generated is solved, and the beneficial effect of eliminating artifacts caused by ray source attenuation or belt offset is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of security inspection machine video display, and in particular to a method and device for removing artifacts from security inspection images, a security inspection machine, an electronic device and a medium. Background Art

[0002] When the package enters the security inspection machine, it will trigger the security inspection machine to turn on the X-ray light source equipment. When the package passes through the gap emitted by the X-ray light source at a uniform speed, the different substances in the package absorb and attenuate the X-rays. The X-rays that pass through the package obtain the data of the scanned package through the photodiode array, and the obtained data is processed and converted into image data. Since only one column of data can be obtained each time scanning, the data column obtained from each subsequent scan is spliced ​​to the back of the previous image data column. It only needs to splice the data columns with uniform time intervals to obtain a two-dimensional image of the package under X-rays, and then the obtained two-dimensional package image is displayed on the monitor in a scrolling manner.

[0003] In the related art, the security inspection machine needs to keep the X-ray on all the time in two usage scenarios. One is when there is a large flow of people, such as at a train station during the Spring Festival, the X-ray of the security inspection machine needs to be turned on all the time. The other is when forced scanning is turned on (forcibly turning on the X-ray all the time). In the above two usage scenarios, during the period from when the radiation source is turned on to when it is working stably, the X-ray dose will change as the temperature of the device changes. When the radiation dose changes and bright field correction cannot be performed, artifact problems will occur. At the same time, during the continuous bag passing process of the security inspection machine, the deviation of the belt will also cause artifacts in the imaged image.

[0004] There is currently no effective solution to the problem that the X-ray of the security inspection machine is continuously turned on, bright field correction cannot be performed, and artifacts are generated. Summary of the invention

[0005] In this embodiment, a method, device, security inspection machine, electronic device and medium are provided to solve the problem in the related art that the X-ray of the security inspection machine is continuously turned on, bright field correction cannot be performed and artifacts are generated.

[0006] In a first aspect, the present embodiment provides a method for removing artifacts from security inspection images, which is applied to a security inspection machine, and the method for removing artifacts from security inspection images comprises: obtaining a security inspection image to be displayed, wherein the security inspection image is obtained by the security inspection machine continuously scanning a package transmitted into the security inspection machine; detecting the package in the security inspection image and determining a corresponding detection result, wherein the detection result includes a first area in the security inspection image where there is no package; detecting a first scan line graph corresponding to the first area from first scan line graph data corresponding to the security inspection image, and updating bright field correction data corresponding to the first area based on the first scan line graph; processing the first scan line graph data by means of the updated bright field correction data to generate second scan line graph data corresponding to the security inspection image, and displaying the package image generated by the second scan line graph data.

[0007] In some of the embodiments, detecting the package in the security inspection image and determining the corresponding detection result includes: determining position information of the package in the security inspection image when the package is detected in the security inspection image; and identifying a blank area around the package from the security inspection image based on the position information, wherein the first area includes a blank area around the package.

[0008] In some embodiments, the first area includes a blank area located around the package, and a first scan line image corresponding to the first area is detected from the first scan line image data corresponding to the security inspection image. The bright field correction data corresponding to the first area is updated based on the first scan line image, including: respectively obtaining first bright field correction data and second bright field correction data from the initial bright field correction data corresponding to the security inspection image, wherein the initial bright field correction data is the bright field correction data that has been updated before the security inspection image is obtained, and the first bright field correction data is the bright field correction data that has been updated before the security inspection image is obtained. The data is the bright field correction data corresponding to the blank area, and the second bright field correction data is the bright field correction data corresponding to the area where the package is located; from the first scan line image data, the first scan line image corresponding to the blank area is obtained, and first target bright field correction data is generated according to the first scan line image corresponding to the blank area; the first target bright field correction data is replaced with the first bright field correction data, and based on the first target bright field correction data and the second bright field correction data, the updated bright field correction data corresponding to the security inspection image is generated.

[0009] In some of the embodiments, the method further includes: when the package is not detected in the security inspection image, determining that the first area includes an area corresponding to the security inspection image.

[0010] In some embodiments, the first area includes an area corresponding to the security inspection image, and a first scan line image corresponding to the first area is detected from first scan line image data corresponding to the security inspection image. Updating the bright field correction data corresponding to the first area based on the first scan line image includes: acquiring the first scan line image data and initial bright field correction data corresponding to the security inspection image, and generating second target bright field correction data according to the first scan line image data; replacing the second target bright field correction data with the initial bright field correction data corresponding to the security inspection image, and generating updated bright field correction data corresponding to the security inspection image, wherein the updated bright field correction data corresponding to the security inspection image includes the second target bright field correction data.

[0011] In some of the embodiments, after acquiring the security inspection image to be displayed, the method further includes: calculating the difference between the current moment and the moment when the security inspection image to be displayed is acquired, and determining whether the difference is greater than a duration threshold; if it is determined that the difference is greater than the duration threshold, detecting the package in the security inspection image and determining a corresponding detection result.

[0012] In some of the embodiments, when it is determined that the difference is not greater than the duration threshold, third scan line graph data corresponding to the security inspection image is obtained, and a package image generated by the third scan line graph data is displayed, wherein the third scan line graph data is scan line graph data processed based on corresponding bright field correction data before the security inspection image to be displayed is obtained.

[0013] In some embodiments, displaying the package object generated by the second scan line image data includes: splicing multiple scan line images corresponding to the second scan line image data into the package image; segmenting the package image to generate multiple sub-package images; detecting a package in the multiple sub-package images, and when the package is detected in the multiple sub-package images, outputting the multiple sub-package images to a display device for display.

[0014] In some of the embodiments, when the package is not detected in the plurality of the sub-package images, a step of acquiring the next security inspection image to be displayed is performed.

[0015] In a second aspect, the present embodiment provides a security inspection image artifact removal device, comprising: an acquisition module, used to acquire a security inspection image to be displayed, wherein the security inspection image is obtained by a security inspection machine continuously scanning a package transmitted into the security inspection machine; an identification module, used to detect the package in the security inspection image and determine a corresponding detection result, wherein the detection result includes a first area in the security inspection image where there is no package; a detection module, used to detect a first scan line graph corresponding to the first area from first scan line graph data corresponding to the security inspection image, and update bright field correction data corresponding to the first area based on the first scan line graph; a processing module, used to process the first scan line graph data through the updated bright field correction data to generate second scan line graph data corresponding to the security inspection image, and display the package image generated by the second scan line graph data.

[0016] In a third aspect, this embodiment provides a security inspection machine, comprising: an image acquisition device, a transmission device and a display device; wherein the image acquisition device is connected to the display device via the transmission device; the image acquisition device is used to obtain the original energy data of the X-ray imaging corresponding to the package, and render the original energy data into a corresponding security inspection image using the security inspection image artifact removal method described in the first aspect; the transmission device is used to transmit the video to the display device; the display device is used to display the security inspection image.

[0017] In a fourth aspect, this embodiment provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for removing artifacts from security inspection images described in the first aspect is implemented.

[0018] In a fifth aspect, this embodiment provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the method for removing artifacts from security inspection images described in the first aspect above is implemented.

[0019] Compared with the related art, the method, device, security inspection machine, electronic device and medium for removing artifacts from security inspection images provided in the present embodiment obtain a security inspection image to be displayed, wherein the security inspection image is obtained by the security inspection machine continuously scanning a package transmitted into the security inspection machine; detect the package in the security inspection image and determine the corresponding detection result, wherein the detection result includes a first area in the security inspection image where there is no package; detect a first scan line graph corresponding to the first area from the first scan line graph data corresponding to the security inspection image, and update the bright field correction data corresponding to the first area using the first scan line graph; process the first scan line graph data using the updated bright field correction data to generate second scan line graph data corresponding to the security inspection image, and display the package image generated by the second scan line graph data, thereby solving the problem that the security inspection machine's X-ray is continuously turned on and bright field correction cannot be performed and artifacts are generated, and achieving the beneficial effect of eliminating artifacts caused by ray source attenuation or belt offset.

[0020] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0022] Figure 1 It is a hardware structure block diagram of a terminal of the security inspection image artifact removal method according to an embodiment of the present application.

[0023] Figure 2 It is a flowchart of a method for removing artifacts from security inspection images according to an embodiment of the present application.

[0024] Figure 3 It is a flow chart of a method for removing artifacts from security inspection images according to a preferred embodiment of the present application.

[0025] Figure 4 It is a structural block diagram of a security inspection image artifact removal device according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0027] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0028] The various techniques described in this application can be used for artifact removal processing of security inspection images of security inspection items.

[0029] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of the method for removing artifacts from security inspection images of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0030] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the security inspection image artifact removal method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0031] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0032] This embodiment provides a method for removing artifacts from security inspection images, which is at least applicable to a security inspection machine for package security inspection, such as an X-ray security inspection machine. Figure 2 FIG. 1 is a flow chart of the method for removing artifacts from security inspection images of this embodiment. Figure 2 As shown, the process includes the following steps:

[0033] Step S201, obtaining a security inspection image to be displayed, wherein the security inspection image is obtained by a security inspection machine continuously scanning a package transmitted into the security inspection machine.

[0034] In this embodiment, the security inspection machine uses an X-ray machine to scan the parcel on the conveyor belt of the security inspection machine, that is, the parcel that has been inspected is irradiated by an X-ray light source, and then the original energy data of the scanned parcel is obtained through the X-ray photodiode array, and then an X-ray scanning line graph is obtained, wherein each scan obtains an X-ray scanning line graph, that is, a frame of original energy data, and the pixel width of the X-ray scanning line graph is usually 1 pixel. Since the conveyor belt carries the parcel and moves relative to the X-ray machine, the X-ray machine can continuously scan and obtain each vertical line image of the parcel, and finally obtain the security inspection image of the entire parcel.

[0035] In this embodiment, the security inspection image may be an X-ray scanning line image, or may be an image obtained by splicing a plurality of X-ray scanning line images scanned in a continuous period of time.

[0036] In this embodiment, the security inspection machine collects a preset number of lines of X-ray scanning line images each time, and repeats the collection of X-ray scanning line images within a preset time interval, and completes the subsequent artifact removal step in the form of the collected scanning line images.

[0037] In this embodiment, a dark field and bright field correction is performed before the security inspection machine is started, and the bright field correction before startup uses preset bright field correction data. After the security inspection image is acquired, that is, when the artifact removal method steps of the present application are implemented, the bright field correction data generated after real-time updating based on the preset bright field correction data is used to perform corresponding bright field correction on the security inspection image, thereby completing the artifact removal processing of the security inspection image.

[0038] In this embodiment, after obtaining a security inspection image, the time when the security inspection image is obtained is verified to determine whether it is a security inspection image for which bright field correction processing is to be performed. After determining that it is a security inspection image that needs bright field correction processing, the timing of performing bright field correction processing on the image is started. Through timing, when the corresponding security inspection image is obtained when the security inspection machine obtains the corresponding security inspection image next time, it is determined whether the bright field correction is completed through the timing duration.

[0039] Step S202, detecting a package in the security inspection image, and determining a corresponding detection result, wherein the detection result includes a first area in the security inspection image where no package is present.

[0040] In this embodiment, the source of the bright field correction data is determined by detecting whether there is a package in the security inspection image and judging the position of the package; in this embodiment, the first area without a package in the security inspection image may be the blank area at both ends of the package, or the area included in the entire security inspection image.

[0041] In this embodiment, the security inspection image for package inspection is the security inspection image corresponding to the current moment; in this embodiment, since the security inspection image can be an X-ray scan line graph or an X-ray scan line graph in multiple continuous times, the original energy data of the current frame can be used for package inspection, or multiple frames of original energy data of the current time period corresponding to the current moment.

[0042] Step S203: Detecting a first scan line graph corresponding to the first area from the first scan line graph data corresponding to the security inspection image, and updating the bright field correction data corresponding to the first area using the first scan line graph.

[0043] In this embodiment, after the first area is determined, the first scan line image corresponding to the first area is obtained from the first scan line image data of the security inspection image to be displayed. For example, when the first area corresponds to the area corresponding to the entire security inspection image, all the first scan line images in the first scan line image data corresponding to the security inspection image to be displayed are obtained; when the first area is the blank area corresponding to the two ends of the package, the first scan line image corresponding to the position of the blank area is obtained.

[0044] In this embodiment, after detecting the first scan line image corresponding to the first area, the corresponding first scan line image is used as new bright field correction data to update the bright field correction data originally corresponding to the security inspection image, that is, the corresponding first scan line image is used as the bright field correction data corresponding to the security inspection image at the current moment.

[0045] Step S204, processing the first scan line graph data by using the updated bright field correction data to generate second scan line graph data corresponding to the security inspection image, and displaying the package image generated by the second scan line graph data.

[0046] In this embodiment, when the X-ray is continuously turned on, bright field correction data from different sources are obtained by judging whether there is a package, and based on the corresponding bright field correction data obtained, bright field correction is performed on the first scanning line image data corresponding to the current security inspection image. The scanning line image data after bright field correction, that is, the second scanning line image data, is processed by a preset data processing method to generate a corresponding package image and perform corresponding display processing.

[0047] In this embodiment, after the corresponding package image is generated according to the second scan line image data, a video packet cutting and segmentation technology is used to segment an image of a preset specification from the generated corresponding image, and then, based on the judgment of whether the image of the preset specification contains a package, the corresponding package image is sent to the display device for display.

[0048] It should be noted that in the examples of the present application, the correction processing of the scan line image data of the security inspection image is described based on the bright field, but in the application scenarios and specific security inspection image display processing corresponding to the embodiments of the present application, the correction of the scan line image data also needs to involve the correction of the dark field, but in the embodiments of the present application, the data processing corresponding to the dark field correction is not elaborated in detail.

[0049] Through the above steps S201 to S204, by acquiring a security inspection image to be displayed; detecting a package in the security inspection image, and determining a corresponding detection result, wherein the detection result includes a first area in the security inspection image where there is no package; detecting a first scan line graph corresponding to the first area from the first scan line graph data corresponding to the security inspection image, and using the first scan line graph to update the bright field correction data corresponding to the first area; processing the first scan line graph data by the updated bright field correction data to generate second scan line graph data corresponding to the security inspection image, and displaying the package image generated by the second scan line graph data, the problem that the X-ray of the security inspection machine is continuously turned on and bright field correction cannot be performed and artifacts are generated is solved, and the beneficial effect of eliminating artifacts caused by ray source attenuation or belt deviation by judging whether there is a package and the package position and then performing bright field correction is achieved when the X-ray of the security inspection machine is continuously turned on.

[0050] The embodiments of the present application are described and illustrated below through preferred embodiments.

[0051] In some of the embodiments, detecting a package in a security inspection image and determining a corresponding detection result are achieved by the following steps:

[0052] Step 1: When a package is detected in a security inspection image, determine the location information of the package in the security inspection image.

[0053] Step 2: According to the position information, a blank area around the package is identified from the security inspection image, wherein the first area includes the blank area around the package.

[0054] In this embodiment, when a package is detected in a security inspection image, the package position is detected at the same time; in a specific embodiment, when the security inspection image includes an X-ray scanning line image, if a package is detected, blank areas at both ends of the package in the X-ray scanning line image where there is no package are identified, and the original energy data corresponding to the blank areas are generated as bright field correction data, and the bright field correction data originally corresponding to the blank areas are replaced according to the generated bright field correction data; when the security inspection image includes multiple X-ray scanning line images, if a package is detected, and the package appears close to the package, the blank areas corresponding to both ends of each X-ray scanning line image are identified, and the original energy data corresponding to each blank area are generated as bright field correction data of each X-ray scanning line image, and the original bright field correction data corresponding to the blank area in each X-ray scanning line image is replaced, that is, the scanning line image (original energy data) in the first scanning line image corresponding to the blank area is used as the corresponding bright field correction data, and the corresponding bright field correction data is used to replace the original bright field correction data at the corresponding position, and the bright field correction of the corresponding position is performed based on the new bright field correction data.

[0055] In the above steps, when a package is detected in the security inspection image, the position information of the package in the security inspection image is determined; based on the position information, a blank area located around the package is identified from the security inspection image, wherein the first area includes the blank area located around the package, thereby determining the selection standard corresponding to the selected bright field correction data based on whether there is a package in the security inspection image and based on the position of the package, that is, determining the first area corresponding to the selected bright field correction data.

[0056] In some embodiments, the first area includes a blank area located around the package, and a first scan line image corresponding to the first area is detected from the first scan line image data corresponding to the security inspection image, and the bright field correction data corresponding to the first area is updated by using the first scan line image. The following steps are implemented:

[0057] Step 1: From the initial bright field correction data corresponding to the security inspection image, first bright field correction data and second bright field correction data are obtained respectively, wherein the initial bright field correction data is the bright field correction data that has been updated before the security inspection image is obtained, the first bright field correction data is the bright field correction data corresponding to the blank area, and the second bright field correction data is the bright field correction data corresponding to the area where the package is located.

[0058] In this embodiment, the first area is first determined, and then the corresponding source of bright field correction data is determined. The bright field correction data is used to update the original bright field correction data in the first area. Before updating the corresponding bright field correction data, it is necessary to determine the bright field correction data to be updated corresponding to the first area in the security inspection image, that is, the first bright field correction data, and determine the existing bright field correction data corresponding to the area where the package is located in the security inspection image, that is, the second bright field correction data. The second bright field correction data is the bright field correction data that does not need to be updated.

[0059] Step 2: Acquire a first scan line graph corresponding to the blank area, and generate first target bright field correction data according to the first scan line graph corresponding to the blank area.

[0060] In this embodiment, after determining the bright field correction data that needs to be updated and does not need to be updated according to the position corresponding to the first area, the corresponding first scan line image is obtained from the first scan line image data of the current security inspection image (the scan line image data that has not undergone this bright field correction) according to the position corresponding to the first area, and the corresponding first target bright field correction data is generated according to the obtained first scan line image. The first target bright field correction data is used to update the bright field correction data that needs to be updated, that is, to update the first bright field correction data; in this embodiment, the first target bright field correction data can be based on a preset data processing method to process the corresponding first scan line image into the first target bright field correction data, and can also be directly using the corresponding first scan line image as the first target bright field correction data.

[0061] Step 3: Replace the first target bright field correction data with the first bright field correction data, and generate updated bright field correction data corresponding to the security inspection image based on the first target bright field correction data and the second bright field correction data.

[0062] In this embodiment, after the bright field correction data in the position area corresponding to the first area is updated, the updated bright field correction data is used as a part of the bright field correction data for performing bright field correction on the current security inspection image, and combined with the second bright field correction data that does not need to be updated, to generate bright field correction data for performing bright field correction on the current security inspection image, and bright field correction is performed on the current security inspection image based on the bright field correction data for performing bright field correction on the current security inspection image.

[0063] Through the above steps, the first bright field correction data and the second bright field correction data are respectively obtained from the initial bright field correction data corresponding to the security inspection image; the first scan line image corresponding to the blank area is obtained, and the first target bright field correction data is generated according to the first scan line image corresponding to the blank area; the first target bright field correction data is replaced with the first bright field correction data, and based on the first target bright field correction data and the second bright field correction data, the updated bright field correction data corresponding to the security inspection image is generated, thereby realizing the updating of the bright field correction data of the package in the security inspection image and the bright field correction of the package.

[0064] In some of the embodiments, an image step is further implemented: when no package is detected in the security inspection image, it is determined that the first area includes the area corresponding to the security inspection image. In this embodiment, when there is no package in the security inspection image, it means that the area space included in the security inspection image corresponds to the first area; in a specific embodiment, when the security inspection image includes an X-ray scanning line image, the original energy data corresponding to the X-ray scanning line image is generated as bright field correction data, and the original bright field correction data of the current security inspection image is replaced according to the generated bright field correction data; when the security inspection image includes multiple X-ray scanning line images, the bright field correction data corresponding to each X-ray scanning line image is generated according to the original energy data corresponding to each X-ray scanning line image, and the generated bright field correction data is replaced with the original bright field correction data in each X-ray scanning line image.

[0065] In the above step, when no package is detected in the security inspection image, it is determined that the first area includes the area corresponding to the security inspection image, and the selection of bright field correction data in the absence of a package is achieved by determining the corresponding first area.

[0066] In some embodiments, the first area includes an area corresponding to the security inspection image, and a first scan line image corresponding to the first area is detected from the first scan line image data corresponding to the security inspection image, and the bright field correction data corresponding to the first area is updated based on the first scan line image by the following steps:

[0067] Step 1: Acquire the initial bright field correction data corresponding to the first scan line image data and the security inspection image, and generate the second target bright field correction data according to the first scan line image data.

[0068] In this embodiment, the second target bright field correction data can be based on a preset data processing method, processing all the first scanning line images corresponding to the security inspection image into the second target bright field correction data, or directly using all the first scanning line images corresponding to the security inspection image as the first target bright field correction data.

[0069] Step 2: Replace the second target bright field correction data with the initial bright field correction data corresponding to the security inspection image to generate updated bright field correction data corresponding to the security inspection image, wherein the updated bright field correction data corresponding to the security inspection image includes the second target bright field correction data.

[0070] In this embodiment, when the second target bright field correction data and the initial bright field correction data corresponding to the security inspection image are replaced to generate updated bright field correction data corresponding to the security inspection image, the corresponding timer for recording the start after the security inspection image is acquired will be reset.

[0071] By acquiring the first scan line image data and the initial bright field correction data corresponding to the security inspection image in the above steps, the second target bright field correction data is generated according to the first scan line image data; the second target bright field correction data and the initial bright field correction data corresponding to the security inspection image are replaced to generate updated bright field correction data corresponding to the security inspection image, wherein the updated bright field correction data corresponding to the security inspection image includes the second target bright field correction data, thereby realizing the update of the bright field correction data without a package in the security inspection image and the bright field correction with a package.

[0072] In some of the embodiments, after obtaining the security inspection image to be displayed, the following steps are further performed:

[0073] Step 1: Calculate the difference between the current time and the time when the security inspection image to be displayed is obtained, and determine whether the difference is greater than the duration threshold.

[0074] Step 2: When it is determined that the difference is greater than the duration threshold, the package is detected in the security inspection image and a corresponding detection result is determined.

[0075] In this embodiment, when it is detected that the time for acquiring the security inspection image to be displayed does not exceed the preset acquisition time interval, that is, the difference is not greater than the duration threshold, it indicates that the currently acquired security inspection image does not need to be corrected by bright field; in this embodiment, no need to perform bright field correction means that at the current moment, the security inspection image is still in; when it exceeds the preset acquisition time interval, it indicates that the currently acquired security inspection image needs to be corrected by bright field.

[0076] By calculating the difference between the current moment and the moment when the security inspection image to be displayed is obtained in the above steps, it is determined whether the difference is greater than the duration threshold; when it is determined that the difference is greater than the duration threshold, the package is detected in the security inspection image, and the corresponding detection result is determined, so as to determine whether to perform bright field correction according to the time when the security inspection image is read.

[0077] In some of the embodiments, after obtaining the security inspection image to be displayed, the following steps are further performed:

[0078] Step 1: Calculate the difference between the current time and the time when the security inspection image to be displayed is obtained, and determine whether the difference is greater than the duration threshold.

[0079] Step 2: When it is determined that the difference is not greater than the duration threshold, the third scan line graph data corresponding to the security inspection image is obtained, and the package image generated by the third scan line graph data is displayed, wherein the third scan line graph data is the scan line graph data processed based on the corresponding bright field correction data before the security inspection image to be displayed is obtained.

[0080] In this embodiment, when it is detected that the time for acquiring the security inspection image to be displayed does not exceed the preset acquisition time interval, that is, the difference is not greater than the time length threshold, it indicates that the currently acquired security inspection image does not need bright field correction; when it is determined that the current security inspection image does not need bright field correction, a corresponding package image is generated according to the scan line diagram corresponding to the security inspection image, and a corresponding display is performed according to the package image according to a preset processing method.

[0081] It should be noted that, in the embodiments of the present application, the first scan line graph data and the third scan line graph data both represent scan line graphs before bright field correction is performed. At the same time, the first scan line graph data and the third scan line graph data do not represent different data. The first and third are only used to distinguish the scan line graph data in different embodiments.

[0082] By calculating the difference between the current moment and the moment when the security inspection image to be displayed is obtained in the above steps, it is determined whether the difference is greater than the duration threshold; when it is determined that the difference is not greater than the duration threshold, the third scanning line graph data corresponding to the security inspection image is obtained, and the package image generated by the third scanning line graph data is displayed, so as to determine whether to perform bright field correction according to the time when the security inspection image is read and perform corresponding security inspection image display processing.

[0083] In some of the embodiments, displaying the package object generated by the second scan line image data is achieved by the following steps:

[0084] Step 1: combine multiple scan line images corresponding to the second scan line image data into a package image.

[0085] Step 2: Slice the package image to generate multiple sub-package images.

[0086] Step 3: Detect the package in the multiple sub-package images, and when the package is detected in the multiple sub-package images, output the multiple sub-package images to a display device for display.

[0087] By combining the multiple scan line images corresponding to the second scan line image data into a package image in the above steps; segmenting the package image to generate multiple sub-package images; detecting the package in the multiple sub-package images, and outputting the multiple sub-package images to a display device for display when the package is detected in the multiple sub-package images, the generated package image is displayed.

[0088] In some of the embodiments, the following step is further implemented: when no package is detected in the plurality of sub-package images, a step of acquiring the next security inspection image to be displayed is executed.

[0089] Figure 3 is a flow chart of a method for removing artifacts from security inspection images according to a preferred embodiment of the present application. Figure 3 As shown, the process includes the following steps:

[0090] Step S301: Obtain a security inspection image corresponding to a package on a conveyor belt of a security inspection machine scanned by a security inspection machine.

[0091] In this embodiment, the security inspection image may be an X-ray scanning line image, or may be an image obtained by splicing a plurality of X-ray scanning line images scanned in a continuous period of time.

[0092] Step S302: Start forced scanning or uninterrupted continuous packet passing.

[0093] Step S303, determine whether the difference between the time of acquiring the security inspection image and the current time is greater than the duration threshold, if so, execute step S304, otherwise, execute step S307.

[0094] Step S304: Process the current security inspection image and determine whether it contains a package and the location of the package. If not, execute step S305; otherwise, execute step S306.

[0095] Step S305, updating the scan line image data corresponding to the current security inspection image to the bright field correction data corresponding to the security inspection image, and clearing the time for the bright field correction processing, and then executing step S307.

[0096] Step S306: According to the parcel position, the bright field correction data of the area without the parcel is updated based on the scan line image data corresponding to the part without the parcel in the security inspection image, and the time for the bright field correction processing is reset to zero, and then step S307 is executed.

[0097] Step S307: Generate a package image based on the scan line image data after bright field correction, and then execute step S308.

[0098] Step S308, cutting the package image, then executing step S309.

[0099] Step S309, determining whether there is a package in the cut package image, if yes, executing step S310, otherwise, executing step S301.

[0100] Step S310, outputting and displaying the image of the package after cutting.

[0101] Figure 4 is a structural block diagram of a security inspection image artifact removal device according to an embodiment of the present application, such as Figure 4 As shown, the device comprises:

[0102] An acquisition module 41 is used to acquire a security inspection image to be displayed, wherein the security inspection image is obtained by the security inspection machine continuously scanning the package transmitted into the security inspection machine;

[0103] The identification module 42 is coupled to the acquisition module 41 and is used to detect the package in the security inspection image and determine a corresponding detection result, wherein the detection result includes a first area in the security inspection image where there is no package;

[0104] The detection module 43 is coupled to the recognition module 42 and is used to detect a first scan line graph corresponding to the first area from the first scan line graph data corresponding to the security inspection image, and update the bright field correction data corresponding to the first area based on the first scan line graph;

[0105] The processing module 44 is coupled to the detection module 43 and is used to process the first scan line image data through the updated bright field correction data to generate the second scan line image data corresponding to the security inspection image, and display the package image generated by the second scan line image data.

[0106] In some of the embodiments, the identification module 42 is further used to determine the position information of the package in the security inspection image when a package is detected in the security inspection image; based on the position information, a blank area located around the package is identified from the security inspection image, wherein the first area includes the blank area located around the package.

[0107] In some of the embodiments, the first area includes a blank area located around the package, and the detection module 43 is further used to obtain first bright field correction data and second bright field correction data from the initial bright field correction data corresponding to the security inspection image, respectively, wherein the initial bright field correction data is the bright field correction data that has been updated before the security inspection image is obtained, the first bright field correction data is the bright field correction data corresponding to the blank area, and the second bright field correction data is the bright field correction data corresponding to the area where the package is located; from the first scan line image data, the first scan line image corresponding to the blank area is obtained, and the first target bright field correction data is generated according to the first scan line image corresponding to the blank area; the first target bright field correction data is replaced with the first bright field correction data, and based on the first target bright field correction data and the second bright field correction data, the updated bright field correction data corresponding to the security inspection image is generated.

[0108] In some of the embodiments, the identification module 42 is further configured to determine that the first area includes an area corresponding to the security inspection image when no package is detected in the security inspection image.

[0109] In some of the embodiments, the first area includes an area corresponding to the security inspection image, and the detection module 43 is further used to obtain the first scan line image data and the initial bright field correction data corresponding to the security inspection image, and generate second target bright field correction data according to the first scan line image data; the second target bright field correction data and the initial bright field correction data corresponding to the security inspection image are replaced to generate updated bright field correction data corresponding to the security inspection image, wherein the updated bright field correction data corresponding to the security inspection image includes the second target bright field correction data.

[0110] In some of the embodiments, after acquiring the security inspection image to be displayed, the security inspection image artifact removal device is further used to calculate the difference between the current moment and the moment when the security inspection image to be displayed is acquired, and determine whether the difference is greater than a duration threshold; when it is determined that the difference is greater than the duration threshold, a package is detected in the security inspection image to determine a corresponding detection result.

[0111] In some of the embodiments, the security inspection image artifact removal device is further used to obtain third scan line image data corresponding to the security inspection image when it is determined that the difference is not greater than the time threshold, and display the package image generated by the third scan line image data, wherein the third scan line image data is scan line image data processed based on the corresponding bright field correction data before the security inspection image to be displayed is obtained.

[0112] In some of the embodiments, the processing module 44 is further used to stitch together the multiple scan line images corresponding to the second scan line image data into a package image; segment the package image to generate multiple sub-package images; detect the package in the multiple sub-package images, and when the package is detected in the multiple sub-package images, output the multiple sub-package images to a display device for display.

[0113] In some of the embodiments, the security inspection image artifact removal device is further configured to execute the step of acquiring the next security inspection image to be displayed when no package is detected in the plurality of sub-package images.

[0114] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0115] This embodiment also provides a security inspection machine, including: an image acquisition device, a transmission device and a display device; wherein the image acquisition device is connected to the display device via the transmission device;

[0116] The image acquisition device is used to obtain the original energy data of the X-ray imaging corresponding to the package, and render the original energy data into a corresponding security inspection image using any of the above-mentioned security inspection image artifact removal methods;

[0117] The transmission device is used to transmit the video to the display device;

[0118] The display device is used to display security inspection images.

[0119] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0120] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0121] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0122] S1, obtaining a security inspection image to be displayed, wherein the security inspection image is obtained by a security inspection machine continuously scanning a package transmitted into the security inspection machine.

[0123] S2, detecting a package in the security inspection image, and determining a corresponding detection result, wherein the detection result includes a first area in the security inspection image where no package is present.

[0124] S3, detecting a first scan line graph corresponding to the first area from the first scan line graph data corresponding to the security inspection image, and updating the bright field correction data corresponding to the first area using the first scan line graph.

[0125] S4, processing the first scan line graph data by using the updated bright field correction data to generate second scan line graph data corresponding to the security inspection image, and displaying the package image generated by the second scan line graph data.

[0126] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0127] In addition, in combination with the security inspection image artifact removal method provided in the above embodiments, a storage medium can also be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any of the security inspection image artifact removal methods in the above embodiments is implemented.

[0128] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0129] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0130] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0131] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A method for removing artifacts from security inspection images, applied to security inspection machines, characterized in that: The security inspection image artifact removal method comprises: Acquire a security inspection image to be displayed, wherein the security inspection image is obtained by the security inspection machine continuously scanning a package transmitted into the security inspection machine, and the security inspection image includes one or more X-ray scanning line images, and the X-ray scanning line images are generated based on original energy data of the package scanned by the security inspection machine; Detecting the package in the security inspection image and determining a corresponding detection result, wherein the detection result includes a first area in the security inspection image where no package is present; Detecting a first scan line graph corresponding to the first area from the first scan line graph data corresponding to the security inspection image, and updating the bright field correction data corresponding to the first area based on the first scan line graph; The first scanning line graph data is processed by using the updated bright field correction data to generate second scanning line graph data corresponding to the security inspection image, and the package image generated by the second scanning line graph data is displayed.

2. The method for removing artifacts from security inspection images according to claim 1, characterized in that: Detecting the package in the security inspection image and determining a corresponding detection result includes: In the case where the package is detected in the security inspection image, determining location information of the package in the security inspection image; According to the position information, a blank area located around the package is identified from the security inspection image, wherein the first area includes the blank area located around the package.

3. The method for removing artifacts from security inspection images according to claim 2, characterized in that: The first area includes a blank area located around the package, and detecting a first scan line image corresponding to the first area from the first scan line image data corresponding to the security inspection image, and updating the bright field correction data corresponding to the first area based on the first scan line image includes: In the initial bright field correction data corresponding to the security inspection image, first bright field correction data and second bright field correction data are respectively obtained, wherein the initial bright field correction data is the bright field correction data that has been updated before the security inspection image is obtained, the first bright field correction data is the bright field correction data corresponding to the blank area, and the second bright field correction data is the bright field correction data corresponding to the area where the package is located; Acquire the first scan line image corresponding to the blank area from the first scan line image data, and generate first target bright field correction data according to the first scan line image corresponding to the blank area; The first target bright field correction data is replaced with the first bright field correction data, and updated bright field correction data corresponding to the security inspection image is generated based on the first target bright field correction data and the second bright field correction data.

4. The method for removing artifacts from security inspection images according to claim 2, characterized in that: The method further includes: when the package is not detected in the security inspection image, determining that the first area includes an area corresponding to the security inspection image.

5. The method for removing artifacts from security inspection images according to claim 4, characterized in that: The first area includes an area corresponding to the security inspection image, and detecting a first scan line graph corresponding to the first area from first scan line graph data corresponding to the security inspection image, and updating bright field correction data corresponding to the first area based on the first scan line graph includes: Acquire the first scan line image data and the initial bright field correction data corresponding to the security inspection image, and generate second target bright field correction data according to the first scan line image data; The second target bright field correction data and the initial bright field correction data corresponding to the security inspection image are replaced to generate updated bright field correction data corresponding to the security inspection image, wherein the updated bright field correction data corresponding to the security inspection image includes the second target bright field correction data.

6. The method for removing artifacts from security inspection images according to claim 1, characterized in that: After obtaining the security inspection image to be displayed, the method further includes: Calculate the difference between the current time and the time when the security inspection image to be displayed is acquired, and determine whether the difference is greater than a duration threshold; When it is determined that the difference is greater than the time threshold, the package is detected in the security inspection image and a corresponding detection result is determined.

7. The method for removing artifacts from security inspection images according to claim 6, characterized in that: When it is determined that the difference is not greater than the duration threshold, third scan line graph data corresponding to the security inspection image is obtained, and a package image generated by the third scan line graph data is displayed, wherein the third scan line graph data is scan line graph data processed based on the corresponding bright field correction data before the security inspection image to be displayed is obtained.

8. The method for removing artifacts from security inspection images according to claim 1, characterized in that: Displaying the package object generated by the second scan line image data includes: combining a plurality of scan line images corresponding to the second scan line image data into the package image; Slicing the package image to generate a plurality of package images; A package is detected in the plurality of sub-package images, and when the package is detected in the plurality of sub-package images, the plurality of sub-package images are output to a display device for display.

9. The method for removing artifacts from security inspection images according to claim 8, characterized in that: In the case that the package is not detected in the plurality of the sub-package images, a step of acquiring the next security inspection image to be displayed is performed.

10. A security inspection image artifact removal device, characterized in that: include: an acquisition module, configured to acquire a security inspection image to be displayed, wherein the security inspection image is obtained by the security inspection machine continuously scanning a package transmitted into the security inspection machine, and the security inspection image includes one or more X-ray scanning line graphs, and the X-ray scanning line graphs are generated based on original energy data of the package scanned by the security inspection machine; an identification module, configured to detect the package in the security inspection image and determine a corresponding detection result, wherein the detection result includes a first area in the security inspection image where no package is present; a detection module, configured to detect a first scan line graph corresponding to the first area from the first scan line graph data corresponding to the security inspection image, and update the bright field correction data corresponding to the first area based on the first scan line graph; The processing module is used to process the first scanning line image data by using the updated bright field correction data to generate the second scanning line image data corresponding to the security inspection image, and display the package image generated by the second scanning line image data.

11. A security inspection machine, characterized in that: include: An image acquisition device, a transmission device and a display device; wherein the image acquisition device is connected to the display device via the transmission device; The image acquisition device is used to obtain original energy data of X-ray imaging corresponding to the package, and render the original energy data into a corresponding security inspection image using the security inspection image artifact removal method according to any one of claims 1 to 9; The transmission device is used to transmit the security inspection image to the display device; The display device is used to display the security inspection image.

12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the security inspection image artifact removal method according to any one of claims 1 to 9.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for removing artifacts from security inspection images according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Deep learning-based artifact removing method and device, equipment and storage medium

    CN112258423A