Image display method, device, security inspection machine, electronic device and storage medium
By detecting the accumulated width of the package image in multiple display windows and sending it to the window with the smallest accumulated width, the problem of the package scrolling rate caused by the increase in the security inspection machine is solved, and the package scrolling rate is too fast under the efficient delivery of packages is achieved. Suitable for viewing effects of a human eye.
Patent Information
- Application Number
- CN202110677791.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-18
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2041-06-18
AI Technical Summary
The increase in the package delivery rate of the security check machine leads to a fast package scrolling display rate, which loses the effect of suitable viewing by the human eye. The existing technology has not effectively solved this problem.
By obtaining the video of the package security check process, detecting the accumulated width of the package image in multiple display windows, determining the display window with the smallest accumulated width is the target display window, and sending the package image to be displayed into the window for display, controlling the scrolling display rate To suit human eyes to watch.
When the security check machine speeds to deliver bags, the scrolling display speed of the package image is reduced, so that it can maintain a speed suitable for human eyes to view, solving the problem of too fast display rate.
Smart Images

Figure CN115499622B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of video display of security inspection machines, and in particular to an image display method, device, security inspection machine, electronic device and storage 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 delivers packages at a specific rate, and the scrolling speed on the display is more suitable for human eyes to watch, for example: 0.2m / s; when the security inspection machine delivers packages at a specific rate, the image acquisition device of the security inspection machine collects a preset number of lines of data per second, and this part of the data is sent to the display memory of the display within a unit time of 1 second. When the display frame rate of the display is fixed, for example: 60 frames, at this time, the amount of data sent to the display memory for each frame is 6 lines of data; the security inspection machine uses the above-mentioned specific package delivery rate to perform package security inspection, the security inspection efficiency of the security inspection machine is low, the waiting time in queues is long, and the channel is blocked; at the same time, in the related art, the security inspection efficiency is improved by increasing the package delivery rate of the security inspection machine, but the increase in the package delivery rate of the security inspection machine increases the amount of line data collected by the image acquisition device of the security inspection machine per unit time, and the amount of data sent to the display memory for each frame also increases, and the corresponding scrolling rate of the package in the display during the security inspection process increases accordingly, which is not suitable for human eyes to watch.
[0004] With regard to the problem in the related art that the speed of package delivery by security inspection machines increases, resulting in a fast scrolling display speed of packages that is not suitable for human eyes to watch, no effective solution has been proposed so far. Summary of the invention
[0005] In this embodiment, an image display method, device, security inspection machine, electronic device and storage medium are provided to solve the problem in the related art that the security inspection rate of the security inspection machine increases, causing the package rolling rate to be slow and unsuitable for human eyes to watch.
[0006] In a first aspect, the present embodiment provides an image display method, comprising: acquiring a video of a package security inspection process, and acquiring a package image to be displayed in the video; when the package image to be displayed is acquired, detecting the cumulative width of the package images displayed in each of the display windows at a current moment in multiple display windows; determining a display window with the smallest cumulative width among the multiple display windows as a target display window, and sending the package image to be displayed to the target display window for display.
[0007] In some embodiments, the package image includes an image width, and detecting the cumulative width of the package images displayed in each of the display windows at a current moment in the multiple display windows includes: detecting the package image displayed at a current moment in the multiple display windows; when the displayed package image is detected, determining whether all the package images displayed in the corresponding display window are completely displayed; when it is determined that all the package images in the corresponding display window are completely displayed, accumulating the image widths corresponding to all the displayed package images to obtain a first display width; and determining that the cumulative width includes the first display width.
[0008] In some of the embodiments, when it is determined that the package image is not fully displayed in the corresponding display window, the image display method includes: detecting the package image that has been fully displayed in the corresponding display window; calculating a second display width according to the image width corresponding to the fully displayed package image; detecting a third display width of the package image that has been displayed but is not fully displayed in the corresponding display window; and determining that the cumulative width of the package image displayed in the corresponding display window includes the sum of the second display width and the third display width.
[0009] In some of the embodiments, determining the display window with the smallest cumulative width among the multiple display windows as the target display window includes: obtaining the cumulative width corresponding to the corresponding display window; selecting the first display window with the smallest cumulative width from the multiple display windows, and determining that the target display window includes the first display window.
[0010] In some of the embodiments, selecting the first display window with the smallest cumulative width from the multiple display windows includes: traversing the multiple display windows to obtain the multiple cumulative widths corresponding to the multiple display windows; selecting the cumulative width with the smallest width value from the multiple cumulative widths, and determining that the first display window includes the display window corresponding to the cumulative width with the smallest width value.
[0011] In some of the embodiments, when the package image is not detected in the corresponding display window, determining the display window with the smallest cumulative width among the multiple display windows as the target display window includes: selecting at least one second display window in which the package image is not detected from the multiple display windows, and determining that the target display window includes one of the at least one second display window.
[0012] In some embodiments, obtaining the package image to be displayed in the video includes: processing the video using a preset video segmentation network model to obtain the package image to be displayed, wherein the video segmentation network model is an artificial neural network trained based on a preset package security inspection video and a measured package image corresponding to the preset package security inspection video.
[0013] In some of the embodiments, the target display window is provided with a corresponding scrolling display rate, and sending the package image to be displayed into the target display window for display includes: acquiring the scrolling display rate, and scrolling the package image to be displayed at the scrolling display rate.
[0014] In a second aspect, the present embodiment provides an image display device, comprising: an acquisition module, used to acquire a video of a package security inspection process, and acquire a package image to be displayed in the video; a detection module, used to detect, in a case where the package image to be displayed is acquired, the cumulative width of the package images displayed in each of the display windows at a current moment in multiple display windows; and a processing module, used to determine a display window with the smallest cumulative width among the multiple display windows as a target display window, and send the package image to be displayed to the target display window for display.
[0015] In a third aspect, the present 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 video of the security inspection process corresponding to the package; the transmission device is used to transmit the video to the display device; the display device is used to execute the image display method described in the first aspect.
[0016] 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 the processor implements the image display method described in the first aspect when executing the computer program.
[0017] 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 image display method described in the first aspect is implemented.
[0018] Compared with the related art, the image display method, device, security inspection machine, electronic device and storage medium provided in the present embodiment obtain a video of the package security inspection process to obtain the package image to be displayed in the video; when the package image to be displayed is obtained, the cumulative width of the package image displayed in each display window at the current moment is detected in multiple display windows; the display window with the smallest cumulative width among the multiple display windows is determined as the target display window, and the package image to be displayed is sent to the target display window for display, thereby solving the problem that the package delivery rate of the security inspection machine increases, resulting in a fast scrolling display rate of the package that is not suitable for human eyes to watch, and achieving the beneficial effect of reducing the scrolling display speed of the package image when the package delivery speed of the security inspection machine increases.
[0019] 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
[0020] 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:
[0021] Figure 1 It is a hardware structure block diagram of a terminal of the image display method according to an embodiment of the present application.
[0022] Figure 2 is a flowchart of an image display method according to an embodiment of the present application.
[0023] Figure 3 It is a flowchart of an image display method according to a preferred embodiment of the present application.
[0024] Figure 4 It is a schematic diagram of the package display according to the preferred embodiment of the present application.
[0025] Figure 5 is a structural block diagram of an image display 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 technologies described in this application can be used to display images of security inspection items and control the movement rate.
[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 image display method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 The terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that the structure shown in FIG. 1 is only for illustration and does not limit the structure of the terminal. For example, the terminal may also include a processor 102 and a memory 104 for storing data. 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 image display 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-mentioned 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 an image display method, which is at least applied to a security inspection machine for package security inspection, such as an X-ray security inspection machine. Figure 2 is a flow chart of the image display method of this embodiment, such as Figure 2 As shown, the process includes the following steps:
[0033] Step S201, obtaining a video of the package security inspection process, and obtaining a package image to be displayed in the video.
[0034] In this embodiment, the security inspection machine irradiates the inspected package with an X-ray light source, and then obtains the original energy data of the scanned package through the X-ray photodiode array. The original energy data is rendered to form RGB image data, and then the data columns obtained from each scan are spliced into a video corresponding to the package security inspection process.
[0035] In this embodiment, after the corresponding video is acquired, the package appearing in the video is detected by a target detection algorithm, and then a package image corresponding to the package is acquired based on the detected package. In this embodiment, a video packet segmentation technology is adopted to segment a package image corresponding to each package from each frame of the video; the segmented package image is sent to a corresponding display window for scrolling display, wherein the segmented package image includes a package image to be currently displayed and a package image that has been displayed.
[0036] Step S202: when the package image to be displayed is acquired, the cumulative width of the package image displayed in each display window at the current moment is detected in the multiple display windows.
[0037] In this embodiment, the number of display windows is determined according to the package delivery rate of the security inspection machine and the scrolling display rate set for the display windows. The package image displayed in each display window at the current moment includes the historical package image scrolled in the corresponding display window.
[0038] In this embodiment, in order to achieve the scrolling effect of the display screen at a preset scrolling display rate, the display screen is divided into multiple display windows, and the multiple display windows divided can all be displayed at a scrolling display rate suitable for human eyes.
[0039] In this embodiment, the number of display window divisions is related to the packet delivery rate of the security inspection machine, that is, the movement rate of the conveyor belt, and the scrolling display rate of the display window. At the same time, when the packet delivery rate increases, the amount of image data collected by the security inspection machine per unit time increases, the amount of data sent to the video memory for each frame of image data increases, and the scrolling rate of the image data in the display screen increases. Through the division of the display window, the increased amount of image data is allocated to multiple display windows, and the scrolling display rate of a single display window is set to a scrolling display rate that is suitable for human eye viewing, and the scrolling display rate of the total display screen is presented as a scrolling display rate that is suitable for human eye viewing.
[0040] In this embodiment, when determining the cumulative width displayed in the corresponding display window, it is necessary to determine it according to the image widths corresponding to the package images displayed and being displayed in the display window; in this embodiment, the displayed package image includes the package image completely placed in the corresponding display window; the package image being displayed includes the package image partially placed in the corresponding display window; the cumulative width includes the cumulative sum of the total image width of all package images displayed in the corresponding display window and the image width of the package image being displayed in the display window placed in the display window. For example, it is assumed that the package images displayed in the display window A include a and b, and the image widths of a and b are W1 and W2 respectively, and the package image being displayed includes c, and the width in the display window is W3, then the cumulative width corresponding to the display window A is W1+W2+W3.
[0041] Step S203, determining the display window with the smallest cumulative width among the multiple display windows as the target display window, and sending the package image to be displayed into the target display window for display.
[0042] In this embodiment, before the package image to be displayed is sent to the corresponding target display window, the corresponding target display window needs to be determined, and the target display window is determined according to the cumulative width of the package images displayed in multiple display windows, that is, the target display window is determined according to the size of the cumulative width of the package images; in some optional embodiments, the display window with the smallest cumulative width of the package images is selected as the target display window.
[0043] In this embodiment, the package image displayed in each display window at the current moment indicates the package image that has entered the corresponding display window and the package image that is completely displayed. The package image in the display window is used to determine the cumulative display width of the corresponding display window. The most suitable display window is determined by the cumulative display width to display the package image to be displayed.
[0044] In this embodiment, the scrolling display rate corresponding to the target display window is a scrolling display rate adapted to human viewing, for example, 0.2 m / s.
[0045] In this embodiment, after the target display window is determined, the package image to be displayed is sent to the target display window, and the package image to be displayed is displayed at a set scrolling display rate.
[0046] Through the above steps S201 to S203, by acquiring a video of the package security inspection process, the package image to be displayed is acquired in the video; when the package image to be displayed is acquired, the cumulative width of the package image displayed in each display window at the current moment is detected in multiple display windows; the display window with the smallest cumulative width among the multiple display windows is determined as the target display window, and the package image to be displayed is sent to the target display window for display, thereby solving the problem that the package scrolling display speed is fast and not suitable for human eyes to watch due to the increase in the package delivery rate of the security inspection machine, and achieving the beneficial effect of reducing the scrolling display speed of the package image when the package delivery speed of the security inspection machine is increased, so as to keep the movement speed of the package image in the display at a relatively low speed suitable for human eyes to watch.
[0047] The embodiments of the present application are described and illustrated below through preferred embodiments.
[0048] In some of the embodiments, the package image includes an image width, and detecting the cumulative width of the package image displayed in each display window at the current moment in the multiple display windows is achieved by the following steps:
[0049] Step 1: Detect the package image currently displayed in multiple display windows.
[0050] In this embodiment, when no package image is detected in the display window at the current moment, it means that the corresponding display window has never displayed a package image, and this type of display window can be directly used as the target display window.
[0051] Step 2: When the displayed package images are detected, it is determined whether all displayed package images in the corresponding display window are completely displayed.
[0052] In this embodiment, when a package image is detected in the display window, a suitable target display window is determined to display the package image to be displayed by determining the accumulated display width of the package images displayed in the display window.
[0053] In this embodiment, the package images have different display widths corresponding to the volume of the packages themselves, and the package images displayed in the multiple display windows have different numbers.
[0054] Step 3: When it is determined that all package images in the corresponding display window are fully displayed, the image widths corresponding to all displayed package images are accumulated to obtain a first display width.
[0055] In this embodiment, since the display width of the package image is obtained when the corresponding package image is acquired, when the package images displayed in the display window are completely placed in the corresponding display window, the cumulative width corresponding to the display window can be directly determined, that is, the image width of each package image is accumulated.
[0056] Step 4: Determine whether the cumulative width includes the first display width.
[0057] Through the above steps, the package images currently displayed in the multiple display windows are detected; when the displayed package images are detected, it is determined whether all the package images displayed in the corresponding display window are completely displayed; when it is determined that all the package images in the corresponding display window are completely displayed, the image widths corresponding to all the displayed package images are accumulated to obtain a first display width; and the cumulative width is determined to include the first display width, so as to achieve the determination of the cumulative width of the package images displayed in the corresponding display window, and the corresponding cumulative width is determined based on the image width of the package image itself, thereby improving the accuracy of the cumulative width measurement.
[0058] In some of the embodiments, when it is determined that a package image is not fully displayed in the corresponding display window, the following steps are further implemented:
[0059] Step 1: Detect the package image that has been completely displayed in the corresponding display window.
[0060] In this embodiment, part of the package images have been completely displayed in the display window, and a package image closest to the current timestamp is partially displayed in the display window and partially to be displayed; by counting the completely displayed package images and according to the image widths corresponding to the completely displayed package images, the total display width corresponding to the completely displayed package images is determined, that is, the second display width is determined.
[0061] Step 2: Calculate a second display width according to the image width corresponding to the fully displayed package image.
[0062] In this embodiment, the second display width is calculated by accumulating the second image widths corresponding to the fully displayed package images.
[0063] Step 3: Detecting a third display width of the package image that is not completely displayed in the corresponding display window.
[0064] In this embodiment, for a partially displayed package image, the display width that has been displayed in the corresponding display window is measured and recorded as a part of the cumulative width of the display window.
[0065] Step 4: Determine that the first width of the wrapped image display in the corresponding display window includes the cumulative sum of the second display width and the third display width.
[0066] By detecting the package image that has been completely displayed in the corresponding display window in the above steps; calculating the second display width according to the second image width corresponding to the completely displayed package image; detecting the third display width of the package image that has not been completely displayed in the corresponding display window; and determining that the first width of the package image displayed in the corresponding display window includes the cumulative sum of the second display width and the third display width, the cumulative width of the package image displayed in the display window is detected.
[0067] In some of the embodiments, determining the display window with the smallest cumulative width among the multiple display windows as the target display window is achieved by the following steps:
[0068] Step 1: Get the cumulative width of the corresponding display window.
[0069] Step 2: Select a first display window with the smallest cumulative width from the multiple display windows, and determine that the target display window includes the first display window.
[0070] In this embodiment, the first display window is at least one of multiple display windows. In some optional implementations, there may be multiple display windows with the smallest cumulative width, for example, no package image has appeared in the display window, or multiple display windows with equal cumulative width.
[0071] In this embodiment, if there are multiple first display windows, any one of the multiple first display windows is selected as the target display window.
[0072] By obtaining the cumulative width corresponding to the corresponding display window in the above steps; selecting the first display window with the smallest cumulative width from multiple display windows, and determining that the target display window includes the first display window, the target display window is determined according to the size of the cumulative width.
[0073] In some of the embodiments, selecting the first display window with the smallest cumulative width from the multiple display windows is achieved by the following steps:
[0074] Step 1: traverse multiple display windows to obtain multiple cumulative widths corresponding to the multiple display windows.
[0075] Step 2: Select a cumulative width with the smallest width value from the multiple cumulative widths, and determine that the first display window includes the display window corresponding to the cumulative width with the smallest width value.
[0076] Through the above steps, the display window with the smallest cumulative width is selected.
[0077] In some of the embodiments, when no package image is detected in the corresponding display window, determining a display window with the smallest cumulative width among multiple display windows as a target display window is achieved by the following steps: selecting at least one second display window in which no package image is detected from the multiple display windows, and determining that the target display window includes one of the at least one second display windows.
[0078] In this embodiment, the second display window is at least one of the multiple display windows.
[0079] In some of the embodiments, the target display window is provided with a corresponding scrolling display rate, and sending the package image to be displayed into the target display window for display is implemented by the following steps: obtaining the scrolling display rate, and scrolling the package image to be displayed according to the scrolling display rate.
[0080] In some of the embodiments, obtaining a package image to be displayed in a video is achieved by the following steps: processing the video using a preset video segmentation network model to obtain the package image to be displayed, wherein the video segmentation network model is an artificial neural network trained based on a preset package security inspection video and a measured package image corresponding to the preset package security inspection video.
[0081] It should be noted that, in this embodiment, the preset package inspection video used to train the video segmentation network model includes a video collected during the historical package inspection process, or a video obtained by subjecting a preset package to a machine security inspection; at the same time, the measured package image is a package image obtained through target recognition detection, or a photographed image of a preset package.
[0082] In some optional implementations, the training method of the video segmentation network model of this embodiment is obtained by training in the following manner:
[0083] Step 1: Use a single frame training image to train the feature extraction module.
[0084] The video segmentation network model includes multiple feature extraction modules, multiple recursive neural modules and multiple output modules, and the feature extraction modules, the recursive neural modules and the output modules correspond to each other one by one.
[0085] Due to the redundancy and huge number of continuous video frames, in order to avoid affecting the video segmentation results when semantic segmentation is directly performed on continuous frame training images, in the specific training process, the feature extraction module is trained using a single frame training image to determine the network weights in the feature extraction module; and, by inputting the single frame training image into the image semantic segmentation network model, the image semantic segmentation network model is supervised using the cross entropy loss function, that is, the image semantic segmentation network model is trained with the goal of minimizing the cross entropy loss function until the requirements are met; wherein, the image semantic segmentation network model is composed of a connection between a feature extraction module and an output module, and the image semantic segmentation network model can be a convolutional neural network CNN (Convolutional Neural Networks).
[0086] Step 2: Use the continuous frame training image set to train the recursive neural module.
[0087] The network weights of the feature extraction module obtained in the above are used to train the recursive neural network module using a continuous frame training image set, and the segmentation results of the continuous frame training images are supervised using a cross entropy loss function. Specifically, the network weights of the feature extraction module obtained in the above step 1 are added to the video segmentation network model, and the video segmentation network model is trained using a continuous frame training image set. The video segmentation network model is trained with the goal of minimizing the cross entropy loss function until the requirements are met, wherein the recursive neural module is a long short-term memory network LSTM (Long Short-Term Memory).
[0088] In order to make full use of the temporal information between continuous frame training image sets and to distinguish different categories of objects with the same spatial features in continuous frame training image sets, in the recursive neural module, the input of the recursive neural module of the current frame includes the output of the recursive neural module of the previous frame and the output of the feature extraction module of the current frame.
[0089] It should be noted that the feature extraction module is trained using a single-frame training image to obtain the spatial information of each frame of the training image and to determine the network weights in the feature extraction module; the recursive neural module is trained using a set of continuous frame training images to obtain the timing information of the continuous frame training images, so as to perform semantic segmentation on the video based on the acquired spatial and timing information, thereby avoiding error accumulation and improving the accuracy of video semantic segmentation.
[0090] For the feature extraction module, its last two downsampling layers are replaced by dilated convolution layers to save more information. The feature extraction module can be a residual network. The last two downsampling layers in the residual network are replaced by dilated convolution layers, and the two downsampling layers are set as dilated convolution layers with expansion coefficients of 2 and 4. The network parameters of multiple feature extraction modules are the same.
[0091] The recursive neural module is composed of two convolutional layers, namely the first convolutional layer and the second convolutional layer. The timing unit parameters between multiple recursive neural modules are the same; the input of each recursive neural module is the output of the recursive neural module of the previous time sequence and the output of the feature extraction module corresponding to the current time sequence.
[0092] For the output module, the output module includes multiple convolutional layers, followed by a BatchNorm activation layer and a Relu activation layer. The convolutional layer of the output module includes a 3×3 convolutional kernel and a 1×1 convolutional kernel. The output module is composed of a 3×3 convolutional kernel and a 1×1 convolutional kernel with the same number of channels.
[0093] Figure 3 is a flow chart of an image display method according to a preferred embodiment of the present application, such as Figure 3 As shown, the process includes the following steps:
[0094] Step S301: Obtain a video of the package security inspection process output by the security inspection machine.
[0095] Step S302: The video is passed through a video packet cutting module to separate independent packet images.
[0096] Step S303: setting the number of display windows according to the packet sending rate.
[0097] In this embodiment, in order to achieve the scrolling effect of the display screen at a preset scrolling display rate (for example: 0.2m / s), the display screen is multi-split, wherein, if the packet sending rate is s, the number of splits of the display screen is s / 0.2=n, that is, n display windows.
[0098] Step S304: Calculate the cumulative width of the package image displayed in each display window.
[0099] In this embodiment, the width of the package image output by the video packet cutting module is w, and the package image is sent to the display window for display. The display window displays the cumulative width d of the package image. 总 =d+w, where d is the width of the input display.
[0100] Step S305: Select the display window with the smallest cumulative width.
[0101] In this embodiment, when the package image to be displayed is sent to the corresponding display window for display, all display windows are traversed to select the cumulative width d 总 The smallest display window.
[0102] Step S306: Scroll and display the package image to be displayed at a preset scrolling display rate.
[0103] In this embodiment, the package image to be displayed is fed into the cumulative width d 总 The smallest display window that scrolls at a preset scroll rate.
[0104] Figure 4 is a schematic diagram of a package display according to a preferred embodiment of the present application, such as Figure 4 As shown, the display process is as follows:
[0105] At time T1, package 1 is scrolled in display window 1; when package 2 is to be displayed, the cumulative width corresponding to display window 1 is greater than the cumulative width corresponding to display window 2 (at this time, the cumulative width corresponding to display window 1 is 0); at time T2, package 2 is completely displayed in display window 2; when package 3 is to be displayed, the cumulative width corresponding to display window 1 is greater than the cumulative width corresponding to the display window (because the width of package 1 is greater than the width of package 2); at time T3, package 3 is completely displayed in display window 2.
[0106] In this embodiment, an image display device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "subunit" and the like used below can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0107] Figure 5 is a structural block diagram of an image display device according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:
[0108] An acquisition module 51 is used to acquire a video of the package security inspection process and acquire a package image to be displayed in the video;
[0109] The detection module 52 is coupled to the acquisition module 51 and is used to detect the cumulative width of the package images displayed in each display window at the current moment in the multiple display windows when the package images to be displayed are acquired;
[0110] The processing module 53 is coupled to the segmentation module 53 and is used to determine a display window with the smallest cumulative width among the multiple display windows as a target display window, and send the package image to be displayed into the target display window for display.
[0111] In some of the embodiments, the package image includes an image width, and the detection module 52 is used to detect the package image currently displayed in the multiple display windows; when the displayed package image is detected, determine whether all the displayed package images in the corresponding display window are completely displayed; when it is determined that all the package images in the corresponding display window are completely displayed, accumulate the image widths corresponding to all the displayed package images to obtain a first display width; and determine that the accumulated width includes the first display width.
[0112] In some of the embodiments, the detection module 52 is further configured to, when it is determined that a package image is not completely displayed in the corresponding display window, detect a package image that has been completely displayed in the corresponding display window; calculate a second display width according to an image width corresponding to the completely displayed package image; detect a third display width of the package image that has been displayed but is not completely displayed in the corresponding display window; and determine that the cumulative width of the package image displayed in the corresponding display window includes the cumulative sum of the second display width and the third display width.
[0113] In some of the embodiments, the processing module 53 is used to obtain the cumulative width corresponding to the corresponding display window; select a first display window with the smallest cumulative width from multiple display windows, and determine that the target display window includes the first display window.
[0114] In some of the embodiments, the processing module 53 is further used to traverse multiple display windows to obtain multiple cumulative widths corresponding to the multiple display windows; select the cumulative width with the smallest width value from the multiple cumulative widths, and determine that the first display window includes the display window corresponding to the cumulative width with the smallest width value.
[0115] In some of the embodiments, the image display device is further used to determine, when no package image is detected in the corresponding display window, a display window with the smallest cumulative width among multiple display windows as a target display window, including: selecting at least one second display window in which no package image is detected from the multiple display windows, and determining that the target display window includes one of the at least one second display window.
[0116] In some of the embodiments, the acquisition module 51 is used to process the video using a preset video segmentation network model to obtain a package image to be displayed, wherein the video segmentation network model is an artificial neural network trained based on a preset package security inspection video and a measured package image corresponding to the preset package security inspection video.
[0117] In some of the embodiments, the target display window is provided with a corresponding scrolling display rate, and the processing module 53 is further used to obtain the scrolling display rate and scroll the package image to be displayed according to the scrolling display rate.
[0118] 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.
[0119] 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;
[0120] 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 video of the security inspection process corresponding to the package;
[0121] The transmission device is used to transmit the video to the display device;
[0122] The display device is used to execute the steps in any of the above-mentioned image display method embodiments.
[0123] 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.
[0124] 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.
[0125] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0126] S1, obtaining a video of a package security inspection process, and obtaining a package image to be displayed in the video.
[0127] S2, when the package image to be displayed is acquired, detecting the cumulative width of the package image displayed in each display window at the current moment in the multiple display windows.
[0128] S3, determining a display window with the smallest cumulative width among the multiple display windows as a target display window, and sending the package image to be displayed into the target display window for display.
[0129] 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.
[0130] In addition, in combination with the image display method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the image display method. The storage medium stores a computer program, and when the computer program is executed by a processor, any image display method in the above embodiments is implemented.
[0131] 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.
[0132] 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.
[0133] 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.
[0134] 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. An image display method, characterized in that: include: Acquire a video of a package security inspection process, and acquire an image of the package to be displayed in the video; When the package image to be displayed is acquired, detecting the cumulative width of the package image displayed in each of the display windows at the current moment in the multiple display windows; Determine the display window with the smallest cumulative width among the multiple display windows as a target display window, and send the package image to be displayed into the target display window for display; The target display window is provided with a corresponding scrolling display rate suitable for human eyes to watch, and sending the package image to be displayed into the target display window for display includes: acquiring the scrolling display rate, and scrolling the package image to be displayed at the scrolling display rate.
2. The image display method according to claim 1, characterized in that: The package image includes an image width, and detecting the cumulative width of the package image displayed in each of the display windows at the current moment in the multiple display windows includes: Detecting the package image currently displayed in the plurality of display windows; In case of detecting the displayed package image, determining whether all displayed package images in the corresponding display window are completely displayed; When it is determined that all the package images in the corresponding display window are fully displayed, accumulating the image widths corresponding to all displayed package images to obtain a first display width; Determining the cumulative width includes the first display width.
3. The image display method according to claim 2, characterized in that: When it is determined that the package image is not fully displayed in the corresponding display window, the image display method includes: Detecting the package image that has been completely displayed in the corresponding display window; Calculate a second display width according to the image width corresponding to the fully displayed package image; detecting a third display width of the package image that is not completely displayed in the corresponding display window; Determining that the cumulative width of the package image displayed in the corresponding display window includes the cumulative sum of the second display width and the third display width.
4. The image display method according to claim 2, characterized in that: Determining the display window with the smallest cumulative width among the multiple display windows as the target display window comprises: Obtaining the accumulated width corresponding to the corresponding display window; A first display window with the smallest cumulative width is selected from the plurality of display windows, and it is determined that the target display window includes the first display window.
5. The image display method according to claim 4, characterized in that: Selecting the first display window with the smallest cumulative width from the plurality of display windows comprises: Traversing the plurality of display windows to obtain the plurality of accumulated widths corresponding to the plurality of display windows; The cumulative width with the smallest width value is selected from the multiple cumulative widths, and it is determined that the first display window includes the display window corresponding to the cumulative width with the smallest width value.
6. The image display method according to claim 2, characterized in that: In a case where the wrapping image is not detected in the corresponding display window, determining the display window with the smallest cumulative width among the multiple display windows as the target display window includes: selecting at least one second display window in which the wrapping image is not detected from the multiple display windows, and determining that the target display window includes one of the at least one second display window.
7. The image display method according to claim 1, characterized in that: Acquiring a package image to be displayed in the video includes: The video is processed using a preset video segmentation network model to obtain a package image to be displayed, wherein the video segmentation network model is an artificial neural network trained based on a preset package security inspection video and a measured package image corresponding to the preset package security inspection video.
8. An image display device, characterized in that: include: An acquisition module, used to acquire a video of the package security inspection process, and acquire a package image to be displayed in the video; A detection module, configured to detect, in a case where a package image to be displayed is acquired, a cumulative width of the package image displayed in each of the display windows at a current moment in the multiple display windows; A processing module, configured to determine a display window with the smallest cumulative width among the plurality of display windows as a target display window, and send the package image to be displayed into the target display window for display; The target display window is provided with a corresponding scrolling display rate suitable for human eyes to watch, the processing module obtains the scrolling display rate, and scrolls the package image to be displayed at the scrolling display rate.
9. 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 raw energy data of X-ray imaging corresponding to the package, and render the raw energy data into a video of the security inspection process corresponding to the package; The transmission device is used to transmit the video to the display device; The display device is used to execute the image display method according to any one of claims 1 to 7.
10. 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 perform the image display method according to any one of claims 1 to 7.
11. 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 image display method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and device for detecting video image
CN104834886A
Logistics information display method and related equipment and logistics information return method and related equipment
CN108694531A