Depth determination method and system for a target
Patent Information
- Application Number
- CN202211329887.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-25
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2042-10-25
AI Technical Summary
但是,随着应用场景的增多,每帧数据包含的像素点越来越多,相应的,CPU(Central Processing Unit,中央处理器)处理每帧数据所需时间也就越来越长,这不仅会导致运算功耗较大,而且也无法满足用户的高效深度测量的现实需求
[0036] The advantages of the technical solution provided in this application are that the CPU uses the asynchronous queue interface pre-set on the DSP to input the raw data into the DSP, and the DSP performs convolution operations on the raw data, thereby removing the computationally intensive convolution operation from the CPU, without occupying the CPU's processing time and computing resources, and effectively reducing the CPU's power consumption. The CPU continuously puts the raw data to be calculated for each frame onto the asynchronous queue interface, the DSP performs convolution processing on the raw data of that frame, and then the CPU reads the convolution calculation result. The CPU and DSP execute data processing tasks in parallel, effectively improving the CPU's data processing speed and significantly improving the calculation efficiency of the depth information of the target under test, thereby reducing the system's power consumption and meeting the user's high-efficiency depth measurement needs.
Smart Images

Figure CN115578244B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method and system for determining the depth of a target. Background Technology
[0002] DTOF (Direct Time of Flight) chips use SPAD (Single Photon Avalanche Diode) avalanche triggering for distance measurement. Specifically, after emitting repetitive pulses, the SPAD array receives light signals reflected from surfaces at different distances, which are then processed to obtain depth information.
[0003] When calculating depth information, related technologies first read depth measurement data from a DTOF chip. This depth measurement data typically consists of information from multiple pixels, with each pixel composed of histogram data. For example, the raw data read from the DTOF chip includes information from 512 pixels, each composed of histogram data of length 240 and data type uint8, meaning the data size is 512 * 240 (uint8).
[0004] Because the raw histogram obtained directly from the DTOF chip contains a lot of noise, the accuracy of the peak values determined by the raw histogram is relatively low. Therefore, it is necessary to perform convolution between the raw histogram and a convolution kernel to smooth the raw histogram. Figure 1 This is the original histogram. Figure 2 This is the histogram after convolution. Peak finding is performed on the convolutional histogram to determine the peak value, thus obtaining the final depth data. However, with the increasing number of application scenarios, each frame of data contains more and more pixels. Consequently, the time required for the CPU (Central Processing Unit) to process each frame of data also increases. This not only leads to higher power consumption but also fails to meet the practical needs of users for efficient depth measurement. Summary of the Invention
[0005] This application provides a method and system for determining the depth of a target, which effectively reduces the system's computational power consumption and can meet users' needs for efficient depth measurement.
[0006] To address the aforementioned technical problems, the embodiments of the present invention provide the following technical solutions:
[0007] One embodiment of the present invention provides a method for determining the depth of a target, comprising:
[0008] The CPU transmits the depth measurement data of the target to the DSP's asynchronous queue through the asynchronous queue interface;
[0009] The DSP reads the depth measurement data from the asynchronous queue and performs convolution processing on the depth measurement data to generate data processing results;
[0010] The CPU obtains the data processing result through the asynchronous queue interface, and determines the depth of the target under test based on the data processing result using a peak-finding algorithm.
[0011] Optionally, the CPU obtains the data processing result through the asynchronous queue interface, and determines the depth of the target under test based on the data processing result using a peak-finding algorithm, including:
[0012] The DSP receives a new frame of depth measurement data, sends the data processing result corresponding to the previous frame of depth measurement data, and performs convolution processing on the new frame of depth measurement data; at the same time, the CPU receives the data processing result corresponding to the previous frame of depth measurement data through the asynchronous queue interface, and determines the depth of the target to be measured based on the previous frame of depth measurement data using a peak finding algorithm.
[0013] Optionally, the DSP reads the depth measurement data from the asynchronous queue and performs convolution processing on the depth measurement data to generate a data processing result, including:
[0014] The DSP pre-constructs the same number of threads based on the total number of exposure zones of the DTOF chip;
[0015] The DSP reads a frame of depth measurement data from the asynchronous queue and determines the sub-measurement data corresponding to each exposure zone from the depth measurement data;
[0016] The DSP sends each sub-measurement data to the corresponding thread to perform parallel convolution calculations on each sub-measurement data;
[0017] The DSP generates data processing results based on the convolution calculation results of each sub-measurement data.
[0018] Optionally, the parallel convolution calculation for each sub-measurement data includes:
[0019] When a data type conversion instruction is received, the target data type is obtained;
[0020] While performing convolution calculations on the corresponding sub-measurement data, each thread converts the data type of each sub-measurement data to the target data type.
[0021] Optionally, before the DSP reads the depth measurement data from the asynchronous queue, it further includes:
[0022] During the initialization process, the DSP sets its operating frequency through the frequency configuration interface.
[0023] Another embodiment of the present invention provides a depth determination system for a target, including a DTOF chip, a DSP, and a CPU; the DTOF chip is connected to the CPU, and the DSP is connected to the CPU.
[0024] The DTOF chip includes a SPAD array, which includes multiple groups of SPADs, each group of SPADs serving as an exposure partition to achieve multiple batch exposures.
[0025] The DTOF chip is used to perform depth measurement on the target under test and send the depth measurement data of the target under test to the CPU.
[0026] The CPU is used to transmit the depth measurement data of the target to be measured to the asynchronous queue of the DSP through the asynchronous queue interface, and obtain the data processing result through the asynchronous queue interface. Based on the data processing result, the depth of the target to be measured is determined by the peak finding algorithm.
[0027] The DSP is used to read the depth measurement data from the asynchronous queue and generate data processing results by performing convolution processing on the depth measurement data.
[0028] Optionally, the DSP is further configured to, upon receiving a new frame of depth measurement data, send the data processing result corresponding to the previous frame of depth measurement data corresponding to the new frame of depth measurement data, and perform convolution processing on the new frame of depth measurement data.
[0029] Optionally, the CPU is further configured to receive the data processing result corresponding to the previous frame of depth measurement data through the asynchronous queue interface while the DSP performs convolution processing on the new frame of depth measurement data, and determine the depth of the target to be measured based on the previous frame of depth measurement data using a peak-finding algorithm.
[0030] Optionally, the DSP is also used to set the operating frequency through a frequency configuration interface during the initialization process.
[0031] Optionally, the DSP further includes:
[0032] The thread pre-construction module is used to pre-construct the same number of threads as the total number of exposure partitions of the DTOF chip;
[0033] The data receiving module is used to read a frame of depth measurement data from the asynchronous queue and determine the sub-measurement data corresponding to each exposure zone from the depth measurement data;
[0034] The parallel computing module is used to send each sub-measurement data to the corresponding thread to perform parallel convolution calculations on each sub-measurement data;
[0035] The depth calculation module is used to generate data processing results based on the convolution calculation results of each sub-measurement data.
[0036] The advantages of the technical solution provided in this application are that the CPU uses the asynchronous queue interface pre-set on the DSP to input the raw data into the DSP, and the DSP performs convolution operations on the raw data, thereby removing the computationally intensive convolution operation from the CPU, without occupying the CPU's processing time and computing resources, and effectively reducing the CPU's power consumption. The CPU continuously puts the raw data to be calculated for each frame onto the asynchronous queue interface, the DSP performs convolution processing on the raw data of that frame, and then the CPU reads the convolution calculation result. The CPU and DSP execute data processing tasks in parallel, effectively improving the CPU's data processing speed and significantly improving the calculation efficiency of the depth information of the target under test, thereby reducing the system's power consumption and meeting the user's high-efficiency depth measurement needs.
[0037] Furthermore, embodiments of the present invention also provide a corresponding implementation system for the target depth determination method, further making the method more practical, and the system has corresponding advantages.
[0038] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic diagram of the original histogram in an exemplary application scenario provided by an embodiment of the present invention;
[0041] Figure 2 The embodiments of the present invention provide a basis for... Figure 1 A schematic diagram of the histogram after convolution calculation;
[0042] Figure 3 A schematic diagram of the interaction process of a method for determining the depth of a target provided in an embodiment of the present invention;
[0043] Figure 4 This is a schematic diagram of the peak-finding principle provided in an embodiment of the present invention;
[0044] Figure 5 A flowchart illustrating another method for determining the depth of a target provided in an embodiment of the present invention;
[0045] Figure 6 This is a structural diagram of a specific implementation of the target depth determination system provided in this embodiment of the invention. Detailed Implementation
[0046] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] The terms "first," "second," "third," "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may include steps or units not listed. Various non-limiting embodiments of this application are described in detail below.
[0048] First see Figure 3 , Figure 3 This is a schematic diagram of the interaction flow of a method for determining the depth of a target provided by an embodiment of the present invention. The embodiment of the present invention may include the following:
[0049] S301: The CPU transmits the depth measurement data of the target to be measured to the asynchronous queue of the DSP through the asynchronous queue interface.
[0050] In this embodiment, the target to be measured is the object for which depth measurement is required. The depth measurement data is the raw data read by the CPU from the DTOF chip, typically histogram data. An asynchronous queue interface is pre-configured on the DSP (Digital Signal Processor), and an asynchronous queue is constructed. The asynchronous queue interface is used for data interaction between the CPU and the DSP, dividing the received / sent data and processed data into two queues: one queue on the CPU side for sending data to and receiving processed data from the DSP side, and another queue on the DSP side for performing convolution operations. The asynchronous queue is used to store the depth measurement data transmitted from the CPU.
[0051] S302: The DSP reads depth measurement data from the asynchronous queue and performs convolution processing on the depth measurement data to generate data processing results.
[0052] Understandably, when dealing with large amounts of data, convolution processing on the CPU consumes a significant amount of time and computing resources, resulting in long processing times per frame and a low frame rate. Furthermore, power consumption is difficult to control, leading to substantial power consumption. Therefore, this embodiment employs a DSP to perform convolution processing on the depth measurement data, and then feeds the convolution calculation results, i.e., the data processing results, back to the CPU.
[0053] S303: The CPU obtains the data processing results through the asynchronous queue interface, and determines the depth of the target under test based on the data processing results using a peak-finding algorithm.
[0054] In this application, the CPU reads data from the DTOF chip, transmits the read depth measurement data to the DSP, the DSP performs convolution calculations, and then the CPU reads the data processing results from the DSP. Based on these results, the CPU determines the depth value of the target in the original frame of data. Since the CPU processes one frame of image data at a time, and an image consists of multiple frames, the CPU and DSP process the data in parallel, effectively improving data processing efficiency and efficiently calculating the depth of the target. The principle by which the CPU determines the depth of the target using a peak-finding algorithm based on the data processing results is as follows: Figure 4 As shown, the so-called peak-finding process is as follows: when the number of photons emitted by the module returns after encountering the target object, the distance between the module and the target object is the point in the histogram where the number of photons received is the highest. In other words, the point in the histogram where the number of photons is the highest is the depth of the target object.
[0055] In the technical solution provided in this embodiment of the invention, the CPU uses an asynchronous queue interface pre-set on the DSP to input raw data into the DSP, and the DSP performs convolution operations on the raw data, thereby removing the computationally intensive convolution operation from the CPU, without occupying the CPU's processing time and computing resources, and effectively reducing the CPU's power consumption. The CPU continuously places the raw data to be calculated for each frame on the asynchronous queue interface, the DSP performs convolution processing on the raw data of that frame, and then the CPU reads the convolution calculation result. The CPU and DSP execute data processing tasks in parallel, effectively improving the CPU's data processing speed and significantly improving the calculation efficiency of the depth information of the target under test, thereby reducing the system's power consumption and meeting the user's high-efficiency depth measurement needs.
[0056] To further improve data processing efficiency, based on the above embodiments, this application may also include the following:
[0057] The DSP receives a new frame of depth measurement data, sends the data processing result corresponding to the previous frame of depth measurement data, and performs convolution processing on the new frame of depth measurement data. At the same time, the CPU receives the data processing result corresponding to the previous frame of depth measurement data through the asynchronous queue interface, and determines the depth of the target to be measured based on the previous frame of depth measurement data using a peak finding algorithm.
[0058] Taking depth measurement data as histogram data as an example, the DSP receives the first frame of raw histogram data, performs convolution processing on the histogram data, and obtains the first frame of convolved histogram data. When the DSP receives the second frame of raw histogram data, it sends the first frame of convolved histogram data and simultaneously performs convolution processing on the second frame of raw histogram data, obtaining the second frame of convolved histogram data. While the DSP performs convolution on the second frame of raw histogram data, the CPU calls the asynchronous queue interface to receive the first frame of convolved histogram data. Based on the first frame of convolved histogram data, the CPU obtains the depth of the target in the first frame of data through a peak-finding algorithm. The DSP receives the Nth frame of raw histogram data, performs convolution processing on it, and obtains the Nth frame of convolved histogram data. Simultaneously, the CPU calls the interface to receive the (N-1)th frame of convolved histogram data. Based on the (N-1)th frame of convolved histogram data, the CPU obtains the depth of the target corresponding to the (N-1)th frame of data through a peak-finding algorithm. The above process continues until all frames of data read by the CPU from the DTOF chip have been processed.
[0059] Furthermore, to improve data processing efficiency and more efficiently determine the depth of the target under test, based on the above embodiments, such as Figure 5 As shown, this application may include the following:
[0060] The DSP pre-constructs the same number of threads as the total number of exposure partitions of the DTOF chip; the DSP reads a frame of depth measurement data from the asynchronous queue and determines the sub-measurement data corresponding to each exposure partition from the depth measurement data; the DSP sends each sub-measurement data to the corresponding thread to perform parallel convolution calculation on each sub-measurement data; the DSP generates the data processing result based on the convolution calculation result of each sub-measurement data.
[0061] In this embodiment, the DTOF chip is a sensor with zoned exposure. For a DTOF chip with M exposure zones, M threads are constructed. The DSP receives a frame of raw histogram data and sends the raw histogram data of the frame to the corresponding thread according to the M zone data. In each thread, parallel convolution calculation is performed on the M zone data. The convolution calculation results of the M zone data are merged into a frame of data, which is used as the data processing result of the frame data.
[0062] In this embodiment, the DSP reads depth measurement data from an asynchronous queue and performs parallel convolution processing on the depth measurement data to accelerate the convolution operation time of each frame of data and improve the efficiency of depth calculation.
[0063] It is understandable that different application scenarios or different users have specific data type requirements. Related technologies all add extra operations to convert data types after completing the convolution calculation, which is time-consuming and not conducive to meeting users' needs for efficient depth computing. Based on this, this application also provides the following embodiments:
[0064] When a data type conversion instruction is received, the target data type is obtained;
[0065] While performing convolution calculations on the corresponding sub-measurement data, each thread converts the data type of each sub-measurement data to the target data type.
[0066] The target data type is the specific data type required by the user, such as uint32. If the original data is uint8, then while performing parallel convolution calculations on each sub-measurement data, the original data type uint8 can be converted into the data type uint32 required by the customer without any additional operations, effectively improving the efficiency of data type conversion.
[0067] To further reduce system power consumption, based on the above embodiments, during the initialization process of the DSP, the operating frequency of the DSP can be set through the frequency configuration interface to minimize the power consumption of the entire DSP operation, thereby reducing the power consumption of the entire deep learning process.
[0068] To enable those skilled in the art to more clearly understand the technical solution of this application, this application also incorporates... Figure 5 A schematic example is provided. In this embodiment, the DSP and CPU are mounted on the same development board. The DTOF chip connected to the CPU uses a partitioned exposure method, dividing all SPADs into four batches for exposure. After the four partitioned exposures are completed, the data is then synthesized into a single frame. The DSP's convolution operation is implemented based on Qualcomm's Hexagon SDK (Software Development Kit). The original depth measurement data is uint8 histogram data, and the user-specified data type is uint32. This schematic embodiment may include the following:
[0069] During initialization, the Hexagon frequency configuration interface is used. The CPU obtains the raw histogram data (uint8) from the DTOF chip and transmits it to the DSP via the asynchronous queue interface in the Hexagon SDK. The DSP receives the raw histogram data and divides it into four partitions. Each partition is then fed into a thread function provided by the Qualcomm Hexagon SDK for computation. Each partition is processed in a separate thread, allowing simultaneous computation of all four partitions, thus compressing the processing time for one frame of data by a factor of four. Parallel convolution computation can be achieved using the Hexagon HVX instruction set, employing instructions for data vectorization, initialization, shifting, alignment, combination, sorting, parallel multiplication, and accumulation. This enables simultaneous computation of 128-bit data, effectively improving the efficiency of convolution. Furthermore, during convolution computation, the uint8 data can be converted to uint32, further improving conversion efficiency. After the calculation is completed, the calculation result (uint32) is passed to the CPU. The CPU then obtains the depth data through the peak finding algorithm, thus efficiently completing the depth calculation process.
[0070] This invention also provides a corresponding system for the target depth determination method, further enhancing the method's practicality. The target depth determination system provided in this invention is described below; the target depth determination system described below corresponds to the target depth determination method described above.
[0071] From the perspective of functional modules, see Figure 6 , Figure 6 A structural diagram of a target depth determination system provided in an embodiment of the present invention, wherein the system may include:
[0072] The system consists of a DTOF chip 601, a CPU 602, and a DSP 603; the DTOF chip 601 is connected to the CPU 602, and the DSP 603 is connected to the CPU 602.
[0073] The DTOF chip 601 includes a SPAD array, which comprises multiple groups of SPADs, each group serving as an exposure partition to achieve multiple batch exposures. The DTOF chip 601 is used to measure the depth of the target under test and send the depth measurement data to the CPU 602. The CPU 602 is used to input the depth measurement data of the target under test into the asynchronous queue of the DSP 603 via an asynchronous queue interface, and to obtain the data processing results through the asynchronous queue interface. Based on the data processing results, a peak-finding algorithm is used to determine the depth of the target under test. The DSP 603 is used to read the depth measurement data from the asynchronous queue and perform convolution processing on the depth measurement data to generate the data processing results.
[0074] Optionally, in some embodiments of this example, the DSP603 described above can also be used to send the data processing result corresponding to the previous frame of depth measurement data when a new frame of depth measurement data is received, and to perform convolution processing on the new frame of depth measurement data.
[0075] As an optional embodiment of the above embodiments, the CPU 602 can also be used to receive the data processing result corresponding to the depth measurement data of the previous frame through an asynchronous queue interface while the DSP 603 performs convolution processing on the new frame of depth measurement data, and determine the depth of the target to be measured based on the previous frame of depth measurement data through a peak finding algorithm.
[0076] Optionally, in some other embodiments of this example, the DSP603 described above can be further used to set the operating frequency through a frequency configuration interface during the initialization process.
[0077] Optionally, in some further embodiments of this example, the DSP603 may further include:
[0078] The thread pre-construction module is used to pre-construct the same number of threads as the total number of exposure partitions of the DTOF chip 601;
[0079] The data receiving module is used to read a frame of depth measurement data from the asynchronous queue and determine the sub-measurement data corresponding to each exposure zone from the depth measurement data;
[0080] The parallel computing module is used to send each sub-measurement data to the corresponding thread to perform parallel convolution calculations on each sub-measurement data;
[0081] The depth calculation module is used to generate data processing results based on the convolution calculation results of each sub-measurement data.
[0082] The functions of each module of the target depth determination system described in this embodiment of the invention can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above method embodiments, and will not be repeated here.
[0083] As can be seen from the above, the embodiments of the present invention can effectively reduce the system's power consumption and meet the user's needs for efficient depth measurement.
[0084] It is understood that if the target depth determination method in the above embodiments is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes: USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, removable disk, CD-ROM, magnetic disk or optical disk, and other media capable of storing program code.
[0085] Based on this, embodiments of the present invention also provide a readable storage medium storing a computer program, wherein when the computer program is executed by a corresponding processor, the steps of the target depth determination method described in any of the above embodiments are as follows.
[0086] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the hardware disclosed in the embodiments, including devices and electronic equipment, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0087] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0088] The above provides a detailed description of a method and system for determining the depth of a target provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this invention, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method of determining the depth of a target, characterized by, include: The CPU transmits the depth measurement data of the target to the DSP's asynchronous queue through the asynchronous queue interface; The depth measurement data is the raw histogram data read by the CPU from the DTOF chip. The DTOF chip includes a SPAD array, which includes multiple groups of SPADs. Each group of SPADs serves as an exposure partition to achieve multiple batch exposures. An asynchronous queue interface is pre-configured on the DSP, and an asynchronous queue is constructed. The asynchronous queue interface is used for data interaction between the CPU and the DSP. The received data / sent data and processed data are divided into two queues. The CPU-side queue is used to send data to the DSP and receive data processed by the DSP. The DSP-side queue is used to perform convolution operations. The DSP pre-constructs the same number of threads based on the total number of exposure partitions of the DTOF chip; the DSP reads a frame of depth measurement data from the asynchronous queue and determines the sub-measurement data corresponding to each exposure partition from the depth measurement data; the DSP sends each sub-measurement data to the corresponding thread to perform parallel convolution calculation on each sub-measurement data; the DSP generates data processing results based on the convolution calculation results of each sub-measurement data. The DSP receives a new frame of depth measurement data, sends the data processing result corresponding to the previous frame of depth measurement data, and performs convolution processing on the new frame of depth measurement data; at the same time, the CPU receives the data processing result corresponding to the previous frame of depth measurement data through the asynchronous queue interface, and determines the depth of the target to be measured based on the previous frame of depth measurement data using a peak finding algorithm.
2. The method of depth determination of a target according to claim 1, wherein, The parallel convolution calculation for each sub-measurement data includes: When a data type conversion instruction is received, the target data type is obtained; While performing convolution calculations on the corresponding sub-measurement data, each thread converts the data type of each sub-measurement data to the target data type.
3. The method of depth determination of a target according to claim 1 or 2, characterized in that, Before the DSP pre-constructs the same number of threads based on the total number of exposure partitions of the DTOF chip, it also includes: During the initialization process, the DSP sets its operating frequency through the frequency configuration interface.
4. A depth determination system for a target, characterized by The system includes a DTOF chip, a DSP, and a CPU. The DTOF chip is connected to the CPU, and the DSP is also connected to the CPU. An asynchronous queue interface is pre-configured on the DSP, and an asynchronous queue is constructed. This asynchronous queue interface is used for data interaction between the CPU and the DSP, dividing received / sent data and processed data into two queues. The CPU-side queue is used to send data to the DSP and receive processed data from the DSP. The DSP-side queue is used to perform convolution operations. The DTOF chip includes a SPAD array, which comprises multiple groups of SPADs, each group serving as an exposure partition to achieve multiple batch exposures. The DTOF chip is used to perform depth measurement on the target under test and send the depth measurement data of the target under test to the CPU; the depth measurement data is the raw histogram data read by the CPU from the DTOF chip; The CPU is used to transmit the depth measurement data of the target to be measured to the asynchronous queue of the DSP through the asynchronous queue interface; The DSP is configured to receive a new frame of depth measurement data, send the data processing result corresponding to the previous frame of depth measurement data, and perform convolution processing on the new frame of depth measurement data; the CPU, while the DSP is performing convolution processing on the new frame of depth measurement data, receives the data processing result corresponding to the previous frame of depth measurement data through the asynchronous queue interface, and determines the depth of the target to be measured based on the previous frame of depth measurement data using a peak-finding algorithm; the DSP further includes: The thread pre-construction module is used to pre-construct the same number of threads as the total number of exposure partitions of the DTOF chip; The data receiving module is used to read a frame of depth measurement data from the asynchronous queue and determine the sub-measurement data corresponding to each exposure zone from the depth measurement data; The parallel computing module is used to send each sub-measurement data to the corresponding thread to perform parallel convolution calculations on each sub-measurement data; The depth calculation module is used to generate data processing results based on the convolution calculation results of each sub-measurement data.
5. The target depth determination system according to claim 4, characterized in that, The DSP is also used to set the operating frequency through a frequency configuration interface during the initialization process.
Citation Information
Patent Citations
Desktop supercomputing hardware platform based on DSP and FPGA multi-co-processing card
CN108710596A
Object recognition method and device based on depth image, equipment and storage medium
CN109697444A