CN113112603B - Method and device for optimizing three-dimensional model - Google Patents

Method and device for optimizing three-dimensional model Download PDF

Info

Publication number
CN113112603B
CN113112603B CN202110384015.2A CN202110384015A CN113112603B CN 113112603 B CN113112603 B CN 113112603B CN 202110384015 A CN202110384015 A CN 202110384015A CN 113112603 B CN113112603 B CN 113112603B
Authority
CN
China
Prior art keywords
model
vertex
dimensional model
bim
contour
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
CN202110384015.2A
Other languages
Chinese (zh)
Other versions
CN113112603A (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110384015.2A priority Critical patent/CN113112603B/en
Publication of CN113112603A publication Critical patent/CN113112603A/en
Application granted granted Critical
Publication of CN113112603B publication Critical patent/CN113112603B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/10Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method and a device for optimizing a three-dimensional model, and relates to the technical field of computers. One embodiment of the method comprises the following steps: extracting boundary outline information of a monomer building from the BIM three-dimensional model to obtain outline polygon data of the BIM; converting the outline polygon data into a station center coordinate system of the oblique photogrammetry three-dimensional model to obtain BIM outline polygon vertexes; and modifying vertex coordinates of the vertices by using an access callback function according to the relation between each vertex in the oblique photogrammetry three-dimensional model and the BIM outline polygon vertex so as to optimize the oblique photogrammetry three-dimensional model. According to the embodiment, the 'hole' in the oblique photogrammetry three-dimensional model can be repaired, so that local details are more consistent with the real model, elements irrelevant to the environment in the three-dimensional model can be removed, and the display effect of the three-dimensional model is improved; the vertex data can be modified before the graphic drawing in a data preprocessing mode, so that the graphic display pressure is reduced.

Description

Method and device for optimizing three-dimensional model
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for optimizing a three-dimensional model.
Background
Three-dimensional model data acquired based on unmanned aerial vehicle oblique photogrammetry has the advantages of high precision, abundant information, visual and vivid effect, quick acquisition and the like. However, the defects of the unmanned aerial vehicle oblique photography three-dimensional model are obvious due to the limitations of data acquisition and technical means.
Because the unmanned aerial vehicle cannot shoot the shielded area, the generated three-dimensional model has a hole; when the ground photo participating in modeling is insufficient in precision, local details are not consistent with a real model; because the shooting is completely a live-action photo, the generated three-dimensional model is 'excessively real', and people, vehicles and temporary facilities irrelevant to the environment at the shooting moment can be built in the three-dimensional model.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a method and an apparatus for optimizing a three-dimensional model, which can repair a "hole" in a three-dimensional model of oblique photogrammetry, so that local details are more consistent with a real model, and elements in the three-dimensional model that are irrelevant to the environment can be removed, thereby improving the display effect of the three-dimensional model; the vertex data can be modified before the graphic drawing in a data preprocessing mode, so that the graphic display pressure is reduced.
To achieve the above object, according to a first aspect of an embodiment of the present invention, there is provided a method for optimizing a three-dimensional model, including:
extracting boundary outline information of a monomer building from a BIM three-dimensional model to obtain outline polygon data of the BIM model;
converting the outline polygon data into a station-core coordinate system of an oblique photogrammetry three-dimensional model to obtain BIM outline polygon vertexes;
And modifying vertex coordinates of the vertexes by using an access callback function according to the relation between each vertex in the oblique photogrammetry three-dimensional model and the BIM outline polygon vertexes so as to optimize the oblique photogrammetry three-dimensional model.
Optionally, the method further comprises: and after the contour polygon data are converted into a station core coordinate system of the oblique photogrammetry three-dimensional model, extracting a boundary vertex coordinate sequence at the lowest height from the converted contour polygon data as the BIM contour polygon vertex.
Optionally, the model file in the oblique photogrammetry three-dimensional model is stored in OSGB format;
Modifying vertex coordinates of the vertex using an access callback function, comprising: acquiring a root node of each model file, traversing all Geode nodes under the root node according to node information of the root node, and acquiring a model vertex array which corresponds to each model file and needs to be processed to obtain a candidate model vertex set; and modifying vertex coordinates of the model vertices according to the relation between each model vertex in the candidate model vertex set and the BIM outline polygon vertex.
Optionally, the method further comprises: the array of model vertices in the set of candidate model vertices that are not spatially associated with the boundary contour data is screened out before the vertex coordinates of the model vertices are modified according to the relationship between each model vertex in the set of candidate model vertices and the BIM contour polygon vertices.
Optionally, screening out the array of model vertices in the candidate model vertex set that are not spatially associated with the boundary contour data, including:
Determining a first boundary contour bounding box according to the BIM contour polygon vertexes, and determining a corresponding second boundary contour bounding box according to the model vertex arrays of each model file; judging whether an intersection exists between the second boundary contour bounding box and a preset space region containing the first boundary contour bounding box; and if not, screening out the model vertex array corresponding to the second boundary contour bounding box in the candidate model vertex set.
Optionally, the preset spatial region is the second bounding box, or the preset spatial region is the second bounding box and a surrounding cache region thereof.
Optionally, modifying vertex coordinates of the model vertices includes:
And modifying the height of the model vertex to the height of the BIM outline polygon vertex, or determining the modified height of the model vertex according to the height of the BIM outline polygon vertex and a preset modification proportion.
According to a second aspect of an embodiment of the present invention, there is provided an apparatus for three-dimensional model optimization, including:
The data extraction module is used for extracting boundary outline information of the monomer building from the BIM three-dimensional model to obtain outline polygon data of the BIM model;
the contour determination module is used for converting the contour polygon data into a station center coordinate system of the oblique photogrammetry three-dimensional model to obtain BIM contour polygon vertexes;
and the coordinate modification module is used for modifying the vertex coordinates of the vertexes by using an access callback function according to the relation between each vertex in the oblique photogrammetry three-dimensional model and the BIM outline polygon vertexes so as to optimize the oblique photogrammetry three-dimensional model.
Optionally, the contour determination module is further configured to: and after the contour polygon data are converted into a station core coordinate system of the oblique photogrammetry three-dimensional model, extracting a boundary vertex coordinate sequence at the lowest height from the converted contour polygon data as the BIM contour polygon vertex.
Optionally, the model file in the oblique photogrammetry three-dimensional model is stored in OSGB format;
The coordinate modification module modifies vertex coordinates of the vertex using an access callback function, including: acquiring a root node of each model file, traversing all Geode nodes under the root node according to node information of the root node, and acquiring a model vertex array which corresponds to each model file and needs to be processed to obtain a candidate model vertex set; and modifying vertex coordinates of the model vertices according to the relation between each model vertex in the candidate model vertex set and the BIM outline polygon vertex.
Optionally, the coordinate modification module is further configured to: the array of model vertices in the set of candidate model vertices that are not spatially associated with the boundary contour data is screened out before the vertex coordinates of the model vertices are modified according to the relationship between each model vertex in the set of candidate model vertices and the BIM contour polygon vertices.
Optionally, the coordinate modification module screens out an array of model vertices in the candidate model vertex set that are not spatially associated with the boundary contour data, including:
Determining a first boundary contour bounding box according to the BIM contour polygon vertexes, and determining a corresponding second boundary contour bounding box according to the model vertex arrays of each model file; judging whether an intersection exists between the second boundary contour bounding box and a preset space region containing the first boundary contour bounding box; and if not, screening out the model vertex array corresponding to the second boundary contour bounding box in the candidate model vertex set.
Optionally, the preset spatial region is the second bounding box, or the preset spatial region is the second bounding box and a surrounding cache region thereof.
Optionally, the coordinate modification module modifies vertex coordinates of the model vertices, including:
And modifying the height of the model vertex to the height of the BIM outline polygon vertex, or determining the modified height of the model vertex according to the height of the BIM outline polygon vertex and a preset modification proportion.
According to a third aspect of an embodiment of the present invention, there is provided an electronic device for three-dimensional model optimization, including:
one or more processors;
Storage means for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method provided by the first aspect of the embodiments of the present invention.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements the method provided by the first aspect of embodiments of the present invention.
One embodiment of the above invention has the following advantages or benefits: by fusing the BIM three-dimensional model and the oblique photogrammetry three-dimensional model, the 'hole' in the oblique photogrammetry three-dimensional model can be repaired, so that local details are more consistent with the real model, elements irrelevant to the environment in the three-dimensional model can be removed, and the display effect of the three-dimensional model is improved; by modifying the vertex coordinates of the vertices in the oblique photogrammetry three-dimensional model by using the access callback function, vertex data can be modified before graphics rendering in a data preprocessing manner, and graphics display pressure can be reduced.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main flow of a method of three-dimensional model optimization according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of various model files in a tilted photogrammetry three-dimensional model in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of nodes of a model file in an embodiment of the invention;
FIG. 4 is a flow chart of a method of three-dimensional model optimization in an alternative embodiment of the invention;
FIG. 5 is a schematic diagram of the main modules of an apparatus for three-dimensional model optimization in accordance with an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
Fig. 7 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Three-dimensional model data acquired based on unmanned aerial vehicle oblique photogrammetry has the advantages of high precision, abundant information, visual and vivid effect, quick acquisition and the like. Compared with the traditional building artificial modeling method, the method has the following advantages: the data acquisition speed is high, the multi-angle building structure information can be acquired from the air based on the unmanned aerial vehicle, the post-processing can realize full automation, and manual intervention is not needed; the acquired data can automatically generate PagedLod (paging detail level node) models, so that the display and the scheduling of mass model data in a large range are facilitated; the generated three-dimensional model map is a live-action texture, accords with human true cognition, and has accurate geometric structure information and high precision.
However, the defects of the unmanned aerial vehicle oblique photography three-dimensional model are obvious due to the limitations of data acquisition and technical means. Because the unmanned aerial vehicle cannot shoot the shielded area, the generated three-dimensional model has a hole phenomenon; the ground photo participating in modeling is insufficient in precision, so that local details are not consistent with a real model; because the shooting is completely a live-action photo, the generated three-dimensional model is 'excessively real', and people, vehicles and temporary facilities irrelevant to the environment at the shooting moment are built in the three-dimensional model.
To remedy the above-mentioned drawbacks of the oblique photogrammetry three-dimensional model, according to a first aspect of an embodiment of the present invention, a method of three-dimensional model optimization is provided. The invention fuses and displays the three-dimensional model generated by BIM technique and the three-dimensional model generated by oblique photogrammetry.
FIG. 1 is a schematic diagram of the main flow of a method for optimizing a three-dimensional model according to an embodiment of the present invention, and as shown in FIG. 1, the method for optimizing a three-dimensional model includes: step S101, step S102, and step S103.
And step S101, extracting boundary outline information of the monomer building from a BIM (Building Information Modeling, building informatization model) three-dimensional model to obtain outline polygon data of the BIM model.
The BIM model is based on various relevant information data of the building engineering project, and is used for building the building model, and the real information of the building is simulated through digital information. Since the BIM model is a simulation model, the model generally does not include clutter information of trees, vehicles, personnel, and the like, which are irrelevant to the environment.
The single building is an independent building, such as a building, a bridge, a road, etc. According to the embodiment of the invention, the boundary contour information of the monomer building is extracted, and when the monomer building is shielded in the oblique photogrammetry three-dimensional model, the oblique photogrammetry three-dimensional model can be repaired by the boundary contour information of the monomer building extracted from the BIM model; when interference information such as personnel, vehicles and the like exists on the single building in the oblique photogrammetry three-dimensional model, the interference information in the oblique photogrammetry three-dimensional model can be cleared through boundary contour information of the single building extracted from the BIM model.
And S102, converting the outline polygon data into a station center coordinate system of the oblique photogrammetry three-dimensional model to obtain BIM outline polygon vertexes.
Typically, BIM three-dimensional model data uses a local spatial coordinate system with the model center as the origin, while oblique photogrammetry three-dimensional models use a coordinate system selected during three-dimensional reconstruction, such as the east-north-sky station coordinate system (local Cartesian coordinates coordi NATE SYSTEM). When the BIM three-dimensional model data is different from the coordinate system of the oblique photogrammetry three-dimensional model, the coordinate transformation is needed to judge the spatial relationship between the geometric coordinates of the oblique photogrammetry three-dimensional model and the boundary of the BIM three-dimensional model. Because the geometric vertex data volume of the oblique photogrammetry three-dimensional model is large in the processing process, and the boundary vertex data volume of the BIM three-dimensional model is small, from the aspect of algorithm optimization, the embodiment of the invention converts the boundary vertex coordinates of the BIM three-dimensional model into the coordinate system of the oblique photogrammetry three-dimensional model.
Optionally, after the contour polygon data is converted into the station center coordinate system of the oblique photogrammetric three-dimensional model, a boundary vertex coordinate sequence at the lowest height is extracted from the converted contour polygon data as a BIM contour polygon vertex. The BIM model is fused with the oblique photogrammetry three-dimensional model, and is equivalent to replacing part of oblique photogrammetry three-dimensional model data, and the BIM model is placed at the position of the corresponding oblique photogrammetry model. By extracting the boundary vertex coordinate sequence at the lowest position, the tearing sense of the boundary can be prevented, so that the two models are better embedded together, the BIM model is ensured not to be suspended in the air in the oblique photography three-dimensional model, and the BIM model can be best matched with the oblique photography three-dimensional model.
And step S103, modifying vertex coordinates of the vertexes by using an access callback function according to the relation between each vertex and BIM outline polygon vertexes in the oblique photogrammetry three-dimensional model so as to optimize the oblique photogrammetry three-dimensional model.
In the embodiment of the invention, the oblique photogrammetry three-dimensional model is composed of a triangular mesh, three points which are not in the same straight line form a plane, the triangular mesh is provided with three vertexes, and vertex data is the minimum unit in the embodiment of the invention. The screening surface of any shape is constituted by one or more triangular meshes.
According to the invention, the three-dimensional model data of the oblique photogrammetry is fused with the BIM three-dimensional model data, and the advantages of high acquisition speed, large space range and high tele-view fidelity of the oblique photogrammetry are utilized to construct a three-dimensional environment of the whole task area. Because the building is required to be simultaneously accessed into the interior of the building or the underground building, if the BIM three-dimensional model and the oblique photogrammetry three-dimensional model are simultaneously displayed, the surface overlapping phenomenon is caused, the visual effect is greatly influenced, and the invention modifies the oblique photogrammetry three-dimensional model data according to the geometric information of the BIM three-dimensional model, so that the problems can be avoided. Because the oblique photogrammetry three-dimensional block model has disordered interference information such as trees, vehicles, personnel and the like and influences the application effect, the invention can replace the oblique photogrammetry three-dimensional block model by using the 'clean' block model of the BIM three-dimensional model by fusing the tree, the vehicle, the personnel and the like. Illustratively, taking a tilt-photogrammetry three-dimensional model lacking part of the data as an example, a building is removed and cleaned up, if the building is presented as it is, the BIM model of the building can be placed into the tilt-photogrammetry three-dimensional model to restore the original appearance.
According to the invention, the BIM three-dimensional model is fused with the oblique photogrammetry three-dimensional model, so that a 'hole' in the oblique photogrammetry three-dimensional model can be repaired, local details are more in line with a real model, elements irrelevant to the environment in the three-dimensional model can be removed, and the display effect of the three-dimensional model is improved; by modifying the vertex coordinates of the vertices in the oblique photogrammetry three-dimensional model by using the access callback function, the vertex data can be modified before the graphics rendering in a data preprocessing mode at the data layer, and the graphics display pressure can be reduced.
Optionally, the model files in the oblique photogrammetry three-dimensional model are stored in OSGB (OpenScene Gragh Binary) format. The oblique photography three-dimensional model data is organized and stored according to OSGB format defined by the three-dimensional graphics engine openscenegraph, the data format is stored according to a golden sub-tower structure for any data block, each model file naming is named in a layer-row-column manner, and the oblique photography three-dimensional model data file storage structure is as shown in fig. 2. In the data carried by the oblique photogrammetry three-dimensional model, each OSGB file comprises four PagedLod sub-points, and a Geode geometric body node and a corresponding next-stage model file are further included under PagedLod sub-nodes. Each Geode is a geometric body containing data information of a plurality of vertices. An internal scene graph organization of a single model file is shown in fig. 3. In the vertex data modification process, a accessor may be written to traverse all Geode nodes in the collection model and then modify the vertices of each Geode node. When modifying the oblique photogrammetry three-dimensional model vertex data, the geometric vertex data of all the levels corresponding to the data block must be modified in its entirety. In the practical application process, the hierarchical relation of each data file can be constructed through the layer-row-column numbers corresponding to the file names.
The oblique photography three-dimensional model is generated by three-dimensional modeling of oblique photography data (the oblique photography data can be regarded as a photograph), then each oblique photography data photographed can be called a data block, and the data block refers to oblique photography data used for constructing the oblique photography three-dimensional model. Each data block corresponds to a model file. Modifying vertex coordinates of the vertex with the call-back function may include: acquiring a root node of each model file, traversing all Geode nodes under the root node according to node information of the root node, and acquiring a model vertex array which corresponds to each model file and needs to be processed to obtain a candidate model vertex set; and modifying the vertex coordinates of the model vertices according to the relationship between each model vertex in the candidate model vertex set and the BIM outline polygon vertices.
Optionally, the array of model vertices in the candidate set of model vertices that are not spatially associated with the boundary contour data is filtered out before modifying the vertex coordinates of the model vertices according to the relationship between each model vertex in the candidate set of model vertices and the BIM contour polygon vertices. In this way, the efficiency of how the model is can be improved.
Optionally, screening out the array of model vertices in the candidate set of model vertices that are not spatially associated with the boundary contour data, comprising: determining a first boundary contour bounding box according to BIM contour polygon vertexes, and determining a corresponding second boundary contour bounding box according to model vertex arrays of each model file; judging whether an intersection exists between the second boundary contour bounding box and a preset space region containing the first boundary contour bounding box; if not, screening out the model vertex array corresponding to the second boundary contour bounding box in the candidate model vertex set; if yes, the screening operation is not executed, and the model vertex array corresponding to the second boundary contour bounding box is reserved in the candidate model vertex set. And the deduction relation judgment is carried out according to the bounding box, so that the efficiency is high, and the consumption of computing resources is low.
The preset spatial region may be the second bounding box, or may be the second bounding box and its surrounding cache region. The person skilled in the art can make the setting selectively according to the actual situation.
Optionally, modifying vertex coordinates of the model vertices includes: modifying the height of the model vertex into the height of the BIM outline polygon vertex, or determining the modified height of the model vertex according to the height of the BIM outline polygon vertex and a preset modification proportion. The preset proportion can be selectively set according to actual conditions, and the embodiment of the invention is not particularly limited.
FIG. 4 is a flow chart of a method of three-dimensional model optimization in an alternative embodiment of the invention. The technical principle of the embodiment is that outline boundary data of a monomer building is firstly extracted from BIM data, and boundary coordinates are converted into a station center coordinate system of a three-dimensional model of oblique photogrammetry; then traversing the inclined photogrammetry model nodes, starting to process step by step from the model root node, collecting all Geode nodes in the model by using a node accessor when each piece of data is processed, judging the relationship that the vertexes of the nodes are boundaries of the BIM monomerized model, and modifying the vertex heights according to the spatial relationship; and finally, storing the modified model into a model file of a corresponding level. Specifically, the method comprises the following steps:
Step 1: and extracting boundary point coordinate data from the converted BIM model, converting the boundary point coordinate data into world coordinates through local coordinates, and extracting a boundary vertex coordinate sequence at the lowest position.
Step 2: for accurate geographic registration (including WGS84 and other geographic coordinate systems), the corresponding geographic coordinate system description and corresponding accurate mapping can be obtained through IfcCoordinateReferenceSystem (programming interface to obtain geographic coordinate system description) and IfcMapConversion (programming interface to obtain corresponding accurate mapping), and bounding box information BBbb of the boundary information is calculated.
Step 3: and acquiring a root node of the PagedLod model, indexing to a next level of child nodes according to PagedLod internal node information, and traversing and processing all child nodes.
Step 4: traversing Geode nodes in all PagedLod models aiming at each accessor node to acquire a model vertex array to be processed.
Step 5: one Geode node in all PagedLod models is traversed for each accessor node, a model vertex array to be processed is obtained, and a bounding box BBpp is calculated.
Step 6: and judging the spatial relationship between the vertexes in the Geode nodes and the BIM outline polygons. To increase the calculation speed, nodes which are not spatially related to the BIM model are quickly screened out according to bounding boxes BBbb of the boundary of the BIM model and a bounding box BBpp of the PagedLod model. When the bounding box BBpp of a PagedLod model has no intersection with the bounding box BBbb of the BIM model boundary, the bounding box BBpp is regarded as having no spatial association with the BIM model, and the corresponding Geode node is a node having no spatial association with the BIM model. Regarding the vertices outside the preset area (in this embodiment, the area where the distance between the interior of the BIM outline polygon and the surrounding area of the polygon is less than or equal to D m), it is considered that the vertices are not spatially related to the BIM model, and the vertices are directly returned to process other vertices spatially related. For spatially correlated nodes, it is further determined vertex by vertex whether it falls within BIM contour bounding box BBbb. The distance d between the vertex and the polygon is further calculated for points that do not fall within bounding box BBbb.
Step 7: the vertex height value in Geode nodes is modified to directly modify its height value to be the BIM contour polygon height for points inside the BIM contour polygon, and to proportionally modify its height for points outside the BIM contour polygon but below the maximum buffer range D m. Let BIM outline polygon height be H b, vertex height be H p in Geode node, then final height H c be:
Step 8: and (3) storing the modified data, and returning to the step (3) to process other root nodes until all the root node data are processed.
According to a second aspect of an embodiment of the present invention, there is provided an apparatus for implementing the above method.
FIG. 5 is a schematic diagram of the main modules of an apparatus for three-dimensional model optimization in accordance with an embodiment of the present invention. As shown in fig. 5, the apparatus 500 for three-dimensional model optimization includes:
the data extraction module 501 extracts boundary outline information of the monomer building from the BIM three-dimensional model to obtain outline polygon data of the BIM model;
The contour determination module 502 converts the contour polygon data into a station center coordinate system of the oblique photogrammetry three-dimensional model to obtain BIM contour polygon vertexes;
The coordinate modifying module 503 modifies the vertex coordinates of the vertices by using the access callback function according to the relationship between each vertex in the oblique photogrammetry three-dimensional model and the vertex of the BIM contour polygon, so as to optimize the oblique photogrammetry three-dimensional model.
Optionally, the contour determination module is further configured to: after the contour polygon data are converted into a station-core coordinate system of the oblique photogrammetry three-dimensional model, a boundary vertex coordinate sequence at the lowest height is extracted from the converted contour polygon data and is used as a BIM contour polygon vertex.
Optionally, the model file in the oblique photogrammetry three-dimensional model is stored in OSGB format;
The coordinate modification module modifies vertex coordinates of the vertex by using an access callback function, including: acquiring a root node of each model file, traversing all Geode nodes under the root node according to node information of the root node, and acquiring a model vertex array which corresponds to each model file and needs to be processed to obtain a candidate model vertex set; and modifying the vertex coordinates of the model vertices according to the relationship between each model vertex in the candidate model vertex set and the BIM outline polygon vertices.
Optionally, the coordinate modification module is further configured to: the array of model vertices in the candidate set of model vertices that are not spatially associated with the boundary contour data is screened out before the vertex coordinates of the model vertices are modified according to the relationship between each model vertex in the candidate set of model vertices and the BIM contour polygon vertices.
Optionally, the coordinate modification module screens out an array of model vertices in the candidate model vertex set that are not spatially associated with the boundary contour data, including:
Determining a first boundary contour bounding box according to BIM contour polygon vertexes, and determining a corresponding second boundary contour bounding box according to model vertex arrays of each model file; judging whether an intersection exists between the second boundary contour bounding box and a preset space region containing the first boundary contour bounding box; and if not, screening out the model vertex array corresponding to the second boundary contour bounding box in the candidate model vertex set.
Optionally, the preset spatial region is a second boundary contour bounding box, or the preset spatial region is a second boundary contour bounding box and a surrounding cache region thereof.
Optionally, the coordinate modification module modifies vertex coordinates of the model vertices, including: the height of the model vertices is modified to the height of the BIM contour polygon vertices.
According to a third aspect of an embodiment of the present invention, there is provided an electronic device for three-dimensional model optimization, including:
one or more processors;
Storage means for storing one or more programs,
The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method provided by the first aspect of the embodiments of the present invention.
According to a fourth aspect of embodiments of the present invention there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements the method provided by the first aspect of embodiments of the present invention.
FIG. 6 illustrates an exemplary system architecture 600 of a method of three-dimensional model optimization or apparatus of three-dimensional model optimization to which embodiments of the invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 is used as a medium to provide communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 605 via the network 604 using the terminal devices 601, 602, 603 to receive or send messages, etc. Various communication client applications such as a map or navigation class application, a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 601, 602, 603, as just examples.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 605 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using terminal devices 601, 602, 603. The background management server may perform analysis and other processing on the received data such as the three-dimensional view request of the building, and feed back the processing result (for example, the three-dimensional view of the building—only an example) to the terminal device.
It should be noted that, the method for optimizing a three-dimensional model according to the embodiment of the present invention is generally executed by the server 605, and accordingly, the device for optimizing a three-dimensional model is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, there is illustrated a schematic diagram of a computer system 700 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data VCPU 701, ROM 702, and RAM 703 necessary for the operation of the system 700 are also stored, and are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 701.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor comprising: the system comprises a data extraction module, a contour determination module and a coordinate modification module. The names of these modules do not in some cases define the module itself, and the contour determination module may also be described as a "module for extracting boundary contour information of a singulated building from a BIM three-dimensional model", for example.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: extracting boundary outline information of a monomer building from the BIM three-dimensional model to obtain outline polygon data of the BIM; converting the outline polygon data into a station center coordinate system of the oblique photogrammetry three-dimensional model to obtain BIM outline polygon vertexes; and modifying vertex coordinates of the vertices by using an access callback function according to the relation between each vertex in the oblique photogrammetry three-dimensional model and the BIM outline polygon vertex so as to optimize the oblique photogrammetry three-dimensional model.
According to the technical scheme provided by the embodiment of the invention, the BIM three-dimensional model and the oblique photogrammetry three-dimensional model are fused, so that a 'hole' in the oblique photogrammetry three-dimensional model can be repaired, local details are more in line with a real model, elements irrelevant to the environment in the three-dimensional model can be removed, and the display effect of the three-dimensional model is improved; by modifying the vertex coordinates of the vertices in the oblique photogrammetry three-dimensional model by using the access callback function, vertex data can be modified before graphics rendering in a data preprocessing manner, and graphics display pressure can be reduced.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of three-dimensional model optimization, comprising:
Extracting boundary outline information of a monomer building from a BIM three-dimensional model to obtain outline polygon data of the BIM three-dimensional model;
converting the outline polygon data into a station-core coordinate system of an oblique photogrammetry three-dimensional model to obtain BIM outline polygon vertexes;
Modifying vertex coordinates of the vertices by using an access callback function according to the relation between each vertex in the oblique photogrammetry three-dimensional model and the BIM outline polygon vertex so as to optimize the oblique photogrammetry three-dimensional model;
Modifying vertex coordinates of the vertex using an access callback function, comprising: acquiring a root node of each model file in the oblique photogrammetry three-dimensional model, traversing all Geode nodes under the root node according to node information of the root node, and acquiring a model vertex array which corresponds to each model file and needs to be processed to obtain a candidate model vertex set; and modifying vertex coordinates of the model vertices according to the relation between each model vertex in the candidate model vertex set and the BIM outline polygon vertex.
2. The method of claim 1, wherein the method further comprises: and after the contour polygon data are converted into a station core coordinate system of the oblique photogrammetry three-dimensional model, extracting a boundary vertex coordinate sequence at the lowest height from the converted contour polygon data as the BIM contour polygon vertex.
3. The method of claim 1, wherein the model files in the oblique photogrammetry three-dimensional model are stored in OSGB format.
4. A method as claimed in claim 3, wherein the method further comprises: the array of model vertices in the set of candidate model vertices that are not spatially associated with boundary contour data is screened out before the vertex coordinates of the model vertices are modified according to the relationship between each model vertex in the set of candidate model vertices and the BIM contour polygon vertices.
5. The method of claim 4, wherein screening out the array of model vertices in the set of candidate model vertices that are not spatially correlated to the boundary contour data comprises:
Determining a first boundary contour bounding box according to the BIM contour polygon vertexes, and determining a corresponding second boundary contour bounding box according to the model vertex arrays of each model file; judging whether an intersection exists between the second boundary contour bounding box and a preset space region containing the first boundary contour bounding box; and if not, screening out the model vertex array corresponding to the second boundary contour bounding box in the candidate model vertex set.
6. The method of claim 5, wherein the predetermined spatial region is the second bounding box or the predetermined spatial region is the second bounding box and surrounding cache regions.
7. The method of any of claims 3-6, wherein modifying vertex coordinates of the model vertices comprises:
And modifying the height of the model vertex to the height of the BIM outline polygon vertex, or determining the modified height of the model vertex according to the height of the BIM outline polygon vertex and a preset modification proportion.
8. An apparatus for three-dimensional model optimization, comprising:
the data extraction module is used for extracting boundary outline information of the monomer building from the BIM three-dimensional model to obtain outline polygon data of the BIM three-dimensional model;
the contour determination module is used for converting the contour polygon data into a station center coordinate system of the oblique photogrammetry three-dimensional model to obtain BIM contour polygon vertexes;
The coordinate modification module is used for modifying the vertex coordinates of the vertexes by using an access callback function according to the relation between each vertex in the oblique photogrammetry three-dimensional model and the BIM outline polygon vertexes so as to optimize the oblique photogrammetry three-dimensional model;
Modifying vertex coordinates of the vertex using an access callback function, comprising: acquiring a root node of each model file in the oblique photogrammetry three-dimensional model, traversing all Geode nodes under the root node according to node information of the root node, and acquiring a model vertex array which corresponds to each model file and needs to be processed to obtain a candidate model vertex set; and modifying vertex coordinates of the model vertices according to the relation between each model vertex in the candidate model vertex set and the BIM outline polygon vertex.
9. A three-dimensional model optimized electronic device, comprising:
one or more processors;
Storage means for storing one or more programs,
When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202110384015.2A 2021-04-09 2021-04-09 Method and device for optimizing three-dimensional model Active CN113112603B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110384015.2A CN113112603B (en) 2021-04-09 2021-04-09 Method and device for optimizing three-dimensional model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110384015.2A CN113112603B (en) 2021-04-09 2021-04-09 Method and device for optimizing three-dimensional model

Publications (2)

Publication Number Publication Date
CN113112603A CN113112603A (en) 2021-07-13
CN113112603B true CN113112603B (en) 2024-05-17

Family

ID=76715325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110384015.2A Active CN113112603B (en) 2021-04-09 2021-04-09 Method and device for optimizing three-dimensional model

Country Status (1)

Country Link
CN (1) CN113112603B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114186603B (en) * 2021-09-28 2022-07-01 北京博能科技股份有限公司 Multi-source model single fusion method and system, storage medium and terminal
CN116975479A (en) * 2022-04-21 2023-10-31 北京京东振世信息技术有限公司 Three-dimensional map data loading and transmitting method and device, electronic equipment and medium
CN115134529A (en) * 2022-06-29 2022-09-30 广联达科技股份有限公司 Method and device for displaying project model in multiple views and readable storage medium
CN115830053B (en) * 2023-01-17 2023-09-05 江苏金恒信息科技股份有限公司 Machine vision-based cord steel mosaic edge positioning method and system
CN116485586B (en) * 2023-06-26 2023-12-26 厦门泛卓信息科技有限公司 Intelligent building management method and system based on comprehensive digital platform
CN116701679B (en) * 2023-08-03 2023-10-10 智成时空(西安)创新科技有限公司 Oblique photography data storage method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108427831A (en) * 2018-02-09 2018-08-21 中建五局第三建设有限公司 Method for optimizing pit building structure by using live-action modeling and BIM technology
CN108648269A (en) * 2018-05-11 2018-10-12 北京建筑大学 The monomerization approach and system of three-dimensional building object model
CN109448135A (en) * 2018-09-26 2019-03-08 速度时空信息科技股份有限公司 A method of the threedimensional model repairing based on multi-source data
CN110136259A (en) * 2019-05-24 2019-08-16 唐山工业职业技术学院 A kind of dimensional Modeling Technology based on oblique photograph auxiliary BIM and GIS

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10628535B2 (en) * 2007-02-01 2020-04-21 Autodesk, Inc. Complete energy analytical model building information modeling (BIM) integration
US11043027B2 (en) * 2017-09-12 2021-06-22 Microsoft Technology Licensing, Llc Three-dimensional graphics image processing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108427831A (en) * 2018-02-09 2018-08-21 中建五局第三建设有限公司 Method for optimizing pit building structure by using live-action modeling and BIM technology
CN108648269A (en) * 2018-05-11 2018-10-12 北京建筑大学 The monomerization approach and system of three-dimensional building object model
CN109448135A (en) * 2018-09-26 2019-03-08 速度时空信息科技股份有限公司 A method of the threedimensional model repairing based on multi-source data
CN110136259A (en) * 2019-05-24 2019-08-16 唐山工业职业技术学院 A kind of dimensional Modeling Technology based on oblique photograph auxiliary BIM and GIS

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
无人机倾斜摄影建模及单体化处理技术试验;李济坤;甘淑;袁希平;;地质灾害与环境保护;20200925(03);全文 *

Also Published As

Publication number Publication date
CN113112603A (en) 2021-07-13

Similar Documents

Publication Publication Date Title
CN113112603B (en) Method and device for optimizing three-dimensional model
CN111008422B (en) Building live-action map making method and system
CN108919944B (en) Virtual roaming method for realizing data lossless interaction at display terminal based on digital city model
KR101546703B1 (en) System for processing massive bim data of building
WO2020098531A1 (en) Object loading method, device, storage medium, and electronic device
KR101546705B1 (en) Method for visualizing building-inside bim data by bim data process terminal
US20150187130A1 (en) Automatic Generation of 2.5D Extruded Polygons from Full 3D Models
WO2022227910A1 (en) Virtual scene generation method and apparatus, and computer device and storage medium
KR102243437B1 (en) Method and system for image visualization using processing tiling for 3d spatial information mapping
Krämer et al. A case study on 3D geospatial applications in the web using state-of-the-art WebGL frameworks
WO2023124676A1 (en) 3d model construction method, apparatus, and electronic device
CN109934911B (en) OpenGL-based three-dimensional modeling method for high-precision oblique photography of mobile terminal
WO2021238359A1 (en) Method for constructing multi-level of detail model of object, and computer device
CN112717414B (en) Game scene editing method and device, electronic equipment and storage medium
CN114049462B (en) Three-dimensional model monomer method and device
Khayyal et al. Creation and spatial analysis of 3D city modeling based on GIS data
US10067950B1 (en) Systems and methods for efficiently organizing map styling information
CN115797568A (en) Modeling method and device based on three-dimensional GIS and BIM integration
She et al. 3D building model simplification method considering both model mesh and building structure
CN112053440A (en) Method for determining individualized model and communication device
CN112734900B (en) Baking method, device and equipment for shadow map and computer readable storage medium
CN113761618A (en) 3D simulation road network automation construction method and system based on real data
CN110634184B (en) Loading method of mass oblique photography data
CN116912817A (en) Three-dimensional scene model splitting method and device, electronic equipment and storage medium
CN115063497B (en) Point cloud data processing method and device

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