Mass point cloud detail hierarchical construction method and system
Through external core storage technology and tree space retrieval, combined with LOD hierarchy technology, a multi-scale pyramid data structure is built, which solves the real-time and efficient rendering and management of massive point cloud data, and realizes the efficient rendering and roaming functions of massive point clouds. Reduces hardware dependence and provides a progressive detail-level access mechanism with scale.
Patent Information
- Application Number
- CN202411169995.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-13
AI Technical Summary
In the application process, massive point cloud data has problems such as real-time, efficient, and low-cost use and management, which leads to inefficiency in the data processing link and affects the development of applications based on massive point clouds.
Using external core storage technology, tree space retrieval and LOD hierarchy technology, the multi-scale pyramid data storage structure is constructed through the acquisition of original massive point cloud data, and the bottom-up downsampling method is used. Perform sampling and filling, and establish a dynamic display rendering list to achieve efficient rendering of massive point clouds.
It realizes efficient rendering and roaming functions of massive point clouds, reduces dependence on hardware devices, and can only be completed with ordinary computer performance, solves the problem of real-time management of massive data and unsmooth transitions, and provides a gradual progression with scale. hierarchical access mechanism for the hierarchy of the form changes.
Smart Images

Figure CN119131251A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of point cloud rendering, and in particular to a method and system for constructing massive point cloud details in layers. Background Art
[0002] Point cloud data, as the main form of survey results, is widely used as the core of data base in the fields of basic infrastructure, topographic survey, and land survey. With the popularization of laser scanning technology and the maturity of aerial photography technology in recent years, the use of point cloud data as the basis for secondary operations has become a consensus in related industries. The use of point cloud can not only retain the highly accurate spatial discrete geometric information of laser scanning, but also avoid the geometric distortion and loss of production entities such as later networking and optimization. At the same time, the point cloud form is also a reliable intermediate result based on aerial optical photography, which realizes the generalization and unification of laser scanning point cloud and aerial photography point cloud generation, and provides data expression and common quality for multi-source data fusion processing. However, in the application process of point cloud data, it is often accompanied by the troubles of massive data volume and efficient processing, which seriously affects multiple data processing links such as data access and rendering, and directly leads to the slow or stagnant development of applications based on massive point clouds.
[0003] This method utilizes advanced out-of-core storage technology, tree-shaped spatial retrieval, and rendering LOD (Level Of Details) hierarchical technology to comprehensively balance the limitations of massive point cloud data on hardware devices. It no longer relies on GPU devices and only requires ordinary computer performance to achieve efficient massive point cloud rendering and roaming functions, thus building a complete massive point cloud rendering technology system. Summary of the invention
[0004] The present application provides a method and system for constructing massive point cloud details in layers, so as to solve the problem that massive point cloud data is difficult to use and manage in real time, efficiently and at low cost during the storage, display and rendering processes.
[0005] According to the first aspect, an embodiment provides a method for constructing detailed layers of massive point clouds, the method comprising:
[0006] Obtain original massive point cloud data and perform data analysis and verification;
[0007] Perform preliminary octree segmentation on massive point clouds in the outer core space, and perform secondary octree segmentation in the core space. Merge leaf nodes with point cloud numbers below a preset threshold into parent nodes to redistribute point cloud block data, and build a spatial octree index structure for massive point clouds.
[0008] Based on the spatial octree structure hierarchy, a multi-scale pyramid data storage structure is constructed, and the multi-scale pyramid is sampled and filled using a bottom-up downsampling method.
[0009] Store the point cloud block data contained in each octree node in the multi-scale pyramid into a data file, and create a data index file;
[0010] The spatial octree index structure is reconstructed based on the data index file, the visible spatial range of the point cloud block data contained in each octree node is set for display detail level control, the visible point cloud block data is obtained through the viewing cone and the invisible point cloud block data is eliminated, a dynamic display rendering list is generated, and the visible point cloud block data is loaded according to the rendering list to complete massive point cloud rendering.
[0011] Furthermore, the original massive point cloud data is obtained and the data is analyzed and verified, including:
[0012] Get the header information of massive point cloud data, and get the data format control parameter type by reading the version number of the las data file. The data format control parameter type maps different versions in the las data file. Parse the specific data type and content of massive point cloud data storage from the data format control parameter type, including color information, point cloud number information, timestamp, data header size, single point data size elem_size, data area translation data_offset, and range;
[0013] Check the number of points in massive point cloud data: In order to prevent the amount of data in massive point cloud from exceeding the maximum number allowed by the general las data format, it is necessary to check whether the data stored in the point cloud data header information is valid. By calculating (point cloud data file size - data_offset) / elem_size, the parameter total_count used to store the number of points in massive point cloud is assigned and updated.
[0014] Check the bounding rectangle of massive point cloud data: update the bounding rectangle box information of massive point cloud point by point.
[0015] Furthermore, a preliminary octree segmentation is performed in the outer core space, specifically including:
[0016] Calculation of the initial spatial segmentation step size:
[0017] Assume that the storage size of the massive point cloud is pc_size=total_count*elem_size, the number of massive point cloud points is total_count, the computer memory size is mem_size, the maximum real memory size available to the computer in the running state must be less than mem_size-∈, ∈ is the reserved memory size, and the initial spatial segmentation step length split_step is calculated using the following formula, while ensuring that the initial spatial segmentation step length is an exponential multiple of 2:
[0018]
[0019] Furthermore, a preliminary octree segmentation is performed in the outer core space, specifically including:
[0020] Use the outer core storage technology to perform spatial segmentation on massive point clouds. Each direction of the three-dimensional space is equally divided into split_step subspaces. The points in the point cloud will be divided into split_step×split_step×split_step outer core independent storage blocks. Each outer core independent storage block corresponds to an independent block storage file in the disk. At the same time, the statistical information block_info of each storage block is retained in the kernel. The statistical information block_info of the storage block includes the number of points falling in this three-dimensional space, the real spatial circumscribed rectangle, and the spatial octree index octree_index; the spatial octree index octree_index records the path from the root node to each child node.
[0021] If the memory size corresponding to the number of point clouds recorded in the outer core independent storage block is greater than (mem_size-∈), the outer core space preliminary segmentation step is iterated in a loop until the memory limit condition is met;
[0022] According to the spatial octree index octree_index information of each storage block, the spatial octree index structure octree of massive point clouds is constructed. Each node information in octree includes the spatial octree index octree_index, the parent-child node link relationship and the external index of the point cloud block data.
[0023] Furthermore, a secondary octree segmentation is performed in the kernel space, specifically including:
[0024] Each block storage file is read into the kernel space in turn and a secondary spatial octree segmentation is performed in the kernel until the number of point clouds contained in each leaf node in the currently processed point cloud file is less than the preset threshold; at the same time, the spatial octree index octree_index information of each leaf node is tracked and established, and the spatial octree index structure octree of massive point clouds is updated.
[0025] Furthermore, based on the spatial octree structure hierarchy, a multi-scale pyramid data storage structure is constructed, specifically including:
[0026] The leaf nodes in the spatial octree are the bottom layer of the multi-scale pyramid. The leaf nodes contain point cloud block data. The intermediate nodes of each layer in the spatial octree are the intermediate layers of the multi-scale pyramid. The intermediate nodes have no data and only serve as links.
[0027] Furthermore, a bottom-up downsampling method is used to perform sampling and filling on the multi-scale pyramid, including:
[0028] a. First, calculate the curvature of each point in the block data and the average distance r in the block data. The average distance r is the average of the closest distances between the points in the block data.
[0029] b. Select the point with the largest curvature from the block data and add it to the active list LL and the seed point set S;
[0030] c. Determine whether the active list LL is empty. If it is empty, export all points in the seed set S, that is, assign the current block data to the point cloud data in its parent block; otherwise, pop out any point in the active list LL as the current point LLp;
[0031] d. Find the point set L within the (r, 2r) annular range of the current point LLp;
[0032] e. Determine whether the point set L is empty. If it is empty, remove the current point LLp from the active list LL; otherwise, select the point with the maximum curvature in the set L as the pending point Lp;
[0033] f. Determine whether Lp intersects with the seed point set S within the range (0,2r). If so, delete the pending point Lp from the set L. Otherwise, add Lp to the active list LL and the seed point set S, and execute step c.
[0034] g. The points in the seed set S corresponding to all sub-block data constitute the low-resolution parent block point cloud data, thereby completing the filling of the pyramid to the next scale.
[0035] Furthermore, the point cloud block data contained in each octree node is stored in a data file, and a data index file is created, specifically including:
[0036] The data index file file_index stores the tile_index structure data corresponding to the number of point cloud block data tiles. In each tile_index, its starting position and ending position in the data file file_bin are recorded, and the position of its parent / child block data tile in the index file file_index is also recorded;
[0037] Filling the index file file_index is divided into three steps: the first step is to write each tile_index; the second step is to place the tile_index of the root node block data at the beginning of the index file file_index; the third step is to establish the parent-child relationship link between each tile_index and update it to the index file file_index.
[0038] Furthermore, the visible space range of the point cloud block data contained in each octree node is set for display detail level control, including:
[0039] Specify a reasonable visible range for each point cloud block data tile. The standard for determining the visible range is the distance from the center point of the block data tile to the view frustum viewpoint, or the projection length of the radius tile_r of the outer bounding sphere of the block data tile in the view frustum viewport; the visible space range between all parent block data and child block data is continuous, and the visible range of [0,∞] is completely divided;
[0040] The block data visible range vrange is calculated as follows, where d is the layer depth value of the node in the spatial octree index structure:
[0041]
[0042] in is the visible range base, The maximum visible range base.
[0043] According to the second aspect, an embodiment provides a system for constructing detailed layers of massive point clouds, the system comprising:
[0044] Point cloud data acquisition and processing module, used to obtain raw massive point cloud data and perform data analysis and verification;
[0045] The spatial octree segmentation module is used to perform preliminary octree segmentation on massive point clouds in the outer core space and secondary octree segmentation in the core space, merge leaf nodes with point cloud numbers below a preset threshold into parent nodes to redistribute point cloud block data, and build a spatial octree index structure for massive point clouds;
[0046] The multi-scale pyramid construction module is used to construct a multi-scale pyramid data storage structure based on the spatial octree structure hierarchy, and to perform sampling and filling of the multi-scale pyramid using a bottom-up downsampling method;
[0047] The multi-scale pyramid point cloud storage module is used to store the point cloud block data contained in each octree node in the multi-scale pyramid into a data file and establish a data index file;
[0048] The point cloud rendering module is used to reconstruct the spatial octree index structure based on the data index file, set the visible spatial range of the point cloud block data contained in each octree node for display detail level control, obtain the visible point cloud block data through the viewing cone and eliminate the invisible point cloud block data, generate a dynamic display rendering list, and load the visible point cloud block data according to the rendering list to complete the massive point cloud rendering.
[0049] The present application provides a method and system for constructing massive point cloud details in layers, which has the following beneficial effects:
[0050] (1) Based on the spatial octree, the present invention uses a downsampling method that takes object space characteristics into consideration to generate a multi-scale and multi-level pyramid data storage structure, and establishes an LOD (Level Of Details) mechanism, which provides a level of detail access mechanism that changes progressively with scale for the subsequent rendering of massive point clouds, thereby solving the problem of uneven detail transition during the rendering process of massive point clouds;
[0051] (2) The present invention solves the contradiction between efficient access to massive point clouds and huge costs from the essential mechanism point of view, and innovatively designs the massive data structure and mechanism from multiple aspects such as data storage and rendering display, providing efficient data response efficiency for real-time point cloud rendering. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A flowchart of a method for constructing detailed layers of massive point clouds provided by an embodiment of the present invention;
[0053] Figure 2 A schematic flow chart of a method for constructing detailed layers of massive point clouds provided by an embodiment of the present invention;
[0054] Figure 3 A massive point cloud data space segmentation diagram in a massive point cloud detail layering construction method provided by an embodiment of the present invention;
[0055] Figure 4 A schematic diagram of constructing a multi-scale hierarchical pyramid of a massive point cloud in a method for constructing a detailed hierarchical structure of a massive point cloud provided by an embodiment of the present invention;
[0056] Figure 5 A flowchart of node block point cloud downsampling in a method for constructing massive point cloud details in layers provided by an embodiment of the present invention;
[0057] Figure 6 A ring-shaped window diagram used for downsampling in a method for constructing detailed layers of a massive point cloud provided by an embodiment of the present invention;
[0058] Figure 7 A diagram of a massive point cloud data real-time rendering and loading control process in a massive point cloud detail layering construction method provided by an embodiment of the present invention;
[0059] Figure 8 An application effect diagram of a method for constructing massive point cloud details in layers provided by an embodiment of the present invention;
[0060] Fig. 9A schematic diagram of the logical structure of a system for constructing detailed layers of massive point clouds provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0061] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0062] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0063] The first embodiment of the present invention provides a method for constructing a massive point cloud detail layer, including functions such as massive data storage, data and roaming, real-time data rendering, and data layer display. Specifically, the present invention provides an efficient massive data outer-core space segmentation technology, which uses outer-core technology without the support of large memory hardware space; secondly, it provides a method for constructing a spatial detail level (LOD) that takes features into account, providing a data space structure foundation and detail level for real-time rendering; secondly, it provides real-time rendering technology, which reduces the pressure on hardware during the rendering and display process through efficient spatial judgment and detail control methods, and finally forms a complete technical system suitable for the processing of massive point cloud data. The following is combined with Figure 1 and Figure 2 Provide detailed explanation.
[0064] like Figure 1 As shown, in step S100, original massive point cloud data is acquired and data analysis and verification are performed.
[0065] Massive point cloud data preparation, data analysis, and data verification: Prepare the massive point cloud to be processed and check the quality and format of the massive point cloud. The original massive point cloud data is usually stored in the general las data format (a storage format for laser point clouds). The point cloud data format needs to be further analyzed and verified. Specifically, it includes the following:
[0066] (1) Obtain the header information of massive point cloud data. By reading the version number of the las data file, locate the data format control parameter type. The data format control parameter type maps different versions of the las data file. From the data format control parameter, the specific data type and content of the massive point cloud data storage can be parsed, such as color information, point cloud number information, timestamp, data header size, single point data size elem_size, data area translation data_offset, range, etc.
[0067] (2) Check the number of points in the massive point cloud data. In order to prevent the amount of data in the massive point cloud from exceeding the maximum number allowed by the general las data format, it is necessary to check whether the data stored in the point cloud data header is valid. The parameter total_count (long integer type) used to store the number of points in the massive point cloud is assigned and updated by (point cloud data file size - data_offset) / elem_size.
[0068] (3) Checking the bounding box of massive point cloud data. In order to achieve high data throughput, the update of the bounding box range information of the point cloud is often ignored when massive point cloud data is collected efficiently. Therefore, in order to ensure the accuracy of the data, it is necessary to update the bounding box information of the massive point cloud point cloud point by point.
[0069] like Figure 1 As shown, in step S200, a preliminary octree segmentation is performed on the massive point cloud in the outer core space, and a secondary octree segmentation is performed in the inner core space, and the leaf nodes with point cloud numbers below a preset threshold are merged into the parent node to complete the redistribution of the point cloud block data, and a spatial octree index structure of the massive point cloud is constructed.
[0070] Spatial octree segmentation: including spatial preliminary segmentation step calculation, outer core space preliminary segmentation, inner core space secondary segmentation, block data redistribution, to achieve balanced distribution of massive point cloud spatial octree at the cost of small computing memory consumption, and limit the number of point clouds in all leaf nodes in the spatial octree to no more than a certain threshold (such as 10,000). The specific contents are as follows:
[0071] (1) Calculation of the initial spatial segmentation step size. Since massive point cloud data cannot be directly accessed and cannot be read into the memory at one time, the size of the initial spatial segmentation step size split_step needs to be determined based on the existing computing resources.
[0072] Assume that the storage size of the massive point cloud is pc_size = total_count * elem_size, and the computer memory size is mem_size (such as 16GB), that is, the maximum real memory size available to the computer in the running state must be less than mem_size-∈, ∈ is the reserved memory size, so the initial spatial segmentation step length split_step can be calculated using the following formula, while ensuring that the initial spatial segmentation step length is an exponential multiple of 2:
[0073]
[0074] (2) The outer core space is initially divided and the initial spatial octree index structure octree is constructed.
[0075] Use the out-of-core storage technology to continue the spatial segmentation of the massive point cloud. Each direction of the three-dimensional space is equally divided into split_step subspaces, and then the midpoints of the point cloud are divided into split_step×split_step×split_step out-of-core independent storage block files. At the same time, the statistical information block_info of each block is retained in the kernel. The statistical information block_info of the block includes the number of points falling in this three-dimensional space, its real spatial circumscribed rectangle, and the spatial octree index octree_index. Each out-of-core independent storage block corresponds to an independent file (i.e., block file) on the disk. The spatial octree index octree_index records the path from the root node to each child node. For example, the index of the sixth leaf node of the root node is "r6", and "r" means the root node.
[0076] If the memory size corresponding to the number of point clouds recorded in the outer core independent storage block is greater than (mem_size-∈), the outer core space preliminary segmentation process is repeated until the memory limit is met. Then, according to the spatial octree index octree_index information of each block, the spatial octree index structure octree of massive point clouds is constructed. Each node information in octree includes the spatial octree index octree_index, the parent-child node link relationship, and the external index of the point cloud block data, such as Figure 3 shown.
[0077] (3) Secondary segmentation of kernel space. After the initial segmentation of the outer kernel space, the massive point cloud is segmented into several outer kernel space point cloud block files. The block files are then processed in sequence during the massive point cloud processing. For efficient data roaming access, each point cloud block file needs to be further read into the kernel (memory), and secondary spatial octree segmentation is performed in the kernel. The data in each point cloud file is evenly segmented in space until the number of point clouds in each leaf node of the currently processed point cloud file is less than a certain threshold (such as 10,000 points). At the same time, the spatial octree index octree_index information of each leaf node is tracked and established, and the upper spatial octree index structure octree of the massive point cloud is updated.
[0078] (4) Block data redistribution. Through the above two spatial segmentation operations, the massive data is divided into sufficiently small point cloud block data (spatial octree leaf nodes). However, due to the uneven distribution and density of the scan space, the number of points in the point cloud block data of some leaf nodes is very small, which is not balanced with the number of points in the adjacent sibling nodes. These fragmented leaf nodes will cause a large number of inefficient data access operations in subsequent rendering and roaming. Therefore, it is necessary to directly merge all the sibling nodes (under the same parent node, up to 8 child nodes) whose point cloud number in the leaf node is less than a certain threshold (such as 1000), merge the point cloud data into the parent node, and delete these child nodes. At the same time, update the spatial octree index structure octree of the massive point cloud.
[0079] like Figure 1 As shown, in step S300, a multi-scale pyramid data storage structure is constructed based on the spatial octree structure hierarchy, and the multi-scale pyramid is sampled and filled using a bottom-up downsampling method.
[0080] Construct a multi-scale pyramid structure: The effect of spatial octree segmentation will be changed during the initial segmentation of the outer core space, the secondary segmentation of the inner core space, and the redistribution of block data. After the massive point cloud space is segmented, all point cloud data will be stored in the outer core block file, and the information of each node of the spatial octree will be stored in the spatial octree index structure octree. At this time, all leaf nodes of the octree are data nodes, and the remaining nodes have no point cloud data and only serve as links, forming a multi-scale pyramid structure. The leaf nodes of the octree are the bottom layer of the pyramid, and the middle nodes are the middle layer of the pyramid, such as Figure 4 As shown, it is necessary to subsequently fill the multi-scale pyramid data through sampling to construct a multi-level detail LOD mechanism.
[0081] Sampling and filling multi-scale pyramid: The data of the middle nodes of the octree are formed by downsampling the block data (point cloud) in its leaf nodes from bottom to top. In order to maintain seamless switching of data details, a downsampling method that takes into account the object point cloud is adopted, which can suppress the disappearance of object details. Figure 5 The specific steps are as follows:
[0082] a. First, calculate the curvature of each point in the block data and the average distance r in the block data. The average distance r is the average of the closest distances between the points in the block data.
[0083] b. Select the point with the largest curvature from the block data and add it to the active list LL and the seed point set S;
[0084] c. Determine whether the active list LL is empty. If it is empty, export all points in the seed set S, that is, assign the current block data to the point cloud data in its parent block; otherwise, pop out any point in the active list LL as the current point LLp;
[0085] d. Find the point set L within the (r,2r) annular range of the current point LLp. The annular range is as follows: Figure 6 As shown;
[0086] e. Determine whether the point set L is empty. If it is empty, remove the current point LLp from the active list LL; otherwise, select the point with the maximum curvature in the set L as the pending point Lp;
[0087] f. Determine whether Lp intersects with the seed point set S within the range (0,2r). If so, delete the pending point Lp from the set L. Otherwise, add Lp to the active list LL and the seed point set S, and execute step c.
[0088] g. The points in the seed set S corresponding to all sub-block data constitute the low-resolution parent block point cloud data, thereby completing the filling of the pyramid to the next scale.
[0089] like Figure 1 As shown, in step S400, the point cloud block data contained in each octree node in the multi-scale pyramid is stored in a data file, and a data index file is created.
[0090] Multi-scale and multi-level pyramid point cloud storage: The multi-scale and multi-level storage of massive point cloud data mainly stores each octree node data in the pyramid into the data file file_bin, and stores the index information of its data in the data index file file_index, where the information in file_bin is filled by several block files in the early stage. When the external needs to access the point cloud data of the specified space, the point cloud data in the data file file_bin is quickly extracted through the data index file file_index. The specific contents are as follows:
[0091] (1) After filling the multi-scale pyramid by downsampling the outer core block file in sequence, each node in the octree will point to a block data tile containing point cloud data. In order to facilitate efficient access to the block data tile, it is also necessary to construct a data index file file_index for the entire spatial octree index structure octree, which is used to index and guide the block data tile to be stored in the file_bin data file. This process can be executed sequentially according to the block file, so it does not consume a lot of memory space.
[0092] (2) The data index file file_index mainly stores tile_index structure data corresponding to the number of block data tiles. In each tile_index, its starting position and ending position in the file_bin data file are recorded, and the position of its parent / child block data tile in the index file file_index is also recorded.
[0093] (3) Filling the index file file_index is divided into three steps. The first step is to write each tile_index, without strictly following the order of the octree nodes; the second step is to place the tile_index of the root node (root block data) at the beginning of the index file file_index; the third step is to establish a parent-child relationship link between each tile_index and update it in the index file file_index.
[0094] like Figure 1 As shown, in step S500, the spatial octree index structure is reconstructed based on the data index file, the visible spatial range of the point cloud block data contained in each octree node is set for display detail level control, the visible point cloud block data is obtained through the viewing frustum and the invisible point cloud block data is eliminated, a dynamic display rendering list is generated, and the visible point cloud block data is loaded according to the rendering list to complete the massive point cloud rendering.
[0095] Massive point cloud rendering: Through the above steps, the massive point cloud data has been converted into two data files, namely the data file file_bin and the index file file_index. The point cloud data is spatially accessed and managed by rendering the spatial octree index structure octree_. By setting the visible spatial range of the tile data in each spatial octree node, which tile data is in the dynamic display rendering list, the rendering of massive point cloud data can be realized. Figure 7 The specific contents are as follows:
[0096] (1) In the display rendering stage, the complete rendering space octree index structure octree_ is reconstructed through the index file file_index. At this time, each node of octree_ contains the point cloud block data index pointing to the data file file_bin, the octree layer depth and other information.
[0097] (2) The visible space range setting of block data is used to control the display detail level. A reasonable visible range is specified for each block data tile. The standard for determining the visible range can be the distance from the center point of the block data tile to the view frustum viewpoint, or the projection length of the radius tile_r of the outer bounding sphere of the block data tile in the view frustum viewport. The visible space range between all parent block data and child block data is continuous, and the visible range of [0,∞ infinity] is completely divided. For example, if the visible range of the root block data is [0,β0), the visible range of its child block data is [β0,β1=min(2*β0,max_β)), and the rest are similar, where β0 is the visible range base and max_β is the maximum visible range base.
[0098] The specific block data visible range vrange is calculated using the following formula, where d is the layer depth value of the node in octree_:
[0099]
[0100] (3) Update the dynamic display rendering list. During the roaming of massive point clouds, the frustum of the display window is constantly checked for collision with the octree index structure of the rendering space, and the block data within the frustum is quickly retrieved using tree-shaped space retrieval, and the block data that is not within the visible space range is removed. The newly added visible block data is loaded into the dynamic display rendering list, and the invisible block data in the dynamic display rendering list is removed.
[0101] Experimental example:
[0102] The original point cloud data file has 36.53 million laser scanning points. If the traditional memory display method is used, at least 800Mb of memory is required to store the basic data of the laser point cloud. The method of the present invention is used to process the existing laser point cloud data to generate multi-scale hierarchical pyramid data. Only 20Mb of memory data is required during the point cloud data loading process. Figure 8 As shown in the figure, the scale increases from left to right during the rendering process, and the number of displayed point clouds are 420,000, 730,000, and 160,000 respectively. At the same time, the rendering frame rate is maintained above 100FPS (frames per second), and the memory consumption is always low during the point cloud roaming process. In addition, based on the rendering model of this multi-scale and multi-level pyramid point cloud data structure, the memory consumption will not increase sharply with the surge in the amount of point cloud data, and is always controlled within 100M.
[0103] In order to solve the problems of data redundancy and insufficient memory when rendering and displaying massive point clouds, the present invention provides a progressive display method for massive point clouds by constructing a multi-scale pyramid data structure design. This data format is convenient for network cache display, has good cloud processing potential, and is conducive to rendering and other operations based on massive data. In addition, the present invention provides a sampling method based on local feature information of the object space, which solves the problem of serious edge information loss in building a pyramid model, and is conducive to seamless switching of multi-layer and multi-scale point cloud data. The technical benefits of the present invention have huge economic value in internal surveys based on massive laser point clouds. It provides a way to manage massive point clouds in real time, and solves the problem of massive point clouds relying on large-capacity memory hardware, realizing the use of software algorithm-level innovations to replace high equipment investment, and also reducing the cost of the industry's digital upgrade process.
[0104] Corresponding to the above-disclosed method for constructing massive point cloud details in layers, the embodiment of the present invention further discloses a system for constructing massive point cloud details in layers, such as Fig. 9 As shown, it specifically includes:
[0105] Point cloud data acquisition and processing module, used to obtain raw massive point cloud data and perform data analysis and verification;
[0106] The spatial octree segmentation module is used to perform preliminary octree segmentation on massive point clouds in the outer core space and secondary octree segmentation in the core space, merge leaf nodes with point cloud numbers below a preset threshold into parent nodes to redistribute point cloud block data, and build a spatial octree index structure for massive point clouds;
[0107] The multi-scale pyramid construction module is used to construct a multi-scale pyramid data storage structure based on the spatial octree structure hierarchy, and to perform sampling and filling of the multi-scale pyramid using a bottom-up downsampling method;
[0108] The multi-scale pyramid point cloud storage module is used to store the point cloud block data contained in each octree node in the multi-scale pyramid into a data file and establish a data index file;
[0109] The point cloud rendering module is used to reconstruct the spatial octree index structure based on the data index file, set the visible spatial range of the point cloud block data contained in each octree node for display detail level control, obtain the visible point cloud block data through the viewing cone and eliminate the invisible point cloud block data, generate a dynamic display rendering list, and load the visible point cloud block data according to the rendering list to complete the massive point cloud rendering.
[0110] It should be noted that for the detailed description of a massive point cloud detail layering construction system provided in an embodiment of the present invention, reference can be made to the relevant description of a massive point cloud detail layering construction method provided in an embodiment of the present application, which will not be repeated here.
[0111] In addition, an embodiment of the present invention also provides an electronic device, comprising: a processor and a memory; the memory is used to store one or more program instructions; the processor is used to run one or more program instructions to execute the steps of a method for layering detailed construction of massive point clouds as described in any of the above items.
[0112] It should be noted that for the detailed description of an electronic device provided in an embodiment of the present invention, reference can be made to the relevant description of a method for constructing a massive point cloud detail hierarchy provided in an embodiment of the present application, which will not be repeated here.
[0113] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for constructing a layered structure of massive point cloud details as described in any of the above items are implemented.
[0114] It should be noted that, for a detailed description of a computer-readable storage medium provided in an embodiment of the present invention, reference can be made to the relevant description of a method for constructing a massive point cloud detail hierarchy provided in an embodiment of the present application, which will not be repeated here.
[0115] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0116] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.
Claims
1. A method for constructing detailed layers of massive point clouds, characterized in that: The method comprises: Obtain original massive point cloud data and perform data analysis and verification; Perform preliminary octree segmentation on massive point clouds in the outer core space, and perform secondary octree segmentation in the core space. Merge leaf nodes with point cloud numbers below a preset threshold into parent nodes to redistribute point cloud block data, and build a spatial octree index structure for massive point clouds. Based on the spatial octree structure hierarchy, a multi-scale pyramid data storage structure is constructed, and the multi-scale pyramid is sampled and filled using a bottom-up downsampling method. Store the point cloud block data contained in each octree node in the multi-scale pyramid into a data file, and create a data index file; The spatial octree index structure is reconstructed based on the data index file, the visible spatial range of the point cloud block data contained in each octree node is set for display detail level control, the visible point cloud block data is obtained through the viewing cone and the invisible point cloud block data is eliminated, a dynamic display rendering list is generated, and the visible point cloud block data is loaded according to the rendering list to complete massive point cloud rendering.
2. A method for constructing massive point cloud details in layers according to claim 1, characterized in that: Obtaining raw massive point cloud data and performing data analysis and verification, including: Get the header information of massive point cloud data, and get the data format control parameter type by reading the version number of the las data file. The data format control parameter type maps different versions in the las data file. Parse the specific data type and content of massive point cloud data storage from the data format control parameter type, including color information, point cloud number information, timestamp, data header size, single point data size elem_size, data area translation data_offset, and range; Check the number of points in massive point cloud data: In order to prevent the amount of data in massive point cloud from exceeding the maximum number allowed by the general las data format, it is necessary to check whether the data stored in the point cloud data header information is valid. By calculating (point cloud data file size - data_offset) / elem_size, the total_count parameter used to store the number of points in massive point cloud is assigned and updated. Check the bounding rectangle of massive point cloud data: update the bounding rectangle box information of massive point cloud point by point.
3. A method for constructing massive point cloud details in layers according to claim 1, characterized in that: Perform preliminary octree segmentation in the outer core space, including: Calculation of the initial spatial segmentation step size: Assume that the storage size of the massive point cloud is pc_size=total_count*elem_size, the number of massive point cloud points is total_count, the computer memory size is mem_size, the maximum real memory size available to the computer in the running state must be less than mem_size-∈, ∈ is the reserved memory size, and the initial spatial segmentation step length split_step is calculated using the following formula, while ensuring that the initial spatial segmentation step length is an exponential multiple of 2:
4. A method for constructing detailed layers of massive point clouds as claimed in claim 3, characterized in that: Perform preliminary octree segmentation in the outer core space, including: Use the outer core storage technology to perform spatial segmentation on massive point clouds. Each direction of the three-dimensional space is equally divided into split_step subspaces. The points in the point cloud will be divided into split_step×split_step×split_step outer core independent storage blocks. Each outer core independent storage block corresponds to an independent block storage file in the disk. At the same time, the statistical information block_info of each storage block is retained in the kernel. The statistical information block_info of the storage block includes the number of points falling in this three-dimensional space, the real spatial circumscribed rectangle, and the spatial octree index octree_index; the spatial octree index octree_index records the path from the root node to each child node. If the memory size corresponding to the number of point clouds recorded in the outer core independent storage block is greater than (mem_size-∈), the outer core space preliminary segmentation step is iterated in a loop until the memory limit condition is met; According to the spatial octree index octree_index information of each storage block, the spatial octree index structure octree of massive point clouds is constructed. Each node information in octree includes the spatial octree index octree_index, the parent-child node link relationship and the external index of the point cloud block data.
5. A method for constructing detailed layers of massive point clouds as claimed in claim 4, characterized in that: Perform secondary octree segmentation in kernel space, including: Each block storage file is read into the kernel space in turn and a secondary spatial octree segmentation is performed in the kernel until the number of point clouds contained in each leaf node in the currently processed point cloud file is less than the preset threshold; at the same time, the spatial octree index octree_index information of each leaf node is tracked and established, and the spatial octree index structure octree of massive point clouds is updated.
6. A method for constructing detailed layers of massive point clouds as claimed in claim 1, characterized in that: Based on the spatial octree structure hierarchy, a multi-scale pyramid data storage structure is constructed, including: The leaf nodes in the spatial octree are the bottom layer of the multi-scale pyramid. The leaf nodes contain point cloud block data. The intermediate nodes of each layer in the spatial octree are the intermediate layers of the multi-scale pyramid. The intermediate nodes have no data and only serve as links.
7. A method for constructing detailed layers of massive point clouds as claimed in claim 1, characterized in that: The multi-scale pyramid is sampled and filled using a bottom-up downsampling method, including: a. First, calculate the curvature of each point in the block data and the average distance r in the block data. The average distance r is the average of the closest distances between the points in the block data. b. Select the point with the largest curvature from the block data and add it to the active list LL and the seed point set S; c. Determine whether the active list LL is empty. If it is empty, export all points in the seed set S, that is, assign the current block data to the point cloud data in its parent block; otherwise, pop out any point in the active list LL as the current point LLp; d. Find the point set L within the (r, 2r) ring range of the current point LLp; e. Determine whether the point set L is empty. If it is empty, remove the current point LLp from the active list LL; otherwise, select the point with the maximum curvature in the set L as the pending point Lp; f. Determine whether Lp intersects with the seed point set S within the range (0,2r). If so, delete the pending point Lp from the set L. Otherwise, add Lp to the active list LL and the seed point set S, and execute step c. g. The points in the seed set S corresponding to all sub-block data constitute the low-resolution parent block point cloud data, thereby completing the filling of the pyramid to the next scale.
8. The method for constructing detailed layers of massive point clouds according to claim 1, characterized in that: The point cloud block data contained in each octree node is stored in the data file, and a data index file is created, including: The data index file file_index stores the tile_index structure data corresponding to the number of point cloud block data tiles. In each tile_index, its starting position and ending position in the data file file_bin are recorded, and the position of its parent / child block data tile in the index file file_index is also recorded; Filling the index file file_index is divided into three steps: the first step is to write each tile_index; the second step is to place the tile_index of the root node block data at the beginning of the index file file_index; the third step is to establish the parent-child relationship link between each tile_index and update it to the index file file_index.
9. A method for constructing detailed layers of massive point clouds as claimed in claim 1, characterized in that: The visible space range of the point cloud block data contained in each octree node is set for display detail level control, including: Specify a reasonable visible range for each point cloud block data tile. The standard for determining the visible range is the distance from the center point of the block data tile to the view frustum viewpoint, or the projection length of the radius tile_r of the outer bounding sphere of the block data tile in the view frustum viewport; the visible space range between all parent block data and child block data is continuous, and the visible range of [0,∞] is completely divided; The block data visible range vrange is calculated as follows, where d is the layer depth value of the node in the spatial octree index structure: Among them, β0 is the cardinality of the visible range, and max_β is the maximum cardinality of the visible range.
10. A massive point cloud detail layering construction system, characterized in that: The system comprises: Point cloud data acquisition and processing module, used to obtain raw massive point cloud data and perform data analysis and verification; The spatial octree segmentation module is used to perform preliminary octree segmentation on massive point clouds in the outer core space and secondary octree segmentation in the core space, merge leaf nodes with point cloud numbers below a preset threshold into parent nodes to redistribute point cloud block data, and build a spatial octree index structure for massive point clouds; The multi-scale pyramid construction module is used to construct a multi-scale pyramid data storage structure based on the spatial octree structure hierarchy, and to perform sampling and filling of the multi-scale pyramid using a bottom-up downsampling method; The multi-scale pyramid point cloud storage module is used to store the point cloud block data contained in each octree node in the multi-scale pyramid into a data file and establish a data index file; The point cloud rendering module is used to reconstruct the spatial octree index structure based on the data index file, set the visible spatial range of the point cloud block data contained in each octree node for display detail level control, obtain the visible point cloud block data through the viewing cone and eliminate the invisible point cloud block data, generate a dynamic display rendering list, and load the visible point cloud block data according to the rendering list to complete the massive point cloud rendering.
Citation Information
Cited By
Open traffic scene laser point cloud full aperture segmentation method and device, and medium
CN120912890A
An open traffic scene laser point cloud full-aperture segmentation method, device and medium
CN120912890B
