A mesh merging method, device, terminal and medium
By determining the cutting plane in the oblique photogrammetry model and reducing the dimensionality of the three-dimensional overlapping region to a two-dimensional planar domain, and combining it with a multi-constraint dynamic clustering mechanism, the problems of data redundancy and topological inconsistency in the mesh merging of oblique photogrammetry models in the prior art are solved, and efficient, seamless mesh merging and flexible reconstruction are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-16
- Publication Date
- 2026-04-07
AI Technical Summary
Existing mesh merging methods suffer from data redundancy, data distortion, and topological inconsistency in oblique photogrammetry models. They are particularly difficult to achieve efficient and seamless merging when faced with complex model structures, difficult matching of seam regions, and open and variable boundary geometry.
The target mesh is cut by determining the target cutting plane, the three-dimensional overlapping area is constrained to the two-dimensional cutting plane domain, and the vertices are clustered and merged by a preset multi-constraint dynamic clustering mechanism to generate the merged mesh.
It significantly reduces merging complexity, eliminates overlapping and redundant data, generates a unified and seamlessly connected merged grid, improves data storage and transmission efficiency, and allows users to flexibly reconstruct the block geometry and size according to specific application scenarios.
Smart Images

Figure CN121527358B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of oblique photography model processing, in particular to a grid merging method and device, a terminal and a medium. BACKGROUND
[0002] In response to large-scale scene modeling, in order to improve the computing efficiency and scalability, the oblique photography modeling software generally adopts a block processing strategy, divides the modeling area into a plurality of regular sub-regions (such as a square or a cube) for parallel computing, and finally generates a series of three-dimensional model grids with consistent topology. In the context of individualized reconstruction of the size and geometric shape of the block model, how to seamlessly merge and reconstruct the generated regular block grid becomes a key technical link to realize user-defined blocks.
[0003] However, the existing grid merging method has certain limitations when facing oblique photography models. For example, the method based on fine triangular patch subdivision will introduce a large number of fine patches in the three-dimensional overlapping area, which will instead exacerbate data redundancy, and the method based on global reconstruction may damage the geometric features of the original model, resulting in data distortion. In addition, due to the complexity of the model itself and the application scenario, the existing grid merging method also has the following problems:
[0004] (1) Complex inherent structure of the model: there are a large number of non-manifold patches in the three-dimensional model automatically generated by oblique photography, such as data missing areas caused by occlusion, or fragmented models formed by slender objects such as power poles, which increase the geometric complexity of merging.
[0005] (2) Difficulty in matching the joint area: due to the matching error of multi-view images or the data missing of the occluded area, there may be a large gap in the joint area of adjacent grids, resulting in a too far distance between the geometric parts to be merged, and direct merging may produce cracks or holes, affecting the topological consistency.
[0006] (3) Open and variable boundary geometry: the boundary shape of elements such as buildings, roads, and vegetation in urban scenes is complex and non-closed, which makes it difficult to accurately define and process the geometric connection relationship of the boundary area during the merging process, increasing the robustness requirement of the algorithm.
[0007] Therefore, the prior art has defects and needs to be improved and developed. SUMMARY
[0008] The technical problem to be solved by the present application is to provide a grid merging method, device, terminal and medium to solve the problems of data redundancy, data distortion, merging complexity and topological inconsistency in the block merging process of oblique photography models in the prior art, aiming at the above-mentioned defects of the prior art.
[0009] The technical scheme adopted by the present application to solve the technical problems is as follows:
[0010] In a first aspect, the present application discloses a mesh merging method, wherein the method comprises:
[0011] determining a target cutting plane corresponding to a target mesh; the target mesh is any one of two adjacent oblique photography model meshes to be merged;
[0012] cutting the target mesh based on the target cutting plane to constrain a three-dimensional overlapping region in the two adjacent oblique photography model meshes to be merged to a two-dimensional cutting plane domain to obtain a cut target mesh; wherein the target cutting plane of the cut target mesh is a flat boundary;
[0013] all vertices to be clustered in the two-dimensional cutting plane domain are clustered using a preset multi-constraint dynamic clustering mechanism, and adjacent effective vertex clusters of the same category are fused to obtain a merged mesh.
[0014] Optionally, the determination of the target cutting plane corresponding to the target mesh comprises:
[0015] constructing a space bounding box corresponding to each of the two adjacent oblique photography model meshes to be merged;
[0016] calculating the spatial intersection of the two space bounding boxes to obtain a three-dimensional overlapping region, and determining the surfaces of the two space bounding boxes containing the side of the three-dimensional overlapping region and perpendicular to the overlapping direction as cutting planes, respectively;
[0017] determining the cutting plane located in the target mesh as the target cutting plane corresponding to the target mesh.
[0018] Optionally, the cutting of the target mesh based on the target cutting plane comprises:
[0019] dividing the target mesh into a to-be-kept half-space and a to-be-removed half-space based on the target cutting plane;
[0020] traversing all triangular facets on the target mesh, and determining whether all vertices on the triangular facets are located in the to-be-kept half-space or the to-be-removed half-space according to the relative positions of the vertices and the target cutting plane to obtain corresponding determination results;
[0021] cutting the target mesh based on the determination results.
[0022] Optionally, the cutting of the target mesh based on the determination results comprises:
[0023] when the judgment result indicates that all the vertices on the triangle patch are located in the to-be-removed half space only, the triangle patch is deleted;
[0024] when the judgment result indicates that all the vertices on the triangle patch are located in the to-be-removed half space only, the triangle patch is deleted;
[0025] when the judgment result indicates that all the vertices on the triangle patch are located in the to-be-removed half space only, the triangle patch is deleted;
[0026] Optionally, the clustering of all the to-be-clustered vertices in the two-dimensional cutting plane domain by using the preset multi-constraint dynamic clustering mechanism comprises:
[0027] a KD-Tree spatial index structure is constructed in the two-dimensional cutting plane domain, and a current search radius is determined; wherein the corresponding current search radius for the first search is a preset initial search radius;
[0028] for each to-be-clustered vertex in the two-dimensional cutting plane domain, a search for neighborhood vertices is performed in the current search radius by using the KD-Tree spatial index structure, and it is verified whether a neighborhood vertex cluster corresponding to the to-be-clustered vertex satisfies a preset multi-constraint condition;
[0029] when the neighborhood vertex cluster corresponding to the to-be-clustered vertex satisfies the preset multi-constraint condition, the neighborhood vertex cluster is determined as an effective vertex cluster;
[0030] when the neighborhood vertex cluster corresponding to the to-be-clustered vertex does not satisfy the preset multi-constraint condition, it is judged whether the current search radius reaches a maximum search radius threshold, and when the current search radius does not reach the maximum search radius threshold, a new current search radius is obtained by dynamically adjusting the current search radius, in the new current search radius, the search for neighborhood vertices by using the KD-Tree spatial index structure is re-executed, and it is verified whether the neighborhood vertex cluster corresponding to the to-be-clustered vertex satisfies the preset multi-constraint condition, until the neighborhood vertex cluster corresponding to the to-be-clustered vertex satisfies the preset multi-constraint condition;
[0031] and when the current search radius reaches the maximum search radius threshold, the neighborhood vertex cluster is determined as an abnormal vertex cluster, and the abnormal vertex cluster is corrected;
[0032] The preset multi-constraint conditions include a cross-model constraint, a connectivity constraint, a vertex number constraint, and a boundary protection constraint, the cross-model constraint requires that a neighborhood vertex cluster must include vertices from the two adjacent photogrammetry model grids to be merged, the connectivity constraint requires that vertices from the same grid are connected in the original topology, the vertex number constraint requires that the number of vertices in a single cluster is not more than a preset vertex number threshold, and the boundary protection constraint requires that boundary vertices are independently clustered.
[0033] Optionally, the dynamic adjustment of the current search radius to obtain a new current search radius comprises:
[0034] The preset radius adjustment formula is used to dynamically adjust the current search radius to obtain a new current search radius.
[0035] The preset radius adjustment formula is as follows:
[0036] ;
[0037] The preset radius adjustment formula is as follows: is an initial search radius, is a maximum search radius threshold, is the number of iterations.
[0038] Optionally, the modification of the abnormal vertex cluster comprises:
[0039] An interpolation strategy is used to generate a new vertex at a position corresponding to another grid adjacent to the target grid;
[0040] Or, a cluster merging strategy is used to merge the abnormal vertex cluster with an adjacent effective vertex cluster.
[0041] In a second aspect, the present application further discloses a grid merging device, wherein the device comprises:
[0042] A cutting plane determination module is configured to determine a target cutting plane corresponding to a target grid; the target grid is any one of two adjacent photogrammetry model grids to be merged;
[0043] A grid cutting module is configured to cut the target grid based on the target cutting plane, so as to constrain a three-dimensional overlapping region in the two adjacent photogrammetry model grids to be merged to a two-dimensional cutting plane domain to obtain a cut target grid; wherein the target cutting plane of the cut target grid is a flat boundary;
[0044] A clustering module is configured to use a preset multi-constraint dynamic clustering mechanism to cluster all vertices to be clustered in the two-dimensional cutting plane domain.
[0045] The merge module is used to merge adjacent valid vertex clusters of the same category to obtain a merged mesh.
[0046] Thirdly, the present invention discloses a terminal, comprising: a memory, a processor, and a mesh merging program stored in the memory and executable on the processor, wherein the mesh merging program, when executed by the processor, implements the steps of the mesh merging method as described above.
[0047] Fourthly, the present invention discloses a computer-readable storage medium storing a computer program that can be executed to implement the steps of the grid merging method described above.
[0048] This invention provides a mesh merging method, apparatus, terminal, and medium. The mesh merging method includes: optionally determining a target cutting plane corresponding to a target mesh; the target mesh being either one of two adjacent oblique photogrammetry model meshes to be merged; cutting the target mesh based on the target cutting plane to constrain the three-dimensional overlapping region in the two adjacent oblique photogrammetry model meshes to be merged to a two-dimensional cutting plane domain to obtain a cut target mesh; wherein the target cutting plane of the cut target mesh is a flat boundary; clustering all vertices to be clustered in the two-dimensional cutting plane domain using a preset multi-constraint dynamic clustering mechanism, and merging adjacent valid vertex clusters of the same category to obtain a merged mesh. Therefore, this invention determines the target cutting plane corresponding to the target mesh, and then cuts the target mesh based on the target cutting plane. This constrains the three-dimensional overlapping regions in two adjacent oblique photogrammetry model meshes to be merged to the two-dimensional cutting plane domain, transforming the complex three-dimensional overlapping regions into vertex processing problems within the two-dimensional plane domain. This simplifies the complex calculation of directly processing three-dimensional geometric fusion to maintaining topological consistency within the two-dimensional plane domain, significantly reducing the merging complexity. Furthermore, it achieves intelligent fusion of vertices within the two-dimensional cutting plane domain through a multi-constraint dynamic clustering mechanism, effectively eliminating overlapping and redundant data between the original blocks. In other words, the technical solution of this invention achieves high-quality and high-efficiency merging of oblique photogrammetry model meshes through the synergistic effect of plane cutting and dynamic constraint clustering. Attached Figure Description
[0049] Figure 1 This is a flowchart of a preferred embodiment of the mesh merging method in this invention;
[0050] Figure 2 This is a specific schematic diagram of overlapping area calculation disclosed in this invention;
[0051] Figure 3 This is a schematic diagram of a specific planar cutting method disclosed in this invention;
[0052] Figure 4 This is a specific dynamic constraint clustering diagram disclosed in this invention;
[0053] Figure 5 This is a specific interpolation diagram disclosed in this invention;
[0054] Figure 6 This is a specific grid merging diagram disclosed in this invention;
[0055] Figure 7 This is another specific schematic diagram of mesh merging disclosed in this invention;
[0056] Figure 8 This is a schematic diagram of the experimental results of constructing a specific multi-layered detailed tile, as disclosed in this invention.
[0057] Figure 9 This is a functional principle block diagram of a preferred embodiment of the grid merging device in this invention;
[0058] Figure 10 This is a functional principle block diagram of a preferred embodiment of the terminal in this invention. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0060] With the deepening development of digital twin cities and real-scene 3D construction, high-fidelity and high-efficiency city-level 3D scene modeling has become a core task in the field of geographic information systems and computer graphics. Oblique photogrammetry, as a current mainstream technology, can quickly generate large-scale real-scene 3D models with high fidelity through multi-angle image acquisition and automated modeling processes, providing key support for the construction of urban digital infrastructure.
[0061] When dealing with large-scale scene modeling, oblique photogrammetry modeling software generally adopts a block processing strategy to improve computational efficiency and scalability. This involves dividing the modeling area into multiple regular sub-regions (such as squares or cubes) for parallel computation, ultimately generating a series of 3D model meshes with consistent internal topology. This strategy effectively reduces the computational load on a single machine, ensuring the feasibility of the modeling process.
[0062] However, as application scenarios become increasingly sophisticated and diverse, users often need to personalize the size and geometry of segmented models based on specific data scheduling strategies, visualization focus requirements, or customized application goals (such as refined analysis of key areas or global data optimization). While existing segmentation patterns (such as fixed regular shapes) ensure basic modeling efficiency, they struggle to support such flexible customization. Furthermore, to ensure visual continuity at model seams, three-dimensional overlapping areas must be set between segments, which introduces significant data redundancy in macroscopic scenarios and increases storage and transmission overhead.
[0063] Given the need for personalized reconstruction of the size and geometry of segmented models, seamlessly merging and reconstructing the generated regular segmented meshes has become a key technical aspect in realizing user-defined segmentation.
[0064] However, existing mesh merging methods have certain limitations when dealing with oblique photogrammetry models. For example, methods based on fine triangulation introduce a large number of fragmented faces in the 3D overlapping areas, which exacerbates data redundancy. Methods based on global reconstruction may destroy the geometric features of the original model, leading to data distortion. Furthermore, due to the inherent characteristics of the model and the complexity of the application scenarios, existing mesh merging methods also suffer from the following problems:
[0065] (1) Complex inherent structure of the model: There are a large number of non-manifold patches in the 3D model automatically generated by oblique photogrammetry, such as data missing areas caused by occlusion, or fragmented models formed by slender objects such as telephone poles. Such irregular structures increase the geometric complexity of merging.
[0066] (2) Difficulty in matching seam areas: Due to multi-view image matching errors or missing data in occluded areas, adjacent meshes may have large gaps in the seam areas, resulting in the geometric parts to be merged being too far apart. Direct merging is prone to producing cracks or holes, affecting topological consistency.
[0067] (3) Open and varied boundary geometry: The boundary shapes of elements such as buildings, roads, and vegetation in urban scenes are complex and non-closed structures, which makes it difficult to accurately define and handle the geometric connection relationship of the boundary area during the merging process, increasing the requirements for the robustness of the algorithm.
[0068] In summary, existing mesh merging methods struggle to achieve flexible data reduction and custom reconstruction while ensuring topological consistency and geometric integrity of the merged model. This fails to meet the urgent needs of high-end applications such as digital twins for refined management and efficient visualization of 3D data.
[0069] To address this, this application provides a mesh merging scheme that can effectively eliminate overlapping and redundant data between original blocks, generating a merged mesh with a unified structure and seamless connection. This not only significantly improves data storage and transmission efficiency but also allows users to flexibly reconstruct the geometry and size of blocks according to specific application scenarios.
[0070] Please see Figure 1 , Figure 1 This is a flowchart of the mesh merging method in this invention. For example... Figure 1 As shown, the mesh merging method described in this embodiment of the invention includes:
[0071] Step S11: Determine the target cutting plane corresponding to the target mesh; the target mesh is any mesh in two adjacent oblique photogrammetry model meshes to be merged.
[0072] Among these methods, multi-angle imagery acquired via drones allows for spatial computation, dense point cloud generation, mesh construction, and texture mapping using professional software such as ContextCapture and Pix4D, automatically generating 3D mesh models. The oblique photogrammetry model mesh is essentially a surface model composed of triangular meshes, which are made up of triangular facets. In 3D modeling, large-scale scenes are typically divided into multiple mesh units of uniform size (e.g., 50m × 50m) to facilitate data organization and management.
[0073] In this embodiment, for two adjacent oblique photogrammetry model meshes to be merged, the cutting plane is first determined. Each of the two adjacent oblique photogrammetry model meshes to be merged has its corresponding cutting plane. For any mesh in the two adjacent oblique photogrammetry model meshes to be merged, i.e. the target mesh, its target cutting plane is determined so that the target mesh can be cut based on the target cutting plane in the future, thereby constraining the three-dimensional overlapping area in the two adjacent oblique photogrammetry model meshes to be merged to the two-dimensional cutting plane domain.
[0074] Specifically, spatial bounding boxes are constructed for two adjacent oblique photogrammetry model meshes to be merged. The spatial intersection of the two bounding boxes is calculated to obtain the 3D overlapping region. The surfaces on the two bounding boxes that contain the 3D overlapping region and are perpendicular to the overlap direction are determined as cutting planes. The cutting plane located within the target mesh is determined as the target cutting plane corresponding to the target mesh. In essence, the cutting plane is determined by calculating the overlapping region of the mesh bounding boxes.
[0075] For example, see Figure 2As shown, firstly, spatial bounding boxes are constructed for two adjacent oblique photogrammetry model meshes to be merged (i.e., Mesh1 and Mesh2). These spatial bounding boxes can be axis-aligned. The spatial intersection of the two spatial bounding boxes is calculated, and this intersection is taken as the 3D overlapping region. Based on the main direction of the overlapping region (i.e., the overlap direction of the two spatial bounding boxes), the cutting plane (i.e., the surface on the two spatial bounding boxes that contains one side of the 3D overlapping region and is perpendicular to the overlap direction) is determined. See also Figure 3 As shown, when Mesh2 is the current target mesh, the cutting plane 2 located within Mesh2 is taken as its corresponding target cutting plane.
[0076] Step S12: Cut the target mesh based on the target cutting plane to constrain the three-dimensional overlapping region in the two adjacent oblique photogrammetry model meshes to be merged to the two-dimensional cutting plane domain to obtain the cut target mesh; wherein, the target cutting plane of the cut target mesh is a flat boundary.
[0077] In this embodiment, the target mesh is cut based on the target cutting plane, which can reduce the dimensionality of the overlapping mesh region in three-dimensional space to a two-dimensional plane domain. The two-dimensional cutting plane domain is the two-dimensional operation plane obtained after the three-dimensional overlapping region is reduced in dimensionality. Subsequent vertex clustering and fusion are performed in this two-dimensional plane domain to simplify the calculation.
[0078] Specifically, based on the target cutting plane, the target mesh is divided into a half-space to be retained and a half-space to be removed. All triangular faces on the target mesh are traversed, and the relative positions of all vertices on each facet with the target cutting plane are used to determine whether any vertex on the facet is located within either the half-space to be retained or the half-space to be removed. Based on these determinations, the target mesh is cut. If the determination indicates that all vertices on a facet are located only within the half-space to be retained, the facet is retained. If the determination indicates that all vertices on a facet are located only within the half-space to be removed, the facet is deleted. If the determination indicates that all vertices on a facet are located within both the half-space to be retained and the half-space to be removed, the facets located within the half-space to be retained are retriangulated. In essence, after determining the cutting plane by calculating the overlapping region of the mesh bounding boxes, a planar cutting strategy is used to precisely cut the target mesh according to spatial topological relationships. This constrains the 3D overlapping regions in two adjacent oblique photogrammetry model meshes to be merged to the 2D cutting plane domain, thereby reducing the complexity of mesh merging from 3D to 2D.
[0079] For example, see the above. Figure 3As shown, the target cutting plane can divide the target mesh into a half-space to be removed (i.e., Side1) and a half-space to be retained (i.e., Side2). By traversing all triangular faces of the target mesh, the relative positions of all vertices of the triangular face with the cutting plane determine whether each vertex of the triangular face is located in the half-space to be retained or the half-space to be removed. The following processing rules are then applied for cutting:
[0080] ① Retention rule: If all vertices of a triangle are located in the half-space to be retained, then the triangle is completely retained;
[0081] ② Segmentation rule: If a triangular facet is penetrated by the target cutting plane, the intersection line is calculated and retriangulated, retaining the half-space to be retained;
[0082] ③ Deletion rule: If all vertices of a triangle are located in the half-space to be cut, then the triangle is deleted directly.
[0083] In other words, the target mesh is precisely cut by applying three types of rules: retention, segmentation, and deletion. This transforms the complex three-dimensional overlapping region into a vertex processing problem in a two-dimensional planar domain. This simplifies the complex calculation of directly processing three-dimensional geometric fusion to maintaining topological consistency in a two-dimensional domain, significantly reducing computational complexity and providing a foundation for efficient and accurate mesh merging.
[0084] It should be noted that the triangular facet is penetrated by the target cutting plane, which means that the vertices of the triangular facet are located in the half space to be preserved and the half space to be cut. Then, the part of the triangular facet located in the half space to be preserved is retriangulated to obtain a new triangular facet.
[0085] After the cutting is completed, a flat boundary is formed at the cutting plane of the target mesh, which constrains the overlapping areas in the original three-dimensional space to the two-dimensional plane domain. That is, the complex three-dimensional mesh merging problem is transformed into a vertex fusion problem in the two-dimensional plane domain through dimensionality reduction, which significantly reduces the computational complexity of subsequent processing and provides a regular operation space for high-quality mesh merging.
[0086] Step S13: Use a preset multi-constraint dynamic clustering mechanism to cluster all vertices to be clustered in the two-dimensional cutting plane domain, and merge adjacent valid vertex clusters of the same category to obtain a merged mesh.
[0087] In this context, vertices within the two-dimensional cutting plane domain refer to vertices located within that cutting plane domain. Furthermore, the merged mesh refers to a new, unified triangular mesh model generated by performing dynamic constraint clustering and fusion operations on the vertex sets of adjacent meshes after preprocessing them with planar cutting, within the two-dimensional cutting plane domain.
[0088] In this embodiment, vertices within a two-dimensional cutting plane domain are used as the processing object. A preset multi-constraint dynamic clustering mechanism is employed to achieve intelligent fusion of vertices within the two-dimensional cutting plane domain of adjacent meshes, ensuring that the merged meshes maintain topological consistency. Specifically, the preset multi-constraint dynamic clustering mechanism guides the clustering process through preset multi-constraint conditions and employs an adaptive dynamic adjustment strategy for the radius to adapt to point cloud distributions of different densities.
[0089] Specifically, a KD-Tree spatial index structure is constructed within the two-dimensional cutting plane domain, and the current search radius is determined. The current search radius for the first search is a preset initial search radius. For each vertex to be clustered within the two-dimensional cutting plane domain, neighboring vertices are searched within the current search radius using the KD-Tree spatial index structure, and it is verified whether the neighboring vertex clusters corresponding to the searched vertex satisfy preset multiple constraints. If the neighboring vertex clusters corresponding to the vertex to be clustered satisfy the preset multiple constraints, then the neighboring vertex clusters are determined as valid vertex clusters; otherwise, they are not. The process then determines whether the current search radius has reached the maximum search radius threshold. If the current search radius has not reached the maximum search radius threshold, the current search radius is dynamically adjusted to obtain a new current search radius. Within the new current search radius, the search for neighboring vertices using the KD-Tree spatial indexing structure is re-executed, and the step of verifying whether the neighboring vertex clusters corresponding to the vertex to be clustered satisfy the preset multi-constraint conditions is repeated until the neighboring vertex clusters corresponding to the vertex to be clustered satisfy the preset multi-constraint conditions. Furthermore, if the current search radius reaches the maximum search radius threshold, the neighboring vertex clusters are identified as abnormal vertex clusters and corrected. Here, a neighboring vertex cluster is the set of neighboring vertices found within the current search radius using the KD-Tree spatial indexing structure; this set is the direct processing object for multi-constraint condition verification. An abnormal vertex cluster refers to a vertex cluster that has not passed the multi-constraint condition verification.
[0090] The KD-Tree spatial index structure is used for efficient neighborhood search during dynamic clustering. The purpose of neighborhood search is to find all neighboring vertices that satisfy a distance threshold for the vertex to be clustered. Specifically, when performing a radius search, it quickly finds neighboring vertices around the vertex to be clustered, forming a neighborhood vertex cluster. Multiple pre-defined constraints are included, such as cross-model constraints, connectivity constraints, vertex number constraints, and boundary protection constraints. Cross-model constraints require that a neighborhood vertex cluster must contain vertices from two adjacent oblique photogrammetry model meshes to be merged. Connectivity constraints require that vertices from the same mesh are connected in the original topology. Vertex number constraints require that the number of vertices in a single cluster does not exceed a pre-defined vertex number threshold. Boundary protection constraints require that boundary vertices be clustered independently. It should be noted that the vertex number constraint prevents over-merging, and the boundary protection constraint, by specially processing boundary vertices and clustering them independently, protects sharp boundary features.
[0091] Understandably, by using vertices within a 2D cutting plane domain as the processing object, and leveraging the KD-Tree spatial index to support efficient neighborhood search, and introducing four layers of verification conditions—cross-model constraints, connectivity constraints, vertex number constraints, and boundary protection constraints—the topological correctness of the merged mesh can be guaranteed. Combined with the adaptive dynamic adjustment strategy of the KD-Tree spatial index and search radius, it can adaptively handle non-uniform point cloud density and adapt to the density variation characteristics of the oblique photogrammetry model mesh. During clustering, iterative search and constraint verification ensure that vertex fusion simultaneously satisfies topological consistency and geometric feature protection, achieving topological consistency fusion of adjacent mesh vertices. Furthermore, for abnormal cases, anomaly handling mechanisms are employed, such as interpolation for missing data or cluster merging strategies to enhance robustness. In other words, the proposed technical solution effectively solves the common crack and hole problems in oblique photogrammetry model merging, ensuring the integrity and visual realism of the merged mesh, ultimately achieving seamless, high-quality mesh merging.
[0092] In this embodiment, dynamically adjusting the current search radius can specifically include: dynamically adjusting the current search radius using a preset radius adjustment formula to obtain a new current search radius. It can be understood that an adaptive radius adjustment strategy is used to handle non-uniform point cloud density. The preset radius adjustment formula is:
[0093] ;
[0094] in, As the initial search radius, The maximum search radius threshold, This represents the number of iterations.
[0095] Furthermore, in this embodiment, the correction of abnormal vertex clusters may specifically include: generating new vertices at positions corresponding to another grid adjacent to the target grid using an interpolation gap-filling strategy; or merging abnormal vertex clusters with adjacent valid vertex clusters using a cluster merging strategy.
[0096] For example, see Figure 4 As shown, firstly, a KD-Tree spatial index structure is constructed within the cutting plane domain, which supports subsequent efficient neighborhood search. The KD-Tree spatial index structure, through recursive spatial partitioning, can significantly accelerate range queries on large-scale vertex data. In dynamic clustering, a vertex to be clustered is determined from the cutting plane domain and designated as the current vertex. Using the KD-Tree spatial index structure, an iterative search begins from the initial search radius. If the neighboring vertex clusters of the current vertex within the initial search radius satisfy preset multiple constraints, these neighboring vertex clusters are considered valid vertex clusters corresponding to the current vertex. The same steps are then applied to the next vertex to be clustered. If the neighboring vertex clusters of the current vertex within the initial search radius do not satisfy the preset multiple constraints, the current search radius is expanded, and a new search is conducted within the expanded search radius to find neighboring vertex clusters that satisfy the preset multiple constraints. If, until the current search radius reaches the maximum search radius threshold, no neighboring vertex clusters satisfying the preset multiple constraints are found, these neighboring vertex clusters are identified as abnormal vertex clusters. Then, according to the abnormality handling mechanism, the abnormal vertex clusters are corrected. For example, see [link to relevant documentation]. Figure 5 As shown, for anomalous vertex clusters that do not meet the constraints, an interpolation-based gap-filling strategy is used to generate new vertices at the corresponding positions in another mesh, or a cluster merging strategy is used to merge the anomalous vertex cluster with adjacent valid vertex clusters to ensure the robustness of the algorithm. Adjacent valid vertex clusters refer to vertex clusters that are directly connected to the current anomalous vertex cluster in the mesh topology and that satisfy all constraints themselves. The adjacency criterion is the connectivity of the original mesh topology. Specifically, if two vertex clusters contain at least one pair of vertices that belong to the same triangular facet or the same edge in the original mesh (i.e., they are directly connected through mesh edge connections), then these two clusters are defined as adjacent. Figure 4 Different colors are used to represent the clustering results.
[0097] As can be seen, in this embodiment of the invention, by determining the target cutting plane corresponding to the target mesh, and then cutting the target mesh based on the target cutting plane, the three-dimensional overlapping region in two adjacent oblique photogrammetry model meshes to be merged is constrained to the two-dimensional cutting plane domain. This transforms the complex three-dimensional overlapping region into a vertex processing problem within the two-dimensional plane domain, thereby simplifying the complex calculation of traditionally directly processing three-dimensional geometric fusion into topological consistency maintenance within the two-dimensional plane domain, significantly reducing the merging complexity. Furthermore, through a multi-constraint dynamic clustering mechanism, intelligent fusion of vertices within the two-dimensional cutting plane domain is achieved, effectively eliminating overlapping and redundant data between the original blocks (i.e., between adjacent oblique photogrammetry model meshes). In other words, the technical solution of this invention achieves topological consistency merging of oblique photogrammetry model meshes through the synergistic effect of planar cutting and dynamic constraint clustering in merging adjacent oblique photogrammetry model meshes, generating a structurally unified and seamlessly connected merged mesh, achieving high-quality and high-efficiency merging of oblique photogrammetry model meshes. It also significantly improves data storage and transmission efficiency. Moreover, through cutting and merging techniques, cutting or merging can be performed on any plane, thereby supporting users to flexibly reconstruct the block geometry and size according to specific application scenarios.
[0098] See Figure 6 and Figure 7 As shown, the merging results for two sets of oblique photogrammetry model meshes of different sizes demonstrate that the original boundaries of the blocks within the merged mesh have been completely eliminated, resulting in a continuous and complete model free from topological errors such as cracks, holes, and geometric misalignments. While maintaining visual quality, the merging process achieves data simplification by removing overlapping 3D regions, and the merging results are accurate and reliable. Furthermore, it provides key technical support for constructing efficient multi-level detail tiles and optimizing the real-time rendering performance of large-scale scenes. Figure 6 and Figure 7 The original adjacent grids are distinguished by blue and red.
[0099] In the two mesh merging scenarios, the number of vertices and faces both decreased, as shown in Table 1. This effectively verifies the ability of the technical solution of the present invention to eliminate data redundancy.
[0100] Table 1
[0101]
[0102] As shown in Table 1 above, for mesh merging scenarios with over 500,000 vertices, the merging processing time is approximately 13.8 seconds; for mesh merging scenarios with several thousand vertices, the processing time is only 0.078 seconds. This efficiency demonstrates that the technical solution of this invention has acceptable time overhead in practical engineering applications and can meet the needs of production processes. This efficiency is crucial for processing massive amounts of oblique photogrammetry data.
[0103] And, asFigure 8 In the experimental results (a), (b), and (c), the technical solution of this invention first merges the results and then combines them with a mesh simplification algorithm based on a quadratic error metric. The number of LOD model tiles generated decreases significantly as the level of detail decreases, that is, from 14 tiles to 1 tile, and the model structure remains intact (experimental group). In contrast, as shown in (a), (b), and (c), the technical solution of this invention first merges the results and then combines them with a mesh simplification algorithm based on a quadratic error metric. The number of tiles generated decreases significantly as the level of detail decreases, that is, from 14 tiles to 1 tile, and the model structure remains intact (experimental group). Figure 8 The experimental results (d) and (e) show that directly simplifying the original blocks will produce obvious gaps and cracks at the seams (control group). The data in Table 2 further show that the experimental group has far fewer tiles and vertices at LOD2 and LOD3 levels than the control group. This means that the number of draw calls and the amount of geometric data transferred can be greatly reduced during rendering, thereby significantly improving rendering performance.
[0104] Table 2
[0105]
[0106] It should be noted that when there is fusion of multiple oblique photogrammetry model meshes, multiple oblique photogrammetry model meshes can be fused sequentially or in parallel by setting a pre-defined fusion priority or constructing a model connection graph. This can improve the processing efficiency of large-scale oblique photogrammetry model mesh datasets. Furthermore, deep learning networks can be used to automatically learn the optimal cutting strategy for different scenarios to determine the cutting plane, or reinforcement learning can be used to dynamically optimize clustering parameters, such as the search radius in the clustering process.
[0107] In one embodiment, such as Figure 9 As shown, based on the above-described mesh merging method, the present invention also provides a mesh merging apparatus, comprising:
[0108] The cutting plane determination module 11 is used to determine the target cutting plane corresponding to the target mesh; the target mesh is any mesh in two adjacent oblique photogrammetry model meshes to be merged.
[0109] The mesh cutting module 12 is used to cut the target mesh based on the target cutting plane, so as to constrain the three-dimensional overlapping area in the two adjacent oblique photogrammetry model meshes to be merged to the two-dimensional cutting plane domain to obtain the cut target mesh; wherein, the target cutting plane of the cut target mesh is a flat boundary;
[0110] Clustering module 13 is used to cluster all vertices to be clustered in the two-dimensional cutting plane domain using a preset multi-constraint dynamic clustering mechanism;
[0111] Merging module 14 is used to merge adjacent valid vertex clusters of the same category to obtain a merged mesh.
[0112] Furthermore, it is worth noting that the working process of the mesh merging device provided in this embodiment is the same as that of the mesh merging method described above, and will not be repeated here. For details, please refer to the working process of the mesh merging method described above.
[0113] Furthermore, this mesh merging device can be an independent tool module that can be integrated into a 3D GIS platform or modeling software as a standardized tool for post-processing of oblique photogrammetry models. This can reduce reliance on manual intervention and promote the automation and standardization of large-scale real-scene 3D modeling production.
[0114] Figure 10 A schematic diagram of the structure of a terminal provided in an embodiment of this application. The terminal may include:
[0115] The memory 501, the processor 502, and the computer program stored on the memory 501 and capable of running on the processor 502.
[0116] When processor 502 executes the program, it implements the mesh merging method provided in the above embodiments.
[0117] Furthermore, the terminal also includes:
[0118] Communication interface 503 is used for communication between memory 501 and processor 502.
[0119] The memory 501 is used to store computer programs that can run on the processor 502.
[0120] Memory 501 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0121] If the memory 501, processor 502, and communication interface 503 are implemented independently, they can be interconnected via a bus to communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one line is used in the diagram, but this does not imply that there is only one bus or one type of bus.
[0122] Optionally, in a specific implementation, if the memory 501, processor 502, and communication interface 503 are integrated on a single chip, then the memory 501, processor 502, and communication interface 503 can communicate with each other through an internal interface.
[0123] Processor 502 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0124] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described mesh merging method.
[0125] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.
[0126] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0127] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can read and execute instructions from and from an instruction execution system, apparatus or device).
[0128] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0129] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A mesh merging method, characterized in that, The method includes: Determine the target cutting plane corresponding to the target mesh; the target mesh is any one of two adjacent oblique photogrammetry model meshes to be merged; The target mesh is cut based on the target cutting plane to constrain the three-dimensional overlapping region in the two adjacent oblique photogrammetry model meshes to be merged to the two-dimensional cutting plane domain to obtain the cut target mesh; wherein, the target cutting plane of the cut target mesh is a flat boundary; A preset multi-constraint dynamic clustering mechanism is used to cluster all vertices to be clustered in the two-dimensional cutting plane domain, and adjacent valid vertex clusters of the same category are merged to obtain a merged mesh. The step of clustering all vertices to be clustered within the two-dimensional cutting plane domain using a preset multi-constraint dynamic clustering mechanism includes: A KD-Tree spatial index structure is constructed within the two-dimensional cutting plane domain, and the current search radius is determined; wherein, the current search radius corresponding to the first search is a preset initial search radius; For each vertex to be clustered within the two-dimensional cutting plane domain, the neighboring vertices are searched within the current search radius using the KD-Tree spatial index structure, and it is verified whether the neighboring vertex clusters corresponding to the searched vertex to be clustered satisfy the preset multiple constraint conditions. If the neighborhood vertex cluster corresponding to the vertex to be clustered satisfies the preset multiple constraint conditions, then the neighborhood vertex cluster is determined as a valid vertex cluster; If the neighborhood vertex cluster corresponding to the vertex to be clustered does not satisfy the preset multiple constraints, then it is determined whether the current search radius has reached the maximum search radius threshold. If the current search radius has not reached the maximum search radius threshold, the current search radius is dynamically adjusted to obtain a new current search radius. Within the new current search radius, the step of searching for neighborhood vertices through the KD-Tree spatial index structure and verifying whether the searched neighborhood vertex cluster corresponding to the vertex to be clustered satisfies the preset multiple constraints is repeated until the neighborhood vertex cluster corresponding to the vertex to be clustered satisfies the preset multiple constraints. Furthermore, when the current search radius reaches the maximum search radius threshold, the neighborhood vertex cluster is identified as an abnormal vertex cluster, and the abnormal vertex cluster is corrected. The preset multi-constraint conditions include cross-model constraints, connectivity constraints, vertex number constraints, and boundary protection constraints. The cross-model constraints require that the neighborhood vertex clusters must contain vertices from the two adjacent oblique photogrammetry model meshes to be merged. The connectivity constraints require that vertices from the same mesh are connected in the original topology. The vertex number constraints require that the number of vertices in a single cluster does not exceed a preset vertex number threshold. The boundary protection constraints require that boundary vertices are clustered independently.
2. The mesh merging method according to claim 1, characterized in that, The determination of the target cutting plane corresponding to the target mesh includes: Construct the spatial bounding boxes corresponding to the two adjacent oblique photogrammetry model meshes to be merged; The spatial intersection of the two bounding boxes is calculated to obtain the three-dimensional overlapping region, and the surfaces of the two bounding boxes that contain the three-dimensional overlapping region and are perpendicular to the overlapping direction are respectively determined as cutting planes; The cutting plane located within the target mesh is defined as the target cutting plane corresponding to the target mesh.
3. The mesh merging method according to claim 1, characterized in that, The step of cutting the target mesh based on the target cutting plane includes: Based on the target cutting plane, the target mesh is divided into half-spaces to be retained and half-spaces to be removed; Traverse all triangular faces on the target mesh, and determine whether all vertices on the triangular face are located in the half-space to be retained or the half-space to be cut based on the relative positions of all vertices on the triangular face and the target cutting plane, and obtain the corresponding judgment result; The target mesh is cut based on the judgment result.
4. The mesh merging method according to claim 3, characterized in that, The step of cutting the target mesh based on the judgment result includes: If the determination result indicates that all vertices on the triangular facet are located only in the half-space to be retained, then the triangular facet is retained; If the determination result indicates that all vertices on the triangular facet are located only in the half-space to be cut, then the triangular facet is deleted. If the determination result indicates that all vertices on the triangular facet are located in the half-space to be retained and the half-space to be cut off, then the portion of the triangular facet located in the half-space to be retained is retriangulated.
5. The mesh merging method according to claim 1, characterized in that, The dynamic adjustment of the current search radius to obtain a new current search radius includes: The current search radius is dynamically adjusted using a preset radius adjustment formula to obtain a new current search radius. The preset radius adjustment formula is as follows: ; in, As the initial search radius, The maximum search radius threshold, This represents the number of iterations.
6. The mesh merging method according to claim 1, characterized in that, The correction of the abnormal vertex cluster includes: A new vertex is generated at the position corresponding to another grid adjacent to the target grid using an interpolation missing strategy; Alternatively, the abnormal vertex cluster can be merged with the adjacent valid vertex cluster using a cluster merging strategy.
7. A grid merging device, characterized in that, The device includes: The cutting plane determination module is used to determine the target cutting plane corresponding to the target mesh; the target mesh is any one of two adjacent oblique photogrammetry model meshes to be merged. The mesh cutting module is used to cut the target mesh based on the target cutting plane, so as to constrain the three-dimensional overlapping area in two adjacent oblique photogrammetry model meshes to be merged to the two-dimensional cutting plane domain to obtain the cut target mesh; wherein, the target cutting plane of the cut target mesh is a flat boundary; The clustering module is used to cluster all vertices to be clustered within the two-dimensional cutting plane domain using a preset multi-constraint dynamic clustering mechanism; The merging module is used to merge adjacent valid vertex clusters of the same category to obtain a merged mesh; The clustering module is specifically used for: A KD-Tree spatial index structure is constructed within the two-dimensional cutting plane domain, and the current search radius is determined; wherein, the current search radius corresponding to the first search is a preset initial search radius; For each vertex to be clustered within the two-dimensional cutting plane domain, the neighboring vertices are searched within the current search radius using the KD-Tree spatial index structure, and it is verified whether the neighboring vertex clusters corresponding to the searched vertex to be clustered satisfy the preset multiple constraint conditions. If the neighborhood vertex cluster corresponding to the vertex to be clustered satisfies the preset multiple constraint conditions, then the neighborhood vertex cluster is determined as a valid vertex cluster; If the neighborhood vertex cluster corresponding to the vertex to be clustered does not satisfy the preset multiple constraints, then it is determined whether the current search radius has reached the maximum search radius threshold. If the current search radius has not reached the maximum search radius threshold, the current search radius is dynamically adjusted to obtain a new current search radius. Within the new current search radius, the step of searching for neighborhood vertices through the KD-Tree spatial index structure and verifying whether the searched neighborhood vertex cluster corresponding to the vertex to be clustered satisfies the preset multiple constraints is repeated until the neighborhood vertex cluster corresponding to the vertex to be clustered satisfies the preset multiple constraints. Furthermore, when the current search radius reaches the maximum search radius threshold, the neighborhood vertex cluster is identified as an abnormal vertex cluster, and the abnormal vertex cluster is corrected. The preset multi-constraint conditions include cross-model constraints, connectivity constraints, vertex number constraints, and boundary protection constraints. The cross-model constraints require that the neighborhood vertex clusters must contain vertices from the two adjacent oblique photogrammetry model meshes to be merged. The connectivity constraints require that vertices from the same mesh are connected in the original topology. The vertex number constraints require that the number of vertices in a single cluster does not exceed a preset vertex number threshold. The boundary protection constraints require that boundary vertices are clustered independently.
8. A terminal, characterized in that, include: A memory, a processor, and a mesh merging program stored in the memory and executable on the processor, wherein the mesh merging program, when executed by the processor, implements the steps of the mesh merging method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed to implement the steps of the mesh merging method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Triangular mesh rapid construction method and system based on oblique photography image
CN116109791A
Orthorectifying stitched oblique imagery to a nadir view, and applications thereof
US20110109719A1