Three-dimensional real-time imaging processing method for video security inspection instrument based on CPU and GPU heterogeneous platform

By adopting the three-dimensional real-time imaging processing method of CPU and GPU heterogeneous platforms in the video security inspection instrument, and using the GPU for parallel computing and asynchronous processing, the problem of low efficiency of three-dimensional imaging processing in the existing technology is solved, and efficient real-time three-dimensional imaging is achieved. deal with.

CN114943636BActive Publication Date: 2024-08-30XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210375922.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-11
Publication Date
2024-08-30
Estimated Expiration
2042-04-11

AI Technical Summary

Technical Problem

In the existing technology, video security inspection instruments based on array radar have problems in three-dimensional imaging processing such as high computational complexity, low efficiency, and inability to meet real-time processing requirements, especially in situations where the data scale is large and the frame rate is high.

Method used

Adopting a 3D real-time imaging processing method based on CPU and GPU heterogeneous platforms, the video array radar 3D BP imaging information is preloaded through the CPU host side, and the GPU device side is used for parallel computing, combined with thread binding and asynchronous processing, to reduce computing time , to achieve real-time processing.

Benefits of technology

It effectively avoids the time-consuming problem of serial processing, improves processing efficiency, realizes real-time three-dimensional imaging processing, meets the high frame rate requirements of video security inspection instruments, reduces computational time-consuming, and reduces the need for parallel processing of CPU host-side threads. efficiency loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114943636B
    Figure CN114943636B
Patent Text Reader

Abstract

The present invention relates to a three-dimensional real-time imaging processing method for a video security inspection instrument based on a CPU and GPU heterogeneous platform, comprising: preloading information of three-dimensional BP imaging of a video array radar on a CPU host end; a data receiving module on the CPU host end acquires radar echo data, stores it in a memory on the CPU host end, and thread-binds the data receiving module on the CPU host end; a GPU device end reads radar echo data from the CPU host end, a three-dimensional BP processing module on the GPU device end performs three-dimensional imaging BP processing on the radar echo data to obtain BP imaging data, and thread-binds the three-dimensional BP processing module on the GPU device end; an imagesc image generation module on the CPU host end outputs an imaging result graph according to the BP imaging data, and thread-binds the imagesc image generation module on the CPU host end. The method of the present invention avoids the problem that serial processing of array radar echo data takes a long time, and the processing efficiency is insufficient and cannot be processed in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of radar signal processing, and in particular relates to a three-dimensional real-time imaging processing method for a video security inspection instrument based on a CPU and GPU heterogeneous platform. Background Art

[0002] Security inspection is a key part of the inspection of airports, railway stations, ports, large-scale event venues, etc., and has always been highly valued. With the unprecedented development of security inspection technology in my country, the intelligentization of security inspection has been increasingly put on the agenda, and the use of more high-tech means to ensure social public safety has also become a consensus. Common human security inspection equipment such as metal security gates and handheld metal detectors have obvious shortcomings such as only being able to detect metal objects, low efficiency, and human touch invading privacy. In order to solve these problems in security inspection, video security inspection devices based on array radar back-projection 3D imaging algorithms have gained widespread attention.

[0003] The radar back-projection 3D imaging BP (Back Projection) algorithm adds a new synthetic aperture in the direction perpendicular to the 2D array radar imaging plane to perform 3D imaging. The two-dimensional array radar plane map is obtained by performing 2D matched filtering on the echo signal, and there are geometric distortions such as overlap, shadow, and telescoping, resulting in the loss of spatial 3D information. The 3D array radar imaging system can reconstruct the observed scene in 3D. In addition to the range-azimuth resolution capability, it can also determine the distribution of scattering points in the height dimension.

[0004] The serial imaging process of radar backprojection 3D imaging algorithm is as follows Figure 1 As shown in the figure, the basic serial 3D BP imaging process is divided into 3D BP imaging data preloading of video security scanner, real-time data reception of network card response function PCAP module, 3D BP imaging, and calling imagesc.dll to image the processed echo data. However, the computational complexity of the 3D BP algorithm is proportional to the imaging scale. Each radar PRF receives one frame of image data, and the number of imaging grid points of each frame of image is N×N×N. The computational complexity of the back projection imaging algorithm is close to O(N^4). The serial implementation of the radar back projection 3D imaging algorithm is difficult to apply to occasions with large data scale and high real-time requirements, and does not meet the high frame rate requirements of video security scanners. Radar imaging methods often use hardware designs based on multiple FPGAs (Field Programmable Gate Arrays) or DSPs (Digital Signal Processing). Due to the limitations of FPGA and DSP computing units, the radar echo signal processing methods designed based on FPGA and DSP architectures still have the problem of long time, which is difficult to meet the needs of video engineering. Summary of the invention

[0005] In order to solve the above problems existing in the prior art, the present invention provides a three-dimensional real-time imaging processing method for video security inspection instruments based on a CPU and GPU heterogeneous platform. The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0006] The present invention provides a three-dimensional real-time imaging processing method for a video security inspection instrument based on a CPU and GPU heterogeneous platform, comprising:

[0007] Step 1: Preload the information of the video array radar three-dimensional BP imaging to the CPU host;

[0008] Step 2: The data receiving module of the CPU host side acquires radar echo data, stores it in the memory of the CPU host side, and performs thread binding on the data receiving module of the CPU host side;

[0009] Step 3: The GPU device side reads the radar echo data from the CPU host side, the three-dimensional BP processing module of the GPU device side performs three-dimensional imaging BP processing on the radar echo data to obtain BP imaging data, and thread-binds the three-dimensional BP processing module of the GPU device side;

[0010] Step 4: the imagesc image generation module of the CPU host side outputs an imaging result image according to the BP imaging data, and performs thread binding on the imagesc image generation module of the CPU host side;

[0011] Among them, the data processing flow of video array radar three-dimensional BP imaging is realized by adopting a global identifier in each thread.

[0012] In one embodiment of the present invention, step 1 comprises:

[0013] The three-dimensional BP parameters, GPU device information and background information of the radar echo signal are loaded on the CPU host side, and the imagesc.dll generated by MATLB is pre-called to generate an empty image, and the kernel function of the GPU device side is threaded and divided into three-dimensional grids.

[0014] In one embodiment of the present invention, step 2 comprises:

[0015] Step 2.1: The data receiving module of the CPU host side uses the relevant functions in the network port response function pcap class to filter and rearrange the video array radar port data to obtain the radar echo data, and stores it in the memory of the CPU host side;

[0016] Step 2.2: thread-bind the data receiving module of the CPU host end through the relevant functions of the thread class, and the bound thread is recorded as thread1.

[0017] In one embodiment of the present invention, the related functions in the network port response function pcap class include: pcap_findalldevs function, pcap_freealldevs function, pcap_open_live function, pcap_compile function, pcap_setfilter function, pcap_loop function and packet_handler callback function.

[0018] In one embodiment of the present invention, in step 2.1, the data receiving module of the CPU host side stores the acquired radar echo data in the corresponding first data buffer module and second data buffer module in the memory of the CPU host side through ping-pong operation.

[0019] In one embodiment of the present invention, step 3 comprises:

[0020] Step 3.1: The GPU device side reads the radar echo data from the CPU host side;

[0021] Step 3.2: The three-dimensional BP processing module of the GPU device uses a kernel function to perform background verification and phase compensation on the radar echo data, construct a coordinate system of the radar and the target, calculate the position information of the radar and the target, and realize the projection of the radar and the target to obtain the BP imaging data;

[0022] Step 3.2: thread-binding the three-dimensional BP processing module on the GPU device side is performed through the related functions of the thread class, and the bound thread is recorded as thread2.

[0023] In one embodiment of the present invention, the kernel function includes kernel_SUB kernel function, kernel_EXP kernel function and kernel_3DBP kernel function, wherein:

[0024] The kernel_SUB kernel function is used to perform background verification processing on the radar echo data;

[0025] The kernel_EXP kernel function is used to perform range phase compensation on the radar echo data after background verification processing;

[0026] The kernel_3DBP kernel function is used to construct a three-dimensional coordinate system of the radar and the target, calculate the position information of the radar and the target, and realize the projection of the radar and the target to obtain the BP imaging data.

[0027] In one embodiment of the present invention, the kernel function also includes a kernel_GNR kernel function. If the radar echo data is in the form of separated real and imaginary parts, the kernel_GNR kernel function is used to combine the real and imaginary parts of the radar echo data to obtain radar echo data in the form of a complex signal.

[0028] In one embodiment of the present invention, step 4 comprises:

[0029] Step 4.1: The CPU host side obtains the BP imaging data of the GPU device side and generates an imagesc.dll file. The imagesc image generation module of the CPU host side calls the imagesc.dll file generated by MATLAB to output an imaging result image;

[0030] Step 4.2: Thread binding is performed on the imagesc image generation module on the CPU host side through the relevant functions of the thread class, and the bound thread is recorded as thread3.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] 1. The three-dimensional real-time imaging processing method of the video security inspection instrument based on the CPU and GPU heterogeneous platform of the present invention avoids the problem that the serial processing of array radar echo data takes a long time and the processing efficiency is insufficient and cannot be processed in real time;

[0033] 2. The three-dimensional real-time imaging processing method of the video security inspection instrument based on the CPU and GPU heterogeneous platform of the present invention selects the GPU device end to perform parallel calculation of three-dimensional BP imaging. For operations that are not suitable for GPU acceleration during data processing due to dependencies between data, data acceleration processing is performed through multi-threading of the CPU host end. For data processing and thread blocking that are not related to real-time processing, they are performed in the pre-loaded module as much as possible to avoid redundancy in the video array radar processing process. For the data collection module and imagesc module that cannot be implemented on the GPU, data processing is performed by binding the threads of the CPU host end, thereby reducing the efficiency loss of parallel processing of each CPU host end thread and reducing the computing time, thereby achieving real-time processing;

[0034] 3. The three-dimensional real-time imaging processing method of the video security scanner based on the CPU and GPU heterogeneous platform of the present invention divides the processing flow processed by the GPU into tasks in the radar back-projection imaging algorithm, hides the memory access delay of each thread through asynchronous processing between each thread, and processes different tasks in the real-time process in each bound thread to reduce the running time.

[0035] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a flow chart of a CPU host serially processing array radar echo data provided by an embodiment of the present invention;

[0037] Figure 2 It is a schematic diagram of a three-dimensional real-time imaging processing method of a video security inspection device based on a CPU and GPU heterogeneous platform provided by an embodiment of the present invention;

[0038] Figure 3 This is a structural connection diagram of a three-dimensional real-time imaging processing system for a video security inspection instrument based on a CPU and GPU heterogeneous platform provided by an embodiment of the present invention;

[0039] Figure 4 It is a flow chart of a three-dimensional real-time imaging processing method of a video security inspection instrument based on a CPU and GPU heterogeneous platform provided by an embodiment of the present invention;

[0040] Figure 5 is a schematic diagram of an OpenMP working model provided by an embodiment of the present invention;

[0041] Figure 6 is a schematic diagram of the relationship between GPU memory and threads provided by an embodiment of the present invention;

[0042] Figure 7a It is a thread allocation diagram of kernel functions Kernel1-Kernel3 provided in an embodiment of the present invention;

[0043] Figure 7b Schematic diagram of thread allocation of kernel function Kerne4 provided in an embodiment of the present invention;

[0044] Figure 7c It is a schematic diagram of the distance- and azimuth-prioritized storage methods corresponding to the two data structure organization methods of AoS and SoA provided in an embodiment of the present invention;

[0045] Figure 8a is a schematic diagram of radar echo data to be imaged provided by an embodiment of the present invention;

[0046] Figure 8b is an imaging result diagram obtained by using the imaging processing method of the present invention;

[0047] Fig. 9 This is the imaging result obtained by using the CPU host serial processing method. DETAILED DESCRIPTION

[0048] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following is a detailed description of a three-dimensional real-time imaging processing method for a video security inspection instrument based on a CPU and GPU heterogeneous platform proposed by the present invention, in combination with the accompanying drawings and specific implementation methods.

[0049] The above and other technical contents, features and effects of the present invention are clearly presented in the following detailed description of the specific implementation modes in conjunction with the accompanying drawings. Through the description of the specific implementation modes, the technical means and effects adopted by the present invention to achieve the predetermined purpose can be more deeply and specifically understood. However, the attached drawings are only for reference and explanation purposes and are not used to limit the technical solutions of the present invention.

[0050] Embodiment 1

[0051] Please refer to Figure 2-4 , Figure 2 It is a schematic diagram of a three-dimensional real-time imaging processing method of a video security inspection device based on a CPU and GPU heterogeneous platform provided by an embodiment of the present invention; Figure 3 This is a structural connection diagram of a three-dimensional real-time imaging processing system for a video security inspection instrument based on a CPU and GPU heterogeneous platform provided by an embodiment of the present invention; Figure 4 The flowchart of a method for processing three-dimensional real-time imaging of a video security inspection instrument based on a CPU and GPU heterogeneous platform provided by an embodiment of the present invention is as follows. As shown in the figure, the method for processing three-dimensional real-time imaging of a video security inspection instrument based on a CPU and GPU heterogeneous platform of this embodiment includes:

[0052] Step 1: Preload the information of the video array radar three-dimensional BP imaging to the CPU host;

[0053] Step 2: The data receiving module on the CPU host side obtains the radar echo data, stores it in the memory on the CPU host side, and performs thread binding on the data receiving module on the CPU host side;

[0054] Step 3: The GPU device side reads the radar echo data from the CPU host side, and the three-dimensional BP processing module on the GPU device side performs three-dimensional imaging BP processing on the radar echo data to obtain BP imaging data, and performs thread binding on the three-dimensional BP processing module on the GPU device side;

[0055] Step 4: The imagesc image generation module on the CPU host side outputs an imaging result map according to the BP imaging data, and thread-binds the imagesc image generation module on the CPU host side.

[0056] In this embodiment, the data processing flow of the video array radar three-dimensional BP imaging is implemented by using a global identifier in each thread.

[0057] The three-dimensional real-time imaging processing method of the video security scanner based on the CPU and GPU heterogeneous platform of this embodiment is applicable to the video security scanner based on the CPU and GPU heterogeneous platform. The video security scanner includes a connected CPU host end and a GPU device end. Specifically, the CPU host end includes: a video array radar data preloading module of the CPU host end, a data receiving module of the CPU host end, and an imagesc image generation module of the CPU host end; the GPU device end includes: a three-dimensional BP processing module of the GPU device end.

[0058] It should be noted that, in this embodiment, the CPU host side controls the GPU device side, and one CPU host side can read information of multiple GPU device sides. The number of GPU device sides controlled by one CPU host side depends on the number of interfaces on the CPU host side.

[0059] Each GPU device end reads radar echo data of corresponding data block size (range direction is preferentially stored) and three-dimensional BP parameters from the corresponding CPU host end in azimuth blocks according to the memory allocated to it by the corresponding CPU host end, reads the three-dimensional BP parameters from the corresponding CPU host end to the constant storage area of ​​the GPU device end, and reads the adaptive block radar echo data from the corresponding CPU host end to the global memory of the GPU device end; multiple CPU host ends control multiple GPU device ends, complete range pulse compression, parameter calculation required for BP imaging, and use interpolation to achieve upsampling of echo pulses on each GPU device end, the CPU host end distributes the parameter calculation results in the radar back-projection imaging algorithm of each CPU server and the up-sampled echo pulses to different GPU device ends, repeatedly performs projection and accumulation through the GPU device end to achieve three-dimensional BP imaging, and then uses the imagesc image generation module of the CPU host end to output the imaging result map.

[0060] Furthermore, the three-dimensional real-time imaging processing method of the video security inspection instrument based on the CPU and GPU heterogeneous platform of this embodiment is specifically described.

[0061] In this embodiment, the video array radar data preloading module of the CPU host is used to implement the information preloading of the video array radar three-dimensional BP imaging.

[0062] Specifically, step 1 includes:

[0063] The three-dimensional BP parameters, GPU device information and background information of the radar echo signal are loaded on the CPU host side, and the imagesc.dll generated by MATLB is pre-called to generate an empty image. At the same time, the kernel function of the GPU device side is threaded and divided into three-dimensional grids.

[0064] The GPU device information includes the graphics card model, device computing power, total global memory, and upper and lower limits of the device's grid block thread division.

[0065] It should be noted that the information preloading of the video array radar three-dimensional BP imaging is realized by using the video array radar data preloading module on the CPU host side. This step only needs to be executed once at the beginning of data processing, and this step will not be executed later.

[0066] In this embodiment, the background information of the radar echo signal is pre-loaded on the CPU host side, and the phase of the subsequent compensation is pre-calculated to facilitate subsequent processing; the imagesc.dll generated by MATLB is pre-called on the CPU host side to generate an empty image, which can prevent the subsequent calls from taking too long and failing to meet the video array radar processing flow; in addition, according to the amount of data in the three-dimensional BP processing module, the kernel function on the GPU device side is threaded and blocked and the three-dimensional grid is divided in advance, which can minimize the redundancy in the real-time processing of the video array radar.

[0067] Optionally, according to the performance requirements of the radar three-dimensional back-projection imaging algorithm, the radar back-projection imaging algorithm related parameters can be encapsulated into a class, and these imaging related parameters can be changed according to specific imaging requirements during subsequent use.

[0068] Furthermore, step 2 includes:

[0069] Step 2.1: The data receiving module on the CPU host uses the relevant functions in the network port response function pcap class to filter and rearrange the video array radar port data to obtain radar echo data, and stores it in the memory of the CPU host;

[0070] In this embodiment, the related functions in the network port response function pcap class include: pcap_findalldevs function, pcap_freealldevs function, pcap_open_live function, pcap_compile function, pcap_setfilter function, pcap_loop function and packet_handler callback function.

[0071] Among them, the function of the pcap_findalldevs function is to obtain the local machine device list and select the captured device; the function of the pcap_freealldevs function is to release the device list and end the program; the function of the pcap_open_live function is to enter the device selected by the pcap_findalldevs function, open the sniffing session of the device, and capture the entire content of each data packet of different data link layers; the function of the pcap_compile function is to compile data filtering rules, and use the pcap_setfilter function to set the specific filtering type. In this embodiment, the selected filtering rules are IP address filtering and data packet type filtering, that is, only UDP data packets sent from the fixed IP address obtained by filtering are received; the function of the pcap_loop function is to keep the device in a real-time sniffing state, that is, as long as the above filtering rules are met, the written packet_handler callback function is used to save each packet of UDP data in the memory of the CPU host side.

[0072] In this embodiment, the data receiving module of the CPU host side stores the acquired radar echo data in the corresponding first data buffer module and second data buffer module in the memory of the CPU host side through ping-pong operation.

[0073] Specifically, two memories of the same size but different addresses are opened in the memory of the CPU host end as the first data buffer module and the second data buffer module. When the first data buffer module receives enough data, the second data buffer module starts to receive data, which is controlled by an identifier inside the buffer module. Accordingly, in the subsequent step 3 of the 3D imaging BP processing, a global identifier is used to determine whether the GPU device reads the radar echo data in the first data buffer module or the second data buffer module when reading the radar echo data from the CPU host end. Completing the movement of ping-pong data on the CPU host end can avoid affecting the efficiency of the data collection thread in the frame header check and data rearrangement.

[0074] In this embodiment, multi-thread acceleration can be performed through OpenMP in data rearrangement. OpenMP is a multi-thread programming scheme for shared memory parallel systems, and the supported programming languages ​​include C, C++ and Fortran. Figure 5 , Figure 5: This is a schematic diagram of the OpenMP working model provided by an embodiment of the present invention. As shown in the figure, there is only one main thread at the beginning. When parallel computing is required, several branch threads are derived to execute parallel tasks. After the parallel code execution is completed, the branch threads converge and hand over the control flow to a separate main thread. OpenMP provides a high-level abstract description of parallel algorithms, which is particularly suitable for parallel programming on multi-core CPU machines. The compiler automatically processes the program in parallel according to the pragma instructions added to the program, and the use of OpenMP reduces the difficulty and complexity of parallel programming. When the compiler does not support OpenMP, the program will degenerate into an ordinary (serial) program, and the existing OpenMP instructions in the program will not affect the normal compilation and operation of the program. In this embodiment, OpenMP adopts the fork-join execution mode.

[0075] It should be noted that, in this embodiment, the GPU device side is selected to use CUDA acceleration for the operation flow that has no data dependency and has a large loop volume.

[0076] Step 2.2: Use the relevant functions of the thread class to thread-bind the data receiving module on the CPU host side. The bound thread is recorded as thread1.

[0077] In this embodiment, the data receiving module on the CPU host side is thread-bound by utilizing the related functions of the thread class. Regardless of the status of other threads, the thread (thread1) keeps receiving data in real time, thus avoiding the problem of efficiency loss caused by thread blocking during real-time processing.

[0078] Furthermore, the three-dimensional imaging BP processing described in step 3 realizes three-dimensional imaging through the radar back-projection three-dimensional imaging BP (BackProjection) algorithm. The back-projection algorithm performs a reverse interpolation operation in the pulse compression echo of the radar echo signal according to the time delay of the radar echo signal, and can reconstruct the target of the echo data under any imaging geometric configuration. The three-dimensional BP algorithm establishes a mapping relationship between the radar echo signal and the imaging scene through the slant range, and can directly set the imaging grid area for the area in the target area, and then use the distance between the grid point and the radar as a link to reversely find the contribution of the current echo pulse grid point. Each time the back-projection operation is performed, a description of the scene information at the grid point by the radar echo signal can be obtained. By traversing all azimuth pulses and coherently accumulating the projection results of different echo pulses, the target scene can be reconstructed and the image focusing can be completed. The BP algorithm performs back projection based on the slant range, pulse by pulse, and grid point by grid point. As long as the distance (instantaneous slant range) of the radar antenna phase center at the target grid point P and the coordinates of the imaging grid point can be accurately known, distortion-free image focusing of the echo data can be achieved. Therefore, the BP algorithm can combine scene information to achieve three-dimensional imaging.

[0079] Specifically, step 3 includes:

[0080] Step 3.1: The GPU device reads radar echo data from the CPU host;

[0081] Step 3.2: The three-dimensional BP processing module on the GPU device uses the kernel function to perform background verification and phase compensation on the radar echo data, build the coordinate system of the radar and the target, calculate the position information of the radar and the target, and realize the projection of the radar and the target to obtain BP imaging data;

[0082] In this embodiment, the kernel function includes kernel_SUB kernel function, kernel_EXP kernel function and kernel_3DBP kernel function. Among them, kernel_SUB kernel function (Kernel2) is used to perform background verification processing on radar echo data, that is, the background data is subtracted from the radar echo data to obtain the data; kernel_EXP kernel function (Kernel3) is used to perform distance phase compensation on the radar echo data after background verification processing, that is, for the radar echo data after the distance Fourier change, a phase is multiplied to complete the distance phase compensation of the radar echo data; kernel_3DBP kernel function (Kernel4) is used to construct a three-dimensional coordinate system of the radar and the target, calculate the position information of the radar and the target, realize the projection of the radar and the target to obtain BP imaging data, that is, construct a three-dimensional coordinate system of the radar and the target, calculate the target distance radar position information; complete the calculation of the radar antenna center phase and the target instantaneous slant range; realize projection for the radar and the target to complete the distance phase compensation, and finally complete BP imaging to obtain BP imaging data.

[0083] Furthermore, the kernel function also includes a kernel_GNR kernel function. If the radar echo data is in the form of separated real and imaginary parts, the kernel_GNR kernel function (Kernel1) is used to combine the real and imaginary parts of the radar echo data to obtain the radar echo data in the form of a complex signal.

[0084] Specifically, when establishing the three-dimensional coordinates for the radar position, there are two data organization methods. Different data organization methods will have different effects on the performance of the core. Please refer to Figure 7c , Figure 7cThis is a schematic diagram of the range- and azimuth-prioritized storage methods corresponding to the two data structure organization methods AoS and SoA provided in an embodiment of the present invention. As shown in the figure, the first method is a data structure (AoS), which corresponds to the azimuth-prioritized storage of radar echo data; the second method is a structure array (SoA), which corresponds to the range-prioritized storage of radar echo data. The AoS data organization method will cause non-aligned and non-continuous memory access in the process of accessing the radar coordinate position x array, y array, and z array, which seriously affects the read and write speed of the memory and reduces the core performance. The use of the SoA data organization method effectively avoids the disadvantages of AoS, and can perform aligned and continuous memory access while storing the radar position coordinates, making the core performance more efficient.

[0085] Please refer to Figure 7a and Figure 7b , Figure 7a It is a thread allocation diagram of kernel functions Kernel1-Kernel3 provided in an embodiment of the present invention; Figure 7b It is a thread allocation diagram of the kernel function Kerne4 provided by an embodiment of the present invention. As shown in the figure, there are two types of indexes inside the kernel function of the GPU device side. The first is the horizontal distribution of index threads, which indicates the target point in the distance direction of the target scene, denoted as idx, and the calculation method is nrn=blockIdx.x*blockDim.x+threadIdx.x, where blockIdx.x corresponds to each thread block, blockDim.x corresponds to the dimension corresponding to each thread block, and threadIdx.x corresponds to the thread bundle index in each dimension thread block, and the number of thread bundles can be a multiple of 16. The second is the vertical distribution of index threads, which indicates the target point in the azimuth direction of the target scene, denoted as idy, and the calculation method is nan=blockIdx.y*blockDim.y+threadIdx.y; where blockIdx.y corresponds to each thread block, blockDim.y corresponds to the dimension corresponding to each thread block, and threadIdx.y corresponds to the thread bundle index in each dimension thread block, and the number of thread bundles can be a multiple of 16.

[0086] In this embodiment, the three-dimensional coordinates of the radar target point are determined by the thread index, and the calculation results are stored in an array opened in the GPU video memory by row. When the kernel function is called for calculation, it is called by row to form aligned and continuous memory access, which reduces cross-memory access and ensures that the kernel function that processes distance-prioritized data has good kernel performance. The starting point coordinates of each radar echo data azimuth block are determined according to the thread index.

[0087] like Figure 3 and Figure 4As shown, in this embodiment, optionally, the video array radar three-dimensional BP imaging is task-divided and the data dependency is analyzed. If the data processed by Kernel1, Kernel2, Kernel3, and Kernel4 have data dependency, they can be first assigned to the GPU device side and run sequentially through kernel functions one by one. Kernel4 needs to wait for the previous three kernel functions to complete the operation before performing the operation. Kernel1 can be placed in the same workflow with Kernel2 and Kernel3 to minimize the time consumption of data transmission between the GPU device side and the CPU host side. After completing the above kernel function operation, Kernel4 is used to complete the video array radar three-dimensional BP imaging.

[0088] Step 3.2: Thread-bind the three-dimensional BP processing module on the GPU device side through the relevant functions of the thread class, and the bound thread is recorded as thread2.

[0089] It should be noted that the three-dimensional BP imaging module on the GPU device side is completely implemented on the GPU device side, and is used to construct a coordinate system for the radar and the target, calculate the position information of the radar target, so as to realize projection for the target and the radar; determine the area of ​​echo coherent accumulation according to the pre-set effective imaging area of ​​BP imaging; divide the ground grid, that is, perform the same projection and accumulation operations on all grid points to achieve image focusing; determine the contribution of the echo pulse to each grid point, perform distance phase compensation, and realize BP imaging.

[0090] Further, step 4 includes:

[0091] Step 4.1: The CPU host obtains the BP imaging data from the GPU device and generates the imagesc.dll file. The imagesc image generation module on the CPU host calls the imagesc.dll file generated by MATLAB to output the imaging result image.

[0092] The specific steps to generate the imagesc.dll file are as follows: enter the path of the MATLAB file where the DLL file is to be generated, enter MEX-setup and MEX-mbuild in the MATLAB command line, and then select the library compiler to compile through the deploytool tool to generate dll files under the release and debug running versions respectively. According to the program running requirements, the three files of lib, h, and dll of each running version can be placed under different running versions.

[0093] Step 4.2: Use the related functions of the thread class to thread-bind the imagesc image generation module on the CPU host side. The bound thread is recorded as thread3.

[0094] In this embodiment, by binding the threads of each computing module, task-level parallelism in the real-time processing flow can be achieved. Figure 6 As shown in the figure, in order to avoid thread conflicts, the global identifier is correctly used in each thread, and the data processing flow of the video array radar three-dimensional BP imaging is realized through while(1). Thread1 maintains the working state by real-time monitoring of the port, while thread2 and thread3 maintain the pipeline work of the video array radar three-dimensional BP imaging by adding while(1).

[0095] The three-dimensional real-time imaging processing method of the video security scanner based on the CPU and GPU heterogeneous platform of this embodiment avoids the problem that the serial processing of array radar echo data takes a long time and the processing efficiency is insufficient to process in real time. The GPU device side is selected to perform parallel calculations of three-dimensional BP imaging. For operations that are not suitable for GPU acceleration during data processing due to dependencies between data, data acceleration processing is performed through multi-threading on the CPU host side. For data processing and thread blocking that are not related to real-time processing, they are performed in the preloaded module as much as possible to avoid redundancy in the video array radar processing process. For the data collection module and imagesc module that cannot be implemented on the GPU, data processing is performed by binding the threads on the CPU host side, reducing the efficiency loss of parallel processing of each CPU host side thread and reducing the computing time, thereby achieving real-time processing;

[0096] The three-dimensional real-time imaging processing method of the video security scanner based on the CPU and GPU heterogeneous platform of this embodiment divides the processing flow processed by the GPU into tasks in the radar back-projection imaging algorithm, hides the memory access delay of each thread through asynchronous processing between each thread, and processes different tasks in the real-time process in each bound thread to reduce the running time.

[0097] Furthermore, the effect of the three-dimensional real-time imaging processing method of the video security inspection instrument based on the CPU and GPU heterogeneous platform of this embodiment is further explained through simulation experiments.

[0098] Simulation experiment 1

[0099] The CPU host-side serial processing method is used to design the measured data simulation.

[0100] Simulation experiment parameters: pulse echo point number 128*128*30, pulse echo period 20e-6s, pulse echo bandwidth 7.2e+9, pulse echo frequency 6e+6, imaging point number 96*96*12.

[0101] The simulation steps are as follows Figure 1The flowchart shown is that the CPU host serially processes the array radar echo data. When the radar echo signal data is serially processed on the CPU host, 1) the data of the three-dimensional BP imaging of the video security scanner is first preloaded on the CPU host; the simulation parameters required for the array radar echo formation are encapsulated as a class, which can be directly called by the header file included in the program, and the phase calculation and the preloading of the background information are completed; 2) the CPU host uses the network port response function pcap class to receive the echo data corresponding to each frame of the image; 3) the background check and phase compensation are performed on the data of each frame of the image received, including constructing coordinates for the radar and the target, and projecting according to the division of the three-dimensional grid, in which the division of the effective area of ​​the three-dimensional BP imaging is directly read through the pre-defined, and finally the three-dimensional BP imaging is used to obtain the BP imaging data; 4) the CPU host directly calls the imsgesc function to output the imaging result diagram.

[0102] Simulation experiment 1 Figure 8a The result after processing the radar echo data to be imaged is shown in FIG. Fig. 9 As shown, Fig. 9 This is the imaging result obtained by using the CPU host serial processing method.

[0103] Simulation experiment 2

[0104] The measured data simulation is designed using the three-dimensional real-time imaging processing method of the video security inspection instrument based on the CPU and GPU heterogeneous platform of the first embodiment of the present invention.

[0105] Simulation experiment parameters: pulse echo point number 128*128*30, pulse echo period 20e-6s, pulse echo bandwidth 7.2e+9, pulse echo frequency 6e+6, imaging point number 96*96*12.

[0106] The simulation steps are:

[0107] 1) The CPU host preloads data for video array radar 3D BP imaging;

[0108] 2) The CPU host uses the network port response function pcap class to receive the video array radar echo data;

[0109] 3) Parameter calculation of BP imaging on the GPU device side: including background verification and phase compensation of each frame of image data received, including the construction of coordinates for radar and target, projection based on the division of three-dimensional grid, in which the division of the effective area of ​​3D BP imaging is directly read through the pre-defined, and finally the 3D BP imaging is used to obtain BP imaging data;

[0110] 4) The CPU host calls the imsgesc.dll generated by MATLAB to output the imaging result diagram.

[0111] Specifically, the kernel functions in the entire data processing flow are explained, including the division of grids and blocks in each kernel function on the GPU device side: TrdNum and BlkNum; the meaning of each kernel function and the encapsulation of each interface of the kernel function, as well as the allocated GPU device side memory size.

[0112] TrdNum and BlkNum refer to the grid and thread block in the CUDA software architecture respectively, which is equivalent to dividing the GPU computing resources into several grids. Each grid can be artificially divided into a number of thread blocks of up to three dimensions, and each thread block can be artificially divided into a number of threads of up to three dimensions. Ultimately, a CUDA parallel program will be executed by multiple divided threads.

[0113] The number of GPU devices is 1, and the GPU memory size is 10G. This configuration is sufficient to process the amount of radar echo data under current conditions. Considering that some auxiliary data will be temporarily calculated during phase compensation, the calculation of auxiliary data occupies additional GPU memory. At this time, it is necessary to consider the maximum utilization of the memory and use the GPU device information read by the CPU host to reasonably allocate the GPU device memory.

[0114] Configure threads for each kernel function to achieve thread-level parallelism, and ensure that the kernel function has the best performance based on certain principles; clarify the index content and data organization method within the kernel, optimize the internal calculation of the kernel function, and optimize the performance of the kernel function. Configure grid block threads for each kernel function, and the configuration should follow the following principles to ensure that the kernel function has good performance:

[0115] (1) The lengths of the grids and blocks configured for the kernel function in the x, y, and z dimensions should not exceed the limits of the GPU device. It should be noted that the closer the configuration is to the limits of the GPU device, the better the performance will not necessarily be.

[0116] (2) The number of threads configured for each kernel function should be an integer multiple of 32, preferably greater than 4*32 threads. This is because the GPU processes threads on the hardware streaming multiprocessor SM in units of a warp. A warp consists of 32 threads. Placing four warps on the hardware streaming multiprocessor SM for parallel processing can effectively hide memory access latency and improve core performance. The more warps placed on the hardware streaming multiprocessor SM, the better the effect of hiding memory access latency.

[0117] (3) The performance of each kernel function will be affected by the configuration. By running the kernel function with different configurations and using tools to test the running time of the kernel function multiple times, the configuration with the shortest running time can be obtained.

[0118] The relationship between the memory distribution on the GPU device side and the grid, block, and thread is as follows: Figure 7aand Figure 7b The kernel function, kernel function function, kernel function variable and kernel function allocation space used on the GPU device are described as follows:

[0119] The kernel function name of Kernel1 is kernel_GNR, and its function is to combine the real and imaginary parts of the radar echo signal data read to generate a complete complex signal. The thread configured in the block is GenEchoThread(512,1), and the block configured in the grid is GenEchoblocks(((Nan+GenEchoThread)) / (GenEchoThread.x),GenEchoThread.y), which means to create a thread grid of size ((Nan+GenEchoThread)) / (GenEchoThread.x)*GenEchoThread.y), where the unit of the thread grid is the thread block, and 128*1 threads are configured in the block. The block configuration can be automatically adjusted according to the thread configuration, as shown in the schematic diagram. Figure 7a. Create a thread index in the kernel, set the thread index to idx and idy, corresponding to the distance and azimuth indexes respectively. According to the kernel configuration, the idx index is determined by the thread X-direction offset, the block X-direction offset and the block size. The kernel function idx index calculation method is idx = blockIdx.x * blockDim.x + threadIdx.x, where blockIdx.x corresponds to the index of each thread block in GenEchoblocks.x, blockDim.x corresponds to the dimension of each thread block in GenEchoblocks.x, and threadIdx.x corresponds to the thread block of each dimension in GenEchoblocks.x. The thread bundle index in , the number of thread bundles can be a multiple of 16, and the index range is [0, Nr] for the distance index; the idy index is determined by the size of the block, and the kernel function idy index is calculated as idy = blockIdx.y, where blockIdx.y corresponds to the index of each thread block in GenEchoblocks.y, blockDim.y corresponds to the dimension corresponding to each thread block in GenEchoblocks.y, and threadIdx.y corresponds to the thread bundle index in each dimension thread block in GenEchoblocks.y. The number of thread bundles can be a multiple of 16, and the index range is [0, Na] for the azimuth index, representing the azimuth. Use the above index to traverse the variable address space in the GPU video memory, and assign values ​​and data calculations to the array elements of the array allocated by the GPU video memory. Use this index to traverse the data address space, assign values ​​to array elements and perform data calculations. The array variables allocated to the Kernel1 kernel function are d_Recho, d_Iecho, d_echo, and Nr, where Recho represents the real part of the data, Iecho represents the imaginary part of the data, Echo represents the complex data, and Nr represents the distance length of the data storage; the allocated GPU memory space is sizeof(float)*Na*Nr, sizeof(float)*Na*Nr, and sizeof(c_float)*Na*Nr; c_float is a complex signal with real and imaginary parts as float defined by cuda_complex.cuh.

[0120] The kernel function name of Kernel2 is kernel_SUB, and its function is to perform background verification on the video array radar echo data that has been verified and rearranged, that is, to subtract the background data from the existing echo. The array variables allocated to this function are d_echo, d_echo_0, Nr, and Na, where echo is the echo data corresponding to each frame of the image, Nr is the azimuth length, Na is the distance length, and echo_0 is the background information under this processing flow; the allocated space is sizeof(c_float)*Na*Nr, sizeof(c_float)*Na*Nr, c_float represents a complex float signal, Nr and Na represent the size of the distance and azimuth respectively, and the background verification is completed by subtracting each frame of echo data from the background information.

[0121] The thread configuration in the block is kernel_SUBThread(512,1), and the block configuration in the grid is kernel_SUBblocks(((Nan+pkernel_SUBThread)) / (kernel_SUBThread.x),kernel_SUBThread.y), which means to create a thread grid of size ((Nan+kernel_SUBThread)) / (kernel_SUBThread.x)*kernel_SUBThread.y, where the unit of the thread grid is the thread block, and 512*1 threads are configured in the block. The block configuration can be automatically adjusted according to the thread configuration, as shown in the schematic diagram. Figure 7aAs shown. Establish thread index in the kernel, set thread index to idx, idy, corresponding to distance and azimuth index respectively. According to kernel configuration, idx index is determined by thread X-direction offset, block X-direction offset and block size. Kernel function idx index is determined by thread X-direction offset, block X-direction offset and block size according to kernel configuration. The calculation method is idx = blockIdx.x * blockDim.x + threadIdx.x, where blockIdx.x corresponds to each thread block in kernel_SUBblocks.x, blockDim.x corresponds to the dimension corresponding to each thread block in kernel_SUBblocks.x, thread Idx.x corresponds to the thread bundle index in each dimension thread block in kernel_SUBblocks.x. The number of thread bundles can be a multiple of 16, and the index range is [0, Nr]. The kernel function idy index calculation method is idy = blockIdx.y, where blockIdx.y corresponds to the thread block index in kernel_SUBblocks.y, blockDim.y corresponds to the dimension corresponding to each thread block in kernel_SUBblocks.y, and threadIdx.y corresponds to the thread bundle index in each dimension thread block in kernel_SUBblocks.y. The number of thread bundles can be a multiple of 16, and the index range is [0, Na]. Use the above index to traverse the variable address space in the GPU video memory, assign values ​​to the array elements of the array allocated for the GPU video memory, and perform data calculations.

[0122] The kernel function of Kernel3 is named kernel_EXP. Its function is to complete the azimuth phase compensation of the radar echo data after the range Fourier transform by multiplying it by a phase. The array variables allocated to this function are d_echo, xz_coe, Nr, and Na, where echo is the echo data corresponding to each frame of the image, Nr is the azimuth length, Na is the range length, and xz_coe is the phase that needs to be compensated in each azimuth under this processing flow. The allocated space is sizeof(c_float)*Na*Nr, sizeof(c_float)*Na, where c_float represents a complex float signal, and Nr and Na represent the size of the range and azimuth, respectively.

[0123] The thread configured in the block is kernel_EXPThread(512,1), and the block configured in the grid is kernel_EXPblocks(((Nan+kernel_EXPThread)) / (kernel_EXPThread.x),kernel_EXPThread.y), which means to create a thread grid of size ((Nan+kernel_EXPThread)) / (kernel_EXPThread.x)*kernel_EXPThread.y, where the unit of the thread grid is the thread block, and 128*1 threads are configured in the block. The block configuration can be automatically adjusted according to the thread configuration, as shown in the schematic diagram. Figure 7a As shown. Establish thread index in the kernel, set thread index to idx, idy, corresponding to distance and azimuth index respectively. According to kernel configuration, idx index is determined by thread X-direction offset, block X-direction offset and block size. Kernel function idx index calculation method is idx = blockIdx.x * blockDim.x + threadIdx.x. Establish thread index in the kernel, set thread index to idx, idy, corresponding to distance and azimuth index respectively. According to kernel configuration, idx index is determined by thread X-direction offset, block X-direction offset and block size. Kernel function idx index calculation method is idx = blockIdx.x * blockDim.x + threadIdx.x. BlockIdx.x corresponds to each thread block index in kernel_EXP_osblocks.x, and blockDim.x corresponds to kernel_EXP_osblocks.x. The dimension corresponding to each thread block in locks.x, threadIdx.x corresponds to the thread bundle index in each dimension thread block in kernel_EXPblocks.x, the number of thread bundles can be a multiple of 16, and the index range is [0, Nr] for the distance index; the kernel function idy index calculation method is idy = blockIdx.y, where blockIdx.y corresponds to the index of each thread block in kernel_EXPblocks.y, blockDim.y corresponds to the dimension corresponding to each thread block in kernel_EXPblocks.y, threadIdx.y corresponds to the thread bundle index in each dimension thread block in kernel_EXPblocks.y, the number of thread bundles can be a multiple of 16, and the index range is [0, Na] for the azimuth index, representing the azimuth. Use the above index to traverse the variable address space in the GPU video memory, assign values ​​to the array elements of the array opened by the GPU video memory and perform data calculations. Use this index to traverse the data address space, assign values ​​to the array elements and perform data calculations.

[0124] The kernel function name of Kernel4 is kernel_3DBP. Through this kernel function, the target distance radar position information is calculated, and the three-dimensional coordinate system of the radar and the target is constructed; the calculation of the radar antenna center phase and the target instantaneous slant range is completed; the projection is realized for the radar and the target; the distance phase compensation is completed; and finally BP imaging is completed.

[0125] The thread configuration in the block is kernel_3DBPThread(128,1,1), and the block configuration in the grid is kernel_3DBPblocks(((Nan+kernel_3DBPThread)) / (kernel_3DBPThread.x),kernel_3DBPThread.y,kernel_3DBPThread.z), which means to create a thread grid of size ((Nan+kernel_3DBPThread)) / (kernel_3DBPThread.x)*kernel_3DBPThread.y*kernel_3DBPThread.z, where the unit of the thread grid is the thread block, and 128*1*1 threads are configured in the block; the block configuration can be automatically adjusted according to the thread configuration, as shown in the schematic diagram Figure 7b As shown. Establish thread indexes in the kernel, set thread indexes to idx, idy, and idz. According to the kernel configuration, each thread index is determined by the thread direction offset, block direction offset, and block size. The kernel function idx index calculation method is idx = blockIdx.x * blockDim.x + threadIdx.x, idy = blockIdx.y, idz = blockIdx.z. The index range is [0, 2 * len], len is the effective length selected in the azimuth direction, where blockIdx.x, blockIdx.y, and blockIdx.z correspond to kernel _3DBPblocks.x, kernel_3DBPblocks.y, kernel_3DBPblocks.z correspond to the thread block indexes of different dimensions, blockDim.x, blockDim.y correspond to the dimensions corresponding to each thread block in kernel_3DBPblocks.x, kernel_3DBPblocks.y, threadIdx.x, threadIdx.y correspond to the thread bundle indexes in the thread blocks of each dimension in kernel_3DBPblocks.x, kernel_3DBPblocks.y. Use the above indexes to traverse the variable address space in the GPU video memory, assign values ​​to the array elements of the array allocated by the GPU video memory and calculate data. Use this index to traverse the data address space, assign values ​​to the array elements and calculate data.

[0126] Analyze the process of 3D BP imaging of video array radar, clarify the relationship between each task, and divide the tasks according to their dependency and independence. Dependency means that there is a causal relationship between two tasks, and some or all of the data can be used interchangeably. Independence means that the two tasks can exchange the processing order without any effect on the result. Read and display the radar echo data processed by the above BP imaging in the dll file generated by matlab, as shown in the figure. Figure 8a FIG. 1 is a schematic diagram of radar echo data to be imaged provided by an embodiment of the present invention. The image obtained by processing the echo signal is as shown in FIG. Figure 8b As shown, Figure 8b This is an imaging result diagram obtained by using the imaging processing method of the present invention.

[0127] Compared with the CPU host side serial processing of radar echo data, when the GPU device side parallel processes radar echo data, the GPU device side and the CPU host side do not share memory, and the GPU is not suitable for directly reading a large amount of CPU memory data, so the radar echo data needs to be transferred to the GPU device side memory through the CPU host side. In the case of multiple GPU devices, the simulation parameters need to be transferred from the CPU host side to the global memory in the GPU device side as needed. In the process of radar echo data calculation, combined with the characteristics of GPU, the GPU kernel function is used to call the GPU kernel function and assign a large number of device-side threads to the kernel function. Each thread corresponds to the radar echo data of each radar target point at a certain radar scanning moment. These threads can be calculated in parallel inside the GPU kernel function to complete the parallel processing of a large amount of data.

[0128] The experimental results of simulation experiment 1 and simulation experiment 2 ( Fig. 9 and Figure 8b ) are compared, and it can be seen that there is no obvious difference in the imaging results of the two. However, for the simulation of antenna echo data with the same number of points, the serial three-dimensional BP imaging takes 46.18 seconds, while the three-dimensional real-time imaging processing method of the video security scanner based on the CPU and GPU heterogeneous platform of this embodiment takes 46ms, which can reach a processing speed of 15 frames per second, achieving the effect of the video security scanner, with an acceleration ratio of 1003.9 times, effectively reducing the running time.

[0129] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants are intended to cover non-exclusive inclusion, so that an article or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed. In the absence of further restrictions, the elements defined by the statement "including one..." do not exclude the existence of other identical elements in the article or device including the elements. Similar words such as "connect" or "connected" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0130] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A three-dimensional real-time imaging processing method for video security inspection equipment based on CPU and GPU heterogeneous platforms. It is characterized in that include: Step 1: Preload the information of the video array radar three-dimensional BP imaging to the CPU host; Step 2: The data receiving module of the CPU host side acquires radar echo data, stores it in the memory of the CPU host side, and performs thread binding on the data receiving module of the CPU host side; Step 3: The GPU device side reads the radar echo data from the CPU host side, the three-dimensional BP processing module of the GPU device side performs three-dimensional imaging BP processing on the radar echo data to obtain BP imaging data, and thread-binds the three-dimensional BP processing module of the GPU device side; Step 4: the imagesc image generation module of the CPU host side outputs an imaging result image according to the BP imaging data, and performs thread binding on the imagesc image generation module of the CPU host side; Among them, the data processing flow of video array radar three-dimensional BP imaging is realized by adopting a global identifier in each thread.

2. According to the method for processing three-dimensional real-time imaging of video security inspection equipment based on a CPU and GPU heterogeneous platform according to claim 1, It is characterized in that The step 1 comprises: The three-dimensional BP parameters, GPU device information and background information of the radar echo signal are loaded on the CPU host side, and the imagesc.dll generated by MATLB is pre-called to generate an empty image, and the kernel function of the GPU device side is threaded and divided into three-dimensional grids.

3. According to the method for processing three-dimensional real-time imaging of video security inspection equipment based on a CPU and GPU heterogeneous platform as described in claim 1, It is characterized in that The step 2 comprises: Step 2.1: The data receiving module of the CPU host side uses the relevant functions in the network port response function pcap class to filter and rearrange the video array radar port data to obtain the radar echo data, and stores it in the memory of the CPU host side; Step 2.2: thread-bind the data receiving module of the CPU host end through the relevant functions of the thread class, and the bound thread is recorded as thread1.

4. According to the method for processing three-dimensional real-time imaging of video security inspection equipment based on a CPU and GPU heterogeneous platform as described in claim 3, It is characterized in that The related functions in the network port response function pcap class include: pcap_findalldevs function, pcap_freealldevs function, pcap_open_live function, pcap_compile function, pcap_setfilter function, pcap_loop function and packet_handler callback function.

5. According to claim 3, the three-dimensional real-time imaging processing method of the video security inspection instrument based on the CPU and GPU heterogeneous platform, It is characterized in that In step 2.1, the data receiving module of the CPU host side stores the acquired radar echo data in the corresponding first data buffer module and second data buffer module in the memory of the CPU host side through ping-pong operation.

6. The three-dimensional real-time imaging processing method of video security inspection instrument based on CPU and GPU heterogeneous platform according to claim 1, It is characterized in that The step 3 comprises: Step 3.1: The GPU device side reads the radar echo data from the CPU host side; Step 3.2: The three-dimensional BP processing module of the GPU device uses a kernel function to perform background verification and phase compensation on the radar echo data, construct a coordinate system of the radar and the target, calculate the position information of the radar and the target, and realize the projection of the radar and the target to obtain the BP imaging data; Step 3.2: thread-binding the three-dimensional BP processing module on the GPU device side is performed through the related functions of the thread class, and the bound thread is recorded as thread2.

7. The three-dimensional real-time imaging processing method of video security inspection instrument based on CPU and GPU heterogeneous platform according to claim 6, It is characterized in that The kernel functions include kernel_SUB kernel function, kernel_EXP kernel function and kernel_3DBP kernel function, wherein: The kernel_SUB kernel function is used to perform background verification processing on the radar echo data; The kernel_EXP kernel function is used to perform range phase compensation on the radar echo data after background verification processing; The kernel_3DBP kernel function is used to construct a three-dimensional coordinate system of the radar and the target, calculate the position information of the radar and the target, and realize the projection of the radar and the target to obtain the BP imaging data.

8. The three-dimensional real-time imaging processing method of video security inspection instrument based on CPU and GPU heterogeneous platform according to claim 7, It is characterized in that The kernel function also includes a kernel_GNR kernel function. If the radar echo data is in a form of separated real and imaginary parts, the kernel_GNR kernel function is used to combine the real and imaginary parts of the radar echo data to obtain radar echo data in the form of a complex signal.

9. The three-dimensional real-time imaging processing method of video security inspection instrument based on CPU and GPU heterogeneous platform according to claim 1, It is characterized in that The step 4 comprises: Step 4.1: The CPU host side obtains the BP imaging data of the GPU device side and generates an imagesc.dll file. The imagesc image generation module of the CPU host side calls the imagesc.dll file generated by MATLAB to output an imaging result image; Step 4.2: Thread binding is performed on the imagesc image generation module on the CPU host side through the relevant functions of the thread class, and the bound thread is recorded as thread3.

Citation Information

Patent Citations

  • Extendable distributed GPU acceleration method and apparatus

    CN106846236A

  • Heterogeneous platform SAR echo simulation parallel method based on CPU and multiple GPUs

    CN110515053A