Large-scale multi-beam stripe point cloud organization method and system for improving directional quadtree
By improving the directional quad-tree structure and binary index files, combined with principal component analysis and multi-threading technology, the problem of excessive memory usage and index depth of massive multi-beam sounding point cloud data is solved, and efficient point cloud organization and retrieval is achieved.
Patent Information
- Application Number
- CN202510466066.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-15
AI Technical Summary
When processing massive multi-beam depth-shot point cloud data, the memory usage is too high, resulting in system lag and external memory dependence performance degradation. The traditional index structure does not consider the main direction characteristics of point clouds, resulting in excessive index depth and redundancy, which affects processing efficiency.
The improved direction quad-tree structure and binary index file are used to determine the main axis direction of the point cloud through principal component analysis, establish the direction quad-tree external memory index, and use the main direction of the root node to replace the child node direction, and combine memory mapping and multi-threading technology for point cloud organization and retrieval.
It effectively reduces the index construction time, reduces the number of nodes and tree depth, improves the retrieval efficiency, reduces memory usage, and improves data processing speed.
Smart Images

Figure CN120374853A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data structures, and particularly relates to a method and system for organizing large-scale multi-beam strip point clouds of an improved direction quadtree. Background Art
[0002] Multi-beam sounding is widely used in underwater topographic surveying and sediment classification due to its high efficiency, wide coverage, high accuracy, and automation characteristics. However, its high data volume poses challenges in data storage and processing. It is unrealistic to store all data solely in computer memory, and a suitable data structure must be constructed to improve retrieval efficiency.
[0003] To achieve efficient point cloud processing, the commonly used method currently is to establish a point cloud data index in computer memory to optimize the spatial organization of data, improve processing speed, and reduce disk I / O bottlenecks. However, in the processing of massive point clouds, even if the data is stored in memory, excessive memory occupancy may still cause the system to freeze. Therefore, it is necessary to optimize resource utilization by combining external storage. Adopting a hybrid data organization strategy can give full play to the high-speed advantage of memory while utilizing the capacity of external storage to ensure the efficient processing of large-scale data. For this purpose, a data scheduling system between memory and external storage must be carefully designed to achieve fast and stable point cloud computing and management.
[0004] The key to effectively managing spatial data lies in creating a well-structured data index. Spatial indexes usually use data structures such as KD-trees, R-trees, quadtrees, and octrees to organize spatial point clouds. To facilitate operations such as loading, displaying, and rendering large point cloud datasets, modern methods mainly use the octree structure for data organization and combine core-out and level of detail (LOD) techniques to achieve efficient point cloud operations with the least amount of memory usage. Compared with the terrestrial topography obtained by three-dimensional lidar, the seabed topography usually consists of large flat areas with relatively small altitude changes and few prominent features. Using the octree structure to organize multi-beam sonar point clouds will result in storage redundancy in the Z direction. Therefore, it is more appropriate to use the quadtree structure to index and organize multi-beam detection data. In addition, according to the principle of multi-beam field operations, to ensure full coverage of the seabed topography, the survey vessel must conduct surveys along the designed survey lines to obtain long scan band data. Since the direction of the survey lines is usually consistent with the isobaths, relatively uniform point cloud data can be obtained, especially in MBES where real-time motion compensation technology is widely used. When constructing a traditional quadtree index, the calculation of its bounding box does not consider the main direction of the point cloud. Therefore, especially in the case of multi-beam scan band (a long coverage area formed by the number of pings when the ship sails along the survey line) point clouds, using a traditional quadtree index may lead to an increase in empty nodes and an excessive index depth.
[0005] Although certain progress has been made in the organization and management of multi-beam point cloud data, there are still some problems and drawbacks: First, the memory-dependent pre-indexing method is prone to excessive memory occupation when dealing with massive data, leading to system lag, while relying solely on external storage will result in performance degradation and increased latency; Second, traditional spatial index structures (such as KD-trees, R-trees, octrees, etc.) have limitations when dealing with seabed terrain data. For example, KD-trees consume a large amount of memory, the overlapping of intermediate nodes in R-trees reduces efficiency, and octrees have redundant storage in the Z direction; In addition, the traditional quadtree index does not consider the main direction characteristics of the multi-beam scan strip point cloud, which may lead to an increase in empty nodes and an excessive index depth, affecting the processing efficiency. Generally speaking, there is still room for improvement in the existing solutions in terms of the balance between memory and external storage, the optimization of the index structure, the adaptability to multi-beam data characteristics, and the efficient retrieval of retrieval points.
[0006] Through the above analysis, the problems and defects of the existing technology are as follows:
[0007] (1) Currently, the memory-dependent pre-indexing method is prone to excessive memory occupation when dealing with massive data, leading to system lag, while relying solely on external storage will result in performance degradation and increased latency.
[0008] (2) Traditional spatial index structures have limitations when dealing with seabed terrain data. For example, KD-trees consume a large amount of memory, the overlapping of intermediate nodes in R-trees reduces efficiency, and octrees have redundant storage in the Z direction.
[0009] (3) The traditional quadtree index does not consider the main direction characteristics of the multi-beam scan strip point cloud, resulting in excessive redundancy of the axial bounding box. When constructing the index, there may be an increase in empty nodes and an excessive index depth, affecting the processing efficiency. Summary of the Invention
[0010] To overcome the problems in the related technology, the disclosed embodiments of the present invention provide a method and system for organizing large-scale multi-beam strip point clouds with an improved direction quadtree. The technical solutions are as follows:
[0011] The present invention is implemented as follows. A method for organizing large-scale multi-beam strip point clouds with an improved direction quadtree includes the following steps:
[0012] S1, Direction bounding box calculation: Perform principal component analysis on the original point cloud, and determine the algorithm of the bounding box through the results of the principal component analysis to obtain the direction bounding box of the original point cloud.
[0013] S2, Construction of the external memory index of the direction quadtree: According to the spatial distribution characteristics of the multi-beam strip point cloud, establish an external memory index file of the direction quadtree, and organize the index file of the quadtree using the binary method.
[0014] S3. Multi-beam strip point cloud organization: An improved directional quadtree structure and a defined binary index file are used to organize and store the original multi-beam scanned points respectively, and point cloud retrieval is performed.
[0015] In step S1, the calculation of the directional bounding box includes:
[0016] (1) By performing principal component analysis on the original point cloud data, the main axis direction of the point cloud is determined;
[0017] (2) Rotate the original point cloud P i along the main axis direction of the point cloud centroid so that the main direction of the rotated point cloud is aligned with the coordinate axes, and the rotated point cloud P' i ' is obtained;
[0018] (3) Calculate the axial bounding box for the rotated point cloud P' i ';
[0019] (4) Rotate the obtained axial bounding box back to the position corresponding to the original point cloud by the corresponding angle, and the bounding box obtained after rotating the axial bounding box is the directional bounding box of the original point cloud.
[0020] In step (1), the principal component analysis includes:
[0021] ① Calculate the centroid of the point cloud
[0022]
[0023] In the formula, is the position of the point cloud centroid, x i , y i are the plane coordinates of the point cloud, and n is the number of points;
[0024] ② Translate the point cloud data P i to the centroid so that the centroid is located at the origin of coordinates;
[0025]
[0026] In the formula, P' i is the centered point cloud data;
[0027] ③ Construct the covariance matrix C of the centered point cloud data and calculate the covariance matrix;
[0028]
[0029] In the formula, T is the matrix transpose;
[0030] ④ Perform eigenvalue decomposition on the covariance matrix to solve the eigenvectors;
[0031] Cvj = λ j v j
[0032] where λ j is the eigenvalue and v j is the corresponding eigenvector;
[0033] ⑤ Sort the eigenvalues in descending order to obtain the corresponding eigenvectors and the main axis direction of the point cloud data.
[0034] In step S2, an external memory index file for the directional quadtree is established, and the index file of the quadtree is organized using the binary method, including:
[0035] The index file of the quadtree is organized using the binary method. A node structure with a fixed length is designed in advance. Each node contains the offset of the child node, the regional range, and metadata; the global metadata is stored at the file header. The root node starts from a fixed position, and the child nodes are arranged according to the static pre-allocation or dynamic allocation strategy; during construction, data is recursively inserted from the root node. If a node needs to be split, four child node blocks are allocated and the offset of the parent node is updated. The child nodes are directly associated with the data block pointers; during query, the root node is located through the file header, and the offset is calculated layer by layer to jump to the target child node, and the data is quickly retrieved by combining random access; the data block area is dynamically extended at the end of the file to support the reuse of free nodes and batch writing optimization. Through the compact binary format, fixed-length nodes, and direct offset calculation, efficient spatial indexing and cross-platform compatibility are achieved; according to the spatial distribution characteristics of the multi-beam strip point cloud, when dividing a single strip point cloud into a quadtree, the main direction of the root node is used to replace the main direction of each child node.
[0036] Furthermore, the construction of the external memory index of the directional quadtree includes:
[0037] (1) Read the multi-beam bathymetric point cloud data through memory mapping. Define the point cloud structure body. Call the system function to map the file to the process memory pointer, and access the coordinate data through index zero-copy; if the file byte order does not match the system, the endianness needs to be converted field by field, and the rationality of the depth value is verified to exclude anomalies; during reading, traverse all points or quickly filter the spatial area by combining the pre-mapped quadtree index. Improve the efficiency through multi-threaded block parallel processing. Unmap through munmap and close the file; set the coordinates of the first point read as the reference offset, subtract this offset from all points to obtain the offset data, and then initialize the segmentation threshold;
[0038] (2) Calculate the directional bounding box of the point cloud and divide the space into four equal parts. Recalculate the bounding box of the child nodes of the directional quadtree and determine whether the number of points in the child node is greater than the threshold;
[0039] (3) Write the directional quadtree index information and iteratively serialize it to the computer hard disk to generate the directional quadtree index file in the external storage, and finally complete the establishment of the directional quadtree spatial index.
[0040] In step (2), calculate the directional bounding box of the point cloud and record the principal axis direction, and use the directional bounding box as the root node of the quadtree; divide the space into four equal parts according to the directional bounding box, and use the point set corresponding to each area as the four child nodes of the current node; recalculate the bounding box of the quadtree child nodes according to the principal axis direction of the original point cloud, and determine whether the number of points in the child node is greater than the threshold.
[0041] Furthermore, the comparison of the relationship between the number of nodes and the threshold is as follows:
[0042] If the number of points in the child node is greater than the threshold, continue to perform the quadtree segmentation until the number of points in all leaf nodes is less than the threshold; if the number of points in the child node is less than the threshold, determine whether the stored number of points is non-zero. If so, determine the directional quadtree leaf node.
[0043] In step (3), the writing of the directional quadtree index information includes:
[0044] When constructing the directional quadtree index, write the offset, the directional bounding box information of the root node, and the information of the corresponding child nodes in the root node file; write the directional bounding box information of the node and the information of the corresponding child nodes in the child node file; write the directional bounding box information of the node, the adjacent node information, and the point set information of the leaf node in the leaf node file.
[0045] In step S3, the process of point cloud retrieval includes:
[0046] (1) Read the root node file of the directional quadtree and determine the retrieval range;
[0047] (2) Determine whether the retrieval range intersects with the root node bounding box. If the retrieval range intersects with the root node bounding box, then determine whether the root node bounding box is within the retrieval range;
[0048] (3) If the root node bounding box is within the retrieval range, read all the leaf node files under the root node, load the point sets in all the leaf node files, and form the point set information within the retrieval range;
[0049] (4) If the root node bounding box is not within the retrieval range, read the child node file of the current node and determine whether the retrieval range intersects with the child node bounding box;
[0050] (5) If the retrieval range intersects with the bounding box of the child node, then determine whether the bounding box of the child node is within the retrieval range; if the bounding box of the child node is within the retrieval range, then read all the leaf node files under the node, load the point sets in all the leaf node files, and form the point set information within the retrieval range.
[0051] (6) If the bounding box of the child node is not within the retrieval range, then determine whether the current node is a leaf node. If the current node is not a leaf node, then return to step (4); if the current node is a leaf node, then determine whether the node is within the retrieval range. If so, output the point set information within the retrieval range.
[0052] Another object of the present invention is to provide a large-scale multi-beam strip point cloud organization system for an improved directional quadtree, which is used to regulate the large-scale multi-beam strip point cloud organization method of the improved directional quadtree. The system includes:
[0053] A directional bounding box calculation module, which is used to perform principal component analysis on the original point cloud, determine the algorithm of the bounding box through the principal component analysis result, and obtain the directional bounding box of the original point cloud.
[0054] A directional quadtree external memory index construction module, which is used to establish a directional quadtree external memory index file according to the spatial distribution characteristics of the multi-beam strip point cloud, and organize the index file of the quadtree by using the binary method.
[0055] A multi-beam strip point cloud organization module, which is used to organize and store the original multi-beam scanned points respectively by using the improved directional quadtree structure and the defined binary index file, and perform point cloud retrieval.
[0056] Combining all the above technical solutions, the beneficial effects of the present invention are as follows:
[0057] First, the present invention uses the improved directional quadtree structure and the defined binary index file to organize and store the original multi-beam scanned points respectively, and stores them on the hard disk. At the same time, the present invention also uses memory mapping and multi-threading technologies to read the point cloud from the index file, improving the reading efficiency.
[0058] Second, for the number of multi-beam strip points, the directional quadtree has fewer node numbers and smaller tree depth compared with the traditional quadtree, resulting in shorter retrieval time. The time consumption of the conventional directional quadtree and the improved directional quadtree within the same retrieval range is basically the same, and the time consumption of the directional quadtree is reduced by up to 27% compared with that of the traditional quadtree, reflecting the high efficiency of the improved directional quadtree in index creation and point cloud retrieval.
[0059] Thirdly, by improving the calculation process of the directional bounding boxes of the nodes other than the root node in the directional quadtree, the time for index construction is greatly reduced. The time consumed by the improved directional quadtree is about twice that of the traditional quadtree, but more than three times less than that of the conventional directional quadtree.
[0060] Fourthly, memory mapping and multi-threading technologies are adopted to read point clouds from the index file, improving the reading efficiency. The present invention can effectively partition massive multi-beam bathymetric point cloud data, achieve efficient retrieval of point clouds, improve the efficiency of data preprocessing, and provide an effective solution for solving the problem of efficient organization and management of large-scale multi-beam strip point clouds.
[0061] Fifthly, the present invention designs an external memory data organization method for an improved directional quadtree index structure. Firstly, according to the spatial characteristics of multi-beam strip point cloud data, directional bounding boxes are introduced into the traditional quadtree structure to form a directional quadtree for partitioning point clouds. Secondly, according to the distribution characteristics of multi-beam strip point cloud data, when partitioning the point cloud data, the main direction of the root node's directional bounding box is used to replace the main directions of all child nodes' directional bounding boxes to form the directional bounding boxes of the child nodes, thereby realizing the improvement of the conventional directional quadtree. Finally, the information of the root node, child nodes, and leaf nodes is stored in the external memory index file. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure;
[0063] Figure 1 is a flowchart of a method for organizing large-scale multi-beam strip point clouds of an improved directional quadtree provided by an embodiment of the present invention;
[0064] Figure 2 is a schematic diagram of a quadtree structure provided by an embodiment of the present invention;
[0065] Figure 3 is a comparison schematic diagram of a quadtree and a directional quadtree provided by an embodiment of the present invention; wherein, (a) is a quadtree index structure, and (b) is a directional quadtree index structure;
[0066] Figure 4 is a flowchart of an index construction and retrieval process provided by an embodiment of the present invention;
[0067] Figure 5 is a schematic diagram of different retrieval ranges provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0068] To make the above objects, features, and advantages of the present invention more apparent and understandable, the following provides a detailed description of the specific embodiments of the present invention in conjunction with the accompanying drawings. Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0069] The innovation of the present invention lies in: The present invention uses a traditional quadtree structure and an oriented bounding box to construct an index for multi-beam strip point cloud data, and improves the calculation process of the oriented bounding box of other nodes except the root node. The improved oriented quadtree structure and the defined binary index file are used to organize and store the original multi-beam scanned points respectively, and store them on the hard disk.
[0070] Example 1, as Figure 1 shown, the method for organizing large-scale multi-beam strip point clouds of the improved oriented quadtree provided by the embodiment of the present invention includes the following steps:
[0071] S1, Oriented bounding box calculation: Perform principal component analysis on the original point cloud, determine the algorithm of the bounding box through the results of principal component analysis, and obtain the oriented bounding box of the original point cloud;
[0072] S2, Construction of the external memory index of the oriented quadtree: According to the spatial distribution characteristics of the multi-beam strip point cloud, establish an external memory index file of the oriented quadtree, and organize the index file of the quadtree by the binary method;
[0073] S3, Organization of multi-beam strip point clouds: Use the improved oriented quadtree structure and the defined binary index file to organize and store the original multi-beam scanned points respectively, and perform point cloud retrieval.
[0074] 1. Quadtree structure: The quadtree index is a tree-like data index structure proposed by Tayeb in 1998. It is a tree-like data structure in which each node has at most four child nodes, and is composed of three types of elements: the root node, child nodes, and leaf nodes. The root node represents the entire spatial domain of interest. It is the entry point of the quadtree hierarchical structure and stores all data points before any subdivision, as Figure 2 shown by the topmost node in Figure 2 . Child nodes are the direct branches of the root node. Each child node represents a quadrant of the spatial region of the parent node, as Figure 2as shown by the lowest-level nodes in it. It represents the smallest spatial unit in the hierarchy and contains the final set of data points. The idea behind the quadtree index is to divide each two-dimensional object in space into a cyclic recursive framework. In this process, the two-dimensional object on the root node is divided into four equal sub-nodes by a recursive program. To avoid infinite recursion, a threshold must be set to limit the number of recursive divisions. This threshold is the termination criterion for hierarchical segmentation. Setting a maximum division depth or a minimum value for each node in the set are two common methods. Once the threshold is reached, the quadtree indexing process ends. The two-level complete quadtree division and its structural schematic diagram are shown in Figure 2 as shown.
[0075] 2. Oriented Bounding Box: The Oriented Bounding Box (OBB) is the smallest bounding box generated in the principal component direction of an object, which encloses the object. The Axis-Aligned Bounding Box (AABB) is the smallest rectangle (or rectangular prism in three-dimensional space) that is aligned with the coordinate axes and completely encloses all data points, and the edges of the bounding box are always parallel to the X and Y (Z in three-dimensional space) axes. Compared with the AABB, the OBB can approximate the object with the highest possible accuracy according to the shape characteristics of the object and is more suitable for data with strong directionality.
[0076] Since the multi-beam bathymetric point cloud is evenly distributed along the track line and most of it is not perpendicular to the axis direction, the oriented bounding box is the best choice for the root node of the quadtree division of the multi-beam bathymetric point cloud. The comparison between the data quadtree and the oriented quadtree is shown in Figure 3 . The example data is the actual multi-beam measurement data, with a total number of points of about five hundred thousand, and the threshold for quadtree division is no more than fifty thousand for each node, Figure 3 (a) and Figure 3 (b) show that the oriented quadtree has a shallower depth and fewer nodes than the standard quadtree created. This successfully reduces the number of redundant nodes and empty nodes and improves the query efficiency.
[0077] Calculating the oriented bounding box mainly relies on the first-order and second-order statistical characteristics of the vertex coordinates to determine the optimal direction and find the minimum size of the bounding box in this direction. The present invention first performs principal component analysis on the original point cloud and determines the algorithm for the final bounding box through the results of principal component analysis. Since only the oriented bounding box corresponding to the plane of the point cloud needs to be calculated and the quadtree index division is performed, the influence of the direction of the Z axis can be ignored. The specific steps are as follows:
[0078] (1) Determine the principal axis direction of the point cloud by performing principal component analysis on the original point cloud data;
[0079] By performing PCA (Principal Component Analysis) on the original point cloud data, the main steps of the principal component analysis are as follows:
[0080] ① Calculate the centroid of the point cloud
[0081]
[0082] In the formula, is the position of the centroid of the point cloud, x i , y i are the planar coordinates of the point cloud, and n is the number of points;
[0083] ② Translate the point cloud data P i to the centroid so that the centroid is located at the origin of the coordinates;
[0084]
[0085] In the formula, P' i is the centered point cloud data;
[0086] ③ Construct the covariance matrix C of the centered point cloud data and calculate the covariance matrix;
[0087]
[0088] In the formula, T is the matrix transpose;
[0089] ④ Perform eigenvalue decomposition on the covariance matrix to solve the eigenvectors;
[0090] Cv j = λ j v j
[0091] In the formula, λ j is the eigenvalue, and v j is the corresponding eigenvector;
[0092] ⑤ Sort the eigenvalues in descending order to obtain the corresponding eigenvectors and the main axis direction of the point cloud data.
[0093] (2) Rotate the original point cloud P i along the main axis direction of the centroid of the point cloud so that the main direction of the rotated point cloud is aligned with the coordinate axes, and obtain the rotated point cloud P″ i ;
[0094] (3) Calculate the axial bounding box for the rotated point cloud P″ i ;
[0095] At this time, the rotated point cloud P″ iThe main direction of has been aligned with the coordinate axes, so calculate the AABB for the rotated point cloud;
[0096] (4) Rotate the obtained axis-aligned bounding box back to the position corresponding to the original point cloud by the corresponding angle. The bounding box obtained after rotating the axis-aligned bounding box is the orientation bounding box of the original point cloud.
[0097] Rotate the obtained AABB back to the position corresponding to the original point cloud by the corresponding angle. The bounding box obtained after rotating the AABB is the OBB of the original point cloud.
[0098] In step S2, an external memory index file for the orientation quadtree is established. The index file of the quadtree is organized using the binary method, including:
[0099] The index file of the quadtree is organized using the binary method. A node structure with a fixed length is designed in advance. Each node contains the offsets of child nodes (4 unsigned 8-byte integers), the region range (4 double-precision floating-point numbers), and metadata (flag bits and data pointers). It is usually aligned to 80 bytes to improve access efficiency; the global metadata (such as the offset of the root node, the node size, the spatial range, and the version identifier) is stored in the file header. The root node starts from a fixed position (such as after 1024 bytes). The child nodes are laid out according to the static pre-allocation or dynamic allocation strategy (the latter manages the node space through the free list). During construction, data is recursively inserted from the root node. If a node needs to be split, four child node blocks are allocated and the offset of the parent node is updated. The leaf nodes are directly associated with the data block pointers. During query, the root node is located through the file header, and the offsets are calculated layer by layer to jump to the target child node, and the data is quickly retrieved by combining random access. The data block area is dynamically extended at the end of the file to support the reuse of free nodes and batch writing optimization. Finally, efficient spatial indexing and cross-platform compatibility are achieved through a compact binary format, fixed-length nodes, and direct offset calculation. According to the spatial distribution characteristics of the multi-beam strip point cloud, when dividing a single strip point cloud into a quadtree, the main direction of the root node is used to replace the main direction of each child node.
[0100] The construction of the external memory index of the orientation quadtree includes:
[0101] (1) Read multi-beam bathymetric point cloud data through memory mapping. When efficiently reading multi-beam bathymetric point cloud data through memory mapping, first define a point cloud structure (such as a 24-byte continuous storage format where each point contains planar coordinates x, y, and water depth, and ensure memory alignment without padding through #pragma pack(1)). Then, call system functions (such as mmap or MapViewOfFile) to map the file to a process memory pointer, and directly access coordinate data through indexing (such as points[i].x) with zero-copy. If the file byte order does not match the system (such as big-endian storage), convert the endianness field by field and verify the rationality of the depth value to exclude anomalies. During reading, all points can be traversed or a pre-mapped quadtree index can be combined to quickly filter spatial regions (such as x / y ranges), and multi-threaded block parallel processing can be used to improve efficiency. Finally, unmapping and closing the file are performed through munmap, and the operating system paging mechanism is utilized to achieve on-demand loading of ultra-large-scale data and efficient memory management, taking into account nanosecond-level random access and low memory overhead. Set the coordinates of the first point read as the reference offset, subtract this offset from all points to obtain the offset data, and then initialize the segmentation threshold;
[0102] (2) Calculate the oriented bounding box of the point cloud and divide the space into four equal parts, recalculate the bounding boxes of the oriented quadtree child nodes, and determine whether the number of points in the child nodes is greater than the threshold;
[0103] (3) Write the oriented quadtree index information and iteratively serialize it to the computer hard disk to generate an external memory oriented quadtree index file, and finally complete the establishment of the oriented quadtree spatial index.
[0104] In step (2), calculate the oriented bounding box of the point cloud and record the main axis direction, and use the oriented bounding box as the root node of the quadtree; divide the space into four equal parts according to the oriented bounding box, and use the point set corresponding to each region as the four child nodes of the current node; recalculate the bounding boxes of the oriented quadtree child nodes according to the main axis direction of the original point cloud, and determine whether the number of points in the child nodes is greater than the threshold.
[0105] In step (3), the writing of the oriented quadtree index information includes:
[0106] When constructing the oriented quadtree index, write the offset, the oriented bounding box information of the root node, and the information of the corresponding child nodes in the root node file; write the oriented bounding box information of the node and the information of the corresponding child nodes in the child node file; write the oriented bounding box information of the node, the adjacent node information, and the point set information of the leaf node in the leaf node file.
[0107] The writing process of the directional quadtree index information starts from the root node. First, define the global space range (such as [x_min, y_min, x_max, y_max]) and the direction division rule (such as dividing the node into four directional sub-regions based on the coordinate median), and set the node capacity threshold (such as each leaf node can store at most N data points). When inserting data, recursively determine the sub-region direction to which the point coordinates to be inserted belong. If the current leaf node is not full, directly write the data entry; if the node data volume exceeds the limit, trigger splitting: allocate four child node spaces, redistribute the parent node data to the corresponding child nodes according to the direction, and update the child node pointers of the parent node (such as file offsets or memory addresses). At the same time, mark the parent node as a non-leaf node. During the writing process, serialize the node information (including space range, child node pointers, data volume, and data list) and persistently store it in a file or database according to a fixed block size (such as 256 bytes / node). When dynamically allocating, manage the node space reuse through the free list. In terms of optimization, the lazy splitting strategy can be used to delay splitting, batch insert pre-sorted data to reduce the number of splits, and clarify the boundary data attribution rule (such as a left-closed right-open interval) to avoid ambiguity. Finally, update the metadata such as the root node position and tree depth at the file header to achieve the construction and maintenance of an efficient space index.
[0108] 3. Construction of the external memory index of the directional quadtree: The directional quadtree is a tree-like structure model that combines the directional bounding box and the traditional quadtree to describe the two-dimensional space. The directional bounding box of the original point cloud is used as the root node for quadtree partitioning, and each non-leaf node represents the directional bounding box of the current spatial data along the main component direction of the original point cloud.
[0109] To reduce the problem of large-scale data memory occupation, the present invention constructs a directional quadtree index file in the external memory based on the idea of internal and external memory scheduling. To reduce the file storage space occupancy rate and improve the reading and writing efficiency of the external memory file, a binary method is used to organize the index file of the quadtree. The index construction, external memory organization of the directional quadtree, and retrieval process are as Figure 4 shown. According to the spatial distribution characteristics of the multi-beam strip point cloud, the present invention proposes an improved method for the directional quadtree, that is, when performing quadtree partitioning on a single strip of point cloud, the main direction of the root node is used to replace the main direction of each child node.
[0110] The specific steps for establishing the external memory index of the directional quadtree are as follows:
[0111] (1) Read the multi-beam bathymetric point cloud data through memory mapping, set the first point read as the offset, and subtract the offset from all points to obtain the offset data. Then initialize the segmentation threshold, and the segmentation threshold for this experiment is 2.5% of the original point cloud quantity.
[0112] (2) Calculate the oriented bounding box of the point cloud and record its principal axis direction. Take the oriented bounding box as the root node of the quadtree, then divide the space into 4 equal parts according to the oriented bounding box, and use the point sets corresponding to each area as the 4 child nodes of the current node. Recalculate the bounding boxes of the child nodes according to the principal axis direction of the original point cloud. If the number of points in a child node is greater than the threshold, continue the quadtree segmentation until the number of points in all leaf nodes is less than the threshold.
[0113] (3) When constructing the oriented quadtree index, write the offset, the oriented bounding box information of the root node, and the information of the corresponding child nodes in the root node file; write the oriented bounding box information of the node and the information of the corresponding child nodes in the child node file; write the oriented bounding box information of the node, the adjacent node information, and the point set information of the leaf node in the leaf node file. The format of the oriented quadtree index node file is shown in Table 1. Iteratively serialize these oriented quadtree index information to the computer hard disk to generate the oriented quadtree index file in external storage, and finally complete the establishment of the oriented quadtree spatial index.
[0114] Table 1 Information of the oriented quadtree external storage index file
[0115] root node child node leaf node point cloud offset oriented bounding box information oriented bounding box information oriented bounding box information child node file information adjacent node file information child node file information current node point set information
[0116] Embodiment 2. The large-scale multi-beam strip point cloud organization system of the improved oriented quadtree provided by the embodiment of the present invention includes:
[0117] An oriented bounding box calculation module, which is used to perform principal component analysis on the original point cloud, determine the algorithm of the bounding box through the results of principal component analysis, and obtain the oriented bounding box of the original point cloud;
[0118] An oriented quadtree external storage index construction module, which is used to establish an oriented quadtree external storage index file according to the spatial distribution characteristics of the multi-beam strip point cloud, and organize the index file of the quadtree by the binary method;
[0119] A multi-beam strip point cloud organization module, which is used to organize and store the original multi-beam scanned points respectively by using the improved oriented quadtree structure and the defined binary index file, and perform point cloud retrieval.
[0120] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0121] To further prove the positive effects of the above embodiments, the present invention conducts the following experiments based on the above technical solutions.
[0122] This part uses the experimental data obtained by the Kongsberg EM2040 multibeam echosounder (maximum ranging 600 m; ranging resolution 1.25 cm; the angular sector used in this survey is about ±60°; number of beams 512). Ten multibeam strip data are selected, and the order of magnitude of the point cloud for each strip is over one million. The main contents of the experimental tests include the indexing establishment time of the traditional quadtree, the conventional directional quadtree, and the improved directional quadtree, the time required to retrieve the point cloud, as well as the indexing establishment time and retrieval time under different thresholds.
[0123] Use the traditional quadtree, the conventional directional quadtree, and the improved directional quadtree to construct the quadtree index files of the selected multibeam strip data based on external storage, and the segmentation threshold is 2.5% of the original point cloud quantity. Table 2 shows the time consumption and external storage requirements during the index construction of different methods, and Table 3 shows the number of layers and the number of valid nodes of the quadtrees generated using different index construction methods.
[0124] Table 2 Index construction time of each method (unit: s)
[0125]
[0126]
[0127] The traditional directional quadtree requires the longest construction time, far exceeding that of the traditional quadtree and the improved directional quadtree. As the quantity of the point cloud increases, this time difference will become more obvious. Compared with the traditional quadtree, adding directional information will result in longer construction times for both the traditional quadtree and the improved directional quadtree, mainly because a large amount of time-consuming PCA is required to identify the main direction of the point cloud. However, the improved directional quadtree only requires one PCA process, which greatly shortens the construction time compared with the traditional directional quadtree.
[0128] Table 3 Number of layers and number of child nodes of the quadtrees under each method (the bold part in the table represents the number of child nodes)
[0129]
[0130] To verify the performance of the proposed method in point cloud retrieval, the present invention selects the 10th group of multibeam scan strips in Table 2 (including more than 10 million points), calculates the time consumption under different retrieval ranges, and compares it with the traditional quadtree, the traditional directional quadtree, and the traversal method. Figure 5 Eleven retrieval ranges are shown. Except for Region 1, the other regions are rectangular regions starting from Point A and Point B. Region 1 does not intersect with the survey line, while the ranges of Regions 2 to 11 gradually increase uniformly until the entire survey line is included. The comparison results obtained by querying these 11 regions are shown in Table 3.
[0131] As shown in Table 4, when the retrieval range does not intersect with the multi-beam scanning band (see Region 1 in Figure 5 ), the retrieval time based on the quadtree is about 0.10 milliseconds, which is much lower than the time required for traversal retrieval. When the number of point clouds increases to half of the total scanning range, the quadtree retrieval method has more advantages than the traversal retrieval method. However, as the number of point clouds in the retrieval range continues to increase, the time required for the quadtree index gradually approaches the time required for traversal retrieval. When retrieving all point clouds (see Region 11 in Figure 5 ), due to the relatively deep tree layers and empty child nodes, the time required for traditional quadtree retrieval is even longer than that of the traversal method. The directional quadtree and the improved directional quadtree do not have this problem because the time consumption of these two methods is similar and both are lower than that of the traditional quadtree, especially when dealing with a large number of points.
[0132] Table 4 Retrieval times of different methods for different retrieval ranges (unit: ms)
[0133] retrieval area number of retrieved point clouds traditional quadtree conventional oriented quadtree improved oriented quadtree traversal 1 0 0.11 0.10 0.10 212 2 1,075,204 53 51 52 241 3 2,176,067 94 79 82 259 4 3,393,547 145 118 118 282 5 4,219,178 192 159 162 315 6 5,003,093 214 173 180 331 7 6,220,027 277 238 233 363 8 7,047,486 311 248 251 378 9 8,021,641 391 321 320 401 10 9,028,699 429 333 335 426 11 10,776,400 456 360 361 453
[0134] As mentioned above, the above is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention should be covered within the protection scope of the present invention.
Claims
1. A large-scale multi-beam strip point cloud organization method for improving the direction quad-tree, characterized in that, The method includes the following steps: S1, Oriented bounding box calculation: Perform principal component analysis on the original point cloud, determine the algorithm of the bounding box through the results of principal component analysis, and obtain the oriented bounding box of the original point cloud; S2, Construction of external memory index of oriented quadtree: According to the spatial distribution characteristics of multi-beam strip point cloud, establish an external memory index file of oriented quadtree, and organize the index file of the quadtree by binary method; S3, Organization of multi-beam strip point cloud: Use the improved oriented quadtree structure and the defined binary index file to organize and store the original multi-beam scanned points respectively, and perform point cloud retrieval.
2. The large-scale multi-beam strip point cloud organization method for the improved direction quadtree according to claim 1, characterized in that In step S1, the calculation of the oriented bounding box includes: (1) Determine the main axis direction of the point cloud by performing principal component analysis on the original point cloud data; (2) Rotate the original point cloud P i along the main axis direction of the centroid of the point cloud, so that the main direction of the rotated point cloud is aligned with the coordinate axes, and obtain the rotated point cloud P'' i ; (3) For the rotated point cloud P” i Calculate the axis-aligned bounding box; (4) Rotate the obtained axial bounding box counterclockwise by the corresponding angle back to the position corresponding to the original point cloud. The bounding box obtained after rotating the axial bounding box is the oriented bounding box of the original point cloud.
3. The method for organizing large-scale multi-beam strip point clouds of the improved octree according to claim 2, wherein In step (1), the principal component analysis includes: ① Calculate the centroid of the point cloud In the formula, is the position of the centroid of the point cloud, x i , y i are the planar coordinates of the point cloud, and n is the number of points; ②Translate the point cloud data P i to the centroid so that the centroid is located at the origin of coordinates; where P' i is the point cloud data after centering; ③ Construct the covariance matrix C of the centralized point cloud data and calculate the covariance matrix; In the formula, T is the matrix transpose; ④ Perform eigenvalue decomposition on the covariance matrix and solve the eigenvectors; Cv j = λ j v j where λ j is the eigenvalue and v j is the corresponding eigenvector; ⑤ Sort the eigenvalues in descending order to obtain the corresponding eigenvectors and the main axis direction of the point cloud data.
4. The large-scale multi-beam strip point cloud organization method for the improved direction quadtree according to claim 1, characterized in that, In step S2, to establish an external memory index file of oriented quadtree and organize the index file of the quadtree by binary method, it includes: Organize the quadtree index file by binary method, pre-design a node structure with a fixed length. Each node contains the offset of the child node, the regional range and metadata; the global metadata is stored at the file header. The root node starts from a fixed position, and the child nodes are laid out according to the static pre-allocation or dynamic allocation strategy; during construction, insert data recursively from the root node. If the node needs to be split, allocate four child node blocks and update the offset of the parent node, and the child nodes are directly associated with the data block pointer; during query, locate the root node through the file header, calculate the offset layer by layer to jump to the target child node, and quickly retrieve data by combining random access; dynamically expand the data block area at the end of the file, support the reuse of idle nodes and batch writing optimization, and achieve efficient spatial indexing and cross-platform compatibility through a compact binary format, fixed-length nodes and direct offset calculation; according to the spatial distribution characteristics of multi-beam strip point cloud, when performing quadtree division on a single strip point cloud, use the main direction of the root node to replace the main direction of each child node.
5. The large-scale multi-beam strip point cloud organization method for the improved direction quadtree according to claim 4, characterized in that The construction of the external memory index of the oriented quadtree includes: (1) Read the multi-beam bathymetric point cloud data through memory mapping, define the point cloud structure body, call the system function to map the file to the process memory pointer, and access the coordinate data through index zero-copy; if the file byte order does not match the system, convert the endianness field by field and verify the rationality of the depth value to exclude anomalies; during reading, traverse all points or quickly screen the spatial area by combining the pre-mapped quadtree index, improve the efficiency through multi-threaded block parallel processing, unmap through munmap and close the file; set the coordinates of the first point read as the reference offset, subtract this offset from all points to get the offset data, and then initialize the segmentation threshold; (2) Calculate the oriented bounding box of the point cloud and divide the space into four equal parts. Recalculate the bounding boxes of the child nodes of the oriented quadtree and determine whether the number of point clouds in the child nodes is greater than the threshold; (3) Write the oriented quadtree index information and iteratively serialize it to the computer hard disk to generate an oriented quadtree index file in external storage, and finally complete the establishment of the oriented quadtree spatial index.
6. The large-scale multi-beam strip point cloud organization method for the improved direction quadtree according to claim 5, characterized in that In step (2), calculate the oriented bounding box of the point cloud and record the main axis direction, and use the oriented bounding box as the root node of the quadtree; Divide the space into four equal parts according to the oriented bounding box, and use the point sets corresponding to each region as the four child nodes of the current node; recalculate the bounding boxes of the child nodes of the oriented quadtree according to the main axis direction of the original point cloud, and determine whether the number of point clouds in the child nodes is greater than the threshold.
7. The large-scale multi-beam strip point cloud organization method for the improved direction quadtree according to claim 6, characterized in that, The comparison of the relationship between the number of nodes and the threshold is as follows: If the number of point clouds in the child node is greater than the threshold, continue to divide the quadtree until the number of point clouds in all leaf nodes is less than the threshold; if the number of point clouds in the child node is less than the threshold, determine whether the stored number of point clouds is non-zero. If so, determine the leaf node of the oriented quadtree.
8. The method for organizing large-scale multi-beam strip point clouds of the improved direction quadtree according to claim 5, characterized in that In step (3), the writing of the oriented quadtree index information includes: When constructing the oriented quadtree index, write the offset, the oriented bounding box information of the root node, and the information of the corresponding child nodes in the root node file; write the oriented bounding box information of the node and the information of the corresponding child nodes in the child node file; write the oriented bounding box information of the node, the adjacent node information, and the point set information of the leaf node in the leaf node file.
9. The large-scale multi-beam strip point cloud organization method for the improved direction quadtree according to claim 1, characterized in that In step S3, the process of point cloud retrieval includes: (1) Read the root node file of the oriented quadtree and determine the retrieval range; (2) Determine whether the retrieval range intersects with the root node bounding box. If the retrieval range intersects with the root node bounding box, then determine whether the root node bounding box is within the retrieval range; (3) If the root node bounding box is within the retrieval range, read all the leaf node files under the root node, load the point sets in all the leaf node files, and form the point set information within the retrieval range; (4) If the root node bounding box is not within the retrieval range, read the child node file of the current node and determine whether the retrieval range intersects with the child node bounding box; (5) If the retrieval range intersects with the child node bounding box, determine whether the child node bounding box is within the retrieval range; if the child node bounding box is within the retrieval range, read all the leaf node files under the node, load the point sets in all the leaf node files, and form the point set information within the retrieval range; (6) If the child node bounding box is not within the retrieval range, determine whether the current node is a leaf node. If the current node is not a leaf node, return to step (4); if the current node is a leaf node, determine whether the node is within the retrieval range. If so, output the point set information within the retrieval range.
10. A large-scale multi-beam strip point cloud organization system for improving the direction quad-tree, characterized in that, This system is used to control the large-scale multi-beam strip point cloud organization method of the improved oriented quadtree described in any one of claims 1-9. This system includes: An oriented bounding box calculation module, which is used to perform principal component analysis on the original point cloud, determine the algorithm of the bounding box through the results of principal component analysis, and obtain the oriented bounding box of the original point cloud; The external memory index construction module of the directional quadtree is used to establish an external memory index file of the directional quadtree according to the spatial distribution characteristics of the multi-beam strip point cloud, and organize the index file of the quadtree by the binary method; The multi-beam strip point cloud organization module is used to organize and store the original multi-beam scanned points respectively by using the improved directional quadtree structure and the defined binary index file, and perform point cloud retrieval.
Citation Information
Patent Citations
Height commanding analysis method and system based on double spatial indexes
CN119648927A
System and method for rendering of texel imagery
US20080238919A1