A building extraction method, device and equipment for real scene three-dimensional model
By preprocessing the real-world 3D model, separating ground and non-ground primitives, detecting oversegmentation and planar features, and combining greedy culling and topology restoration methods, the problem of incomplete building extraction in existing technologies has been solved, achieving high-precision building extraction without manual annotation.
Patent Information
- Application Number
- CN202211223721.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-08
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-10-08
AI Technical Summary
Existing technologies struggle to extract buildings efficiently and completely from real-world 3D models. In particular, the generated models suffer from a "single-skin" phenomenon, failing to meet diverse application needs. Furthermore, supervised methods require extensive manual annotation, while unsupervised methods result in incomplete extraction.
A bidirectional greedy strategy is adopted. Through preprocessing and parsing of the real-scene 3D model, ground and non-ground primitives are separated, oversegmentation and planar feature detection are performed, non-building primitives are greedily removed, and erroneously deleted primitives are recovered by using topological adjacency relationships, so as to achieve complete extraction of buildings.
It achieves high-precision and complete extraction of buildings from large-scale real-world 3D models, with a recall rate of over 97% and regular boundaries, avoiding poor visualization and analysis results caused by incomplete buildings, and eliminating the need for manual annotation.
Smart Images

Figure CN115661398B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of surveying and mapping data processing, and in particular relates to a method, apparatus and equipment for extracting buildings from real-world 3D models. Background Technology
[0002] With the rapid development of drone technology and optical sensor technology, airborne LiDAR and oblique photogrammetry technologies can now acquire large-scale 3D surface information at low cost, quickly, and accurately. In particular, drone-based oblique photogrammetry technology can effectively collect the coordinates and texture information of building tops and side facades, making it increasingly important in the construction of 3D digital cities and smart cities. The acquired 3D surface information is processed and exists in the form of point clouds. These point clouds can be further used to generate Digital Orthophoto Models (DOM), Digital Surface Models (DSM), and realistic 3D models.
[0003] Compared to 2D imagery (such as DSM and DOM), reality 3D models contain detailed 3D geometric and textural features. Compared to 3D point clouds, reality 3D models offer advantages such as spatial continuity and explicit adjacency, and they require less disk space and memory because point clouds filter out some geometrically irrelevant points during reconstruction. Compared to 3D models in computer graphics, reality 3D models represent a large area of detailed 3D surface information and have a greater number of primitives. Therefore, reality 3D models are widely used in various types of 3D geographic applications and spatial analysis.
[0004] Numerous studies have emerged on ground filtering, feature extraction, scene segmentation, and spatial clustering of DSM, DOM, and point cloud data. However, research on the most crucial aspects of 3D digital cities—such as real-scene 3D model data segmentation and feature extraction—is scarce. Furthermore, real-scene modeling software like Photomesh and ContextCapture, due to their fully automated mechanism of constructing a continuous, holistic mesh model, produces a "one-size-fits-all" 3D model. This means all features are represented by a single 3D mesh, making semantic querying and analysis difficult and failing to meet diverse application needs. Therefore, objectifying and materializing real-scene 3D models is an urgent requirement in the construction of 3D digital cities, but mature methods for extracting buildings from real-scene 3D models are currently lacking both domestically and internationally.
[0005] Existing methods for building extraction from DOM and point clouds can be categorized into supervised and unsupervised methods. Supervised methods (such as convolutional neural networks and graph neural networks) typically achieve significantly higher extraction accuracy than unsupervised methods. However, supervised methods require a large number of samples, and the labeling process is extremely time-consuming and labor-intensive. Neither supervised nor unsupervised methods can completely extract buildings, often resulting in incomplete or non-standard building structures. Therefore, this invention proposes a building extraction method for real-world 3D models. This method enables high-precision extraction of buildings from large-scale real-world 3D models, ensuring the integrity and regularity of the extracted buildings, and eliminating the need for manual labeling. Summary of the Invention
[0006] To overcome the aforementioned shortcomings of existing technologies, this invention proposes a method, apparatus, and device for extracting buildings from real-world 3D models. This method enables high-precision extraction of buildings from large-scale real-world 3D models, ensuring the integrity and regularity of the extracted buildings, and eliminating the need for manual labeling. This invention is achieved through the following technical solutions:
[0007] A method for extracting buildings from a real-world 3D model includes the following steps:
[0008] Step 1: Preprocessing and parsing of the real-world 3D model, in order to stitch together all the tiles of the real-world 3D model into a complete 3D model, and to parse the real-world 3D model into a set of geometric primitives.
[0009] Step 2: Separate the ground primitives and non-ground primitives of the real-world 3D model, and assemble the primitive set. Separate into ground-based primitive sets Non-ground primitive set
[0010] Step 3, Non-Ground Primitive Set Over-segmentation is performed to cluster the numerous primitives into sets of k clusters with symmetrical properties and regular boundaries.
[0011] Step 4, for cluster set Planar feature detection is performed to quickly generate a set of l planes with regular boundaries.
[0012] Step 5, for the planar set A greedy removal process is employed for non-building planes, meaning that vegetation, street furniture, trees, vehicles, and other non-building planes are removed to the greatest extent possible. During this process, while ensuring the integrity of the main building structure, some building planes may be incorrectly removed. The result is a set of building structure planes. Non-building planar set
[0013] Step 6: The set of building main structure plans obtained after greedy elimination. All the primitives contained Based on this, a greedy recovery is performed using the topological adjacency relationships between primitives to recover the set of primitives contained in the building planes that were incorrectly removed in step 5. This results in a final set of building elements that takes into account the integrity of the structure.
[0014] Step 7, output or save the data. The three-dimensional model of the building is composed of real-life scenery. A non-building real-world 3D model.
[0015] Furthermore, in step 2, a primitive-based cloth simulation method is used to separate the ground primitives and non-ground primitives of the real-world 3D model.
[0016] Furthermore, the specific implementation method of step 2 is as follows;
[0017] S201: Vertically flip the real-world 3D model along the Z-coordinate direction, i.e., flip the set... The Z-coordinates of all vertices of the primitives are reversed;
[0018] S202: Simulate the fall of a piece of cloth made of particles above the flipped real-world 3D model. The initial height of all the particles that make up the cloth is the highest point of the flipped primitive. The initial horizontal position is determined by the cloth resolution and the bounding box of the real-world 3D model. The cloth falls slowly under the action of gravity.
[0019] S203: When the cloth particles come into contact with the real-world 3D model, they gradually stop moving. The contact between the cloth and the real-world 3D model is determined by collision detection based on ray intersection. If the current vertical height of the cloth particle is lower than its collision point with the real-world 3D model, it is set to be immovable.
[0020] S204: The final static cloth shape approximates the terrain. Then, the Euclidean distance from each primitive to the cloth is calculated. If it exceeds a set threshold, it is added to the set primitive. If it is within the threshold, then add it.
[0021] Furthermore, the non-ground primitive set in step 3 For over-segmentation, a primitive-based over-segmentation method can be chosen to cluster a large number of primitives into a set of k clusters with uniform properties and regular boundaries. include:
[0022] S301, taking into account the spatial proximity characteristics, surface characteristics, and color characteristics of primitives, constructs the primitive heterogeneity distance formula D(p i ,p j )=μ1D s (p i ,p j )+μ2D e (p i ,p j )+μ3D c (p i ,p j In the formula, and denoted as the normalized spatial proximity distance, surface feature difference distance, and color difference distance between two primitives, respectively, with μ1, μ2, and μ3 being the corresponding weighting factors for each. For p i The q-th vertex, and p i and p j The normal vector, i.e. p i and p j Color difference distance D between two primitives c (p i ,p j It is calculated in the CIE Lab linear color space. For the basic element p i Average texture color value in CIE Lab space;
[0023] S302, Based on the aforementioned primitive heterogeneity distance formula D(·), construct the heterogeneity cost function for the cluster. And determine its constraints, which are used to determine the sum of heterogeneity costs for all clusters, where If r ij =1 indicates that the primitive p i r can represent the central primitive of a cluster, and this cluster contains all elements that satisfy r ij =0 non-central primitive; J(r ij The constraints are as follows: Where I(·) is an exponential function, and k represents the expected number of clusters;
[0024] S303, Based on the heterogeneity cost function J(·) and its constraints, construct and solve the energy optimization function. This results in the real-world 3D model being over-segmented into a set of k clusters with uniform properties and regular boundaries. For solving the energy equation, a bottom-up, merge-based energy minimization method can be used to... Except for the central primitive set Each primitive outside is mapped according to the mapping function It is allocated to various clusters, among which D(p j ,cp i ) is the basic element p j With the primitive CP i The heterogeneous distance between them, and make each primitive Its classification of cluster central primitives The sum of heterogeneous distances is minimized.
[0025] Furthermore, the bottom-up, merge-based energy minimization method specifically involves first optimizing the energy optimization function E(r... ij Add a regularization term to ) that is: In the formula, λ is a regularization parameter. The initial value of the regularization parameter λ is set to the median of the lowest heterogeneity distance between each primitive and its neighboring primitives. It then increases by a factor of two in each iteration. Initially, all primitives are set as the central primitives of the clusters and are continuously merged from bottom to top in pairs until the number of clusters decreases to k.
[0026] Furthermore, the normal vector of the triangular primitive is calculated using the spatial coordinates of its three vertices v1, v2, and v3:
[0027] Average color texture value The calculation method is as follows: calculate the primitive p in the Adobe RGB color space. i Within the spatial range of the y-direction and the number of scan lines, from top to bottom, for any scan line, all edges of the primitive intersect with that scan line. From left to right, sort the resulting x-coordinates. Edges intersected an odd number of times are considered inbound edges, and edges intersected an even number of times are considered outbound edges. Then, interpolation is used to calculate the spatial coordinates of pixels on the scan line between the inbound and outbound edges. The barycentric coordinate method is used to calculate the UV coordinates of all pixels inside the primitive, with their U and V coordinates being... Where S a Let S be the area of the triangle formed by the coordinates of the pixel and the vertices v1 and v2 of the primitive. b S is the area of the triangle formed by the pixel and the vertices v1 and v3 of the primitive. c Let S be the area of the triangle formed by the pixel and the vertices v2 and v3 of the primitive, where U1, U2, U3, V1, V2, and V3 are the UV coordinates of v1, v2, and v3, respectively.t =S a +S b +S c After all UV coordinates are solved, the texture values are obtained from the texture image corresponding to the primitive using the UV coordinates, and the average of all texture values is taken as the texture value of the primitive. Then the Adobe RGB color space is converted to the CIE Lab color space.
[0028] Furthermore, for cluster sets One method for planar feature detection is a cluster-based planar feature detection method, which can quickly generate a set of l planes with regular boundaries. include:
[0029] S401: For the aforementioned cluster set Select set One cluster is treated as a plane Seed clusters, and remove the seed clusters from the set cluster set. Remove from the middle, where plane S m It is composed of a subset of the cluster set ψ;
[0030] S402: Calculate the set of k1 neighboring clusters surrounding the seed cluster. for For each neighboring cluster in the seed cluster, determine whether it shares the same properties as the seed cluster based on the similarity criterion. If it satisfies the planar similarity criterion, then merge the neighboring cluster into the plane S containing the seed cluster. m At the same time from the set Remove the neighboring cluster from the list; if the planar similarity criterion is not met, no operation is performed on the cluster.
[0031] S403: Incorporate the new process described in S402 into plane S m Each cluster is treated as a plane S. m The new seed clusters are obtained, and step S402 is iteratively executed until no cluster in ψ satisfies the planar similarity criterion;
[0032] S404: Iteratively execute processes S401-S403 until... Empty, storing the plane S detected in each iteration. m To form a candidate planar feature set S;
[0033] S405: Post-process the candidate plane feature set S, and remove candidate planes in S whose number of clusters is less than k2.
[0034] Furthermore, for planar sets For performing a greedy removal method for non-building planes, the following greedy removal methods can be selected:
[0035] S501, Green Vegetation Primitive Removal Based on Color Features: Calculate the average texture value of all primitives in each plane as the texture value of that plane, and calculate the over-green minus over-red index for each plane: ExG-ExR = 3g - 2.4rb, where r, g, and b are the color components of that plane, respectively. Then, the optimal removal threshold t for ExG-ExR is automatically calculated using the Otsu's method (OTSU). If the exG-ExR of a plane is greater than the threshold t, it is considered a green vegetation plane and removed.
[0036] S502, Low-rise feature filtering based on relative ground elevation: Calculate the centroid of each ground element in the set of ground elements. Calculate the relative ground elevation value of each element in each plane, i.e., the difference between the centroid elevation value of the element and the average elevation value of the centroids of its three nearest neighbors. Use the maximum relative ground elevation of all elements in a plane as the relative ground elevation value of that plane. If the relative ground elevation value of a plane is less than the threshold k4, it is considered a low-rise feature plane and is removed. At this point, almost all remaining elements are buildings.
[0037] Furthermore, during the greedy recovery process utilizing the topological adjacency relationships between primitives, a stack-based depth-first search algorithm can be employed to search for all topologically reachable primitives for each primitive. Additionally, to prevent... The existence of a very small portion of non-building planes leading to a large-scale misreconstruction of non-building elements can be addressed in advance. The set is spatially divided into uniform blocks of topological relationships, and the primitives are traversed to all topologically reachable primitives in their respective blocks to prevent non-building primitives from being over-recovered.
[0038] The present invention also provides a building extraction device for real-world 3D models, comprising the following modules:
[0039] Real-world 3D model parsing module: Used to input a real-world 3D model, stitch together all the tiles of the acquired real-world 3D model into a complete 3D model, and parse the real-world 3D model into a set of geometric primitives;
[0040] Ground Filtering Module: Used to input ground filtering parameters and primitive sets, and separate the input primitive set into ground primitive sets and non-ground primitive sets;
[0041] Oversegmentation module: Used to take oversegmentation parameters and primitive set as input, and to cluster the input primitive set into a set of clusters with uniform properties and regular boundaries;
[0042] Planar Feature Detection Module: The user inputs the parameters for planar feature detection and the set of clusters or primitives, and the module clusters the input set of clusters or primitives into a set of planes with regular boundaries.
[0043] The non-building plane greedy elimination module is used to input greedy elimination parameters and a set of non-ground primitives, and greedily eliminate non-building primitives such as green vegetation and urban furniture to obtain a set representing the main structure of the building and a set of non-building planes.
[0044] Building primitive greedy recovery module: Used to take in the parameters for greedy recovery, the set representing the main structure of the building, and the set of non-building planes. It is used to greedily recover the set of main building structures based on the topological adjacency relationship between primitives, and to recover the building primitives that were mistakenly deleted in the non-building plane greedy elimination module, so as to obtain the final set of building primitives that takes into account the integrity.
[0045] Output module: Used to input the path where the model is saved, and output the actual 3D model of the building and the actual 3D model of the non-building.
[0046] An electronic device includes a distributed memory, a processor, and a computer program in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for extracting buildings from a real-world 3D model as described above.
[0047] A computer-readable storage medium storing computer software instructions that implement the steps of the building extraction method for real-world 3D models described above.
[0048] Compared with the prior art, the advantages and beneficial effects of the present invention are as follows:
[0049] (1) To address the current lack of effective methods for building extraction from real-world 3D models, this invention proposes a method for building extraction from real-world 3D models, which enables rapid and high-precision building extraction.
[0050] (2) This invention comprehensively utilizes the spatial proximity features, surface features, and color features of real-world 3D models to extract building models. It employs a bidirectional greedy strategy: after filtering ground primitives, it greedily removes non-building primitives such as green vegetation, urban furniture, trees, and vehicles from the obtained non-ground primitives to obtain a set representing the main structure of the building. Then, based on the incomplete main structure of the building, it greedily restores the mistakenly deleted building primitives to obtain a final building model that takes into account its integrity. This achieves complete building extraction with a recall rate of over 97%, avoiding poor visualization and analysis results caused by incomplete building structures, and ensuring the extracted building has regular boundaries. Attached Figure Description
[0051] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0052] Figure 1 This is a flowchart of a method for extracting buildings from a real-world 3D model, as described in an embodiment of the present invention.
[0053] Figure 2 This is a real-world 3D model used in the embodiments of the present invention.
[0054] Figure 3 It is the set of non-ground primitives after filtering the ground from the real-world 3D model in this embodiment of the invention.
[0055] Figure 4 These are a series of primitive clusters with uniform internal properties generated after local clustering in this embodiment of the invention.
[0056] Figure 5 It is the plane obtained by cluster-based planar feature detection in the embodiments of the present invention.
[0057] Figure 6 This is the incomplete main structure of the building obtained after removing green vegetation elements and extracting low-lying landform elements from the plane in this embodiment of the invention.
[0058] Figure 7 The three-dimensional model of a building with a complete structure is extracted using a method for automatically extracting complete buildings from real-world three-dimensional models in this embodiment of the invention.
[0059] Figure 8 This is a flowchart of a primitive-oriented cloth simulation method provided in another embodiment of the present invention.
[0060] Figure 9 This is a flowchart of a primitive-based oversegmentation method provided in another embodiment of the present invention.
[0061] Figure 10 This is a flowchart of a cluster-based planar feature detection method provided in another embodiment of the present invention.
[0062] Figure 11 This is a module diagram of a building extraction device for real-world 3D models according to another embodiment of the present invention.
[0063] Figure 12 This is a structural block diagram of a building extraction device for real-world 3D models according to another embodiment of the present invention.
[0064] Figure 13 This is a data processing schematic diagram of a building extraction device for real-world 3D models according to another embodiment of the present invention. Detailed Implementation
[0065] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0066] It should be understood that various modifications can be made to the embodiments disclosed herein. Therefore, the following description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this disclosure will be apparent to those skilled in the art.
[0067] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present disclosure and, together with the general description of the disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the disclosure.
[0068] These and other features of the invention will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.
[0069] It should also be understood that although the invention has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of the invention, which have the features described in the claims and are therefore all within the scope of protection defined herein.
[0070] However, it should be understood that the disclosed embodiments are merely examples of this disclosure and can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure this disclosure. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but merely to serve as the basis and representative basis for the claims to teach those skilled in the art to use this disclosure in a variety of substantially any suitable detailed structures.
[0071] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in still another embodiment,” all of which may refer to one or more of the same or different embodiments according to this disclosure.
[0072] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0073] like Figure 1 As shown, this embodiment of the invention provides a method for extracting buildings from a real-world 3D model, including:
[0074] S1 model preprocessing and parsing: Reading such... Figure 2The shown OSGB or 3D Tiles format real-world 3D model is stitched together from all the original resolution tiles of the real-world 3D model to form a complete 3D model. This real-world 3D model is then parsed, resolving it into a set of geometric primitives. n represents the number of primitives read; each primitive stores its index, vertex coordinates, and texture mapping coordinates.
[0075] S2 Realistic 3D Model Ground Filtering: Employing a primitive-oriented cloth simulation method, this method separates ground primitives from non-ground primitives in the realistic 3D model, and aggregates the primitive sets... Separate into ground-based primitive sets Non-ground primitive set The resulting set of non-ground primitives is as follows Figure 3 As shown. The final static cloth shape approximates the terrain. The spatial distance from each primitive to the cloth is calculated, and if it exceeds a set threshold, it is added to the list. If it is within the threshold, then add it.
[0076] S3 Oversegmentation: Employs a primitive-based oversegmentation method for non-ground primitive sets. Over-segmentation is performed to cluster the numerous primitives into sets of k clusters with symmetrical properties and regular boundaries. Oversegmentation results are as follows Figure 4 The number of clusters, k, is converted to a cluster resolution R = 1 meter for easy configuration. In the formula, X max X min Y max and Y min They are the sets of primitives. The maximum and minimum values of the X-coordinate, and the set of primitives. The maximum and minimum values of the Y-coordinate;
[0077] S4, Cluster-based planar feature detection: for cluster sets Planar feature detection is performed to quickly generate a set of l candidate planes with regular boundaries. Next, candidate planes lacking planar features are removed. First, candidate planes with fewer than k² = 7 clusters are removed, as some candidate planes consist of only a few clusters lacking planar features. Second, candidate planes with an area smaller than the expected value (20 square meters) are removed. The remaining candidate planes are used as the final planar detection results. The planar feature detection results are as follows: Figure 5 As shown;
[0078] S5, Green Vegetation Removal Based on Color Features: Besides buildings, the resulting planes obtained after the above steps contain some low-lying vegetation, cars, trees, and other interfering features. First, the main interfering feature—green vegetation—is removed based on color features. The texture values of all primitives in each plane are calculated, and their average value is taken as the texture value of that plane. The over-green / over-red index for each plane is calculated: ExG-ExR = 3g - 2.4rb, where r, g, and b are the color components of that plane, respectively. Then, the optimal removal threshold t for ExG-ExR is automatically calculated using the Otsu's method (OTSU). If the ExG-ExR of a plane is greater than the threshold t, it is considered a green vegetation plane and removed.
[0079] S6, Removal of Low-lying Features Based on Relative Ground Elevation: After the above steps, the main disturbing features—green vegetation—have been removed. However, a small number of low-lying features such as cars and street furniture still exist. These low-lying features are filtered out using relative ground elevation: The centroid of each ground element in the set of ground elements separated in step S3 is calculated, and a KDTree spatial index structure is established. The relative ground elevation value of each element in each plane is calculated, that is, the difference between the centroid elevation value of the element and the average elevation value of its nearest k3 = 10 ground element centroids. The k3 nearest ground element centroids are retrieved through the KDTree spatial index structure. The maximum relative ground elevation of all elements in a plane is taken as the relative ground elevation value of that plane. If the relative ground elevation value of the plane is less than the threshold k4, which is set to 2 meters, then it is considered a low-lying feature plane and removed. After removal, the set of building main structure planes is obtained. Non-building planar set The obtained incomplete main structure of the building, such as Figure 6 As shown;
[0080] S7, Greedy Recovery of Erroneously Deleted Building Primitives Based on Topology: After the above steps, the remaining planes almost entirely contain buildings, representing the main structure of the buildings. However, inevitably, some building primitives were mistakenly deleted during the previous processing. Therefore, we use topological adjacency relationships to recover the mistakenly deleted building primitives. The specific process is as follows: Let the set of building main structure planes obtained after greedy deletion be... The set of all primitives in the set is The set of primitives contained in the incorrectly removed building plan is This results in a final set of building elements that takes into account the integrity of the structure. For each Search for the set of primitives that are topologically adjacent to it. Will The primitives in the text are labeled as building primitives, that is... Similarly, for For each primitive, search its topologically adjacent primitives and mark them as buildings, recursively searching until... For each primitive, all topologically reachable primitives are searched. Among them, p... i The primitives of topological adjacency can be considered as those of p. i Primitive elements sharing a vertex can also be considered as having a common vertex with p. i Primitive elements sharing edges; furthermore, to prevent The existence of a very small number of non-building primitives leads to a large-scale misrecovery of non-building primitives, which affects... The set is spatially divided into uniform blocks of topological relationships, and the primitives are traversed to all topologically reachable primitives in their respective blocks to prevent non-building primitives from being over-recovered.
[0081] S8 Output Model: Output or save by The three-dimensional model of the building is composed of real-life scenery. The resulting 3D model is a non-building reality scene. The final output building model is as follows: Figure 7 As shown.
[0082] like Figure 8 As shown, another embodiment of the present invention also provides a primitive-oriented cloth simulation method, including:
[0083] S201: Vertically flip the real-world 3D model along the Z-coordinate direction, i.e., flip the set... The Z-coordinates of all vertices of the primitives are reversed;
[0084] S202: Simulate the fall of a piece of cloth composed of particles above the flipped realistic 3D model. The initial height of all particles constituting the cloth is the highest point of the flipped primitives. The initial horizontal position is determined by the cloth resolution (set to 0.5 meters) and the bounding box of the realistic 3D model. The cloth falls slowly under the influence of gravity.
[0085] S203: When cloth particles come into contact with the real-world 3D model, they gradually stop moving. The contact between the cloth and the real-world 3D model is determined by collision detection based on ray intersection. The efficiency of collision detection can be improved by using a hierarchical bounding box (BVH) tree structure. If the current vertical height of the cloth particle is lower than its collision point with the real-world 3D model, it is set to immobile.
[0086] S204: The final static cloth shape approximates the terrain. Then, the Euclidean distance from each primitive to the cloth is calculated. If it exceeds a set threshold (set to 0.5 meters), it is added to the target area. If it is within the threshold, then add it.
[0087] like Figure 9As shown, another embodiment of the present invention also provides a primitive-based over-segmentation method, including:
[0088] S301, taking into account the spatial proximity characteristics, surface characteristics, and color characteristics of primitives, constructs the primitive heterogeneity distance formula D(p i ,p j )=μ1D s (p i ,p j )+μ2D e (p i ,p j )+μ3D c (p i ,p j In the formula, and These represent the surface feature difference distance, spatial proximity distance, and color difference distance between two normalized primitives, respectively. μ1, μ2, and μ3 are the weighting factors for these three parameters, with values ranging from [0,1]. Users can specify these three parameters according to their needs. In this embodiment, the values are 0.5, 0.2, and 1, respectively. For p i If the q-th vertex is of the triangle primitive type, then q can be at most 3. and p i and p j The normal vector, i.e. p i and p j Color difference distance D between two primitives c (p i ,p j It is calculated in the CIE Lab linear color space. For the basic element p i Average texture color value in CIELab space;
[0089] in, The method for calculating the normal vector of each primitive element: Taking a triangle primitive element as an example, the normal vector of the primitive element is calculated using the spatial coordinates of its three vertices v1, v2, and v3.
[0090] Among them, the basic element p i Average color texture value The calculation can be based on the scanline algorithm, specifically: taking the calculation of color texture values in the Adobe RGB color space as an example, the calculation of primitive p... iThe spatial range and number of scan lines in the y-direction are determined. From top to bottom, for any scan line, all edges of the primitive are intersected with that scan line. From left to right, the x-coordinates of the intersections are sorted; edges intersected an odd number of times are considered inbound edges, and edges intersected an even number of times are considered outbound edges. Then, the spatial coordinates of the pixels on the scan line between the inbound and outbound edges are calculated using interpolation. The UV coordinates of all pixels within the primitive are calculated using the barycentric coordinate method, with their U and V coordinates being... Where S a Let S be the area of the triangle formed by the coordinates of the pixel and the vertices v1 and v2 of the primitive. b S is the area of the triangle formed by the pixel and the vertices v1 and v3 of the primitive. c Let S be the area of the triangle formed by the pixel and the vertices v2 and v3 of the primitive, where U1, U2, U3, V1, V2, and V3 are the UV coordinates of v1, v2, and v3, respectively. t =S a +S b +S c After all UV coordinates are solved, the texture value is obtained from the texture image corresponding to the primitive using the UV coordinates, and the average of all texture values is taken as the texture value of the primitive. Then, the Adobe RGB color space is converted to the CIE Lab color space.
[0091] S302, Based on the aforementioned primitive heterogeneity distance formula D(·), construct the heterogeneity cost function for the cluster. And determine its constraints, which are used to determine the sum of heterogeneity costs for all clusters, where If r ij =1 indicates that the primitive p i r can represent the central primitive of a cluster, and this cluster contains all elements that satisfy r ij =0 non-central primitive; J(r ij The constraints are as follows: Where I(·) is an exponential function. Taking x as an example, if x = 1, then I(x) = 1, and otherwise I(x) = 0; k represents the expected number of clusters.
[0092] S303, Based on the heterogeneity cost function J(·) and its constraints, construct and solve the energy optimization function. This results in the real-world 3D model being over-segmented into a set of k clusters with uniform properties and regular boundaries. For solving the energy equation, a bottom-up, merge-based energy minimization method can be used to... Except for the central primitive set Each primitive outside is mapped according to the mapping function It is allocated to various clusters, among which D(p j ,cp i ) is the basic element p j With the primitive CP i The heterogeneous distance between them, and make each primitive Its classification of cluster central primitives The sum of heterogeneous distances is minimized.
[0093] Among them, the bottom-up energy minimization method based on merging specifically involves first optimizing the energy optimization function E(r). ij Add a regularization term to ) that is: In the formula, λ is a regularization parameter. A larger λ value will result in a smaller deviation between the final number of clusters and k, but will reduce the weight of the heterogeneity distance metric. The initial value of the regularization parameter λ is set to the median of the lowest heterogeneity distance between each primitive and its neighboring primitives, and then increases by a factor of two in each subsequent iteration. Initially, all primitives are set as the center primitives of the clusters, and they are continuously merged pairwise from bottom to top until the number of clusters decreases to k.
[0094] like Figure 10 As shown, another embodiment of the present invention also provides a cluster-based planar feature detection method, including:
[0095] S401: For the aforementioned cluster set Select set A cluster in a plane S m Seed clusters, and remove the seed clusters from the set cluster set. Remove from the middle, where plane S m It is a set of clusters It consists of a subset of the set. This embodiment describes the set. For each cluster, calculate its centroid. Then, calculate the curvature of all cluster centroids and sort them in ascending order of centroid curvature. Sort, then from cluster set Seed clusters are selected in sequence.
[0096] S402: Calculate the set of the 8 neighboring clusters surrounding the seed cluster. for For each neighboring cluster, determine whether it shares the same properties as the seed cluster using the cosine similarity criterion. If it satisfies the cosine similarity criterion, then... Then the neighboring cluster is incorporated into the plane S containing the seed cluster. m At the same time from the set Remove the neighboring cluster. If the cosine similarity criterion is not met, no operation is performed on the cluster. In the formula, θ is the angle threshold.
[0097] Among them, the cosine similarity criterion is In the formula, and Clusters and cluster The normal vector of a cluster is calculated as the average of the normal vectors of all primitives within the cluster.
[0098] S403: Incorporate the new process described in S402 into plane S m Each cluster is treated as a plane S. m The new seed cluster is iteratively executed, step S402, until... No cluster in the dataset satisfies the cosine similarity criterion.
[0099] S404: Iteratively execute processes S401-S403 until... Empty, storing the plane S detected in each iteration. m A candidate plane feature set S is constructed. Post-processing is performed on the candidate plane feature set S, removing candidate planes with fewer than 3 clusters in S, and using the remaining candidate planes as the final plane detection result.
[0100] like Figure 11 As shown, another embodiment of the present invention also provides a building extraction device for real-world 3D models, comprising:
[0101] Real-world 3D model parsing module: Used to input a real-world 3D model, stitch together all the tiles of the acquired real-world 3D model into a complete 3D model, and parse the real-world 3D model into a set of geometric primitives;
[0102] Ground Filtering Module: Used to input ground filtering parameters and primitive sets, and separate the input primitive set into ground primitive sets and non-ground primitive sets;
[0103] Oversegmentation module: Used to take oversegmentation parameters and primitive set as input, and to cluster the input primitive set into a set of clusters with uniform properties and regular boundaries;
[0104] Planar Feature Detection Module: The user inputs the parameters for planar feature detection and the set of clusters or primitives, and the module clusters the input set of clusters or primitives into a set of planes with regular boundaries.
[0105] The non-building plane greedy elimination module is used to input greedy elimination parameters and a set of non-ground primitives, and greedily eliminate non-building primitives such as green vegetation and urban furniture to obtain a set representing the main structure of the building and a set of non-building planes.
[0106] Building primitive greedy recovery module: Used to take in the parameters for greedy recovery, the set representing the main structure of the building, and the set of non-building planes. It is used to greedily recover the set of main building structures based on the topological adjacency relationship between primitives, and to recover the building primitives that were mistakenly deleted in the non-building plane greedy elimination module, so as to obtain the final set of building primitives that takes into account the integrity.
[0107] Output module: Used to input the path where the model is saved, and output the actual 3D model of the building and the actual 3D model of the non-building.
[0108] The real-scene 3D model analysis module includes:
[0109] Input unit: Based on the file path of the real-world 3D model input by the user, if the model is stored in the form of paged LOD (Level of Detail) tiles, then recursively traverse to obtain all leaf node tiles of the model, that is, the 3D model tiles with the highest resolution, and stitch these tiles together to form a complete real-world 3D model.
[0110] Model parsing unit: parses the stitched real-world 3D model and breaks it down into a set of geometric primitives. Each primitive stores information such as its index, vertex coordinates, and texture mapping coordinates.
[0111] Output unit: Outputs the set of primitives for parsing.
[0112] Ground filtration module, including:
[0113] Input unit: Used to input parameters for ground filtering and a set of geometric primitives for the real-world 3D model;
[0114] Calculation unit: Performs ground filtering calculations based on the input parameters and primitive set;
[0115] Output unit: Outputs the calculated set of ground primitives and the set of non-ground primitives.
[0116] The over-segmentation module includes:
[0117] Input unit: Used to input oversegmented parameters and a set of non-ground geometric primitives;
[0118] Computational unit: Performs oversegmentation calculations based on the input parameters and primitive set;
[0119] Output unit: Outputs a set of clusters with uniform properties and regular boundaries.
[0120] The planar feature detection module includes:
[0121] Input unit: Used to input the parameters and cluster set of the planar feature detection module;
[0122] Computational unit: Performs planar feature detection calculations based on the input parameters and primitive set;
[0123] Output unit: Outputs a set of planar features with regular boundaries calculated.
[0124] The non-building plane greedy elimination module includes:
[0125] Input unit: Used to input the parameters, plane set, and ground primitive set for greedy elimination;
[0126] Calculation unit: Based on the input parameters and primitive set, it performs calculations for green vegetation removal based on color features and low-lying features removal based on relative ground elevation to obtain a primitive set representing the main structure of the building;
[0127] Output Unit: Outputs a set of primitives representing the main structure of the building.
[0128] The building primitive greedy recovery module includes:
[0129] Input unit: used to input parameters for greedy recovery, a set of primitives representing the main structure of the building, and a set of primitives representing non-building elements;
[0130] Computational Unit: Based on the input parameters and primitive set, it performs a greedy recovery calculation of building primitives based on topological adjacency to obtain the final structurally complete building geometric primitives;
[0131] Output unit: Outputs the geometric primitives of a building with a complete structure.
[0132] like Figure 12 and Figure 13 As shown, another embodiment of the present invention also provides a building extraction device for a real-world 3D model. The device includes a distributed memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the building extraction method for a real-world 3D model, including:
[0133] Step 1: Preprocessing and parsing of the real-world 3D model, in order to stitch together all the tiles of the real-world 3D model into a complete 3D model, and to parse the real-world 3D model into a set of geometric primitives.
[0134] Step 2: Separate the ground primitives and non-ground primitives of the real-world 3D model, and assemble the primitive set. Separate into ground-based primitive sets Non-ground primitive set
[0135] Step 3, Non-Ground Primitive Set Over-segmentation is performed to cluster the numerous primitives into sets of k clusters with symmetrical properties and regular boundaries.
[0136] Step 4, for cluster set Planar feature detection is performed to quickly generate a set of l planes with regular boundaries.
[0137] Step 5, for the planar set A greedy removal process is employed for non-building planes, meaning that vegetation, street furniture, trees, vehicles, and other non-building planes are removed to the greatest extent possible. During this process, while ensuring the integrity of the main building structure, some building planes may be incorrectly removed. The result is a set of building structure planes. Non-building planar set
[0138] Step 6: The set of building main structure plans obtained after greedy elimination. All the primitives contained Based on this, a greedy recovery is performed using the topological adjacency relationships between primitives to recover the set of primitives contained in the building planes that were incorrectly removed in step 5. This results in a final set of building elements that takes into account the integrity of the structure.
[0139] Step 7, output or save the data. The three-dimensional model of the building is composed of real-life scenery. A non-building real-world 3D model.
[0140] It should be noted that the building extraction device for real-world 3D models provided in the above embodiments is only illustrated by the division of the above-described program modules. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. Furthermore, the building extraction device for real-world 3D models provided in the above embodiments and the building extraction method embodiments for real-world 3D models belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0141] The memory in this embodiment of the invention is used to store various types of data to support the operation of the building extraction device for real-world 3D models. Examples of such data include any computer program used to operate on the building extraction electronics for real-world 3D models.
[0142] The building extraction method for real-world 3D models disclosed in this invention can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the building extraction method for real-world 3D models can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the methods, steps, and logic diagrams disclosed in this invention's embodiments. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention's embodiments can be directly represented as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in a storage medium, specifically a memory. The processor reads information from the memory and, in conjunction with its hardware, completes the steps of the building extraction method for real-world 3D models provided in this invention's embodiments.
[0143] In an exemplary embodiment, the building extraction device for a real-world 3D model may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), FPGAs, general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.
[0144] It is understood that memory can be volatile or non-volatile, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM). The memories described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.
[0145] In an exemplary embodiment, the present invention also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory including a computer program. This computer program can be executed by a processor of a building extraction device for a real-world 3D model, and includes the steps of the building extraction method for a real-world 3D model. The computer-readable storage medium can be a ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM, etc.
[0146] In summary, the building extraction method of this application realizes the automatic extraction of buildings from real-world 3D models. The extracted buildings have complete structures without missing primitives, and have extremely high recall and a high degree of automation, which greatly reduces the manual workload and cost of objectifying and simplifying real-world 3D models.
[0147] It should be understood that any parts not described in detail in this specification belong to the prior art.
[0148] It should be understood that the above description of the embodiments is quite detailed and should not be construed as limiting the scope of protection of this invention. Those skilled in the art can make various modifications and variations based on the teachings of this invention. Any modifications, equivalent substitutions, improvements, etc., made without departing from the scope of protection of the claims of this invention fall within the protection scope of this invention, and the scope of protection claimed by this invention should be determined by the appended claims.
Claims
1. A method for extracting buildings from a real-world 3D model, characterized in that, Includes the following steps: Step 1: Preprocessing and parsing the real-world 3D model, which involves piecing together all the tiles of the real-world 3D model into a single 3D model, and parsing the real-world 3D model into a set of geometric primitives. ; Step 2: Separate the ground primitives and non-ground primitives of the real-world 3D model, and assemble the primitive set. Separate into ground-based primitive sets Non-ground primitive set ; Step 3, for the non-ground primitive set Over-segmentation is performed to cluster the numerous primitives into groups with uniform properties and regular boundaries. A set of clusters ; Step 4, for cluster set Perform planar feature detection to quickly generate a series of well-defined boundaries. l A set of planes ; Step 5, for the planar set Greedy removal of non-building planes is performed, resulting in a set of building main structural planes. Non-building planar set ; Step 6: The set of building main structure plans obtained after greedy elimination. All the primitives contained Based on this, a greedy recovery is performed using the topological adjacency relationships between primitives to recover the set of primitives contained in the building planes that were incorrectly removed in step 5. This results in a final set of building elements that takes into account the integrity of the structure. ; Step 7, output or save the data. The three-dimensional model of the building is composed of real-life scenery. A non-building real-world 3D model.
2. The method for extracting buildings from a real-world 3D model according to claim 1, characterized in that: In step 2, a primitive-based cloth simulation method is used to separate the ground primitives and non-ground primitives of the real-world 3D model. The specific implementation method is as follows; S201: Vertically flip the real-world 3D model along the Z-coordinate direction, i.e., flip the set... The Z-coordinates of all vertices of the primitives are reversed; S202: Simulate the fall of a piece of cloth made of particles above the flipped real-world 3D model. The initial height of all the particles that make up the cloth is the highest point of the flipped primitive. The initial horizontal position is determined by the cloth resolution and the bounding box of the real-world 3D model. The cloth falls slowly under the action of gravity. S203: When the cloth particles come into contact with the real-world 3D model, they gradually stop moving. The contact between the cloth and the real-world 3D model is determined by collision detection based on ray intersection. If the current vertical height of the cloth particle is lower than its collision point with the real-world 3D model, it is set to be immovable. S204: The final static cloth shape approximates the terrain. Then, the Euclidean distance from each primitive to the cloth is calculated. If it exceeds a set threshold, it is added to the set primitive. If it is within the threshold, then add it. .
3. The method for extracting buildings from a real-world 3D model according to claim 1, characterized in that: The specific implementation method of step 3 is as follows; S301, taking into account the spatial proximity characteristics, surface characteristics, and color characteristics of primitives, constructs a primitive heterogeneity distance formula. ; S302, based on the aforementioned primitive heterogeneity distance formula Construct the heterogeneity cost function of the cluster. And determine its constraints, which are used to determine the sum of heterogeneity costs of all clusters, where ,like represent primitives A can represent the central primitive of a cluster, and this cluster contains all elements that satisfy the condition. Non-central primitives; The constraints are ,in It is an exponential function. Indicates the expected number of clusters; Indicates the first i individual units and the j individual units The formula for heterogeneity distance between them n The number of primitives; S303, based on the heterogeneity cost function Given the constraints, construct and solve the energy optimization function. This results in the over-segmentation of the real-world 3D model into a homogeneous and well-defined area. A set of clusters .
4. The method for extracting buildings from a real-world 3D model according to claim 3, characterized in that: Primitive Heterogeneity Distance Formula The calculation method is as follows; In the formula, , and , which are the surface feature difference distance, spatial proximity distance, and color difference distance between two normalized primitives, respectively. , and These are the weighting factors for the three, and their values range from [0,1]. for The If the primitive type is a triangle primitive, then... q The maximum is 3. and They are respectively and The normal vector, i.e. ; and Color difference distance between two primitives Calculated within the CIE Lab linear color space as basic unit Average texture color value in CIE Lab space.
5. The method for extracting buildings from a real-world 3D model according to claim 4, characterized in that: Calculate the normal vector of the triangle primitive using the spatial coordinates of its three vertices v1, v2, and v3: ; Average color texture value The calculation method is as follows: calculate the primitives in the Adobe RGB color space. Within the spatial range of the y-direction and the number of scan lines, from top to bottom, for any scan line, all edges of the primitive intersect with that scan line. From left to right, sort the resulting x-coordinates. Edges intersected an odd number of times are considered inbound edges, and edges intersected an even number of times are considered outbound edges. Then, interpolation is used to calculate the spatial coordinates of pixels on the scan line between the inbound and outbound edges. The barycentric coordinate method is used to calculate the UV coordinates of all pixels inside the primitive, with their U and V coordinates being... , ,in Let the area of the triangle formed by the coordinates of the pixel and the vertices v1 and v2 of the primitive be the area of the pixel. The area of the triangle formed by the pixel and the vertices v1 and v3 of the primitive. Let V be the area of the triangle formed by the pixel and the vertices v2 and v3 of the primitive. , , , , and These are the UV coordinates for v1, v2, and v3, respectively. After all UV coordinates are solved, the texture values are obtained from the texture image corresponding to the primitive using the UV coordinates, and the average of all texture values is taken as the texture value of the primitive. Then the Adobe RGB color space is converted to the CIE Lab color space.
6. The method for extracting buildings from a real-world 3D model according to claim 3, characterized in that: A bottom-up, merge-based energy minimization method is chosen to solve the energy optimization function, in order to... Except for the central primitive set Each primitive outside is mapped according to the mapping function It is allocated to various clusters, among which , , as basic unit The heterogeneous distance between them, and make each primitive Its classification of cluster central primitives The sum of heterogeneous distances is minimized. The bottom-up, merge-based energy minimization method specifically involves first optimizing the energy optimization function... Add a regularization term, that is: In the formula, It is a regularization parameter, regularization parameter The initial value is set to the median of the lowest heterogeneous distance between each primitive and its neighboring primitives, and then doubles in size with each iteration; initially, all primitives are set as the central primitives of the clusters, and they are continuously merged pairwise from bottom to top until the number of clusters decreases to a certain value. until.
7. The method for extracting buildings from a real-world 3D model according to claim 1, characterized in that: The specific implementation method of step 4 is as follows; S401: Cluster set Select set One cluster is treated as a plane Seed clusters, and remove the seed clusters from the set cluster set. Remove from the middle, where the plane It is a set of clusters It consists of a subset of; In S401, for the set For each cluster, calculate its centroid. Then, calculate the curvature of all cluster centroids and sort them in ascending order of centroid curvature. Sort, then from cluster set Seed clusters are selected in sequence. S402: Calculate the set of n1 neighboring clusters surrounding the seed cluster. ,for For each neighboring cluster, determine whether it shares the same properties as the seed cluster using the cosine similarity criterion. If it satisfies the cosine similarity criterion, then... Then the neighboring cluster is incorporated into the plane containing the seed cluster. At the same time from the set Remove the neighboring cluster. If the cosine similarity criterion is not met, no operation is performed on the cluster. For angle threshold, Indicates a cluster, Represents the cosine similarity measure; S403: Incorporate the new plane from the process described in S402. Clusters are treated as planes one by one. The new seed cluster is iteratively executed, step S402, until... No cluster in the dataset satisfies the cosine similarity criterion. S404: Iteratively execute processes S401-S403 until... Empty, storing the planes detected in each iteration. To form a candidate planar feature set For candidate plane feature sets Post-processing, removal For candidate planes with a cluster size less than n², the remaining candidate planes are used as the final plane detection results.
8. The method for extracting buildings from a real-world 3D model according to claim 1, characterized in that: The specific implementation method of step 5 is as follows; First, green vegetation is removed based on color features. Specifically, the texture value of all primitives in each plane is calculated, and the average value is taken as the texture value of that plane. The over-green minus over-red index of each plane is then calculated. ,in, , and These are the color components of the plane; then, the Otsu's method is used to automatically calculate... Optimal Removal Threshold If the plane Greater than the threshold If so, then it is considered a green vegetation plane and removed; Then, low-lying features are filtered out using relative ground elevation. Specifically, the centroid of each ground element in the set of ground elements separated in step 3 is calculated, and a KDTree spatial index structure is established; the relative ground elevation value of each element in each plane is calculated, that is, the elevation value of the element's centroid and its nearest neighbor. The difference between the average elevation values of the centroids of the ground primitives. The centroids of neighboring ground primitives are retrieved using the KDTree spatial index structure; the maximum relative ground elevation of all primitives within a plane is taken as the relative ground elevation of that plane. If the relative ground elevation of the plane is less than a threshold, the plane is considered to have a lower relative ground elevation. If we consider it as a low-lying ground plane and remove it, then we obtain the set of building main structure planes. Non-building planar set .
9. The method for extracting buildings from a real-world 3D model according to claim 1, characterized in that: The specific implementation method of step 6 is as follows; For each Search for the set of primitives that are topologically adjacent to it. ,Will The primitives in the code are labeled as building primitives; similarly, for For each primitive, search its topologically adjacent primitives and mark them as buildings, recursively searching until... For each primitive, all topologically reachable primitives are searched; among them, those with... The primitive of topological adjacency is AND. Primitive elements sharing vertices, or those that are... Primitive elements sharing edges; to prevent The existence of a very small number of non-building primitives leads to a large-scale misrecovery of non-building primitives, which affects... The set is spatially divided into uniform blocks of topological relationships, and the primitives are traversed to all topologically reachable primitives in their respective blocks to prevent non-building primitives from being over-recovered.
10. A building extraction device for real-world 3D models, characterized in that, Includes the following modules: Real-world 3D model parsing module: Used to input a real-world 3D model, stitch together all the tiles of the acquired real-world 3D model into a 3D model, and parse the real-world 3D model into a set of geometric primitives; Ground Filtering Module: Used to input ground filtering parameters and primitive sets, and separate the input primitive set into ground primitive sets and non-ground primitive sets; Oversegmentation module: Used to input oversegmentation parameters and non-ground primitive sets, and to oversegment the non-ground primitive sets to cluster the input non-ground primitive sets into a set of clusters with uniform properties and regular boundaries; Planar Feature Detection Module: The user inputs the parameters for planar feature detection and the set of clusters. The module performs planar feature detection on the set of clusters to cluster the input set of clusters into planar sets with regular boundaries. Non-building plane greedy elimination module: Used to input greedy elimination parameters and plane set, perform greedy elimination of non-building planes on the plane set, and obtain the plane set of the main building structure and the non-building plane set after elimination; Building primitive greedy recovery module: It is used to input the parameters for greedy recovery, the set representing the main structure of the building and the set of non-building planes. Based on the topological adjacency relationship between primitives, it performs greedy recovery on the set of main structure of the building and recovers the building primitives that were mistakenly deleted in the greedy elimination module of non-building planes, and obtains the final set of building primitives that takes into account the integrity. Input module: Used to input the path where the model is saved, and outputs 3D models of actual buildings and non-buildings.
11. An electronic device comprising a distributed memory, a processor, and a computer program in the memory executable in the processor, characterized in that: When the processor executes the computer program, it implements the steps of a building extraction method for a real-world 3D model as claimed in any one of claims 1 to 9.
12. A computer-readable storage medium storing computer program instructions, characterized in that: When the computer program instructions are executed by the processor, they implement the steps of the building extraction method for a real-world 3D model as described in any one of claims 1 to 9.