A voxel data extraction method based on high-fidelity scenes

By voxelizing highly realistic scenes, the problem of unmanned equipment being unable to pass after a building collapse and the reliance on highly realistic models was solved, the efficiency of drone path planning and obstacle avoidance was improved, memory usage and computing costs were reduced, and the operating efficiency of the simulation system was optimized.

CN120563769BActive Publication Date: 2025-10-03NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511057838.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-10-03
Estimated Expiration
2045-07-30

AI Technical Summary

Technical Problem

The unmanned equipment in the intelligent unmanned training simulation system cannot take into account the passability of building holes after the building collapses, and over-reliance on high-realism models leads to high data calls, large memory usage, and slow operation efficiency of the simulation system.

Method used

By obtaining the triangular facets of the static mesh or skeleton of the objects in the high-realism scene, voxelization processing is performed, including projection, rasterization and voxelization of the triangular facets to form a three-dimensional space matrix, and the voxelized data of the objects is merged. Block processing and unchar storage optimization are used to reduce memory usage.

Benefits of technology

It improves the efficiency of drone path planning and obstacle avoidance, reduces computing costs and data call volume, optimizes the deduction effect, and adapts to complex and changing simulation environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120563769B_ABST
    Figure CN120563769B_ABST
Patent Text Reader

Abstract

The present invention relates to a voxel data extraction method based on a high-fidelity scene, comprising: obtaining static meshes or static skeletons of all objects in the high-fidelity scene, extracting triangular facets from the static meshes or static skeletons and storing them to form an intermediate file File1; storing three vertex position information of the triangular facets one by one in the intermediate file File1; obtaining the three vertex position information, and voxelizing the triangular facets based on a spatial coordinate system to obtain triangular facet voxelized data; selecting the static meshes or static skeletons of objects in the high-fidelity scene, and traversing each triangular facet of each static mesh or static skeleton one by one to obtain voxelized data of the objects; traversing each object in the high-fidelity scene and obtaining voxelized data of all objects in the high-fidelity scene; and merging the voxelized data of all objects in the high-fidelity scene to obtain voxel data of the high-fidelity scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data extraction method, and in particular to a voxel data extraction method based on a high-fidelity scene. Background Art

[0002] The entire intelligent unmanned training and simulation system fails to consider the issue of navigability in building holes after a building collapse when planning and avoiding obstacles for unmanned equipment. Furthermore, the intelligent unmanned training and simulation system relies too much on the call of a large number of highly realistic models, resulting in high data call volume, large data memory usage, and slow simulation system operation efficiency. The reasons for the above shortcomings are:

[0003] Traditional drone planning cannot take building holes into account to provide optimal trajectory planning, especially in confrontation simulations, where the confrontation between the red and blue sides will lead to dynamic changes in the surrounding environment such as building collapse and road damage. Traditional drone trajectory planning requires real-time mapping of the real scene for trajectory planning and obstacle avoidance processing, and mostly uses the surface of the ground for processing. It cannot consider the internal holes formed after the building collapses. In addition, the trajectory planning of drones based on a single DSM data only provides a digital surface model, without considering the spatial topological relationship between buildings. Therefore, it cannot identify internal holes in buildings. However, for small drones, building holes are passable. Therefore, if a building collapse problem occurs in a high-fidelity scene, traditional drone planning cannot take building holes into account to provide optimal trajectory planning;

[0004] The intelligent unmanned confrontation simulation system has the disadvantages of lag, easy disconnection of various equipment, and poor simulation results. Specifically, when the intelligent unmanned training simulation system plans the drone trajectory, it needs to call a large number of high-realism models, with a high frequency of data call, a large amount of data cache, and excessive memory usage, which ultimately leads to lag in the simulation system, disconnection of various equipment in the simulation system, and poor simulation results.

[0005] To address this issue, in intelligent unmanned training and simulation systems, voxelization methods based on spatial scanning, spatial segmentation, and signed distance fields are commonly used to mitigate these issues. These methods fail to account for the passage of building holes after a building collapse during path planning and obstacle avoidance, and overly rely on a large number of highly realistic models, resulting in high data usage, large data memory usage, and slow simulation system operation.

[0006] Specifically, the spatial scanning-based voxelization method is a classic voxelization method. This method systematically traverses sampling points in three-dimensional space and uses ray intersection tests with the mesh model to determine voxel positions. Its core process includes: establishing a uniform voxel grid, emitting rays in randomly directed directions at each acceleration center, counting the number of intersections between the rays and triangular faces, and determining the voxel state according to the even-odd rule. The spatial segmentation-based voxelization method uses a hierarchical data structure to adaptively partition the three-dimensional space. This method first uses the model bounding box as the root node and recursively subdivides the spatial region containing the model into eight sub-nodes until a preset accuracy is achieved or the subdivision criteria are met. Each leaf node records the positional relationship with the model surface, and finally a voxel representation is generated by traversing the tree structure. The signed distance field-based voxelization method constructs a volume representation by calculating the shortest distance from each voxel to the mesh surface, where symbols represent internal and external relationships. This method can be numerically solved using the fast marching method, approximate computation based on hierarchical spatial segmentation, and implicitly represented using neural networks.

[0007] However, these current methods have the following disadvantages:

[0008] While the principle of voxelization based on spatial scanning is relatively simple, it suffers from the following drawbacks: It suffers from imperfections in handling thin-walled structures. Specifically, when rays are nearly parallel to the surface of the model, misjudgment can easily occur due to the precision limitations of floating-point numbers. It also suffers from high computational complexity. When the algorithm's time complexity increases, and when the resolution increases dramatically, the amount of computation increases dramatically. It also suffers from low memory access rates. Traditional layer-by-layer scanning results in memory access jumps, with cache hit rates of less than 40%. It also suffers from internal filling difficulties. The basic algorithm can only determine surface intersections, and internal voxel filling requires additional steps, which can lead to filling errors in multi-connected scenarios. Furthermore, when faced with a surge in the number of triangles in highly realistic scenes, video memory bandwidth becomes a bottleneck.

[0009] Voxelization methods based on spatial segmentation have the following disadvantages: Data structure construction is expensive. The octree construction process requires frequent memory allocation and pointer operations. Building an octree with tens of millions of nodes can consume over 60% of the total processing time. Furthermore, the irregular hierarchical structure significantly increases the complexity of subsequent processing algorithms such as domain queries and morphological operations. Segmentation criteria based on geometric features are sensitive to noise, while fixed size-based segmentation loses its adaptive advantages. Finally, memory fragmentation and parallelization issues remain to be addressed.

[0010] The voxelization method based on signed distance field has low computational efficiency and occupies a large amount of memory, and cannot solve problems such as low deduction efficiency. Especially for complex boundary conditions, the amount of data to be processed will increase sharply, greatly affecting its processing efficiency. Summary of the Invention

[0011] The technical problem to be solved by the present invention is to provide a voxel data extraction method based on a highly realistic scene, in order to solve the problem that unmanned equipment in the entire intelligent unmanned training and deduction system cannot consider the passability of building holes after the building collapse when performing path planning and obstacle avoidance;

[0012] Another technical problem to be solved by the present invention is to provide a voxel data extraction method based on high-fidelity scenes to solve the problem that the intelligent unmanned training and deduction system overly relies on the call of a large number of high-fidelity models, resulting in high data call volume, large data memory usage, and slow deduction system operation efficiency;

[0013] To achieve the above-mentioned object of the invention, the present invention provides a voxel data extraction method based on a high-fidelity scene, comprising the following steps:

[0014] S1. Obtaining a static mesh or static skeleton of all objects in a high-fidelity scene, extracting triangular facets from the static mesh or the static skeleton, and storing them in an intermediate file File1; wherein the intermediate file File1 stores the position information of the three vertices of the triangular facets one by one;

[0015] S2. Obtaining position information of three vertices of the triangular face, and voxelizing the triangular face based on a spatial coordinate system to obtain triangular face voxelized data;

[0016] S3. Select a static mesh or static skeleton of a feature in the high-fidelity scene, and traverse each triangle of each static mesh or static skeleton to obtain pixelated data of the feature;

[0017] S4 traverses each feature in the high-fidelity scene and obtains pixelated data of all features in the high-fidelity scene;

[0018] S5. Merging the voxelized data of all objects in the high-fidelity scene to obtain voxel data of the high-fidelity scene.

[0019] According to one aspect of the present invention, in step S2, the step of obtaining the position information of the three vertices of the triangular facet and voxelizing the triangular facet based on a spatial coordinate system to obtain triangular facet voxelized data includes:

[0020] S21. Obtaining the position information of the three vertices of the triangular face and performing three-dimensional projection of the triangular face in a spatial coordinate system to obtain the projection range of the triangular face in each projection plane;

[0021] S22. rasterizing each of the projection ranges one by one, and constructing a three-dimensional space matrix of the triangular facet based on the rasterized projection ranges;

[0022] S23. Voxelize the triangular facet based on the three-dimensional space matrix to obtain the triangular facet voxelization data.

[0023] According to one aspect of the present invention, in step S21, the step of obtaining the position information of the three vertices of the triangular facet and performing three-dimensional projection of the triangular facet in a spatial coordinate system to obtain the projection range of the triangular facet in each projection plane includes:

[0024] S211. Assume that the triangle belongs to a spatial plane;

[0025] S212. Project the triangular facet in the spatial coordinate system and obtain three projection ranges, wherein the three projection ranges are respectively the projection triangle T1 on the XOY projection plane, the projection triangle T2 on the XOZ projection plane, and the projection triangle T3 on the YOZ projection plane;

[0026] The range of the projected triangle T1 is (sx, sy), the range of the projected triangle T2 is (sx, sz), and the range of the projected triangle T3 is (sy, sz).

[0027] According to one aspect of the present invention, in step S22, the step of rasterizing each of the projection ranges one by one and constructing the three-dimensional space matrix of the triangular facet based on the rasterized projection ranges includes:

[0028] S221. Constructing a range matrix on the XOY projection plane based on the range of the projected triangle T1;

[0029] S222. Rasterize the interior of the projected triangle T1 and obtain an intermediate file D1. The intermediate file D1 is generated by traversing all points in the range matrix and determining whether each point is within the projected triangle T1. If so, the point is marked as 1, and if not, the point is marked as 0. After the traversal is completed, the intermediate file D1 is generated.

[0030] S223. Rasterize the three sides of the projected triangle T1 and obtain an intermediate file D2. The intermediate file D2 is generated by traversing all points in the range matrix and determining whether each point intersects with the three sides of the projected triangle T1. If so, the intersecting points are marked as 1, and if not, the intersecting points are marked as 0. After the traversal is completed, the intermediate file D2 is generated.

[0031] S224. Merging the intermediate file D1 and the intermediate file D2 and storing them as an XOY projection surface grid data file H1;

[0032] S225. Extract the range of the projected triangle T2 and the range of the projected triangle T3 respectively and execute steps S221 to S224 respectively to obtain the XOZ projection surface grid data file H2 and the YOZ projection surface grid data file H3;

[0033] S226. Construct the three-dimensional space matrix of the triangular facet based on the XOY projection surface grid data file H1, the XOZ projection surface grid data file H2 and the YOZ projection surface grid data file H3.

[0034] According to one aspect of the present invention, in step S23, the step of voxelizing the triangular facet based on the three-dimensional space matrix to obtain the triangular facet voxelized data includes:

[0035] S231. Perform a preliminary screening of the grid points in the three-dimensional space matrix, wherein an empty matrix P is constructed, and each grid point Pn in the three-dimensional space matrix is ​​traversed, where n=1, 2, 3, ..., to determine whether the projection values ​​of the grid point Pn in the XOY projection surface grid data file H1, the XOZ projection surface grid data file H2, and the YOZ projection surface grid data file H3 are all 1. If they are all 1, the grid point Pn is stored in the empty matrix P. Otherwise, it is determined that the grid point Pn is not on the triangular facet. After completing the determination of all the grid points Pn, some grid points Pn that are not on the triangular facet are deleted, and a preliminary screening three-dimensional space matrix is ​​formed based on the filled empty matrix P;

[0036] S232. Voxelize all grid points Pn in the primary screening three-dimensional space matrix and obtain a first voxelized three-dimensional space matrix;

[0037] S233. Perform a depth screening on the first voxelized three-dimensional space matrix; wherein, construct an empty matrix B1, traverse each voxel point in the first voxelized three-dimensional space matrix, determine whether the voxel point is on the triangular face, and if so, store the voxel point in the empty matrix B1; otherwise, determine that the voxel point is not on the triangular face, delete some voxel points that are not on the triangular face after completing the judgment of all the voxel points, and obtain the triangular face voxelized data in the spatial coordinate system based on the filled empty matrix B1.

[0038] According to one aspect of the present invention, in step S233, the step of traversing each voxel point in the first voxelized three-dimensional space matrix and determining whether the voxel point is on the triangular facet includes:

[0039] S2331. Obtain a first interval range of x, y, and z values ​​of the intersection point corresponding to the X axis, Y axis, and Z axis of the spatial coordinate system between the voxel point and the triangular facet;

[0040] S2332. Determine whether the first interval range intersects with the projection interval range of the voxel point on the X-axis, Y-axis, and Z-axis of the spatial coordinate system. If the interval ranges on the three axes intersect, determine that the voxel point is on the triangular facet.

[0041] According to one aspect of the present invention, in step S3, the step of selecting a static mesh or static skeleton of a feature in the high-fidelity scene, and traversing each triangular facet of each static mesh or static skeleton to obtain pixelated data of the feature includes:

[0042] S31. Arbitrarily select a static mesh or static skeleton of the feature and create a feature folder corresponding to the static mesh or static skeleton of the feature;

[0043] S32. Process the triangular facets in the static mesh or static skeleton of the feature one by one, wherein each time a triangular facet is processed, the obtained triangular facet voxelized data is stored in a buffer, and the triangular facet voxelized data of each triangular facet is traversed and stored according to the coordinate size, and a triangular facet voxelized file is formed based on the triangular facet voxelized data of each triangular facet and the corresponding buffer coordinates, and written into the feature folder.

[0044] According to one aspect of the present invention, in step S4, in the step of traversing each feature in the high-fidelity scene and obtaining the feature voxelization data of all features in the high-fidelity scene, the triangular face voxelization files in each feature folder are read one by one, and the triangular face voxelization files are written one by one into the feature voxelization file to obtain the feature voxelization data of all features in the high-fidelity scene.

[0045] According to one aspect of the present invention, in step S5, the step of merging the voxelized data of all objects in the high-fidelity scene to obtain voxel data of the high-fidelity scene includes:

[0046] S51 recursively reads all files in the geomancy file and constructs a geomancy index - file list;

[0047] S52. Traverse each feature index in the file list, merge the triangle face voxelization files linked to the same feature index into one, so that the triangle face voxelization data belonging to the same feature is linked to the same feature index, and update the feature index-file list;

[0048] S53. Constructing multiple block index-file lists based on the feature index-file list; wherein one or more features are used as a voxel data block to obtain the block index-file list;

[0049] S54. For the triangular patch voxelized data of the feature contained in the voxel data block, using a point data mapping method at a preset resolution, convert the coordinates of the voxel points in the triangular patch voxelized data into voxel data block coordinates and intra-block coordinates of the voxel points within the voxel data block in a block coordinate system, and aggregate the voxel data block coordinates and intra-block coordinates of the voxel points within the voxel data block to obtain binary data with a dimensionality of 128×128×128.

[0050] S55. Re-traverse all voxel data blocks, reversely map the block coordinates with values ​​in the voxel data blocks to voxel point coordinates of the original resolution, and write the block index-file list and the reversely mapped voxel point coordinates into a text file for external calling.

[0051] According to one aspect of the present invention, in the step of summarizing the voxel data block coordinates and the intra-block coordinates of the voxel point in the voxel data block to obtain binary data of a dimension of 128×128×128, based on the unchar type and through bit operations, one data is recorded for each bit of each unchar to compress the storage space of the binary data.

[0052] According to one solution of the present invention, this solution can fully supplement and improve the environmental data resources in the intelligent unmanned training and deduction system, and provide environmental data resource support for pre-training drone path planning, obstacle avoidance, track analysis, etc.

[0053] According to one solution of the present invention, this solution can select voxels of different resolutions according to the different application requirements of drones, unmanned vehicles, etc., so that this solution has excellent adaptability and fully improves the scope of use of this solution.

[0054] According to one solution of the present invention, this solution conducts intelligent unmanned deduction and simulation training based on a highly realistic scene built with the Unreal Engine. It can discretize complex three-dimensional space to form a voxel grid to support the obstacle avoidance navigation and flight path planning of the drone, so that it can adapt to the complex and changeable deduction and simulation environment.

[0055] According to a solution of the present invention, the traditional method directly extracts voxel data based on highly realistic scenes, which will lead to a surge in computational complexity, and memory usage and computational time are difficult to control. In addition, large open areas and densely detailed areas may coexist in the scene, and the resolution of the voxels is difficult to adapt dynamically. There may be loss of details or a large amount of data redundancy. This solution reduces memory usage through block processing and unchar storage optimization, which can fully improve the operating efficiency of the deduction system.

[0056] According to one solution of the present invention, voxel data is extracted from a high-fidelity scene, enabling the storage of non-empty voxels. This significantly reduces memory usage while maximizing model characteristics. Furthermore, voxel data can be combined with level-of-detail technology to merge distant voxels into low-resolution blocks, thereby balancing the accuracy and performance of the overall model and improving the computational speed of the deduction system.

[0057] According to a solution of the present invention, this solution extracts voxel data from a highly realistic scene, which can simplify the collision detection logic of the model. It only needs to determine whether the voxel at the target location is occupied. This greatly reduces the number of single-frequency data calls in dynamically changing scenes, reduces computing costs, improves the efficiency of data calculation due to dynamic scene changes during the deduction process, and optimizes the deduction effect.

[0058] According to one solution of the present invention, this solution extracts voxel data from a highly realistic scene and can modify the properties of individual voxels, such as density and color, in real time based on the form of information stored in a regular grid of voxel data, thereby better adapting to the needs of dynamic scene changes;

[0059] According to a solution of the present invention, this solution extracts voxel data from highly realistic scenes. Based on the small memory required for the data, it can provide more efficient data resources for path planning analysis of drones and unmanned vehicles. At the same time, voxel data can detect holes formed by building collapse, providing more comprehensive data support for the path planning of drones and unmanned vehicles, solving the problems of high complexity of traditional building models, large amount of computational complexity in traditional drone and unmanned vehicle path planning, and inability to identify building holes.

[0060] According to a solution of the present invention, voxel data is extracted from a highly realistic virtual scene and updated to the environmental database in real time, supplementing and improving environmental data resources, and providing environmental data resource support for pre-training drone path planning, obstacle avoidance, track analysis, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 A diagram showing the steps of a voxel data extraction method based on a high-fidelity scene according to an embodiment of the present invention;

[0062] Figure 2A flowchart of a voxel data extraction method based on a high-fidelity scene according to an embodiment of the present invention;

[0063] Figure 3 A schematic diagram of a high-fidelity scene according to an embodiment of the present invention;

[0064] Figure 4 A schematic diagram of voxel data of a high-fidelity scene extracted by a voxel data extraction method based on a high-fidelity scene according to an embodiment of the present invention. DETAILED DESCRIPTION

[0065] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be derived from these drawings without inventive effort.

[0066] When describing the embodiments of the present invention, the orientation or positional relationship expressed by the terms "longitudinal", "transverse", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" are based on the orientation or positional relationship shown in the relevant drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the above terms should not be understood as limiting the present invention.

[0067] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The embodiments cannot be described one by one here, but the embodiments of the present invention are not limited to the following embodiments.

[0068] Combine Figure 1 and Figure 2 As shown, according to one embodiment of the present invention, a voxel data extraction method based on a high-fidelity scene of the present invention is used to obtain the static mesh or static skeleton of all objects in the high-fidelity scene, traverse each triangular facet of each static mesh or static skeleton one by one, voxelize each triangular facet and store it, and output the corresponding voxel data. In this embodiment, based on the composition structure of triangular facet → static mesh or static skeleton (single object) → high-fidelity scene, it can be seen that the basis and core of realizing the voxelization of the high-fidelity scene is to realize the voxelization of triangular facets. Furthermore, based on the voxelization of multiple triangular facets, the voxelization of a single object is realized. On this basis, traversing the objects in the entire high-fidelity scene can realize the voxelization of the entire high-fidelity scene. Therefore, the voxel data extraction method based on the high-fidelity scene of the present invention includes the following steps:

[0069] S1. Obtaining the static mesh or static skeleton of all objects in the high-fidelity scene, extracting the triangular facets in the static mesh or static skeleton and storing them in an intermediate file File1; wherein the intermediate file File1 stores the position information of the three vertices of the triangular facets one by one;

[0070] S2. Obtaining the position information of the three vertices of the triangular face, and voxelizing the triangular face based on the spatial coordinate system to obtain triangular face voxelized data;

[0071] S3 selects a static mesh or static skeleton of a feature in a high-fidelity scene, and traverses each triangle of each static mesh or static skeleton to obtain pixelated data of the feature;

[0072] S4. Traverse each feature in the high-fidelity scene and obtain the pixelated data of all features in the high-fidelity scene;

[0073] S5. Merge the voxelized data of all objects in the high-fidelity scene to obtain voxel data of the high-fidelity scene.

[0074] like Figure 3 As shown, according to one embodiment of the present invention, in step S1, the static mesh or static skeleton of all objects in the high-fidelity scene is obtained, and the triangular facets in the static mesh or static skeleton are extracted and stored to form an intermediate file File1. For the high-fidelity scene, it is composed of various objects, and the objects are represented by static mesh or static skeleton in Unreal Engine (UE, Unreal Engine), and the static mesh or static skeleton is composed of triangular facets. Therefore, the original data of the high-fidelity scene is obtained, that is, the triangular facets of all static meshes or static skeletons in the high-fidelity scene are obtained, wherein the triangular facets are the minimum rendering units of the static mesh or static skeleton. Then, the three vertex position information of the triangular facets in all static meshes or static skeletons are extracted and stored to form an intermediate file File1.

[0075] In this embodiment, Unreal Engine (UE) is a game engine platform developed by Epic Games that can be used for 3D scene construction, rendering, and other tasks. This allows the creation of highly realistic virtual environments that closely resemble the real world in terms of visual effects, physics simulation, lighting, and textures.

[0076] According to one embodiment of the present invention, in step S2, the step of obtaining the position information of three vertices of the triangular facet and voxelizing the triangular facet based on the spatial coordinate system to obtain triangular facet voxelized data includes:

[0077] S21. Obtain the position information of the three vertices of the triangle and perform three-dimensional projection of the triangle in a spatial coordinate system to obtain the projection range of the triangle in each projection plane; wherein the spatial coordinate system refers to the world coordinate system of the virtual engine; in this embodiment, it further includes:

[0078] S211. Assume that the triangle belongs to a spatial plane. In this embodiment, if the triangle belongs to a spatial plane, its equation can be expressed as: Ax + By + Cz + D = 0, where x, y, and z represent the positions of the three vertices of the triangle, and A, B, C, and D are constants, representing the corresponding parameters in the equation when the random triangle belongs to the spatial plane.

[0079] S212. Perform three-dimensional projection on the triangular face in the spatial coordinate system and obtain three projection ranges, where the three projection ranges are the projection triangle T1 on the XOY projection plane, the projection triangle T2 on the XOZ projection plane, and the projection triangle T3 on the YOZ projection plane; in this embodiment, the range of the projection triangle T1 is (sx, sy), the range of the projection triangle T2 is (sx, sz), and the range of the projection triangle T3 is (sy, sz).

[0080] S22. Rasterize each projection range one by one, and construct a three-dimensional space matrix of triangular facets based on the rasterized projection range; in this embodiment, it specifically includes:

[0081] S221. Constructing a range matrix on the XOY projection plane based on the range of the projected triangle T1. In this embodiment, a corresponding range matrix may be constructed based on the coordinate values ​​corresponding to the range (sx, sy) of the projected triangle T1 in each grid of the projected triangle T1 on the XOY projection plane.

[0082] S222. Rasterize the interior of the projected triangle T1 and obtain an intermediate file D1. This process traverses all points in the range matrix and determines whether each point is within the projected triangle T1. If so, the point is marked as 1; if not, the point is marked as 0. After the traversal is complete, the intermediate file D1 is generated.

[0083] S223. Rasterize the three sides of the projected triangle T1 and obtain an intermediate file D2. This involves traversing all points in the range matrix and determining whether each point intersects with the three sides of the projected triangle T1. If so, the intersecting points are marked as 1, and if not, the intersecting points are marked as 0. After the traversal is complete, the intermediate file D2 is generated.

[0084] S224. Merge the intermediate file D1 and the intermediate file D2 and store them as the XOY projection plane raster data file H1; in this embodiment, the intermediate file D1 and the intermediate file D2 store the raster point information of the projection triangle T1 respectively. Furthermore, the intermediate file D1 and the intermediate file D2 are merged based on the coordinates corresponding to the raster points. For example, the coordinates of the raster points in the intermediate file D1 and the intermediate file D2 satisfy the rule of x1 < x2 and y1 < y2, and the two matrices are merged into one. For this purpose, after merging the intermediate file D1 and the intermediate file D2, the XOY projection plane raster data file H1 can be obtained and represented as (gridx, gridy).

[0085] S225. Extract the ranges of the projection triangle T2 and the projection triangle T3 respectively and execute steps S221 to S224 respectively to obtain the XOZ projection plane raster data file H2 and the YOZ projection plane raster data file H3; in this embodiment, based on the extracted range of the projection triangle T2, replace the range of the projection triangle T1 in step S221 to construct a range matrix on the XOZ projection plane. On this basis, execute the subsequent steps S222 to S224 to complete the rasterization of the projection triangle T2, and thus the XOZ projection plane raster data file H2 can be obtained. Similarly, based on the extracted range of the projection triangle T3, replace the range of the projection triangle T1 in step S221 to construct a range matrix on the YOZ projection plane. On this basis, execute the subsequent steps S222 to S224 to complete the rasterization of the projection triangle T3, and thus the YOZ projection plane raster data file H3 can be obtained.

[0086] S226. Construct a three-dimensional space matrix of the triangular facets based on the XOY projection plane raster data file H1, the XOZ projection plane raster data file H2, and the YOZ projection plane raster data file H3; in this embodiment, based on the obtained XOY projection plane raster data file H1, XOZ projection plane raster data file H2, and YOZ projection plane raster data file H3, the data of each triangular facet on the three projection planes can be extracted. Thus, the area range framed by the three projection planes can be used to represent the three-dimensional space range of the corresponding triangular facet, which is the three-dimensional space matrix of the triangular facet.

[0087] S23. Voxelize the triangular facets based on the three-dimensional space matrix to obtain the voxelized data of the triangular facets; in this embodiment, it specifically includes:

[0088] S231. Perform a preliminary screening of the grid points in the three-dimensional space matrix, wherein an empty matrix P is constructed, and each grid point Pn in the three-dimensional space matrix is ​​traversed, where n=1, 2, 3, ..., to determine whether the projection values ​​of the grid point Pn in the XOY projection surface grid data file H1, the XOZ projection surface grid data file H2, and the YOZ projection surface grid data file H3 are all 1. If they are all 1, the grid point Pn is stored in the empty matrix P. Otherwise, it is determined that the grid point Pn is not on the triangle face. After completing the judgment of all grid points Pn, some grid points Pn that are not on the triangle face are deleted, and a preliminary screening three-dimensional space matrix is ​​formed based on the filled empty matrix P. Based on the above preliminary screening, it can screen out most of the grid points that are not on the triangle face, but if all grid points that are not on the triangle face are to be traversed and screened, steps S232 to S233 need to be further executed.

[0089] S232. Voxelize all grid points Pn in the initial screening three-dimensional space matrix and obtain a first voxelized three-dimensional space matrix; in this embodiment, voxel is the smallest volume unit in three-dimensional space, and is the three-dimensional extension of two-dimensional pixels. A three-dimensional model or scene can be formed through regular speed-up arrangement. For this purpose, corresponding voxelization processing can be achieved based on the rasterization of triangular facets.

[0090] S233. Perform a deep screening on the first voxelized three-dimensional space matrix; wherein, an empty matrix B1 is constructed, each voxel point in the first voxelized three-dimensional space matrix is ​​traversed, and it is determined whether the voxel point is on the triangle face. If so, the voxel point is stored in the empty matrix B1; otherwise, it is determined that the voxel point is not on the triangle face. After completing the judgment of all voxel points, some voxel points that are not on the triangle face are deleted, and the triangle face voxelized data in the spatial coordinate system is obtained based on the filled empty matrix B1. In this embodiment, it specifically includes:

[0091] S2331. Obtain a first interval range of x, y, and z values ​​of the intersection point between the voxel point and the triangle facet on the X, Y, and Z axes of the spatial coordinate system. Based on this, it is possible to determine whether the value range of the intersection point of the voxel point with the triangle facet on each axis is within the coordinate interval of the voxel point on that axis, that is, to determine whether a certain voxel point is on the triangle facet;

[0092] S2332. Determine whether the first interval range intersects with the projection interval range of the voxel point on the X-axis, Y-axis, and Z-axis of the spatial coordinate system. If the interval ranges of the three axes intersect, then the voxel point is determined to be on the triangle patch. Otherwise, the voxel point is not on the triangle patch and is deleted.

[0093] According to one embodiment of the present invention, in step S3, the step of selecting a static mesh or static skeleton of a feature in a high-fidelity scene, and traversing each triangular facet of each static mesh or static skeleton to obtain pixelated data of the feature includes:

[0094] S31. Randomly select a static mesh or static skeleton of a feature, and create a feature folder corresponding to the static mesh or static skeleton of the feature; in this embodiment, the selected feature can be named a, and then a feature folder outdir / a with the same name as the feature is created.

[0095] S32. Process the triangular facets in the static mesh or static skeleton of the terrain one by one, wherein each time a triangular facet is processed, the obtained triangular facet voxelized data is stored in the buffer, and the triangular facet voxelized data of each triangular facet is traversed and stored according to the coordinate size, and a triangular facet voxelized file is formed based on the triangular facet voxelized data of each triangular facet and the corresponding buffer coordinates, and written into the terrain folder. In this embodiment, the setting of the buffer can control the size of each storage file, and then only the voxelized data of the triangular facet is stored each time and can be stored in the next buffer after storing one buffer. Specifically, the buffer size can be set to 256*256*256, so that the buffer is quickly sorted when the buffer is full, wherein the sorting rule is implemented according to the coordinate size, such as the sorting rule is z1 <z2&&y1<y2&&x1<x2。

[0096] In this embodiment, when all the triangles are traversed, files corresponding to the triangles can be written into the feature folder outdir / a. In this embodiment, the files corresponding to the triangles in the feature folder outdir / a are json files and can be named Dira.

[0097] According to one embodiment of the present invention, in step S4, during the step of traversing each feature in the high-fidelity scene and obtaining the geomembrane data for all features in the high-fidelity scene, the triangle face voxelization files in each feature folder are read one by one, and the triangle face voxelization files are written one by one into the geomembrane file to obtain the geomembrane data for all features in the high-fidelity scene. In this embodiment, the resulting geomembrane file may be named Dirb.

[0098] According to one embodiment of the present invention, in step S5, the step of merging the voxelized data of all objects in the high-fidelity scene to obtain voxel data of the high-fidelity scene includes:

[0099] S51. Recursively read all files in the terrain pixelation file and build a terrain index-file list;

[0100] S52. Traverse each feature index in the file list, merge the triangle face voxelization files linked to the same feature index into one, so that the triangle face voxelization data belonging to the same feature is linked to the same feature index, and update the feature index-file list;

[0101] S53. Constructing multiple block indexes based on the feature index - file list - file list; wherein one or more features are used as a voxel data block to obtain a block index - file list;

[0102] S54. For the triangular facet voxelized data of the feature contained in the voxel data block, a point data mapping method is used to convert the coordinates of the voxel points in the triangular facet voxelized data into voxel data block coordinates in a block coordinate system and the intra-block coordinates of the voxel points in the voxel data block at a preset resolution, and the voxel data block coordinates and the intra-block coordinates of the voxel points in the voxel data block are aggregated to obtain binary data of 128×128×128 dimensions; thereby, each voxel data block can be saved based on 2M binary data; in this embodiment, in the process of converting the coordinates of the voxel points in the triangular facet voxelized data into voxel data block coordinates in a block coordinate system and the intra-block coordinates of the voxel points in the voxel data block at a preset resolution using the point data mapping method, it is assumed that the voxel point P1 (x a ,y a ,z a ), based on the given preset resolution S and in the local coordinate system of the preset resolution S, the voxel point P1 (x a ,y a ,z a ) is mapped to the local coordinate system of the preset resolution S and is the point P2 (x b ,y b ,z b ), further based on the obtained point P2 (x b ,y b ,z b ) is mapped to the block coordinate system using the point data mapping method to obtain the voxel data block coordinate P3 (x c ,y c ,z c ) and the voxel point's block coordinates P4 (x d ,y d ,z d ).

[0103] S55. Re-traverse all voxel data blocks, reversely map the intra-block coordinates with values ​​in the voxel data blocks to voxel point coordinates of the original resolution, and write the block index-file list and the reversely mapped voxel point coordinates into a text file for external calling.

[0104] According to one embodiment of the present invention, in the step of aggregating the voxel data block coordinates and the intra-block coordinates of the voxel points in the voxel data block to obtain binary data of a dimension of 128×128×128, a data is recorded for each bit of each unchar based on the unchar type and through bit operations to compress the storage space of the binary data. In this embodiment, an unchar has 8 bits, and in the previous process, only one data can be recorded, indicating whether it is 0 or 1 in the block. It is optimized through bit operations so that each bit can record one data. By compressing and optimizing the binary data, the amount of data can be reduced, and each voxel data block can achieve 256KB of space for storage, thereby optimizing storage and reducing storage space occupancy. Thus, the extracted voxel data of the highly realistic scene is as follows: Figure 4 shown.

[0105] Intelligent unmanned training and simulation system: This system designs training content based on typical urban scenario requirements. It utilizes digital simulation technology, virtual reality technology, analysis and evaluation technology, and related equipment, along with simulators and real equipment, to create a virtual-reality intelligent unmanned test and training environment. This system conducts unmanned test training based on scenarios, enabling the generation and simulation of test scenarios, intelligent unmanned testing, and intelligent unmanned test evaluation. It supports unmanned testing based on urban confrontation scenarios, providing a virtual-reality testing and verification support platform for unmanned concept design, unmanned unit operation, mixed manned / unmanned equipment formations, and unmanned strategy exploration.

[0106] The above contents are merely examples of specific solutions of the present invention. For devices and structures not described in detail, it should be understood that they can be implemented by adopting general devices and methods available in the art.

[0107] The above description is merely one embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that the present invention is susceptible to various modifications and variations. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A voxel data extraction method based on a high-fidelity scene, characterized in that: The following steps are involved: S1. Obtaining a static mesh or static skeleton of all objects in a high-fidelity scene, extracting triangular facets from the static mesh or the static skeleton, and storing them in an intermediate file File1; wherein the intermediate file File1 stores the position information of the three vertices of the triangular facets one by one; S2. Obtaining position information of three vertices of the triangular face, and voxelizing the triangular face based on a spatial coordinate system to obtain triangular face voxelized data; S3. Select a static mesh or static skeleton of a feature in the high-fidelity scene, and traverse each triangle of each static mesh or static skeleton to obtain pixelated data of the feature; S4 traverses each feature in the high-fidelity scene and obtains pixelated data of all features in the high-fidelity scene; S5. Merging the voxelized data of all objects in the high-fidelity scene to obtain voxel data of the high-fidelity scene; wherein, the step includes: S51. Recursively read all files in the geo-object voxelization file of the geo-object voxelization data and build a geo-object index - file list: S52. Traverse each feature index in the file list, merge the triangle face voxelization files linked to the same feature index into one, so that the triangle face voxelization data belonging to the same feature is linked to the same feature index, and update the feature index-file list; S53. Constructing a plurality of block index-file lists based on the feature index-file list: wherein one or more features are used as a voxel data block to obtain the block index-file list; S54. For the triangular patch voxelized data of the feature contained in the voxel data block, using a point data mapping method at a preset resolution, convert the coordinates of the voxel points in the triangular patch voxelized data into voxel data block coordinates and intra-block coordinates of the voxel points within the voxel data block in a block coordinate system, and aggregate the voxel data block coordinates and intra-block coordinates of the voxel points within the voxel data block to obtain binary data with a dimensionality of 128×128×128. S55. Re-traverse all voxel data blocks, reversely map the block coordinates with values ​​in the voxel data blocks to voxel point coordinates of the original resolution, and write the block index-file list and the reversely mapped voxel point coordinates into a text file for external calling.

2. The voxel data extraction method based on a high-fidelity scene according to claim 1, characterized in that: In step S2, the step of obtaining the position information of the three vertices of the triangular facet and voxelizing the triangular facet based on a spatial coordinate system to obtain triangular facet voxelized data includes: S21. Obtaining the position information of the three vertices of the triangular face and performing three-dimensional projection of the triangular face in a spatial coordinate system to obtain the projection range of the triangular face in each projection plane; S22. rasterizing each of the projection ranges one by one, and constructing a three-dimensional space matrix of the triangular facet based on the rasterized projection ranges; S23. Voxelize the triangular facet based on the three-dimensional space matrix to obtain the triangular facet voxelization data.

3. The voxel data extraction method based on a high-fidelity scene according to claim 2, characterized in that: In step S21, the step of obtaining the position information of the three vertices of the triangular facet and performing three-dimensional projection of the triangular facet in a spatial coordinate system to obtain the projection range of the triangular facet in each projection surface includes: S211. Assume that the triangle belongs to a spatial plane; S212. Project the triangular facet in the spatial coordinate system and obtain three projection ranges, wherein the three projection ranges are respectively the projection triangle T1 on the XOY projection plane, the projection triangle T2 on the XOZ projection plane, and the projection triangle T3 on the YOZ projection plane; The range of the projected triangle T1 is (sx, sy), the range of the projected triangle T2 is (sx, sz), and the range of the projected triangle T3 is (sy, sz).

4. The voxel data extraction method based on a high-fidelity scene according to claim 3, characterized in that: In step S22, the steps of rasterizing each of the projection ranges one by one and constructing a three-dimensional space matrix of the triangular facet based on the rasterized projection ranges include: S221. Constructing a range matrix on the XOY projection plane based on the range of the projected triangle T1; S222. Rasterize the interior of the projected triangle T1 and obtain an intermediate file D1. The intermediate file D1 is generated by traversing all points in the range matrix and determining whether each point is within the projected triangle T1. If so, the point is marked as 1, and if not, the point is marked as 0. After the traversal is completed, the intermediate file D1 is generated. S223. Rasterize the three sides of the projected triangle T1 and obtain an intermediate file D2. The intermediate file D2 is generated by traversing all points in the range matrix and determining whether each point intersects with the three sides of the projected triangle T1. If so, the intersecting points are marked as 1, and if not, the intersecting points are marked as 0. After the traversal is completed, the intermediate file D2 is generated. S224. Merging the intermediate file D1 and the intermediate file D2 and storing them as an XOY projection surface grid data file H1; S225. Extract the range of the projected triangle T2 and the range of the projected triangle T3 respectively and execute steps S221 to S224 respectively to obtain the XOZ projection surface grid data file H2 and the YOZ projection surface grid data file H3; S226. Construct the three-dimensional space matrix of the triangular facet based on the XOY projection surface grid data file H1, the XOZ projection surface grid data file H2 and the YOZ projection surface grid data file H3.

5. The voxel data extraction method based on a high-fidelity scene according to claim 4, characterized in that: In step S23, the step of voxelizing the triangular facet based on the three-dimensional space matrix to obtain the triangular facet voxelized data includes: S231. Perform a preliminary screening of the grid points in the three-dimensional space matrix, wherein an empty matrix P is constructed, and each grid point Pn in the three-dimensional space matrix is ​​traversed, where n=1, 2, 3, ..., to determine whether the projection values ​​of the grid point Pn in the XOY projection surface grid data file H1, the XOZ projection surface grid data file H2, and the YOZ projection surface grid data file H3 are all 1. If they are all 1, the grid point Pn is stored in the empty matrix P. Otherwise, it is determined that the grid point Pn is not on the triangular facet. After completing the determination of all the grid points Pn, some grid points Pn that are not on the triangular facet are deleted, and a preliminary screening three-dimensional space matrix is ​​formed based on the filled empty matrix P; S232. Voxelize all grid points Pn in the primary screening three-dimensional space matrix and obtain a first voxelized three-dimensional space matrix; S233. Perform a depth screening on the first voxelized three-dimensional space matrix; wherein, construct an empty matrix B1, traverse each voxel point in the first voxelized three-dimensional space matrix, determine whether the voxel point is on the triangular face, and if so, store the voxel point in the empty matrix B1; otherwise, determine that the voxel point is not on the triangular face, delete some voxel points that are not on the triangular face after completing the judgment of all the voxel points, and obtain the triangular face voxelized data in the spatial coordinate system based on the filled empty matrix B1.

6. The voxel data extraction method based on a high-fidelity scene according to claim 5, characterized in that: In step S233, the step of traversing each voxel point in the first voxelized three-dimensional space matrix and determining whether the voxel point is on the triangular facet includes: S2331. Obtain a first interval range of x, y, and z values ​​of the intersection point corresponding to the X axis, Y axis, and Z axis of the spatial coordinate system between the voxel point and the triangular facet; S2332. Determine whether the first interval range intersects with the projection interval range of the voxel point on the X-axis, Y-axis, and Z-axis of the spatial coordinate system. If the interval ranges on the three axes intersect, determine that the voxel point is on the triangular facet.

7. The voxel data extraction method based on a high-fidelity scene according to claim 6, characterized in that: In step S3, the step of selecting a static mesh or static skeleton of a feature in the high-fidelity scene, and traversing each triangular facet of each static mesh or static skeleton to obtain pixelated data of the feature includes: S31. Arbitrarily select a static mesh or static skeleton of the feature and create a feature folder corresponding to the static mesh or static skeleton of the feature; S32. Process the triangular facets in the static mesh or static skeleton of the feature one by one, wherein each time a triangular facet is processed, the obtained triangular facet voxelized data is stored in a buffer, and the triangular facet voxelized data of each triangular facet is traversed and stored according to the coordinate size, and a triangular facet voxelized file is formed based on the triangular facet voxelized data of each triangular facet and the corresponding buffer coordinates, and written into the feature folder.

8. The voxel data extraction method based on a high-fidelity scene according to claim 7, characterized in that: In step S4, in the step of traversing each feature in the high-fidelity scene and obtaining the feature voxelization data of all features in the high-fidelity scene, the triangular face voxelization files in each feature folder are read one by one, and the triangular face voxelization files are written one by one into the feature voxelization file to obtain the feature voxelization data of all features in the high-fidelity scene.

9. The voxel data extraction method based on a high-fidelity scene according to claim 1, characterized in that: In the step of summarizing the voxel data block coordinates and the intra-block coordinates of the voxel point in the voxel data block to obtain binary data of a dimension of 128×128×128, one data is recorded for each bit of each unchar based on the unchar type and through bit operations to compress the storage space of the binary data.

Citation Information

Patent Citations

  • Multi-view three-dimensional point cloud classification method based on dynamic and static convolutional fusion neural network

    CN114998638A

  • Vector data extraction method and device based on high-fidelity scene, equipment and medium

    CN119784976A