A method, system and storage medium for reducing building surface based on hole detection

By detecting and sculpting the hole structure of the architectural model, combined with Boolean operations and the Visvalingam-Whyatt algorithm, the problem of geometric and topological errors and low efficiency in the reduction of three-dimensional architectural models in the existing technology is solved, and efficient and accurate model simplification is achieved. and visual quality improvements.

CN117576341BInactive Publication Date: 2024-08-27HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311476137.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-08
Publication Date
2024-08-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing surface reduction methods for 3D building models are prone to geometric and topological errors when using very low simplified models, losing structural details of the building's holes. Moreover, the surface reduction efficiency for large-scale models is low, affecting visual quality and accuracy.

Method used

By detecting the hole structure of the architectural model, a three-dimensional outer contour is generated and the solid holes are carved. Boolean operations and the Visvalingam-Whyatt algorithm are used for simplification, combined with path compression and union search algorithms to ensure the preservation of the hole structure and the topological integrity of the model.

Benefits of technology

It improves the visual quality and accuracy of the three-dimensional architectural model, improves the efficiency and accuracy of simplification, ensures the retention of the geometric details and topological structure of the model, and is suitable for efficient simplification of large-scale models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117576341B
    Figure CN117576341B
Patent Text Reader

Abstract

The present invention discloses a method, system and storage medium for building face reduction based on hole detection, which belongs to the field of three-dimensional modeling technology, and includes: detecting the hole structure in each facet of the three-dimensional model of the building to be tested, and obtaining a facet set with the hole structure; traversing each boundary edge in the current facet set, adding a facet to each boundary edge, and obtaining a solid hole composed of the newly added facets; generating a three-dimensional outer contour corresponding to the model, and carving the obtained solid hole on the corresponding three-dimensional outer contour, and after planarization and simplification, obtaining a simplified model. The method of the present invention can quickly and stably generate a model with a low number of faces in the process of simplifying the building model, while maintaining the important features of the building's appearance; it can effectively detect and construct details such as hole and concave structures that are commonly present in buildings but difficult to detect, and retain them in the simplification process, thereby improving the accuracy and simplification efficiency of the three-dimensional building model after face reduction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of three-dimensional modeling, and more specifically, relates to a method, system and storage medium for reducing building surface based on hole detection. Background Art

[0002] With the widespread application of 3D architectural models in game development, virtual reality, computer-aided design, virtual geographic environment and other fields, the complexity and scale of architectural models are increasing, which brings challenges to the requirements of computing resources and rendering speed. Level of Detail (LOD) technology renders models of different granularity according to the importance of 3D architectural models in different scenes. When the model is far away from the camera, it can save a lot of computing time and resources by reducing the surface of the 3D architectural model and using low-poly models (models after surface reduction) instead of high-poly models, which is very important in real-time rendering. Mesh simplification is one of the specific technologies for reducing the surface of 3D models. It reduces the complexity of 3D meshes by merging vertices and removing patches. The simplified mesh can approximate the original model at a lower level of detail, thereby speeding up rendering or optimizing model storage.

[0003] For triangular mesh building models, the most classic mesh simplification method is the quadratic error metric (QEM), which can quickly reduce the number of faces in a three-dimensional building model. However, QEM and existing commonly used face reduction methods are suitable for simplifying large models to medium-sized ones, but when simplified to extremely simple models, geometric and topological errors will occur, affecting the visual quality and accuracy of the simplified model.

[0004] At the same time, most existing methods are limited to detecting the plane of the building. When the number of facets is reduced, the hole structure of the building is easily lost. The hole structure of the building includes doors, windows, colonnades, and other openings that reflect the undulations of the building surface, semi-open spaces, or other complex space combinations. These hole structure details often reflect the unique morphological characteristics of a building, but they are lost in the simplification process, resulting in a large difference between the simplified model and the original building. In addition, the existing methods have low face reduction efficiency for large-scale building models with a large number of facets. Summary of the invention

[0005] In view of the defects and improvement needs of the prior art, the present invention provides a method, system and storage medium for building surface reduction based on hole detection, which aims to improve the accuracy and simplification efficiency of the three-dimensional building model after surface reduction.

[0006] To achieve the above object, according to a first aspect of the present invention, a method for reducing the surface of a building based on hole detection is provided, comprising:

[0007] Detecting hole structures in each facet of the three-dimensional model of the building to be tested, and obtaining a facet set with hole structures; wherein the model is composed of triangular facets;

[0008] Traverse each boundary edge in the current face set, add a new face to each boundary edge, and obtain a solid hole composed of the newly added faces;

[0009] Generate a three-dimensional outer contour corresponding to the model, and carve the obtained solid holes on the corresponding three-dimensional outer contour, and obtain a simplified model after planarization and simplification;

[0010] Among them, new patches are added to each boundary edge, including:

[0011] S1, using the current boundary edge, the boundary edge adjacent to the current boundary edge, and the newly added edge to form a triangular face to be added, and obtaining a triangular face to be added corresponding to each boundary edge in the face set;

[0012] S2, calculating the angle between the normal of each to-be-added triangular face and the normal of the adjacent face of the to-be-added triangular face, and selecting the to-be-added triangular face with the largest angle as the current to-be-added face;

[0013] S3, merging the current newly added patch into the patch set, and updating the boundary edges in the patch set;

[0014] S4. Select the next boundary edge in the current face set as the current boundary edge, and jump to S1 until all boundary edges in the current face set are traversed to obtain the newly added face of each boundary edge.

[0015] Furthermore, generating a three-dimensional outer contour corresponding to the model includes:

[0016] S ′ 1. Generate a two-dimensional outer contour corresponding to the model, including: generating a corresponding observation direction according to the model; projecting each facet of the model to each observation direction, and dividing each facet into a front facet and a back facet according to the positive or negative dot product between the normal of the facet and the corresponding observation direction; extracting the region boundaries of the front facet and the back facet respectively, and reversing the region boundary of the back facet and merging it with the region boundary of the front facet to obtain the two-dimensional outer contour;

[0017] S ′ 2. Simplifying the two-dimensional outer contour to obtain a simplified two-dimensional outer contour;

[0018] S ′ 3. Extruding the simplified two-dimensional outer contour in a corresponding observation direction to obtain a set of entity primitives corresponding to the two-dimensional outer contour;

[0019] S ′4. The entity primitives in the entity primitive set and the bounding box of the model are gradually subjected to Boolean intersection operations to obtain the three-dimensional outer contour.

[0020] Furthermore, S ′ 4, including:

[0021] Performing a Boolean intersection operation on the selected entity primitive and the bounding box of the model to obtain the current three-dimensional outer contour;

[0022] Performing a Boolean intersection operation on the current 3D outer contour and the selected entity primitive again until the change in the visual error between the 3D outer contour obtained by two adjacent Boolean intersection operations and the 3D building model is lower than a given second threshold, and taking the 3D outer contour obtained at this time as the 3D outer contour corresponding to the model;

[0023] Each time a Boolean intersection operation is performed, the selected entity primitive is the entity primitive whose three-dimensional outer contour obtained after the Boolean intersection operation has the smallest visual error with the model.

[0024] Furthermore, each time the Boolean intersection operation is performed, the method further includes: dilating the selected entity primitive.

[0025] Further, the obtained solid hole is engraved on the corresponding three-dimensional outer contour, including:

[0026] The selected solid hole and the corresponding three-dimensional outer contour are subjected to Boolean subtraction operation to obtain the current three-dimensional outer contour engraved with the solid hole;

[0027] The current three-dimensional outer contour with the solid hole engraved therein is subjected to a Boolean subtraction operation again with the selected solid hole, until the change in the visual error between the three-dimensional outer contour with the solid hole engraved therein obtained by two adjacent Boolean subtraction operations and the model is lower than a given third threshold value, so as to achieve engraving the obtained solid hole on the corresponding three-dimensional outer contour;

[0028] Each time a Boolean subtraction operation is performed, the selected solid hole is the solid hole having the smallest visual error between the three-dimensional outer contour of the carved solid hole obtained after the Boolean subtraction operation and the model.

[0029] Furthermore, S ′ 2, the two-dimensional outer contour is simplified by using the Visvalingam-Whyatt algorithm to obtain a simplified two-dimensional outer contour.

[0030] Furthermore, before the obtained solid holes are engraved on the corresponding three-dimensional outer contour, the obtained solid holes are first screened out, including:

[0031] Calculate the volume Vop of each physical hole and the volume Vmesh of the model; filter out the physical holes with Vop>-∈×Vmesh, where ∈ is a threshold value ∈ set between 0 and 1;

[0032] Or / and, further comprising a second screening of the obtained solid holes, including:

[0033] Calculate the Euler characteristic of each solid hole; filter out the solid holes whose Euler characteristic is not 2.

[0034] Further, detecting the hole structure in each facet of the model includes:

[0035] Traversing each triangular patch of the model, determining whether the dihedral angle between the current patch and an adjacent patch is less than a given first threshold, and if so, dividing the current patch and the adjacent patch into the same plane region; until each triangular patch of the model is divided into a corresponding plane region, a plane region set R is obtained;

[0036] Taking the total area of ​​the triangular facets in each plane region in the plane region set R as the weight of the corresponding region, and sorting each plane region according to the weight;

[0037] For the plane areas other than the k plane areas with high weights in the plane area set R, a path compression union-find algorithm is used to find connected facets in other plane areas, and the connected facet set is used as the facet set with hole structure.

[0038] According to a second aspect of the present invention, there is provided a building surface reduction system based on hole detection, comprising a computer-readable storage medium and a processor;

[0039] The computer-readable storage medium is used to store executable instructions;

[0040] The processor is configured to read executable instructions stored in the computer-readable storage medium to execute any method described in the first aspect.

[0041] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of the first aspects is implemented.

[0042] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:

[0043] (1) The architectural face reduction method based on hole detection of the present invention takes into account the hole structure of the architectural model when reducing the face, and carves the hole structure on the three-dimensional outer contour. In the subsequent planarization and simplification, these hole structures that reflect the unique morphological characteristics of the building will still be retained, so that the generated simplified model can maintain more geometric detail features of the original model in appearance, avoid geometric and topological errors caused by over-simplification, and improve the visual quality and accuracy of the three-dimensional architectural model after face reduction. In addition, the entity hole construction method provided by the present invention traverses each boundary edge in the face set with hole structure, closes each boundary edge, and the newly added face patches form a closed entity hole. The time complexity of hole construction is only O(N), where N is the number of boundary edges to be traversed, making the face reduction method of the present invention more efficient.

[0044] (2) Furthermore, in the method of the present invention, when generating a two-dimensional outer contour corresponding to a three-dimensional building model, each facet is divided into a front facet and a back facet according to the sign of the dot product between the normal of the facet and the corresponding observation direction, and the region boundaries of the front facet and the back facet are respectively extracted, and the region boundaries of the back facet are reversed and merged with the region boundaries of the front facet, so as to obtain the two-dimensional outer contour corresponding to the model. Compared with the method of directly projecting each facet of the model to obtain the two-dimensional outer contour in the prior art, the method of the present invention reduces the number of faces in a single operation by respectively extracting the region boundaries of the front facet and the back facet, thereby simplifying the operation, reducing the complexity and time of the operation, and further improving the simplification efficiency.

[0045] (3) Furthermore, the method of the present invention adopts Boolean operation according to the solid primitives or solid holes. Each time the current solid primitive or solid hole is selected, the solid primitive or solid hole with the smallest visual error with the three-dimensional model of the building after the Boolean operation is selected for Boolean operation. This can make the generated model topologically simple and watertight, and have a stable number of facets, further improving the visual quality and accuracy of the simplified model.

[0046] (4) Furthermore, when performing the Boolean intersection operation, the selected entity primitives are expanded so that an offset value is introduced into the Boolean intersection operation to avoid Boolean surface breaking and thus destroying the appearance and topological structure of the model.

[0047] (5) Furthermore, the Visvalingam-Whyatt algorithm is used to simplify the two-dimensional outer contour. Since the Visvalingam-Whyatt algorithm does not rely on the starting point and the end point, and in the subsequent process it can also select points that are not suitable for simplifying the contour based on the previous unreasonable points, it is more suitable for simplifying the closed contour, has lower complexity and the ability to delete details fairly and consistently, and can delete unnecessary details while maintaining the overall shape of the contour, further improving the algorithm's operating efficiency and the quality of subsequent generated primitives.

[0048] (6) Furthermore, the method of the present invention can remove the interference of redundant details in the generated solid holes by first screening the obtained solid holes before carving the solid holes on the three-dimensional contour, thereby further improving the simplification efficiency and simplification accuracy;

[0049] Performing a second screening of solid holes to screen out holes whose Euler characteristic is not 2 can reduce the number of defective and missing hole structures that appear under some curved surface shapes, and can further improve the simplification accuracy.

[0050] (7) Furthermore, the method of the present invention does not directly detect the hole structure during hole detection, but rather determines large plane areas where hole structures are unlikely to exist by detecting planes. After removing these large plane areas, a path compression union-find algorithm is used in the remaining areas to find connected facets, which are the facet sets that may contain hole structures. The method of the present invention is simpler and has a higher detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 The present invention is a flow chart of the building surface reduction method based on hole detection.

[0052] Figure 2 Schematic diagram of simplified models corresponding to different methods for a building model in an embodiment of the present invention.

[0053] Figure 3 Schematic diagram of simplified models corresponding to different methods for a building model in an embodiment of the present invention.

[0054] Figure 4 Schematic diagram of simplified models corresponding to different methods for a building model in an embodiment of the present invention.

[0055] Figure 5 Schematic diagram of simplified models corresponding to different methods for a building model in an embodiment of the present invention.

[0056] Figure 6 Schematic diagram of simplified models corresponding to different methods for a building model in an embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0058] In the present invention, the terms "first", "second", etc. in the present invention and the accompanying drawings are used to distinguish similar objects, but are not necessarily used to describe a specific order or sequence.

[0059] like Figure 1 As shown, the building surface reduction method based on hole detection of the present invention mainly includes:

[0060] Obtain a three-dimensional model Mi of the building to be tested, wherein the three-dimensional model Mi of the building is composed of triangular facets;

[0061] Hole detection step: detect the hole structure existing in each facet of the building three-dimensional model Mi, and obtain the facet set of the existing hole structure;

[0062] Solid hole construction step: traverse each boundary edge in the facet set with a hole structure, close each boundary edge, that is, add a facet to each boundary edge to obtain a closed solid hole composed of the newly added facets; wherein, adding a facet to each boundary edge includes:

[0063] S1, using the current boundary edge, the boundary edge adjacent to the current boundary edge, and the newly added edge to form a triangular face to be added, and obtaining a triangular face to be added corresponding to each boundary edge in the face set currently having a hole structure;

[0064] S2, calculating the angle between the normal of each to-be-added triangular face and the normal of the adjacent face of the to-be-added triangular face, and using the angle as a weight, selecting the to-be-added triangular face with the largest weight as the current to-be-added face;

[0065] S3, merging the current newly added face into the face set with the hole structure, and updating the boundary edge in the current face set with the hole structure;

[0066] S4. The next boundary edge in the face set with a hole structure is used as the current boundary edge, and the process jumps to S1 until all the boundary edges in the set are traversed to obtain the newly added face for each boundary edge. For an edge, if there is only one face adjacent to the edge, the edge is called a boundary edge.

[0067] Model simplification steps: Generate a three-dimensional outer contour corresponding to the building three-dimensional model, and carve the obtained solid holes on the corresponding three-dimensional outer contour, and then obtain a simplified model after planarization and simplification.

[0068] Specifically, in the hole detection step, the hole structures that may exist in each facet of the building three-dimensional model Mi are detected, including:

[0069] Traverse each triangular patch of the three-dimensional model Mi, determine whether the dihedral angle between the current patch and the adjacent patch is less than a given first threshold, and if so, divide the current patch and the adjacent patch into the same plane area Ri; until each triangular patch in the three-dimensional model Mi is divided into the corresponding plane area, and obtain the plane area set R;

[0070] The total area of ​​the triangular patches in each plane region in the plane region set R is taken as the weight of the region, and the plane region set R is sorted according to the weight. The path compression union-find algorithm is used for the plane regions except the k regions with the highest weight in the plane region set R to find the connected patches in other plane regions, and the connected patch set is taken as the patch set of possible hole structure.

[0071] Specifically, in the solid hole construction step, the generated solid holes are screened for the first time to remove the interference of redundant details in the generated solid holes, including:

[0072] Calculate the volume Vop of each generated solid hole and the volume Vmesh of the three-dimensional model of the building to be tested;

[0073] The physical holes with Vop>-∈×Vmesh are screened out, where ∈ is a threshold ∈ set between 0 and 1.

[0074] Since the surface normal direction of the required normal holes is inward and the volume should be a negative value, filtering out the solid holes that do not meet the conditions can further improve the simplification efficiency and accuracy.

[0075] Specifically, it also includes a second screening of the generated solid holes, including:

[0076] Calculate the Euler characteristic of each hole mesh; remove holes with Euler characteristic not equal to 2, which can reduce the defect and missing hole structures that may appear under some surface shapes, and further improve the simplification accuracy.

[0077] Specifically, in the model simplification step, generating a three-dimensional outer contour corresponding to the building three-dimensional model includes:

[0078] S ′ 1. Generate the 2D outer contour corresponding to the 3D building model;

[0079] S ′ 2. Simplify the two-dimensional outer contour corresponding to the model to obtain a simplified two-dimensional outer contour;

[0080] S ′ 3. Extrude the simplified two-dimensional outer contour in the corresponding observation direction to obtain a set of solid primitives corresponding to the two-dimensional outer contour;

[0081] S ′ 4. The entity primitives in the entity primitive set and the bounding box of the building three-dimensional model are gradually subjected to Boolean intersection operations to obtain the corresponding three-dimensional outer contour of the model.

[0082] Specifically, S ′ 1, generate the two-dimensional outer contour corresponding to the three-dimensional building model, including:

[0083] S ′ 11. Generate a corresponding observation direction set D according to the building three-dimensional model;

[0084] S ′ 12. Project each face of the 3D model to each viewing direction d∈D, and divide each face into front face and back face according to the positive or negative dot product between the face normal and the corresponding viewing direction;

[0085] S ′ 13. Extract the region boundaries of the front face and the back face respectively, and reverse the region boundary of the back face and merge it with the region boundary of the front face to obtain the two-dimensional outer contour corresponding to the model.

[0086] Specifically, S ′ 2, the two-dimensional outer contour corresponding to the model is simplified, including: taking the two-dimensional outer contour as input, using the Visvalingam-Whyatt algorithm, repeatedly selecting the vertex with the smallest vanishing area, and updating the vanishing areas of adjacent vertices, to achieve the purpose of gradually simplifying the contour.

[0087] Since the Visvalingam-Whyatt algorithm does not rely on the starting and ending points, and in the subsequent process it can also select some points that are not suitable for simplifying the contour based on the previous unreasonable points, it is more suitable for simplifying closed contours, has lower complexity and the ability to delete details fairly and consistently, and can delete unnecessary details while maintaining the overall shape of the contour, thereby improving the algorithm's operating efficiency and the quality of subsequent generated primitives.

[0088] Specifically, S ′ In 4, the entity primitives in the entity primitive set and the bounding box of the building three-dimensional model are gradually subjected to Boolean intersection operations to obtain the corresponding three-dimensional outer contour of the model, including:

[0089] Perform a Boolean intersection operation on the selected entity primitive and the bounding box of the model to obtain the current three-dimensional outer contour;

[0090] The current 3D outer contour and the selected entity primitive are subjected to a Boolean intersection operation again until the change in the visual error between the 3D outer contour obtained by two adjacent Boolean intersection operations and the 3D building model is lower than a given second threshold, and the 3D outer contour obtained at this time is used as the 3D outer contour corresponding to the model;

[0091] Each time a Boolean intersection operation is performed, the selected entity primitive is the entity primitive having the smallest visual error between the three-dimensional outer contour obtained after the Boolean intersection operation and the three-dimensional building model.

[0092] Furthermore, when performing the Boolean intersection operation, it also includes: expanding the selected entity primitives so that an offset value is introduced into the Boolean intersection operation to avoid Boolean surface breaking and thus destroying the appearance and topological structure of the model.

[0093] Specifically, in the model simplification step, the solid hole is engraved on the corresponding three-dimensional outer contour by gradually performing Boolean subtraction operations on the solid hole and the corresponding three-dimensional outer contour, including:

[0094] The selected solid hole and the corresponding three-dimensional outer contour are subjected to Boolean subtraction operation to obtain the current three-dimensional outer contour engraved with the solid hole;

[0095] The current three-dimensional outer contour with the carved solid hole and the selected solid hole are subjected to a Boolean subtraction operation again, until the change in the visual error between the three-dimensional outer contour with the carved solid hole obtained by two adjacent Boolean subtraction operations and the three-dimensional model of the building is lower than a given third threshold value, and the three-dimensional outer contour with the carved solid hole obtained at this time is used as the desired three-dimensional outer contour with the carved solid hole, so as to realize carving the obtained solid hole on the corresponding three-dimensional outer contour;

[0096] Each time a Boolean subtraction operation is performed, the selected solid hole is the solid hole with the smallest visual error between the three-dimensional outer contour of the carved solid hole and the three-dimensional building model obtained after the Boolean subtraction operation.

[0097] Specifically, in the model simplification step, the model with the solid holes carved is planarized, including:

[0098] For a plane group in the model where the dihedral angle between the current facet and the adjacent facet is less than a given fourth threshold, fewer vertices and facets are used to replace them to form a group of large planes, so as to reduce the redundancy of the number of vertex facets caused on a simple plane. In an embodiment of the present invention, the given fourth threshold is the same as the given first threshold.

[0099] Simplifying the planarized model includes: using an edge collapse and edge flipping algorithm to further simplify the model so that the number of vertex patches of the model reaches a user-specified number.

[0100] The effects of the method of the present invention are further described below through specific examples.

[0101] like Figure 2-Figure 6As shown in the figure, the first column is the input building model, the second, third and fourth columns correspond to the simplified results obtained by the method of the present invention, the Lowpoly method in the prior art and the QEM method respectively, and the (*, *) in the figure represents (number of model facets, visual metric error); the experimental results obtained on building models with different numbers of facets are shown in Table 1.

[0102]

[0103] It can be seen that the method of the present invention has higher visual quality and accuracy, and the simplified model has fewer facets. And as the number of model facets increases, the method of the present invention can still maintain a good simplification effect. For example, when the number of building facets reaches the million level, the existing Lowpoly method cannot be simplified, and the model simplified by the QEM method still has nearly 30,000 facets, while the method of the present invention has only 24 facets and still has a good effect; when the number of building facets reaches the tens of millions level, the existing Lowpoly method and the QEM method cannot be simplified, while the method of the present invention can simplify the model to 540 facets and maintain a good simplification effect.

[0104] The architectural face reduction method based on hole detection of the present invention takes into account the hole structure of the architectural model when reducing the face, and carves the hole structure on the three-dimensional outer contour. In the subsequent planarization and simplification, these hole structures that reflect the unique morphological characteristics of the building will still be retained, so that the generated simplified model can maintain more geometric detail features of the original model in appearance, avoid geometric and topological errors caused by over-simplification, and improve the visual quality and accuracy of the three-dimensional architectural model after face reduction. In addition, the present invention provides a specific entity hole construction method, by traversing each boundary edge in the face set with a hole structure, each boundary edge is closed, and the newly added face pieces form a closed entity hole. The time complexity of the hole construction is only O(N), where N is the number of boundary edges to be traversed, making the face reduction method of the present invention more efficient. In addition, experiments have also proved that the method of the present invention has higher simplification accuracy and higher simplification efficiency, and can simplify large-scale face pieces to extremely simple low-poly models.

[0105] Furthermore, the method of the present invention, in generating a two-dimensional outer contour corresponding to a three-dimensional building model, divides each facet into a front facet and a back facet according to the sign of the dot product between the normal of the facet and the corresponding observation direction, extracts the region boundaries of the front facet and the back facet respectively, and reverses the region boundaries of the back facet and merges them with the region boundaries of the front facet to obtain the two-dimensional outer contour corresponding to the model. Compared with the method of directly projecting each facet of the model to obtain the two-dimensional outer contour in the prior art, the method of the present invention reduces the number of faces in a single operation by extracting the region boundaries of the front facet and the back facet respectively, simplifies the operation, reduces the operation complexity and time, and further improves the simplification efficiency.

[0106] Furthermore, the method of the present invention does not directly detect the hole structure during hole detection, but determines the large plane area where the hole structure is unlikely to exist by detecting the plane, removes these large plane areas, and uses the path compression union-find algorithm in the remaining areas to find the connected facets, which are the facet sets that may have the hole structure. The method of the present invention is simple and has higher detection efficiency.

[0107] Furthermore, the method of the present invention adopts Boolean operations according to solid primitives or solid holes. Each time the current solid primitive or solid hole is selected, the solid primitive or solid hole with the smallest visual error with the three-dimensional model of the building after the Boolean operation is selected for Boolean operation. This can make the generated model topologically simple and watertight, and have a stable number of facets, further improving the visual quality and accuracy of the simplified model.

[0108] In summary, the efficient building face reduction method based on hole detection of the present invention can quickly and stably generate a model with a low number of facets during the simplification process of the building model, while maintaining the important features of the building's appearance; it can effectively detect and construct details such as hole and sunken structures that are common but difficult to detect in buildings, and retain them during the simplification process.

[0109] The present invention also provides a building surface reduction system based on hole detection, characterized in that it includes a computer-readable storage medium and a processor;

[0110] Computer-readable storage media for storing executable instructions;

[0111] The processor is used to read the executable instructions stored in the computer-readable storage medium to execute the building surface reduction method based on hole detection in the above embodiment.

[0112] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the building surface reduction method based on hole detection as in the above-mentioned embodiment is implemented.

[0113] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A building surface reduction method based on hole detection, It is characterized in that include: Detecting hole structures in each facet of the three-dimensional model of the building to be tested, and obtaining a facet set with hole structures; wherein the model is composed of triangular facets; Traverse each boundary edge in the current face set, add a new face to each boundary edge, and obtain a solid hole composed of the newly added faces; Generate a three-dimensional outer contour corresponding to the model, and carve the obtained solid holes on the corresponding three-dimensional outer contour, and obtain a simplified model after planarization and simplification; Among them, new patches are added to each boundary edge, including: S1, using the current boundary edge, the boundary edge adjacent to the current boundary edge, and the newly added edge to form a triangular face to be added, and obtaining a triangular face to be added corresponding to each boundary edge in the face set; S2, calculating the angle between the normal of each to-be-added triangular face and the normal of the adjacent face of the to-be-added triangular face, and selecting the to-be-added triangular face with the largest angle as the current to-be-added face; S3, merging the current newly added patch into the patch set, and updating the boundary edges in the patch set; S4. Select the next boundary edge in the current face set as the current boundary edge, and jump to S1 until all boundary edges in the current face set are traversed to obtain the newly added face of each boundary edge.

2. The method according to claim 1, It is characterized in that Generating a three-dimensional outer contour corresponding to the model, including: S ′ 1. Generate a two-dimensional outer contour corresponding to the model, including: generating a corresponding observation direction according to the model; projecting each facet of the model to each observation direction, and dividing each facet into a front facet and a back facet according to the positive or negative dot product between the normal of the facet and the corresponding observation direction; extracting the region boundaries of the front facet and the back facet respectively, and reversing the region boundary of the back facet and merging it with the region boundary of the front facet to obtain the two-dimensional outer contour; S ′ 2. Simplifying the two-dimensional outer contour to obtain a simplified two-dimensional outer contour; S ′ 3. Extruding the simplified two-dimensional outer contour in a corresponding observation direction to obtain a set of entity primitives corresponding to the two-dimensional outer contour; S ′ 4. The entity primitives in the entity primitive set and the bounding box of the model are gradually subjected to Boolean intersection operations to obtain the three-dimensional outer contour.

3. The method according to claim 2, It is characterized in that S ′ 4, including: Performing a Boolean intersection operation on the selected entity primitive and the bounding box of the model to obtain the current three-dimensional outer contour; Performing a Boolean intersection operation on the current 3D outer contour and the selected entity primitive again until the change in the visual error between the 3D outer contour obtained by two adjacent Boolean intersection operations and the 3D building model is lower than a given second threshold, and taking the 3D outer contour obtained at this time as the 3D outer contour corresponding to the model; Each time a Boolean intersection operation is performed, the selected entity primitive is the entity primitive whose three-dimensional outer contour obtained after the Boolean intersection operation has the smallest visual error with the model.

4. The method according to claim 3, It is characterized in that Each time a Boolean intersection operation is performed, it also includes: expanding the selected entity primitive.

5. The method according to any one of claims 1 to 4, It is characterized in that The obtained solid hole is engraved on the corresponding three-dimensional outer contour, including: The selected solid hole and the corresponding three-dimensional outer contour are subjected to Boolean subtraction operation to obtain the current three-dimensional outer contour engraved with the solid hole; The current three-dimensional outer contour with the solid hole engraved therein is subjected to a Boolean subtraction operation again with the selected solid hole, until the change in the visual error between the three-dimensional outer contour with the solid hole engraved therein obtained by two adjacent Boolean subtraction operations and the model is lower than a given third threshold value, so as to achieve engraving the obtained solid hole on the corresponding three-dimensional outer contour; Each time a Boolean subtraction operation is performed, the selected solid hole is the solid hole having the smallest visual error between the three-dimensional outer contour of the carved solid hole obtained after the Boolean subtraction operation and the model.

6. The method according to any one of claims 2 to 4, It is characterized in that S ′ 2, the two-dimensional outer contour is simplified by using the Visvalingam-Whyatt algorithm to obtain a simplified two-dimensional outer contour.

7. The method according to claim 1, It is characterized in that Before the obtained solid holes are engraved on the corresponding three-dimensional outer contour, the obtained solid holes are first screened out, including: Calculate the volume Vop of each physical hole and the volume Vmesh of the model; filter out the physical holes with Vop>-∈×Vmesh, where ∈ is a threshold value ∈ set between 0 and 1; Or / and, further comprising a second screening of the obtained solid holes, including: Calculate the Euler characteristic of each solid hole; filter out the solid holes whose Euler characteristic is not 2.

8. The method according to claim 1, It is characterized in that Detecting hole structures in each facet of the model includes: Traversing each triangular patch of the model, determining whether the dihedral angle between the current patch and an adjacent patch is less than a given first threshold, and if so, dividing the current patch and the adjacent patch into the same plane region; until each triangular patch of the model is divided into a corresponding plane region, a plane region set R is obtained; Taking the total area of ​​the triangular facets in each plane region in the plane region set R as the weight of the corresponding region, and sorting each plane region according to the weight; For the plane areas other than the k plane areas with high weights in the plane area set R, a path compression union-find algorithm is used to find connected facets in other plane areas, and the connected facet set is used as the facet set with hole structure.

9. A building surface reduction system based on hole detection, It is characterized in that comprising a computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is configured to read the executable instructions stored in the computer-readable storage medium to execute the method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.