An octree forest-based point cloud spatial attribute joint parallel query method

By using an octree forest-based method, the outer cube filtering point cloud octree of the query subject is calculated to perform spatial queries and attribute filtering, which solves the problem that point cloud queries can only perform spatial or attribute queries individually, and realizes efficient joint queries.

CN116521916BActive Publication Date: 2026-05-12CHONGQING INST OF SURVEYING & MAPPING SCI & TECH (CHONGQING MAP COMPILATION CENT)
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING INST OF SURVEYING & MAPPING SCI & TECH (CHONGQING MAP COMPILATION CENT)
Filing Date
2023-04-10
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, point cloud queries can only be performed on a single space or attribute, and cannot perform joint queries on space and attributes.

Method used

An octree forest-based approach is adopted. By calculating the outer cube of the query subject to filter the point cloud octree, spatial query is performed and attribute filtering is performed to obtain the target node array and the point index array, and finally the target point cloud data is obtained.

Benefits of technology

It enables joint queries of space and attributes, simplifies the query process, improves query efficiency, and processes multiple target octrees in parallel to improve query speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116521916B_ABST
    Figure CN116521916B_ABST
Patent Text Reader

Abstract

The application provides an octree forest-based point cloud space attribute joint parallel query method, wherein the method is characterized in that: an external cuboid of a query subject is calculated, target octrees intersecting with the external cuboid in a point cloud octree are filtered, meanwhile, space query is performed on the target octrees, target node arrays and target point index arrays are obtained, finally, attribute filtering is performed on points in the target node arrays and the target point index arrays, target points are obtained, and point cloud data corresponding to the target points is obtained as target data, so that joint processing of space query and attribute filtering can be realized, attribute filtering does not need to be queried again, but is directly performed based on the space query result, and the query processing process is greatly simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of point cloud query technology, specifically to a method for joint parallel query of point cloud spatial attributes based on octree forest. Background Technology

[0002] Point cloud data is a data format that uses massive amounts of discrete point coordinates to represent the geometric features of spatial objects. Its main characteristic is its large data volume. Point cloud spatial query involves querying the point cloud within a given geometric shape on a screen or in space; point cloud attribute query involves querying point clouds that meet given attribute query conditions; and point cloud spatial attribute joint query involves querying point clouds within a geometric shape that satisfy the attribute query conditions.

[0003] With the continuous development of large-scale 3D data acquisition technology, 3D laser scanning equipment has been widely used. It can acquire complete point cloud coordinates of a target scene, perform automatic high-precision scanning in 3D space, realistically describe the overall structure and morphological features of the target scene, and quickly obtain point cloud data. In applications involving point cloud querying, analysis, processing, and rendering, it is necessary to perform joint spatial and attribute queries on the point cloud; however, existing queries only target either space or attributes individually. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention proposes a joint parallel query method for point cloud spatial attributes based on octree forests, in order to solve the technical problem that existing technologies only perform queries on space or attributes individually.

[0005] A point cloud spatial attribute joint parallel query method based on octree forest includes: calculating the circumscribed cube of the query subject; filtering target octrees in the point cloud octrees that intersect with the circumscribed cube; performing spatial query on the target octrees to obtain a target node array and a target point index array; performing attribute filtering on the points in the target node array and the target point index array to obtain target points, and obtaining the point cloud data corresponding to the target points as target data.

[0006] In one embodiment, the steps of calculating the outer cube of the query subject and filtering the target octrees intersecting with the outer cube in the point cloud octree include: constructing an octree based on point cloud data to obtain a point cloud octree, wherein the point cloud data includes the three-dimensional coordinates and point cloud attributes of the point cloud, and the point cloud octree includes a root node, intermediate nodes, and leaf nodes; calculating the outer cube of the query subject based on the point cloud data; and obtaining the point cloud octrees intersecting with the outer cube as the target octrees.

[0007] In one embodiment, before the step of calculating the circumscribed cube of the query subject based on the point cloud data, the method further includes: determining the point cloud query method, which includes three-dimensional space query and screen query.

[0008] In one embodiment, the step of calculating the circumscribed cube of the query subject based on point cloud data includes: when the point cloud query method is a three-dimensional space query, directly calculating the circumscribed cube of the query subject.

[0009] In one embodiment, the step of calculating the circumscribed cube of the query entity based on point cloud data further includes: when the point cloud query method is screen query, calculating the projection coordinates of the query entity on the near and far clipping planes based on the projection type, screen viewpoint coordinates, viewing direction, and near and far clipping distance; and calculating the circumscribed cube of the projection coordinates based on the projection coordinates.

[0010] In one embodiment, the step of performing a spatial query on the target octree to obtain a target node array and a target point index array includes: calculating the outer bounding box and the inner bounding box of the query entity; sequentially selecting nodes in the target octree that intersect with the outer bounding box as nodes to be processed; sequentially selecting nodes to be processed that intersect with the inner bounding box as target nodes, and using the point index array of the target nodes as the target point index array.

[0011] In one embodiment, after sequentially selecting nodes in the target octree that intersect with the outer bounding box as nodes to be processed, the method further includes: selecting leaf nodes among the nodes to be processed that do not intersect with the inner bounding box as target leaf nodes; determining whether the coordinates of each point in the target leaf node are located inside the query entity; if so, then using the target leaf node as the target node and the point index array of the target node as the target point index array.

[0012] In one embodiment, the step of calculating the outer bounding box and inner bounding box of the query entity includes: when the point cloud query method is a three-dimensional space query, calculating the outer bounding box and inner bounding box of the query entity.

[0013] In one embodiment, the step of calculating the outer bounding box and inner bounding box of the query entity includes: when the point cloud query method is screen query, obtaining the screen coordinates of the outer bounding box and inner bounding box of the query entity; and calculating the outer bounding box and inner bounding box of the query entity based on the screen coordinates.

[0014] In one embodiment, the step of filtering the points in the target node array and the target point index array by attributes to obtain target points and obtaining the point cloud data corresponding to the target points as target data includes: determining whether the attributes of the points in the target node array and the target point index array meet preset values; if so, taking the points that meet the preset values ​​as target points; obtaining the point cloud data corresponding to the target points as target data, and completing the spatial and attribute query of the point cloud data.

[0015] As can be seen from the above technical solution, the beneficial technical effects of the present invention are as follows:

[0016] 1. By calculating the circumscribed cube of the query subject, the target octree intersecting with the circumscribed cube in the point cloud octree is filtered. At the same time, a spatial query is performed on the target octree to obtain the target node array and the target point index array. Finally, attribute filtering is performed on the points in the target node array and the target point index array to obtain the target points. The point cloud data corresponding to the target points is then obtained as the target data. This enables the joint processing of spatial query and attribute filtering, allowing attribute filtering to be performed directly based on the spatial query results without needing to perform a query again, which greatly simplifies the query processing flow.

[0017] 2. When performing a spatial query on the target octree to obtain the target node array and target point index array, multiple target octrees can be processed in parallel, thereby improving the query efficiency. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0019] Figure 1 This is a flowchart illustrating a point cloud spatial attribute joint parallel query method based on octree forest in one embodiment. Detailed Implementation

[0020] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are merely illustrative of the technical solution of the present invention and are therefore intended to limit the scope of protection of the present invention.

[0021] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application should have the ordinary meaning understood by those skilled in the art to which this invention pertains. The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data used can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. Unless otherwise stated, the term "a plurality of" means two or more. In this disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B. The term "and / or" describes an association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B. The term "corresponding" can refer to an association or binding relationship; A corresponding to B means that there is an association or binding relationship between A and B.

[0022] In one embodiment, a method for joint parallel querying of point cloud spatial attributes based on octree forest is provided. First, a point cloud dataset and an octree are required as input, as shown below.

[0023] Input: A point cloud dataset Cloud = {Size, Point, Intensity, Class, gHeight, Octs}. Point is a 3D coordinate array (x, y, z), Intensity is an array of intensity values ​​(0-255), Class is an array of classifications (0-255), and gHeight is an array of ground heights (the height of a point relative to the ground). Size is the length of the above arrays, representing the number of points in the point cloud dataset. Octs is an array of octree root nodes, forming an octree forest of the point cloud dataset. The root node, intermediate nodes, and leaf nodes of the octree are all represented by OctNode = {First, Count, Leaf, Box, Next, Child}. First indicates that Count consecutive points in Cloud, starting from First, are points belonging to this octree node; Leaf indicates whether a node is a leaf node. Box is the bounding rectangle of the octree node, Next is the sibling node of this octree node, and Child is its first child node. Next and Child together form the tree structure starting from the root.

[0024] Query entities: including rectangles, circles, polygons, etc. (Query entities are also entered in advance).

[0025] Attribute filtering: Intensity value range, specify one or more categories, elevation range, ground height range.

[0026] Query projection: screen perspective projection, screen orthographic projection, 3D space. These represent the definition of the entity being queried; the first two are screen queries, and the third is a general 3D space query.

[0027] Output: Point cloud result set Result, which is an array of point cloud indices.

[0028] The specific steps are as follows:

[0029] S110: Calculate the outer cube of the query subject and filter the target octrees in the point cloud octree that intersect with the outer cube.

[0030] In one embodiment, step S110 includes: constructing an octree based on point cloud data to obtain a point cloud octree, wherein the point cloud data includes the three-dimensional coordinates and point cloud attributes of the point cloud, and the point cloud octree includes a root node, intermediate nodes, and leaf nodes; calculating the outer cube of the query subject based on the point cloud data; and obtaining the point cloud octree that intersects with the outer cube as the target octree.

[0031] Specifically, the intersection of the extrinsic cube QueryBox with the point cloud octree is calculated, and the intersecting octree is added to the query array OctList. It should be noted that the query of point cloud data in this patent is based on the octree constructed from the point cloud data. There are many methods for constructing point cloud octrees, and any existing method for constructing point cloud octrees based on point cloud data is acceptable.

[0032] In one embodiment, before the step of calculating the circumscribed cube of the query subject based on the point cloud data, the method further includes: determining the point cloud query method, which includes three-dimensional space query and screen query.

[0033] Specifically, based on the different query methods, point cloud queries can be divided into 3D spatial queries and screen queries. 3D spatial queries refer to querying point cloud data by directly constructing 3D spatial query entities; screen queries refer to querying point cloud data by constructing query entities using 2D screen coordinates.

[0034] In one embodiment, the step of calculating the circumscribed cube of the query subject based on point cloud data includes: when the point cloud query method is a three-dimensional space query, directly calculating the circumscribed cube of the query subject.

[0035] Specifically, if the query method is a three-dimensional space query, then the outer cube QueryBox of the query entity (rectangle / circle / polygon, etc.) is calculated.

[0036] In one embodiment, the step of calculating the circumscribed cube of the query entity based on point cloud data further includes: when the point cloud query method is screen query, calculating the projection coordinates of the query entity on the near and far clipping planes based on the projection type, screen viewpoint coordinates, viewing direction, and near and far clipping distance; and calculating the circumscribed cube of the projection coordinates based on the projection coordinates.

[0037] Specifically, if the query method is screen query, then according to the projection type (perspective projection or orthographic projection), based on the screen viewpoint coordinates, viewing direction, and near and far clipping distance, the projected coordinates of the query entity on the near and far clipping planes are calculated, and the circumscribed cube QueryBox of these coordinates is calculated.

[0038] S120: Perform a spatial query on the target octree to obtain the target node array and the target point index array.

[0039] Specifically, for the target octree obtained in step S110, an octree space query is performed on each of the octrees; the result is an array of target nodes and an array of target point indices.

[0040] In one embodiment, step S120 includes: calculating the outer bounding box and the inner bounding box of the query entity; sequentially selecting nodes in the target octree that intersect with the outer bounding box as nodes to be processed; sequentially selecting nodes to be processed that intersect with the inner bounding box as target nodes, and using the point index array of the target nodes as the target point index array.

[0041] In one embodiment, the step of calculating the outer bounding box and inner bounding box of the query entity includes: when the point cloud query method is a three-dimensional space query, calculating the outer bounding box and inner bounding box of the query entity.

[0042] In one embodiment, after sequentially selecting nodes in the target octree that intersect with the outer bounding box as nodes to be processed, the method further includes: selecting leaf nodes among the nodes to be processed that do not intersect with the inner bounding box as target leaf nodes; determining whether the coordinates of each point in the target leaf node are located inside the query entity; if so, then the target leaf node is used as the target node, and the point index array of the target node is used as the target point index array.

[0043] Specifically, for step S120, when performing a 3D spatial query, the outer bounding box (outerBox3) and inner bounding box (innerBox) of the query entity are calculated. Starting from the root node of the octree, the intersection with outerBox3 is first determined. If there is no intersection, the query stops. Otherwise, further intersection checks are performed with innerBox. If innerBox contains the node, the node is directly merged into the queue of child nodes to be filtered (i.e., the target node array) OctNodeList, and all point index arrays are merged into the target point index array PointList. If there is no containment relationship with innerBox, and the current node is a leaf node, the coordinates of each point in the leaf node are compared with the query entity. If the node is inside the query entity, it is added to the target point index array PointList. Otherwise, the above judgment steps are repeated for all child nodes of the current node to complete the spatial query of all child nodes.

[0044] In one embodiment, the step of calculating the outer bounding box and inner bounding box of the query entity includes: when the point cloud query method is screen query, obtaining the screen coordinates of the outer bounding box and inner bounding box of the query entity; and calculating the outer bounding box and inner bounding box of the query entity based on the screen coordinates.

[0045] Specifically, the difference between screen queries and 3D space queries lies firstly in the construction of the inscribed and inner rectangles. In screen queries, the coordinates of the outer rectangle `outerBox2d` and the inner rectangle `innerBox2d` constructed based on the query entity are both screen coordinates. Secondly, the bounding box of an octree node is the bounding rectangle of all vertices of its spatial bounding box projected onto the screen. Furthermore, the query steps are the same as those for 3D space queries, and will not be repeated here.

[0046] S130: Perform attribute filtering on the points in the target node array and the target point index array to obtain the target points, and obtain the point cloud data corresponding to the target points as the target data.

[0047] Specifically, attribute filtering is performed on all points contained in the octree nodes in the target node array (OctNodeList) and the points in the target point index array (PointList), and the results are put into the result set (Result).

[0048] In one embodiment, step S130 includes: determining whether the attributes of the points in the target node array and the target point index array meet preset values; if so, taking the points that meet the preset values ​​as target points; obtaining the point cloud data corresponding to the target points as target data, and completing the spatial and attribute query of the point cloud data.

[0049] Point cloud data can include various attributes such as intensity value, category, elevation, and ground height. If intensity value filtering is required, an intensity value lookup table IMap is initialized based on the filtering conditions. This is a boolean array of length 256. Based on the intensity value filtering range, elements with intensity values ​​that meet the conditions are set to True, otherwise False. If category filtering is required, a category lookup table CMap is initialized based on one or more input categories. This table has a length of 256. Elements with the category to be queried as the index are set to True, otherwise False.

[0050] The steps for filtering each point attribute are as follows:

[0051] If intensity filtering is required, take the intensity value `inte` of the point. If `IMap[inte]` is True, continue; otherwise, move to the next point. If classification filtering is required, take the classification value `cls` of the point. If `CMap[cls]` is True, continue; otherwise, move to the next point. If elevation filtering is required, take the elevation value `z` of the point. If the condition is met, continue; otherwise, move to the next point. If ground height filtering is required, take the ground height value `g` of the point. If the ground height condition is met, continue; otherwise, move to the next point. If all the above conditions are met, add the point to the result set `Result`. Iterate through all points to obtain the final filtered result set. This implementation can filter by multiple attributes such as intensity value, classification, elevation, and ground height, supporting multi-attribute joint queries. Moreover, some attribute filtering is implemented using lookup tables, which can adapt to complex filtering condition expressions. Single attribute judgment only requires table lookup, resulting in higher efficiency.

[0052] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a computer storage medium (ROM / RAM, magnetic disk, optical disk) for execution by the computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Therefore, the present invention is not limited to any particular hardware and software combination.

[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.

Claims

1. A method for joint parallel query of point cloud spatial attributes based on octree forest, characterized in that, include: Calculate the outer cube of the query subject, and filter the target octrees in the point cloud octree that intersect with the outer cube, including: An octree is constructed based on point cloud data to obtain a point cloud octree. The point cloud data includes the three-dimensional coordinates and point cloud attributes of the point cloud. The point cloud octree includes a root node, intermediate nodes, and leaf nodes. Determine the point cloud query method, which includes screen query; The outer cube of the query subject is calculated based on the point cloud data, including: When the point cloud query method is screen query, the projection coordinates of the query entity on the near and far clipping planes are calculated based on the projection type, screen viewpoint coordinates, viewing direction, and near and far clipping distance. Calculate the circumscribed cube of the projected coordinates based on the projected coordinates; Obtain the point cloud octree that intersects with the circumscribed cube as the target octree; Perform a spatial query on the target octree to obtain the target node array and the target point index array; The points in the target node array and the target point index array are filtered by attributes to obtain the target points, and the point cloud data corresponding to the target points is obtained as the target data.

2. The method according to claim 1, characterized in that, The point cloud query method also includes three-dimensional space query.

3. The method according to claim 2, characterized in that, The step of calculating the outer cube of the query subject based on point cloud data includes: When the point cloud query method is a three-dimensional space query, the outer cube of the query subject is directly calculated.

4. The method according to claim 2, characterized in that, The steps of performing a spatial query on the target octree to obtain the target node array and the target point index array include: Calculate the outer and inner bounding boxes of the query entity; Nodes in the target octree that intersect with the bounding box are selected as nodes to be processed. The nodes to be processed that intersect with the inner bounding box are sequentially selected as target nodes, and the point index array of the target nodes is used as the target point index array.

5. The method according to claim 4, characterized in that, After sequentially selecting nodes from the target octree that intersect with the bounding box as nodes to be processed, the process further includes: Leaf nodes among the nodes to be processed that do not intersect with the inner bounding box are selected as target leaf nodes; Determine whether the coordinates of each point in the target leaf node are located inside the query entity; If so, then the target leaf node is taken as the target node, and the point index array of the target node is taken as the target point index array.

6. The method according to claim 4, characterized in that, The steps for calculating the outer and inner bounding boxes of a query entity include: When the point cloud query method is a three-dimensional space query, the outer bounding box and inner bounding box of the query entity are calculated.

7. The method according to claim 4, characterized in that, The steps for calculating the outer and inner bounding boxes of a query entity include: When the point cloud query method is screen query, obtain the screen coordinates of the outer bounding box and the inner bounding box of the query entity; Calculate the outer bounding box and inner bounding box of the queried entity based on the screen coordinates.

8. The method according to claim 1, characterized in that, The steps of filtering the points in the target node array and the target point index array by attributes to obtain target points, and obtaining the point cloud data corresponding to the target points as target data, include: Determine whether the attributes of the points in the target node array and the target point index array meet preset values; If so, the point that meets the preset value will be taken as the target point; Obtain the point cloud data corresponding to the target point as the target data, and complete the spatial and attribute query of the point cloud data.