Occupied grid data processing method and device, equipment, medium and program product

By building an axial alignment enclosure box in a virtual environment and cutting and eliminating it, the problem of time-consuming calculation of voxel occupancy data in the virtual environment is solved, and a more efficient calculation process is achieved.

CN119203287AInactive Publication Date: 2024-12-27BEIJING INSTITUTE FOR GENERAL ARTIFICIAL INTELLIGENCE
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411699085.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, when calculating the environmental voxel occupancy data of the specified location and orientation in the virtual environment in a virtual environment, there are a large number of invalid calculations and repeated calculations, which makes the calculation extremely time-consuming.

Method used

By obtaining the geometric shape data of three-dimensional objects, axial alignment enclosure box is constructed, and the spatial voxel occupation data is calculated under the local coordinate system, surface removal and line removal are performed, data that is not within the occupied voxel range are cut, and voxel occupation is segmented The data is sub-data for independent calculation.

Benefits of technology

It effectively avoids invalid calculations and repeated calculations, improves calculation efficiency and reduces calculation time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119203287A_ABST
    Figure CN119203287A_ABST
Patent Text Reader

Abstract

The invention provides an occupied grid data processing method, device and equipment, a medium and a program product. The occupied grid data processing method comprises the steps of obtaining an axis alignment bounding box of a three-dimensional object in a local coordinate system based on obtained geometrical shape data of the three-dimensional object in a virtual environment; and obtaining space voxel occupation data corresponding to the three-dimensional object based on the axis alignment bounding box. The corresponding space voxel occupancy data are obtained through the axis alignment bounding box, so that data except the obtained space voxel occupancy data are cut and removed, invalid calculation and repeated calculation are avoided, and the purpose of improving the calculation efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of virtual space technology, and in particular relates to an occupancy grid data processing method, device, equipment, medium and program product. Background Art

[0002] In many application scenarios of virtual humans, virtual characters need to perceive the voxel occupancy data of the surrounding environment in real time as an important input for other computing tasks. Virtual environment computing requires real-time calculation of the environmental voxel occupancy data of the specified position and orientation in the virtual environment, and requires the highest possible computing efficiency.

[0003] During the implementation process, the inventors found that the calculation process of the existing technology requires traversing the voxel sampling points in the three-dimensional space and determining whether the point is within the geometric shape of a certain object. There are a large number of invalid calculations and repeated calculations, which makes the calculations extremely time-consuming. Summary of the invention

[0004] In view of the problems existing in the prior art, the present invention provides an occupancy grid data processing method, device, equipment, medium and program product, which at least partially solve the problem of extremely time-consuming calculation in the prior art.

[0005] In a first aspect, an embodiment of the present disclosure provides an occupancy grid data processing method, comprising: Obtaining an axis-aligned bounding box of the three-dimensional object in a local coordinate system based on the acquired geometric shape data of the three-dimensional object in the virtual environment; Based on the axis-aligned bounding box, spatial voxel occupancy data corresponding to the three-dimensional object is obtained.

[0006] Optionally, obtaining spatial voxel occupancy data corresponding to the three-dimensional object based on the axis-aligned bounding box includes: It is determined whether the axis-aligned bounding box of the three-dimensional object in the world coordinate system intersects with the occupied voxel range box of the spatial voxel occupancy data, and if so, a face culling calculation is performed.

[0007] Optionally, the face culling calculation includes, The geometric shape data of the three-dimensional object is transformed into a voxel space coordinate system, and X_min and X_max in the X-axis direction of the voxel space coordinate system are calculated, where X_min and X_max are the minimum and maximum X coordinates of all points of the geometric shape in the voxel space coordinate system, respectively, and the X coordinates are within the range of occupied voxels.

[0008] Optionally, the axis-aligned bounding box obtains spatial voxel occupancy data corresponding to the three-dimensional object, further comprising: In the range of [X_min, X_max], the X axis is sampled according to the set first spacing, the intersection line segments of the triangular faces of the three-dimensional object geometric shape and the plane x=X are calculated, and the maximum Y value Y_max and the minimum Y value Y_min of all the intersection line segment endpoints are calculated.

[0009] Optionally, the axis-aligned bounding box obtains spatial voxel occupancy data corresponding to the three-dimensional object, further comprising: In the range [Y_min, Y_max], sample the Y axis according to the set second spacing, calculate the intersection points Z_min and Z_max of the object geometry and the straight line x=X, y=Y, and set the voxel occupancy value that meets the conditions to 1; the conditions are x=X, y=Y, Z_min< z <Z_max。

[0010] Optionally, obtaining the spatial voxel occupancy data corresponding to the three-dimensional object based on the axis-aligned bounding box includes: The voxel occupancy data is divided into voxel occupancy sub-data, and an independent computing unit is assigned to each voxel occupancy sub-data for calculation.

[0011] In a second aspect, an embodiment of the present disclosure further provides an occupancy grid data processing device, comprising: a bounding box module, configured to obtain an axis-aligned bounding box of the three-dimensional object in a local coordinate system based on the acquired geometric shape data of the three-dimensional object in the virtual environment; A voxel occupancy module is used to obtain spatial voxel occupancy data corresponding to the three-dimensional object based on the axis-aligned bounding box.

[0012] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the occupancy grid data processing method described in any one of the first aspects.

[0013] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the occupancy grid data processing methods described in the first aspect.

[0014] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements any of the occupied grid data processing methods described in the first aspect.

[0015] The present invention provides an occupied grid data processing method, device, equipment, medium and program product, wherein the occupied grid data processing method obtains corresponding spatial voxel occupancy data through an axis-aligned bounding box, thereby clipping and eliminating data outside the obtained spatial voxel occupancy data, avoiding invalid calculations and repeated calculations, thereby achieving the purpose of improving calculation efficiency.

[0016] The voxel occupancy data is divided into voxel occupancy sub-data, and an independent calculation unit is allocated to each voxel occupancy sub-data, so as to further improve the calculation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present disclosure.

[0018] Figure 1 A flowchart of an occupancy grid data processing method provided by an embodiment of the present disclosure; Figure 2 A principle block diagram of an occupancy grid data processing device provided by an embodiment of the present disclosure; Figure 3 A functional block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0019] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0020] It should be clear that the following embodiments of the present disclosure are described by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0021] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0022] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The illustrations only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0023] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0024] A local coordinate system is a coordinate system of an object or object itself, usually centered on the object's origin. An object's local coordinate system is relative to that object, so it moves, rotates, or scales with the object. In a local coordinate system, the position of an object is usually represented as (0,0,0), and all other points are described relative to the origin. Local coordinate systems are often used to define the shape and internal structure of an object. For example, a character model's local coordinate system might be used to describe the relative positions of its arms, legs, head, and so on.

[0025] The world coordinate system is a global coordinate system used to describe the position and orientation of all objects in the scene. The local coordinate systems of all objects are ultimately mapped to the world coordinate system. The world coordinate system is a fixed coordinate system, usually with a certain point in the scene as the origin. In the world coordinate system, the positions of all objects are described relative to the global origin, so their positions are unique throughout the scene.

[0026] In computer graphics, local coordinate systems are used to describe the internal structure and shape of objects, while world coordinate systems are used to describe the position of objects in a scene and their interaction with other objects. Typically, the transformation between an object's local coordinate system and the world coordinate system involves translation, rotation, and scaling operations in order to correctly place and render the object.

[0027] A "box" is usually a rectangle (in two dimensions) or a cube (in three dimensions).

[0028] In fact, the graphics that enclose the shape may use polygons (convex hull, concave hull) or circles or others in some cases. It is not limited to rectangles and can also be called a "bounding volume".

[0029] The role of the bounding box: A highly efficient solution for determining whether two graphics collide, at the expense of reduced precision. Even if accurate collision determination is required, the bounding box can be used to find out in advance that the graphics are unlikely to intersect, thus avoiding subsequent expensive calculations. On the graphical interface, the bounding box of the graphics is drawn to let the user know that the graphics have been successfully picked up. Graphics that are not in the viewport are eliminated to avoid unnecessary rendering.

[0030] The axis-aligned bounding box is the earliest widely used bounding box. It is a minimum hexahedron with each face parallel to the coordinate axis. The axis-aligned bounding box is simple in structure and occupies a small space, but its compactness is poor. For irregular geometric bodies, there may be a lot of redundant space. Moreover, when the object rotates, the axis-aligned bounding box cannot adapt to its rotation. It is suitable for processing rigid, convex objects.

[0031] Voxel is the abbreviation of Volume Pixel. A volume containing voxels can be expressed by stereo rendering or extracting polygonal isosurfaces with given threshold contours. It is the smallest unit of digital data in three-dimensional space segmentation. Voxels are used in three-dimensional imaging, scientific data, medical imaging and other fields.

[0032] The voxel occupancy subrange refers to the area occupied by a voxel in three-dimensional space. Voxel is the smallest unit that makes up volume data, which is equivalent to a pixel in two-dimensional space, but is used in three-dimensional space. Each voxel represents the value of a certain part of the three-dimensional space in the data, and has a relative position but no absolute spatial position.

[0033] Each voxel occupies a small cubic area in three-dimensional space and can store information such as material, color, density, etc.

[0034] The advantages and disadvantages of voxel technology are as follows: Advantages: High flexibility: Voxels can represent complex geometric shapes and details, suitable for simulation of dynamic changes and complex scenes. High computational efficiency: Voxelization can simplify the calculation process and is suitable for large-scale data processing.

[0035] Disadvantages: Limited visual effects: Compared with polygonal rendering, voxel technology may not be as visually detailed as polygonal technology. High computing resource requirements: Voxel technology has high requirements for computing and storage resources, especially in the case of high resolution and large-scale data.

[0036] In summary, the voxel occupancy subrange refers to the area occupied by a voxel in three-dimensional space, which is flexible and computationally efficient, but has certain limitations in terms of visual effects and resource requirements.

[0037] Occupancy voxels is a three-dimensional representation method that divides the environment or object into a series of cubes (called voxels) and assigns a value to each voxel to indicate whether the voxel is occupied by an object. This representation can be a binary representation of 0 / 1 or a probability value between [0, 1] to indicate whether the voxel is occupied.

[0038] Occupancy voxels can provide richer geometric information and more accurately describe the location and shape of objects, especially for suspended objects and objects of unknown categories.

[0039] Application scenarios of occupied voxels Occupancy voxels are widely used in autonomous driving, robot navigation, and 3D reconstruction. For example, in autonomous driving, occupancy voxels can help vehicles better understand their surroundings, detect obstacles, and plan paths. In robot navigation, occupancy voxels can be used to build environmental maps to help robots avoid obstacles and plan paths. In 3D reconstruction, occupancy voxels can be used to reconstruct the 3D model of an object.

[0040] There is a significant difference between the occupancy voxel and the BEV algorithm in terms of representation. The BEV algorithm converts data from different sensors (such as cameras, lidar, etc.) into a unified representation of the bird's-eye view directly above the vehicle, while the occupancy voxel divides the environment into a series of cubes and assigns an occupancy state to each cube. The BEV algorithm focuses more on environmental perception and tracking, while the occupancy voxel focuses more on the representation of geometric information and the precise description of objects.

[0041] The application of occupancy voxel data processing methods in virtual reality is very extensive, mainly including the following aspects: 3D terrain modeling: In the construction of virtual geographic environments, voxel models can better express the volume data and geological properties of terrain. For complex terrains such as caves, arch bridges and protrusions, voxel-based models can be more effectively modeled and expressed. In addition, voxel models are also widely used in simulating natural phenomena such as smoke and clouds, because they can better represent the interaction between spatial particles.

[0042] Natural Phenomenon Simulation: Voxel models excel in simulating natural phenomena such as smoke, clouds, etc. They can realistically simulate natural phenomena through voxel grid sampling and octree space subdivision, while maintaining high memory usage and rendering efficiency.

[0043] 3D reconstruction technology: In the field of computer vision and graphics, voxel-based 3D reconstruction technology is widely used in virtual reality, augmented reality, game design, film production and other fields. By reconstructing real or fictional scenes in 3D, realistic game images and special effects can be created, providing users with an immersive interactive experience.

[0044] Medical image processing: In the medical field, voxel-based 3D reconstruction technology is used in medical image processing. By reconstructing medical image data in 3D, the internal structure of the human body can be displayed more intuitively, providing doctors with more accurate diagnostic basis.

[0045] Game design and entertainment industry: Game design and entertainment industry is also one of the application areas of voxel-based 3D reconstruction technology. Through 3D reconstruction of real scenes or fictional scenes, realistic game graphics and special effects can be designed to enhance the immersion and realism of the game.

[0046] Virtual reality and augmented reality: Voxel-based 3D reconstruction technology is also widely used in the fields of virtual reality and augmented reality. By scanning real scenes or building 3D models of virtual scenes, users can be provided with a more immersive interactive experience.

[0047] Digital twin: Digital twin technology creates a dynamic twin in virtual space based on real-world objects, and uses sensors to map the running status and external environment data of the entity to the digital twin in real time. In the metaverse, voxel modeling can create an environment that is infinitely close to the laws of the real universe, providing a rich and realistic experience.

[0048] Solid voxelization and real-time rendering of 3D mesh models: In computer graphics, 3D mesh models can be converted into voxel representations through the voxelization process for real-time rendering and visualization. This method uses GPU acceleration to calculate the intersection of light and voxels during the rendering process, improving rendering efficiency.

[0049] These applications demonstrate the diversity and importance of occupancy grid data processing methods in virtual reality, and they provide powerful technical support for the construction and interaction of virtual environments.

[0050] Voxel technology improves visual effects in virtual environments mainly in the following aspects: Detailed display: By increasing the resolution of voxel data, a more detailed three-dimensional space can be displayed. For example, from one voxel per cubic meter to one voxel per centimeter, the virtual environment world is more detailed. However, this also brings a significant increase in storage capacity.

[0051] Destruction and construction: The simple and uniform structure of voxel data makes the virtual environment easily modifiable, allowing users to build or destroy objects in the virtual environment. This user-generated content (UGC) feature makes the virtual environment world more dynamic and interactive.

[0052] Art style: Voxel technology can create a unique visual style. Although this style is angular, the jagged effect can be reduced through art design to provide a unique visual experience.

[0053] Dynamic lighting and shadows: Voxel terrain can support advanced rendering technologies such as dynamic lighting, shadows, and physical effects, making the virtual environment world more realistic and vivid.

[0054] Physics simulation: The physical interaction between voxel terrain and characters in the virtual environment, such as explosions and collapse, enhances the realism and fun of the virtual environment.

[0055] Seamless terrain connection: Using the Transvoxel algorithm, seamless connection can be achieved between different terrains, avoiding the "staircase effect" common in traditional voxel terrain.

[0056] High-performance rendering: Modern game engines such as Unreal Engine 4 provide powerful toolsets and support, making it easier for developers to implement complex voxel terrain systems and maintain a stable frame rate.

[0057] Real-time generation and updating: Voxel terrain can be generated and updated in real time, and users can modify the terrain instantly in the virtual environment and see the results immediately.

[0058] Custom shaders: To further enhance the performance of voxel terrain, developers can develop a series of custom shaders to adjust the rendering effect according to the different materials and lighting conditions of the terrain.

[0059] Through these applications, voxel technology not only improves the visual effects in the virtual world, but also increases the interactivity and realism of the virtual environment, providing users with a richer and more immersive experience.

[0060] The key algorithms of voxel modeling technology include voxelization algorithms, which can convert 3D objects into voxel representations for subsequent editing and rendering operations. In addition, deep learning technology is also applied to 3D reconstruction, by training deep neural networks to recover the depth information of 3D scenes from single or multiple images.

[0061] In recent research progress, VoxFormer is a vision-based 3D semantic scene completion solution that uses Deformable Attention to predict voxel occupancy and category information in 3D space from image data. VoxFormer is a two-stage framework. The first stage predicts the depth value of each pixel and projects the pixel into 3D space to generate sparse voxel features; the second stage uses cross-attention to query the fused features from 3D voxel query to 2D image, predict those unoccupied grids, and complete the complete voxel features. This technology can predict complete 3D geometry and semantic information from 2D images alone without relying on point cloud data.

[0062] Voxel mapping in a virtual environment is usually achieved by following these steps: Voxelization process: First, the object in the 3D space needs to be converted into a 3D voxel grid through the voxelization process. This process can be done by various algorithms, for example, point cloud-based, grid-based, etc. In point cloud-based voxelization, if at least one point of the point cloud is within the voxel, the voxel is occupied, and the color of the voxel can be the average of all points within the voxel. In grid-based voxelization, all voxels that intersect with a triangle are set to 1, and all other voxels are set to 0.

[0063] Data storage: Voxel data is usually stored in the form of a three-dimensional array, where each array element represents a voxel and its value indicates whether the voxel is occupied.

[0064] Path planning applications: In path planning, agents can use voxel mapping data to plan paths and avoid collisions with occupied voxels. For example, in Multi-Agent Path Finding (MAPF), agents can use voxel mapping to avoid collisions with other agents or objects.

[0065] Environmental modeling: Voxel mapping can also be used to construct virtual geographic environments by simulating three-dimensional terrain and natural phenomena, as well as conducting spatial analysis based on geographic environments.

[0066] Semantic understanding: In some advanced applications, voxel maps contain not only spatial occupancy information, but may also contain semantic information and velocity information, etc., to enable more complex scene understanding and decision-making.

[0067] Dataset Construction: To evaluate and train path planning algorithms, a dataset containing maps of varying sizes, layouts, and difficulty can be constructed.

[0068] Real-time applications: Some research focuses on optimizing the efficiency of voxel mapping to make it suitable for real-time applications, for example by leveraging a combination of hash table-based encoding and efficient GPU computation to reduce training time.

[0069] Through these steps, voxel mapping in the virtual environment can achieve accurate representation of the space and effective path planning of the agent.

[0070] This implementation is used to calculate the voxel occupancy data of the environmental space in a virtual environment. For example, when there are objects such as tables and chairs in the virtual environment, it is necessary to avoid the tables and chairs when planning an action path. Therefore, by obtaining the corresponding voxel occupancy data of the tables and chairs, only the corresponding voxel occupancy data of the tables and chairs need to be calculated in the subsequent path calculation, and the data other than the corresponding voxel occupancy data of the tables and chairs are clipped and eliminated, thereby reducing the amount of data involved in the calculation and avoiding invalid calculations and repeated calculations.

[0071] For ease of understanding, Figure 1 As shown, this embodiment discloses a method for processing occupancy grid data, including: Step S101: obtaining an axis-aligned bounding box of the three-dimensional object in a local coordinate system based on the acquired geometric shape data of the three-dimensional object in the virtual environment; Step S102: obtaining spatial voxel occupancy data corresponding to the three-dimensional object based on the axis-aligned bounding box.

[0072] Based on the axis-aligned bounding box, spatial voxel occupancy data corresponding to the three-dimensional object is obtained, including: It is determined whether the axis-aligned bounding box of the three-dimensional object in the world coordinate system intersects with the occupied voxel range box, and if so, a face culling calculation is performed.

[0073] The face culling calculation includes, The geometric shape data of the three-dimensional object is transformed into a voxel space coordinate system, and X_min and X_max in the X-axis direction of the voxel space coordinate system are calculated, where X_min and X_max are the minimum and maximum X coordinates of all points of the geometric shape in the voxel space coordinate system, respectively, and the X coordinates are within the range of occupied voxels.

[0074] The axis-aligned bounding box obtains spatial voxel occupancy data corresponding to the three-dimensional object, and also includes: In the range [X_min, X_max], the X axis is sampled according to the set first spacing, the intersection line segments of the triangular face of the three-dimensional object geometric shape and the plane x=X are calculated, and the maximum Y value Y_max and the minimum Y value Y_min of all the intersection line segment endpoints are calculated. X is any number in the range [X_min, X_max], and the first spacing is the sampling density. The smaller the first spacing, the greater the sampling density.

[0075] The axis-aligned bounding box obtains spatial voxel occupancy data corresponding to the three-dimensional object, and also includes: In the range [Y_min, Y_max], sample the Y axis according to the set second spacing, calculate the intersection points Z_min and Z_max of the object geometry and the straight line x=X, y=Y, and set the voxel occupancy value that meets the conditions to 1; the conditions are x=X, y=Y, Z_min< z <Z_max。

[0076] Y is any number in the range of [Y_min, Y_max], and the second spacing is the sampling density. The smaller the second spacing is, the greater the sampling density is. The first spacing and the second spacing can be the same or different.

[0077] The obtaining of spatial voxel occupancy data corresponding to the three-dimensional object based on the axis-aligned bounding box includes: The voxel occupancy data is divided into voxel occupancy sub-data, and an independent computing unit is assigned to each voxel occupancy sub-data for calculation.

[0078] In a specific embodiment, the occupancy grid data processing method is a voxel occupancy data calculation process based on three-level spatial clipping and culling for the geometric shape data of a three-dimensional object in a given virtual environment as follows: (1) Calculate and store the axis-aligned bounding box of the object in the local coordinate system of the object. This calculation process is a one-time calculation process. If the object does not deform, the axis-aligned bounding box data can be reused.

[0079] (2) Volume culling calculation: Determine whether the bounding box of the object in the world coordinate system intersects with the occupied voxel range box. If so, perform calculation step (3); if not, end the calculation process; thus, the clipping that is not within the occupied voxel range box is culled; (3) Face culling calculation: Transform the geometric shape of the object into the voxel space coordinate system and calculate X_min and X_max on the X axis. X_min and X_max are the minimum and maximum X coordinates of all points of the geometric shape in the voxel space coordinate system, and the X coordinates are within the occupied voxel range: (4) Line culling calculation: Within the range [X_min, X_max], sample the X axis at a given interval to calculate the intersection of the triangles of the object's geometric shape and the plane x = X. And calculate the maximum and minimum Y values ​​(Y_min, Y_max) of the endpoints of all intersecting line segments.

[0080] That is, the two faces of the object along the X-axis are obtained by calculation, the plane between the two faces is sampled, and the other planes are clipped and eliminated; (5)Voxel calculation: In the range of [Y_min, Y_max], sample the Y-axis at a given interval, and calculate the intersection pairs (Z_min and Z_max) of the object geometry and the line (x = X, y = Y). For all voxels (x = X, y = Y, Z_min < z < Z_max), set their voxel occupancy value to 1; That is, calculate two segments of the object along the Y-axis, sample between the two segments, and clip and remove the parts outside the two segments; This process can be used for calculating the spatial voxel occupancy of regular-shaped objects such as cubes, spheres, ellipsoids, and other irregular-shaped objects.

[0081] This embodiment supports multiple parallel computing methods: (1)By dividing the overall occupied voxel range into multiple smaller voxel occupancy sub-ranges, assign each voxel occupancy sub-range to an independent computing unit for calculation, which is applicable to parallel computing methods such as servers, threads, and GPUs; (2)Calculate the occupied voxel data of each object and assign it to an independent computing unit for calculation, which is applicable to parallel computing methods such as threads and GPUs; (3)Assign the plane after face range culling to an independent computing unit for calculation, which is applicable to parallel computing methods such as GPUs.

[0082] As Figure 2 shown, this embodiment also discloses an occupancy grid data processing device, including, An axis-aligned bounding box module, which is used to obtain the axis-aligned bounding box of the three-dimensional object in the local coordinate system based on the geometric shape data of the three-dimensional object in the virtual environment obtained; A voxel occupancy module, which is used to obtain the spatial voxel occupancy data corresponding to the three-dimensional object based on the axis-aligned bounding box.

[0083] Obtaining the spatial voxel occupancy data corresponding to the three-dimensional object based on the axis-aligned bounding box includes, Judging whether the axis-aligned bounding box of the three-dimensional object in the world coordinate system intersects with the occupied voxel range box. If it intersects, perform face culling calculation.

[0084] The face culling calculation includes, Transform the geometric shape data of the three-dimensional object into the voxel space coordinate system, and calculate X_min and X_max on the X-axis upward in the voxel space coordinate system. X_min and X_max are respectively the minimum and maximum X coordinates of all points of the geometric shape in the voxel space coordinate system, and the X coordinates are within the occupied voxel range.

[0085] Obtaining the spatial voxel occupancy data corresponding to the three-dimensional object based on the axis-aligned bounding box further includes, In the range of [X_min, X_max], the X axis is sampled according to the set first spacing, the intersection line segments of the triangular faces of the three-dimensional object geometric shape and the plane x=X are calculated, and the maximum Y value Y_max and the minimum Y value Y_min of all the intersection line segment endpoints are calculated.

[0086] The axis-aligned bounding box obtains spatial voxel occupancy data corresponding to the three-dimensional object, and also includes: In the range [Y_min, Y_max], sample the Y axis according to the set second spacing, calculate the intersection points Z_min and Z_max of the object geometry and the straight line x=X, y=Y, and set the voxel occupancy value that meets the conditions to 1; the conditions are x=X, y=Y, Z_min< z <Z_max。

[0087] The obtaining of spatial voxel occupancy data corresponding to the three-dimensional object based on the axis-aligned bounding box includes: The voxel occupancy data is divided into voxel occupancy sub-data, and an independent computing unit is assigned to each voxel occupancy sub-data for calculation.

[0088] The electronic device disclosed in this embodiment includes a memory and a processor. The memory is used to store non-temporary computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc.

[0089] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. In one embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the electronic device performs all or part of the steps of the occupancy grid data processing method of each embodiment of the present disclosure.

[0090] Those skilled in the art should be able to understand that in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the protection scope of the present disclosure.

[0091] like Figure 3 The present invention provides a schematic diagram of the structure of an electronic device according to an embodiment of the present invention, which is suitable for implementing the electronic device in the embodiment of the present invention. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0092] like Figure 3 As shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other through a bus. The input / output (I / O) interface is also connected to the bus.

[0093] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes, hard disks, etc.; and communication devices. The communication device allows the electronic device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 3 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0094] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, all or part of the steps of the occupancy grid data processing method of the embodiment of the present disclosure are executed.

[0095] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0096] The computer-readable storage medium disclosed in this embodiment stores non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the occupancy grid data processing method of each embodiment of the present disclosure are executed.

[0097] The above-mentioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or mobile hard disk), media with built-in rewritable non-volatile memory (e.g., memory card) and media with built-in ROM (e.g., ROM box).

[0098] For detailed description of this embodiment, reference may be made to the corresponding descriptions in the aforementioned embodiments, which will not be repeated here.

[0099] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0100] In the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0101] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0102] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0103] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.

[0104] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0105] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A method for processing occupancy grid data, characterized in that: include, Obtaining an axis-aligned bounding box of the three-dimensional object in a local coordinate system based on the acquired geometric shape data of the three-dimensional object in the virtual environment; Based on the axis-aligned bounding box, spatial voxel occupancy data corresponding to the three-dimensional object is obtained.

2. The method for processing occupied grid data according to claim 1, characterized in that: Based on the axis-aligned bounding box, spatial voxel occupancy data corresponding to the three-dimensional object is obtained, including: It is determined whether the axis-aligned bounding box of the three-dimensional object in the world coordinate system intersects with the occupied voxel range box of the spatial voxel occupancy data, and if so, a face culling calculation is performed.

3. The method for processing occupied grid data according to claim 2, characterized in that: The face culling calculation includes, The geometric shape data of the three-dimensional object is transformed into a voxel space coordinate system, and X_min and X_max in the X-axis direction of the voxel space coordinate system are calculated, where X_min and X_max are the minimum and maximum X coordinates of all points of the geometric shape in the voxel space coordinate system, respectively, and the X coordinates are within the range of occupied voxels.

4. The method for processing occupied grid data according to claim 3, characterized in that: The axis-aligned bounding box obtains spatial voxel occupancy data corresponding to the three-dimensional object, and also includes: In the range of [X_min, X_max], the X axis is sampled according to the set first spacing, the intersection line segments of the triangular faces of the three-dimensional object geometric shape and the plane x=X are calculated, and the maximum Y value Y_max and the minimum Y value Y_min of all the intersection line segment endpoints are calculated.

5. The method for processing occupied grid data according to claim 4, characterized in that: The axis-aligned bounding box obtains spatial voxel occupancy data corresponding to the three-dimensional object, and also includes: In the range [Y_min, Y_max], sample the Y axis according to the set second spacing, calculate the intersection points Z_min and Z_max of the object geometry and the straight line x=X, y=Y, and set the voxel occupancy value that meets the conditions to 1; the conditions are x=X, y=Y, Z_min< z <Z_max。 6. The method for processing occupancy grid data according to claim 1, characterized in that: The obtaining of spatial voxel occupancy data corresponding to the three-dimensional object based on the axis-aligned bounding box includes: The voxel occupancy data is divided into voxel occupancy sub-data, and an independent computing unit is assigned to each voxel occupancy sub-data for calculation.

7. An occupancy grid data processing device, characterized in that: include, A bounding box module, used for obtaining an axis-aligned bounding box of the three-dimensional object in a local coordinate system based on the acquired geometric shape data of the three-dimensional object in the virtual environment; A voxel occupancy module is used to obtain spatial voxel occupancy data corresponding to the three-dimensional object based on the axis-aligned bounding box.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the occupancy grid data processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the occupancy grid data processing method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the occupancy grid data processing method described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Tri-dimensional solid Boolean calculation method based on L-Rep model

    CN101609565A

  • Improved three-dimensional model voxelization-based inner sphere construction method

    CN103236079A

  • Voxelization processing method and device based on triangular mesh model

    CN108921928A

  • Shape restoring device

    JP1995057089A

  • Image process apparatus for three-dimensional model

    US20070291032A1