Efficient KNN method for single-frame point cloud of lidar and its application

Through the data structure based on point cloud projection and distance scale, combined with FPGA acceleration, reorganization and parallel processing of lidar point cloud data, the problem of insufficient speed of KNN algorithm in intelligent driving is solved, and efficient KNN search is achieved, suitable for positioning and mapping tasks in unmanned driving.

CN115963471BActive Publication Date: 2025-08-22SHANGHAI TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310016208.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-06
Publication Date
2025-08-22
Estimated Expiration
2043-01-06

AI Technical Summary

Technical Problem

The existing KNN algorithms are not running at a sufficient speed in intelligent driving scenarios, especially when large-scale point cloud data processing is used too long to meet the needs of high-speed driving.

Method used

Through data structures based on point cloud projection and distance scale, point cloud data is reorganized and indexed arrays are constructed, combined with FPGA acceleration to achieve efficient KNN method, and parallel construction of new data structures and dynamic caches are used for rapid search.

Benefits of technology

It realizes efficient KNN search in lidar single-frame point cloud, improves operating speed and energy efficiency, and is suitable for positioning and mapping tasks in unmanned driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115963471B_ABST
    Figure CN115963471B_ABST
Patent Text Reader

Abstract

This invention discloses an efficient KNN method for single-frame laser radar point clouds. Another technical solution of the invention provides an application of the aforementioned efficient KNN method for single-frame laser radar point clouds, characterized in that the aforementioned efficient KNN method for single-frame laser radar point clouds is accelerated using an FPGA. The invention establishes a data structure based on point cloud projection and distance scales, which ensures that adjacent points in space are organized in adjacent storage. The invention efficiently constructs a new data structure and provides an efficient closest point search method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a KNN method applied to a laser radar single-frame point cloud and its implementation on FPGA. Background Art

[0002] K-nearest neighbor search (KNN) is to find the K points closest to the target point from the reference point cloud. In intelligent driving technology, the KNN algorithm is widely used in target detection, positioning and mapping [1][2]. Generally speaking, the KNN algorithm is divided into two parts: establishing an efficient data structure and creating a fast search method. Although existing algorithms have optimized KNN in terms of search [3-5], the running speed is still not enough to meet the high-speed driving scenarios of intelligent driving. At the same time, with the development of lidar technology, the size of point clouds has increased exponentially [6], causing the KNN algorithm to consume more time. Therefore, how to efficiently implement the KNN algorithm becomes crucial.

[0003] Existing technologies have explored the above problems from different directions. KD-tree[7] is the most widely used KNN algorithm. It uniquely proposes a tree structure, which first divides the space and then compares to obtain the tree nodes where the candidate points are located. However, it needs to compare continuously to obtain the division boundaries, which consumes a lot of time and causes the creation of data structures to take too long. Even though [3][8][9] have optimized KD-tree in terms of establishment, search, and power consumption, the establishment time still cannot meet the high-speed scenario. [5] proposed a new data structure DSVS, which has been improved in both establishment and search compared to the previous ones, but its energy efficiency on the GPU platform is not ideal.

[0004] References

[0005] [1] Zhang, Ji, and Sanjiv Singh. "LOAM: Lidar odometry and mapping inreal-time." Robotics: Science and Systems. Vol. 2. No. 9. 2014.

[0006] [2]Shan,Tixiao,and Brendan Englot."Lego-loam:Lightweight and ground-optimized lidar odometry and mapping on variable terrain."2018 IEEE / RSJInternational Conference on Intelligent Robots and Systems(IROS).IEEE,2018.

[0007] [3]Pinkham,Reid,Shuqing Zeng,and Zhengya Zhang."Quicknn:Memory andperformance optimization of kd tree based nearest neighbor search for 3dpoint clouds."2020 IEEE International Symposium on High Performance ComputerArchitecture(HPCA).IEEE,2020.

[0008] [4]Kosuge,Atsutake,et al."An SoC-FPGA-based iterative-closest-pointaccelerator enabling faster picking robots."IEEE Transactions on IndustrialElectronics 68.4(2020):3567-3576.

[0009] [5]Sun,Hao,et al."Efficient FPGA implementation of K-nearest-neighborsearch algorithm for 3D LIDAR localization and mapping in smart vehicles."IEEE Transactions on Circuits and Systems II:Express Briefs 67.9(2020):1644-1648.

[0010] [6]Carballo, Alexander, et al. "LIBRE: The multiple 3d lidar dataset." 2020IEEE Intelligent Vehicles Symposium(IV). IEEE, 2020.

[0011] [7] Greenspan, Michael, and Mike Yurick. "Approximate kd tree search for efficient ICP." Fourth International Conference on 3-D Digital Imaging and Modeling, 2003. 3DIM 2003. Proceedings.. IEEE, 2003.

[0012] [8] Li, Zonghui, Tong Wang, and Yangdong Deng. "Fully parallel kd-treeconstruction for real-time ray tracing." Proceedings of the 18th meeting of the ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games. 2014.

[0013] [9]Liu, Summary of the Invention

[0014] The purpose of the present invention is to implement the KNN algorithm efficiently.

[0015] In order to achieve the above object, a technical solution of the present invention is to provide an efficient KNN method applied to a single-frame point cloud of a laser radar, characterized by comprising the following steps:

[0016] Step 1: Obtain disordered point cloud data through the lidar. For any point (x, y, z), use the horizontal and vertical resolution of the lidar to project it into the matrix. The horizontal coordinate of the point (x, y, z) in the matrix is ​​calculated as h = arctan (y / x) / Δβ, and the vertical coordinate of the point (x, y, z) in the matrix is Δβ represents the angular resolution of the lidar in the horizontal direction, and Δα represents the angular resolution of the lidar in the vertical direction;

[0017] Step 2: Calculate the distance r from the point (x, y, z) to the lidar, and divide the point (x, y, z) into the corresponding distance dimension according to the distance r and the distance range corresponding to the predetermined different distance dimensions;

[0018] Step 3: Divide each column of the matrix obtained in step 1 into N p data blocks;

[0019] Step 4: Calculate the distance dimension corresponding to each point in each data block using step 2, count the number of points on each distance dimension in each data block in the matrix, and record them in a statistical table;

[0020] Step 5: According to the statistical table obtained in step 4, the index position of the first point on each distance dimension in different data blocks is obtained, thereby obtaining an index table;

[0021] Step 6: Rearrange all points according to the index table obtained in step 5 to obtain ordered point cloud data;

[0022] Step 7: For the target point p(x p ,y p ,z p ), find K adjacent points in the ordered point cloud data obtained in step 6, including the following steps:

[0023] Step 701: Determine the target point p(x p ,y p ,z p ) at position v in the matrix q 、h q , and use the method described in step 2 to determine the target point p(x p ,y p ,z p ) and the distance r from the laser radar q ;

[0024] Step 702: narrow the search range according to the target range, and the size of the matrix after narrowing is [v q ±arcsin(r in / rq ) / Δα,h q ±arcsin(r in / r q ) / Δβ], the range in the distance dimension is R q ±R in , where r in Indicates the search range, R q Represents the distance dimension of the target point p, R in Represents r in The corresponding distance dimension;

[0025] Step 703: For each candidate point in the obtained reduced area, calculate the Euclidean distance between the candidate point and the target point and sort them to obtain the nearest K points.

[0026] Preferably, in step 2, the distance r from the point (x, y, z) to the laser radar is calculated using the following formula:

[0027] Another technical solution of the present invention is to provide an application of the above-mentioned efficient KNN method applied to a single-frame point cloud of a laser radar, characterized in that the above-mentioned efficient KNN method applied to a single-frame point cloud of a laser radar is accelerated by FPGA.

[0028] Compared with the prior art, the innovation of the present invention lies in:

[0029] (1) Data structure based on point cloud projection and distance scale. The reference point cloud is reorganized into a new point cloud set based on the projection position and the distance from the radar. At the same time, an index array is obtained, which constitutes the new data structure in this method. This structure ensures that adjacent points in space are also organized in adjacent storage.

[0030] (2) Efficiently construct a new data structure. During the projection process, this method does not use traditional calculation methods. Instead, it establishes a lookup table based on the characteristics of the laser point cloud. By replacing calculations with comparisons, efficient projection is achieved. At the same time, this method divides the projection matrix to achieve parallel construction of the new data structure.

[0031] (3) Efficient closest point search method. Based on the new data structure, we first narrow the search range according to the target search interval; secondly, we create a dynamic cache and place the candidate points in it for parallel calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 : is the overall block diagram of the KNN accelerator in this embodiment;

[0033] Figure 2(a) to Figure 2(c)The data structure is constructed as shown in Figure 2(a), where Figure 2(b) shows the top view of the point cloud, and Figure 2(c) shows the distance dimension division.

[0034] Figure 3(a) to Figure 3(c) The obtained data structure is illustrated, where Figure 3(a) illustrates the point count in the same distance dimension, Figure 3(b) illustrates the index table in the data structure, and Figure 3(c) illustrates the point cloud rearrangement. DETAILED DESCRIPTION

[0035] Below in conjunction with specific embodiment, further set forth the present invention.Should be understood that these embodiments are only used to illustrate the present invention and are not used in limiting the scope of the present invention.In addition, should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall equally within the scope limited by the appended claims of the application.

[0036] This embodiment discloses an efficient KNN method for a single-frame point cloud of a laser radar, comprising the following steps:

[0037] Step 1: Obtain unordered point cloud data through LiDAR. For any point (x, y, z), use the LiDAR’s horizontal and vertical resolution to project it into the matrix, as shown in Figure 2(a). The horizontal coordinate of the point (x, y, z) in the matrix is ​​calculated as h = arctan (y / x) / Δβ, and the vertical coordinate of the point (x, y, z) in the matrix is ​​v = Among them, Δβ represents the angular resolution of the lidar in the horizontal direction, and Δα represents the angular resolution of the lidar in the vertical direction.

[0038] Step 2: Calculate the distance from the point (x, y, z) to the lidar And according to the distance r and the predetermined distance ranges corresponding to the different distance dimensions, the point (x, y, z) is divided into the corresponding distance dimension, as shown in Figures 2(b) and 2(c).

[0039] Step 3: Divide each column of the matrix obtained in step 1 into N p data blocks.

[0040] Step 4: Use step 2 to calculate the distance dimension corresponding to each point in each data block, count the number of points on each distance dimension in each data block in the matrix, and record them in the statistical table. The statistical table records the number of points on different distance dimensions in different data blocks, as shown in Figure 3(a).

[0041] Step 5: Based on the statistical table obtained in Step 4, the index position of the first point in each distance dimension in different data blocks is obtained, as shown in Figure 3(b), thereby obtaining an index table. In this embodiment, if there are multiple points in the same distance dimension in the same data block, any one of the multiple points is determined as the first point. Alternatively, the first point among the multiple points can be determined as the first point based on the time at which the point was received.

[0042] Step 6: Rearrange all points according to the index table obtained in step 5 to obtain ordered point cloud data, as shown in Figure 3(c), thereby ensuring that adjacent points in space are organized in adjacent storage.

[0043] Step 7: For the target point p(x p ,y p ,z p ), find K adjacent points in the ordered point cloud data obtained in step 6, including the following steps:

[0044] Step 701: Determine the target point p(x p ,y p ,z p ) at position v in the matrix q 、h q , and use the method described in step 2 to determine the target point p(x p ,y p ,z p ) and the distance r from the laser radar q ;

[0045] Step 702: narrow the search range according to the target range, and the size of the matrix after narrowing is [v q ±arcsin(r in / r q ) / Δα,h q ±arcsin(r in / r q ) / Δβ], the range in the distance dimension is R q ±R in , where r in Indicates the search range, R q Represents the distance dimension of the target point p, R in Represents r in The corresponding distance dimension;

[0046] Step 703: For each candidate point in the obtained reduced area, calculate the Euclidean distance between the candidate point and the target point and sort them to obtain the nearest K points.

[0047] This method can be used for LiDAR point cloud-based positioning and mapping in autonomous driving, quickly completing the nearest search within a single point cloud frame. FPGA acceleration also allows for better real-time performance and reduced energy consumption.

Claims

1. An efficient KNN method applied to single-frame point cloud of LiDAR, characterized by: The following steps are involved: Step 1: Obtain unordered point cloud data through the lidar. For any point (x, y, z), use the horizontal and vertical resolution of the lidar to project it into the matrix, where the horizontal coordinate of the point (x, y, z) in the matrix is ​​calculated as h = arctan (y / x) / Δβ, and the vertical coordinate of the point (x, y, z) in the matrix is Δβ represents the angular resolution of the lidar in the horizontal direction, and Δα represents the angular resolution of the lidar in the vertical direction; Step 2: Calculate the distance r from the point (x, y, z) to the lidar, and divide the point (x, y, z) into the corresponding distance dimension according to the distance r and the distance range corresponding to the predetermined different distance dimensions; Step 3: Divide each column of the matrix obtained in step 1 into N p data blocks; Step 4: Calculate the distance dimension corresponding to each point in each data block using step 2, count the number of points on each distance dimension in each data block in the matrix, and record them in a statistical table; Step 5: According to the statistical table obtained in step 4, the index position of the first point on each distance dimension in different data blocks is obtained, thereby obtaining an index table; Step 6: Rearrange all points according to the index table obtained in step 5 to obtain ordered point cloud data; Step 7: For the target point p(x p ,y p , z p ), find K adjacent points in the ordered point cloud data obtained in step 6, including the following steps: Step 701: Determine the target point p(x p ,y p , z p ) at position v in the matrix q 、h q , and use the method described in step 2 to determine the target point p(x p ,y p , z p ) and the distance r from the laser radar q ; Step 702: narrow the search range according to the target range, and the size of the matrix after narrowing is [v q ±arcsin(r in / r q ) / Δα,h q ±arcsin(r in / r q ) / Δβ], the range in the distance dimension is R q ±R in , where r in Indicates the search range, R q Represents the distance dimension of the target point p, R in Represents r in The corresponding distance dimension; Step 703: For each candidate point in the obtained reduced area, calculate the Euclidean distance between the candidate point and the target point and sort them to obtain the nearest K points.

2. The efficient KNN method applied to a single-frame point cloud of a laser radar according to claim 1, characterized in that: In step 2, the distance r from the point (x, y, z) to the lidar is calculated using the following formula:

3. An application method of the efficient KNN method for laser radar single-frame point cloud according to claim 1, characterized in that: The efficient KNN method applied to a single-frame point cloud of a lidar as claimed in claim 1 is accelerated by FPGA.