Point cloud data storage method, point cloud data output processing method, related device and related system
By using hash tables for sparse storage and N forktree maintenance of point cloud data in point cloud data storage, the problems of large memory usage and high computing cost in the existing technology are solved, and efficient point cloud data storage and updates are achieved.
Patent Information
- Application Number
- CN202510290250.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-13
AI Technical Summary
When the existing point cloud data storage solution converts point cloud data into raster map storage, it consumes a lot of memory, and the calculation cost of the high-resolution raster occupation probability update probability is higher.
A hash table is used for sparse storage, and the raster corresponding to the point cloud data is determined through the hash index, and only the raster of the point cloud data is stored in the hash table. At the same time, point cloud data is maintained using N forktrees and raster occupation probability updates are performed on sparse rasters.
It greatly reduces memory usage, reduces the computational cost of updates in the probability of raster occupation, and improves the efficiency of point cloud data storage.
Smart Images

Figure CN120144589A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of point cloud data processing, and in particular, to a method for storing point cloud data, an output processing method, related devices, and related systems. Background Art
[0002] In some application scenarios, it is usually necessary to obtain point cloud data for a target area. Furthermore, the point cloud data is converted into a grid map that can represent the obstacle situation in the target area for storage. For example, in the navigation of a ground robot, it is usually necessary to convert the point cloud data into a grid map that can represent the obstacle situation for storage for subsequent path planning.
[0003] When the current point cloud data storage solution converts point cloud data into a grid map for storage, it is necessary to store all grids (grids with point cloud data and grids without point cloud data), and storing all grids occupies a large amount of memory. In addition, in some scenarios, it is required that the grid map can accurately represent obstacles. In order to accurately represent obstacles, a relatively high grid resolution is usually set. Setting a relatively high grid resolution means that more grids need to be stored. At the same time, considering that there may be dynamic obstacles in the target area, it is usually necessary to update the grid occupancy probability. Currently, the grid occupancy probability is usually updated by ray casting, and updating the grid occupancy probability of high-resolution grids by ray casting brings a relatively high computational cost. Summary of the Invention
[0004] In view of this, the present application provides a method for storing point cloud data, an output processing method, related devices, and related systems, which are used to solve the problems of large memory occupation of the current point cloud data storage solution and high computational cost when updating the grid occupancy probability. The technical solutions are as follows:
[0005] The first aspect of the present application provides a method for storing point cloud data, including:
[0006] For each point cloud data obtained by a sensor, according to the point cloud data and a set grid resolution, determine the hash index of the grid corresponding to the point cloud data to obtain a target hash index;
[0007] If the grid corresponding to the target hash index does not exist in the hash table, create the grid corresponding to the target hash index, store the created grid in the hash table, and insert the point cloud data into the grid corresponding to the target hash index in the hash table; if the grid corresponding to the target hash index exists in the hash table, insert the point cloud data into the grid corresponding to the target hash index in the hash table; wherein, there is a grid occupancy probability in the grid in the hash table.
[0008] Update the grid occupancy probability within the grid corresponding to the target hash index, and update the grid occupancy probability within the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index.
[0009] In a possible implementation, the point cloud data storage method further includes:
[0010] For any grid passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index, if the grid occupancy probability of this grid is less than a preset probability threshold, then delete this grid from the hash table.
[0011] In a possible implementation, there is also an N - ary tree within the grid in the hash table; the root node of the N - ary tree in any grid represents the entire grid, and any other node represents 1 / N of the grid area represented by its parent node, and the value of N depends on the actual application scenario;
[0012] Inserting the point cloud data into the grid corresponding to the target hash index in the hash table includes:
[0013] Insert the point cloud data into the target node of the N - ary tree in the grid corresponding to the target hash index in the hash table, and update the hit point count of the target node and the related nodes of the target node. The hit point count of a node is the number of point cloud data falling within the grid area represented by this node.
[0014] If the number of point cloud data held by the target node is greater than a preset quantity threshold, then split the target node into N child nodes, and distribute the point cloud data held by the target node to the split child nodes.
[0015] In a possible implementation, there is also the grid center point coordinate within the grid in the hash table;
[0016] The updating of the grid occupancy probability within the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index includes:
[0017] According to the center point coordinate of the sensor and the grid center point coordinate of the grid corresponding to the target hash index, determine the hash index of the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index, to obtain a hash index set;
[0018] For each hash index in the hash index set, if there is a grid corresponding to this hash index in the hash table, then decrease the grid occupancy probability within the grid corresponding to this hash index.
[0019] In a possible implementation, before splitting N child nodes from the target node, the method further includes:
[0020] Determine whether the layer number corresponding to the target node reaches a preset layer number threshold. If the layer number corresponding to the target node does not reach the preset layer number threshold, then split N child nodes from the target node.
[0021] In a possible implementation, the point cloud data storage method further includes:
[0022] If the layer number corresponding to the target node reaches the preset layer number threshold, delete the earliest inserted point cloud data in the point cloud data held by the target node.
[0023] The second aspect of the present application provides an output processing method for performing output processing on the data stored by any one of the above point cloud data storage methods. The output processing method includes:
[0024] According to a specified area and a set grid resolution, determine the hash index of the grids within the specified area to obtain a hash index set;
[0025] For each hash index in the hash index set, if there is a grid corresponding to the hash index in the hash table, determine the occupancy of the grid corresponding to the hash index, and perform occupancy setting on the grid corresponding to the hash index in the grid map of the specified area according to the occupancy of the grid corresponding to the hash index, and / or, obtain the point cloud data within the grid corresponding to the hash index, and display the obtained point cloud data within the grid corresponding to the hash index in the grid map of the specified area, where the grid map of the specified area is obtained by dividing the specified area according to the set grid resolution.
[0026] In a possible implementation, there is an N - ary tree in the grid of the hash table;
[0027] The determining the occupancy of the grid corresponding to the hash index, and performing occupancy setting on the grid corresponding to the hash index in the grid map of the specified area according to the occupancy of the grid corresponding to the hash index includes:
[0028] Traverse the N - ary tree in the grid corresponding to the hash index starting from the root node:
[0029] According to the number of hit points of the currently traversed node, determine whether the grid area represented by the currently traversed node is occupied;
[0030] When it is determined that the grid area represented by the currently traversed node is occupied, if the currently traversed node is a leaf node, set the grid area represented by the currently traversed node as occupied on the grid map of the specified area. If the currently traversed node is not a leaf node, use a child node of the currently traversed node as the next traversal object and continue traversing.
[0031] In a possible implementation manner, determining whether the grid area represented by the currently traversed node is occupied according to the number of hit points of the currently traversed node includes:
[0032] Calculate the ratio of the number of hit points of the currently traversed node to the corresponding maximum number of hit points, where the maximum number of hit points corresponding to the number of hit points of the currently traversed node is the maximum number of hit points among the number of hit points of the N child nodes of the parent node of the currently traversed node;
[0033] If the calculated ratio is greater than a preset ratio threshold, determine that the grid area represented by the currently traversed node is occupied;
[0034] If the calculated ratio is less than or equal to the preset ratio threshold, determine that the grid area represented by the currently traversed node is not occupied.
[0035] The third aspect of this application provides a point cloud data storage device, including: a hash index determination module, a grid creation and storage module, a point cloud data insertion module, and a grid occupancy probability update module;
[0036] The hash index determination module is used to, for each point cloud data obtained by a sensor, determine the hash index of the grid corresponding to the point cloud data according to the point cloud data and the set grid resolution, and obtain a target hash index;
[0037] The grid creation and storage module is used to create the grid corresponding to the target hash index when the grid corresponding to the target hash index does not exist in the hash table, and store the created grid in the hash table;
[0038] The point cloud data insertion module is used to insert the point cloud data into the newly created grid in the hash table, and when the grid corresponding to the target hash index exists in the hash table, insert the point cloud data into the grid corresponding to the target hash index in the hash table; where there is a grid occupancy probability in the grid in the hash table;
[0039] The grid occupancy probability update module is used to update the grid occupancy probability in the grid corresponding to the target hash index, and update the grid occupancy probability in the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index.
[0040] The fourth aspect of this application provides an output processing device for performing output processing on the data stored by the above-mentioned point cloud data storage device. The output processing device includes: a hash index determination module, and a grid occupancy output processing module and / or a point cloud data output processing module;
[0041] The hash index determination module is used to determine the hash index of the grids within the specified area according to the specified area and the set grid resolution, and obtain a hash index set;
[0042] The grid occupancy output processing module is used for each hash index in the hash index set. If there is a grid corresponding to the hash index in the hash table, determine the occupancy situation of the grid corresponding to the hash index, and perform occupancy setting on the grid corresponding to the hash index in the grid map of the specified area according to the occupancy situation of the grid corresponding to the hash index. Wherein, the grid map of the specified area is obtained by dividing the specified area according to the set grid resolution;
[0043] The point cloud data output processing module is used for each hash index in the hash index set, obtain the point cloud data within the grid corresponding to the hash index, and display the obtained point cloud data within the grid corresponding to the hash index in the grid map of the specified area.
[0044] The fifth aspect of this application provides a data processing system, including: the above-mentioned point cloud data storage device and the above-mentioned output processing device.
[0045] The sixth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0046] The memory is used to store a computer program;
[0047] The processor is used to execute the computer program so that the electronic device can implement the steps of any one of the above-mentioned point cloud data storage methods, and / or, implement the steps of any one of the above-mentioned output processing methods.
[0048] The seventh aspect of this application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can be enabled to implement the steps of any one of the above-mentioned point cloud data storage methods, and / or, implement the steps of any one of the above-mentioned output processing methods.
[0049] The eighth aspect of the present application provides a computer program product, including computer-readable instructions, which, when running on an electronic device, enable the electronic device to implement the steps of any of the above-mentioned point cloud data storage methods, and / or implement the steps of any of the above-mentioned output processing methods.
[0050] By means of the above technical solution, for each point cloud data obtained by a sensor in the point cloud data storage method provided by the present application, according to the point cloud data and the set grid resolution, the hash index of the grid corresponding to the point cloud data is determined to obtain a target hash index. If there is no grid corresponding to the target hash index in the hash table, a grid corresponding to the target hash index is created and the created grid is stored in the hash table, and then the point cloud data is inserted into the grid corresponding to the target hash index in the hash table. If there is a grid corresponding to the target hash index in the hash table, the point cloud data is directly inserted into the grid corresponding to the target hash index in the hash table, the grid occupancy probability in the grid corresponding to the target hash index is updated, and the grid occupancy probability in the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index is updated. The point cloud data storage method provided by the present application uses a hash table for sparse storage, that is, only the grids with point cloud data are stored using the hash table. Since not all grids are stored, the memory occupancy can be greatly reduced. At the same time, since the present application updates the grid occupancy probability on sparse grids, the calculation cost of updating the grid occupancy probability is relatively low. Description of the Drawings
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0052] Figure 1 It is a schematic flowchart of the point cloud data storage method provided by the embodiment of the present application;
[0053] Figure 2 It is an example of a quadtree provided by the embodiment of the present application;
[0054] Figure 3 For Figure 2 It is a schematic diagram of the grid areas represented by the nodes of the quadtree shown;
[0055] Figure 4 It is a schematic diagram of updating the hit count of a node provided by the embodiment of the present application;
[0056] Figure 5 A flowchart showing the output processing method provided by an embodiment of the present application;
[0057] Figure 6 A schematic diagram showing the grid occupancy accuracy output according to an N-ary tree of different depths provided by an embodiment of the present application;
[0058] Figure 7 A schematic diagram showing the structure of the point cloud data storage device provided by an embodiment of the present application;
[0059] Figure 8 A schematic diagram showing the structure of the output processing device provided by an embodiment of the present application. Detailed implementation manners
[0060] The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. The terms used in the embodiments of the present application are only used to explain the specific embodiments of the present application, rather than to limit the present application.
[0061] The embodiments of the present application will be described below with reference to the accompanying drawings. Those of ordinary skill in the art will know that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0062] The terms "first", "second", etc. in the specification, claims and above-mentioned drawings of the present application are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that these terms can be interchanged under appropriate circumstances, which is only a way of distinguishing when describing objects with the same attributes in the embodiments of the present application. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device including a series of units does not have to be limited to those units, but may include other units not clearly listed or inherent to these processes, methods, products or devices.
[0063] In view of the fact that the current point cloud data storage scheme occupies a large amount of memory and the calculation cost of updating the grid occupancy probability is relatively high, the inventors of this case have conducted research. Through continuous research, a point cloud data storage method with better effects is finally provided. Next, the point cloud data storage method provided by the present application will be introduced through the following embodiments.
[0064] Please refer to Figure 1 , which shows a flowchart of the point cloud data storage method provided by an embodiment of the present application. The point cloud data storage method provided by an embodiment of the present application can be implemented based on a terminal with data processing capabilities (such as a robot). The point cloud data storage method may include:
[0065] Step S101: For each point cloud data P obtained by using a sensor i , determine the hash index of the grid corresponding to the point cloud data P i and the set grid resolution, and obtain the target hash index i .
[0066] In a possible implementation, the upper bound of the measurement thickness of a single plane can be determined according to sensor noise and positioning error, etc., denoted as μ, and a suitable grid resolution r (r > μ) can be set with reference to μ
[0067] The data storage method provided in the embodiments of the present application can be applied to a two-dimensional scenario (such as a ground robot navigation scenario), and can also be applied to a three-dimensional scenario. If the data storage method provided in the embodiments of the present application is applied to a two-dimensional scenario, the point cloud data in the embodiments of the present application is two-dimensional point cloud data (the two-dimensional point cloud data can be two-dimensional point cloud data collected by a two-dimensional sensor (such as a two-dimensional lidar), or can be two-dimensional point cloud data obtained by projecting three-dimensional point cloud data collected by a three-dimensional sensor (such as a three-dimensional lidar) onto a specific plane (such as the ground)). If the data storage method provided in the embodiments of the present application is applied to a three-dimensional scenario, the point cloud data in the embodiments of the present application is three-dimensional point cloud data
[0068] In this embodiment, the hash index of the grid corresponding to the point cloud data P i is the hash index of the grid corresponding to the point cloud data P i in the global coordinate system. Exemplarily, the application scenario is a two-dimensional scenario, and the point cloud data P i is (p x , p y ), and the hash index of the grid corresponding to the point cloud data P i in the global coordinate system can be calculated by the following formula
[0069] (1)
[0070] where n x and n y are two relatively large prime numbers. The introduction of n x and n y helps to reduce the conflict of hash key values, and m is the length of the hash table
[0071] Step S102-a1: If there is no grid corresponding to the target hash index in the hash table, create the grid corresponding to the target hash index and store the created grid in the hash table
[0072] In this embodiment, after determining the point cloud data P iAfter determining the hash index of the corresponding grid as the target hash index, check whether there is a grid corresponding to the target hash index in the hash table. If there is no grid corresponding to the target hash index in the hash table, create a grid with a special structure for the target index and store the created grid in the hash table.
[0073] Step S102-a2: Insert the point cloud data P i into the grid corresponding to the target hash index in the hash table.
[0074] After storing the created grid in the hash table, insert the point cloud data P i .
[0075] Step S102-b: If there is a grid corresponding to the target hash index in the hash table, then insert the point cloud data P i into the grid corresponding to the target hash index in the hash table.
[0076] When there is a grid corresponding to the target hash index in the hash table, directly insert the point cloud data P i into the grid corresponding to the target hash index in the hash table.
[0077] Step S103: Update the grid occupancy probability in the grid corresponding to the target hash index, and update the grid occupancy probability in the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index.
[0078] In this embodiment, the execution order of step S103 is not limited. Step S103 can be executed not only after the step "insert the point cloud data P i into the grid corresponding to the target hash index in the hash table", but also before the step "insert the point cloud data P i into the grid corresponding to the target hash index in the hash table".
[0079] In this embodiment, the grid in the hash table has a grid occupancy probability (the probability that the grid is occupied by an obstacle). It should be noted that the grid occupancy probability in the newly created grid is the initial grid occupancy probability.
[0080] Updating the grid occupancy probability in the grid corresponding to the target hash index includes: increasing the grid occupancy probability in the grid corresponding to the target hash index. For any grid in the hash table, if point cloud data falls into the grid, increase the grid occupancy probability in the grid.
[0081] Considering that the occupancy of the grid may change. For example, there are dynamic obstacles in the target area, and the movement of the obstacles will cause the occupancy of the grid to change. In view of this, in this embodiment, the grid occupancy probability in the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index is updated.
[0082] Specifically, the process of updating the grid occupancy probability in the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index may include:
[0083] Step a1: According to the center point coordinates of the sensor and the grid center point coordinates of the grid corresponding to the target hash index, determine the hash index of the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index, and obtain a hash index set.
[0084] In addition to the grid occupancy probability, the grid center point coordinates are also in the grid in the hash table. In a possible implementation manner, according to the center point coordinates of the sensor and the grid center point coordinates of the grid corresponding to the target hash index, the Bresenham algorithm can be used to determine the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the point cloud data P i corresponding grid, and then calculate the hash index of the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the point cloud data P i corresponding grid.
[0085] Step a2: For each hash index in the hash index set, if there is a grid corresponding to the hash index in the hash table, reduce the grid occupancy probability in the grid corresponding to the hash index.
[0086] The grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the point cloud data P i are grids with a relatively low possibility of being occupied by obstacles. Reduce the grid occupancy probability of these grids.
[0087] In this embodiment, when the latest grid occupancy probability in the grid corresponding to the hash index is less than the preset occupancy probability threshold, the grid corresponding to the hash index can be deleted from the hash table.
[0088] To reduce the memory occupancy, when the latest grid occupancy probability in the grid corresponding to a hash index is less than the preset occupancy probability threshold, the grid corresponding to the hash index is deleted from the hash table. It should be noted that if the grid occupancy probability of a grid is less than the preset occupancy probability threshold, it is considered that the grid is not occupied by an obstacle. At this time, the grid is deleted from the hash table to reduce the memory occupancy.
[0089] The point cloud data storage method provided by the embodiments of the present application, for each point cloud data obtained by a sensor, can determine the hash index of the grid corresponding to the point cloud data according to the point cloud data and the set grid resolution, to obtain a target hash index. If there is no grid corresponding to the target hash index in the hash table, a grid corresponding to the target hash index is created and the created grid is stored in the hash table, and then the point cloud data is inserted into the grid corresponding to the target hash index in the hash table. If there is a grid corresponding to the target hash index in the hash table, the point cloud data is directly inserted into the grid corresponding to the target hash index in the hash table. At the same time, the grid occupancy probability in the grid corresponding to the target hash index is updated, and the grid occupancy probability in the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index is updated. The point cloud data storage method provided by the embodiments of the present application uses a hash table for sparse storage, that is, only the grids with point cloud data are stored using the hash table. Since not all grids are stored, the memory occupancy can be greatly reduced. At the same time, since the embodiments of the present application update the grid occupancy probability on the sparse grids, the calculation cost of updating the grid occupancy probability is greatly reduced.
[0090] In another embodiment of the present application, the specific implementation process of "inserting the point cloud data P i into the grid corresponding to the target hash index in the hash table" in the above embodiment is introduced.
[0091] In a possible implementation manner, in addition to the grid occupancy probability and the grid center point coordinates, there is also an N-ary tree in the grid in the hash table. Further, the specific implementation process of inserting the point cloud data P i into the grid corresponding to the target hash index in the hash table may include:
[0092] Step b1: Insert the point cloud data into the target node of the N-ary tree in the grid corresponding to the target hash index in the hash table, and update the hit count of the target node and the related nodes of the target node.
[0093] The root node of the N-ary tree in any grid represents the entire grid, and any other node represents 1 / N area of the grid area represented by its parent node. It should be noted that the N-ary tree in the newly created grid only has a root node. As the point cloud data inserted into the grid increases, the N-ary tree will continue to split.
[0094] Among them, the value of N depends on the actual application scenario. Considering that the grids in a two-dimensional scenario are usually squares, in order to divide a square grid into smaller square regions to generate a high-resolution grid, the N-ary tree in this embodiment can be a quadtree. Considering that the grids in a three-dimensional scenario are usually cubes, in order to divide a cube grid into smaller cubes to generate a high-resolution grid, the N-ary tree in this embodiment can be an octree. A quadtree is a tree-like data structure, and each node of the quadtree has at most four child nodes. An octree is also a tree-like data structure, and each node of the octree has at most eight child nodes.
[0095] Exemplarily, when the application scenario is a two-dimensional scenario, the N-ary tree within the grid corresponding to the target hash index is a quadtree. Refer to Figure 2 for an example of a quadtree. The root node R in the quadtree represents the entire area of the grid, and other nodes in the quadtree represent 1 / 4 of the grid area represented by their parent node. Refer to Figure 3 for a schematic diagram showing Figure 2 the grid areas represented by each node in the quadtree. The root node R represents the entire grid. Node A of the quadtree represents the upper left 1 / 4 area of the entire grid, node B represents the upper right 1 / 4 area of the entire grid, node C represents the lower left 1 / 4 area of the entire grid, node D represents the lower right 1 / 4 area of the entire grid. The four child nodes A1, A2, A3, and A4 of node A respectively represent the upper left 1 / 4 area, upper right 1 / 4 area, lower left 1 / 4 area, and lower right 1 / 4 area of the grid area represented by node A. Nodes A21, A22, A23, and A24 respectively represent the upper left 1 / 4 area, upper right 1 / 4 area, lower left 1 / 4 area, and lower right 1 / 4 area of the grid area represented by node A2. Nodes D1, D2, D3, and D4 respectively represent the upper left 1 / 4 area, upper right 1 / 4 area, lower left 1 / 4 area, and lower right 1 / 4 area of the grid area represented by node D. Nodes D11, D12, D13, and D14 respectively represent the upper left 1 / 4 area, upper right 1 / 4 area, lower left 1 / 4 area, and lower right 1 / 4 area of the grid area represented by node D1. Nodes D141, D142, D143, and D144 respectively represent the upper left 1 / 4 area, upper right 1 / 4 area, lower left 1 / 4 area, and lower right 1 / 4 area of the grid area represented by node D14.
[0096] It should be noted that the point cloud data is position coordinates. The target node can be determined according to the point cloud data and the grid area represented by the node of the N-ary tree. The target node is the leaf node of the current N-ary tree. Assuming that the point cloud data falls into Figure 3 the grid area represented by node A21 in iInsert the node A21 of the quadtree. In addition, it should be noted that if the grid corresponding to the target index is a newly created grid, the point cloud data P is inserted into the root node of the N-ary tree within the grid. i .
[0097] In this embodiment, each time point cloud data is inserted into a node of the N-ary tree, the hit count of the node can be updated from the root node of the N-ary tree downward.
[0098] It should be noted that the hit count of any node in the N-ary tree is the number of point cloud data falling into the grid area represented by the node. As Figure 3 shown, there are 9 pieces of point cloud data falling into the grid area represented by the root node R, so the hit count of the root node R is 9. There are 2 pieces of point cloud data falling into the grid area represented by the node A, so the hit count of the node A is 2. There is 1 piece of point cloud data falling into the grid area represented by the node A2, so the hit count of the node A2 is 1. There is 1 piece of point cloud data falling into the grid area represented by the node A24, so the hit count of the node A24 is 1. There are 5 pieces of point cloud data falling into the grid area represented by the node D, so the hit count of the node D is 5. There are 3 pieces of point cloud data falling into the grid area represented by the node D1, so the hit count of the node D1 is 3. There are 2 pieces of point cloud data falling into the grid area represented by the node D14, so the hit count of the node D14 is 2. There is 1 piece of point cloud data falling into the grid area represented by the node D141, so the hit count of the node D141 is 1. The same applies to other nodes.
[0099] As Figure 4 shown, assume that a point cloud data is inserted into the first node of the third layer. Then update the hit count of the root node (the hit count is incremented by 1), update the hit count of the first node of the second layer (the hit count is incremented by 1), and update the hit count of the node where the point cloud data is inserted (the hit count is incremented by 1).
[0100] Step b2: If the number of point cloud data held by the target node is greater than the preset quantity threshold, split the target node into N child nodes and distribute the point cloud data held by the target node to the split child nodes.
[0101] Exemplarily, the target node is Figure 2 the node A1 in, and the point cloud data P iAfter inserting node A1, if the number of point cloud data held by node A1 is greater than a preset number threshold, then split 4 child nodes A11, A12, A13, and A14 from node A1, and distribute the point cloud data held by node A1 to the split child nodes. Assume that node A1 holds 4 point cloud data, and among the 4 point cloud data, two point cloud data fall into the grid area represented by child node A11, and the other two point cloud data fall into the grid area represented by child node A13. Then, distribute the point cloud data that falls into the grid area represented by child node A11 to child node A11, and distribute the point cloud data that falls into the grid area represented by child node A13 to child node A13.
[0102] The point cloud data storage method provided by the embodiments of the present application maintains point cloud data through an N-ary tree and realizes the generation of multi-resolution grids through the N-ary tree.
[0103] The above embodiment mentioned that when inserting point cloud data P i After inserting into the target node of the N-ary tree, if the number of point cloud data held by the target node is greater than a preset number threshold, then split N child nodes from the target node, and then distribute the point cloud data held by the target node to the split child nodes. In another embodiment of the present application, the implementation process of splitting N child nodes from the target node is introduced.
[0104] In a possible implementation manner, when the number of point cloud data held by the target node is greater than a preset number threshold, N child nodes can be directly split from the target node.
[0105] To avoid memory troubles caused by unrestricted growth of local point cloud density, in another possible implementation manner, a layer threshold of the N-ary tree can be preset. When inserting point cloud data P i After inserting into the target node of the N-ary tree, first determine whether the layer corresponding to the target node reaches the preset layer threshold. If the layer corresponding to the target node does not reach the preset layer threshold, then split N child nodes from the target node. Wherein, the layer corresponding to the target node is the layer where the target node is located in the N-ary tree. As Figure 2 shown, the root node R is located in the first layer of the N-ary tree, so the layer corresponding to the root node is 1. Node A is located in the second layer of the quadtree, so the layer corresponding to node A is 2. Node A1 is located in the third layer of the quadtree, so the layer corresponding to node A1 is 3.
[0106] It should be noted that if the layer corresponding to the target node reaches the preset layer threshold, then no more child nodes will be split. When the layer corresponding to the target node reaches the preset layer threshold, in a possible implementation manner, to avoid unrestricted increase of the point cloud data held by the target node, the point cloud data inserted earliest among the point cloud data held by the target node can be deleted.
[0107] Based on the point cloud data storage method provided in the above embodiments, an output processing method is further provided in an embodiment of the present application. This output processing method is used to perform output processing on the data stored by using the point cloud data storage method provided in the above embodiments. Please refer to Figure 5 , which shows a schematic flowchart of this output processing method. This output processing method may include:
[0108] Step S501: Determine the hash indexes of the grids within the specified area to obtain a set of hash indexes.
[0109] Specifically, the process of determining the hash indexes of the grids within the specified area may include: determining the hash indexes of the grids within the specified area according to the specified area and the set grid resolution.
[0110] Exemplarily, when the application scenario is a ground robot navigation scenario and the specified area is a circular area with a distance less than s from the current position of the robot, the hash indexes of the grids within the specified area can be determined according to the following formula:
[0111] (2)
[0112] where (x robo , y robo ) are the position coordinates of the robot, (p x ′, p y ′) are the coordinates of a position point within the specified area, g′ is the integer coordinate of a grid within the specified area, r is the set grid resolution, is the set of hash indexes composed of the hash indexes of the grids within the specified area.
[0113] Step S502: For each hash index in the set of hash indexes, if there is a grid corresponding to the hash index in the hash table, determine the occupancy of the grid corresponding to the hash index, and perform occupancy setting on the grid corresponding to the hash index in the grid map of the specified area according to the occupancy of the grid corresponding to the hash index, and / or, obtain the point cloud data within the grid corresponding to the hash index, and display the obtained point cloud data within the grid corresponding to the hash index in the grid map of the specified area.
[0114] Among them, the grid map of the specified area is obtained by dividing the specified area according to the set grid resolution r.
[0115] In this embodiment, the process of determining the occupancy of the grid corresponding to the hash index and performing occupancy setting on the grid corresponding to the hash index in the grid map of the specified area according to the occupancy of the grid corresponding to the hash index may include:
[0116] Step c: Traverse the N - ary tree in the grid corresponding to the hash index starting from the root node:
[0117] Step c1: Determine whether the grid area represented by the currently traversed node is occupied according to the number of hit points of the currently traversed node.
[0118] Among them, the number of hit points of the currently traversed node is the number of point cloud data falling into the grid area represented by the currently traversed node.
[0119] There are multiple implementation methods to determine whether the grid area represented by the currently traversed node is occupied according to the number of hit points of the currently traversed node. In one possible implementation method, it can be determined whether the grid area represented by the currently traversed node is occupied according to whether the number of hit points of the currently traversed node is 0. That is, if the number of hit points of the currently traversed node is 0, it is determined that the grid area represented by the currently traversed node is not occupied; if the number of hit points of the currently traversed node is not 0, it is determined that the grid area represented by the currently traversed node is occupied.
[0120] Considering that the areas represented by some nodes of the N - ary tree may contain noise, in order to obtain a more accurate discrimination result, this embodiment provides another implementation method to determine whether the grid area represented by the currently traversed node is occupied according to the number of hit points of the currently traversed node:
[0121] Step c1 - 1: Calculate the ratio of the number of hit points of the currently traversed node to the corresponding maximum number of hit points.
[0122] Among them, the maximum number of hit points corresponding to the number of hit points of the currently traversed node is the maximum number of hit points among the hit points of the N sub - nodes of the parent node of the currently traversed node.
[0123] Suppose the currently traversed node is a node in the l - th layer of the N - ary tree. The maximum number of hit points M corresponding to the number of hit points of the currently traversed node can be expressed as:
[0124] (3)
[0125] Among them, represents the i - th sub - node among the N sub - nodes of the parent node of the currently traversed node, represents the number of hit points of the i - th sub - node.
[0126] Exemplarily, as Figure 3 shown, suppose the currently traversed node is A, and the number of hit points of node A is hits A , and the corresponding maximum number of hit points is hits A (The number of hit points hits of node AA )、hits B (Number of hit points of node B), hits C (Number of hit points of node C), hits D (Number of hit points of node D), then calculate the maximum number of hit points among them, and calculate hits A / hits D .
[0127] Step c1-2a: If the calculated ratio is greater than the preset ratio threshold, it is determined that the grid area represented by the currently traversed node is occupied.
[0128] If the ratio of the number of hit points of the currently traversed node to the corresponding maximum number of hit points M is greater than the preset ratio threshold λ l , it is determined that the grid area represented by the currently traversed node is occupied.
[0129] Step c1-2b: If the calculated ratio is less than or equal to the preset ratio threshold, it is determined that the grid area represented by the currently traversed node is not occupied.
[0130] If the ratio of the number of hit points of the currently traversed node to M is less than or equal to the preset ratio threshold λ l , it is determined that the grid area represented by the currently traversed node is not occupied.
[0131] Step c2: In the case where it is determined that the grid area represented by the currently traversed node is occupied, if the currently traversed node is a leaf node, set the grid area represented by the currently traversed node as occupied on the grid map of the specified area, and then continue to traverse the next node. If the currently traversed node is not a leaf node, use a child node of the currently traversed node as the next traversal object and continue to traverse until all nodes are traversed.
[0132] The output processing method provided by the embodiments of the present application can control the occupancy accuracy of the grid (i.e., the expression accuracy of obstacles) by controlling the depth of the N-ary tree. As Figure 6 shown, the greater the depth of the N-ary tree, the higher the occupancy accuracy of the grid (i.e., the higher the expression accuracy of obstacles). The output processing method provided by the embodiments of the present application can output the occupancy situation of the grid with high resolution through the N-ary tree, thereby improving the expression ability for obstacles.
[0133] The embodiments of the present application also provide a device corresponding to the point cloud data storage method provided by the above embodiments. Please refer to Figure 7 , Figure 7A structural schematic diagram of a point cloud data storage device provided by an embodiment of the present application. The point cloud data storage device may include: a hash index determination module 701, a grid creation and storage module 702, a point cloud data insertion module 703, and a grid occupancy probability update module 704.
[0134] The hash index determination module 701 is configured to, for each point cloud data obtained by a sensor, determine a hash index of a grid corresponding to the point cloud data according to the point cloud data and a set grid resolution, so as to obtain a target hash index.
[0135] The grid creation and storage module 702 is configured to, when there is no grid corresponding to the target hash index in the hash table, create a grid corresponding to the target hash index and store the created grid in the hash table.
[0136] The point cloud data insertion module 703 is configured to insert the point cloud data into a newly created grid in the hash table, and when there is a grid corresponding to the target hash index in the hash table, insert the point cloud data into the grid corresponding to the target hash index in the hash table; wherein, there is a grid occupancy probability in the grid in the hash table.
[0137] The grid occupancy probability update module 704 is configured to update the grid occupancy probability in the grid corresponding to the target hash index, and update the grid occupancy probability in the grid through which a straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index passes.
[0138] In a possible implementation manner, the point cloud data storage device provided by the embodiment of the present application may further include: a grid deletion module.
[0139] The grid deletion module is configured to, for any grid through which a straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index passes, if the grid occupancy probability of the grid is less than a preset probability threshold, delete the grid from the hash table.
[0140] In a possible implementation manner, there is also an N-ary tree in the grid in the hash table. The root node of the N-ary tree in any grid represents the entire grid, and any other node represents a 1 / N area of the grid area represented by the parent node of the node. The value of N depends on the actual application scenario.
[0141] When the point cloud data insertion module 703 inserts the point cloud data into the grid corresponding to the target hash index in the hash table, it is specifically configured to:
[0142] Insert the point cloud data into a target node of the N-ary tree in the grid corresponding to the target hash index in the hash table, and update the number of hit points of the target node and related nodes of the target node. The number of hit points of a node is the number of point cloud data falling into the grid area represented by the node.
[0143] If the number of point cloud data held by the target node is greater than a preset number threshold, then split N child nodes from the target node, and allocate the point cloud data held by the target node to the split child nodes.
[0144] In a possible implementation, there are also grid center point coordinates within the grid in the hash table.
[0145] When the grid occupancy probability update module 704 updates the grid occupancy probability within the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index, it is specifically used for:
[0146] According to the center point coordinates of the sensor and the grid center point coordinates of the grid corresponding to the target hash index, determine the hash indices of the grids passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index, and obtain a hash index set;
[0147] For each hash index in the hash index set, if there is a grid corresponding to the hash index in the hash table, then reduce the grid occupancy probability within the grid corresponding to the hash index.
[0148] In a possible implementation, the point cloud data storage device provided by the embodiments of the present application may further include: a layer discrimination module.
[0149] The layer discrimination module is used to determine whether the layer corresponding to the target node reaches a preset layer threshold.
[0150] When the point cloud data insertion module 703 splits N child nodes from the target node, it is specifically used for:
[0151] If the layer corresponding to the target node does not reach the preset layer threshold, then split N child nodes from the target node.
[0152] In a possible implementation, the point cloud data storage device provided by the embodiments of the present application may further include: a point cloud data deletion module.
[0153] The point cloud data deletion module is used to delete the earliest inserted point cloud data in the point cloud data held by the target node when the layer corresponding to the target node reaches the preset layer threshold.
[0154] The point cloud data storage device provided by the embodiment of the present application uses a hash table for sparse storage, that is, only the grids with point cloud data are stored using the hash table. Since not all grids are stored, the memory occupancy can be greatly reduced. At the same time, since the point cloud data storage device provided by the embodiment of the present application updates the grid occupancy probability on the sparse grids, the calculation cost of updating the grid occupancy probability is greatly reduced. In addition, the point cloud data storage device provided by the embodiment of the present application can generate high-resolution grids through the N-ary tree within the grid.
[0155] The embodiment of the present application also provides an output processing device, which is used to perform output processing on the data stored by using the point cloud data storage device provided in the above embodiment, such as Figure 8 As shown, the output processing device provided by the embodiment of the present application may include: a hash index determination module 801, and a grid occupancy output processing module 802 and / or a point cloud data output processing module 803.
[0156] The hash index determination module 801 is used to determine the hash index of the grids within the specified area according to the specified area and the set grid resolution, and obtain a hash index set.
[0157] The grid occupancy output processing module 802 is used to, for each hash index in the hash index set, if there is a grid corresponding to the hash index in the hash table, determine the occupancy situation of the grid corresponding to the hash index, and perform occupancy setting on the grid corresponding to the hash index in the grid map of the specified area according to the occupancy situation of the grid corresponding to the hash index. Among them, the grid map of the specified area is obtained by dividing the specified area according to the set grid resolution.
[0158] The point cloud data output processing module 803 is used to, for each hash index in the hash index set, obtain the point cloud data within the grid corresponding to the hash index, and display the obtained point cloud data within the grid corresponding to the hash index in the grid map of the specified area.
[0159] In a possible implementation manner, there is an N-ary tree in the grid in the hash table. When the grid occupancy output processing module 802 determines the occupancy situation of the grid corresponding to the hash index and performs occupancy setting on the grid corresponding to the hash index in the grid map of the specified area according to the occupancy situation of the grid corresponding to the hash index, it is specifically used for:
[0160] Traverse the N-ary tree within the grid corresponding to the hash index starting from the root node:
[0161] Determine whether the grid area represented by the currently traversed node is occupied according to the number of hit points of the currently traversed node;
[0162] When it is determined that the grid area represented by the currently traversed node is occupied, if the currently traversed node is a leaf node, set the grid area represented by the currently traversed node as occupied on the grid map of the specified area, and continue traversing. If the currently traversed node is not a leaf node, use a child node of the currently traversed node as the next traversal object and continue traversing.
[0163] In a possible implementation, when the grid occupancy output processing module 802 determines whether the grid area represented by the currently traversed node is occupied according to the number of hit points of the currently traversed node, it is specifically used for:
[0164] Calculate the ratio of the number of hit points of the currently traversed node to the corresponding maximum number of hit points, where the maximum number of hit points corresponding to the number of hit points of the currently traversed node is the maximum number of hit points among the number of hit points of the N child nodes of the parent node of the currently traversed node;
[0165] If the calculated ratio is greater than the preset ratio threshold, determine that the grid area represented by the currently traversed node is occupied;
[0166] If the calculated ratio is less than or equal to the preset ratio threshold, determine that the grid area represented by the currently traversed node is not occupied.
[0167] The output processing device provided by the embodiments of the present application can output the grid occupancy situation with high resolution and noise filtering.
[0168] The embodiments of the present application also provide a data processing system, which may include the point cloud data storage device provided by the above embodiments and the output processing device provided by the above embodiments.
[0169] The embodiments of the present application also provide an electronic device, which may include: at least one processor, at least one communication interface, at least one memory, and at least one communication bus.
[0170] In the embodiments of the present application, the number of processors, communication interfaces, memories, and communication buses is at least one, and the processors, communication interfaces, and memories complete mutual communication through the communication bus;
[0171] The processor may be a central processing unit CPU, or a specific integrated circuit ASIC (ApplicAtionSpecific IntegrAted Circuit), or one or more integrated circuits configured to implement the embodiments of the present application, etc.;
[0172] The memory may include high-speed RAM memory and may also include non-volatile memory, such as at least one disk memory;
[0173] Among them, the memory stores a program, and the processor can call the program stored in the memory. The program is used to implement the steps of the point cloud data storage method provided in the above embodiments, and / or implement the steps of the output processing method provided in the above embodiments.
[0174] The embodiments of the present application also provide a computer storage medium. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can be enabled to implement the steps of the point cloud data storage method provided in the above embodiments, and / or implement the steps of the output processing method provided in the above embodiments.
[0175] The embodiments of the present application also provide a computer program product, including computer-readable instructions. When the computer-readable instructions run on an electronic device, the electronic device is enabled to implement the steps of the point cloud data storage method provided in the above embodiments, and / or implement the steps of the output processing method provided in the above embodiments.
[0176] In addition, it should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines.
[0177] Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions accomplished by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for this application, in more cases, software program implementation is a better embodiment. Based on such an understanding, the technical solution of this application, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disc of a computer, and includes several instructions for causing a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in various embodiments of this application.
[0178] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.
[0179] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, training device, or data center to another website, computer, training device, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store, or a data storage device such as a training device or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive (SSD)).
Claims
1. A point cloud data storage method, characterized in that: include: For each point cloud data acquired by the sensor, a hash index of a grid corresponding to the point cloud data is determined according to the point cloud data and a set grid resolution, and a target hash index is obtained; If the grid corresponding to the target hash index does not exist in the hash table, then create the grid corresponding to the target hash index, store the created grid in the hash table, and insert the point cloud data into the grid corresponding to the target hash index in the hash table; if the grid corresponding to the target hash index exists in the hash table, then insert the point cloud data into the grid corresponding to the target hash index in the hash table; wherein the grid in the hash table has a grid occupancy probability; The grid occupancy probability in the grid corresponding to the target hash index is updated, and the grid occupancy probability in the grid passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index is updated.
2. The point cloud data storage method according to claim 1, characterized in that: Also includes: For any grid passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index, if the grid occupancy probability of the grid is less than a preset probability threshold, the grid is deleted from the hash table.
3. The point cloud data storage method according to claim 1, characterized in that: There is also an N-ary tree in the grid in the hash table; the root node of the N-ary tree in any grid represents the entire grid, and any other node represents 1 / N area of the grid area represented by the parent node of the node, and the value of N depends on the actual application scenario; Inserting the point cloud data into the grid corresponding to the target hash index in the hash table includes: Insert the point cloud data into the target node of the N-ary tree in the grid corresponding to the target hash index in the hash table, and update the hit points of the target node and the nodes related to the target node. The hit point number of a node is the number of point cloud data falling into the grid area represented by the node; If the amount of point cloud data held by the target node is greater than a preset threshold, N child nodes are split from the target node, and the point cloud data held by the target node are allocated to the split child nodes.
4. The point cloud data storage method according to claim 1, characterized in that: The grid in the hash table also includes the coordinates of the center point of the grid; The updating of the grid occupancy probability in the grid passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index includes: According to the center point coordinates of the sensor and the center point coordinates of the grid corresponding to the target hash index, determine the hash index of the grid through which the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index passes, and obtain a hash index set; For each hash index in the hash index set, if a grid corresponding to the hash index exists in the hash table, the grid occupancy probability in the grid corresponding to the hash index is reduced.
5. The point cloud data storage method according to claim 3, characterized in that: Before splitting N child nodes from the target node, the method further includes: Determine whether the number of layers corresponding to the target node reaches a preset layer number threshold. If the number of layers corresponding to the target node does not reach the preset layer number threshold, execute the step of splitting N child nodes from the target node.
6. The point cloud data storage method according to claim 5, characterized in that: Also includes: If the number of layers corresponding to the target node reaches the preset layer number threshold, the earliest inserted point cloud data in the point cloud data held by the target node is deleted.
7. An output processing method, characterized in that: The method is used for outputting data stored by the point cloud data storage method according to any one of claims 1 to 6, and the output processing method comprises: According to the specified area and the set grid resolution, determine the hash index of the grid in the specified area to obtain a hash index set; For each hash index in the hash index set, if a grid corresponding to the hash index exists in the hash table, the occupancy status of the grid corresponding to the hash index is determined, and the occupancy status of the grid corresponding to the hash index is set in the grid map of the specified area according to the occupancy status of the grid corresponding to the hash index, and / or, point cloud data in the grid corresponding to the hash index is obtained, and the obtained point cloud data is displayed in the grid corresponding to the hash index in the grid map of the specified area, wherein the grid map of the specified area is obtained by dividing the specified area according to the set grid resolution.
8. The output processing method according to claim 7, characterized in that: There is an N-ary tree in the grid of the hash table; The determining the occupancy of the grid corresponding to the hash index, and setting the occupancy of the grid corresponding to the hash index in the grid map of the specified area according to the occupancy of the grid corresponding to the hash index, includes: Traverse the N-ary tree in the grid corresponding to the hash index starting from the root node: According to the hit points of the currently traversed node, determine whether the grid area represented by the currently traversed node is occupied; When it is determined that the grid area represented by the currently traversed node is occupied, if the currently traversed node is a leaf node, the grid area represented by the currently traversed node is set as occupied on the grid map of the specified area; if the currently traversed node is not a leaf node, a child node of the currently traversed node is used as the next traversal object to continue traversing.
9. The output processing method according to claim 8, characterized in that: The step of determining whether the grid area represented by the currently traversed node is occupied according to the number of hit points of the currently traversed node includes: Calculate the ratio of the hit points of the currently traversed node to the corresponding maximum hit points, where the maximum hit points corresponding to the hit points of the currently traversed node is the maximum hit point among the hit points of the N child nodes of the parent node of the currently traversed node; If the calculated ratio is greater than a preset ratio threshold, it is determined that the grid area represented by the currently traversed node is occupied; If the calculated ratio is less than or equal to a preset ratio threshold, it is determined that the grid area represented by the currently traversed node is not occupied.
10. A point cloud data storage device, characterized in that: include: Hash index determination module, grid creation and storage module, point cloud data insertion module and grid occupancy probability update module; The hash index determination module is used to determine the hash index of the grid corresponding to each point cloud data acquired by the sensor according to the point cloud data and the set grid resolution, so as to obtain the target hash index; The grid creation and storage module is used to create a grid corresponding to the target hash index when the grid corresponding to the target hash index does not exist in the hash table, and store the created grid in the hash table; The point cloud data insertion module is used to insert the point cloud data into the newly created grid in the hash table, and when the grid corresponding to the target hash index exists in the hash table, insert the point cloud data into the grid corresponding to the target hash index in the hash table; wherein the grid in the hash table has a grid occupancy probability; The grid occupancy probability update module is used to update the grid occupancy probability within the grid corresponding to the target hash index, and to update the grid occupancy probability within the grid passed by the straight line between the center point of the sensor and the center point of the grid corresponding to the target hash index.
11. An output processing device, characterized in that: Used to perform output processing on the data stored by the point cloud data storage device according to claim 10, the output processing device comprising: a hash index determination module, and a grid occupancy output processing module and / or a point cloud data output processing module; The hash index determination module is used to determine the hash index of the grid in the specified area according to the specified area and the set grid resolution, and obtain a hash index set; The grid occupancy output processing module is used for, for each hash index in the hash index set, if a grid corresponding to the hash index exists in the hash table, determining the occupancy of the grid corresponding to the hash index, and performing occupancy setting for the grid corresponding to the hash index in a grid map of a specified area according to the occupancy of the grid corresponding to the hash index, wherein the grid map of the specified area is obtained by dividing the specified area according to a set grid resolution; The point cloud data output processing module is used to obtain the point cloud data in the grid corresponding to each hash index in the hash index set, and display the obtained point cloud data in the grid corresponding to the hash index in the grid map of the specified area.
12. A data processing system, characterized in that: include: The point cloud data storage device as claimed in claim 10 and the output processing device as claimed in claim 11.
13. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the steps of the point cloud data storage method as described in any one of claims 1 to 6, and / or implement the steps of the output processing method as described in any one of claims 7 to 9.
14. A computer storage medium, characterized in that: The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the steps of the point cloud data storage method as described in any one of claims 1 to 6, and / or implement the steps of the output processing method as described in any one of claims 7 to 9.
15. A computer program product, characterized in that The method comprises computer-readable instructions, which, when executed on an electronic device, enable the electronic device to implement the steps of the point cloud data storage method as described in any one of claims 1 to 6, and / or implement the steps of the output processing method as described in any one of claims 7 to 9.
Citation Information
Cited By
Data processing method and device in building system, equipment and storage medium
CN120915860A