Adaptive processing methods, systems, and devices for massive point cloud data
By adaptively constructing an octree framework and using multi-threaded processing, the problems of long construction time and rendering lag in the processing of massive point cloud data are solved, achieving efficient point cloud data processing and rendering.
Patent Information
- Application Number
- CN202211429587.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-11-15
AI Technical Summary
Existing technologies suffer from problems such as excessive time consumption in constructing octrees, inability to load data into memory at once, rendering stutters or crashes when processing massive point cloud data, especially with low efficiency in processing large-scale point cloud data.
An adaptive octree framework is adopted, which uses cache pool management and multi-threaded parallel processing to aggregate and thin out large leaf nodes and non-leaf nodes, dynamically adjusts the octree depth and point cloud data loading method, reduces memory requirements, and optimizes the insertion and construction process of point cloud data.
It significantly reduced the time required to build octrees, enabled normal rendering of massive point cloud data, reduced memory requirements, and improved processing efficiency.
Smart Images

Figure CN115905228B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to the technology of processing massive point cloud data. Background Technology
[0002] Point cloud data refers to a collection of vectors in a three-dimensional coordinate system. Scanned data is recorded in the form of points, each containing three-dimensional coordinates, and some may contain color information (RGB) or reflectance intensity information.
[0003] Processing massive point cloud data has always been a major challenge, especially quickly constructing an octree structure from massive point clouds. Usually, constructing an octree structure from a point cloud involves loading the entire point cloud into memory, and the depth or resolution of the octree needs to be set in advance before constructing the octree structure. The octree is considered to be completed when the specified depth or resolution is reached.
[0004] Currently, there are still some problems in processing massive point cloud data.
[0005] For example, the amount of point cloud data obtained by LiDAR scanning is strongly correlated with the scanning time. The longer the scanning time, the larger the amount of point cloud data. The size of a typical single point cloud file is in the GB level, and can even reach tens or hundreds of GB. Such a large point cloud file cannot load all the massive point cloud data into memory to build an octree structure of point cloud data.
[0006] For example, when rendering massive point clouds, the large amount of point cloud data makes it difficult to quickly obtain the target point cloud to be rendered, resulting in rendering lag or even rendering crashes. Summary of the Invention
[0007] The purpose of this application is to provide an adaptive processing method, system, and device for massive point cloud data, which can more effectively ensure the normal rendering of massive point cloud data, realize the construction of octrees for massive point clouds, and significantly reduce the time spent constructing octrees.
[0008] This application discloses an adaptive processing method for massive point cloud data, including:
[0009] Step A: Based on the actual total number of points and the estimated depth of the point cloud data in the point cloud file, construct the octree framework corresponding to the point cloud data, traverse the point cloud data, and insert the point cloud data into the corresponding leaf node of the octree framework based on the available cache status of the leaf node of the octree framework.
[0010] Step B: Construct sub-octrees in parallel for the large leaf nodes in the octree framework, wherein the large leaf node refers to a leaf node that contains more points of point cloud data than the maximum number of points that a node is allowed to contain.
[0011] Step C: In parallel, aggregate and thin the non-leaf nodes of the octree framework and its sub-octrees to generate an octree.
[0012] In a preferred embodiment, in the step of constructing an octree framework corresponding to the point cloud data based on the actual total number of points and the estimated depth of the point cloud data in the point cloud file, if the total number of points of the point cloud data that the octree framework with the estimated depth can accommodate exceeds twice the actual total number of points of the point cloud data, then a half octree framework is constructed; otherwise, a full octree framework is constructed.
[0013] In a preferred embodiment, all non-leaf nodes of the full octree framework have 8 child nodes, the root node of the semi-octree framework has 4 child nodes, and all non-leaf nodes of the semi-octree framework except the root node have 8 child nodes.
[0014] In a preferred embodiment, in the step of inserting point cloud data into the corresponding leaf node of the octree framework, all leaf nodes of the octree framework share a cache. If the next point cloud data to be inserted is within the bounding box of the previously hit leaf node, then the next point cloud data is stored in the previously hit leaf node. Otherwise, the leaf node corresponding to the point cloud data is found. If the cache currently being used by the leaf node corresponding to the point cloud data is an available cache, then the point cloud data is inserted into the cache of the corresponding leaf node. If the cache currently being used by the leaf node corresponding to the point cloud data is insufficient to accommodate the point cloud data, then an available cache is searched in the cache pool to establish a correspondence with the leaf node corresponding to the point cloud data and the point cloud data is inserted. If there is no available cache in the cache pool, then the cache of the leaf node that has not had point cloud data inserted for the longest time is evicted, and the point cloud data is inserted into the released cache.
[0015] In a preferred embodiment, in the step of constructing sub-octrees for large leaf nodes in parallel, if the number of points in the point cloud data of all large leaf nodes in the octree framework does not exceed a first threshold, then the child node of the root node is used as the root node of the sub-octree, and the corresponding large leaf nodes are constructed in parallel in the order from the root node to the leaf node. Otherwise, the sub-octrees are constructed for all large leaf nodes in the octree framework in the order from the leaf node to the root node, until the number of points in the point cloud data of all large leaf nodes in the octree framework does not exceed the first threshold.
[0016] In a preferred embodiment, in the step of parallel aggregation and thinning of non-leaf nodes of the octree, if the number of points in the point cloud data of the non-leaf node of the octree framework exceeds a second threshold, the non-leaf node is thinned and the non-empty child nodes of the node are retained, while the empty child nodes of the node are deleted; otherwise, all child nodes of the non-leaf node are deleted.
[0017] In a preferred embodiment, the step of constructing the octree framework corresponding to the point cloud data based on the actual total number of points and the estimated depth of the point cloud data in the point cloud file further includes:
[0018] Obtain the actual total number of points in the point cloud data in the point cloud file, and calculate the initial depth based on the actual total number of points and the second threshold.
[0019] The expansion depth is obtained based on the actual total number of points in the point cloud data in the point cloud file;
[0020] The estimated depth is obtained based on the initial depth and the expansion depth.
[0021] This application also discloses an adaptive processing system for massive point cloud data, including:
[0022] The octree construction and point cloud data insertion unit is used to construct an octree framework corresponding to the point cloud data based on the actual total number of points and the estimated depth of the point cloud data in the point cloud file, traverse the point cloud data, and insert the point cloud data into the corresponding leaf node of the octree framework based on the available cache state of the leaf node of the octree framework.
[0023] Large leaf nodes are used to construct octree units, which are used to construct sub-octrees in parallel from the large leaf nodes in the octree framework. The large leaf node is a leaf node that contains more points of point cloud data than the maximum number of points that a node can accommodate.
[0024] The aggregation and thinning unit and the point cloud data custom format file generation unit are used to aggregate and thin the non-leaf nodes of the octree framework and its sub-octrees in parallel to generate octrees.
[0025] This application also discloses an adaptive processing device for massive point cloud data, including:
[0026] Memory, used to store computer-executable instructions; and,
[0027] A processor for implementing the steps of the method as described above when executing the computer-executable instructions.
[0028] This application also discloses a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the method described above. In the embodiments of this application, firstly, it is not necessary to pre-set the maximum depth or minimum resolution of the octree before constructing it. The depth of the octree is dynamically adjusted according to the spatial distribution characteristics of the point cloud. After the octree is constructed, the number of points in all octree nodes does not exceed the rendering limit, enabling normal rendering. Secondly, in the embodiments, massive point clouds can be loaded into memory in batches and inserted into the octree. Intermediate files are used to save the point cloud data of the octree nodes, and the maximum number of points in leaf nodes is dynamically adjusted to exceed the maximum number of pixels for rendering, enabling the construction of octrees for massive point cloud data. Thirdly, in the embodiments, an adaptive octree construction framework, a cache pool, multi-threaded parallel splitting of large leaf nodes, and multi-threaded parallel merging / sparsening of small leaves are used to construct octrees from massive point cloud data, greatly reducing the time spent constructing the octree.
[0029] The specification of this application contains numerous technical features distributed across various technical solutions. Listing all possible combinations of these technical features (i.e., technical solutions) would make the specification excessively lengthy. To avoid this problem, the various technical features disclosed in the above-described invention, the various technical features disclosed in the following embodiments and examples, and the various technical features disclosed in the accompanying drawings can be freely combined to form various new technical solutions (all of which are considered to have been described in this specification), unless such a combination of technical features is technically infeasible. For example, one example discloses feature A+B+C, and another example discloses feature A+B+D+E. Features C and D are equivalent technical means that serve the same function, and technically only one needs to be used; they cannot be used simultaneously. Feature E can technically be combined with feature C. Therefore, the solution A+B+C+D should not be considered as described because it is technically infeasible, while the solution A+B+C+E should be considered as described. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of the overall process of the adaptive processing method for massive point cloud data according to the first embodiment of this application;
[0031] Figure 2 This is a schematic diagram of a full octree in the adaptive processing method for massive point cloud data according to the first embodiment of this application.
[0032] Figure 3 This is a schematic diagram of a semi-octree in the adaptive processing method for massive point cloud data according to the first embodiment of this application.
[0033] Figure 4 This is a flowchart illustrating the process of quickly inserting point cloud data into the leaf nodes of an octree based on a cache pool in the adaptive processing method for massive point cloud data according to the first embodiment of this application.
[0034] Figure 5 This is a schematic diagram of the process of using a thread pool to construct the octree of the "large leaf" node in parallel in the adaptive processing method for massive point cloud data according to the first embodiment of this application.
[0035] Figure 6 This is a flowchart illustrating the parallel aggregation and thinning of non-leaf nodes of an octree in the adaptive processing method for massive point cloud data according to the first embodiment of this application.
[0036] Figure 7 This is another schematic diagram of parallel aggregation and thinning of non-leaf nodes of an octree in the adaptive processing method for massive point cloud data according to the first embodiment of this application.
[0037] Figure 8 This is a schematic diagram of a custom file in the adaptive processing method for massive point cloud data according to the first embodiment of this application;
[0038] Figure 9 This is a schematic diagram of the structure of an adaptive processing system for massive point cloud data according to the second embodiment of this application. Detailed Implementation
[0039] In the following description, many technical details are presented to help the reader better understand this application. However, those skilled in the art will understand that the technical solutions claimed in this application can be implemented even without these technical details and various variations and modifications based on the following embodiments.
[0040] The following is a brief summary of some of the innovative aspects of this application:
[0041] The inventors of this application, through long-term research, discovered some problems in the processing of massive point cloud data. First, in the prior art, the depth or resolution of the octree needs to be set before construction. When the depth or resolution of the constructed octree reaches the set depth or resolution, the octree construction is completed. At this time, the number of points in the leaf nodes of the octree may exceed the maximum number of pixels for rendering, and cannot be rendered in one frame. In this regard, this application does not require presetting the maximum depth or minimum resolution of the octree before construction. The depth of the octree is dynamically adjusted according to the spatial distribution characteristics of the point cloud. After the octree is constructed, the number of points in all octree nodes does not exceed the number of points limited for rendering, and can be rendered normally. Second, in existing technologies, the entire point cloud needs to be loaded into memory before constructing an octree. However, massive point cloud files are too large to be loaded into memory all at once. To address this, this application loads the massive point cloud into memory in batches and inserts it into the octree. It uses intermediate files to store the point cloud data of the octree nodes and dynamically adjusts leaf nodes whose maximum number of points exceeds the maximum number of pixels to be rendered. This enables the construction of octrees from massive point cloud data. Third, existing octree construction schemes are too time-consuming. To address this, this application employs an adaptive octree construction framework, a caching pool, multi-threaded parallel splitting of large leaf nodes, and multi-threaded parallel merging / sparsening of small leaf nodes to construct octrees from massive point cloud data, significantly reducing the time required for octree construction.
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0043] The first embodiment of this application relates to an adaptive processing method for massive point cloud data, including the following steps:
[0044] Step A: Based on the actual total number of points and the estimated depth of the point cloud data in the point cloud file, construct an octree framework corresponding to the point cloud data. Traverse the point cloud data and, based on the available cache state of the leaf nodes of the octree framework, insert the point cloud data into the corresponding leaf nodes of the octree framework. Step B: Construct sub-octrees in parallel for the large leaf nodes in the octree framework. The large leaf node refers to a leaf node that contains more points than the maximum number of points that a node can accommodate. Step C: Aggregate and thin the non-leaf nodes of the octree framework and its sub-octrees in parallel to generate an octree.
[0045] More specifically, see the process. Figure 1 The method includes the following steps:
[0046] The overall process of point cloud data processing is as follows: Figure 1 As shown.
[0047] Step 100: Construct an octree framework corresponding to the point cloud data based on the actual total number of points and the estimated depth of the point cloud data in the point cloud file.
[0048] If the total number of points in the point cloud data that the octree with the estimated depth can accommodate exceeds twice the actual total number of points in the point cloud data, then a half-octree framework is constructed; otherwise, a full octree framework is constructed.
[0049] In this application, the constructed octree framework has two types: full octree and half octree.
[0050] The nodes of a full octree are as follows Figure 2 As shown, all non-leaf nodes in an octree have 8 child nodes.
[0051] The nodes of a semi-octree are as follows Figure 3 As shown, the root node of an octree has 4 child nodes, and all non-leaf nodes except the root node have 8 child nodes. Half of the nodes in a semi-octree do not exist.
[0052] All nodes in the octree constructed in this step are empty nodes, meaning that none of the nodes have corresponding point cloud data.
[0053] It should be noted that point cloud data rendering limits the number of points that an octree node can hold. The depth of the octree is calculated based on the total number of points in the point cloud data and the maximum number of points that an octree node can hold, i.e., the estimated depth. If the total number of points in the point cloud data that an octree at this depth can hold exceeds twice the actual total number of points in the point cloud data, then only half of the nodes in the octree are actually needed. In this case, the constructed octree is a half octree; otherwise, a full octree is constructed.
[0054] The advantage of this approach is that, since point cloud data is not uniformly distributed in space, the actual depth of the octree is adaptively increased based on the total number of points in the point cloud data to reduce the bounding box of the leaf nodes. This reduces the number of points within the bounding box of the leaf nodes, thereby reducing the number of "large leaf" nodes that need to be constructed in subsequent steps (step 300). Furthermore, the number of points in the "large leaf" nodes is more likely to not exceed the parallel tree construction threshold, allowing for parallel construction of the octree on the "large leaf" nodes, thus reducing the time consumption.
[0055] In this application, a "large leaf" node refers to a node that contains more point cloud data than the maximum number of points a node can hold.
[0056] Optionally, in one embodiment of this application, the above steps further include the following sub-steps: obtaining the actual total number of points in the point cloud data in the point cloud file, calculating the initial depth based on the actual total number of points and the second threshold; obtaining the expansion depth based on the actual total number of points in the point cloud data in the point cloud file; and obtaining the estimated depth based on the initial depth and the expansion depth.
[0057] Optionally, the estimated depth can be given directly, or the initial depth can be used directly.
[0058] Step 200: Traverse the point cloud data and, based on the available cache status of the leaf nodes of the octree framework, insert the point cloud data into the corresponding leaf node of the octree framework.
[0059] In this step, the point cloud data in the point cloud file is traversed, and based on the available cache status of the nodes of the constructed octree, the point cloud data is inserted into the corresponding leaf nodes of the constructed octree.
[0060] All leaf nodes of the octree framework share a cache. If the next point cloud data to be inserted is within the bounding box of the previously hit leaf node, the next point cloud data is stored in the previously hit leaf node. Otherwise, the leaf node corresponding to the point cloud data is found. If the cache currently being used by the leaf node corresponding to the point cloud data is an available cache, the point cloud data is inserted into the cache of the corresponding leaf node. If the cache currently being used by the leaf node corresponding to the point cloud data is insufficient to accommodate the point cloud data, an available cache is searched in the cache pool and a correspondence is established with the leaf node corresponding to the point cloud data, and the point cloud data is inserted. If there is no available cache in the cache pool, the cache of the leaf node that has not had point cloud data inserted for the longest time is evicted, and the point cloud data is inserted into the released cache.
[0061] In other words, if the next point cloud data to be inserted is within the bounding box of the previously hit leaf node, the leaf node corresponding to the point cloud data is directly obtained. Otherwise, if the node corresponding to the point cloud data has an available cache, the point cloud data is inserted into the cache of the corresponding node. If the node corresponding to the point cloud data does not have an available cache, and other nodes in the octree have unused caches, the point cloud data is inserted into the cache of the unused node. If other nodes in the octree do not have unused caches, the leaf node corresponding to the cache that has not had point cloud data inserted for the longest time is evicted, making all caches of the leaf node available, and the point cloud data is inserted into the available cache.
[0062] More specifically, this step involves traversing the points in the point cloud file and inserting them into the leaf nodes of the octree. The process of quickly inserting each traversed point into the leaf node of the octree is as follows: Figure 4 As shown.
[0063] Point cloud data acquired by LiDAR scanning exhibits continuous spatial distribution over time. When a point is inserted into a leaf node of an octree, the matched leaf node is recorded. When inserting the next point, it is first determined whether the point is within the bounding box of the previously matched leaf node. If so, the leaf node to which the point belongs is directly obtained; otherwise, the leaf node to which the point belongs is searched, and the previously matched leaf node is updated. Figure 4 As shown.
[0064] In this application, all leaf nodes of the octree framework share a cache. The challenge of inserting a leaf node into an octree is quickly retrieving the available cache for that leaf node.
[0065] To quickly retrieve available caches for leaf nodes, three lists are maintained: a list of node caches, a list of unused caches, and a cache insertion order list. The cache with the most recent insertion is located at the end of the insertion order list, and the cache that has not been inserted for the longest time is located at the beginning of the list. For multiple caches of the same node, only the most recently inserted cache is stored in this list. The cache eviction policy is to evict the cache that has not been inserted for the longest time, which is the first cache in this list.
[0066] When obtaining the available cache for a leaf node, first check if there is an available cache for that node in the node's cache list. If so, skip directly to the step of inserting the node into the cache. Otherwise, check if there is an unused cache in the unused cache list. If so, skip directly to the step of inserting the node into the cache. Otherwise, some caches need to be evicted to release available caches. The evicted cache is the first cache in the cache insertion order list, i.e., the cache that has not been inserted for the longest time. Write all cache points of the leaf node corresponding to this cache in the cache pool together to the file to increase the continuity of the node's point cloud data in the file. Add the caches that have been written to the file to the unused cache list.
[0067] After obtaining the available cache for the leaf node, insert the node into the cache, update the number of nodes in the leaf node, update the cache insertion order list of the cache pool, and determine whether the cache is full after the insertion. If so, update the cache status to unavailable; otherwise, keep the cache status unchanged.
[0068] Step 300: Construct sub-octrees in parallel for the major leaf nodes in the octree framework.
[0069] In this step, a thread pool is used to construct the sub-octrees of the "large leaf" nodes in parallel. If the number of points in the point cloud data of all large leaf nodes in the octree framework does not exceed a first threshold, then the child node of the root node is used as the root node of the sub-octree, and the sub-octree is constructed in parallel for the corresponding large leaf nodes in the order from the root node to the leaf node. Otherwise, the sub-octree is constructed for all large leaf nodes in the octree framework in the order from the leaf node to the root node, until the number of points in the point cloud data of all large leaf nodes in the octree framework does not exceed the first threshold. See also Figure 5 In other words, if the number of points in the point cloud data of all the major leaf nodes of the octree does not exceed the first threshold, then the child node of the root node is used as the root node of the subtree and the octree is constructed in parallel for the major leaf nodes inside the subtree. Otherwise, the octree is constructed for all the major leaf nodes of the octree. That is, steps 100 and 200 are repeated until the number of points in the point cloud data of all the major leaf nodes of the octree does not exceed the first threshold.
[0070] The "large leaf" node needs to be split to build an octree. When building the octree, the point cloud data of the "large leaf" node needs to be loaded into memory. After the octree is built, the point cloud data of the leaf nodes of the octree is written back to the original leaf node's file block.
[0071] like Figure 5 As shown, one scheme for constructing an octree from "large leaf" nodes (Scheme 1) is... Figure 1 Steps 100 and 200 are the same, using an adaptive method to construct an octree framework and insert points to leaf nodes. Since the newly constructed octree framework is estimated, there may still be "large leaf" nodes in the newly constructed octree that need to be further constructed into an octree. Therefore, this process may need to be repeated multiple times.
[0072] To reduce the time spent on multiple read and write operations, another approach to constructing an octree for "large leaf" nodes is to read the node's point cloud data into memory all at once to construct the octree. The octree is completed when the number of points that all nodes can hold does not exceed the maximum number of points that a node can hold. After the construction is complete, the leaf node data of the new octree is written back to the original leaf node's file block all at once. The newly constructed octree will no longer have "large leaf" nodes, and the process does not need to be repeated multiple times.
[0073] like Figure 5 As shown, to further reduce the time spent splitting "big leaf" nodes, a multi-threaded pool is enabled, and the child nodes of the root node are treated as the root nodes of the subtrees to construct octrees in parallel for the "big leaf" nodes inside the tree.
[0074] like Figure 5As shown, the criterion for choosing between Scheme 1 and Scheme 2 when splitting "large leaf" nodes is whether the number of all "large leaf" nodes does not exceed a threshold. If not, Scheme 1 is used; if so, Scheme 2 is used. Figure 5 The text describes how to "start a thread pool, treat the child nodes of the root node as the root nodes of the subtree, and construct an octree in parallel for the large leaf nodes inside the tree".
[0075] For example, in cases where a massive point cloud has particularly dense local areas, and the number of points in a "large leaf" node is so large that it cannot be loaded into memory all at once, solution one would be used to split the large leaf.
[0076] Step 400: In parallel, aggregate and thin the non-leaf nodes of the octree framework and its sub-octrees to generate an octree.
[0077] In this step, the non-leaf nodes of the octree are aggregated and thinned in parallel. A new octree is then constructed from the large leaf nodes and the aggregated and thinned non-leaf nodes. If the number of points in the point cloud data of a non-leaf node in the octree framework exceeds a second threshold, the non-leaf node is thinned, retaining its non-empty child nodes and deleting its empty child nodes; otherwise, all child nodes of the non-leaf node are deleted. In other words, if the number of points in the point cloud data of a non-leaf node in the octree exceeds the second threshold, the non-leaf node is thinned, retaining its non-empty child nodes and deleting its empty child nodes; otherwise, the file block information of the non-leaf node is updated to the union of the file block information of its non-empty child nodes, and all child nodes of the non-leaf node are deleted, thus transforming the non-leaf node into a leaf node.
[0078] The process of aggregation and thinning of non-leaf nodes in an octree is as follows: Figure 6 As shown, it is determined whether the number of points in a non-leaf node exceeds the threshold, i.e., the maximum number of points a node can hold. If so, the node is thinned out, and its non-empty child nodes are retained, while empty child nodes are deleted. Otherwise, the file block information of the node is updated to the union of the file block information of its non-empty child nodes, all child nodes of the node are deleted, and the node becomes a leaf node. If all child nodes of a non-leaf node are empty nodes, the node becomes an empty leaf node after aggregation.
[0079] To further reduce processing time, in this step, the child nodes of the root node are treated as the root nodes of the sub-octree. Each non-leaf node is processed through a parallel post-order traversal of the sub-octree. Finally, the root node of the octree is aggregated and thinned as follows: Figure 6 As shown.
[0080] When this step is completed, the octree is constructed, and the octree contains only non-empty nodes, such as... Figure 7 As shown.
[0081] Step 500: Generate a custom format file for point cloud data.
[0082] In this step, the information of the nodes of the new octree and the point cloud data corresponding to the nodes are organized in a custom file to generate a custom format file of point cloud data.
[0083] The octree has been constructed. Organizing the octree node information and the corresponding point cloud data in a custom file will allow for quick acquisition of the required point cloud data during rendering.
[0084] like Figure 8 As shown, the custom file is divided into three parts: file header, octree node information, and point cloud data. The point cloud data is stored in a way that organizes the octree nodes together.
[0085] The above embodiments have the following technical effects:
[0086] First, there is no need to pre-set the maximum depth or minimum resolution of the octree before constructing it. The depth of the octree is dynamically adjusted according to the spatial distribution characteristics of the point cloud. After the octree is constructed, the number of points in all octree nodes does not exceed the rendering limit, and it can be rendered normally.
[0087] Second, by loading massive point clouds into memory in batches and inserting them into an octree, and using intermediate files to save the point cloud data of the octree nodes, and dynamically adjusting the leaf nodes so that the maximum number of points exceeds the maximum number of pixels to be rendered, it is possible to construct an octree for massive maritime data.
[0088] Third, by adopting an adaptive octree construction framework, a cache pool, multi-threaded parallel splitting of large leaf nodes, and multi-threaded parallel merging / sparsening of small leaves, the octree construction of massive point cloud data is realized, which greatly reduces the time spent on octree construction.
[0089] The second embodiment of this application relates to an adaptive processing system for massive point cloud data, the structure of which is as follows: Figure 9 As shown, the adaptive processing system for this massive point cloud data includes:
[0090] The octree construction and point cloud data insertion unit is used to construct an octree framework corresponding to the point cloud data based on the actual total number of points and the estimated depth of the point cloud data in the point cloud file, traverse the point cloud data, and insert the point cloud data into the corresponding leaf node of the octree framework based on the available cache state of the leaf node of the octree framework.
[0091] Large leaf nodes are used to construct octree units, which are used to construct sub-octrees in parallel from the large leaf nodes in the octree framework. The large leaf node is a leaf node that contains more points of point cloud data than the maximum number of points that a node can accommodate.
[0092] The aggregation and thinning unit and the point cloud data custom format file generation unit are used to aggregate and thin the non-leaf nodes of the octree framework and its sub-octrees in parallel to generate octrees.
[0093] The first embodiment is a method embodiment corresponding to this embodiment. The technical details in the first embodiment can be applied to this embodiment, and the technical details in this embodiment can also be applied to the first embodiment.
[0094] It should be noted that those skilled in the art should understand that the implementation functions of each module shown in the above-described implementation of the adaptive processing system for massive point cloud data can be understood with reference to the relevant description of the adaptive processing method for massive point cloud data. The functions of each module shown in the above-described implementation of the adaptive processing system for massive point cloud data can be implemented by a program (executable instructions) running on a processor, or by specific logic circuits. If the above-described adaptive processing system for massive point cloud data is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0095] Accordingly, this application also provides a computer storage medium storing computer-executable instructions, which, when executed by a processor, implement the various method implementations of this application.
[0096] Furthermore, this application also provides an adaptive processing device for massive point cloud data, including a memory for storing computer-executable instructions and a processor; the processor is used to implement the steps in the above-described method embodiments when executing the computer-executable instructions in the memory. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The aforementioned memory may be read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or solid-state drive, etc. The steps of the methods disclosed in the embodiments of this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
[0097] It should be noted that in this patent application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. In this patent application, if it refers to performing an action according to an element, it means performing the action at least according to that element, including two cases: performing the action only according to that element, and performing the action according to that element and other elements. Expressions such as "multiple," "repeatedly," and "various" include two, two times, two kinds, and more than two, more than two times, and more than two kinds.
[0098] All documents mentioned in this application are considered to be incorporated in their entirety into the disclosure of this application so that they can serve as a basis for modifications if necessary. Furthermore, it should be understood that after reading the foregoing disclosure of this application, those skilled in the art can make various alterations or modifications to this application, and these equivalent forms also fall within the scope of protection claimed in this application.
Claims
1. An adaptive processing method for massive point cloud data, characterized in that, include: Step A: Based on the actual total number of points and the estimated depth of the point cloud data in the point cloud file, construct the octree framework corresponding to the point cloud data, traverse the point cloud data, and insert the point cloud data into the corresponding leaf node of the octree framework based on the available cache status of the leaf node of the octree framework. Step B: Construct sub-octrees in parallel for the large leaf nodes in the octree framework, wherein the large leaf node refers to a leaf node that contains more points of point cloud data than the maximum number of points that a node is allowed to contain. Step C: In parallel, aggregate and thin the non-leaf nodes of the octree framework and its sub-octrees to generate an octree.
2. The method as described in claim 1, characterized in that, In the step of constructing an octree framework corresponding to the point cloud data based on the actual total number of points and the estimated depth of the point cloud data in the point cloud file, if the total number of points of the point cloud data that the octree framework with the estimated depth can accommodate exceeds twice the actual total number of points of the point cloud data, then a half octree framework is constructed; otherwise, a full octree framework is constructed.
3. The method as described in claim 2, characterized in that, All non-leaf nodes of the full octree framework have 8 child nodes, the root node of the semi-octree framework has 4 child nodes, and all non-leaf nodes of the semi-octree framework except the root node have 8 child nodes.
4. The method as described in claim 2, characterized in that, In the step of inserting point cloud data into the corresponding leaf node of the octree framework, all leaf nodes of the octree framework share a cache. If the next point cloud data to be inserted is within the bounding box of the previously hit leaf node, then the next point cloud data is stored in the previously hit leaf node. Otherwise, the leaf node corresponding to the point cloud data is found. If the cache currently being used by the leaf node corresponding to the point cloud data is an available cache, then the point cloud data is inserted into the cache of the corresponding leaf node. If the cache currently being used by the leaf node corresponding to the point cloud data is insufficient to accommodate the point cloud data, then an available cache is searched in the cache pool to establish a correspondence with the leaf node corresponding to the point cloud data and the point cloud data is inserted. If there is no available cache in the cache pool, then the cache of the leaf node that has not had point cloud data inserted for the longest time is evicted, and the point cloud data is inserted into the released cache.
5. The method as described in claim 1, characterized in that, In the step of constructing sub-octrees for the major leaf nodes in the octree framework in parallel, if the number of points in the point cloud data of all major leaf nodes in the octree framework does not exceed the first threshold, then the child node of the root node is used as the root node of the sub-octree, and the sub-octree is constructed in parallel for the corresponding major leaf nodes in the order from the root node to the leaf node. Otherwise, the sub-octree is constructed for all major leaf nodes in the octree framework in the order from the leaf node to the root node, until the number of points in the point cloud data of all major leaf nodes in the octree framework does not exceed the first threshold.
6. The method as described in claim 1, characterized in that, In the parallel aggregation and thinning steps of the non-leaf nodes of the octree, if the number of points in the point cloud data of the non-leaf node of the octree framework exceeds the second threshold, the non-leaf node is thinned and the non-empty child nodes of the node are retained, while the empty child nodes of the node are deleted; otherwise, all child nodes of the non-leaf node are deleted.
7. The method as described in claim 1, characterized in that, The step of constructing the octree framework corresponding to the point cloud data based on the actual total number of points and the estimated depth in the point cloud file further includes: Obtain the actual total number of points in the point cloud data in the point cloud file, and calculate the initial depth based on the actual total number of points and the second threshold. The expansion depth is obtained based on the actual total number of points in the point cloud data in the point cloud file; The estimated depth is obtained based on the initial depth and the expansion depth.
8. An adaptive processing system for massive point cloud data, characterized in that, include: The octree construction and point cloud data insertion unit is used to construct an octree framework corresponding to the point cloud data based on the actual total number of points and the estimated depth of the point cloud data in the point cloud file, traverse the point cloud data, and insert the point cloud data into the corresponding leaf node of the octree framework based on the available cache state of the leaf node of the octree framework. Large leaf nodes are used to construct octree units, which are used to construct sub-octrees in parallel from the large leaf nodes in the octree framework. The large leaf node is a leaf node that contains more points of point cloud data than the maximum number of points that a node can accommodate. The aggregation and thinning unit and the point cloud data custom format file generation unit are used to aggregate and thin the non-leaf nodes of the octree framework and its sub-octrees in parallel to generate octrees.
9. An adaptive processing device for massive point cloud data, characterized in that, include: Memory is used to store executable instructions for a computer; as well as, A processor configured to implement the steps of the method as described in any one of claims 1 to 7 when executing the computer-executable instructions.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method for processing mass point cloud data
CN110211219A
GPU-based parallel octree generation method and device, and electronic equipment
CN112102467A