CN107481321B - Three-dimensional model generation method and three-dimensional model generation system - Google Patents

Three-dimensional model generation method and three-dimensional model generation system Download PDF

Info

Publication number
CN107481321B
CN107481321B CN201710703847.XA CN201710703847A CN107481321B CN 107481321 B CN107481321 B CN 107481321B CN 201710703847 A CN201710703847 A CN 201710703847A CN 107481321 B CN107481321 B CN 107481321B
Authority
CN
China
Prior art keywords
dimensional
triangularization
target
model
elements
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710703847.XA
Other languages
Chinese (zh)
Other versions
CN107481321A (en
Inventor
马延朋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Citylife Beijing Information Co ltd
Original Assignee
Citylife Beijing Information Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Citylife Beijing Information Co ltd filed Critical Citylife Beijing Information Co ltd
Priority to CN201710703847.XA priority Critical patent/CN107481321B/en
Publication of CN107481321A publication Critical patent/CN107481321A/en
Application granted granted Critical
Publication of CN107481321B publication Critical patent/CN107481321B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Remote Sensing (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a three-dimensional model generation method and a system, wherein the method comprises the steps of obtaining two-dimensional position data of a two-dimensional element corresponding to a target real scene element and topographic data of the target real scene element; generating three-dimensional position data of a target three-dimensional model required by the corresponding target real scene element according to the two-dimensional position data and the topographic data; triangularizing two-dimensional elements corresponding to the target live-action elements; and finally, generating a target three-dimensional model corresponding to the target real scene element based on the three-dimensional position data and the triangularization result. Therefore, the scheme for automatically generating the three-dimensional model according to the actual two-dimensional position data and the topographic data has higher data manufacturing efficiency and less model data volume, and the generated three-dimensional model has higher position matching degree with the real scene elements due to the fact that the actual two-dimensional position data and the topographic data are used as data sources of the three-dimensional model, and the reference value of the three-dimensional electronic map is further improved.

Description

Three-dimensional model generation method and three-dimensional model generation system
Technical Field
The invention belongs to the technical field of model construction of electronic maps, and particularly relates to a three-dimensional model generation method and a three-dimensional model generation system.
Background
The three-dimensional electronic map can provide map retrieval functions such as map query, trip navigation and the like for users through an intuitive geographical real-scene simulation expression mode, and becomes a new bright point of the current internet business development.
In the three-dimensional electronic map, a large number of three-dimensional models corresponding to real-world real-scene elements are required, such as road models, green space models, fence models, and the like corresponding to roads, green spaces, fences, and the like, respectively, and since the number of models is large, a generation rate as high as possible and a model data amount as small as possible are required when generating these models, and in addition, in order to ensure a reference value of the three-dimensional electronic map, it is required that the generated three-dimensional models match the positions of the real-scene elements as much as possible.
At present, a manual manufacturing mode is generally adopted to generate a three-dimensional model or related technologies such as oblique photography and the like are utilized to automatically generate the three-dimensional model, however, the production efficiency of the manual manufacturing mode is low, and the data volume of the model has artificial factors and is difficult to strictly control; however, because the method takes the manually acquired actual two-dimensional data and the data obtained by oblique photography as data sources of the three-dimensional model, and the two data standards are different, the error of the established three-dimensional model is larger, so that the generated three-dimensional model is difficult to be matched with the position of the real scene element, and the reference value of the three-dimensional electronic map is influenced.
Disclosure of Invention
In view of the above, the present invention provides a three-dimensional model generation method and a three-dimensional model generation system, so that the generated three-dimensional model and the real scene element have a higher position matching degree, and the reference value of the three-dimensional electronic map is further improved.
Therefore, the invention discloses the following technical scheme:
a three-dimensional model generation method, comprising:
acquiring two-dimensional position data of a two-dimensional element corresponding to the target real scene element and topographic data of the target real scene element;
generating three-dimensional position data of a target three-dimensional model required by the target real scene element according to the two-dimensional position data and the terrain data;
triangularizing the two-dimensional elements corresponding to the target real scene elements;
and generating a target three-dimensional model corresponding to the target real scene element based on the three-dimensional position data and the triangularization result obtained by triangularization.
Optionally, the two-dimensional position data of the two-dimensional elements includes position coordinates of the two-dimensional elements, and the terrain data includes elevation value data of the target real-scene elements;
generating three-dimensional position data of a target three-dimensional model required by the target real scene element according to the two-dimensional position data and the terrain data, wherein the three-dimensional position data comprises:
acquiring an elevation value of each point from the topographic data according to the position coordinates of each point in the two-dimensional elements, and correspondingly endowing the acquired elevation value to each point in the two-dimensional elements;
and generating three-dimensional position data of the target three-dimensional model according to the position coordinates and the elevation values corresponding to each point in the two-dimensional elements.
Optionally, triangulating the two-dimensional element corresponding to the target real-scene element includes:
triangularizing the two-dimensional elements by using a corresponding triangularization mode according to the types of the two-dimensional elements and the type of a target three-dimensional model to be generated; the triangulation mode comprises surface undirected triangulation, surface directed triangulation, line horizontal triangulation and line vertical triangulation.
Optionally, the generating a target three-dimensional model of the target real scene element based on the three-dimensional position data and the triangularization result obtained by triangularization includes:
obtaining a model frame of the target three-dimensional model based on the triangularization result, wherein the model frame comprises all triangular patches corresponding to the triangularization result; adding auxiliary patches in corresponding triangular patches included in the model frame;
calculating texture coordinates and normal directions of model vertexes of the model frame;
and obtaining a target three-dimensional model based on the three-dimensional position data, the attached patches added in the model frame and the texture coordinates and normal directions of model vertexes in the model frame.
Optionally, the method further includes:
when the generation requirement of the three-dimensional model of the preset type exists in the two-dimensional plane, the three-dimensional model of the preset type is generated in a plane random point generation mode in the two-dimensional plane.
A three-dimensional model generation system, comprising:
the acquisition module is used for acquiring two-dimensional position data of the two-dimensional elements corresponding to the target real scene elements and topographic data of the target real scene elements;
the three-dimensional position data generation module is used for generating three-dimensional position data of a target three-dimensional model required by the corresponding target real scene element according to the two-dimensional position data and the terrain data;
the triangularization module is used for triangularizing the two-dimensional elements corresponding to the target real scene elements;
and the three-dimensional model generating module is used for generating a target three-dimensional model corresponding to the target real scene element based on the three-dimensional position data and the triangularization result obtained by triangularization.
Optionally, the two-dimensional position data of the two-dimensional elements includes position coordinates of the two-dimensional elements, and the terrain data includes elevation value data of the target real-scene elements;
the three-dimensional position data generation module includes:
the assignment unit is used for acquiring an elevation value of each point from the topographic data according to the position coordinates of each point in the two-dimensional elements and correspondingly endowing the acquired elevation value to each point in the two-dimensional elements;
and the three-dimensional position data generating unit is used for generating three-dimensional position data of the target three-dimensional model according to the position coordinates and the elevation values corresponding to each point in the two-dimensional elements.
Optionally, the triangularization module is specifically configured to: triangularizing the two-dimensional elements by using a corresponding triangularization mode according to the types of the two-dimensional elements and the type of a target three-dimensional model to be generated; the triangulation mode comprises surface undirected triangulation, surface directed triangulation, line horizontal triangulation and line vertical triangulation.
Optionally, the three-dimensional model generating module includes:
the surface patch adding unit is used for obtaining a model frame of the target three-dimensional model based on the triangularization result, and the model frame comprises all triangular surface patches corresponding to the triangularization result; adding auxiliary patches in corresponding triangular patches included in the model frame;
the calculation unit is used for calculating texture coordinates and normal directions of model vertexes of the model frame;
and the three-dimensional model generating unit is used for obtaining a target three-dimensional model based on the three-dimensional position data and the texture coordinates and normal directions of model vertexes in the model frame.
Optionally, the system further includes:
and the surface random point generating module is used for generating the three-dimensional model of the preset type in a surface random point generating mode in the two-dimensional surface when the generation requirement of the three-dimensional model of the preset type exists in the two-dimensional surface.
According to the scheme, the three-dimensional model generation method and the three-dimensional model generation system provided by the invention have the advantages that the two-dimensional position data of the two-dimensional element corresponding to the target real scene element and the topographic data of the target real scene element are obtained; generating three-dimensional position data of a target three-dimensional model required by the corresponding target real scene element according to the two-dimensional position data and the topographic data; triangularizing two-dimensional elements corresponding to the target live-action elements; and finally, generating a target three-dimensional model corresponding to the target real scene element based on the three-dimensional position data and the triangularization result obtained by triangularization. Therefore, the scheme for automatically generating the three-dimensional model according to the actual two-dimensional position data and the terrain data has higher data manufacturing efficiency and less model data amount, and the actual two-dimensional position of the live-action element and the actual terrain data are used as data sources of the three-dimensional model, so that compared with an automatic generation mode based on the related oblique photography technology, the three-dimensional model generated by the method has higher position matching degree with the live-action element, and further the reference value of the three-dimensional electronic map is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart of a three-dimensional model generation method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a three-dimensional model generation method according to an embodiment of the present invention;
FIG. 3 is a schematic view of a face and sides of a body of a faceless triangulated form according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a triangular patch generated from width and polyline in line horizontal triangulation provided by embodiments of the present invention;
FIG. 5 is a schematic flow chart of a three-dimensional model generation method according to an embodiment of the present invention;
fig. 6-9 are schematic structural diagrams of a three-dimensional model generation system provided by an embodiment of the invention.
Detailed Description
For the sake of reference and clarity, the technical terms, abbreviations or abbreviations used hereinafter are to be interpreted in summary as follows:
elevation: the distance from a certain point to the absolute base plane along the direction of the plumb line is called the absolute elevation of the point, and is called elevation for short.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a three-dimensional model generation method, which may be applied to a three-dimensional electronic map, and with reference to a flow diagram of the three-dimensional model generation method shown in fig. 1, the method may include the following steps:
s101: and acquiring two-dimensional position data of the two-dimensional elements corresponding to the target real scene elements and topographic data of the target real scene elements.
The target live-action element can be a modeling object required to be aimed at when the three-dimensional model of the electronic map is generated on a green land, a road, a fence, water and the like. The two-dimensional elements may be elements such as two-dimensional points, lines, and surfaces corresponding to the target real-scene elements, and taking the target real-scene elements as greenbelts, roads, fences, and water as an example, the two-dimensional elements of the target real-scene elements may be two-dimensional greenbelts, road surfaces, fence lines, water surfaces, and the like corresponding to the target real-scene elements.
The invention adopts the two-dimensional position data of the two-dimensional elements corresponding to the actually measured target live-action elements and the topographic data of the target live-action elements as the data source required for generating the three-dimensional model.
In practical application, two-dimensional position data and topographic data of two-dimensional elements of various target real scene elements (such as greenbelts, roads, fences, water, trees and the like) can be obtained through manual measurement and the like, so that data basis is provided for generating a three-dimensional model of a three-dimensional electronic map.
S102: and generating three-dimensional position data of the target three-dimensional model required by the target real scene element according to the two-dimensional position data and the topographic data.
On the basis of obtaining the two-dimensional position data of the two-dimensional elements corresponding to the target real-scene elements and the topographic data of the target real-scene elements, the three-dimensional position data of a target three-dimensional model corresponding to the target real-scene elements can be generated by utilizing the two-dimensional position data and combining the topographic data, so that the generated three-dimensional model can be well matched with the actual positions and the elevation values of the real-scene elements.
S103: and triangularizing the two-dimensional elements corresponding to the target real scene elements.
In an electronic map, the generation of complete three-dimensional model data requires the generation of necessary three-dimensional position data, and also requires the execution of some other processing procedures, such as triangularization of two-dimensional elements corresponding to target real scene elements, and calculation of model vertex texture coordinates and normal directions based on the triangularization result.
Specifically, the two-dimensional elements may be triangulated in a corresponding triangularization manner according to the type of the two-dimensional elements and the type of the target three-dimensional model to be generated, which will be described in detail in the following embodiments.
S104: and generating a target three-dimensional model corresponding to the target real scene element based on the three-dimensional position data and the triangularization result obtained by triangularization.
After the triangularization result is obtained through the triangularization processing, for example, after a model frame including each triangular patch generated on the basis of the triangularization is obtained, other necessary processing steps in the three-dimensional model generation process (such as calculating texture coordinates, normal directions and the like of model vertices) can be continuously executed, and finally, a target three-dimensional model corresponding to a target live-action element is generated by combining result data of each processing step, for example, a three-dimensional green space model, a three-dimensional road model, a three-dimensional fence model and the like corresponding to a green space, a road, a fence and the like are generated.
As can be seen from the above solutions, the three-dimensional model generation method provided in the embodiment of the present invention obtains two-dimensional position data of a two-dimensional element corresponding to a target real-scene element, and topographic data of the target real-scene element; generating three-dimensional position data of a target three-dimensional model required by the corresponding target real scene element according to the two-dimensional position data and the topographic data; triangularizing two-dimensional elements corresponding to the target live-action elements; and finally, generating a target three-dimensional model corresponding to the target real scene element based on the three-dimensional position data and the triangularization result obtained by triangularization. Therefore, the scheme for automatically generating the three-dimensional model according to the actual two-dimensional position data and the topographic data has higher data manufacturing efficiency and less model data amount, and the actual two-dimensional position data and the topographic data corresponding to the real scene elements are used as data sources of the three-dimensional model, so that compared with an automatic generation mode based on the related oblique photography technology, the three-dimensional model generated by the method has higher position matching degree with the real scene elements, and further the reference value of the three-dimensional electronic map is improved.
In yet another embodiment of the present invention, the above method is described in more detail. Referring to fig. 2, another flow diagram of a three-dimensional model generation method is shown, which can be implemented by:
s201: and acquiring two-dimensional position data of the two-dimensional elements corresponding to the target real scene elements and topographic data of the target real scene elements.
The two-dimensional position data of the two-dimensional element includes a position coordinate of each point on the two-dimensional element, which may include, for example, a two-dimensional green ground, a two-dimensional road surface, or a two-dimensional horizontal two-dimensional coordinate of each point, and the two-dimensional coordinate may be a longitude and latitude coordinate, or may also be an xy coordinate in a common planar rectangular coordinate system, which is not limited in the present invention.
The terrain data of the target real-scene element may include, but is not limited to, elevation data of the target real-scene element, and the elevation data may specifically include an elevation value or the like of each point on the target real-scene element or each point on a two-dimensional element of the target real-scene element.
S202: and acquiring an elevation value of each point from the topographic data according to the position coordinates of each point in the two-dimensional elements, and correspondingly endowing the acquired elevation value to each point in the two-dimensional elements.
On the basis of obtaining the position coordinates of each point on the two-dimensional elements of the target real-scene elements and the terrain elevation data of the target real-scene elements, the step obtains the elevation value of each point in the two-dimensional elements from the terrain data according to the position coordinates of the two-dimensional elements, and correspondingly endows the obtained elevation value to each point in the two-dimensional elements, so that each point in the two-dimensional elements has elevation information besides two-dimensional position information matched with the actual space position of the target real-scene elements, and a basis is provided for three-dimensional position data of a three-dimensional space required in the generation of a three-dimensional model.
S203: and generating three-dimensional position data of the target three-dimensional model according to the position coordinates and the elevation values corresponding to each point in the two-dimensional elements.
Specifically, the three-dimensional coordinates corresponding to the corresponding two-dimensional surface or line in the three-dimensional space in the three-dimensional model may be generated according to the two-dimensional position coordinates of each point on the two-dimensional element and the elevation value corresponding to each point, for example, taking the green space as an example, the actual two-dimensional position coordinate value of each point in the two-dimensional green space may be directly used as the horizontal two-axis coordinate value of each point on the green space included in the three-dimensional green space model, the elevation value corresponding to each point in the two-dimensional green space may be directly used as the vertical axis coordinate value of each point on the green space included in the three-dimensional green space model, and the. The generated three-dimensional model can be matched with the real scene element in two-dimensional position and terrain elevation.
S204: and triangulating the two-dimensional elements by using a corresponding triangularization mode according to the types of the two-dimensional elements and the type of the target three-dimensional model to be generated.
In the three-dimensional electronic map, the components of the three-dimensional model include the three-dimensional position data described above, as well as triangulated structure information of the model, and information such as texture coordinates and normal directions of vertices of the model. In view of this, this step obtains triangulated structure information of the target three-dimensional model by triangulating the two-dimensional elements of the target real scene element.
And selecting a corresponding triangulation mode to triangulate the two-dimensional elements according to the types of the two-dimensional elements and the type of the target three-dimensional model to be generated. The type of the two-dimensional element can be, for example, a green space type, a road surface type, a fence type, and the like, and the type of the target three-dimensional model can be correspondingly a three-dimensional green space model, a three-dimensional road model, a three-dimensional fence model, and the like. The triangularization may include, but is not limited to, undirected triangularization, directed triangularization, horizontal triangularization of lines, and vertical triangularization of lines.
The different triangularization used for the different types of models will be described below.
1) Surface non-oriented triangulation:
in particular, triangularization configuration information for certain types of three-dimensional models needs to be generated by triangularization of faces, and the triangularization of these faces is non-directional, such as green, road, water, and the like types. For these types, when triangularization is performed, first, the two-dimensional surfaces (i.e., the two-dimensional surfaces corresponding to the two-dimensional elements) of these types of target real scene elements are triangulated, for example, the two-dimensional green ground or the two-dimensional water surface can be triangulated in an undirected manner, so as to generate the main body surface of the three-dimensional model, and then the side edges are generated in different ways according to the types of the generated models, as shown in fig. 3, for example, the green ground needs to be moved up, then vertical fence surfaces are added around, and the water needs to be moved down, and vertical fences are generated around.
2) The surface is triangulated:
the triangulation of some surfaces is directional, for example, crosswalk and the like, taking crosswalk as an example, triangulation structure information of a three-dimensional model of the crosswalk is generated by triangulating a two-dimensional crosswalk surface, and because the zebra stripes in the crosswalk are directional and must be crossed in the middle of the road, the crosswalk surface of two-dimensional data is required to be quadrilateral, and has obvious long and short sides, and the long and short sides are approximately vertical. On this basis, this type of triangularization process is the same as the process of undirected triangularization, and will not be described in detail here.
3) Line horizontal triangulation:
for some types of three-dimensional model triangularization construction information, the triangularization-generated triangular patches are parallel to a horizontal plane, such as the border lines of roads, the middle yellow lines of roads, the lane lines and the like, and for such types, referring to fig. 4, the invention specifically generates the triangular patches according to the widths and folding lines of two-dimensional lines of target real scene elements (generally, the border lines, the middle yellow lines of roads, the lane lines and the like are bent to some extent in the length direction, and the two-dimensional lines without bending can be regarded as special folding lines). For example, a triangular patch of the lane line may be generated based on the width and the broken line of the lane line.
4) The lines are vertically triangulated,
triangularization construction information for some types of three-dimensional models is achieved by vertical triangulation of lines, i.e., triangularly generated triangular patches that are perpendicular to a horizontal plane, such as a fence, a railing, etc., the triangularly generated faces of such models are both double-sided to enable double-sided viewing.
S205: and obtaining a model frame of the target three-dimensional model based on the triangulation result, wherein the model frame comprises all triangular patches corresponding to the triangulation result, and auxiliary patches are added in the corresponding triangular patches included by the model frame.
After triangularization is performed on two-dimensional elements of the target real scene element, triangularization construction information of the three-dimensional model, namely, individual triangular patches, can be obtained, on the basis, a model frame of the three-dimensional model can be obtained based on the triangularization construction information of the three-dimensional model, and then, according to actual model requirements, auxiliary patches with different display characteristics can be added on corresponding triangular patches of the model, for example, side triangular patches of the three-dimensional green space model or the three-dimensional road model.
S206: and calculating texture coordinates and normal directions of model vertexes of the model frame.
Based on the model frame obtained after the triangulation, texture coordinates and normal directions of all vertexes on the model are calculated.
For the model obtained by the surface undirected triangulation, the texture coordinates of each vertex in the model can be distributed according to the coordinate values (such as x-axis coordinate values and y-axis coordinate values) of the vertex in two axial directions of a horizontal plane, that is, the picture where the vertex is located is tiled, and the texture coordinates are distributed without considering the coordinate values of the vertex in the vertical axial direction, for example, the x-axis coordinate values and the y-axis coordinate values of the vertex can be directly assigned to the u-axis coordinate, the v-axis coordinate and the like in the texture coordinates respectively, or, in order to save the storage space, the translation result can be assigned to the u-axis coordinate, the v-axis coordinate and the like in the texture coordinates after the x-axis coordinate values and the y. The normal direction of each vertex in the model obtained by the face-directed triangulation method can be obtained by the normal direction weighted average of the adjacent triangles.
The model obtained by the surface-oriented triangulation method has the same normal generation method for each vertex as the normal generation method for the model vertex in the surface-undirected triangulation method. The generation of the texture coordinates is relatively complex, the texture coordinates are firstly tiled according to the method, the rotation amount required by the texture coordinates is calculated according to the long side direction, and then the rotation amount is multiplied by the two axial coordinates of the horizontal plane of each vertex of the model to obtain the texture coordinates of each vertex.
For the model obtained by the line horizontal triangulation, the texture coordinates of each vertex are obtained according to the length of the vertex of the corresponding polyline, which is specifically shown in fig. 4. And the normal direction of each vertex in the model is obtained by a weighted average of the normal directions of its adjoining triangles.
For the model obtained by the line vertical triangulation method, the generation method of the texture coordinates and the normal direction of the model vertex is similar to the generation method in the line horizontal triangulation method, and the generation method of the texture coordinates and the normal direction in the line horizontal triangulation method can be referred to specifically, and details are not described here.
S207: and obtaining a target three-dimensional model based on the three-dimensional position data, the attached patches added in the model frame and the texture coordinates and normal directions of model vertexes in the model frame.
On the basis of obtaining the data of each component element required for generating the three-dimensional model, such as obtaining the data of each element, such as three-dimensional position data, an attached patch added to the model frame, texture coordinates and normal directions of each model vertex in the model frame, the target three-dimensional model corresponding to the target live-action element can be finally generated based on the obtained data of each component element.
The three-dimensional model generation method of the embodiment realizes a scheme of automatically generating the three-dimensional model according to the actual two-dimensional position data and the terrain data, has higher data production efficiency and less model data volume, and has higher position matching degree between the generated three-dimensional model and the real scene element compared with an automatic generation mode based on oblique photography related technology because the actual two-dimensional position data and the actual terrain data corresponding to the real scene element are used as data sources of the three-dimensional model, thereby improving the reference value of the three-dimensional electronic map.
In another embodiment of the present invention, referring to the flowchart of the three-dimensional model generation method shown in fig. 5, the method may further include:
s105: when the generation requirement of the three-dimensional model of the preset type exists in the two-dimensional plane, the three-dimensional model of the preset type is generated in a plane random point generation mode in the two-dimensional plane.
Some three-dimensional models are generated by random generation within a two-dimensional plane, such as the generation of a tree. More specifically, for example, a series of tree models needs to be randomly generated in a two-dimensional green ground, the generation of the three-dimensional tree model is specifically realized by adopting a surface random point manner in the present embodiment.
Specifically, taking the generation of the tree model in the two-dimensional green ground as an example, by using the surface random point generation method, some points may be generated randomly in the two-dimensional green ground, and given elevation values to the points, and then some tree models which are made in advance and correspond to the given elevation values are added to the positions of the points, and the normal direction and texture coordinates of the tree already exist in the pre-generated tree model. Wherein, the tree is divided into three kinds: the point tree, the linear tree, and the planar tree are distinguished in that the point tree is sparse (i.e., a few tree models with a small number and a small number constitute a point tree region), the planar tree is dense (i.e., a series of tree models with a large number and a large density constitute a planar tree region), and the linear tree is distributed near a certain line.
The randomly generated algorithm is different according to the tree type. For a point tree and a surface tree, points can be randomly generated in a two-dimensional surface (such as a two-dimensional green ground surface), and whether the points are point-shaped or surface-shaped can be controlled by setting different generation probabilities of the points, wherein the generation probability of the points corresponding to the point tree is smaller, the generation probability of the points corresponding to the surface-shaped tree is larger, and then the random points with shorter distance can be removed by setting the interval of the trees; specifically, for a planar tree, points may be randomly generated along the boundary of the surface, and then random points closer in distance may be set for the tree.
The present invention provides, in the following embodiments, a three-dimensional model generation system, referring to a schematic structural diagram of the three-dimensional model generation system shown in fig. 6, the system including:
an obtaining module 100, configured to obtain two-dimensional position data of a two-dimensional element corresponding to a target real-scene element, and topographic data of the target real-scene element; a three-dimensional position data generating module 200, configured to generate three-dimensional position data of a target three-dimensional model required by the target real-scene element according to the two-dimensional position data and the terrain data; a triangularization module 300, configured to triangulate the two-dimensional elements corresponding to the target real scene element; and a three-dimensional model generating module 400, configured to generate a target three-dimensional model corresponding to the target real scene element based on the three-dimensional position data and the triangularization result obtained by triangularization.
In an implementation manner of the embodiment of the present invention, referring to fig. 7, the three-dimensional position data generating module 200 in the system includes: the assignment unit 210 is configured to obtain an elevation value of each point from the topographic data according to the position coordinate of each point in the two-dimensional element, and assign the obtained elevation value to each point in the two-dimensional element correspondingly; and a three-dimensional position data generating unit 220, configured to generate three-dimensional position data of the target three-dimensional model according to the position coordinates and the elevation value corresponding to each point in the two-dimensional elements.
In an implementation manner of the embodiment of the present invention, the triangularization module 300 is specifically configured to: triangularizing the two-dimensional elements by using a corresponding triangularization mode according to the types of the two-dimensional elements and the type of a target three-dimensional model to be generated; the triangulation mode comprises surface undirected triangulation, surface directed triangulation, line horizontal triangulation and line vertical triangulation.
In an implementation manner of the embodiment of the present invention, referring to fig. 8, the three-dimensional model generating module 400 includes: a patch adding unit 410, configured to obtain a model frame of the target three-dimensional model based on the triangularization result, where the model frame includes each triangular patch corresponding to the triangularization result; adding auxiliary patches in corresponding triangular patches included in the model frame; a calculating unit 420, configured to calculate texture coordinates and a normal direction of each model vertex of the model frame; and a three-dimensional model generating unit 430, configured to obtain a target three-dimensional model based on the three-dimensional position data and texture coordinates and normal directions of model vertices in the model frame.
In an implementation manner of the embodiment of the present invention, referring to fig. 9, the system further includes: and a surface random point generating module 500, configured to generate a three-dimensional model of a predetermined type in a surface random point generating manner in a two-dimensional plane when there is a demand for generating the three-dimensional model of the predetermined type in the two-dimensional plane.
For the three-dimensional model generation system disclosed in the embodiment of the present invention, since it corresponds to the three-dimensional model generation method disclosed in each of the above embodiments, the description is relatively simple, and for the relevant similarities, please refer to the description of the three-dimensional model generation method in each of the above embodiments, and the detailed description is omitted here.
In summary, embodiments of the present invention provide a method and a system for generating a three-dimensional model automatically according to actual two-dimensional position data and topographic data, which have higher data production efficiency and less model data amount, and because the method uses the actual two-dimensional position data and topographic data corresponding to real scene elements as data sources of the three-dimensional model, compared with an automatic generation method based on oblique photography related technologies, the three-dimensional model generated by the method and the system have higher position matching degree with the real scene elements, thereby improving the reference value of a three-dimensional electronic map.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
For convenience of description, the above system or apparatus is described as being divided into various modules or units by function, respectively. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
Finally, it is further noted that, herein, relational terms such as first, second, third, fourth, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (8)

1. A method of generating a three-dimensional model, comprising:
acquiring two-dimensional position data of a two-dimensional element corresponding to the target real scene element and topographic data of the target real scene element;
generating three-dimensional position data of a target three-dimensional model required by the target real scene element according to the two-dimensional position data and the terrain data;
triangularizing the two-dimensional elements corresponding to the target real scene elements;
generating a target three-dimensional model corresponding to the target real scene element based on the three-dimensional position data and the triangularization result obtained by triangularization;
triangularization is performed on the two-dimensional elements corresponding to the target real scene elements, and the triangularization includes:
triangularizing the two-dimensional elements by using a corresponding triangularization mode according to the types of the two-dimensional elements and the type of a target three-dimensional model to be generated;
the triangularization mode at least comprises undirected surface triangularization, directed surface triangularization, horizontal line triangularization and vertical line triangularization;
if the triangularization structure information of the three-dimensional model needs to be generated by triangularization of the surfaces, and the triangularization of the surfaces is non-directional, triangularization is performed on the two-dimensional elements corresponding to the target real scene elements by using a surface non-directional triangularization mode, and the process comprises the following steps: triangularizing a two-dimensional surface corresponding to the two-dimensional element of the target real scene element to generate a main body surface of the target three-dimensional model; generating a side edge corresponding to the main body surface based on the type of the target three-dimensional model corresponding to the target real scene element;
if the triangularization structure information of the three-dimensional model needs to be generated through surface triangularization, and the triangularization of the surfaces is directional, the two-dimensional elements corresponding to the target real scene elements are triangulated in a mode that the surfaces are triangulated, and the process comprises the following steps: triangularizing a two-dimensional surface corresponding to the two-dimensional element of the target real scene element to generate a main body surface which has a direction and long and short sides of the target three-dimensional model; generating a side edge corresponding to the main body surface based on the type of the target three-dimensional model corresponding to the target real scene element;
if the triangularization structure information of the three-dimensional model needs to be realized by the horizontal triangulation of the line, triangularizing the two-dimensional elements corresponding to the target real scene elements by using the horizontal triangulation of the line, wherein the process comprises the following steps: generating a triangular patch parallel to a horizontal plane according to the width of the two-dimensional line of the target real scene element and a broken line;
if the triangularization construction information of the three-dimensional model is realized by the vertical triangularization of the line, triangularization is carried out on the two-dimensional elements corresponding to the target real scene elements by using the vertical triangularization mode of the line, and the process comprises the following steps: and triangulating the two-dimensional surface corresponding to the two-dimensional element of the target real scene element to generate a two-sided triangular patch perpendicular to the horizontal plane.
2. A method according to claim 1, wherein the two-dimensional position data for the two-dimensional elements comprises position coordinates for the two-dimensional elements, and the terrain data comprises elevation value data for the target real-world elements;
generating three-dimensional position data of a target three-dimensional model required by the target real scene element according to the two-dimensional position data and the terrain data, wherein the three-dimensional position data comprises:
acquiring an elevation value of each point from the topographic data according to the position coordinates of each point in the two-dimensional elements, and correspondingly endowing the acquired elevation value to each point in the two-dimensional elements;
and generating three-dimensional position data of the target three-dimensional model according to the position coordinates and the elevation values corresponding to each point in the two-dimensional elements.
3. The method of claim 1, wherein generating the target three-dimensional model of the target real scene element based on the three-dimensional position data and the triangularization result comprises:
obtaining a model frame of the target three-dimensional model based on the triangularization result, wherein the model frame comprises all triangular patches corresponding to the triangularization result; adding auxiliary patches in corresponding triangular patches included in the model frame;
calculating texture coordinates and normal directions of model vertexes of the model frame;
and obtaining a target three-dimensional model based on the three-dimensional position data, the attached patches added in the model frame and the texture coordinates and normal directions of model vertexes in the model frame.
4. The method according to any one of claims 1-3, further comprising:
when the generation requirement of the three-dimensional model of the preset type exists in the two-dimensional plane, the three-dimensional model of the preset type is generated in a plane random point generation mode in the two-dimensional plane.
5. A three-dimensional model generation system, comprising:
the acquisition module is used for acquiring two-dimensional position data of the two-dimensional elements corresponding to the target real scene elements and topographic data of the target real scene elements;
the three-dimensional position data generation module is used for generating three-dimensional position data of a target three-dimensional model required by the corresponding target real scene element according to the two-dimensional position data and the terrain data;
the triangularization module is used for triangularizing the two-dimensional elements corresponding to the target real scene elements;
the three-dimensional model generating module is used for generating a target three-dimensional model corresponding to the target real scene element based on the three-dimensional position data and the triangularization result obtained by triangularization;
the triangularization module is specifically configured to: triangularizing the two-dimensional elements by using a corresponding triangularization mode according to the types of the two-dimensional elements and the type of a target three-dimensional model to be generated;
the triangularization mode at least comprises undirected surface triangularization, directed surface triangularization, horizontal line triangularization and vertical line triangularization;
if the triangularization structure information of the three-dimensional model needs to be generated by triangularization of the surfaces, and the triangularization of the surfaces is non-directional, the triangularization module triangularizes the two-dimensional elements corresponding to the target real scene element by using a surface non-directional triangularization mode, and the process comprises the following steps: triangularizing a two-dimensional surface corresponding to the two-dimensional element of the target real scene element to generate a main body surface of the target three-dimensional model; generating a side edge corresponding to the main body surface based on the type of the target three-dimensional model corresponding to the target real scene element;
if the triangularization structure information of the three-dimensional model needs to be generated through surface triangularization, and the triangularization of the surfaces is directional, the two-dimensional elements corresponding to the target real scene elements are triangulated in a mode that the surfaces are triangulated, and the process comprises the following steps: triangularizing a two-dimensional surface corresponding to the two-dimensional element of the target real scene element to generate a main body surface which has a direction and long and short sides of the target three-dimensional model; generating a side edge corresponding to the main body surface based on the type of the target three-dimensional model corresponding to the target real scene element;
if the triangularization structure information of the three-dimensional model needs to be realized by the horizontal triangulation of the line, triangularizing the two-dimensional elements corresponding to the target real scene elements by using the horizontal triangulation of the line, wherein the process comprises the following steps: generating a triangular patch parallel to a horizontal plane according to the width of the two-dimensional line of the target real scene element and a broken line;
if the triangularization construction information of the three-dimensional model is realized by the vertical triangularization of the line, triangularization is carried out on the two-dimensional elements corresponding to the target real scene elements by using the vertical triangularization mode of the line, and the process comprises the following steps: and triangulating the two-dimensional surface corresponding to the two-dimensional element of the target real scene element to generate a two-sided triangular patch perpendicular to the horizontal plane.
6. The system of claim 5, wherein the two-dimensional position data of the two-dimensional elements comprises position coordinates of the two-dimensional elements, and the terrain data comprises elevation value data of the target real-world elements;
the three-dimensional position data generation module includes:
the assignment unit is used for acquiring an elevation value of each point from the topographic data according to the position coordinates of each point in the two-dimensional elements and correspondingly endowing the acquired elevation value to each point in the two-dimensional elements;
and the three-dimensional position data generating unit is used for generating three-dimensional position data of the target three-dimensional model according to the position coordinates and the elevation values corresponding to each point in the two-dimensional elements.
7. The system of claim 5, wherein the three-dimensional model generation module comprises:
the surface patch adding unit is used for obtaining a model frame of the target three-dimensional model based on the triangularization result, and the model frame comprises all triangular surface patches corresponding to the triangularization result; adding auxiliary patches in corresponding triangular patches included in the model frame;
the calculation unit is used for calculating texture coordinates and normal directions of model vertexes of the model frame;
and the three-dimensional model generating unit is used for obtaining a target three-dimensional model based on the three-dimensional position data and the texture coordinates and normal directions of model vertexes in the model frame.
8. The system of any one of claims 5-7, further comprising:
and the surface random point generating module is used for generating the three-dimensional model of the preset type in a surface random point generating mode in the two-dimensional surface when the generation requirement of the three-dimensional model of the preset type exists in the two-dimensional surface.
CN201710703847.XA 2017-08-16 2017-08-16 Three-dimensional model generation method and three-dimensional model generation system Active CN107481321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710703847.XA CN107481321B (en) 2017-08-16 2017-08-16 Three-dimensional model generation method and three-dimensional model generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710703847.XA CN107481321B (en) 2017-08-16 2017-08-16 Three-dimensional model generation method and three-dimensional model generation system

Publications (2)

Publication Number Publication Date
CN107481321A CN107481321A (en) 2017-12-15
CN107481321B true CN107481321B (en) 2021-02-26

Family

ID=60598906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710703847.XA Active CN107481321B (en) 2017-08-16 2017-08-16 Three-dimensional model generation method and three-dimensional model generation system

Country Status (1)

Country Link
CN (1) CN107481321B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110136184B (en) * 2018-02-02 2022-11-29 云南电网有限责任公司保山供电局 Method for site selection of transformer substation by oblique photography modeling
CN108230424B (en) * 2018-02-09 2021-11-02 城市生活(北京)资讯有限公司 Line display method and line display system
CN109064542B (en) * 2018-06-06 2019-11-19 贝壳找房(北京)科技有限公司 Threedimensional model surface hole complementing method and device
CN110738734B (en) * 2019-10-14 2023-05-30 北京代码乾坤科技有限公司 Three-dimensional topography model generation method and device, processor and electronic device
CN111047682B (en) * 2019-11-22 2023-04-25 佛山科学技术学院 Three-dimensional lane model generation method and system
CN113870428A (en) * 2021-09-29 2021-12-31 北京百度网讯科技有限公司 Scene map generation method, related device and computer program product
CN114155346B (en) * 2021-11-19 2022-10-11 埃洛克航空科技(北京)有限公司 Data processing method and device for terrain matching
CN115797506B (en) * 2022-12-16 2023-11-17 江苏泽景汽车电子股份有限公司 Method, device, terminal equipment and storage medium for drawing lane line object

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740256A (en) * 2014-12-09 2016-07-06 高德信息技术有限公司 Generation method and generation device of three-dimensional map
CN105976426A (en) * 2016-04-27 2016-09-28 中国电子科技集团公司第二十八研究所 Rapid three-dimensional ground object model construction method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780736B (en) * 2017-01-09 2021-04-27 网易(杭州)网络有限公司 Map data processing method and device and three-dimensional map generation method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740256A (en) * 2014-12-09 2016-07-06 高德信息技术有限公司 Generation method and generation device of three-dimensional map
CN105976426A (en) * 2016-04-27 2016-09-28 中国电子科技集团公司第二十八研究所 Rapid three-dimensional ground object model construction method

Also Published As

Publication number Publication date
CN107481321A (en) 2017-12-15

Similar Documents

Publication Publication Date Title
CN107481321B (en) Three-dimensional model generation method and three-dimensional model generation system
US9149309B2 (en) Systems and methods for sketching designs in context
CN109186551B (en) Method and device for extracting characteristic points of oblique photogrammetry building and storage medium
CN109269472B (en) Method and device for extracting characteristic line of oblique photogrammetry building and storage medium
WO2022227910A1 (en) Virtual scene generation method and apparatus, and computer device and storage medium
CN105976426B (en) A kind of quick three-dimensional atural object model building method
CN104835202A (en) Quick three-dimensional virtual scene constructing method
TW200935353A (en) Geospatial modeling system and related method using multiple sources of geographic information
US10235800B2 (en) Smoothing 3D models of objects to mitigate artifacts
US10679521B1 (en) Generating a three-dimensional physical map using different data sources
Cosido et al. Hybridization of convergent photogrammetry, computer vision, and artificial intelligence for digital documentation of cultural heritage-a case study: the magdalena palace
CN114061548B (en) Building surveying and mapping method and system based on unmanned aerial vehicle remote sensing
CN113048980A (en) Pose optimization method and device, electronic equipment and storage medium
CN115082699B (en) Contour shape extraction method and device, electronic equipment and storage medium
CN114494627A (en) City model generation method, device, equipment and computer readable storage medium
CN113920275B (en) Triangular mesh construction method and device, electronic equipment and readable storage medium
CN109163708B (en) Optimization method, device and medium for unmanned aerial vehicle large-scale topographic map house line
CN115409957A (en) Map construction method based on illusion engine, electronic device and storage medium
CN111161123A (en) Decryption method and device for three-dimensional live-action data
CN109241233A (en) A kind of coordinate matching method and device
CN112686945A (en) Web-based three-dimensional terrain surface area measurement method
CN117132737A (en) Three-dimensional building model construction method, system and equipment
Wate et al. Formulation of hierarchical framework for 3D-GIS data acquisition techniques in context of Level-of-Detail (LoD)
CN113936106A (en) Three-dimensional visualization method and system of monitoring map and related equipment
Lesparre et al. Simplified 3D city models from LiDAR

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant