CN116129076B - Building Mesh model simplification method with rule feature maintained - Google Patents

Building Mesh model simplification method with rule feature maintained Download PDF

Info

Publication number
CN116129076B
CN116129076B CN202310406543.2A CN202310406543A CN116129076B CN 116129076 B CN116129076 B CN 116129076B CN 202310406543 A CN202310406543 A CN 202310406543A CN 116129076 B CN116129076 B CN 116129076B
Authority
CN
China
Prior art keywords
plane
primitive
planar
original
mesh model
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
CN202310406543.2A
Other languages
Chinese (zh)
Other versions
CN116129076A (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.)
Shenzhen University
Original Assignee
Shenzhen University
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 Shenzhen University filed Critical Shenzhen University
Priority to CN202310406543.2A priority Critical patent/CN116129076B/en
Publication of CN116129076A publication Critical patent/CN116129076A/en
Application granted granted Critical
Publication of CN116129076B publication Critical patent/CN116129076B/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/10Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/04Constraint-based CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/04Architectural design, interior design

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Civil Engineering (AREA)
  • Architecture (AREA)
  • Structural Engineering (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • Processing Or Creating Images (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for simplifying a building Mesh model with regular feature retention, which comprises the steps of obtaining a planar triangular surface patch in the building Mesh model, and selectively carrying out region growth to obtain planar primitives; adjusting the plane primitive to obtain a regularized plane primitive and a regularized boundary line segment; judging whether the plane elements are adjacent or not, setting boundary constraint of the plane elements, inhibiting extension of adjacent directions of the plane elements, and intersecting other directions without the adjacent constraint through the plane elements to obtain a plurality of candidate planes; and calculating the fitting degree between the building Mesh model and the candidate plane primitives, and selecting and combining from a plurality of candidate planes to obtain the simplified three-dimensional building Mesh model. According to the invention, the planar primitives of the Mesh model of the building are extracted, the model is simplified and the regular characteristics are maintained through the regularity among the planar primitives, so that the fidelity and the subsequent application value of the Mesh model are greatly improved.

Description

Building Mesh model simplification method with rule feature maintained
Technical Field
The invention relates to the technical field of data processing, in particular to a method for simplifying a building Mesh model with maintained rule characteristics and related equipment.
Background
The building three-dimensional model is a digital base plate which is indispensable for smart city construction, and provides key basic information for various applications such as city management, planning, simulation, safety, emergency response and the like. The existing photogrammetry technology can generate a Mesh model of an urban scene building by using multi-view images or laser point clouds, and the triangular patches of the Mesh model are simplified by using the existing algorithm, so that the Mesh model of the building with smaller patches is obtained, the data storage capacity of a three-dimensional model is reduced, and the model transmission and visualization efficiency is improved.
However, unlike a general geometric Mesh model, the building Mesh model has obvious plane characteristics, right angle characteristics and edge sharp characteristics, is influenced by data acquisition and processing technology, has large variation of triangular patch scale difference in the building Mesh, and often has the problems of degradation of the sharp characteristics of the building, lower geometric accuracy and the like when a general Mesh model simplification algorithm is adopted to be applied to a building scene, so that the subsequent application value of the building model is greatly reduced.
Accordingly, the prior art is still in need of improvement and development.
Disclosure of Invention
The invention mainly aims to provide a building Mesh model simplifying method with maintained rule characteristics and related equipment, and aims to solve the problems of sharp characteristic degradation and lower geometric accuracy of a building when a general Mesh model simplifying algorithm is adopted to be applied to a building scene in the prior art.
In order to achieve the above object, the present invention provides a method for simplifying a Mesh model of a building with maintained rule features, the method for simplifying a Mesh model of a building with maintained rule features comprising the steps of:
acquiring an original single building Mesh model, calculating the center-of-gravity point coordinate and a first normal vector of each original planar triangular patch in the original single building Mesh model, and the normal vector average value and variance of two adjacent order original planar triangular patches, and carrying out region growing on the original planar triangular patches according to the difference value between the first normal vector and the normal vector average value to obtain an initial planar triangular patch set in the original single building Mesh model, wherein the initial planar triangular patch set is a planar primitive in the original single building Mesh model;
calculating the area and the normal vector of a plane primitive, carrying out regularization adjustment on the plane primitive according to the difference between the normal vectors of the plane primitive to obtain a regularized plane primitive, obtaining a first direction angle in the plane primitive and a second direction angle corresponding to an initial plane triangular patch in the plane primitive, and carrying out adjustment on a line segment corresponding to the first direction angle according to the difference between the first direction angle and the second direction angle to obtain a regularized boundary line segment of the plane primitive;
Acquiring a closed boundary line set of an original planar triangular patch in the planar primitive and a boundary line set of the regularized planar primitive, acquiring a subset meeting a preset condition in the boundary line set, judging whether the planar primitive is adjacent according to the proportion of the sum of the lengths of line segments in the subset and the sum of all line segments in the original planar triangular patch, and if so, judging that the two planar primitives are adjacent planar primitives;
obtaining projection of the adjacent plane primitive in a current plane primitive, using the projection as boundary constraint of the current plane primitive, inhibiting extension of the current plane primitive in the adjacent direction according to the boundary constraint, and intersecting the rest non-inhibited directions through plane primitives to obtain a plurality of candidate planes to form a candidate primitive pool;
and establishing an energy equation according to the fitting degree between the original plane triangular patches in the Mesh model of the original single building and the candidate plane primitives in the candidate primitive pool, calculating the minimum energy solution of the energy equation according to a binary labeling method, and forming a simplified three-dimensional Mesh model of the building according to the plane primitive set corresponding to the minimum energy solution.
Optionally, in the method for simplifying a building Mesh model with maintained rule features, the acquiring an original single building Mesh model, calculating a center of gravity point coordinate and a first normal vector of each original planar triangular patch in the original single building Mesh model, and a normal vector average value and a variance of two adjacent order original planar triangular patches, and performing region growing on the original planar triangular patches according to a difference value between the first normal vector and the normal vector average value to obtain a set of original planar triangular patches in the original single building Mesh model, where the set of original planar triangular patches is a planar primitive in the original single building Mesh model, and specifically includes:
Acquiring an original single building Mesh model, and splitting the original single building Mesh model to make the areas of original plane triangular patches in the original single building Mesh model equal;
calculating the center of gravity point coordinates and a first normal vector of each original planar triangular patch in the Mesh model of the original single building, the average value of a second normal vector and the variance of a first angle difference of a first-order adjacent original planar triangular patch set of each original planar triangular patch, and the average value of a third normal vector and the variance of a second angle difference of a second-order adjacent original planar triangular patch set of each original planar triangular patch;
constructing a multi-scale feature descriptor of each original planar triangular patch according to the barycentric coordinates, the first normal vector, the average value of the second normal vector, the variance of the first angle difference, the average value of the third normal vector and the variance of the second angle difference;
judging whether the difference values of the first normal vector, the second normal vector and the third normal vector are smaller than a first preset threshold value, if so, taking the original plane triangular patches corresponding to the first normal vector, the second normal vector and the third normal vector as initial seed points, carrying out region growing on the original plane triangular patches, merging the original plane triangular patches with adjacent normal difference values smaller than the first preset threshold value until the difference value between all the adjacent original plane triangular patches and the growing original plane triangular patch set is not smaller than the first preset threshold value, and obtaining an initial plane triangular patch set in the Mesh model of the target building, wherein the initial plane triangular patch set is a plane primitive in the Mesh model of the target building.
Optionally, in the building Mesh model simplifying method for maintaining the regular features, the calculating the area and the normal vector of the plane primitive, and performing regularization adjustment on the plane primitive according to the difference between the normal vectors of the plane primitive to obtain a regularized plane primitive, obtaining a first direction angle in the plane primitive and a second direction angle corresponding to an initial plane triangle patch in the plane primitive, and performing adjustment on a line segment corresponding to the first direction angle according to the difference between the first direction angle and the second direction angle to obtain a regularized boundary line segment of the plane primitive, where the method specifically includes:
calculating the area and the normal vector of the plane primitive, starting from the plane primitive with the largest area according to the sequence of the area from the largest area, judging whether the difference value between the normal vector of the plane primitive with the largest area and the normal vector in the rest plane primitives is in a first preset range or a second preset range, if so, rotating the plane primitive which is compared with the plane primitive with the largest area around the center of the plane primitive to be consistent with or vertical to the normal vector direction of the plane primitive with the largest area until all the plane primitives are judged and adjusted once, and obtaining the regularized plane primitive;
Starting from a plane primitive with the largest area, acquiring a triangular vertex penetrating through an initial plane triangular patch in the plane primitive, projecting the plane primitive which is not parallel to the plane primitive, and obtaining a direction angle set through the triangular vertex and a projection result;
obtaining a boundary line of an initial plane triangular patch in the plane primitive, and simplifying the boundary line by adopting a Fabry-Perot method to obtain a simplified line segment;
and calculating the direction angle of the line segment, judging whether the difference value between the direction angle of the line segment and the direction angle in the direction angle set is lower than a preset second preset threshold value, and if so, rotating the line segment corresponding to the direction angle of the line segment in the direction angle set around the line segment until the line segment is consistent with the simplified line segment angle, thereby obtaining the regularized boundary line segment.
Optionally, the method for simplifying the Mesh model of the building with maintained rule features, wherein the method for simplifying the boundary line by using the tabacco method specifically includes:
acquiring a plurality of coordinate points corresponding to the starting points and the stopping points of boundary lines in a plurality of triangular patches, and forming a broken line by the plurality of coordinate points;
Connecting the starting and stopping points of the fold lines to obtain a straight line;
and judging the distance between the point on the folding line and the straight line, if the distance is larger than a third preset threshold value, reserving the point on the folding line compared currently, otherwise, discarding.
Optionally, in the building Mesh model simplifying method for maintaining the rule features, the acquiring a closed boundary line set of an original planar triangular patch in the planar primitive and a boundary line set of the regularized planar primitive, acquiring a subset meeting a preset condition in the boundary line set, and judging whether the planar primitive is adjacent according to a proportion of a sum of line segment lengths in the subset to a sum of all line segments in the original planar triangular patch, if so, the two planar primitives are adjacent planar primitives, including:
acquiring a closed boundary line set of an original planar triangular patch in two planar primitives and a boundary line set of the regularized planar primitives;
extracting line segments which are parallel to each other and have a minimum distance of a linear equation smaller than a fourth preset threshold value from the boundary line set of the regularized plane primitive to obtain two subsets;
calculating the ratio of the sum of the lengths of the line segments in the two subsets to the sum of the lengths of all the line segments in the closed boundary line set of the original planar triangular patch respectively to obtain a first proportion and a second proportion;
If the intersection of two primitives in the closed boundary line set of the original planar triangular patch is not an empty set or the first proportion is larger than a fifth preset threshold or the second proportion is larger than the fifth preset threshold, the two primitives are adjacent, otherwise the two primitives are not adjacent.
Optionally, in the building Mesh model simplifying method for preserving rule features, the obtaining a projection of the neighboring plane primitive in a current plane primitive uses the projection as a boundary constraint of the current plane primitive, and suppresses extension of an adjacent direction of the current plane primitive according to the boundary constraint, and the remaining non-suppressed directions are intersected by plane primitives to obtain a plurality of candidate planes to form a candidate primitive pool, including:
acquiring a current plane primitive and a plane primitive adjacent to the current plane primitive, and calculating projection of the adjacent plane primitive in a plane;
taking the projection as boundary constraint of a current plane primitive, and inhibiting the extension of the adjacent direction of the current plane primitive according to the boundary constraint, wherein the other directions without the boundary constraint continue to extend;
and obtaining a plurality of candidate planes through the intersecting parts extending between the plane primitives, wherein the plane primitives and the candidate planes jointly form a candidate primitive pool.
Optionally, the method for simplifying a building Mesh model with maintained rule features, wherein the establishing an energy equation according to a fitting degree between an original planar triangular patch in the original single building Mesh model and a candidate planar primitive in the candidate primitive pool, calculating a minimum energy solution of the energy equation according to a binary labeling method, and forming a simplified three-dimensional building Mesh model according to a planar primitive set corresponding to the minimum energy solution specifically includes:
obtaining a candidate plane primitive in the candidate primitive pool, extracting an original plane triangular patch contained in the candidate plane primitive, and obtaining the fitting degree of the plane triangular patch in the candidate plane primitive and the original plane triangular patch by calculating the average distance, the projection coverage ratio and the normal difference between the original plane triangular patch and the candidate plane primitive;
acquiring a first linear equation of an intersecting line of the candidate plane primitive and projection of the intersecting line in the original plane triangular patch, obtaining a set of the projection passing through the original plane triangular patch, obtaining a second linear equation according to a gravity center point of the original plane triangular patch in the set, and judging linear characteristic fitting property of the simplified model and a Mesh model of a target monomer building through the first linear equation and the second linear equation;
Determining the number of primitives connected with the same intersection line through a binary integer programming equation to obtain a topological constraint relation between the candidate plane primitives and the intersection line;
calculating the corresponding area proportion of the planar triangular patches of the original planar triangular patches in the candidate planar primitives to obtain a proportional value range, and obtaining the fitting integrity of the simplified model and the Mesh model of the target monomer building through the proportional value range;
and calculating the fitting degree through the fitting degree of the planar triangular patches in the candidate planar primitives to the original planar triangular patches, the linear feature fitting property of the simplified model and the Mesh model of the target single building, the topological constraint relation between the candidate planar primitives and the intersecting lines, and the fitting degree of the simplified model and the Mesh model of the target single building, so as to obtain the minimum energy solution of the fitting degree of the Mesh model of the original single building, and extracting the candidate planar primitives corresponding to the minimum energy solution, and combining the two to obtain the simplified three-dimensional Mesh model of the building.
In addition, to achieve the above object, the present invention also provides a regular feature-preserving building Mesh model simplifying system, wherein the regular feature-preserving building Mesh model simplifying system includes:
The planar primitive extraction module is used for obtaining an original single building Mesh model, calculating the gravity point coordinates and a first normal vector of each original planar triangular patch in the original single building Mesh model, and the normal vector average value and variance of two adjacent order original planar triangular patches, and carrying out region growing on the original planar triangular patches according to the difference value between the first normal vector and the normal vector average value to obtain an initial set of the planar triangular patches in the original single building Mesh model, wherein the initial set of the planar triangular patches is a planar primitive in the original single building Mesh model;
the plane primitive rule adjustment module is used for calculating the area and the normal vector of a plane primitive, carrying out rule adjustment on the plane primitive according to the difference between the normal vectors of the plane primitive to obtain a rule plane primitive, obtaining a first direction angle in the plane primitive and a second direction angle corresponding to an initial plane triangular patch in the plane primitive, and adjusting a line segment corresponding to the first direction angle according to the difference between the first direction angle and the second direction angle to obtain a rule boundary line segment of the plane primitive;
The plane primitive relation judging module is used for acquiring a closed boundary line set of an original plane triangular patch in the plane primitive and a boundary line set of the regularized plane primitive, acquiring a subset which accords with a preset condition in the boundary line set, judging whether the plane primitive is adjacent according to the proportion of the sum of the line segment lengths in the subset and the sum of all line segments in the original plane triangular patch, and if yes, judging that the two plane primitives are adjacent plane primitives;
the candidate plane generation module is used for acquiring projections of the adjacent plane primitives in the current plane primitive, taking the projections as boundary constraints of the current plane primitive, inhibiting extension of the adjacent direction of the current plane primitive according to the boundary constraints, and intersecting the rest non-inhibited directions through the plane primitives to obtain a plurality of candidate planes to form a candidate primitive pool;
and the candidate plane optimization module is used for establishing an energy equation according to the fitting degree between the initial plane triangular patches in the Mesh model of the original monomer building and the candidate plane primitives in the candidate primitive pool, calculating the minimum energy solution of the energy equation according to a binary labeling method, and forming a simplified three-dimensional building Mesh model according to a plane primitive set corresponding to the minimum energy solution.
In addition, to achieve the above object, the present invention also provides a terminal, wherein the terminal includes: the method comprises the steps of a memory, a processor and a regular feature-preserving building Mesh model simplifying program stored on the memory and capable of running on the processor, wherein the regular feature-preserving building Mesh model simplifying program is executed by the processor to realize the regular feature-preserving building Mesh model simplifying method.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium storing a regular feature-preserving building Mesh model simplifying program which, when executed by a processor, implements the steps of the regular feature-preserving building Mesh model simplifying method as described above.
According to the method, an original single building Mesh model is obtained, the center-of-gravity point coordinate and a first normal vector of each original planar triangular patch in the original single building Mesh model, and the normal vector average value and variance of two adjacent order original planar triangular patches are calculated, the original planar triangular patches are subjected to region growing according to the difference value between the first normal vector and the normal vector average value, and the initial planar triangular patch set in the original single building Mesh model is obtained, wherein the initial planar triangular patch set is a planar primitive in the original single building Mesh model; calculating the area and the normal vector of a plane primitive, carrying out regularization adjustment on the plane primitive according to the difference between the normal vectors of the plane primitive to obtain a regularized plane primitive, obtaining a first direction angle in the plane primitive and a second direction angle corresponding to an initial plane triangular patch in the plane primitive, and carrying out adjustment on a line segment corresponding to the first direction angle according to the difference between the first direction angle and the second direction angle to obtain a regularized boundary line segment of the plane primitive; acquiring a closed boundary line set of an original planar triangular patch in the planar primitive and a boundary line set of the regularized planar primitive, acquiring a subset meeting a preset condition in the boundary line set, judging whether the planar primitive is adjacent according to the proportion of the sum of the lengths of line segments in the subset and the sum of all line segments in the original planar triangular patch, and if so, judging that the two planar primitives are adjacent planar primitives; obtaining projection of the adjacent plane primitive in a current plane primitive, using the projection as boundary constraint of the current plane primitive, inhibiting extension of the current plane primitive in the adjacent direction according to the boundary constraint, and intersecting the rest non-inhibited directions through plane primitives to obtain a plurality of candidate planes to form a candidate primitive pool; and establishing an energy equation according to the fitting degree between the original plane triangular patches in the Mesh model of the original single building and the candidate plane primitives in the candidate primitive pool, calculating the minimum energy solution of the energy equation according to a binary labeling method, and forming a simplified three-dimensional Mesh model of the building according to the plane primitive set corresponding to the minimum energy solution. According to the invention, the flat areas in the Mesh surface sheets of the building are subjected to multi-scale feature extraction to obtain the building plane elements, and the parallel and vertical relations among the building plane elements are recovered to serve as building features which are mainly maintained in the simplification process, and meanwhile, the topological relation among part of the building plane elements is recovered through the regularity and the adjacency among the plane elements, so that the geometric precision and the topological accuracy of the simplified Mesh model are improved, and the sharp features of the building are better maintained.
Drawings
Fig. 1 is a simplified schematic diagram of a building Mesh model of a preferred embodiment of the regular feature preserving building Mesh model simplification method of the present invention;
fig. 2 is a flow chart of a preferred embodiment of a building Mesh model simplification method of the invention for rule feature preservation;
fig. 3 is a schematic view of triangular patches in a Mesh model of a preferred embodiment of a Mesh model simplification method of a building with regular feature preservation of the present invention;
FIG. 4 is a schematic diagram of conventional candidate planar cluster generation for a preferred embodiment of the building Mesh model reduction system of the present invention with regular feature preservation;
FIG. 5 is a schematic diagram of candidate planar cluster generation for partial topology support of a preferred embodiment of the building Mesh model reduction system of the present invention with regular feature preservation;
fig. 6 is a block diagram of a preferred embodiment of a building Mesh model simplification system of the invention with rule feature preservation;
fig. 7 is a block diagram of a preferred embodiment of the terminal of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clear and clear, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The realization idea of the invention is as follows: firstly, the triangular patch scale and normal vector of a three-dimensional Mesh model of a building are analyzed, triangular patch subdivision is carried out on the three-dimensional Mesh model of the building, and the scale of the three-dimensional Mesh model is unified (the triangular patch subdivision scale in the three-dimensional Mesh model is approximately the same). Then, the building plane elements, and the closed plane element boundary lines are extracted from the triangular patches, and the topological relation between the plane elements is analyzed. Based on the above, based on the partial topological relation restored between the plane primitives, the candidate plane primitives of the simplified Mesh model are obtained through the intersection of the plane primitives. Finally, the geometric precision, the building regularity and the topological consistency of the Mesh models before and after simplification are considered to construct an energy equation, and a subset is selected from the candidate plane primitives to form the simplified building Mesh model.
As shown in fig. 1, the technical scheme of the invention is based on an original monomer building Mesh model, and the simplified building Mesh model is generated through five steps of building Mesh plane primitive extraction, plane primitive topological relation estimation, plane primitive regularization, candidate plane primitive generation and candidate plane primitive optimization.
The method for simplifying the building Mesh model with the rule feature preservation according to the preferred embodiment of the invention, as shown in fig. 2, comprises the following steps:
step S10, an original single building Mesh model is obtained, the center-of-gravity point coordinate and a first normal vector of each original planar triangular patch in the original single building Mesh model, and the normal vector average value and variance of two adjacent order original planar triangular patches are calculated, the original planar triangular patches are subjected to region growing according to the difference value between the first normal vector and the normal vector average value, and the initial planar triangular patch set in the original single building Mesh model is obtained, wherein the initial planar triangular patch set is a planar primitive in the original single building Mesh model, and the step S10 of the invention is to extract the planar primitive in the Mesh model in a robust way.
Specifically, an original single building Mesh model is obtained, and the original single building Mesh model is split, so that the areas of the original plane triangular patches in the original single building Mesh model are equal.
As shown in fig. 3, the center-of-gravity point coordinates P and a first normal vector n of each original planar triangular patch (a in fig. 3) in the Mesh model of the original single building are calculated 0 Average n of second normal vector of first-order neighboring original planar triangular patches (b in fig. 3) of each original planar triangular patch 1 And the variance sn of the first angular difference 1 And the average value n of the third normal vector of each set of original planar triangular patches (c in fig. 3) that are second-order neighbors of the original planar triangular patches 2 And a variance sn of the second angular difference 2
The center-of-gravity point coordinate P is obtained by an average value of three vertex XYZ coordinates in the original plane triangular patch; the normal vector is obtained by a plane equation composed of three vertexes in the original plane triangular patch.
And constructing a multi-scale feature descriptor of each original planar triangular patch according to the barycentric coordinates, the first normal vector, the average value of the second normal vector, the variance of the first angle difference, the average value of the third normal vector and the variance of the second angle difference.
Wherein the multi-scale feature descriptor f= (P, n) 0 ,n 1 ,sn 1 ,n 2 ,sn 1 ) When n is 0 ,n 1 ,n 2 When the triangular surface patches are consistent, the triangular surface patches are high in planarity.
Judging whether the difference values of the first normal vector, the second normal vector and the third normal vector are smaller than a first preset threshold value, if so, taking the original plane triangular patches corresponding to the first normal vector, the second normal vector and the third normal vector as initial seed points, carrying out region growing on the original plane triangular patches, merging the original plane triangular patches with adjacent normal difference values smaller than the first preset threshold value until the difference value between all the adjacent original plane triangular patches and the growing original plane triangular patch set is not smaller than the first preset threshold value, and obtaining an initial plane triangular patch set in the Mesh model of the target building, wherein the initial plane triangular patch set is a plane primitive in the Mesh model of the target building.
Wherein n is selected 0 ,n 1 ,n 2 And (3) taking triangular patches with mutual differences smaller than 10 degrees as initial seed points, performing region growing, merging triangular patches (with adjacent edges) with similar normal vectors (with differences smaller than 10 degrees), until the normal vector differences between all adjacent triangular patches and the triangular patch clusters are larger than a threshold value (10 degrees), and obtaining initial plane triangular patch clusters (namely the original plane triangular patch set after growing) in the Mesh model.
Calculating the total area A of each initial planar triangular patch cluster t Normal vector n t Plane equation D t And extract its closed boundary line set L t For subsequent calculations.
Wherein the total area A t Is the sum of the areas of the triangles in the triangular patch cluster; plane equation D t The plane equation is obtained by fitting the triangular patch cluster vertex set; normal vector n t Is three parameters in the plane equation.
Step S20, calculating the area and the normal vector of a plane primitive, carrying out regularization adjustment on the plane primitive according to the difference between the normal vectors of the plane primitive to obtain a regularized plane primitive, obtaining a first direction angle in the plane primitive and a second direction angle corresponding to an initial plane triangular patch in the plane primitive, and carrying out adjustment on a line segment corresponding to the first direction angle according to the difference between the first direction angle and the second direction angle to obtain a regularized boundary line segment of the plane primitive.
Step S20 of the invention regularizes the surface patches and boundaries of the building primitives, firstly regularizes the plane equation fitted to the initial triangular surface patch cluster in a three-dimensional space, and restores the parallel and vertical relations among the building primitives; then, projecting the three-dimensional closed boundary line of each triangle cluster into a plane equation after regularization, and converting the three-dimensional closed boundary line into a two-dimensional boundary line; finally, regularizing boundary lines in a two-dimensional space in consideration of the regularity between planes and boundary lines, and back-projecting the regularized primitive boundary lines to an original three-dimensional space.
Specifically, the plane primitive S is calculated i Area a of (2) i And normal vector n i From the plane element S with the largest area, according to the order of the areas from large to small 1 Initially, the normal vector S of the plane element with the largest area is judged 1 Normal vector S in remaining planar primitive j Whether the difference between (a) and (b) is within a first preset range (preferably 0 ° -10 °) or a second preset range (preferably 80 ° -100 °), and if so, the planar element S with the largest area will be compared with the planar element S 1 Contrasting planar primitives S j A planar element S rotated around its own center to be maximum with the area 1 The normal vector directions of the plane primitives are consistent or vertical until all the plane primitives are judged and adjusted once, and the regularized plane primitives are obtained.
From plane primitive S with largest area 1 Firstly, acquiring a triangular vertex of an initial planar triangular patch penetrating through the planar primitive, projecting the planar primitive which is non-parallel to the planar primitive, and obtaining a direction angle set phi through the triangular vertex and a projection result.
And obtaining a boundary line of the initial planar triangular patch in the planar primitive, and simplifying the boundary line by adopting a Fabry-Perot method to obtain a simplified line segment.
The specific operation steps for simplifying the boundary line by adopting the method of the Tiger Laplacian are as follows:
acquiring a plurality of coordinate points corresponding to the starting points and the stopping points of boundary lines in a plurality of triangular patches, and forming a broken line by the plurality of coordinate points; connecting the starting and stopping points of the fold lines to obtain a straight line AB; and judging the distance between the point on the folding line and the straight line, if the distance is larger than a third preset threshold value (such as 0.1 m), reserving the point on the folding line compared currently, marking the point as C, generating two straight lines AC and CB at the moment, and otherwise, discarding.
And calculating the direction angle of the line segment, judging whether the difference value between the direction angle of the line segment and the direction angle in the direction angle set phi is lower than a preset second preset threshold value (preferably 10 degrees), and if so, rotating the line segment corresponding to the direction angle of the line segment in the direction angle set phi around the line segment until the line segment is consistent with the simplified line segment angle, thereby obtaining the regularized boundary line segment.
And if the difference between the direction angle and a certain value in the direction angle set phi is smaller than 10 degrees, the line segment is rotated to the same angle around the middle point, so that a regularized boundary line segment is obtained.
And step S30, acquiring a closed boundary line set of an original planar triangular patch in the planar primitive and a boundary line set of the regularized planar primitive, acquiring a subset meeting a preset condition in the boundary line set, and judging whether the planar primitive is adjacent according to the proportion of the sum of the lengths of the line segments in the subset and the sum of all the line segments in the original planar triangular patch, if so, the two planar primitives are adjacent planar primitives.
The step S30 of the invention is to realize the restoration of the topological relation of the cooperation of the rule and the space feature, and the adjacent topological relation between the building plane primitives and the regularized boundaries thereof generated by the step S20 is judged; the invention estimates the criticality between primitives by the adjacency (whether a common edge exists or not) between primitive patch clusters and the parallelism of the boundary after the regular triangle patches, wherein the topological relation refers to whether two planes are mutually adjacent or not; if the two adjacent nodes are judged to be adjacent, the topological relation is clear; otherwise, it is ambiguous.
Specifically, a closed boundary line set L of original plane triangular patches in two plane primitives is obtained t And boundary line set L of the regularized plane primitive tr Wherein, a closed boundary line set L of the original triangular patch cluster of each plane primitive is obtained t The method comprises the steps of carrying out a first treatment on the surface of the Acquiring three-dimensional rule boundary line set after regularization of each plane primitiveL tr
All regularized triangular patches are clustered according to the total area A t And (5) sequencing, namely starting from the primitive with the largest total area, and judging the adjacent relation between the primitive and other primitives. For primitive S 1 And S is 2 The closed boundary line sets are respectively recorded as:
L t 1 ={l t 1 _1 , l t 1_2 ,l t 1_3 …, l t 1_n1 };
L t 2 ={l t 2_1 , l t 2_2 ,l t 2_3 …, l t 2_n1 };
the three-dimensional rule boundary line sets are respectively recorded as:
L tr 1={L tr 1_1, L tr 1_2, L tr 1_3,…, L tr 1_m1};
L tr 2 ={L tr 1_1 , L tr 1_2 , L tr 1_3 ,…, L tr 1_m2 }。
and extracting line segments which are parallel to each other and have a minimum distance of the linear equation smaller than a fourth preset threshold value in the boundary line set of the regularized plane primitive, and obtaining two subsets.
And calculating the ratio of the sum of the lengths of the line segments in the two subsets to the sum of the lengths of all the line segments in the closed boundary line set of the original planar triangular surface patches respectively to obtain a first proportion and a second proportion.
Wherein L is extracted tr 1 And L is equal to tr 2 The line segments parallel to each other and having a minimum distance of less than 1m are formed into two subsets, and the sum of the lengths of the line segments in the two subsets and L are calculated respectively tr 1 、L tr 2 The ratio p of the sum of all line segment lengths 1 ,p 2
If the intersection of two primitives in the closed boundary line set of the original planar triangular patch is not an empty set or the first proportion is larger than a fifth preset threshold or the second proportion is larger than the fifth preset threshold, the two primitives are adjacent, otherwise the two primitives are not adjacent.
Wherein, if: l (L) t 1 ∩L t 2 ≠∅ or p 1 >0.1 or p 1 >0.1 The two primitives are determined to be adjacent, otherwise not adjacent.
And S40, obtaining projection of the adjacent plane primitive in the current plane primitive, using the projection as boundary constraint of the current plane primitive, inhibiting extension of the current plane primitive in the adjacent direction according to the boundary constraint, and intersecting the rest non-inhibited directions through the plane primitive to obtain a plurality of candidate planes to form a candidate primitive pool.
Step S40 of the present invention is a generation of a set of candidate plane primitives supported by a partial topology, where the conventional method obtains a plurality of candidate plane primitives of a building through plane intersection of the plane primitives, which has a certain blindness, resulting in poor model accuracy after simplification (as shown in fig. 4). According to the topological relation among the partial primitives recovered in the previous step, boundary lines are obtained through primitive planes in a region with definite topology, and the extension of the primitives in the direction is restrained; in the area with undefined topology, a plurality of candidate planes are obtained through the intersection of the patches.
Specifically, a current plane primitive and a plane primitive adjacent to the current plane primitive are acquired, and projections of the adjacent plane primitives in a plane are calculated.
And taking the projection as the boundary constraint of the current plane primitive, and inhibiting the extension of the adjacent direction of the current plane primitive according to the boundary constraint, and continuing the extension of the other directions without the boundary constraint.
And obtaining a plurality of candidate planes through the intersecting parts extending between the plane primitives, wherein the plane primitives and the candidate planes jointly form a candidate primitive pool.
As shown in fig. 5, the boundary line is a boundary line after the regularization of the set of planar triangular patches. The straight line a represents the projection of the adjacent plane primitive in the plane, which is judged in the S30, and is different from the intersection of the blind planes to generate a candidate primitive pool.
And S50, establishing an energy equation according to the fitting degree between the original plane triangular patches in the Mesh model of the original monomer building and the candidate plane primitives in the candidate primitive pool, calculating the minimum energy solution of the energy equation according to a binary labeling method, and forming a simplified three-dimensional Mesh model of the building according to the plane primitive set corresponding to the minimum energy solution.
In order to select a subset of planar primitives with optimal geometry and topology from a primitive pool to form a simplified building Mesh model, the invention establishes an energy equation, comprehensively considers the fitting degree (Eface) of candidate polygon patches to triangular patches of an original Mesh model, the fitting degree (Elines) of candidate polygon boundary lines to sharp features of the original Mesh model, the topological constraint relation (Etopo) between polygon surface-lines, and the fitting completeness (Eintel) of the original Mesh model, wherein the energy equation is as follows: e=eface+elines+etopo+einte; where E is the energy solution.
Specifically, a candidate plane primitive in the candidate primitive pool is obtained, an original plane triangular patch contained in the candidate plane primitive is extracted, and the fitting degree of the plane triangular patch in the candidate plane primitive and the original plane triangular patch is obtained by calculating the average distance, the projection coverage ratio and the normal difference between the original plane triangular patch and the candidate plane primitive.
For the feature of the face patch, the method extracts the original Mesh face patches contained in a certain buffer range of each candidate plane primitive, and calculates the average distance, the projection coverage ratio and the normal difference of the Mesh face patches from the candidate face patches as the fitness measure.
Average distance: assuming that the original Mesh surface patch contains N triangular surface patches, making a vertical line from the gravity center of the triangular surface patch to the candidate surface patch, wherein the length from the gravity center to the vertical foot is the projection distance from the triangular surface patch to the candidate surface patch, and the average distance is the average value of the projection distances from a plurality of triangular surface patches to a certain candidate surface patch.
Projection coverage ratio: assuming that the original Mesh surface patch comprises N triangular surface patches, respectively projecting three vertexes of the triangular surface patches into candidate planes to obtain a projection triangle, wherein the area of the projection triangle is the projection area; calculating the area of the superposition part of the projection triangle and the candidate surface patch on the candidate plane, namely, the projection coverage area; the projection coverage ratio is the sum of the projection coverage areas of the N triangular patches divided by the sum of the projection areas of the N triangular patches.
Normal vector difference: assuming that the original Mesh patches contain N triangular patches, calculating the normal vector of each triangular patch, and averaging to obtain an average normal vector; and calculating an included angle between the average normal vector and the normal vector of the candidate patch, namely, the normal difference.
Obtaining a first linear equation of an intersecting line of the candidate plane primitive and projection of the intersecting line in the original plane triangular patch, obtaining a set of the projection passing through the original plane triangular patch, obtaining a second linear equation according to a gravity center point of the original plane triangular patch in the set, and judging linear characteristic fitting property of the simplified model and a Mesh model of a target single building through the first linear equation and the second linear equation.
Wherein, for line characteristics, the invention firstly obtains a linear equation Lcan thereof. And calculating the projection of the candidate primitive intersection lines and the primitive Mesh model to obtain a set Tline of triangular patches in the primitive Mesh through which the candidate primitive intersection lines pass, and fitting a linear equation Lmesh through the gravity center points of the triangular patches in the Tline (preferably calculating the gravity center point coordinates of N triangular patches and then fitting the linear equation through a least square method). And finally quantitatively describing the line characteristic fitting property of the simplified model to the original Mesh model through the difference of the included angle between the Lcan and the Lmesh (the smaller the included angle is, the better the fitting property is).
And determining the number of primitives connected by the same intersection line through a binary integer programming equation (the boundary line of the stipulated polygon must be shared by 2 polygons), obtaining the topological constraint relation between the candidate plane primitives and the intersection line, and avoiding the topological conflict between the selected plane primitives.
And calculating the corresponding area proportion of the planar triangular patches of the original planar triangular patches in the candidate planar primitives to obtain a proportional value range, and obtaining the fitting integrity of the simplified model and the Mesh model of the target monomer building through the proportional value range.
For the integrity feature, the invention considers that the area proportion of the triangular patches corresponding to the original Mesh model in the candidate primitive combination is calculated, the proportion value range is 0 to 1, and the bigger the numerical value is, the higher the integrity of the original Mesh fitting is.
And calculating the fitting degree through the fitting degree of the planar triangular patches in the candidate planar primitives to the original planar triangular patches, the linear feature fitting property of the simplified model and the Mesh model of the target single building, the topological constraint relation between the candidate planar primitives and the intersecting lines, and the fitting degree of the simplified model and the Mesh model of the target single building, so as to obtain the minimum energy solution of the fitting degree of the Mesh model of the original single building, and extracting the candidate planar primitives corresponding to the minimum energy solution, and combining the two to obtain the simplified three-dimensional Mesh model of the building.
And finally, calculating the minimum energy solution of the energy equation through binary integer programming, and obtaining the simplified three-dimensional building Mesh model with good surface-line characteristic fitting, high regularity and correct topological relation.
The invention has the beneficial effects that:
1. and extracting multi-scale plane primitives in the Mesh model, judging the planeness of a local area by taking normal vectors and differences of triangular patches and first-order and second-order adjacent areas of the triangular patches as characteristics, and better extracting the plane primitives from the Mesh model of the initial building.
2. And for the generation of the partial topology guided simplified Mesh candidate primitive pool, partial topology relations restored among building primitives are utilized, the relations are prioritized in the candidate simplified Mesh model, and the topology accuracy of the simplified building model is improved.
3. For the simplified Mesh model generation of the surface and line characteristics and the regularity constraint thereof, the surface characteristics and the line characteristics in the initial Mesh model and the parallel and vertical relations between the surface characteristics and the line characteristics are preferably selected to have high geometric precision and the sharp characteristics keep better candidate elements to form the simplified building Mesh model.
Aiming at the problems of regular feature loss, sharp feature degradation, lower geometric accuracy and the like existing in the application of the existing Mesh model simplification method and the building model, the invention utilizes the multi-scale features in the building Mesh surface sheet to extract a flat area as a building plane primitive, and restores the parallel and vertical relationship between building primitives to serve as the building feature which is mainly maintained in the simplification process. And then, the topological relation among the primitives of the partial building is restored through the regularity and the adjacency among the primitives, and the protection is prioritized in the simplification process, so that the geometric precision and the topological accuracy of the simplified Mesh model are improved. Finally, in the energy equation generated by the simplified model, the line characteristic fitting degree of the original Mesh model and the simplified Mesh model is shown and considered, so that the sharp characteristics of the building are better kept.
Further, as shown in fig. 6, the invention further provides a building Mesh model simplifying system based on the rule feature preservation, wherein the building Mesh model simplifying system based on the rule feature preservation comprises:
The plane primitive extraction module 51 is configured to obtain an original single building Mesh model, calculate a center of gravity point coordinate and a first normal vector of each original plane triangular patch in the original single building Mesh model, and a normal vector average value and a variance of two adjacent order original plane triangular patches, and perform region growing on the original plane triangular patches according to a difference value between the first normal vector and the normal vector average value, so as to obtain a set of initial plane triangular patches in the original single building Mesh model, where the set of initial plane triangular patches is a plane primitive in the original single building Mesh model;
the plane primitive rule adjustment module 52 is configured to calculate an area and a normal vector of a plane primitive, perform a rule adjustment on the plane primitive according to a difference between normal vectors of the plane primitive to obtain a rule plane primitive, obtain a first direction angle in the plane primitive and a second direction angle corresponding to an initial plane triangular patch in the plane primitive, and adjust a line segment corresponding to the first direction angle according to a difference between the first direction angle and the second direction angle to obtain a rule boundary line segment of the plane primitive;
A planar primitive relation judging module 53, configured to obtain a closed boundary line set of an original planar triangular patch in the planar primitive and a boundary line set of the regularized planar primitive, obtain a subset of the boundary line set that meets a preset condition, and judge whether the planar primitive is adjacent according to a ratio of a sum of line segment lengths in the subset to a sum of all line segments in the original planar triangular patch, if so, the two planar primitives are adjacent planar primitives;
the candidate plane generating module 54 is configured to obtain a projection of the neighboring plane primitive in a current plane primitive, take the projection as a boundary constraint of the current plane primitive, suppress extension of an adjacent direction of the current plane primitive according to the boundary constraint, and obtain a plurality of candidate planes by intersecting plane primitives in the remaining non-suppressed directions, so as to form a candidate primitive pool;
and the candidate plane optimization module 55 is configured to establish an energy equation according to the fitting degree between the primitive plane triangular patches in the primitive single building Mesh model and the candidate plane primitives in the candidate primitive pool, calculate a minimum energy solution of the energy equation according to a binary labeling method, and form a simplified three-dimensional building Mesh model according to a plane primitive set corresponding to the minimum energy solution.
Further, as shown in fig. 7, the invention also provides a method and a system for simplifying the building Mesh model based on the rule feature, and the terminal comprises a processor 10, a memory 20 and a display 30. Fig. 7 shows only some of the components of the terminal, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may alternatively be implemented.
The memory 20 may in some embodiments be an internal storage unit of the terminal, such as a hard disk or a memory of the terminal. The memory 20 may in other embodiments also be an external storage device of the terminal, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal. Further, the memory 20 may also include both an internal storage unit and an external storage device of the terminal. The memory 20 is used for storing application software installed in the terminal and various data, such as program codes of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the memory 20 stores a regular feature-preserving building Mesh model reduction program 40, and the regular feature-preserving building Mesh model reduction program 40 is executable by the processor 10, so as to implement the regular feature-preserving building Mesh model reduction method in the present application.
The processor 10 may in some embodiments be a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 20, for example performing a building Mesh model reduction method of the rule feature preservation, etc.
The display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like in some embodiments. The display 30 is used for displaying information at the terminal and for displaying a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
In an embodiment, the steps of the building Mesh model reduction method of regular feature preservation as described above are implemented when the processor 10 executes the building Mesh model reduction program 40 of regular feature preservation in the memory 20.
The present invention also provides a computer-readable storage medium storing a regular feature-preserving building Mesh model reduction program which, when executed by a processor, implements the steps of the regular feature-preserving building Mesh model reduction method described above.
In summary, in the invention, an original single building Mesh model is obtained, the center-of-gravity point coordinate and a first normal vector of each original planar triangular patch in the original single building Mesh model, and the normal vector average value and variance of two adjacent order original planar triangular patches are calculated, and the original planar triangular patches are subjected to region growing according to the difference value between the first normal vector and the normal vector average value to obtain an initial planar triangular patch set in the original single building Mesh model, wherein the initial planar triangular patch set is a planar primitive in the original single building Mesh model; calculating the area and the normal vector of a plane primitive, carrying out regularization adjustment on the plane primitive according to the difference between the normal vectors of the plane primitive to obtain a regularized plane primitive, obtaining a first direction angle in the plane primitive and a second direction angle corresponding to an initial plane triangular patch in the plane primitive, and carrying out adjustment on a line segment corresponding to the first direction angle according to the difference between the first direction angle and the second direction angle to obtain a regularized boundary line segment of the plane primitive; acquiring a closed boundary line set of an original planar triangular patch in the planar primitive and a boundary line set of the regularized planar primitive, acquiring a subset meeting a preset condition in the boundary line set, judging whether the planar primitive is adjacent according to the proportion of the sum of the lengths of line segments in the subset and the sum of all line segments in the original planar triangular patch, and if so, judging that the two planar primitives are adjacent planar primitives; obtaining projection of the adjacent plane primitive in a current plane primitive, using the projection as boundary constraint of the current plane primitive, inhibiting extension of the current plane primitive in the adjacent direction according to the boundary constraint, and intersecting the rest non-inhibited directions through plane primitives to obtain a plurality of candidate planes to form a candidate primitive pool; and establishing an energy equation according to the fitting degree between the original plane triangular patches in the Mesh model of the original single building and the candidate plane primitives in the candidate primitive pool, calculating the minimum energy solution of the energy equation according to a binary labeling method, and forming a simplified three-dimensional Mesh model of the building according to the plane primitive set corresponding to the minimum energy solution. According to the invention, the flat areas in the Mesh surface sheets of the building are subjected to multi-scale feature extraction to obtain the building plane elements, and the parallel and vertical relations among the building plane elements are recovered to serve as building features which are mainly maintained in the simplification process, and meanwhile, the topological relation among part of the building plane elements is recovered through the regularity and the adjacency among the plane elements, so that the geometric precision and the topological accuracy of the simplified Mesh model are improved, and the sharp features of the building are better maintained.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal comprising the element.
Of course, those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by a computer program for instructing relevant hardware (e.g., processor, controller, etc.), the program may be stored on a computer readable storage medium, and the program may include the above described methods when executed. The computer readable storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited in its application to the examples described above, but is capable of modification and variation in light of the above teachings by those skilled in the art, and that all such modifications and variations are intended to be included within the scope of the appended claims.

Claims (10)

1. A method for simplifying a regular feature-preserving building Mesh model, characterized in that the method for simplifying the regular feature-preserving building Mesh model comprises the following steps:
acquiring an original single building Mesh model, calculating the center-of-gravity point coordinate and a first normal vector of each original planar triangular patch in the original single building Mesh model, and the normal vector average value and variance of two adjacent order original planar triangular patches, and carrying out region growing on the original planar triangular patches according to the difference value between the first normal vector and the normal vector average value to obtain an initial planar triangular patch set in the original single building Mesh model, wherein the initial planar triangular patch set is a planar primitive in the original single building Mesh model;
calculating the area and the normal vector of a plane primitive, carrying out regularization adjustment on the plane primitive according to the difference between the normal vectors of the plane primitive to obtain a regularized plane primitive, obtaining a first direction angle in the plane primitive and a second direction angle corresponding to an initial plane triangular patch in the plane primitive, and carrying out adjustment on a line segment corresponding to the first direction angle according to the difference between the first direction angle and the second direction angle to obtain a regularized boundary line segment of the plane primitive;
Acquiring a closed boundary line set of an original planar triangular patch in the planar primitive and a boundary line set of the regularized planar primitive, acquiring a subset meeting a preset condition in the boundary line set, judging whether the planar primitive is adjacent according to the proportion of the sum of the lengths of line segments in the subset and the sum of all line segments in the original planar triangular patch, and if so, judging that the two planar primitives are adjacent planar primitives;
obtaining projection of the adjacent plane primitive in a current plane primitive, using the projection as boundary constraint of the current plane primitive, inhibiting extension of the current plane primitive in the adjacent direction according to the boundary constraint, and intersecting the rest non-inhibited directions through plane primitives to obtain a plurality of candidate planes to form a candidate primitive pool;
and establishing an energy equation according to the fitting degree between the original plane triangular patches in the Mesh model of the original single building and the candidate plane primitives in the candidate primitive pool, calculating the minimum energy solution of the energy equation according to a binary labeling method, and forming a simplified three-dimensional Mesh model of the building according to the plane primitive set corresponding to the minimum energy solution.
2. The method for simplifying a building Mesh model with regular features according to claim 1, wherein the obtaining an original single building Mesh model, calculating a center of gravity point coordinate and a first normal vector of each original planar triangular patch in the original single building Mesh model, and a normal vector average value and a variance of two adjacent order original planar triangular patches, and performing region growing on the original planar triangular patches according to a difference value between the first normal vector and the normal vector average value, so as to obtain a set of initial planar triangular patches in the original single building Mesh model, wherein the set of initial planar triangular patches is a planar primitive in the original single building Mesh model, and specifically includes:
Acquiring an original single building Mesh model, and splitting the original single building Mesh model to make the areas of original plane triangular patches in the original single building Mesh model equal;
calculating the center of gravity point coordinates and a first normal vector of each original planar triangular patch in the Mesh model of the original single building, the average value of a second normal vector and the variance of a first angle difference of a first-order adjacent original planar triangular patch set of each original planar triangular patch, and the average value of a third normal vector and the variance of a second angle difference of a second-order adjacent original planar triangular patch set of each original planar triangular patch;
constructing a multi-scale feature descriptor of each original planar triangular patch according to the barycentric coordinates, the first normal vector, the average value of the second normal vector, the variance of the first angle difference, the average value of the third normal vector and the variance of the second angle difference;
judging whether the difference values of the first normal vector, the second normal vector and the third normal vector are smaller than a first preset threshold value, if so, taking the original plane triangular patches corresponding to the first normal vector, the second normal vector and the third normal vector as initial seed points, carrying out region growing on the original plane triangular patches, merging the original plane triangular patches with adjacent normal difference values smaller than the first preset threshold value until the difference value between all the adjacent original plane triangular patches and the growing original plane triangular patch set is not smaller than the first preset threshold value, and obtaining an initial plane triangular patch set in the Mesh model of the original single building, wherein the initial plane triangular patch set is a plane primitive in the Mesh model of the original single building.
3. The method for simplifying a building Mesh model maintained by regular features according to claim 1, wherein the calculating area and normal vector of a planar primitive, performing regular adjustment on the planar primitive according to difference between normal vectors of the planar primitive to obtain a regular planar primitive, obtaining a first direction angle in the planar primitive and a second direction angle corresponding to an initial planar triangular patch in the planar primitive, and adjusting a line segment corresponding to the first direction angle according to difference between the first direction angle and the second direction angle to obtain a regular boundary line segment of the planar primitive, specifically comprising:
calculating the area and the normal vector of the plane primitive, starting from the plane primitive with the largest area according to the sequence of the area from the largest area, judging whether the difference value between the normal vector of the plane primitive with the largest area and the normal vector in the rest plane primitives is in a first preset range or a second preset range, if so, rotating the plane primitive which is compared with the plane primitive with the largest area around the center of the plane primitive to be consistent with or vertical to the normal vector direction of the plane primitive with the largest area until all the plane primitives are judged and adjusted once, and obtaining the regularized plane primitive;
Starting from a plane primitive with the largest area, acquiring a triangular vertex penetrating through an initial plane triangular patch in the plane primitive, projecting the plane primitive which is not parallel to the plane primitive, and obtaining a direction angle set through the triangular vertex and a projection result;
obtaining a boundary line of an initial plane triangular patch in the plane primitive, and simplifying the boundary line by adopting a Fabry-Perot method to obtain a simplified line segment;
and calculating the direction angle of the line segment, judging whether the difference value between the direction angle of the line segment and the direction angle in the direction angle set is lower than a preset second preset threshold value, and if so, rotating the line segment corresponding to the direction angle of the line segment in the direction angle set around the line segment until the line segment is consistent with the simplified line segment angle, thereby obtaining the regularized boundary line segment.
4. A method for simplifying a Mesh model of a building according to claim 3, wherein the step of simplifying the boundary line by using the douglas poder method specifically comprises:
acquiring a plurality of coordinate points corresponding to the starting points and the stopping points of boundary lines in a plurality of triangular patches, and forming a broken line by the plurality of coordinate points;
Connecting the starting and stopping points of the fold lines to obtain a straight line;
and judging the distance between the point on the folding line and the straight line, if the distance is larger than a third preset threshold value, reserving the point on the folding line compared currently, otherwise, discarding.
5. The method for simplifying a building Mesh model according to claim 1, wherein the obtaining a closed boundary line set of an original planar triangular patch in the planar primitive and a boundary line set of the regularized planar primitive, obtaining a subset meeting a preset condition in the boundary line set, and judging whether the planar primitive is adjacent according to a ratio of a sum of line segment lengths in the subset to a sum of all line segments in the original planar triangular patch, if yes, the two planar primitives are adjacent planar primitives, specifically includes:
acquiring a closed boundary line set of an original planar triangular patch in two planar primitives and a boundary line set of the regularized planar primitives;
extracting line segments which are parallel to each other and have a minimum distance of a linear equation smaller than a fourth preset threshold value from the boundary line set of the regularized plane primitive to obtain two subsets;
Calculating the ratio of the sum of the lengths of the line segments in the two subsets to the sum of the lengths of all the line segments in the closed boundary line set of the original planar triangular patch respectively to obtain a first proportion and a second proportion;
if the intersection of two primitives in the closed boundary line set of the original planar triangular patch is not an empty set or the first proportion is larger than a fifth preset threshold or the second proportion is larger than the fifth preset threshold, the two primitives are adjacent, otherwise the two primitives are not adjacent.
6. The method for simplifying a building Mesh model with regular feature preservation according to claim 1, wherein the obtaining a projection of the neighboring plane primitive in a current plane primitive uses the projection as a boundary constraint of the current plane primitive, suppresses extension of an adjacent direction of the current plane primitive according to the boundary constraint, and the remaining non-suppressed directions are intersected by plane primitives to obtain a plurality of candidate planes to form a candidate primitive pool, specifically including:
acquiring a current plane primitive and a plane primitive adjacent to the current plane primitive, and calculating projection of the adjacent plane primitive in a plane;
taking the projection as boundary constraint of a current plane primitive, and inhibiting the extension of the adjacent direction of the current plane primitive according to the boundary constraint, wherein the other directions without the boundary constraint continue to extend;
And obtaining a plurality of candidate planes through the intersecting parts extending between the plane primitives, wherein the plane primitives and the candidate planes jointly form a candidate primitive pool.
7. The method for simplifying a building Mesh model with regular feature preservation according to claim 1, wherein the step of establishing an energy equation according to the fitting degree between an original planar triangular patch in the original single building Mesh model and a candidate planar primitive in the candidate primitive pool, calculating a minimum energy solution of the energy equation according to a binary labeling method, and forming a simplified three-dimensional building Mesh model according to a planar primitive set corresponding to the minimum energy solution specifically comprises:
obtaining a candidate plane primitive in the candidate primitive pool, extracting an original plane triangular patch contained in the candidate plane primitive, and obtaining the fitting degree of the plane triangular patch in the candidate plane primitive and the original plane triangular patch by calculating the average distance, the projection coverage ratio and the normal difference between the original plane triangular patch and the candidate plane primitive;
acquiring a first linear equation of an intersecting line of the candidate plane primitive and projection of the intersecting line in the original plane triangular patch, obtaining a set of the projection passing through the original plane triangular patch, obtaining a second linear equation according to a gravity center point of the original plane triangular patch in the set, and judging linear characteristic fitting property of the simplified model and an original monomer building Mesh model through the first linear equation and the second linear equation;
Determining the number of primitives connected with the same intersection line through a binary integer programming equation to obtain a topological constraint relation between the candidate plane primitives and the intersection line;
calculating the corresponding area proportion of the planar triangular patches of the original planar triangular patches in the candidate planar primitives to obtain a proportional range, and obtaining the fitting integrity of the simplified model and the Mesh model of the original monomer building through the proportional range;
and calculating the fitting degree through the fitting degree of the planar triangular patches in the candidate planar primitives to the original planar triangular patches, the linear feature fitting property of the simplified model and the Mesh model of the original single building, the topological constraint relation between the candidate planar primitives and the intersecting lines, and the fitting degree of the simplified model and the Mesh model of the original single building, so as to obtain the minimum energy solution of the fitting degree of the Mesh model of the original single building, and extracting the candidate planar primitives corresponding to the minimum energy solution, and combining the two to obtain the simplified three-dimensional Mesh model of the building.
8. A regular feature preserving building Mesh model simplification system, characterized in that the regular feature preserving building Mesh model simplification system comprises:
The planar primitive extraction module is used for obtaining an original single building Mesh model, calculating the gravity point coordinates and a first normal vector of each original planar triangular patch in the original single building Mesh model, and the normal vector average value and variance of two adjacent order original planar triangular patches, and carrying out region growing on the original planar triangular patches according to the difference value between the first normal vector and the normal vector average value to obtain an initial set of the planar triangular patches in the original single building Mesh model, wherein the initial set of the planar triangular patches is a planar primitive in the original single building Mesh model;
the plane primitive rule adjustment module is used for calculating the area and the normal vector of a plane primitive, carrying out rule adjustment on the plane primitive according to the difference between the normal vectors of the plane primitive to obtain a rule plane primitive, obtaining a first direction angle in the plane primitive and a second direction angle corresponding to an initial plane triangular patch in the plane primitive, and adjusting a line segment corresponding to the first direction angle according to the difference between the first direction angle and the second direction angle to obtain a rule boundary line segment of the plane primitive;
The plane primitive relation judging module is used for acquiring a closed boundary line set of an original plane triangular patch in the plane primitive and a boundary line set of the regularized plane primitive, acquiring a subset which accords with a preset condition in the boundary line set, judging whether the plane primitive is adjacent according to the proportion of the sum of the line segment lengths in the subset and the sum of all line segments in the original plane triangular patch, and if yes, judging that the two plane primitives are adjacent plane primitives;
the candidate plane generation module is used for acquiring projections of the adjacent plane primitives in the current plane primitive, taking the projections as boundary constraints of the current plane primitive, inhibiting extension of the adjacent direction of the current plane primitive according to the boundary constraints, and intersecting the rest non-inhibited directions through the plane primitives to obtain a plurality of candidate planes to form a candidate primitive pool;
and the candidate plane optimization module is used for establishing an energy equation according to the fitting degree between the initial plane triangular patches in the Mesh model of the original monomer building and the candidate plane primitives in the candidate primitive pool, calculating the minimum energy solution of the energy equation according to a binary labeling method, and forming a simplified three-dimensional building Mesh model according to a plane primitive set corresponding to the minimum energy solution.
9. A terminal, the terminal comprising: memory, a processor and a regular feature-preserving building Mesh model reduction program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the regular feature-preserving building Mesh model reduction method as claimed in any one of claims 1-7.
10. A computer readable storage medium storing a regular feature preserving building Mesh model reduction program which when executed by a processor implements the steps of the regular feature preserving building Mesh model reduction method according to any of claims 1-7.
CN202310406543.2A 2023-04-17 2023-04-17 Building Mesh model simplification method with rule feature maintained Active CN116129076B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310406543.2A CN116129076B (en) 2023-04-17 2023-04-17 Building Mesh model simplification method with rule feature maintained

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310406543.2A CN116129076B (en) 2023-04-17 2023-04-17 Building Mesh model simplification method with rule feature maintained

Publications (2)

Publication Number Publication Date
CN116129076A CN116129076A (en) 2023-05-16
CN116129076B true CN116129076B (en) 2023-06-27

Family

ID=86308528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310406543.2A Active CN116129076B (en) 2023-04-17 2023-04-17 Building Mesh model simplification method with rule feature maintained

Country Status (1)

Country Link
CN (1) CN116129076B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116305366B (en) * 2023-05-23 2023-09-15 四川启睿克科技有限公司 Modeling method and simplified model of liquid crystal display television heat dissipation simulation module

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107767453A (en) * 2017-11-01 2018-03-06 中北大学 A kind of building LIDAR point cloud reconstruction and optimization methods of rule-based constraint

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111508074B (en) * 2020-03-12 2023-06-27 浙江工业大学 Three-dimensional building model simplification method based on roof contour line
CN112712596B (en) * 2021-03-29 2021-07-06 深圳大学 Dense matching point cloud building structured model fine reconstruction method
CN114092666A (en) * 2021-11-01 2022-02-25 西安建筑科技大学 Model mesh simplification improvement algorithm for mobile AR auxiliary building construction APP
CN114332291A (en) * 2021-12-21 2022-04-12 武汉大势智慧科技有限公司 Oblique photography model building outer contour rule extraction method
CN115294258B (en) * 2022-09-26 2022-12-23 腾讯科技(深圳)有限公司 Three-dimensional model expansion method, device, equipment and computer-readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107767453A (en) * 2017-11-01 2018-03-06 中北大学 A kind of building LIDAR point cloud reconstruction and optimization methods of rule-based constraint

Also Published As

Publication number Publication date
CN116129076A (en) 2023-05-16

Similar Documents

Publication Publication Date Title
CN108062784B (en) Three-dimensional model texture mapping conversion method and device
Li et al. Feature-preserving 3D mesh simplification for urban buildings
CN109685080B (en) Multi-scale plane extraction method based on Hough transformation and region growth
Li et al. Modelling of buildings from aerial LiDAR point clouds using TINs and label maps
US9959670B2 (en) Method for rendering terrain
CN111581776B (en) Iso-geometric analysis method based on geometric reconstruction model
US9147279B1 (en) Systems and methods for merging textures
WO2013155271A1 (en) Systems and methods for obtaining parameters for a three dimensional model from reflectance data
CN116129076B (en) Building Mesh model simplification method with rule feature maintained
CN113781667A (en) Three-dimensional structure simplified reconstruction method and device, computer equipment and storage medium
CN111382618B (en) Illumination detection method, device, equipment and storage medium for face image
CN113012063B (en) Dynamic point cloud repairing method and device and computer equipment
US20160180586A1 (en) System and method for data compression and grid regeneration
CN115861247A (en) High-resolution remote sensing image contour multistage regularization method, system and application
CN116416366A (en) 3D model construction method and device and electronic equipment
CN116563493A (en) Model training method based on three-dimensional reconstruction, three-dimensional reconstruction method and device
CN113327315A (en) Multi-level detail model generation method and device
CN116385672A (en) Construction method of three-dimensional terrain scene model data product
CN114896679A (en) Three-dimensional model optimization method for building, intelligent terminal and storage medium
CN113920275B (en) Triangular mesh construction method and device, electronic equipment and readable storage medium
US20200211256A1 (en) Apparatus and method for generating 3d geographic data
CN116805356A (en) Building model construction method, building model construction equipment and computer readable storage medium
JP2011033987A (en) Map creating device and map creating method
Yu et al. Saliency computation and simplification of point cloud data
JP2019016066A (en) Feature shape extraction device, feature shape extraction method and program

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