Virtual scene-based point cloud data acquisition method, apparatus and device, and medium

By building a three-dimensional model in a virtual scene and collecting intersection points between rays and models, the problem that the existing technology cannot collect point cloud data in a virtual scene is solved, and efficient and flexible point cloud data acquisition and analysis are achieved.

CN119091079APending Publication Date: 2024-12-06SHENZHEN EXPRESSWAY ENG CONSULTANTS CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411007771.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing technology cannot collect point cloud data in virtual scenarios, which limits research and application in related fields and cannot simulate and analyze various scenarios.

Method used

By obtaining the three-dimensional model of the target object, building a three-dimensional model in a three-dimensional virtual scene, collecting using rays and the model intersection points, obtaining point cloud data, and optionally simulate acquisition errors to improve acquisition efficiency and flexibility.

Benefits of technology

It realizes efficient acquisition of point cloud data in virtual scenes, improves acquisition efficiency and flexibility, and can more flexibly simulate and analyze various scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119091079A_ABST
    Figure CN119091079A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of point cloud data acquisition, and provides a point cloud data acquisition method, device and equipment based on a virtual scene and a storage medium, and the method comprises the steps: obtaining a three-dimensional model of a target object, building a three-dimensional virtual scene in a three-dimensional scene model based on the three-dimensional model, according to the method, the intersection points of the multiple rays in different directions with the preset point as the starting point and the three-dimensional model are collected in the three-dimensional virtual scene to obtain the point cloud data, so that the point cloud data are collected in the virtual scene, the collection efficiency of the point cloud data is improved, and sampling points are not limited; in addition, according to the scheme, point cloud data acquisition is carried out in an unreal scene, so that various scenes can be simulated and analyzed more flexibly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of point cloud data acquisition, and in particular relates to a point cloud data acquisition method, device, equipment and storage medium based on a virtual scene. Background Art

[0002] Point cloud acquisition technology is the process of converting the surface of an object or scene into discrete three-dimensional point cloud data through means such as laser radar scanning, 3D scanners and 3D cameras. It is an important technology in the fields of virtual reality, computer vision, architecture, geographic information systems, etc.

[0003] Since traditional 3D point cloud acquisition technology needs to be collected in actual scenes, it cannot be used in virtual scenes, and it cannot be simulated and analyzed in various scenes, and cannot provide a reliable data basis for research and applications in related fields. Summary of the invention

[0004] The purpose of the present invention is to provide a point cloud data acquisition method, device, equipment and storage medium based on a virtual scene, aiming to solve the problem in the prior art that point cloud data cannot be simulated and analyzed in various scenes, resulting in the inability to provide a reliable data basis for research and application in related fields.

[0005] In one aspect, the present invention provides a point cloud data acquisition method based on a virtual scene, the method comprising the following steps:

[0006] Obtaining a three-dimensional model of a target object;

[0007] Building a three-dimensional virtual scene in the three-dimensional scene model based on the three-dimensional model;

[0008] In the three-dimensional virtual scene, the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model are collected to obtain point cloud data.

[0009] Optionally, the step of collecting intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model in the three-dimensional virtual scene includes:

[0010] Obtaining the number of intersections between a target ray and the three-dimensional model, wherein the target ray is one of the multiple rays in different directions;

[0011] If it is an intersection point, the intersection point between the target ray and the three-dimensional model is obtained, and the obtained intersection point is used as a sampling point for collection;

[0012] If there are multiple intersection points, all the intersection points between the target ray and the three-dimensional model are obtained, the intersection point closest to the preset point among all the intersection points is selected as a sampling point, and the sampling point is collected.

[0013] Optionally, the three-dimensional model is a triangulated network model, and the step of obtaining the number of intersection points between the target ray and the three-dimensional model includes:

[0014] Performing an intersection check on the target ray and a target triangular face in the triangulated mesh model, wherein the target triangular face is a triangular face in the triangulated mesh model;

[0015] The step of performing intersection checking on the target ray and the target triangular facet in the triangulated mesh model comprises:

[0016] Obtaining a parametric equation of the target ray and a parametric equation of the target triangle;

[0017] Solve the parameter equation of the target ray and the parameter equation of the target triangle patch simultaneously to obtain the target parameter value;

[0018] If the target parameter value satisfies a preset condition, it is determined that the target ray intersects with the target triangular facet; otherwise, it is determined that the target ray does not intersect with the target triangular facet.

[0019] Optionally, the three-dimensional model is a triangulated network model, and the step of obtaining the number of intersection points between the target ray and the three-dimensional model further includes:

[0020] Establishing the spatial data structure of the triangulated network model;

[0021] Performing a rough screening of the triangular facets intersecting with the target ray according to the spatial data structure;

[0022] An intersection check is performed on the target ray and each triangular facet of the coarse screen respectively to obtain the number of intersection points between the target ray and the three-dimensional model.

[0023] Optionally, the spatial data structure is an octree structure, and the step of coarsely screening the triangular facets intersecting the target ray according to the spatial data structure comprises:

[0024] The nodes of the octree structure are screened according to the intersection of the nodes of the octree structure with the target ray to obtain leaf nodes intersecting with the target ray; wherein the triangular facets in all the leaf nodes intersecting with the target ray are used as coarse-screened triangular facets.

[0025] Optionally, the step of collecting intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model in the three-dimensional virtual scene further includes:

[0026] Simulating acquisition errors in the three-dimensional virtual scene according to the actual acquisition scene;

[0027] According to the acquisition error, the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model are acquired in the three-dimensional virtual scene.

[0028] Optionally, before the step of building a three-dimensional virtual scene in a three-dimensional scene model based on the three-dimensional model, the step includes:

[0029] Performing format conversion on the acquired three-dimensional model to obtain a three-dimensional model in a first target format;

[0030] The step of building a three-dimensional virtual scene in a three-dimensional scene model based on the three-dimensional model includes:

[0031] Building a three-dimensional virtual scene in the three-dimensional scene model based on the three-dimensional model in the first target format;

[0032] Optionally, after the step of obtaining point cloud data, the following steps are included:

[0033] The point cloud data is exported to a second target format.

[0034] On the other hand, the present invention provides a point cloud data acquisition device based on a virtual scene, the device comprising:

[0035] A model acquisition unit, used to acquire a three-dimensional model of a target object;

[0036] A scene building unit, used to build a three-dimensional virtual scene in the three-dimensional scene model based on the three-dimensional model; and

[0037] The point cloud data acquisition unit is used to acquire the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model in the three-dimensional virtual scene to obtain point cloud data.

[0038] On the other hand, the present invention also provides a point cloud data acquisition device based on a virtual scene, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0039] On the other hand, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0040] The present invention obtains a three-dimensional model of the target object, builds a three-dimensional virtual scene in the three-dimensional scene model based on the three-dimensional model, and collects the intersection points of multiple rays in different directions starting from a preset point and the three-dimensional model in the three-dimensional virtual scene to obtain point cloud data. Therefore, by collecting point cloud data in the virtual scene, the efficiency of collecting point cloud data is improved, and the sampling points are not restricted. In addition, since the present solution collects point cloud data in a virtual scene, it is able to simulate and analyze various scenes more flexibly. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 is a flowchart of the implementation of the point cloud data acquisition method based on the virtual scene provided in the first embodiment of the present invention;

[0042] Figure 2 This is a diagram showing an example of a structure for performing intersection check on a target ray and a target triangle provided in the first embodiment of the present invention;

[0043] Figure 3 is a structural diagram of a point cloud data acquisition device based on a virtual scene provided in Embodiment 2 of the present invention; and

[0044] Figure 4 It is a structural diagram of point cloud data collection based on a virtual scene provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0046] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments:

[0047] Embodiment 1:

[0048] Figure 1 The implementation process of the point cloud data acquisition method based on a virtual scene provided in the first embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:

[0049] In step S101 , a three-dimensional model of a target object is obtained.

[0050] The embodiment of the present invention is applicable to the collection of point cloud data. In the embodiment of the present invention, the target object (first target object) may be a tunnel, a road, or other object or scene. The format of the acquired three-dimensional model may include: .obj, .ply, .BIM, .fbx, etc., which is not limited in this embodiment.

[0051] In step S102, a three-dimensional virtual scene is constructed in the three-dimensional scene model based on the three-dimensional model.

[0052] In an embodiment of the present invention, it is considered that the formats of the above-mentioned three-dimensional models have different compatibilities and characteristics in different virtual scenes. Optionally, before building a three-dimensional virtual scene in a three-dimensional scene model based on the three-dimensional model, the obtained three-dimensional model is format converted to obtain a three-dimensional model in a first target format. When building a three-dimensional virtual scene in a three-dimensional scene model based on the three-dimensional model, the three-dimensional virtual scene is built in the three-dimensional scene model based on the three-dimensional model in the first target format, thereby meeting the format requirements of the virtual scene for the three-dimensional model. In a specific implementation, the obtained three-dimensional model can be converted into a corresponding format by using professional three-dimensional modeling software or a corresponding format conversion tool to obtain a three-dimensional model in a first target format. Among them, the first target format can be one of .obj, .ply, .BIM, and .fbx, which is not limited in this embodiment.

[0053] When building a 3D virtual scene in a 3D scene model, the 3D model can be imported into the 3D scene model to build the 3D virtual scene. In specific implementation, the model can be placed in a suitable position and some adjustments and edits can be made to the model, such as adjusting the size, rotation and / or scaling of the model, to ensure that the performance of the model in the virtual scene meets expectations.

[0054] In the specific implementation, first, the 3D model can be placed in a suitable position of the 3D scene model. In a virtual scene, a 3D coordinate system is usually used to describe the position in the virtual scene. By adjusting the position of the 3D model in the coordinate system, it can be placed in any position. The position adjustment can be achieved through translation transformation. Specifically, the translation vector can be added to each vertex coordinate of the model to place the model in the corresponding position.

[0055] Secondly, the 3D model can be adjusted and edited. For example, the position, size, orientation and angle of the 3D model in the 3D scene model can be adjusted. The size of the 3D model can be adjusted by scaling transformation. Specifically, the coordinates of each vertex of the model can be multiplied by the scaling factor to change the size of the model. The rotation of the model can be achieved by rotation transformation. The rotation angle can be expressed as: R = (r x ,r y ,r z ), where r x ,r y ,r z They represent the rotation angles around the x-axis, y-axis, and z-axis respectively. Specifically, by rotating the coordinates of each vertex of the model around a certain axis, the orientation and angle of the model can be changed.

[0056] Furthermore, in addition to adjusting and editing the imported 3D model, other models (models of the second target object) can be added to the 3D virtual scene to enrich the content of the virtual scene. For example, electromechanical facilities, vehicles, roads, plants, etc. can be added. These models can also be placed, adjusted and edited in the above manner to cooperate with the above 3D model to create a more realistic and rich virtual scene.

[0057] In step S103, the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model are collected in the three-dimensional virtual scene to obtain point cloud data.

[0058] In the embodiment of the present invention, the preset point is usually a specific position. For example, if the target object is a tunnel, the preset point is the center point of the tunnel to facilitate point cloud data collection. After determining the position of the preset point, multiple different directions can be given to form multiple rays in different directions starting from the preset point. Then, each ray can be intersected with the three-dimensional model respectively, and the collected intersection points are used as the collected point cloud data. Among them, the above-mentioned given direction can be set according to actual needs.

[0059] Optionally, the number of the preset points is one or more to meet the point cloud acquisition requirements of different scenes. In a specific implementation, when there are multiple preset points, for each preset point, multiple different directions can be given to form multiple rays in different directions starting from the preset point.

[0060] Considering that a ray may have more than one intersection point with a 3D model, when collecting the intersection points of multiple rays in different directions with a preset point as the starting point and the 3D model in a 3D virtual scene, optionally, the number of intersection points between the target ray and the 3D model is obtained. If there is only one intersection point, the intersection point of the target ray and the 3D model is obtained, and the obtained intersection point is used as a sampling point for collection. If there are multiple intersection points, all the intersection points of the target ray and the 3D model are obtained, and the intersection point closest to the preset point among all the intersection points is selected as the sampling point, and the sampling point is collected, thereby improving the accuracy of point cloud data collection. Among them, the target ray is one of the multiple rays in different directions.

[0061] If the three-dimensional model is a triangulated mesh model, when performing an intersection check between each ray and the three-dimensional model, optionally, an intersection check is performed between the target ray and the target triangular facet in the triangulated mesh model, so as to realize the intersection check between the target ray and the three-dimensional model by means of the ray-triangle intersection check. Among them, the target ray is one of the rays in multiple directions, and the target triangular facet is a triangular facet in the triangulated mesh model. It should be noted here that if the three-dimensional model is a model other than a triangulated mesh, for example, a polygonal model, when performing an intersection check between the target ray and the three-dimensional model, the target ray can be respectively intersected with each polygon of the model to realize the intersection check between the target ray and the three-dimensional model. Further, when obtaining the number of intersection points between the target ray and the three-dimensional model, the number of triangular facets intersecting the target ray and the triangulated mesh model can be obtained. Specifically, the target ray can be intersected with each triangular facet in the triangulated mesh model to obtain the number of triangular facets intersecting the target ray and the triangulated mesh model.

[0062] When performing an intersection check on a target ray and a target triangular patch in a triangulated mesh model, optionally, a parameter equation of the target ray and a parameter equation of the target triangular patch are obtained, and the parameter equation of the target ray and the parameter equation of the target triangular patch are solved simultaneously to obtain a target parameter value. If the target parameter value meets a preset condition, it is determined that the target ray intersects with the target triangular patch, otherwise it is determined that the target ray does not intersect with the target triangular patch. Further, if the target ray intersects with the target triangular patch, the intersection point of the target ray and the target triangular patch can be calculated based on the target parameter value and the parameter equation of the target triangular patch.

[0063] Specifically, Figure 2 As shown, the parametric equation of the target ray can be defined as follows:

[0064] O+tD formula (1)

[0065] Among them, O represents the starting point of the target ray, D represents the direction of the target ray, t represents the parameter of the target ray, and the preset condition of the parameter of the target ray is: t>0.

[0066] The parametric equation of the target triangle (V0, V1, V2) can be defined as:

[0067] T(u,v)=(1-uv)V0+uV1+vV2 Formula (2)

[0068] Among them, u and v represent the parameters of the target triangle. The preset conditions of the parameters of the target triangle are: u≥0, v≥0, u+v≤1, that is, any point in the target triangle can be uniquely determined by the three vertices of the target triangle, and V0, V1, and V2 respectively represent the three vertices of the target triangle.

[0069] At this point, finding the intersection of the target ray and the target triangle becomes solving the following equation, where t, u, and v are unknown parameter values ​​and the other quantities are known quantities:

[0070] O+tD=(1-uv)V0+uV1+vV2 Formula (3)

[0071] By shifting and rearranging the terms, extracting the parameter values ​​t, u, and v as unknowns, we obtain the following linear equations:

[0072]

[0073] Let E1 = V1-V0, E2 = V2-V0, T = O-V0 be vector representation. Substituting into formula (4) can be simplified to:

[0074]

[0075] According to Cramer's rule, we have:

[0076]

[0077] Using the definition of mixed product a,b,c=(a*b)·c=-(a*c)·b=(c*a)·b, where “*” represents the cross product between vectors and “·” represents the dot product between vectors. Formula (6) can be rewritten as:

[0078]

[0079] Let P=D*E2,Q=T*E1, and further simplify to get:

[0080]

[0081] Finally, the three parameters t, u, and v can be calculated from the known data, that is, the target parameter values ​​mentioned above, and the three parameters can be used to determine whether they intersect. If they do not meet the preset conditions, they do not intersect. If they meet the conditions, they intersect. Furthermore, if they intersect, the calculated values ​​of u and v can be substituted into the parameter equation of the target triangle, that is, the above formula (2), to obtain the intersection point of the target ray and the target triangle.

[0082] If the three-dimensional model is a triangulated mesh model, then when obtaining the number of intersections between the target ray and the three-dimensional model, optionally, a spatial data structure of the triangulated mesh model is established, and the triangular facets intersecting with the target ray are coarsely screened according to the spatial data structure, and an intersection check is performed on the target ray and each coarsely screened triangular facet to obtain the number of intersections between the target ray and the three-dimensional model, that is, the number of triangular facets intersecting with the target ray in the triangulated mesh model, thereby improving the speed of calculating the number of intersections between the target ray and the three-dimensional model.

[0083] Further optionally, the spatial data structure is an octree structure, and when the triangular facets intersecting the target ray are roughly screened according to the spatial data structure, the nodes of the octree structure are screened according to the intersection of the nodes of the octree structure with the target ray to obtain the leaf nodes intersecting the target ray, thereby realizing the initial screening of the triangular facets through the octree structure. The triangular facets in all the leaf nodes intersecting the target ray are used as the roughly screened triangular facets.

[0084] In specific implementation, an axis-aligned bounding box (AABB) can be created based on the 3D model, and the bounding box is used as the root node of the tree. The center point of the bounding box is taken as the segmentation point, and the bounding box is divided into two parts along the three coordinate axes to obtain eight sub-bounding boxes, which represent the eight sub-nodes of the octree structure. For each sub-bounding box, the following operations are recursively performed;

[0085] Perform an intersection check on the sub-bounding box and the triangle. If they intersect, add the triangle to the triangle list of the current node.

[0086] Determine whether the current child node meets the preset partition termination condition;

[0087] If satisfied, the child node is marked as a leaf node;

[0088] If not, the child node is marked as a new node, the child bounding box is segmented, and the process jumps to the step of performing intersection check on the child bounding box and the triangle patch until the leaf node condition is met.

[0089] The preset division termination condition may be that the number of triangle facets intersecting the sub-bounding box is less than or equal to a preset threshold, or the octree structure reaches a preset depth.

[0090] After the octree structure is established, considering that the target ray will intersect with the bounding box before the intersection check with the target triangle, the bounding box of the octree structure can be obtained, and the target ray and the bounding box can be intersected. If they do not intersect, it means that the ray will definitely not intersect with the object in the bounding box. It can be determined that the target ray and the triangles in the triangulated mesh model do not intersect. If they intersect, the child nodes of the octree structure are intersected with the target ray layer by layer from top to bottom until the child nodes are leaf nodes, and the leaf nodes intersecting with the target ray are obtained. The triangles in the leaf nodes intersecting with the target ray are used as the coarse-screened triangles. After the coarse-screened triangles are determined, the target ray can be intersected with each coarse-screened triangle without the need to perform an intersection check on all the triangles in the triangulated mesh model.

[0091] When collecting the intersections of multiple rays in different directions with a preset point as the starting point and the three-dimensional model in the three-dimensional virtual scene, optionally, the collection error is simulated in the three-dimensional virtual scene according to the actual collection scene, and the intersections of multiple rays in different directions with a preset point as the starting point and the three-dimensional model are collected in the three-dimensional virtual scene according to the collection error to obtain point cloud collection data. In a specific implementation, the working principle and related parameters of the laser radar can be simulated, and the accuracy, noise and other factors of the laser scanning can be taken into account, and then the error situation similar to the actual laser radar collection data can be simulated in the process of point cloud data collection, so that the effect of laser scanning can be more realistically simulated.

[0092] After completing the point cloud data collection, the point cloud data may be optionally exported to a second target format to meet actual usage requirements, wherein the second target format may be a .obj, .ply or .xyz format, etc., which is not specifically limited in this embodiment.

[0093] In an embodiment of the present invention, a three-dimensional model of a target object is obtained, a three-dimensional virtual scene is constructed in a three-dimensional scene model based on the three-dimensional model, and the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model are collected in the three-dimensional virtual scene to obtain point cloud data. Compared with the prior art, this solution does not require personnel to collect data on site in the tunnel, and data can be collected by simply importing the model into the virtual scene, thereby improving the efficiency of point cloud collection and being able to collect an unlimited number of points. In addition, by collecting point cloud data in a virtual scene, various scenes can be simulated and analyzed more flexibly.

[0094] Embodiment 2:

[0095] Figure 3 The structure of the point cloud data acquisition device based on the virtual scene provided by the second embodiment of the present invention is shown. For the convenience of description, only the part related to the embodiment of the present invention is shown, including:

[0096] A model acquisition unit 31 is used to acquire a three-dimensional model of a target object;

[0097] A scene building unit 32, used to build a three-dimensional virtual scene in the three-dimensional scene model based on the three-dimensional model; and

[0098] The point cloud data acquisition unit 33 is used to acquire the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model in the three-dimensional virtual scene to obtain point cloud data.

[0099] Optionally, the point cloud data acquisition unit 33 includes:

[0100] An intersection number acquisition unit is used to acquire the number of intersection points between a target ray and a three-dimensional model, where the target ray is one of a plurality of rays in different directions;

[0101] The point cloud data acquisition unit 33 is further configured to acquire the intersection point of the target ray and the three-dimensional model if the number of intersection points between the target ray and the three-dimensional model is one, and to acquire the obtained intersection point as a sampling point; and

[0102] The point cloud data acquisition unit 33 is also used to obtain all intersection points between the target ray and the three-dimensional model if there are multiple intersection points between the target ray and the three-dimensional model, select the intersection point closest to the preset point among all the intersection points as a sampling point, and collect data from the sampling point.

[0103] Optionally, the three-dimensional model is a triangulated network model, and the intersection number obtaining unit includes:

[0104] An intersection check unit is used to perform an intersection check between a target ray and a target triangular face in a triangulated mesh model, where the target triangular face is a triangular face in the triangulated mesh model;

[0105] Optionally, the intersection checking unit includes:

[0106] A parameter equation acquisition unit, used to acquire the parameter equation of the target ray and the parameter equation of the target triangle patch;

[0107] A parameter value acquisition unit, used to simultaneously solve the parameter equation of the target ray and the parameter equation of the target triangle patch to obtain the target parameter value; and

[0108] The intersection determination unit is used to determine that the target ray intersects with the target triangular face if the target parameter value meets a preset condition, and otherwise determine that the target ray does not intersect with the target triangular face.

[0109] Optionally, the three-dimensional model is a triangulated network model, and the intersection number acquisition unit further includes:

[0110] A data structure building unit, used to build a spatial data structure of a triangulated network model; and

[0111] A coarse screening unit, used for coarse screening of triangular facets intersecting with the target ray according to the spatial data structure;

[0112] The intersection check unit is also used to perform intersection checks on the target ray and each triangular facet of the coarse screen respectively, and obtain the number of intersection points between the target ray and the three-dimensional model.

[0113] Optionally, the spatial data structure is an octree structure, and the coarse screening unit includes:

[0114] The coarse screening unit is used to screen the nodes of the octree structure according to the intersection of the nodes of the octree structure with the target ray, and obtain the leaf nodes intersecting with the target ray; wherein the triangular facets in all the leaf nodes intersecting with the target ray are used as the triangular facets of the coarse screening.

[0115] Optionally, the point cloud data acquisition unit 33 further includes:

[0116] an error simulation unit, used to simulate acquisition errors in a three-dimensional virtual scene according to a real acquisition scene; and

[0117] The acquisition subunit is used to acquire the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model in the three-dimensional virtual scene according to the acquisition error.

[0118] Optionally, the device further comprises:

[0119] A first format conversion unit, configured to convert the acquired three-dimensional model into a format to obtain a three-dimensional model in a first target format;

[0120] The scene building unit 32 is further used to build a three-dimensional virtual scene in the three-dimensional scene model based on the three-dimensional model in the first target format.

[0121] Optionally, the device further comprises:

[0122] The second format conversion unit is used to export the point cloud data into a second target format.

[0123] In the embodiment of the present invention, each unit of the point cloud data acquisition device based on the virtual scene can be implemented by a corresponding hardware or software unit, and each unit can be an independent software or hardware unit, or can be integrated into a software or hardware unit, which is not intended to limit the present invention. The specific implementation of each unit of the point cloud data acquisition device based on the virtual scene can refer to the description of the aforementioned method embodiment, which will not be repeated here.

[0124] Embodiment three:

[0125] Figure 4 The structure of a point cloud data acquisition device based on a virtual scene provided by the third embodiment of the present invention is shown. For the sake of convenience of explanation, only the parts related to the embodiment of the present invention are shown.

[0126] The virtual scene-based point cloud data acquisition device 4 of the embodiment of the present invention includes a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the above-mentioned method embodiments are implemented, for example Figure 1Alternatively, when the processor 40 executes the computer program 42, the functions of each unit in the above-mentioned device embodiments are realized, for example Figure 3 The functions of the units 31 to 33 are shown.

[0127] In an embodiment of the present invention, a three-dimensional model of a target object is obtained, a three-dimensional virtual scene is built in a three-dimensional scene model based on the three-dimensional model, and the intersection points of multiple rays in different directions starting from a preset point and the three-dimensional model are collected in the three-dimensional virtual scene to obtain point cloud data. Thus, by collecting point cloud data in a virtual scene, the efficiency of collecting point cloud data is improved, and the sampling points are not restricted. In addition, since the present solution collects point cloud data in a virtual scene, it is able to simulate and analyze various scenes more flexibly.

[0128] Embodiment 4:

[0129] In an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above method embodiment are implemented, for example, Figure 1 Alternatively, when the computer program is executed by a processor, the functions of each unit in the above-mentioned device embodiments are realized, for example Figure 3 The functions of the units 31 to 33 are shown.

[0130] In an embodiment of the present invention, a three-dimensional model of a target object is obtained, a three-dimensional virtual scene is built in a three-dimensional scene model based on the three-dimensional model, and the intersection points of multiple rays in different directions starting from a preset point and the three-dimensional model are collected in the three-dimensional virtual scene to obtain point cloud data. Thus, by collecting point cloud data in a virtual scene, the efficiency of collecting point cloud data is improved, and the sampling points are not restricted. In addition, since the present solution collects point cloud data in a virtual scene, it is able to simulate and analyze various scenes more flexibly.

[0131] The computer-readable storage medium of the embodiment of the present invention may include any entity or device or recording medium capable of carrying computer program code, for example, ROM / RAM, magnetic disk, optical disk, flash memory and other memories.

[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A point cloud data acquisition method based on a virtual scene, characterized in that: The method comprises: Obtaining a three-dimensional model of a target object; Building a three-dimensional virtual scene in the three-dimensional scene model based on the three-dimensional model; In the three-dimensional virtual scene, the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model are collected to obtain point cloud data.

2. The method according to claim 1, characterized in that The step of collecting the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model in the three-dimensional virtual scene comprises: Obtaining the number of intersections between a target ray and the three-dimensional model, wherein the target ray is one of the multiple rays in different directions; If it is an intersection point, the intersection point between the target ray and the three-dimensional model is obtained, and the obtained intersection point is used as a sampling point for collection; If there are multiple intersection points, all the intersection points between the target ray and the three-dimensional model are obtained, the intersection point closest to the preset point among all the intersection points is selected as a sampling point, and the sampling point is collected.

3. The method according to claim 2, characterized in that The three-dimensional model is a triangulated network model, and the step of obtaining the number of intersection points between the target ray and the three-dimensional model includes: Performing an intersection check on the target ray and a target triangular face in the triangulated mesh model, wherein the target triangular face is a triangular face in the triangulated mesh model; The step of performing intersection checking on the target ray and the target triangular facet in the triangulated mesh model comprises: Obtaining a parametric equation of the target ray and a parametric equation of the target triangle; Solve the parameter equation of the target ray and the parameter equation of the target triangle patch simultaneously to obtain the target parameter value; If the target parameter value satisfies a preset condition, it is determined that the target ray intersects with the target triangular facet; otherwise, it is determined that the target ray does not intersect with the target triangular facet.

4. The method according to claim 2, characterized in that The three-dimensional model is a triangulated network model, and the step of obtaining the number of intersection points between the target ray and the three-dimensional model further includes: Establishing the spatial data structure of the triangulated network model; Performing a rough screening of the triangular facets intersecting with the target ray according to the spatial data structure; An intersection check is performed on the target ray and each triangular facet of the coarse screen respectively to obtain the number of intersection points between the target ray and the three-dimensional model.

5. The method according to claim 4, characterized in that The spatial data structure is an octree structure, and the step of roughly screening the triangular facets intersecting the target ray according to the spatial data structure comprises: The nodes of the octree structure are screened according to the intersection of the nodes of the octree structure with the target ray to obtain leaf nodes intersecting with the target ray; wherein the triangular facets in all the leaf nodes intersecting with the target ray are used as coarse-screened triangular facets.

6. The method according to claim 1, characterized in that The step of collecting the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model in the three-dimensional virtual scene also includes: Simulating acquisition errors in the three-dimensional virtual scene according to the actual acquisition scene; According to the acquisition error, the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model are acquired in the three-dimensional virtual scene.

7. The method according to claim 1, characterized in that Before the step of building a three-dimensional virtual scene in the three-dimensional scene model based on the three-dimensional model, the method includes: Performing format conversion on the acquired three-dimensional model to obtain a three-dimensional model in a first target format; The step of building a three-dimensional virtual scene in a three-dimensional scene model based on the three-dimensional model includes: Building a three-dimensional virtual scene in the three-dimensional scene model based on the three-dimensional model in the first target format; After the step of obtaining point cloud data, the following steps are included: The point cloud data is exported to a second target format.

8. A point cloud data acquisition device based on a virtual scene, characterized in that: The device comprises: A model acquisition unit, used to acquire a three-dimensional model of a target object; A scene building unit, used to build a three-dimensional virtual scene in the three-dimensional scene model based on the three-dimensional model; and The point cloud data acquisition unit is used to acquire the intersection points of a plurality of rays in different directions starting from a preset point and the three-dimensional model in the three-dimensional virtual scene to obtain point cloud data.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Automatic acquisition method and system for vehicle point clouds at specific locations and angles

    CN120065195B

  • Point cloud simulation scanning method and device suitable for linear engineering and storage medium

    CN121904317A