Three-dimensional point cloud clustering method, device, computer equipment and storage medium

By generating two-dimensional images and performing node encoding and parent node pointer removal processing, the problem of low efficiency of point cloud clustering in the traditional union-find algorithm is solved, parallel search and merge processing are realized, and the efficiency of three-dimensional point cloud clustering is significantly improved. efficiency.

CN116097303BActive Publication Date: 2024-09-17SHENZHEN DEEPROUTE AI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080103134.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2024-09-17
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

In the traditional point cloud clustering method, when using the union-find algorithm, the point cloud clustering efficiency is low due to sequential operation, and there may be a loop pointing problem that prevents the root node from being found, affecting the clustering efficiency.

Method used

By generating the graph data structure of the two-dimensional image, node encoding and parent node pointer removal are performed to achieve parallel search for root nodes and merge processing, improve the efficiency of point cloud clustering, and avoid circular pointing.

Benefits of technology

It improves the efficiency of three-dimensional point cloud clustering, avoids the problem of being unable to find the root node due to loop pointing, realizes parallel operations, and significantly improves the clustering speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116097303B
    Figure CN116097303B
Patent Text Reader

Abstract

A three-dimensional point cloud clustering method comprises: obtaining a three-dimensional point cloud; generating a two-dimensional image according to the three-dimensional point cloud, wherein a graph data structure of the two-dimensional image comprises a plurality of nodes and a parent node pointer corresponding to each node; encoding the nodes to obtain a node index identifier corresponding to each node; removing loop pointers in the graph data structure according to the node index identifier and the parent node pointer to obtain a graph data structure after the removal; searching for a root node corresponding to each point in the graph data structure after the removal in parallel according to the plurality of nodes and the parent node pointer corresponding to each node to obtain a plurality of root nodes; and merging the plurality of root nodes to obtain a clustering result corresponding to the three-dimensional point cloud.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a three-dimensional point cloud clustering method, device, computer equipment and storage medium. Background Art

[0002] LiDAR sensors can provide real-time and accurate three-dimensional scene information, have the inherent advantage of environmental perception, have a large range and high accuracy, and are widely used in unmanned driving, security monitoring, surveying and exploration, etc. The information obtained by LiDAR after scanning the target object is usually presented in the form of point cloud. To use LiDAR to identify and track the target object, it is often necessary to cluster the point cloud first and distinguish different target objects.

[0003] In traditional point cloud clustering methods, clustering can be achieved by determining the connectivity of point clouds, and union-find, as an algorithm for determining the connectivity of graph data structures, can be used to cluster point clouds. However, in the process of clustering point clouds using the union-find algorithm, since the union-find algorithm runs sequentially, the operation of each point in the point cloud needs to depend on the calculation result of the previous point, which will lead to low efficiency of point cloud clustering. Summary of the invention

[0004] According to various embodiments disclosed in the present application, a three-dimensional point cloud clustering method, apparatus, computer device, and storage medium are provided that can improve the efficiency of point cloud clustering.

[0005] A three-dimensional point cloud clustering method, comprising:

[0006] Get 3D point cloud;

[0007] Generate a two-dimensional image according to the three-dimensional point cloud, wherein the graph data structure of the two-dimensional image includes a plurality of nodes and a parent node pointer corresponding to each node;

[0008] Encode the nodes to obtain a node index identifier corresponding to each node;

[0009] According to the node index identifier and the parent node pointer, a circular pointer in the graph data structure is removed to obtain a graph data structure after the removal process;

[0010] According to the plurality of nodes and the parent node pointer corresponding to each node, the root node corresponding to each point is searched in parallel in the graph data structure after the removal process to obtain the plurality of root nodes; and

[0011] Multiple root nodes are merged to obtain a clustering result corresponding to the three-dimensional point cloud.

[0012] A three-dimensional point cloud clustering device, comprising:

[0013] An acquisition module, used to acquire three-dimensional point clouds;

[0014] A generating module, configured to generate a two-dimensional image according to the three-dimensional point cloud, wherein the graph data structure of the two-dimensional image includes a plurality of nodes and a parent node pointer corresponding to each node;

[0015] An encoding module, used to encode the nodes to obtain a node index identifier corresponding to each node;

[0016] A removal module, used for removing the loop pointer in the graph data structure according to the node index identifier and the parent node pointer, to obtain a graph data structure after the removal process;

[0017] A search module, configured to search in parallel for a root node corresponding to each point in the graph data structure after the removal process according to the multiple nodes and the parent node pointer corresponding to each node, to obtain multiple root nodes; and

[0018] The merging module is used to merge multiple root nodes to obtain a clustering result corresponding to the three-dimensional point cloud.

[0019] A computer device includes a memory and one or more processors, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processors, the one or more processors perform the following steps:

[0020] Get 3D point cloud;

[0021] Generate a two-dimensional image according to the three-dimensional point cloud, wherein the graph data structure of the two-dimensional image includes a plurality of nodes and a parent node pointer corresponding to each node;

[0022] Encode the nodes to obtain a node index identifier corresponding to each node;

[0023] According to the node index identifier and the parent node pointer, a circular pointer in the graph data structure is removed to obtain a graph data structure after the removal process;

[0024] According to the plurality of nodes and the parent node pointer corresponding to each node, the root node corresponding to each point is searched in parallel in the graph data structure after the removal process to obtain the plurality of root nodes; and

[0025] Multiple root nodes are merged to obtain a clustering result corresponding to the three-dimensional point cloud.

[0026] One or more computer storage media storing computer readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the following steps:

[0027] Get 3D point cloud;

[0028] Generate a two-dimensional image according to the three-dimensional point cloud, wherein the graph data structure of the two-dimensional image includes a plurality of nodes and a parent node pointer corresponding to each node;

[0029] Encode the nodes to obtain a node index identifier corresponding to each node;

[0030] According to the node index identifier and the parent node pointer, a circular pointer in the graph data structure is removed to obtain a graph data structure after the removal process;

[0031] According to the plurality of nodes and the parent node pointer corresponding to each node, the root node corresponding to each point is searched in parallel in the graph data structure after the removal process to obtain the plurality of root nodes; and

[0032] Multiple root nodes are merged to obtain a clustering result corresponding to the three-dimensional point cloud.

[0033] The details of one or more embodiments of the present application are set forth in the following drawings and description. Other features and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 A diagram of an application environment of a three-dimensional point cloud clustering method in one or more embodiments.

[0036] Figure 2 A schematic diagram of a process of a three-dimensional point cloud clustering method in one or more embodiments.

[0037] Figure 3 A schematic diagram of a graph data structure of a two-dimensional image in one or more embodiments.

[0038] Figure 4 A schematic diagram of the structure of a process of merging root nodes in one or more embodiments.

[0039] Figure 5 A flowchart of the steps of removing loop pointers in a graph data structure according to node index identifiers and parent node pointers to obtain a graph data structure after removal is provided in one or more embodiments.

[0040] Figure 6A schematic diagram of a structure of loop pointing in a graph data structure in one or more embodiments.

[0041] Figure 7 A schematic diagram of a graph data structure after removing loop pointers in one or more embodiments.

[0042] Figure 8 A flowchart of the steps of compressing a graph data structure after removal processing in one or more embodiments.

[0043] Fig. 9 A schematic diagram of the graph data structure obtained after the first compression process in one or more embodiments.

[0044] Fig.10 A schematic diagram of the structure of graph data after compression processing in one or more embodiments.

[0045] Fig.11 A block diagram of a three-dimensional point cloud clustering device in one or more embodiments.

[0046] Fig.12 is a block diagram of a computer device in accordance with one or more embodiments. DETAILED DESCRIPTION

[0047] In order to make the technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] It should be noted that the terms "first", "second", etc. in the description and claims of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0049] The three-dimensional point cloud clustering method provided in this application can be applied to Figure 1In the application environment shown. A vehicle-mounted sensor 102 is installed on the vehicle, and a vehicle-mounted computer device 104 is installed inside the vehicle. For example, the vehicle-mounted sensor can be installed on the roof. The vehicle-mounted computer device can be referred to as a computer device. During the driving process of the vehicle, the vehicle-mounted sensor 102 sends the collected three-dimensional point cloud to the computer device 104. The vehicle-mounted sensor can be a laser radar. After acquiring the three-dimensional point cloud, the computer device 104 generates a two-dimensional image according to the three-dimensional point cloud, and the graph data structure of the two-dimensional image includes multiple nodes and a parent node pointer corresponding to each node. Thus, the computer device 104 encodes the node, obtains the node index identifier corresponding to each node, removes the loop pointer in the graph data structure according to the node index identifier and the parent node pointer, and obtains the graph data structure after the removal process. Then, the computer device 104 searches for the root node corresponding to each point in parallel in the graph data structure after the removal process according to the multiple nodes and the parent node pointer corresponding to each node, obtains multiple root nodes, and merges the multiple root nodes to obtain the clustering result corresponding to the three-dimensional point cloud.

[0050] In one embodiment, if Figure 2 As shown in the figure, a three-dimensional point cloud clustering method is provided. Figure 1 The computer device in the example is used to illustrate, including the following steps:

[0051] Step 202, obtaining a three-dimensional point cloud.

[0052] During driving, the vehicle can scan multiple target objects in the surrounding environment through pre-installed on-board sensors to obtain corresponding three-dimensional point clouds. The driving mode of the vehicle can be an automatic driving mode. For example, the on-board sensor can be a laser radar. The three-dimensional point cloud includes multiple points, which can specifically include the three-dimensional coordinates (x, y, z) corresponding to each point, the laser reflection intensity (Intensity), etc. The three-dimensional coordinates are used to represent the position information of the surface of the target object in the surrounding environment. The three-dimensional coordinates can be the coordinates of the point in the Cartesian coordinate system, specifically including the horizontal axis coordinates, the vertical axis coordinates and the vertical axis coordinates of the point in the Cartesian coordinate system. The Cartesian coordinate system is a three-dimensional space coordinate system established with the on-board sensor as the origin, and the three-dimensional space coordinate system includes the horizontal axis (x axis), the vertical axis (y axis) and the vertical axis (z axis). The three-dimensional space coordinate system established with the on-board sensor as the origin satisfies the right-hand rule. The on-board sensor transmits the collected three-dimensional point cloud to the computer device.

[0053] Step 204 , generating a two-dimensional image based on the three-dimensional point cloud, wherein the graph data structure of the two-dimensional image includes a plurality of nodes and a parent node pointer corresponding to each node.

[0054] Union-find is an algorithm that determines the connectivity of a graph data structure. During the connectivity determination process, the nodes in the graph are clustered. Therefore, a computer device can cluster the nodes in the graph data structure of a three-dimensional point cloud through a union-find algorithm, thereby achieving clustering of the three-dimensional point cloud.

[0055] A two-dimensional image refers to an object to which the union-find algorithm is applied, and a two-dimensional image may be an image under a preset perspective corresponding to a three-dimensional point cloud. Specifically, in order to obtain a graph data structure of a three-dimensional point cloud, a computer device may first map the three-dimensional point cloud to a preset perspective to obtain a point cloud image under a preset perspective. The preset perspective may be a bird's-eye view, that is, mapping the three-dimensional point cloud to a two-dimensional plane formed by the x-axis direction and the y-axis direction. The point cloud image includes a plurality of image points, and the two-dimensional coordinates of each image point are obtained by converting the x-axis coordinates and the y-axis coordinates according to the two axis coordinates in the three-dimensional coordinates of the corresponding point in the three-dimensional point cloud determined according to the preset perspective, that is, the x-axis coordinate and the y-axis coordinate, and the z-axis coordinate of the point is used as the value of the corresponding image point. For example, if the coordinates of a point in a three-dimensional point cloud are (x1, y1, z1), then the two-dimensional coordinates of the image point corresponding to the point in the point cloud image under the preset perspective are (x1, y1). The image points in the point cloud image may be referred to as nodes. The computer device may also calculate the parent node information of each node in the point cloud image according to the coordinate information of each point in the three-dimensional point cloud, and the parent node information may include the coordinate information of the parent node corresponding to the node. The computer device can use an existing algorithm for calculating parent node information to calculate the parent node information of each node in the point cloud image, such as a deep learning algorithm. Thus, a parent node pointer corresponding to each node is generated according to the parent node information of each node, and a graph data structure including multiple nodes and a parent node pointer corresponding to each node is obtained. The parent node pointer corresponding to each node points to the parent node corresponding to the point, which is used to find the parent node corresponding to the node, and connect the node to the parent node corresponding to the node through a line. The parent node of a node may be the point itself or another node. The parent node is used to quickly find the root node in the graph data structure. The root node refers to a node whose parent node is the point itself.

[0056] Since there may be node coordinates in the point cloud image that do not satisfy the union-find algorithm, the computer device can update the initial coordinate information corresponding to each node in the point cloud image so that each node can obtain a two-dimensional image based on the updated coordinate information of multiple nodes. The two-dimensional image is embodied in the form of a graph data structure. Therefore, the graph data structure of the two-dimensional image also includes multiple nodes and the parent node pointer corresponding to each node. The graph data structure of the two-dimensional image can be as follows: Figure 3 As shown, all nodes are in (x min ,y min ) and (x max ,y max), a circle represents a node, and the node in the circle represents a node. For example, node0 represents node O. The coordinates of node O in the circle (x0, y0), (x1, y1), (x2, y2), (x3, y3), etc. represent the updated coordinate information of the node. The arrow represents the parent node pointer, and the parent node pointer connects each node to the parent node corresponding to the node through a line.

[0057] In one embodiment, since the three-dimensional point cloud collected by the vehicle-mounted sensor is an original point cloud, the original point cloud includes background point clouds such as the sky, road surface, and trees. The background point cloud is redundant information and will affect the speed of point cloud clustering. The computer device can remove the background point cloud from the three-dimensional point cloud before constructing a graph data structure based on the three-dimensional point cloud. The method for removing the background point cloud can adopt any of the currently available methods, such as the surface fitting method. By removing the background point cloud, a three-dimensional point cloud containing obstacles is obtained.

[0058] Step 206: Encode the nodes to obtain a node index identifier corresponding to each node.

[0059] The node index identifier is a unique identifier used to distinguish each node. For example, the node index identifier may be a node number corresponding to each node. The node number may be 1, 2, 3, 4, 5, etc.

[0060] Specifically, the computer device can obtain the coordinate information corresponding to each node in the graph data structure. The coordinate information corresponding to each node refers to the point coordinates that satisfy the union-find algorithm, that is, the coordinates corresponding to each node are integer coordinates. The computer device obtains the number of unit grids in the y-axis direction based on the two-dimensional image, and calculates the node index identifier corresponding to each node based on the number of unit grids in the y-axis direction, the coordinate information of each node, and the preset relationship. The preset relationship can be a coding calculation formula. The coordinate information corresponding to each node is a two-dimensional space coordinate. By encoding the two-dimensional space coordinate, the two-dimensional space coordinate corresponding to each node is compressed into a one-dimensional space, so that the one-dimensional coordinate obtained after encoding is used as the node index identifier corresponding to each node.

[0061] Furthermore, the calculation formula for encoding the coordinate information corresponding to each node by the computer device can be as follows:

[0062] id n =y n ×grid y +x n

[0063] Among them, id n Indicates the node index corresponding to node n, y n Indicates the y-axis coordinate of node n, gridy Represents the number of unit cells of a two-dimensional image in the y-axis direction, x n Indicates the x-axis coordinate of node n.

[0064] In one embodiment, encoding the node includes: obtaining coordinate information corresponding to each node in the graph data structure; calling multiple threads, and encoding the coordinate information in parallel through the multiple threads. By encoding the coordinate information corresponding to each node in parallel through multiple threads, the encoding efficiency of the node can be improved, thereby further improving the efficiency of three-dimensional point cloud clustering.

[0065] Step 208, remove the loop pointer in the graph data structure according to the node index identifier and the parent node pointer to obtain a graph data structure after the removal process.

[0066] The traditional union-find algorithm is run sequentially in the graph data structure of the two-dimensional image. It is a serial algorithm. The operation of the latter point can only start after the previous point completes the root node search and the root node merging. Therefore, the operation of the latter point must depend on the calculation result of the previous point, resulting in low efficiency of three-dimensional point cloud clustering. In order to improve the efficiency of three-dimensional point cloud clustering, the computer device can change the graph data structure. Specifically, since there are no restrictions on the parent node of each node, there is a possibility of a circular pointing between the node and the parent node. When there is a circular pointing in the graph data structure, the root node may not be found. The computer device can find the node that causes the circular pointing in the graph data structure according to the node index identifier and the parent node pointer, and change the pointing of the parent node pointer of the node, thereby removing the circular pointing in the graph data structure. By removing the circular pointing in the graph data structure, it is beneficial to find the root node in parallel in the graph data structure in the future, and the clustering result corresponding to the three-dimensional point cloud is determined by merging the root nodes.

[0067] Step 210 , searching in parallel for the root node corresponding to each point in the removed graph data structure according to the multiple nodes and the parent node pointer corresponding to each node, to obtain multiple root nodes.

[0068] Step 212: merge multiple root nodes to obtain a clustering result corresponding to the three-dimensional point cloud.

[0069] The computer device can access each point in parallel, find the parent node corresponding to each point, and find the parent node corresponding to the parent node until the root node is found.

[0070] The computer device can obtain multiple root nodes from the graph data structure after the removal process. Each root node can correspond to multiple nodes. For multiple root nodes, the computer device can calculate whether the merging conditions are met between the two root nodes. When the merging conditions are met, it indicates that one root node can be used as the parent node of another root node, and the corresponding root nodes are merged to obtain the target root node. At the same time, the computer device also merges the multiple nodes corresponding to the root node.

[0071] In one embodiment, merging multiple root nodes to obtain a clustering result corresponding to the three-dimensional point cloud includes: calculating the distance between two root nodes; merging the root nodes whose distance is less than a threshold to obtain a clustering result corresponding to the three-dimensional point cloud. The computer device can calculate the distance between two root nodes and compare the distance with the threshold. When the distance is less than the threshold, the corresponding two root nodes meet the merging condition, so that the computer device merges the two root nodes, thereby obtaining multiple target root nodes. For example, the threshold can be a specific value or a data range. When there are no root nodes that can be merged, the computer device can take each target root node and multiple nodes corresponding to the target root node as a clustering category to obtain multiple clustering categories, and then generate clustering results corresponding to the three-dimensional point cloud according to the multiple clustering categories.

[0072] In one of the embodiments, the computer device may also compress the graph data structure after the removal process during the parallel search process. Specifically, in the process of searching for the root node corresponding to each point, the computer device may pass through multiple nodes, generate a search path for the connection formed between each point and the root node, and obtain multiple search paths. Thereby, the search path in the graph data structure after the removal process is compressed, and multiple root nodes are obtained according to the compressed search path. Multiple root nodes refer to at least one root node. By compressing the search path, all nodes under the same root node in the graph data structure after the removal process can be compressed into the root node, so that the root node contains multiple nodes, thereby simplifying the graph data structure after the removal process.

[0073] The computer device calculates the distance between each pair of root nodes, compares the distance with a threshold, and when the distance is less than the threshold, merges the two root nodes, thereby obtaining multiple merged root nodes. The merged root node may be the parent node of the two merged root nodes. Each merged root node includes multiple nodes corresponding to the root node that have been compressed. Each merged root node is determined as a clustering category, and then a clustering result corresponding to the three-dimensional point cloud is generated according to the multiple clustering categories. By calculating the distance between each pair of root nodes to merge the root nodes, the root nodes that can be merged can be quickly determined. The schematic diagram of the root node merging process can be shown as follows. Figure 4As shown in the figure, root1 and root2 represent the root nodes that are merged in pairs. nodesunion1 represents all nodes compressed into root1. nodesunion2 represents all nodes compressed into root2. The dotted line represents the line generated by the parent node pointer of root2 that has been removed. The parent node pointer of root2 points to root1 to form a line, indicating that root1 can be the parent node of root2.

[0074] In one embodiment, the computer device may call multiple threads to perform parallel merging of multiple root nodes through the multiple threads, thereby improving the efficiency of merging the root nodes compared to sequential merging.

[0075] In one embodiment, when each node is a root node and the number of nodes is n, the speed of clustering the three-dimensional point cloud is 1 / n of the traditional method compared with the traditional sequential operation method.

[0076] In this embodiment, a three-dimensional point cloud is obtained, and a two-dimensional image is generated according to the three-dimensional point cloud. The graph data structure of the two-dimensional image includes multiple nodes and a parent node pointer corresponding to each node. The two-dimensional image can be clustered by using a union-find algorithm, thereby realizing clustering of the three-dimensional point cloud. The nodes are encoded to obtain a node index identifier corresponding to each node, and the corresponding node can be quickly found according to the node index identifier, which is conducive to the subsequent removal of the circular pointer. The circular pointer in the graph data structure is removed according to the node index identifier and the parent node pointer to obtain a graph data structure after the removal process. According to the multiple nodes and the parent node pointer corresponding to each node, the root node corresponding to each point is searched in parallel in the graph data structure after the removal process to obtain multiple root nodes, and the multiple root nodes are merged to obtain the clustering result corresponding to the three-dimensional point cloud. Since the circular pointer in the graph data structure is removed, the problem of being unable to find the root node is avoided, which is conducive to the subsequent parallel search for the root node in the graph data structure. The operation of each point in the point cloud does not need to depend on the calculation result of the previous point, which improves the search efficiency of the root node, and then by merging the root nodes to determine the clustering result corresponding to the three-dimensional point cloud, the clustering efficiency of the three-dimensional point cloud is effectively improved.

[0077] In one embodiment, if Figure 5 As shown, the steps of removing the loop pointer in the graph data structure according to the node index identifier and the parent node pointer to obtain the graph data structure after the removal process include:

[0078] Step 502, searching in parallel in the graph data structure for the node corresponding to the minimum node index identifier according to the parent node pointer and the node index identifier through multiple threads.

[0079] Step 504, changing the pointing direction of the parent node pointer of the node corresponding to the minimum node index identifier to obtain a graph data structure after removing the circular pointing.

[0080] Since there are no restrictions on the parent nodes of each node in the graph data structure of a two-dimensional image, there is a possibility of circular pointing between parent nodes. The structural diagram of circular pointing in the graph data structure can be as follows: Figure 6 As shown, the point coordinate range (x min ,y min ) and (x max ,y max ). The parent node of node node3 is node2, the parent node of node2 is node1, the parent node of node1 is node0, and the parent node of node0 is node3, so these four nodes form a cycle.

[0081] After the computer device calculates and obtains the node index identifier corresponding to each node, the circular pointing in the graph data structure can be removed according to the node index identifier. Specifically, the computer device can call multiple threads, and through the multiple threads, the parent nodes corresponding to multiple nodes are searched in parallel in the graph data structure according to the parent node pointer. In the process of parallel searching for the parent node, the node corresponding to the minimum node index identifier is determined according to the node index identifiers of the multiple nodes. Since multiple threads are searched in parallel in the same graph data structure, each thread corresponds to a node, and the node index identifier of the node corresponding to each thread can be used as the index value of the thread. In the process of parallel searching for the parent node, each thread will compare the node index identifier of each node in turn, and determine the minimum node index identifier, thereby obtaining the minimum node index identifier determined by multiple threads. When the index value of the thread is equal to the minimum node index identifier, the node corresponding to the thread is the node with the smallest node index identifier, and the thread changes the pointing of the parent node pointer corresponding to the node, and points the parent node pointer to the node itself, indicating that the parent node corresponding to the node is the node itself, and the node is the root node, and then the computer device obtains the graph data structure after removing the circular pointing. Furthermore, the thread changes the direction of the parent node pointer corresponding to the node, and points the parent node pointer to the node itself. This can be done by removing the connection between the node and the corresponding parent node according to the parent node pointer of the node, and pointing the parent node pointer to the node itself to add a connection between the node and the corresponding parent node, thereby removing the circular pointing. The graph data structure after removing the circular pointing can be as follows Figure 7 As shown, node0 is the node with the smallest minimum node index identifier, and the dotted line indicates that the connection between node0 and the corresponding parent node node3 is removed, and a connection from node0 to itself is added.

[0082] For example, in Figure 7 In the example, 4 nodes (0-3) are searched by 4 threads at the same time. The index value of each thread is the node index identifier of the current node. All 4 threads can determine that the minimum node index identifier is equal to the node index identifier of node0, and the node index identifiers of the other 3 nodes are greater than the node index identifier of node0. When the 4 threads are determining whether their respective index values ​​are equal to the minimum node index identifier, only the index value of the thread running node0 is equal to the minimum node index identifier, and the parent node pointer of node0 is pointed to itself through the thread running node0.

[0083] In this embodiment, the node corresponding to the minimum node index identifier is searched in parallel in the graph data structure by multithreading according to the parent node pointer and the node index identifier, so that the node corresponding to the minimum node index identifier can be quickly found. The pointing of the parent node pointer of the node corresponding to the minimum node index identifier is changed to obtain a graph data structure after removing the circular pointing, which can avoid the problem of not being able to find the root node in the case of circular pointing, and is conducive to the subsequent parallel search for the root node corresponding to each node, thereby improving the efficiency of three-dimensional point cloud clustering.

[0084] In one embodiment, generating a two-dimensional image based on a three-dimensional point cloud includes: mapping the three-dimensional point cloud to a two-dimensional plane of a preset perspective to obtain a point cloud image of the preset perspective, wherein the point cloud image includes multiple nodes; calculating target coordinate information corresponding to each node based on the point cloud image, and obtaining a two-dimensional image corresponding to the three-dimensional point cloud based on the target coordinate information corresponding to the multiple nodes.

[0085] The preset perspective can be a bird's-eye view, that is, the perspective corresponding to the x-axis direction and the y-axis direction, and the two-dimensional plane corresponding to the preset perspective refers to the two-dimensional plane formed by the x-axis direction and the y-axis direction. The computer device maps the grid space to the two-dimensional plane formed by the x-axis direction and the y-axis direction to obtain a point cloud image under the perspective of the x-axis direction and the y-axis direction. The point cloud image includes multiple nodes, and the node refers to the image point corresponding to the three-dimensional point cloud in the point cloud image. For example, the coordinates of a point in the three-dimensional point cloud are (x1, y1, z1), and the two-dimensional coordinates of the image point corresponding to the point in the point cloud image under the preset perspective are (x1, y1). All nodes in the point cloud image are in (x min ,y min ) and (x max ,y max ) within the range of .

[0086] The target coordinate information refers to the integer coordinates corresponding to each node. Since the coordinates of each node in the point cloud image may not be integers, in order to apply the union-find algorithm, the coordinates of each node can be updated to integer coordinates first, so that the computer device can use the point cloud image with updated coordinates as the two-dimensional image corresponding to the three-dimensional point cloud. The coordinates of each node in the two-dimensional image are all integer coordinates.

[0087] In this embodiment, the three-dimensional point cloud is mapped to a two-dimensional plane of a preset perspective to obtain a point cloud image of the preset perspective, and a graph data structure that satisfies the union-find algorithm can be obtained. The point cloud image includes multiple nodes, and the target coordinate information corresponding to each node is calculated according to the point cloud image, and the two-dimensional image corresponding to the three-dimensional point cloud is obtained according to the target coordinate information corresponding to the multiple nodes. By updating the coordinates of each node, it is beneficial to the calculation of the subsequent union-find algorithm.

[0088] In one of the embodiments, calculating the target coordinate information corresponding to each node based on the point cloud image includes: gridding the point cloud image according to preset parameters to obtain a grid image composed of multiple cells; counting the number of cells corresponding to preset directions in the grid image; determining a point coordinate range corresponding to the point cloud image; and calculating the target coordinate information corresponding to each node in the point cloud image based on the point coordinate range, the counted number of cells, and the initial coordinate information of each node.

[0089] The initial coordinate information corresponding to each node in the point cloud image may not be an integer coordinate. The computer device needs to update the initial node coordinate information of each node so that the coordinates of each node are integer coordinates.

[0090] The preset parameter may be a parameter for meshing the point cloud image. The preset parameter may be length*width, which indicates the size of each cell obtained by the meshing.

[0091] The computer device can divide the point cloud image into grids according to preset parameters. Specifically, the computer device can divide the point cloud image in the x-axis direction according to the length in the preset parameters, and divide the point cloud image in the y-axis direction according to the width in the preset parameters, thereby obtaining a grid image composed of multiple cells. The preset directions may include the x-axis direction and the y-axis direction. The computer device counts the number of cells in the x-axis direction and the number of cells in the y-axis direction in the grid image. The computer device determines the point coordinate range corresponding to the point cloud image, and obtains that all nodes in the point cloud image are within (x min ,y min ) and (x max ,y max The computer device calculates the target coordinate information corresponding to each node in the point cloud image according to the determined point coordinate range, the number of cells counted, and the initial coordinate information of each node.

[0092] In one embodiment, the calculation formula of the target coordinate information corresponding to each node in the point cloud image can be as follows:

[0093]

[0094] Among them, x n Represents the x-axis coordinate of node n, x fn Indicates the x-axis coordinate in the initial coordinate information corresponding to node n, x min Indicates the minimum coordinate value in the x-axis direction, grid x Indicates the number of cells in the x-axis direction in the grid image, x max Indicates the maximum coordinate value in the x-axis direction, y n Represents the y-axis coordinate of node n, y fn Represents the y-axis coordinate in the initial coordinate information corresponding to node n, y min Indicates the minimum coordinate value in the y-axis direction, grid y Indicates the number of cells in the y-axis direction in the grid image, y max Indicates the maximum coordinate value in the y-axis direction. x and grid y The larger the number of n and n The more accurate it is.

[0095] In this embodiment, the point cloud image is meshed according to preset parameters to obtain a grid image composed of multiple cells, and the number of cells corresponding to the preset direction in the grid image is counted to determine the point coordinate range corresponding to the point cloud image, and then the target coordinate information corresponding to each node in the point cloud image is calculated according to the point coordinate range, the number of cells counted, and the initial coordinate information of each node. By meshing the point cloud image, the integer coordinates corresponding to each node can be calculated more accurately.

[0096] In one embodiment, if Figure 8 As shown, the above method also includes: a step of compressing the graph data structure after the removal process, which step specifically includes:

[0097] Step 802, in the process of searching for the root node corresponding to each point in parallel, searching for the first parent node corresponding to each node in parallel in the graph data structure after the removal processing according to the plurality of nodes and the parent node pointer corresponding to each node.

[0098] Step 804, in parallel, determine the second parent node corresponding to the first parent node in the graph data structure after the removal process, point the parent node pointer of the node corresponding to the first parent node to the second parent node, and update the second parent node to the first parent node of the node.

[0099] Step 806, repeat the steps of determining in parallel the second parent node corresponding to the first parent node in the removed graph data structure, pointing the parent node pointer of the node corresponding to the first parent node to the second parent node, and updating the second parent node to the first parent node of the node, until the first parent node of the node in the removed graph data structure is no longer updated, thereby obtaining a compressed graph data structure including multiple root nodes.

[0100] The first parent node may be the parent node corresponding to each node, and the second parent node may be the parent node of the parent node corresponding to each node. The computer device may search for the root node in parallel through multiple threads. In the process of searching for the root node in parallel, each thread may point the parent node pointer of the corresponding node to the second parent node, update the second parent node to the first parent node of the node, and remove the connection between the node and the parent node corresponding to the node. Multiple threads repeat the above steps of determining the second parent node corresponding to the first parent node in parallel in the graph data structure after the removal process, pointing the parent node pointer of the node corresponding to the first parent node to the second parent node, and updating the second parent node to the first parent node of the node, until the first parent node of the node in the graph data structure after the removal process is no longer updated, indicating that in the graph data structure at this time, for each node, there is no parent node of the parent node corresponding to the node. The computer device uses the graph data structure at this time as a graph data structure after compression processing, and the compressed graph data structure includes multiple root nodes. The parent node pointer of each root node points to the node itself. By updating the first parent node of the node, redundant connections between nodes are removed, so that all nodes under the same root node are compressed into the root node, and the search path formed between each node and the root node is compressed, thereby compressing the graph data structure.

[0101] For example, after removing the loop pointer, the graph data structure is Figure 7 As shown, the computer device can first perform a first compression process on the graph data structure after removing the loop pointer, and the obtained graph data structure can be as shown in Fig. 9As shown, the dotted line represents the removed line. During the first compression process, the root node corresponding to each node is searched in parallel. During the parallel search process, the thread running node3 finds that the parent node of node3 is node2, and the parent node of node2 is node1. Then the thread running node3 removes the line between node3 and node2, and points the parent node pointer of node3 to node1, generating a line between node3 and node1. The thread running node2 finds that the parent node of node2 is node1, and the parent node of node1 is node0. Then the line between node2 and node1 is removed, and the parent node pointer of node2 is pointed to node0, generating a line between node2 and node0. After that, the second compression process can be continued. Since the first parent node of the node in the graph data structure obtained after the second compression process is no longer updated, the graph data structure at this time is used as the graph data structure after the compression process, as shown in Fig.10 As shown, the dotted line represents the removed line. During the second compression process, the root node corresponding to each node is searched. During the parallel search process, the thread running node3 finds that the parent node of node3 is node1, and the parent node of node1 is node0. Then the thread running node3 removes the line between node3 and node1, points the parent node pointer of node3 to node0, and generates a line between node3 and node0. The thread running node2 finds that the parent node of node2 is node0, and the parent node of node0 is node0, so no processing is performed. Similarly, the thread running node1 is not compressed, so node3, node1 and node2 are all compressed into the root node node0, and the final compressed graph data structure is obtained.

[0102] In this embodiment, in the process of parallel searching for the root node corresponding to each point, the parent node pointer of the node corresponding to the first parent node is pointed to the second parent node, and the second parent node is updated to the first parent node of the node. The steps of parallel determination of the second parent node corresponding to the first parent node in the graph data structure after the removal process, pointing the parent node pointer of the node corresponding to the first parent node to the second parent node, and updating the second parent node to the first parent node of the node are repeated until the first parent node of the node in the graph data structure after the removal process is no longer updated, and a compressed graph data structure is obtained, and the compressed graph data structure includes multiple root nodes. By compressing the graph data structure, all nodes under the same root node can be compressed into the root node, which can reduce the storage space of the graph data structure. At the same time, when the root nodes are subsequently merged, the merging time can be reduced, and the efficiency of three-dimensional point cloud clustering is further improved.

[0103] In one embodiment, if Fig.11 As shown, a three-dimensional point cloud clustering device is provided, including: an acquisition module 1102, a generation module 104, an encoding module 1106, a removal module 1108, a search module 1110 and a merging module 1112, wherein:

[0104] The acquisition module 1102 is used to acquire a three-dimensional point cloud.

[0105] The generating module 1104 is used to generate a two-dimensional image according to the three-dimensional point cloud. The graph data structure of the two-dimensional image includes a plurality of nodes and a parent node pointer corresponding to each node.

[0106] The encoding module 1106 is used to encode the nodes to obtain a node index identifier corresponding to each node.

[0107] The removal module 1108 is used to remove the loop pointer in the graph data structure according to the node index identifier and the parent node pointer to obtain the graph data structure after the removal process.

[0108] The search module 1110 is used to search for the root node corresponding to each point in parallel in the graph data structure after the removal process according to the multiple nodes and the parent node pointer corresponding to each node, so as to obtain multiple root nodes.

[0109] The merging module 1112 is used to merge multiple root nodes to obtain a clustering result corresponding to the three-dimensional point cloud.

[0110] In one of the embodiments, the removal module 1108 is also used to search for the node corresponding to the minimum node index identifier in parallel in the graph data structure through multiple threads according to the parent node pointer and the node index identifier; the pointing of the parent node pointer of the node corresponding to the minimum node index identifier is changed to obtain the graph data structure after removing the circular pointing.

[0111] In one embodiment, the generation module 1104 is also used to map the three-dimensional point cloud to a two-dimensional plane of a preset perspective to obtain a point cloud image of the preset perspective, wherein the point cloud image includes multiple nodes; the target coordinate information corresponding to each node is calculated based on the point cloud image, and a two-dimensional image is obtained based on the target coordinate information corresponding to the multiple nodes.

[0112] In one embodiment, the generation module 1104 is also used to grid the point cloud image according to preset parameters to obtain a grid image composed of multiple cells; count the number of cells corresponding to preset directions in the grid image; determine the point coordinate range corresponding to the point cloud image; and calculate the target coordinate information corresponding to each node in the point cloud image based on the point coordinate range, the number of counted cells, and the initial coordinate information of each node.

[0113] In one of the embodiments, the encoding module 1106 is further used to obtain coordinate information corresponding to each node in the graph data structure; call multiple threads, and encode the coordinate information in parallel through the multiple threads.

[0114] In one of the embodiments, the above-mentioned device also includes: a compression module, which is used to parallelly search for the first parent node corresponding to each node in the graph data structure after removal processing according to multiple nodes and the parent node pointer corresponding to each node in the process of parallel searching for the root node corresponding to each point; parallelly determine the second parent node corresponding to the first parent node in the graph data structure after removal processing, point the parent node pointer of the node corresponding to the first parent node to the second parent node, and update the second parent node to the first parent node of the node; repeat the steps of parallelly determining the second parent node corresponding to the first parent node in the graph data structure after removal processing, pointing the parent node pointer of the node corresponding to the first parent node to the second parent node, and updating the second parent node to the first parent node of the node, until the first parent node of the node in the graph data structure after removal processing is no longer updated, thereby obtaining a compressed graph data structure, which includes multiple root nodes.

[0115] In one embodiment, the merging module 1112 is further used to calculate the distance between each pair of root nodes; the root nodes whose distance is less than a threshold are merged to obtain a clustering result corresponding to the three-dimensional point cloud.

[0116] For the specific definition of the three-dimensional point cloud clustering device, please refer to the definition of the three-dimensional point cloud clustering method above, which will not be repeated here. Each module in the above-mentioned three-dimensional point cloud clustering device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0117] In one embodiment, a computer device is provided, whose internal structure diagram can be as follows: Fig.12 As shown. The computer device includes a processor, a memory, a communication interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer-readable instructions and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The database of the computer device is used to store data of a three-dimensional point cloud clustering method. The communication interface of the computer device is used to connect and communicate with an external terminal. When the computer-readable instructions are executed by the processor, a three-dimensional point cloud clustering method is implemented.

[0118] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0119] A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the one or more processors, the one or more processors execute the steps in the above-mentioned method embodiments.

[0120] One or more computer storage media storing computer-readable instructions, when the computer-readable instructions are executed by one or more processors, enable the one or more processors to perform the steps in the above-mentioned various method embodiments.

[0121] The computer storage medium is a readable storage medium, and the readable storage medium may be non-volatile or volatile.

[0122] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile computer-readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0123] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0124] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A three-dimensional point cloud clustering method, comprising: Get 3D point cloud; Generate a two-dimensional image according to the three-dimensional point cloud, wherein the graph data structure of the two-dimensional image includes a plurality of nodes and a parent node pointer corresponding to each node; Encode the nodes to obtain a node index identifier corresponding to each node; According to the node index identifier and the parent node pointer, a circular pointer in the graph data structure is removed to obtain a graph data structure after the removal process; According to the plurality of nodes and the parent node pointer corresponding to each node, the root node corresponding to each point is searched in parallel in the graph data structure after the removal process to obtain a plurality of root nodes; and Multiple root nodes are merged to obtain a clustering result corresponding to the three-dimensional point cloud.

2. The method according to claim 1, characterized in that The removing of the loop pointer in the graph data structure according to the node index identifier and the parent node pointer to obtain the graph data structure after the removal includes: Searching in parallel for a node corresponding to a minimum node index identifier in the graph data structure according to the parent node pointer and the node index identifier by multithreading; and The pointing direction of the parent node pointer of the node corresponding to the minimum node index identifier is changed to obtain a graph data structure after removing the circular pointing.

3. The method according to claim 1, characterized in that Generating a two-dimensional image according to the three-dimensional point cloud comprises: Mapping the three-dimensional point cloud to a two-dimensional plane of a preset viewing angle to obtain a point cloud image of the preset viewing angle, wherein the point cloud image includes a plurality of nodes; and The target coordinate information corresponding to each node is calculated according to the point cloud image, and a two-dimensional image is obtained according to the target coordinate information corresponding to multiple nodes.

4. The method according to claim 3, characterized in that Calculating the target coordinate information corresponding to each node according to the point cloud image includes: Dividing the point cloud image into grids according to preset parameters to obtain a grid image consisting of a plurality of cells; Counting the number of cells corresponding to a preset direction in the grid image; Determine the point coordinate range corresponding to the point cloud image; and The target coordinate information corresponding to each node in the point cloud image is calculated according to the point coordinate range, the number of cells counted, and the initial coordinate information of each node.

5. The method according to claim 1, characterized in that The encoding of the node comprises: Obtaining coordinate information corresponding to each node in the graph data structure; and Multiple threads are called to encode the coordinate information in parallel through the multiple threads.

6. The method according to claim 1, characterized in that The method further comprises: In the process of searching for the root node corresponding to each point in parallel, searching for the first parent node corresponding to each node in parallel in the graph data structure after the removal process according to the plurality of nodes and the parent node pointer corresponding to each node; In parallel, determining a second parent node corresponding to the first parent node in the graph data structure after the removal process, pointing the parent node pointer of the node corresponding to the first parent node to the second parent node, and updating the second parent node to be the first parent node of the node; and Repeat the steps of determining in parallel the second parent node corresponding to the first parent node in the graph data structure after the removal processing, pointing the parent node pointer of the node corresponding to the first parent node to the second parent node, and updating the second parent node to the first parent node of the node, until the first parent node of the node in the graph data structure after the removal processing is no longer updated, to obtain a compressed graph data structure, wherein the compressed graph data structure includes multiple root nodes.

7. The method according to claim 1, characterized in that The merging of multiple root nodes to obtain a clustering result corresponding to the three-dimensional point cloud includes: Calculate the distance between two nodes; The root nodes whose distance is less than a threshold are merged to obtain a clustering result corresponding to the three-dimensional point cloud.

8. A three-dimensional point cloud clustering device, comprising: An acquisition module, used to acquire three-dimensional point clouds; A generating module, used for generating a two-dimensional image according to the three-dimensional point cloud, wherein the graph data structure of the two-dimensional image includes a plurality of nodes and a parent node pointer corresponding to each node; An encoding module, used to encode the nodes to obtain a node index identifier corresponding to each node; A removal module, used for removing the loop pointer in the graph data structure according to the node index identifier and the parent node pointer, to obtain a graph data structure after the removal process; A search module, used for searching the root node corresponding to each point in parallel in the graph data structure after the removal process according to the multiple nodes and the parent node pointer corresponding to each node, to obtain multiple root nodes; and The merging module is used to merge multiple root nodes to obtain a clustering result corresponding to the three-dimensional point cloud.

9. The device according to claim 8, characterized in that The removal module is also used to search for the node corresponding to the minimum node index identifier in parallel in the graph data structure through multiple threads according to the parent node pointer and the node index identifier; and change the pointing direction of the parent node pointer of the node corresponding to the minimum node index identifier to obtain the graph data structure after removing the circular pointing.

10. The device according to claim 8, characterized in that The generation module is also used to map the three-dimensional point cloud to a two-dimensional plane of a preset perspective to obtain a point cloud image of the preset perspective, wherein the point cloud image includes multiple nodes; and calculate the target coordinate information corresponding to each node based on the point cloud image, and obtain a two-dimensional image based on the target coordinate information corresponding to the multiple nodes.

11. A computer device comprising a memory and one or more processors, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the one or more processors perform the following steps: Get 3D point cloud; Generate a two-dimensional image according to the three-dimensional point cloud, wherein the graph data structure of the two-dimensional image includes a plurality of nodes and a parent node pointer corresponding to each node; Encode the nodes to obtain a node index identifier corresponding to each node; According to the node index identifier and the parent node pointer, a circular pointer in the graph data structure is removed to obtain a graph data structure after the removal process; According to the plurality of nodes and the parent node pointer corresponding to each node, the root node corresponding to each point is searched in parallel in the graph data structure after the removal process to obtain a plurality of root nodes; and Multiple root nodes are merged to obtain a clustering result corresponding to the three-dimensional point cloud.

12. The computer device according to claim 11, characterized in that When the processor executes the computer-readable instructions, it also performs the following steps: searching in parallel for the node corresponding to the minimum node index identifier in the graph data structure through multiple threads according to the parent node pointer and the node index identifier; and changing the pointing direction of the parent node pointer of the node corresponding to the minimum node index identifier to obtain the graph data structure after removing the circular pointing.

13. The computer device according to claim 11, characterized in that When the processor executes the computer-readable instructions, it also performs the following steps: mapping the three-dimensional point cloud to a two-dimensional plane of a preset perspective to obtain a point cloud image of the preset perspective, wherein the point cloud image includes multiple nodes; and calculating target coordinate information corresponding to each node based on the point cloud image, and obtaining a two-dimensional image based on the target coordinate information corresponding to the multiple nodes.

14. The computer device according to claim 11, characterized in that When the processor executes the computer-readable instructions, the processor further performs the following steps: gridding the point cloud image according to preset parameters to obtain a grid image composed of a plurality of cells; counting the number of cells corresponding to a preset direction in the grid image; Determine the point coordinate range corresponding to the point cloud image; and calculate the target coordinate information corresponding to each node in the point cloud image according to the point coordinate range, the number of cells counted, and the initial coordinate information of each node.

15. The computer device according to claim 11, characterized in that The processor further performs the following steps when executing the computer-readable instructions: in the process of parallel searching for the root node corresponding to each point, parallel searching for the first parent node corresponding to each node in the graph data structure after the removal processing according to the plurality of nodes and the parent node pointer corresponding to each node; In parallel, in the graph data structure after the removal process, determine the second parent node corresponding to the first parent node, point the parent node pointer of the node corresponding to the first parent node to the second parent node, and update the second parent node to the first parent node of the node; and repeating the steps of determining in parallel the second parent node corresponding to the first parent node in the graph data structure after the removal processing, pointing the parent node pointer of the node corresponding to the first parent node to the second parent node, and updating the second parent node to the first parent node of the node, until the first parent node of the node in the graph data structure after the removal processing is no longer updated, to obtain a compressed graph data structure, wherein the compressed graph data structure includes multiple root nodes.

16. One or more non-volatile computer-readable storage media storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the following steps: Get 3D point cloud; Generate a two-dimensional image according to the three-dimensional point cloud, wherein the graph data structure of the two-dimensional image includes a plurality of nodes and a parent node pointer corresponding to each node; Encode the nodes to obtain a node index identifier corresponding to each node; According to the node index identifier and the parent node pointer, a circular pointer in the graph data structure is removed to obtain a graph data structure after the removal process; According to the plurality of nodes and the parent node pointer corresponding to each node, the root node corresponding to each point is searched in parallel in the graph data structure after the removal process to obtain a plurality of root nodes; and Multiple root nodes are merged to obtain a clustering result corresponding to the three-dimensional point cloud.

17. The storage medium according to claim 16, characterized in that When the computer-readable instructions are executed by the processor, the following steps are also performed: using multiple threads, in the graph data structure, in parallel, searching for the node corresponding to the minimum node index identifier according to the parent node pointer and the node index identifier; and changing the pointing direction of the parent node pointer of the node corresponding to the minimum node index identifier to obtain the graph data structure after removing the circular pointing.

18. The storage medium according to claim 16, characterized in that When the computer-readable instructions are executed by the processor, the following steps are also performed: mapping the three-dimensional point cloud to a two-dimensional plane of a preset perspective to obtain a point cloud image of the preset perspective, wherein the point cloud image includes multiple nodes; and calculating target coordinate information corresponding to each node based on the point cloud image, and obtaining a two-dimensional image based on the target coordinate information corresponding to the multiple nodes.

19. The storage medium according to claim 16, characterized in that When the computer-readable instructions are executed by the processor, the following steps are further performed: gridding the point cloud image according to preset parameters to obtain a grid image composed of a plurality of cells; counting the number of cells corresponding to a preset direction in the grid image; Determine the point coordinate range corresponding to the point cloud image; and calculate the target coordinate information corresponding to each node in the point cloud image according to the point coordinate range, the number of cells counted, and the initial coordinate information of each node.

20. The storage medium according to claim 16, characterized in that The computer-readable instructions, when executed by the processor, further perform the following steps: in the process of parallel searching for the root node corresponding to each point, parallel searching for the first parent node corresponding to each node in the graph data structure after the removal process according to the plurality of nodes and the parent node pointer corresponding to each node; In parallel, in the graph data structure after the removal process, determine the second parent node corresponding to the first parent node, point the parent node pointer of the node corresponding to the first parent node to the second parent node, and update the second parent node to the first parent node of the node; and repeating the steps of determining in parallel the second parent node corresponding to the first parent node in the graph data structure after the removal processing, pointing the parent node pointer of the node corresponding to the first parent node to the second parent node, and updating the second parent node to the first parent node of the node, until the first parent node of the node in the graph data structure after the removal processing is no longer updated, to obtain a compressed graph data structure, wherein the compressed graph data structure includes multiple root nodes.