A method, medium and device for boundary fusion of a BIM model and a photogrammetry model

CN122415906BActive Publication Date: 2026-09-08POWERCHINA ZHONGNAN ENG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610864474.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-09-08
Estimated Expiration
2046-06-16

AI Technical Summary

Technical Problem

[0005]为了解决上述现有技术中存在的融合边界顶部贴合不良、底部存在高程偏差、多LOD层级切换时出现视觉跳变,以及拉伸面纹理映射效果差的技术问题,本发明提供了一种BIM模型与倾斜摄影模型边界融合方法、介质及设备,具体技术方案如下:

Benefits of technology

(1)本发明通过提取BIM模型底面轮廓的三维边界点集,利用空间包含检测与重心坐标插值算法,精准筛选获取BIM模型表面的“最低有效高程”。以此三维边界为基准进行裁剪和拉伸,彻底解决了底部高程偏差问题,实现了两类模型的高精度三维空间对齐与几何贴合。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122415906B_ABST
    Figure CN122415906B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of CIM data fusion processing algorithm, and discloses a BIM model and oblique photography model boundary fusion method, medium and equipment, the method comprises the following steps: unifying the coordinate system of oblique photography and BIM model; projecting the BIM grid to obtain the two-dimensional polygon boundary of the maximum projection range; combining the BIM three-dimensional grid, filtering the lowest effective elevation through elevation interpolation to generate a three-dimensional boundary point set; according to the two-dimensional boundary, performing spatial topology filtering on each LOD level tile of the oblique model, and performing geometric difference set operation on the intersecting tiles to extract the cut edges; matching the three-dimensional boundary line segment and the cut edges into a cut edge pair, discretely sampling and reconstructing the side surface stretching grid; calculating the texture UV coordinates based on the cumulative path distance and the relative elevation, and combining and updating to the corresponding tile to output. The present application solves the problems of model elevation deviation, visual jump and stretching surface texture discomfort, and realizes high-precision and seamless geometric fitting of the two types of models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CIM data fusion processing algorithm technology, specifically to a method, medium, and device for fusion of the boundaries of a BIM model and an oblique photogrammetry model. Background Technology

[0002] City Information Modeling (CIM) typically uses multi-source heterogeneous data, including Building Information Modeling (BIM), Geographic Information System (GIS), and Internet of Things (IoT). BIM models employ parametric solid modeling, possessing complete internal structure and external morphology, providing accurate building component boundaries and geometric information. Oblique photogrammetry models, through multi-angle camera cluster photography and computer vision reconstruction, can realistically reproduce the surface and surrounding environment with a dense triangular mesh display. To achieve refined design verification and intelligent operation and maintenance, the two models need to be fused at the boundary. The precise boundary settings of BIM are used to trim the oblique photogrammetry model, eliminating irrelevant environmental information and reducing geometric conflicts.

[0003] However, existing model boundary fusion methods typically use the 2D outer contour projection of the BIM model as the clipping plane to clip the oblique photogrammetry model, and generate a vertical stretching surface based on a fixed elevation. The texture of the stretching surface is often simply assigned using the color of the original oblique model's vertices. Furthermore, existing methods fail to adopt a uniform and adaptive clipping strategy for different levels of detail (LOD) when processing oblique photogrammetry models. These traditional methods have significant drawbacks: (1) Because the stretched surface is generated based on two-dimensional projection and fixed elevation, the top details of the fusion part are missing, and it cannot be seamlessly fitted with the inclined model. The bottom also has a serious elevation deviation from the BIM bottom surface due to the lack of actual ground elevation information. (2) The texture of the stretched surface is poorly colored using only the vertex color, resulting in a strong sense of visual disharmony; (3) When the oblique photogrammetry model switches between different levels of detail (LOD), the unprocessed clipping boundaries will cause obvious jumps in the geometric shape and visual appearance of the fusion result, which seriously affects the visualization effect and analysis accuracy of the model.

[0004] Therefore, there is an urgent need to develop a new method, medium, and equipment for fusion of the boundaries between BIM models and oblique photogrammetry models, in order to solve or partially solve the above-mentioned problems in existing technologies. Summary of the Invention

[0005] To address the technical problems in the existing technology, such as poor top alignment of the fusion boundary, elevation deviation at the bottom, visual abrupt changes when switching between multiple LOD levels, and poor texture mapping of stretched surfaces, this invention provides a method, medium, and device for fusion of BIM model and oblique photogrammetry model boundaries. The specific technical solution is as follows: A method for boundary fusion between a BIM model and an oblique photogrammetry model includes the following steps: S1. Analyze the source coordinate system and its multi-detail level structure of the oblique photogrammetry model, extract the target coordinate system of the BIM model, and transform the triangle vertices in the tiles of each detail level in the oblique photogrammetry model from the source coordinate system to the target coordinate system to obtain the oblique photogrammetry model with unified coordinates. S2. Mesh the three-dimensional entities of the BIM model to obtain a set of three-dimensional triangles. Orthogonally project the set of three-dimensional triangles onto the horizontal projection plane to generate a set of two-dimensional triangles. Perform polygon union operation on the set of two-dimensional triangles to obtain the two-dimensional polygon boundary representing the maximum projection range of the BIM model and its corresponding two-dimensional boundary point set. S3. Traverse the set of two-dimensional boundary points, combine it with the set of three-dimensional triangles of the BIM model, and through spatial inclusion detection and elevation interpolation calculation, filter out the lowest effective elevation corresponding to each two-dimensional boundary point on the surface of the BIM model, and combine multiple lowest effective elevations to generate a set of three-dimensional boundary points that reflect the bottom envelope of the BIM model. S4. Traverse each detail level and its tiles of the coordinate-unified oblique photogrammetry model, and filter the tiles according to the spatial topological relationship based on the two-dimensional polygon boundary to obtain intersecting tiles with intersecting relationships and external tiles outside the two-dimensional polygon boundary. For the intersecting tiles, all triangles are extracted, and all triangles are projected onto the horizontal projection plane to obtain projected triangles. The projected triangles and the boundaries of the two-dimensional polygons are subjected to two-dimensional spatial topological filtering to divide them into internal triangles, external triangles, and intersecting triangles. Geometric difference operations are performed on the intersecting triangles and the boundaries of the two-dimensional polygons to obtain the difference polygons located outside the boundaries of the two-dimensional polygons. The difference polygons are retriangulated and mapped back to three-dimensional space to generate reconstructed three-dimensional triangles. The reconstructed three-dimensional triangles are simultaneously included in the clipping triangle set and the external triangle set, and the external triangles are included in the external triangle set. The external tiles are directly retained. S5: The three-dimensional boundary point set is connected sequentially to construct a three-dimensional line segment set. The edges of each reconstructed three-dimensional triangle in the clipping triangle set are extracted as candidate clipped edges. The candidate clipped edges are matched with the three-dimensional line segment set to determine the clipped edges and their corresponding clipping edge pairs. The clipping edge pairs are discretized and reconstructed to construct a side-extended mesh connecting the three-dimensional boundary of the BIM model and the clipping boundary of the oblique photogrammetry model. S6. Based on the cumulative path distance of the vertex of the side-stretched mesh along the boundary of the two-dimensional polygon and the relative elevation of the vertex, calculate the texture UV coordinates to obtain the side-stretched mesh of the texture mapping; combine the external triangle set with the side-stretched mesh of the texture mapping and update the corresponding tile of the coordinate-unified oblique photogrammetry model for output.

[0006] In a preferred implementation, step S3, which involves filtering to obtain the lowest effective elevation corresponding to each two-dimensional boundary point on the BIM model surface, specifically includes: For any two-dimensional boundary point to be calculated in the set of two-dimensional boundary points, traverse each two-dimensional triangle in the set of two-dimensional triangles and check whether the current two-dimensional triangle contains the two-dimensional boundary point to be calculated. If included, the interpolated elevation values ​​of the two-dimensional boundary points to be calculated on the corresponding three-dimensional triangles are calculated based on the centroid coordinate interpolation algorithm. The newly calculated interpolated elevation value is compared with the historical elevation value currently recorded for the two-dimensional boundary point to be calculated. If it is lower than the historical elevation value, it is updated until the traversal is completed, and the unique lowest effective elevation of the two-dimensional boundary point to be calculated is determined.

[0007] In a preferred implementation, the step of calculating the interpolated elevation value of the two-dimensional boundary point to be calculated on the corresponding three-dimensional triangle based on the centroid coordinate interpolation algorithm specifically includes: Obtain the two-dimensional coordinates of the two-dimensional boundary point to be calculated on the horizontal projection plane, and the coordinates of the three vertices of the corresponding three-dimensional triangle; Based on the two-dimensional coordinates of the two-dimensional boundary point to be calculated and the coordinates of the three vertices on the horizontal projection plane, the linear combination weight coefficient of the two-dimensional boundary point to be calculated relative to the two-dimensional triangle is solved. The linear combination weight coefficients are used as multipliers and weighted summed with the original elevation values ​​of the three vertices to obtain the interpolated elevation values ​​of the two-dimensional boundary points to be calculated and mapped to the three-dimensional triangle plane. If the vertices of the three-dimensional triangle contain UV attributes, the UV values ​​of the two-dimensional boundary points to be calculated are simultaneously calculated using the linear combination weight coefficient interpolation.

[0008] In a preferred implementation, step S4, which involves filtering the spatial topological relationships of tiles based on the two-dimensional polygon boundaries, specifically includes: Obtain the extreme values ​​of the horizontal coordinates of all triangle vertices within a single tile, and construct a two-dimensional axis-aligned bounding box of the tile on the horizontal projection plane. Determine the inclusion and intersection relationship between the boundary of the two-dimensional polygon and the bounding box aligned with the two-dimensional axis, remove the internal tiles completely contained within the boundary of the two-dimensional polygon, retain the external tiles located outside the boundary of the two-dimensional polygon, and perform the geometric difference operation on the intersecting tiles that have an intersection relationship.

[0009] In a preferred implementation, the division into internal triangles, external triangles, and intersecting triangles; performing a geometric difference operation on the intersecting triangles and the boundary of the two-dimensional polygon to obtain a difference polygon located outside the boundary of the two-dimensional polygon; re-triangulating the difference polygon and mapping it back to three-dimensional space to generate a reconstructed three-dimensional triangle, specifically including: Determine the spatial intersection relationship between the projected triangle and the boundary of the two-dimensional polygon; If a triangle is contained within the boundary of the two-dimensional polygon, it is determined to be an internal triangle and is removed. If a triangle does not intersect and is located outside the boundary of the two-dimensional polygon, it is determined to be an external triangle and is added to the set of external triangles. If a triangle intersects and is not completely contained, it is determined to be an intersecting triangle. A geometric difference operation is performed on the intersecting triangle and the boundary of the two-dimensional polygon to obtain the difference polygon located outside the boundary of the two-dimensional polygon. The difference set polygon is triangulated in two dimensions to generate a new set of two-dimensional triangles. The vertices of the new two-dimensional triangles are mapped back to the plane of the intersecting triangles using a barycentric coordinate interpolation algorithm to generate the reconstructed three-dimensional triangles. The reconstructed three-dimensional triangles are then added to both the clipped triangle set and the outer triangle set.

[0010] In a preferred implementation, step S5, determining the trimmed edge and the corresponding trimmed edge pair, specifically involves the following process: Each edge of the reconstructed 3D triangle in the set of clipped triangles is traversed as a candidate clipped edge, and each 3D line segment in the set of 3D line segments is traversed. If the projections of the two endpoints of the candidate clipped edge onto the horizontal projection plane both fall within the projection line segment of a three-dimensional line segment in the set of three-dimensional line segments onto the horizontal projection plane, then the candidate clipped edge is determined to be a clipped edge, and the three-dimensional line segment is a matching clipped edge, and the two constitute a pair of clipped edges.

[0011] In a preferred implementation, step S5, which involves constructing a lateral stretched mesh connecting the 3D boundary of the BIM model and the clipping boundary of the oblique photogrammetry model, specifically includes the following process: For each pair of cutting edges, accurately locate the two positions on the matching cutting edge where its horizontal projection coincides with the horizontal projection of the two ends of the cut edge, and use them as the start and end points. Discrete sampling is performed on the line segment between the start and end endpoints using a set sampling interval to generate multiple ordered first segmentation points, and multiple corresponding second segmentation points are obtained on the cut edge using the same interpolation ratio. By sequentially selecting two adjacent first dividing points and two corresponding second dividing points to form a vertex group, and using the vertex group to sequentially construct two consecutive connected triangles, the construction of the side stretch mesh is completed by traversing all clipping edge pairs.

[0012] In a preferred implementation, step S6, calculating the texture UV coordinates, specifically includes: Record the cumulative path distance of each edge starting point in the boundary of the two-dimensional polygon relative to the total starting point of the polygon; Project the vertices in the side-extended mesh onto the horizontal projection plane, determine that they fall on the specific edge segment of the two-dimensional polygon boundary, and calculate the cumulative distance of the vertex along the polygon boundary to the total starting point; Obtain the original elevation of the vertex and determine the minimum cumulative distance and maximum elevation of all vertices of the stretched mesh as a reference benchmark; A texture repetition period is set, and the difference between the cumulative distance of each vertex and the minimum cumulative distance is mapped according to the texture repetition period to obtain the U coordinate. The maximum elevation and the elevation difference of each vertex are mapped according to the texture repetition period to obtain the V coordinate.

[0013] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for fusion of the boundaries between a BIM model and an oblique photogrammetry model.

[0014] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the BIM model and oblique photogrammetry model boundary fusion method described above.

[0015] Compared with the prior art, the beneficial effects of the present invention are: (1) This invention extracts the three-dimensional boundary point set of the bottom contour of the BIM model and uses spatial inclusion detection and centroid coordinate interpolation algorithm to accurately select and obtain the "lowest effective elevation" of the BIM model surface. Based on this three-dimensional boundary, the model is trimmed and stretched, which completely solves the bottom elevation deviation problem and achieves high-precision three-dimensional spatial alignment and geometric fit between the two types of models.

[0016] (2) This invention processes each LOD level of the oblique photogrammetry model independently and completely. From the spatial bounding box topology filtering of tiles to the geometric difference operation and remapping at the triangle level, all are completed based on the same set of precise boundary data within each level. This ensures that the boundary fusion area maintains morphological and visual consistency regardless of how the viewpoint is scaled or what level of detail the model is loaded, effectively avoiding abrupt jumps when switching levels.

[0017] (3) This invention breaks through the limitations of traditional simple vertical stretching by matching the projection overlap of the "trimmed edge pairs" and introducing a discrete sampling and mesh reconstruction mechanism with a set spacing. Between the three-dimensional boundary of the BIM model and the boundary of the trimmed inclined model, a continuous and smooth side triangular mesh stretching surface is automatically constructed, which seamlessly bridges the multi-source heterogeneous models in terms of geometric topology and eliminates the seams and holes between models.

[0018] (4) This invention innovatively recalculates and assigns UV texture coordinates based on the cumulative path distance of the vertices of the side-extended mesh along the boundary of the two-dimensional polygon and the relative elevation of the vertices through mathematical mapping. This method enables the stretched surface to obtain a natural and reasonable texture mapping effect, which greatly improves the overall visualization quality and analysis accuracy of the boundary fusion scene. Attached Figure Description

[0019] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0020] Figure 1 This is a flowchart illustrating the boundary fusion method between the BIM model and the oblique photogrammetry model of the present invention. Detailed Implementation

[0021] The present invention will be further described below through specific embodiments, but this is not a limitation of the present invention. Those skilled in the art can make various modifications or improvements based on the basic idea of ​​the present invention, but as long as they do not depart from the basic idea of ​​the present invention, they are all within the protection scope of the present invention.

[0022] See Figure 1 The present invention provides a method for boundary fusion of BIM model and oblique photogrammetry model, comprising the following steps: S1. Analyze the source coordinate system and its multi-detail level structure of the oblique photogrammetry model, extract the target coordinate system of the BIM model, and transform the triangle vertices in the tiles of each detail level in the oblique photogrammetry model from the source coordinate system to the target coordinate system to obtain the oblique photogrammetry model with unified coordinates. Specifically, the oblique photogrammetry model in OSGB format can be read through the OSG library, and its two core data can be parsed and obtained: (1) the total number of LOD levels N of the model (for example, the total LOD level of the oblique photogrammetry model of a certain engineering project is 13); (2) the WKT (Well-Known Text) description of the source coordinate system it uses. At the same time, the WKT description of the target coordinate system of the BIM model is extracted from the original BIM design software. Then, the Transform function of the ProjNet coordinate transformation library is called to perform high-precision coordinate transformation to ensure that the two types of multi-source heterogeneous models are aligned under the same spatial reference, and the output is used as the operation reference for subsequent steps, that is, the oblique photogrammetry model after coordinate unification.

[0023] S2. Mesh the 3D entities of the BIM model to obtain a set of 3D triangles. Orthogonally project the set of 3D triangles onto the horizontal projection plane to generate a set of 2D triangles. Perform polygon union operation on the 2D triangle set to obtain the 2D polygon boundary representing the maximum projection range of the BIM model and its corresponding 2D boundary point set. Specifically, after triangulating the BIM model into a mesh and orthogonally projecting it onto the XY plane in the design software, the NTS (NetTopologySuite) topology algorithm library in the C# environment can be used to call the Union method to perform a planar polygon union operation on the two-dimensional triangle set. The resulting polygon contour vertex set is organized and stored in counterclockwise order to form a precise two-dimensional boundary point set that can be used for subsequent trimming.

[0024] S3. Traverse the two-dimensional boundary point set, combine it with the three-dimensional triangle set of the BIM model, and through spatial inclusion detection and elevation interpolation calculation, filter out the lowest effective elevation corresponding to each two-dimensional boundary point on the surface of the BIM model, and combine multiple lowest effective elevations to generate a three-dimensional boundary point set that reflects the bottom envelope of the BIM model. As a preferred implementation, the lowest effective elevation corresponding to each two-dimensional boundary point on the BIM model surface is selected, specifically including: For any two-dimensional boundary point to be calculated in the set of two-dimensional boundary points, traverse each two-dimensional triangle in the set of two-dimensional triangles and check whether the current two-dimensional triangle contains the two-dimensional boundary point to be calculated. If included, the interpolated elevation values ​​of the two-dimensional boundary points to be calculated on the corresponding three-dimensional triangles are calculated based on the centroid coordinate interpolation algorithm. The newly calculated interpolated elevation value is compared with the historical elevation value currently recorded for the two-dimensional boundary point to be calculated. If it is lower than the historical elevation value, it is updated until the traversal is completed, and the unique lowest effective elevation of the two-dimensional boundary point to be calculated is determined.

[0025] Furthermore, based on the barycentric coordinate interpolation algorithm, the interpolated elevation values ​​of the two-dimensional boundary points to be calculated on the corresponding three-dimensional triangles are calculated, specifically including: Obtain the two-dimensional coordinates of the two-dimensional boundary points to be calculated on the horizontal projection plane. And the coordinates of the three vertices of the corresponding three-dimensional triangle. ; Based on the two-dimensional coordinates of the boundary points to be calculated and the coordinates of the three vertices on the horizontal projection plane, the linear combination weight coefficients of the boundary points relative to the two-dimensional triangle are solved. and ; The linear combination weighting coefficients are used as multipliers, and the original elevation values ​​of the three vertices are summed in weights to obtain the interpolated elevation values ​​of the two-dimensional boundary points mapped to the three-dimensional triangle plane. ; If the vertices of a 3D triangle contain UV attributes, then the UV values ​​of the 2D boundary points to be calculated are simultaneously calculated using linear combination weight coefficient interpolation.

[0026] In specific engineering implementations, its linear combination weighting coefficients and The solution formula is as follows:

[0027]

[0028] in, To ensure the stability of the calculation, it is necessary to ensure If the absolute value of D is less than a preset minimum positive number, then the triangle plane is determined to be approximately perpendicular to the horizontal plane, and the calculation of that plane is skipped.

[0029] Finally, the interpolated elevation value is calculated using the following mapping formula. :

[0030] Meanwhile, if the three vertices of the original 3D triangle have known UV texture coordinates Then, the UV value of the new vertex is calculated using synchronous interpolation with the same linear combination weight coefficients. The calculation formula is:

[0031]

[0032] By combining the coordinates of each two-dimensional point with its final determined minimum effective elevation (and the simultaneously calculated UV value), a three-dimensional boundary point set is generated that is strictly consistent with the original two-dimensional point set in the horizontal projection and reflects the bottom envelope of the BIM model in the vertical dimension. .

[0033] S4. Traverse every detail level and its tiles of the tilted photogrammetry model after coordinate unification, and filter the tiles according to the spatial topological relationship based on the two-dimensional polygon boundary to obtain intersecting tiles with intersecting relationship and external tiles outside the two-dimensional polygon boundary. For intersecting tiles, all triangles are extracted, and all triangles are projected onto the horizontal projection plane in two dimensions to obtain projected triangles. The projected triangles and the boundaries of the two-dimensional polygons are then subjected to two-dimensional spatial topological filtering to divide them into internal triangles, external triangles, and intersecting triangles. Geometric difference operations are performed on the intersecting triangles and the boundaries of the two-dimensional polygons to obtain the difference polygons located outside the boundaries of the two-dimensional polygons. The difference polygons are then retriangulated and mapped back to three-dimensional space to generate reconstructed three-dimensional triangles. The reconstructed three-dimensional triangles are simultaneously included in the clipping triangle set and the external triangle set, and the external triangles are included in the external triangle set. The aforementioned external tiles are saved directly without processing. As a preferred implementation, the tiles are filtered for spatial topological relationships based on the boundaries of two-dimensional polygons, specifically including: Obtain the extreme values ​​of the horizontal coordinates of all triangle vertices within a single tile, and construct a two-dimensional axis-aligned bounding box of the tile on the horizontal projection plane; Determine the inclusion and intersection relationships between the boundary of a 2D polygon and the bounding box aligned with the 2D axis. Remove internal tiles that are completely contained within the boundary of the 2D polygon, retain external tiles located outside the boundary of the 2D polygon, and perform a geometric difference operation on intersecting tiles that have an intersection relationship.

[0034] Further, the triangles are divided into internal triangles, external triangles, and intersecting triangles. A geometric difference operation is performed on the intersecting triangles and the boundary of the 2D polygon to obtain the difference polygon located outside the 2D polygon boundary. This difference polygon is then re-triangulated and mapped back to 3D space to generate a reconstructed 3D triangle. Specifically, this includes: Determine the spatial intersection relationship between the projected triangle and the boundary of the two-dimensional polygon; If a triangle is contained within the boundary of a 2D polygon, it is considered an internal triangle and is removed. If a triangle does not intersect and is located outside the boundary of a 2D polygon, it is considered an external triangle and is added to the external triangle set. If a triangle intersects and is not completely contained, it is considered an intersecting triangle. A geometric difference operation is performed on the intersecting triangle and the boundary of the 2D polygon to obtain the difference polygon located outside the boundary of the 2D polygon. The difference set polygon is triangulated in two dimensions to generate a new set of two-dimensional triangles. The vertices of the new two-dimensional triangles are mapped back to the plane of the intersecting triangles using a barycentric coordinate interpolation algorithm to generate reconstructed three-dimensional triangles. The reconstructed three-dimensional triangles are then added to both the clipping triangle set and the outer triangle set.

[0035] Specifically, iterate through each LOD level i of the oblique photogrammetry model from 1 to N, and then iterate through each tile of that level. Record all vertices within each tile. Maximum value of coordinates and minimum value as well as Maximum coordinates and minimum value This constructs an axis-aligned bounding box rectangle R for the tile in the XY plane. Using the Contains and Intersects functions of the NTS library, the relationship between the 2D polygon boundary and rectangle R is determined. Completely enclosed inner tiles are directly removed, while outer tiles are retained. Further processing is only applied to intersecting tiles.

[0036] For intersecting tiles, extract all their triangles and perform a two-dimensional projection on the XY plane to obtain the projected triangles. Then the projected triangle Two-dimensional spatial topological filtering with the boundary of a two-dimensional polygon: if the projected triangle If a triangle is completely contained within the boundary of a two-dimensional polygon, it is considered an internal triangle and is directly removed; if it is a projected triangle... If a triangle does not intersect the boundary of a 2D polygon and is located outside it, it is determined to be an external triangle, and its corresponding original 3D triangle is directly added to the external triangle set To; if the projected triangle... If a triangle intersects with the boundary of a two-dimensional polygon but is not completely contained within it, it is considered an intersecting triangle.

[0037] For intersecting triangles, the Difference method of the NTS library is called to project the triangles. A geometric difference operation is performed with the boundary of the 2D polygon to obtain the difference polygons located outside the boundary. If the generated Geometry object is of type Polygon, it is directly converted into a list of polygons; if it is of type GeometryCollection, it is converted into a list of multiple Polygons. Then, the resulting list of polygons is traversed, and the Triangulate method of PolygonTriangulator in the NTS library is called to perform 2D triangulation to generate a new set of 2D triangles. Finally, using the barycentric coordinate interpolation algorithm in step S3, the vertices of the new 2D triangles are mapped back to the plane containing the original intersecting triangles to calculate the 3D coordinates and UVs, generating a reconstructed 3D triangle.

[0038] After reconstruction, the generated reconstructed 3D triangles are simultaneously added to both the clipping triangle set CT (used for subsequent steps to extract clipped edges) and the external triangle set To (as the final retained surface mesh). External tiles retained during the tile-level filtering process are not subjected to any deconstruction and are directly saved to maintain their original LOD structure. This step achieves adaptive and precise clipping across LOD levels, avoiding visual jumps during level switching and significantly reducing computational and memory consumption for non-intersecting regions.

[0039] S5. Connect the three-dimensional boundary point set in sequence to construct a three-dimensional line segment set. Extract the edges of each reconstructed three-dimensional triangle in the clipping triangle set as candidate clipping edges. Match the projection overlap of the clipping edges with the three-dimensional line segment set to determine the clipping edges and the corresponding clipping edge pairs. Perform discrete sampling and mesh reconstruction on the clipping edge pairs to construct the side extrusion mesh connecting the three-dimensional boundary of the BIM model and the clipping boundary of the oblique photogrammetry model. In a preferred embodiment, the edge to be cut and the corresponding cut edge pair are determined, and the specific process is as follows: Iterate through each edge of the reconstructed 3D triangle in the clipping triangle set as a candidate clipping edge, and iterate through each 3D line segment in the 3D line segment set. If the projections of the two endpoints of the candidate clipped edge onto the horizontal projection plane both fall within the projection of a three-dimensional line segment in the set of three-dimensional line segments onto the horizontal projection plane, then the candidate clipped edge is determined to be a clipped edge, and the three-dimensional line segment is a matching clipped edge. The two together form a pair of clipped edges.

[0040] Furthermore, in S5, a side-extended mesh is constructed to connect the 3D boundary of the BIM model and the clipping boundary of the oblique photogrammetry model. The specific process is as follows: For each pair of cutting edges, accurately locate the two positions on the matching cutting edge where its horizontal projection coincides with the horizontal projection of the two ends of the cut edge, and use them as the start and end points. Discrete sampling is performed on the line segment between the start and end points using a set sampling interval to generate multiple ordered first segmentation points, and multiple corresponding second segmentation points are obtained on the cut edge using the same interpolation ratio. By sequentially selecting two adjacent first dividing points and their corresponding two second dividing points to form a vertex group, and using the vertex group to construct two consecutive connected triangles, the construction of the side stretch mesh is completed by traversing all clipping edge pairs.

[0041] In a specific engineering implementation, for the candidate trimmed edge With three-dimensional line segments ,like The horizontal projection falls completely on Above the horizontal projection, the cutting edge pair is formed. After a successful match, in Precisely position its projection and Two start and end points whose projections completely coincide and With a preset sampling interval right exist to The segment is discretely sampled to generate An ordered first dividing point (Including start and end points); at the same time, on the edge being cut Obtain the corresponding value by using the same interpolation ratio. The second dividing point Traverse the index From 0 to Select four adjacent points in sequence. , , , Construct a vertex group, and use this vertex group to form triangles respectively. and Construct two consecutive, connected new triangles. After traversing all clipping edge pairs, the resulting set of triangles constitutes the lateral stretched mesh that stitches the boundaries of the two types of models.

[0042] S6. Based on the cumulative path distance of the vertex of the lateral stretched mesh along the boundary of the two-dimensional polygon and the relative elevation of the vertex, calculate the texture UV coordinates to obtain the lateral stretched mesh of the texture mapping; combine the external triangle set with the lateral stretched mesh of the texture mapping and update the corresponding tile of the coordinate-unified oblique photogrammetry model for output.

[0043] As a preferred embodiment, the process of calculating texture UV coordinates includes: Record the cumulative path distance of each edge starting point in the boundary of a two-dimensional polygon relative to the total starting point of the polygon; Project the vertices in the lateral stretched mesh onto the horizontal projection plane, determine which vertices fall on the specific edge segment of the 2D polygon boundary, and calculate the cumulative distance of the vertex along the polygon boundary to the total starting point. Obtain the original elevation of the vertex and determine the minimum cumulative distance and maximum elevation of all vertices of the stretched mesh as a reference benchmark; Set the texture repetition period, map the difference between the cumulative distance and the minimum cumulative distance of each vertex according to the texture repetition period to obtain the U coordinate, and map the maximum elevation and the elevation difference of each vertex according to the texture repetition period to obtain the V coordinate.

[0044] Specifically, calculate the cumulative distance of the vertices along the polygon boundary. Compared with the original elevation Extracting extreme values and Set the desired texture repetition cycle. The mathematical mapping formulas for U-coordinates and V-coordinates are as follows:

[0045]

[0046] Finally, the stretched surface texture byte array is added to the tile texture set, the UV mesh index is bound, and the retained outer triangle set To is integrated and output as a new tile file.

[0047] This embodiment also provides a computer-readable storage medium on which a computer program is stored. The computer-readable storage medium may be a volatile memory (e.g., random access memory RAM) or a non-volatile memory (e.g., read-only memory ROM, flash memory, hard disk, or optical disk).

[0048] In practical engineering applications, when the computer program is executed by a processor, it can implement the boundary fusion method between the BIM model and the oblique photogrammetry model as described in steps S1 to S6 above. Specifically, the processor reads instructions from the storage medium and executes a series of data processing operations, including: unifying the coordinate system, extracting 2D boundaries, generating 3D boundaries, cutting tiles across LOD levels, reconstructing the stretched mesh, and mapping texture UV coordinates. Because the program carried by the storage medium can accurately implement all the logic of the aforementioned method, it can produce the same technical effect as the method, that is, effectively solve the problems of elevation deviation and visual jump in the model fusion process.

[0049] This application also provides an electronic device, which may be a graphics workstation, a server, a desktop computer, or a mobile terminal, etc. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor.

[0050] The memory is used to store computer programs and related data (such as BIM model data, oblique photogrammetry model data, and intermediate result data after conversion); the processor (such as central processing unit CPU, graphics processing unit GPU, etc.) is the computing core of the device, responsible for calling the program instructions in the memory to execute the boundary fusion method between the BIM model and the oblique photogrammetry model.

[0051] During operation, the processor of this electronic device can perform the following functions when executing programs: (1) Call the coordinate transformation algorithm to unify the oblique photogrammetry model and the BIM model to the target coordinate system; (2) Use computational geometry algorithms to extract the two-dimensional polygon boundaries of the BIM model and their corresponding two-dimensional boundary point sets; (3) Based on spatial inclusion detection and centroid coordinate interpolation calculation, a three-dimensional boundary point set reflecting the bottom envelope of the BIM model is generated; (4) Perform geometric difference operations and reconstruction processing on the intersecting tiles of the oblique photography model; (5) Construct a side stretch mesh based on the clipping edge pairs and complete the automatic mapping of texture UV coordinates.

[0052] Through the synergy of the aforementioned hardware and software, this electronic device can efficiently and accurately complete the boundary fusion processing of multi-source heterogeneous models.

[0053] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A method for fusing the boundaries of a BIM model and an oblique photogrammetry model, characterized in that, Includes the following steps: S1. Analyze the source coordinate system and its multi-detail level structure of the oblique photogrammetry model, extract the target coordinate system of the BIM model, and transform the triangle vertices in the tiles of each detail level in the oblique photogrammetry model from the source coordinate system to the target coordinate system to obtain the oblique photogrammetry model with unified coordinates. S2. Mesh the three-dimensional entities of the BIM model to obtain a set of three-dimensional triangles. Orthogonally project the set of three-dimensional triangles onto the horizontal projection plane to generate a set of two-dimensional triangles. Perform polygon union operation on the set of two-dimensional triangles to obtain the two-dimensional polygon boundary representing the maximum projection range of the BIM model and its corresponding two-dimensional boundary point set. S3. Traverse the set of two-dimensional boundary points, combine it with the set of three-dimensional triangles of the BIM model, perform spatial inclusion detection, and perform elevation interpolation calculation based on the centroid coordinate interpolation algorithm to filter out the lowest effective elevation corresponding to each two-dimensional boundary point on the surface of the BIM model. Combine multiple lowest effective elevations to generate a set of three-dimensional boundary points that reflects the bottom envelope of the BIM model. S4. Traverse each detail level and its tiles of the coordinate-unified oblique photogrammetry model, and filter the tiles according to the spatial topological relationship based on the two-dimensional polygon boundary to obtain intersecting tiles with intersecting relationships and external tiles outside the two-dimensional polygon boundary. For the intersecting tiles, all triangles are extracted, and all triangles are projected onto the horizontal projection plane in two dimensions to obtain projected triangles. The projected triangles and the boundaries of the two-dimensional polygons are then subjected to two-dimensional spatial topology filtering to divide them into internal triangles, external triangles, and intersecting triangles. Perform a geometric difference operation on the intersecting triangle and the boundary of the two-dimensional polygon to obtain the difference polygon located outside the boundary of the two-dimensional polygon. Triangulate the difference polygon again and map it back to three-dimensional space to generate a reconstructed three-dimensional triangle. Simultaneously classify the reconstructed three-dimensional triangle into the clipping triangle set and the outer triangle set, and classify the outer triangle into the outer triangle set. The outer tiles are directly retained. S5. Sequentially connect the three-dimensional boundary point set to construct a three-dimensional line segment set, extract the edges of each reconstructed three-dimensional triangle in the clipping triangle set as candidate clipping edges, match the projection overlap of the candidate clipping edges with the three-dimensional line segment set to determine the clipping edges and the corresponding clipping edge pairs; perform discrete sampling and mesh reconstruction on the clipping edge pairs to construct a side extruded mesh connecting the three-dimensional boundary of the BIM model and the clipping boundary of the oblique photogrammetry model; S6. Based on the cumulative path distance of the vertex of the side-stretched mesh along the boundary of the two-dimensional polygon and the relative elevation of the vertex, calculate the texture UV coordinates to obtain the side-stretched mesh of the texture mapping; combine the external triangle set with the side-stretched mesh of the texture mapping and update the corresponding tile of the coordinate-unified oblique photogrammetry model for output.

2. The method for fusion of BIM model and oblique photogrammetry model boundaries according to claim 1, characterized in that, In step S3, the filtering process to obtain the lowest effective elevation corresponding to each two-dimensional boundary point on the BIM model surface specifically includes: For any two-dimensional boundary point to be calculated in the set of two-dimensional boundary points, traverse each two-dimensional triangle in the set of two-dimensional triangles and check whether the current two-dimensional triangle contains the two-dimensional boundary point to be calculated. If included, the interpolated elevation values ​​of the two-dimensional boundary points to be calculated on the corresponding three-dimensional triangles are calculated based on the centroid coordinate interpolation algorithm. The newly calculated interpolated elevation value is compared with the historical elevation value currently recorded for the two-dimensional boundary point to be calculated. If it is lower than the historical elevation value, it is updated until the traversal is completed, and the unique lowest effective elevation of the two-dimensional boundary point to be calculated is determined.

3. The method for fusion of BIM model and oblique photogrammetry model boundaries according to claim 2, characterized in that, The centroid coordinate interpolation algorithm calculates the interpolated elevation values ​​of the two-dimensional boundary points on the corresponding three-dimensional triangles, specifically including: Obtain the two-dimensional coordinates of the two-dimensional boundary point to be calculated on the horizontal projection plane, and the coordinates of the three vertices of the corresponding three-dimensional triangle; Based on the two-dimensional coordinates of the two-dimensional boundary point to be calculated and the coordinates of the three vertices on the horizontal projection plane, the linear combination weight coefficient of the two-dimensional boundary point to be calculated relative to the two-dimensional triangle is solved. The linear combination weight coefficients are used as multipliers and weighted summed with the original elevation values ​​of the three vertices to obtain the interpolated elevation values ​​of the two-dimensional boundary points to be calculated and mapped to the three-dimensional triangle plane. If the vertices of the three-dimensional triangle contain UV attributes, the UV values ​​of the two-dimensional boundary points to be calculated are simultaneously calculated using the linear combination weight coefficient interpolation.

4. The method for fusion of BIM model and oblique photogrammetry model boundaries according to claim 1, characterized in that, The spatial topological relationship filtering of tiles based on the two-dimensional polygon boundary in step S4 specifically includes: Obtain the extreme values ​​of the horizontal coordinates of all triangle vertices within a single tile, and construct a two-dimensional axis-aligned bounding box of the tile on the horizontal projection plane. Determine the inclusion and intersection relationship between the boundary of the two-dimensional polygon and the bounding box aligned with the two-dimensional axis, remove the internal tiles completely contained within the boundary of the two-dimensional polygon, retain the external tiles located outside the boundary of the two-dimensional polygon, and perform the geometric difference operation on the intersecting tiles that have an intersection relationship.

5. The method for fusion of BIM model and oblique photogrammetry model boundaries according to claim 1, characterized in that, The division is into internal triangles, external triangles, and intersecting triangles; a geometric difference operation is performed on the intersecting triangles and the boundary of the two-dimensional polygon to obtain the difference polygon located outside the boundary of the two-dimensional polygon; the difference polygon is then re-triangulated and mapped back to three-dimensional space to generate a reconstructed three-dimensional triangle, specifically including: Determine the spatial intersection relationship between the projected triangle and the boundary of the two-dimensional polygon; If a triangle is contained within the boundary of the two-dimensional polygon, it is determined to be an internal triangle and is removed. If a triangle does not intersect and is located outside the boundary of the two-dimensional polygon, it is determined to be an external triangle and is added to the set of external triangles. If a triangle intersects and is not completely contained, it is determined to be an intersecting triangle. A geometric difference operation is performed on the intersecting triangle and the boundary of the two-dimensional polygon to obtain the difference polygon located outside the boundary of the two-dimensional polygon. The difference set polygon is triangulated in two dimensions to generate a new set of two-dimensional triangles. The vertices of the new two-dimensional triangles are mapped back to the plane of the intersecting triangles using a barycentric coordinate interpolation algorithm to generate the reconstructed three-dimensional triangles. The reconstructed three-dimensional triangles are then added to both the clipped triangle set and the outer triangle set.

6. The method for fusion of BIM model and oblique photogrammetry model boundaries according to claim 1, characterized in that, In step S5, the specific process of determining the cut edge and the corresponding cut edge pair is as follows: Each edge of the reconstructed 3D triangle in the set of clipped triangles is traversed as a candidate clipped edge, and each 3D line segment in the set of 3D line segments is traversed. If the projections of the two endpoints of the candidate clipped edge onto the horizontal projection plane both fall within the projection line segment of a three-dimensional line segment in the set of three-dimensional line segments onto the horizontal projection plane, then the candidate clipped edge is determined to be a clipped edge, and the three-dimensional line segment is a matching clipped edge, and the two constitute a pair of clipped edges.

7. The method for fusion of BIM model and oblique photogrammetry model boundaries according to claim 6, characterized in that, In step S5, the specific process of constructing the lateral stretched mesh connecting the 3D boundary of the BIM model and the clipping boundary of the oblique photogrammetry model is as follows: For each pair of cutting edges, accurately locate the two positions on the matching cutting edge where its horizontal projection coincides with the horizontal projection of the two ends of the cut edge, and use them as the start and end points. Discrete sampling is performed on the line segment between the start and end endpoints using a set sampling interval to generate multiple ordered first segmentation points, and multiple corresponding second segmentation points are obtained on the cut edge using the same interpolation ratio. By sequentially selecting two adjacent first dividing points and two corresponding second dividing points to form a vertex group, and using the vertex group to sequentially construct two consecutive connected triangles, the construction of the side stretch mesh is completed by traversing all clipping edge pairs.

8. The method for fusion of BIM model and oblique photogrammetry model boundaries according to claim 1, characterized in that, In step S6, the specific process of calculating texture UV coordinates includes: Record the cumulative path distance of each edge starting point in the boundary of the two-dimensional polygon relative to the total starting point of the polygon; Project the vertices in the side-extended mesh onto the horizontal projection plane, determine that they fall on the specific edge segment of the two-dimensional polygon boundary, and calculate the cumulative distance of the vertex along the polygon boundary to the total starting point; Obtain the original elevation of the vertex and determine the minimum cumulative distance and maximum elevation of all vertices of the stretched mesh as a reference benchmark; A texture repetition period is set, and the difference between the cumulative distance of each vertex and the minimum cumulative distance is mapped according to the texture repetition period to obtain the U coordinate. The maximum elevation and the elevation difference of each vertex are mapped according to the texture repetition period to obtain the V coordinate.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the boundary fusion method of BIM model and oblique photogrammetry model as described in any one of claims 1 to 8.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the boundary fusion method between the BIM model and the oblique photogrammetry model as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • GIS three-dimensional terrain and digital information model fusion method and system

    CN117333648A

  • Multi-source GIS data fusion and three-dimensional terrain construction method based on stream mode

    CN120953535A