A bit series-based point cloud data near neighbor search optimization method
Patent Information
- Application Number
- CN202310698942.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-13
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-06-13
AI Technical Summary
[0005]针对现有点云近邻搜索方法在未充分利用点云数据比特数据层次的特性问题,本发明提供一种基于比特串行的点云数据近邻搜索优化方法
[0006] The technical solution adopted by this invention to solve the technical problem is as follows:
Smart Images

Figure CN117009410B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of nearest neighbor search for point cloud data, and specifically to a bit-serial-based optimization method for nearest neighbor search of point cloud data. Background Technology
[0002] Point clouds are collections of points representing physical objects or 3D scenes. Point clouds can reflect the spatial characteristics of objects, and therefore have wide applications in fields such as robotics, autonomous driving, augmented reality (AR), and virtual reality (VR). Similar to image processing, point cloud processing also has various specific applications, such as simultaneous localization and mapping (SLAM), object classification, semantic segmentation, and object detection.
[0003] However, typical autonomous driving scenarios require programs to process point clouds of tens of thousands of points within a limited time, placing high demands on the real-time performance of point cloud processing. Furthermore, with technological advancements, the scale of the point clouds that need to be processed is constantly increasing. Currently, the latest generation of sensors generates up to 4.8 million points per second. Such a large-scale point cloud further places higher demands on the real-time performance, computational efficiency, and hardware power consumption of point cloud processing.
[0004] In large-scale point cloud processing, nearest neighbor search is an essential step. Currently, point cloud nearest neighbor search often employs a KD-tree-based method, which first divides the point cloud data into different subspaces using a KD-tree, and then traverses some subspaces of the KD-tree based on the distance relationship between the search point and the current node in the KD-tree. While this method is more efficient than the traditional double-loop algorithm, the calculation and comparison of Euclidean distance between points are performed in bit-parallel mode, ignoring the characteristics of point cloud data at the bit data level, leaving room for further optimization. This invention proposes a bit-serialized nearest neighbor search method for point cloud data. This method simplifies the multiplication operations in the Euclidean distance calculation process using a series of simple operations such as addition, subtraction, and shifting, and terminates the calculation early based on numerical relationships, thereby improving the computational efficiency of nearest neighbor search for point cloud data. Summary of the Invention
[0005] To address the problem that existing point cloud nearest neighbor search methods do not fully utilize the characteristics of bit-level point cloud data, this invention provides an optimized point cloud data nearest neighbor search method based on bit-serialization.
[0006] The technical solution adopted by this invention to solve the technical problem is as follows:
[0007] Let the input data of the algorithm be the search point set and the reference point set, and the nearest neighbor set be initialized as an empty set. The nearest neighbor search process of the point cloud is to find the nearest point in the reference point set for each point in the search point set. Specifically, each time, a search point is taken from the search point set, and some or all of the data points in the reference point set are selected as the nearest neighbor reference point set for that search point. The temporary minimum Euclidean distance squared and the necessary information of the temporary nearest neighbor points are initialized. For each point in the search set, the temporary minimum Euclidean distance squared and the necessary information of the temporary nearest neighbor points are updated using a bit-serial method. After traversing all points in the nearest neighbor reference set, the necessary information of the temporary nearest neighbors is obtained, and they are added to the nearest neighbor set in the order of the search point processing. After traversing all points in the search point set, the i-th data point in the nearest neighbor set is the nearest neighbor point corresponding to the i-th search point.
[0008] Preferred, the method for updating the temporary minimum Euclidean distance squared and the necessary information of the temporary nearest neighbor using a bit-serial method includes: calculating the Euclidean distance squared bit by bit based on a bit-serial method, determining whether the cutoff condition is met, if the condition is met, it means that the Euclidean distance squared between the point and the search point is greater than the temporary minimum Euclidean distance squared; otherwise, proceeding to the next bit of distance calculation, if the cutoff condition is still not met after calculating to the last bit, then updating the currently calculated Euclidean distance squared to the temporary minimum Euclidean distance squared and updating the necessary information of the current search point to the temporary nearest neighbor.
[0009] Furthermore, the method for calculating the square of the Euclidean distance between two points bit by bit based on a bit-sequential approach includes: calculating the square of the Euclidean distance bit by bit based on a bit-sequential approach, determining whether the cutoff condition is met, and if the condition is met, indicating that the square of the Euclidean distance between the point and the search point is greater than the temporary minimum square of the Euclidean distance; otherwise, proceeding to calculate the distance of the next bit; if the cutoff condition is still not met after calculating to the last bit, then updating the currently calculated square of the Euclidean distance to the temporary minimum square of the Euclidean distance and updating the necessary information of the current search point to the temporary nearest neighbor point.
[0010] Furthermore, the process of calculating the squared Euclidean distance between two points bit by bit based on the bit-serial method includes: for an n-dimensional point whose data has been calculated up to the i-th bit, calculating the squared distance of the i-th bit of each dimension based on the bit-serial method, and then summing the squared distances of the n dimensions.
[0011] Furthermore, the numerical data types involved in the bit-by-bit calculation of the square of the Euclidean distance based on the bit-serial method include: data types supporting the calculation of the square of the Euclidean distance between two points of the same data type, including: signed fixed-point numbers, unsigned fixed-point numbers, signed integers, and unsigned integers. The number of bits in the data is m.
[0012] Furthermore, when calculating the squared Euclidean distance bit by bit using a bit-sequential method, the cutoff condition is determined as follows: Let the squared Euclidean distance and auxiliary number of the first i bits (including the i-th bit) from high to low in the k-th dimension be r and r, respectively. i,k ,s i,k Let d be the current minimum squared Euclidean distance. Let d be the cutoff threshold when calculating up to the i-th position. If e > d, then the cutoff condition is met; otherwise, it is not.
[0013] Furthermore, the method for calculating the squared distance for each dimension using a bit-sequential approach includes: Let r be the squared Euclidean distance of the first i bits (including the i-th bit) from high to low, and r be the auxiliary number. i ,s i The difference between the values of the i-th bit in each dimension between two points is t. i ,but s i =s i-1 +t i << 1, where r0, s0 are 0.
[0014] Furthermore, in the process of calculating the square of the distance between two points of the same data type using a bit-serial method, the difference of the i-th bit value from high to low is t. i The method includes: Let the values of the i-th bit be a and b, then the values of a and b are either 0 or 1. If the data type is a signed fixed-point number or a signed integer and i equals 1, w i =ba, otherwise, w i =ab; then t i =w i <<(mi). Attached Figure Description
[0015] Figure 1 This is a flowchart of the bit-serial-based nearest neighbor search optimization method for point cloud data provided by the present invention.
[0016] Figure 2 This is an overall schematic diagram of the search iteration between the first search point and the first two reference points in one embodiment of the present invention.
[0017] Figure 3 This is a schematic diagram illustrating the process of the first nearest neighbor search iteration for the first search point in an embodiment of the present invention.
[0018] Figure 4 This is a schematic diagram of the second nearest neighbor search iteration process for the first search point in one embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. It should be noted that the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the protection scope of this application.
[0020] Reference Figure 1 The flowchart shown illustrates that this invention provides a bit-serial-based point cloud nearest neighbor search optimization method, comprising: first, obtaining a search point set and a reference point set from the input; then, determining whether there are any uncalculated points in the search point set; if not, ending the search process; otherwise, extracting an uncalculated search point, selecting a portion or all of the data points from the reference point set as the reference point set for the search point, initializing the temporary minimum Euclidean distance squared and the necessary information of the temporary nearest neighbor points; if all reference points in the reference point set corresponding to the search point have not yet been traversed, extracting an untraversed reference point, and sequentially calculating the Euclidean distance squared between the search point and the reference point using a bit-serial method, with each calculation... For each reference point, the calculation is performed, and the cutoff condition is checked. If the cutoff condition is met, the calculation for this reference point ends directly. If the cutoff condition is not met, the calculation and cutoff condition check are repeated for the next reference point. If the cutoff condition is still not met after the last reference point, the necessary information of the temporary minimum Euclidean distance square and the temporary nearest neighbor is updated according to the numerical relationship between the square of the Euclidean distance and the temporary minimum Euclidean distance square. Then, the nearest neighbor calculation process for the next reference point is performed iteratively. If the reference point set corresponding to the search point is traversed, the temporary nearest neighbor is the nearest neighbor of the search point. The search result is added to the search result set, and the nearest neighbor calculation process for the next search point is performed iteratively.
[0021] Figure 2 This is a schematic diagram illustrating the iterative nearest neighbor search process of the first search point with respect to the first and second reference points, according to an embodiment of the present invention. For ease of representation, this embodiment uses a two-dimensional point cloud, and the data range is limited to 4-bit unsigned integers. It should be emphasized that the typical application of this invention is often a three-dimensional point cloud, and the data type can be signed fixed-point numbers, unsigned fixed-point numbers, signed integers, or unsigned integers; the method is similar. Figure 2 As shown in (a), 16 points constitute all the point cloud data in this example. Based on the input data, the first search point A(14,3) is obtained, as follows. Figure 2 As shown in (b), a reference point B(9,1) is randomly selected from the set of reference points for nearest neighbor iterative search, and then, as follows: Figure 2 As shown in (c), a reference point C(9,7) is randomly selected from the set of reference points for nearest neighbor iterative search.
[0022] Figure 3 This is a schematic diagram of the first nearest neighbor search iteration process for the first search point according to an embodiment of the present invention. As the first nearest neighbor search iteration process corresponding to this search point, it is necessary to calculate the square of the bit-by-bit Euclidean distance down to the least significant bit, and update the temporary minimum Euclidean distance according to certain conditions. Specifically, for... Figure 2 The selected search point A and its corresponding first reference point B are as follows: Figure 3 As shown, the squared one-dimensional Euclidean distance between points A and B is calculated bit-by-bit using the following formula.
[0023] s i =s i-1 +t i <<1
[0024] After calculating the single dimension, the squared Euclidean distances of the first i bits of all dimensions are summed using the following formula to obtain the squared Euclidean distances of the first i bits between the search point and the current reference point.
[0025]
[0026] For each bit of data calculated, it is necessary to determine whether the temporary minimum Euclidean distance squared needs to be updated and other calculations of the current reference point should be terminated directly based on the following conditions. The initial value of d is the maximum distance within the current data range.
[0027] If the current calculation bit is already the last bit of the data, then update the temporary minimum Euclidean distance square and directly end other calculations for the current reference point.
[0028] If the cutoff threshold e corresponds to the square of the Euclidean distance of the first i digits i If >d, then other calculations for the current reference point will end immediately.
[0029] like Figure 3 As shown, the calculation proceeds digit by digit from the highest to the lowest according to the above formula. The cutoff threshold corresponding to the squared Euclidean distance of the first i digits obtained in each round is less than or equal to d. When calculating the last digit, the cutoff threshold corresponding to the squared Euclidean distance of the search point A from the reference point B is still less than the temporary minimum squared Euclidean distance d = 450. Therefore, d is updated to the current squared Euclidean distance of the search point A from the reference point B, which is 29.
[0030] Figure 4 This is an embodiment of the present invention describing the nearest neighbor search iterative process between the first search point and the second reference point. According to... Figure 2 (c) Sample point cloud data, the search point A and reference point C undergo a nearest neighbor search iterative process. Following the above calculation process, we can obtain... Figure 4In the iterative process, when calculating bit by bit to the 3rd bit, the cutoff threshold corresponding to the square of the Euclidean distance of the first 3 bits is 34, which is greater than d=29. Therefore, other calculations for the current reference point can be terminated, and the nearest neighbor search iterative calculation for the next reference point can be performed.
[0031] The present invention has been described in detail above using specific embodiments. It should be noted that the above content is merely a specific embodiment of the present invention and should not be used to limit the scope of the invention. Any modifications, substitutions, or improvements within the design concept of the present invention should be within the protection scope of the present invention.
Claims
1. A point cloud data nearest neighbor search optimization method based on bit serial computation, characterized in that, Includes the following steps: Let the input data of the algorithm be the search point set and the reference point set, and initialize the nearest neighbor set as an empty set. The nearest neighbor search process of the point cloud includes finding the nearest point in the reference point set for each point in the search point set. Each time, a search point is selected from the search point set, and some or all data points from the reference point set are chosen as the nearest neighbor reference point set for that search point. The temporary minimum Euclidean distance squared and the necessary information of the temporary nearest neighbors are initialized. For each point in the search set, the temporary minimum Euclidean distance squared and the necessary information of the temporary nearest neighbors are updated using a bit-serialized method. After traversing all points in the nearest neighbor reference set, the necessary information of the temporary nearest neighbors is obtained, and they are added to the nearest neighbor set sequentially according to the search point processing order. After traversing all points in the search point set, the nearest neighbor set is... The data is the first one. The nearest neighbor of each search point, where i is a positive integer; The process of updating the temporary minimum Euclidean distance squared and the necessary information of the temporary nearest neighbor using a bit-serial method includes the following steps: calculating the Euclidean distance squared bit by bit based on the bit-serial method, determining whether the cutoff condition is met. If the condition is met, it means that the Euclidean distance squared between the point and the search point is greater than the temporary minimum Euclidean distance squared. Otherwise, the distance calculation is performed for the next bit. If the cutoff condition is still not met after calculating the last bit, the currently calculated Euclidean distance squared is updated to the temporary minimum Euclidean distance squared, and the necessary information of the current search point is updated to the temporary nearest neighbor.
2. The point cloud data nearest neighbor search optimization method based on bit serial computation as described in claim 1, characterized in that, This includes the process of calculating the square of the Euclidean distance between two points bit by bit using a bit-sequential method, for calculating up to the _____. Bit data Dimensional point, for each dimension's first point The distance squared is calculated based on the bit serialization method, and then... The sum of the squares of the distances in each dimension, where n is a positive integer.
3. The point cloud data nearest neighbor search optimization method based on bit serial computation as described in claim 2, characterized in that, This includes calculating the squared distance for each dimension using a bit-serial method, and recording it from high to low. The squared Euclidean distance and auxiliary number of each bit are respectively The first dimension between two points The difference in bit values is ,but , ,in , All are 0.
4. The point cloud data nearest neighbor search optimization method based on bit serial computation as described in claim 1, characterized in that, This document describes the numerical data types involved in the bit-by-bit calculation of the square of the Euclidean distance using a bit-serial method. It supports calculating the square of the Euclidean distance between two points of the same data type, including: signed fixed-point numbers, unsigned fixed-point numbers, signed integers, and unsigned integers. The number of bits in the data is [number missing]. .
5. The point cloud data nearest neighbor search optimization method based on bit serial computation as described in claim 1, characterized in that, The determination of whether the cutoff condition is met includes, let's call the first... The squared Euclidean distance and auxiliary number of the first i bits of dimension are respectively , k is a positive integer, and the current minimum squared Euclidean distance is , calculate up to the th Cutoff threshold at bit 1 ,like If the condition is met, the cutoff condition is satisfied; otherwise, it is not.
6. The point cloud data nearest neighbor search optimization method based on bit serial computation as described in claim 3 or 4, characterized in that, This includes the process of calculating the square of the distance between two points of the same data type using a bit-serial method, from high to low. The difference in bit values is The calculation process, denoted as the first The bit values are respectively It can be seen that, and The value range is 0 or 1. If the data type is a signed fixed-point number or a signed integer, and... When the value is equal to 1, record the intermediate quantity. ,otherwise, ;but .
Citation Information
Patent Citations
Euclidean distance calculation method, module and multi-input-multi-output decoding device
CN104735003A
Position difference-based high-precision nearest neighbor search algorithm
CN106557780A