Model fusion method, device, electronic device and readable storage medium
By obtaining the cutting area of the target BIM model and the real scene model, constructing the stretched body model and cutting based on the boundary of the topographic surface model, the problem of time-consuming and unsatisfactory model fusion in the existing technology is solved, and the automatic seamless fusion of the BIM model and the real scene model is achieved, saving labor costs and time.
Patent Information
- Application Number
- CN202110512003.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-11
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2041-05-11
AI Technical Summary
The existing model fusion method takes a long time operation and is not ideal. Web-side operations cannot export model data changes, and desktop-side operations rely on manual experience to easily lead to the problem of insufficient model fit.
By obtaining the cropping area of the target BIM model and the real scene model, the stretched body model is constructed and the boundary cutting of the terrain surface model is achieved, and the automatic seamless fusion of the BIM model and the real scene model is achieved, and the separation calculation of the target terrain surface model and the real scene model is used for Boolean operations.
It realizes automatic and seamless integration of BIM model and real-life model, saves labor costs, reduces synthesis time, ensures the mold clamping effect, and avoids dependence on operators.
Smart Images

Figure CN115330662B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of BIM model adjustment, and in particular to a model fusion method, device, electronic device and readable storage medium. Background Art
[0002] At every stage of construction engineering, the integration of multi-source, heterogeneous models can provide a vivid, intuitive visual experience and decision-making basis across multiple dimensions, including planning and design, demolition quantification, earthwork calculations, spatial decision analysis, reporting, and observation. The integration of heterogeneous models can provide information data from different dimensions, especially when combined with real-world models and BIM. This provides a strong three-dimensional visual experience, enabling more accurate judgments based on diverse professional backgrounds.
[0003] There are two main mainstream approaches at this stage: one is to temporarily adjust the mesh vertices of a local area to a plane on the display layer of the web to create a flattening or excavation effect, or to directly delete the vertices of the area in the cache to form an opening, and then place the BIM model; the other is to use the model editing capabilities of tools such as 3ds Max and Geomagic on the desktop to complete the model fusion through model modification, importing the model, manually adding boundary lines, adjusting mesh vertices, manual bridging, and bug repair. However, the operation on the web side is only to adjust the position of the existing vertices on the display layer. The model data itself has not changed, and the edited model cannot be exported for later design and processing; the operation on the desktop side requires manual format conversion using multiple modeling software. The effect of the mold closing depends on the operator's experience, which is prone to problems with the model not fitting tightly. Therefore, the current model fusion method has problems such as time-consuming operation and unsatisfactory mold closing effect. Summary of the Invention
[0004] In view of this, an embodiment of the present invention provides a model fusion method to solve the problem that the mold closing operation is time-consuming and has unsatisfactory effects.
[0005] According to a first aspect, an embodiment of the present invention provides a model fusion method, including: obtaining a target BIM model and a target real-scene model corresponding to a three-dimensional real-scene image, wherein the target real-scene model has a target cropping area corresponding to the target BIM model; constructing a stretched body model based on the target BIM model; determining a target terrain surface model corresponding to the target real-scene model based on the characteristics of the target real-scene model; cropping the stretched body model based on the boundary of the target terrain surface model to obtain a target stretched body model; superimposing the target BIM model and the target stretched body model on the target real-scene model including the target cropping area to obtain a fusion model of the target real-scene model and the target BIM model.
[0006] The model fusion method provided by the embodiment of the present invention obtains a target real-life model and a target BIM model, and has a target clipping area corresponding to the target BIM model in the target real-life model, constructs a stretched body model based on the target BIM model, and generates a target terrain surface model based on the characteristics of the target real-life model, clips the stretched body model using the boundary of the target terrain surface model to obtain a target stretched body model, and then superimposes the target BIM model and the target stretched body model in the target clipping area, thereby forming a fusion model of the target real-life model and the target BIM model. This method does not require the model editing capabilities of other tools, and ensures the positional fusion of the target stretched body model and the target real-life model through separate calculations of the target terrain surface model and the target real-life model. Finally, the separated calculation results are superimposed, thereby achieving automatic and seamless fusion of the target real-life model and the target BIM model, avoiding reliance on operators, saving labor costs, reducing synthesis time, and ensuring the mold-matching effect.
[0007] In combination with the first aspect, in a first embodiment of the first aspect, the stretching body model is clipped based on the boundary of the target terrain surface model to obtain the target stretching body model, including: obtaining the terrain area corresponding to the target terrain surface model; determining the boundary corresponding to the target terrain surface model based on the terrain area; and performing a Boolean operation on the boundary of the target terrain surface model and the stretching body model to obtain the target stretching body model after the stretching body model is clipped.
[0008] In combination with the first embodiment of the first aspect, in the second embodiment of the first aspect, determining the boundary corresponding to the target terrain surface model based on the terrain area includes: extracting terrain point cloud data corresponding to the terrain area; calculating the boundary corresponding to the terrain point cloud data based on the terrain point cloud data, and using the boundary corresponding to the terrain point cloud data as the boundary corresponding to the target terrain surface model.
[0009] The model fusion method provided by the embodiment of the present invention obtains the terrain area corresponding to the target terrain surface model, extracts the terrain point cloud data corresponding to the terrain area, calculates the boundary corresponding to the terrain point cloud data based on the terrain point cloud data, uses the boundary corresponding to the terrain point cloud data as the boundary corresponding to the target terrain surface model, combines the boundary of the target terrain surface model with the stretched body model to perform Boolean operations, and obtains the target stretched body model after the stretched body model is trimmed. Compared with the current real-scene surface models that are all generated by the graph cut method, the model contains a large number of self-intersections, discrete isolated patches, and even non-popular patches. The mesh quality cannot be directly used for Boolean operations, and manual interactive parameter adjustment is required to repair the mesh quality and eliminate the influence of low-quality patches, making it difficult to ensure the normal operation of the automated processing flow. This method uses the target terrain surface model instead of the real-scene surface model to complete the Boolean operation, and then superimposes the result on the target real-scene model, thereby achieving the Boolean operation effect with the real-scene model, without the need for manual interactive parameter adjustment, and ensuring the automated processing flow.
[0010] In combination with the first aspect, in a third embodiment of the first aspect, determining the target terrain surface model corresponding to the target real scene model based on the characteristics of the target real scene model includes: obtaining feature data of the three-dimensional real scene image, the feature data being used for terrain grid model reconstruction; based on the target real scene model, marking the target cropping area from the three-dimensional real scene image; extracting target point cloud data corresponding to the target cropping area and the point cloud data boundary corresponding to the target point cloud data from the feature data; filtering the target point cloud data to obtain terrain point cloud data; constructing the terrain surface model based on the terrain point cloud data; and cropping the terrain surface model based on the point cloud data boundary to obtain the target terrain surface model.
[0011] The model fusion method provided by an embodiment of the present invention obtains feature data from a 3D real-world image, plots the terrain region to be cropped from the 3D real-world image, and extracts target point cloud data and the point cloud data boundary corresponding to the terrain region to be cropped from the feature data. The feature data is used to reconstruct a terrain mesh model. The target point cloud data is filtered to obtain terrain point cloud data, and a terrain surface model is constructed based on the terrain point cloud data. The terrain surface model is cropped based on the point cloud data boundary to obtain a target terrain surface model. This method ensures mesh surface quality by separating the terrain point cloud data and reconstructing the terrain surface model. The terrain surface model is then cropped to obtain a target terrain surface model, ensuring that the target terrain surface model can replace the real-world surface model for Boolean operations.
[0012] In combination with the first aspect, in a fourth embodiment of the first aspect, obtaining the corresponding three-dimensional real-scene image includes: obtaining a real-scene model corresponding to the three-dimensional real-scene image; extracting the closed boundary of the target BIM model to determine the target cropping area of the real-scene model; cropping the real-scene model based on the target cropping area to obtain a target real-scene model, wherein the target real-scene model includes a target cropping model corresponding to the target cropping area.
[0013] In combination with the fourth embodiment of the first aspect, in the fifth embodiment of the first aspect, the extracting of the closed boundary of the target BIM model and determining the target cropping area of the real-scene model include: obtaining the model point cloud data corresponding to the target BIM model; extracting the model point cloud boundary corresponding to the model point cloud data, the model point cloud boundary including multiple straight line segments; fitting the model point cloud boundary, deleting redundant straight line segments, and obtaining a closed boundary corresponding to the model point cloud boundary; comparing the closed boundary with the real-scene model to determine that the closed boundary corresponds to the target cropping area of the real-scene model.
[0014] The model fusion method provided by an embodiment of the present invention obtains a real-life model corresponding to a three-dimensional real-life image and model point cloud data corresponding to a target BIM model, extracts the model point cloud boundary corresponding to the model point cloud data, performs fitting processing on the model point cloud boundary, deletes redundant straight line segments, obtains a closed boundary corresponding to the model point cloud boundary, determines that the closed boundary corresponds to a target cropping region of the real-life model, and crops the real-life model based on the target cropping region to obtain the target real-life model. The method crops and opens holes in the real-life model to obtain the target real-life model, and finally superimposes the target BIM model and the target extruded body model onto the target real-life model, thereby automatically and seamlessly merging the target real-life model with the target BIM model to meet display and measurement requirements.
[0015] In combination with the first aspect, in a sixth embodiment of the first aspect, constructing a stretched body model based on the target BIM model includes: obtaining a minimum tight bounding box corresponding to the target BIM model; determining the lower bottom surface position of the stretched body based on size information of the minimum tight bounding box; and constructing a stretched body model corresponding to the target BIM model based on the lower bottom surface position.
[0016] The model fusion method provided by an embodiment of the present invention obtains the minimum tight bounding box corresponding to the target BIM model, determines the lower bottom surface position of the stretched body based on the size information of the minimum tight bounding box, constructs a stretched body model corresponding to the target BIM model based on the lower bottom surface position, and obtains a three-dimensional body corresponding to the target BIM model, so as to realize the fusion of the target real scene model and the target BIM model.
[0017] According to the second aspect, an embodiment of the present invention provides a model fusion device, including: an acquisition module for a target BIM model and a target real-scene model corresponding to a three-dimensional real-scene image, wherein the target real-scene model has a target cropping area corresponding to the target BIM model; a construction module for constructing a stretched body model based on the target BIM model; a determination module for determining a target terrain surface model corresponding to the target real-scene model based on the characteristics of the target real-scene model; a cropping module for cropping the stretched body model based on the boundary of the target terrain surface model to obtain a target stretched body model; a fusion module for superimposing the target BIM model and the target stretched body model on the target real-scene model containing the target cropping area to obtain a fusion model of the target real-scene model and the target BIM model.
[0018] The model fusion device provided by the embodiment of the present invention obtains a target real-life model and a target BIM model, and has a target cropping area corresponding to the target BIM model in the target real-life model. At the same time, a stretched body model is constructed based on the target BIM model, and a target terrain surface model is generated based on the characteristics of the target real-life model. The stretched body model is cropped using the boundary of the target terrain surface model to obtain a target stretched body model, and then the target BIM model and the target stretched body model are superimposed and placed in the target cropping area, thereby forming a fusion model of the target real-life model and the target BIM model. This device does not require the model editing capabilities of other tools. By separately calculating the target terrain surface model and the target real-life model, it ensures the positional fusion of the target stretched body model and the target real-life model. Finally, the separated calculation results are superimposed, thereby achieving automatic and seamless fusion of the target real-life model and the target BIM model, avoiding reliance on operators, saving labor costs, reducing synthesis time, and ensuring the mold-matching effect.
[0019] According to the third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the model fusion method described in the first aspect or any embodiment of the first aspect by executing the computer instructions.
[0020] According to the fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the model fusion method described in the first aspect or any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 is a flow chart of a model fusion method according to an embodiment of the present invention;
[0023] Figure 2 is another flow chart of a method for fusing models according to an embodiment of the present invention;
[0024] Figure 3 is another flow chart of a method for fusing models according to an embodiment of the present invention;
[0025] Figure 4 is another flow chart of a method for fusing models according to an embodiment of the present invention;
[0026] Figure 5 is a structural block diagram of a model fusion device according to an embodiment of the present invention;
[0027] Figure 6 It is a schematic diagram of the hardware structure of the electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0029] There are two common approaches to combining existing real-world models with BIM: First, temporarily adjusting the mesh vertices of a local area to a plane on the web display layer to create a flattened or excavated effect, or directly deleting the vertices in the cache to create an opening before placing the BIM model. Second, using the model editing capabilities of tools like 3ds Max and Geomagic on the desktop, the model is integrated by importing the model through model modification, manually adding boundary lines, adjusting mesh vertices, manually bridging, and fixing bugs. However, the web-based operation only adjusts the position of existing vertices on the display layer; the model data itself remains unchanged, and the edited model cannot be exported for later design and processing. Desktop-based operations require manual format conversion using multiple modeling software programs. The effectiveness of the combined model depends on the operator's experience, which can easily lead to problems with loose fit.
[0030] Based on this, the technical solution of the present invention calculates the fusion position of the target stretching body model and the target real-scene model corresponding to the BIM model through separate calculations of the target terrain surface model and the target real-scene model, and finally superimposes the separate calculation results, thereby realizing the automatic seamless fusion of the target real-scene model and the BIM model without relying on operators, saving labor costs, reducing synthesis time, and ensuring the mold closing effect.
[0031] According to an embodiment of the present invention, an embodiment of a model fusion method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] In this embodiment, a model fusion method is provided, which can be used in electronic devices such as mobile phones, computers, tablet computers, etc. Figure 1 is a flow chart of a method for fusing models according to an embodiment of the present invention, such as Figure 1 As shown, the process includes the following steps:
[0033] S11 , obtaining a target BIM model and a target real-scene model corresponding to the three-dimensional real-scene image, wherein the target real-scene model has a target cropping area corresponding to the target BIM model.
[0034] The three-dimensional real-scene image is a photo or video reflecting the real scene collected by different acquisition devices. The target real-scene model is a three-dimensional model (such as obj, osgb format) reflecting the real scene generated from multiple photos, videos, or laser scanning point cloud data from different sources, wherein the target real-scene model contains a target cropping area corresponding to the BIM model. The target BIM model is BIM model data generated by a CAD modeling tool (3Dmax, BIMMAKE and other modeling software). The electronic device can compare the generated BIM model data with the target real-scene model, automatically correct the position of the target BIM model and the position of the target real-scene model, and output the target BIM model with position correction. The real-scene model corresponding to the three-dimensional real-scene image is cropped based on the closed boundary of the target BIM model to obtain a cropped real-scene model, that is, a target real-scene model containing a target cropping area.
[0035] S12, constructing a tensile body model based on the target BIM model.
[0036] The stretched body model is the three-dimensional body corresponding to the target BIM model. After acquiring the target BIM model, the electronic device can extract the closed boundary of the target BIM model, determine the corresponding bounding box based on the closed boundary of the target BIM model, calculate the bottom surface position of the bounding box, and use the stretching algorithm to construct the stretched body model corresponding to the target BIM model.
[0037] S13: Determine a target terrain surface model corresponding to the target real scene model based on the characteristics of the target real scene model.
[0038] The target terrain surface model is a terrain surface model within the region of interest obtained through a mesh model polygon clipping algorithm. Specifically, feature data corresponding to the 3D real-world image is extracted, from which the terrain region to be clipped corresponding to the target real-world model is plotted. Point cloud data corresponding to the terrain region to be clipped is then extracted from the feature data. The terrain surface model is then reconstructed using the Poisson algorithm. The terrain surface model is clipped along the boundaries corresponding to the point cloud data to obtain the target terrain surface model corresponding to the target real-world model.
[0039] S14, clipping the stretched body model based on the boundary of the target terrain surface model to obtain a target stretched body model.
[0040] Based on the grid model Boolean operation algorithm, Boolean operations are performed on the target terrain surface model and the stretched body model to obtain a stretched body model clipped by the boundary of the target terrain surface model, namely the target stretched body model. The target stretched body model is the underground model corresponding to the target real scene model.
[0041] S15 , superimposing the target BIM model and the target stretched body model on the target real scene model including the target cropping area to obtain a fusion model of the target real scene model and the target BIM model.
[0042] The fused model is a composite of BIM model data of varying formats, types, and features, generated using various acquisition devices (such as high-definition cameras and laser scanners) and CAD modeling tools (such as 3D Max and BIMMAKE). The target BIM model, the target extruded model, and the target real-world model are superimposed and fused to create the fused model.
[0043] The model fusion method provided in this embodiment obtains a target real-life model and a target BIM model, and has a target cropping area corresponding to the target BIM model in the target real-life model. At the same time, a stretched body model is constructed based on the target BIM model, and a target terrain surface model is generated based on the characteristics of the target real-life model. The stretched body model is cropped using the boundary of the target terrain surface model to obtain a target stretched body model, and then the target BIM model and the target stretched body model are superimposed and placed in the target cropping area, thereby forming a fusion model of the target real-life model and the target BIM model. This method does not require the model editing capabilities of other tools. By separately calculating the target terrain surface model and the target real-life model, the positional fusion of the target stretched body model and the target real-life model is ensured. Finally, the separated calculation results are superimposed, thereby achieving automatic and seamless fusion of the target real-life model and the target BIM model, avoiding reliance on operators, saving labor costs, reducing synthesis time, and ensuring the mold-matching effect.
[0044] In this embodiment, a model fusion method is provided, which can be used in electronic devices such as mobile phones, computers, tablet computers, etc. Figure 2 is a flow chart of a method for fusing models according to an embodiment of the present invention, such as Figure 2 As shown, the process includes the following steps:
[0045] S21, obtaining a target BIM model and a target real-scene model corresponding to the 3D real-scene image, wherein the target real-scene model has a target cropping area corresponding to the target BIM model. Detailed descriptions refer to the corresponding description of step S11 in the above embodiment, which will not be repeated here.
[0046] S22: Constructing a stretching body model based on the BIM model. Detailed descriptions refer to the corresponding step S12 in the above embodiment, which will not be repeated here.
[0047] S23 , determining a target terrain surface model corresponding to the target real scene model based on the characteristics of the target real scene model.
[0048] Specifically, the above step S23 may include the following steps:
[0049] S231, acquiring feature data of a three-dimensional real scene image, wherein the feature data is used for reconstructing a terrain grid model.
[0050] Feature data is data reflecting the characteristics of the 3D real-scene image and is used to reconstruct the terrain mesh model. The feature data can be point cloud data. The electronic device can extract the point cloud data used to reconstruct the real-scene model from the 3D real-scene image to complete the reconstruction of the real-scene model.
[0051] S232: Mark out a target cropping area from the three-dimensional real scene image based on the target real scene model.
[0052] The target cropping region is the area that needs to be cropped from the real-world model. By plotting the terrain region, the reconstruction range of the target terrain surface model corresponding to the target real-world model can be limited. Because the target real-world model contains the target cropping region corresponding to the target BIM model, the constructed target terrain surface model must coincide with the position of the target cropping region. Therefore, when constructing the target terrain surface model, it is necessary to plot the terrain region to be cropped from the 3D real-world image.
[0053] S233 , extracting target point cloud data corresponding to the target cropping area and a point cloud data boundary corresponding to the target point cloud data from the feature data.
[0054] The target point cloud data is the point cloud data of the area of interest, that is, the point cloud data corresponding to the terrain area to be cropped, and the convex hull algorithm is used to obtain the point cloud data boundary corresponding to the target point cloud data, that is, the contour boundary of the target point cloud data.
[0055] S234: Filter the target point cloud data to obtain terrain point cloud data.
[0056] The target point cloud data is filtered by the Cloth Simulation Filter (CSF) algorithm to filter out terrain point cloud (ground point cloud) data and non-terrain point cloud (ground object point cloud) data.
[0057] S235, constructing a terrain surface model based on the terrain point cloud data.
[0058] The Poisson algorithm is used to reconstruct the terrain surface model of the terrain point cloud data to obtain the terrain surface model. The terrain point cloud data separated by the CSF algorithm is then reconstructed using the Poisson algorithm to ensure the mesh surface quality.
[0059] S236 , clipping the terrain surface model based on the point cloud data boundary to obtain a target terrain surface model.
[0060] The obtained terrain surface model is clipped according to the boundary of the point cloud data using the grid model polygon clipping algorithm to obtain the terrain surface model inside the area of interest, that is, the target terrain surface model corresponding to the target clipping area.
[0061] S24, clipping the stretched body model based on the boundary of the target terrain surface model to obtain a target stretched body model.
[0062] Specifically, the above step S24 may include the following steps:
[0063] S241: Obtain a terrain area corresponding to the target terrain surface model.
[0064] After obtaining the target terrain surface model, the terrain area corresponding to the target terrain surface model can be determined.
[0065] S242: Determine a boundary corresponding to the target terrain surface model based on the terrain area.
[0066] Specifically, the above step S242 includes the following steps:
[0067] (1) Extract terrain point cloud data corresponding to the terrain area.
[0068] The terrain point cloud data is a dense point cloud of the terrain area corresponding to the target terrain surface model. The electronic device can extract the terrain point cloud data corresponding to the terrain area from the terrain area corresponding to the target terrain surface model.
[0069] (2) Calculating the boundary corresponding to the terrain point cloud data based on the terrain point cloud data, and using the boundary corresponding to the terrain point cloud data as the boundary corresponding to the target terrain surface model.
[0070] The convex hull algorithm is used to calculate the contour boundary of the terrain point cloud data. The boundary of the terrain point cloud data is the boundary of the target terrain surface model.
[0071] S243 , performing a Boolean operation on the boundary of the target terrain surface model and the stretched body model to obtain a target stretched body model after the stretched body model is trimmed.
[0072] The grid model Boolean operation algorithm is used to perform Boolean operations on the target terrain surface model and the stretched body model to obtain the target stretched body model (the underground model corresponding to the target real scene model) clipped by the boundary of the target terrain surface model.
[0073] The target's web-based processing or modeling process using third-party software always considers the real-life model and underground model as a single mesh model. The vertices of the separated meshes are linked by moving the mesh vertices in the selected area or performing bridging operations. This leads to uneven layering and voids during the later LOD processing of the model, requiring manual optimization of the mesh quality and adding a lot of additional work. This method separates the real-life model and underground model to avoid problems caused by LOD processing. This ensures that the mesh quality of the real-life model is not affected, and the target extruded model (underground model) can be determined through Boolean operations. While ensuring that the cropped portions of the extruded model match the cropped portions of the real-life model, the number of mesh faces is minimized.
[0074] S25, superimposing the target BIM model and the target stretched body model on the target real scene model including the target cropping area to obtain a fusion model of the target real scene model and the target BIM model. Detailed descriptions refer to the corresponding description of step S15 in the above embodiment, which will not be repeated here.
[0075] Compared to the current real-life surface models that are all generated through the graph cut method, the models contain a large number of self-intersections, discrete isolated patches, and even non-popular patches. The mesh quality cannot be directly used for Boolean operations, and manual interaction and parameter adjustment are required to repair the mesh quality and eliminate the impact of low-quality patches, making it difficult to ensure the normal operation of the automated processing flow. The model fusion method provided in this embodiment can ensure the mesh surface quality by separating the terrain point cloud data and reconstructing the terrain surface model. At the same time, the terrain surface model is cropped to obtain the target terrain surface model. The target terrain surface model is used instead of the real-life surface model to complete the Boolean operation, and the result is then superimposed on the target real-life model, thereby achieving the Boolean operation effect with the real-life model. No manual interaction and parameter adjustment are required, ensuring the automated processing flow.
[0076] In this embodiment, a model fusion method is provided, which can be used in electronic devices such as mobile phones, computers, tablet computers, etc. Figure 3 is a flow chart of a method for fusing models according to an embodiment of the present invention, such as Figure 3 As shown, the process includes the following steps:
[0077] S31 , obtaining a target BIM model and a target real-scene model corresponding to the three-dimensional real-scene image, wherein the target real-scene model has a target cropping area corresponding to the BIM model.
[0078] Specifically, the above step S31 may include the following steps:
[0079] S310: Obtain a target BIM model. Detailed instructions for obtaining the target BIM model refer to the corresponding descriptions of the above embodiments, which will not be repeated here.
[0080] S311, obtaining a real scene model corresponding to the three-dimensional real scene image.
[0081] A reality model is a 3D representation of a real scene, generated from data such as multiple photos, videos, or laser scanned point clouds from different sources. 3D images of the real scene are captured using acquisition devices like high-definition cameras or laser scanners. Electronic devices then extract features from the 3D images to construct the reality model.
[0082] S312: Extract the closed boundary of the target BIM model and determine the target cropping area of the real-scene model.
[0083] The closed boundary of the target BIM model is the outline boundary of the target BIM model, that is, a closed polygon. The target real-life model can be obtained by clipping the real-life model using this closed polygon. The area of the real-life model corresponding to the closed polygon is the target clipping area.
[0084] Specifically, the above step S312 includes the following steps:
[0085] (1) Obtain the model point cloud data corresponding to the target BIM model.
[0086] After obtaining the target BIM model, the electronic device can extract model point cloud data corresponding to the target BIM model to determine the contour boundary of the target BIM model.
[0087] (2) Extracting the model point cloud boundary corresponding to the model point cloud data, wherein the model point cloud boundary includes multiple straight line segments.
[0088] The target BIM model is obtained by discretizing its corresponding point cloud model, and the model point cloud boundary corresponding to the model point cloud data is calculated using the convex hull algorithm, wherein the model point cloud boundary contains multiple tiny straight line segments.
[0089] (3) Fit the boundary of the model point cloud, delete the redundant straight line segments, and obtain the closed boundary corresponding to the boundary of the model point cloud.
[0090] A straight line fitting algorithm is used to fit multiple tiny straight line segments contained in the model point cloud boundary. By deleting redundant straight line segments, multiple straight line segments can be obtained to form a closed polygon, that is, the closed boundary corresponding to the model point cloud boundary.
[0091] (4) Compare the closed boundary and the real scene model to determine that the closed boundary corresponds to the target cropping area of the real scene model.
[0092] By combining the closed boundary of the target BIM model with the real scene model, it can be determined that the closed boundary of the target BIM model corresponds to the target cropping area in the real scene model.
[0093] S313 , cropping the real scene model based on the target cropping area to obtain a target real scene model, wherein the target real scene model includes a target cropping model corresponding to the target cropping area.
[0094] The mesh model polygon clipping algorithm is used to perform a clipping (excavation) operation on the real scene model according to the target clipping area corresponding to the closed boundary of the target BIM model to obtain a clipped target real scene model.
[0095] S32: constructing a tensile body model based on the target BIM model.
[0096] Specifically, the above step S32 may include the following steps:
[0097] S321, obtaining the minimum tight bounding box corresponding to the target BIM model.
[0098] The bounding box algorithm is used to calculate the minimum tight bounding box that is close to the BIM model.
[0099] S322: Determine the position of the lower surface of the stretched body based on the size information of the minimum tight bounding box.
[0100] After obtaining the minimum tight bounding box, the size information of the minimum tight bounding box is calculated to determine the lower bottom surface position of the minimum tight bounding box, which is the lower bottom surface position of the constructed stretched body.
[0101] S323: Based on the lower bottom surface position, construct a stretching body model corresponding to the target BIM model.
[0102] A stretching algorithm is used to perform stretching processing according to the minimum tight bounding box to obtain a three-dimensional model corresponding to the target BIM model, that is, a stretched model corresponding to the target BIM model.
[0103] S33: Determine the target terrain surface model corresponding to the target real scene model based on the characteristics of the target real scene model. Detailed descriptions refer to the description of step S23 in the above embodiment, which will not be repeated here.
[0104] S34, clipping the stretched body model based on the boundary of the target terrain surface model to obtain the target stretched body model. Detailed descriptions refer to the corresponding step S24 in the above embodiment, which will not be repeated here.
[0105] S35, superimpose the target BIM model and the target stretched body model on the target real scene model including the target cropping area to obtain a fusion model of the target real scene model and the target BIM model. For details, please refer to the relevant description of step S25 in the above embodiment, which will not be repeated here. The preferred fusion process of the target real scene model and the target BIM model is as follows: Figure 4shown.
[0106] The model fusion method provided in this embodiment obtains the minimum tight bounding box corresponding to the BIM model, determines the lower bottom surface position of the stretched body based on the size information of the minimum tight bounding box, and constructs a stretched body model corresponding to the BIM model based on the lower bottom surface position, thereby obtaining a three-dimensional body corresponding to the BIM model to achieve the fusion of the target real-life model and the BIM model. The target real-life model is obtained by cutting and opening holes in the real-life model, and finally the BIM model and the target stretched body model are superimposed on the target real-life model, thereby automatically and seamlessly merging the target real-life model with the BIM model to meet display and measurement requirements.
[0107] In this embodiment, a model fusion device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. The details that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware or a combination of software and hardware is also possible and contemplated.
[0108] This embodiment provides a model fusion device, such as Figure 5 Shown, including:
[0109] The acquisition module 41 is configured to acquire a target BIM model and a target real-life model corresponding to the 3D real-life image, wherein the target real-life model includes a target cropping region corresponding to the target BIM model. For detailed descriptions, please refer to the corresponding descriptions of the above method embodiments and will not be repeated here.
[0110] The construction module 42 is used to construct a tensile body model based on the target BIM model. Detailed descriptions can be found in the corresponding descriptions of the above method embodiments, which will not be repeated here.
[0111] The determination module 43 is used to determine the target terrain surface model corresponding to the target real scene model based on the characteristics of the target real scene model. Detailed descriptions can be found in the corresponding descriptions of the above method embodiments, which will not be repeated here.
[0112] The clipping module 44 is used to clip the stretched body model based on the boundary of the target terrain surface model to obtain the target stretched body model. Detailed descriptions can be found in the corresponding descriptions of the above method embodiments, which will not be repeated here.
[0113] The fusion module 45 is configured to superimpose the target BIM model and the target extruded body model on the target real-life model including the target cropped area, thereby obtaining a fusion model of the target real-life model and the target BIM model. For detailed descriptions, please refer to the corresponding descriptions of the above method embodiments and will not be repeated here.
[0114] The model fusion device provided in this embodiment obtains a target real-life model and a target BIM model, and has a target cropping area corresponding to the BIM model in the target real-life model. At the same time, a stretched body model is constructed based on the BIM model, and a target terrain surface model is generated based on the characteristics of the target real-life model. The stretched body model is cropped using the boundary of the target terrain surface model to obtain a target stretched body model, and then the BIM model and the target stretched body model are superimposed and placed in the target cropping area, thereby forming a fusion model of the target real-life model and the BIM model. This device does not require the model editing capabilities of other tools. By separately calculating the target terrain surface model and the target real-life model, it ensures the positional fusion of the target stretched body model and the target real-life model. Finally, the separated calculation results are superimposed, thereby achieving automatic and seamless fusion of the target real-life model and the BIM model, avoiding reliance on operators, saving labor costs, reducing synthesis time, and ensuring the mold-matching effect.
[0115] The fusion device of the model in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0116] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.
[0117] An embodiment of the present invention further provides an electronic device having the above Figure 5 The fusion device of the model shown.
[0118] See also Figure 6 , Figure 6 is a structural diagram of an electronic device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the electronic device may include: at least one processor 501, such as a CPU (Central Processing Unit), at least one communication interface 503, a memory 504, and at least one communication bus 502. The communication bus 502 is used to realize the connection and communication between these components. The communication interface 503 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 503 may also include a standard wired interface and a wireless interface. The memory 504 may be a high-speed RAM memory (Random Access Memory, volatile random access memory) or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 504 may optionally be at least one storage device located away from the aforementioned processor 501. The processor 501 may be combined with Figure 5In the described apparatus, the memory 504 stores an application program, and the processor 501 calls the program code stored in the memory 504 to execute any of the above method steps.
[0119] The communication bus 502 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 502 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0120] Among them, the memory 504 may include volatile memory (English: volatile memory), such as random-access memory (English: random-access memory, abbreviated: RAM); the memory may also include non-volatile memory (English: non-volatile memory), such as flash memory (English: flash memory), hard disk drive (English: hard disk drive, abbreviated: HDD) or solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 504 may also include a combination of the above types of memory.
[0121] The processor 501 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.
[0122] The processor 501 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0123] Optionally, the memory 504 is also used to store program instructions. The processor 501 can call the program instructions to implement the application Figures 1 to 4 The fusion method of the models shown in the examples.
[0124] An embodiment of the present invention further provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the processing method of the model fusion method in any of the above method embodiments. Wherein, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.
[0125] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A model fusion method, characterized in that: The steps include: Acquire a target BIM model and a target real-scene model corresponding to the three-dimensional real-scene image, wherein the target real-scene model has a target cropping area corresponding to the target BIM model; Constructing a tensile body model based on the target BIM model; Determining a target terrain surface model corresponding to the target real scene model based on the characteristics of the target real scene model; Clipping the stretched body model based on the boundary of the target terrain surface model to obtain a target stretched body model, where the target stretched body model is an underground model corresponding to the target real scene model; The target BIM model and the target stretched body model are superimposed on the target real scene model including the target cropping area to obtain a fusion model of the target real scene model and the target BIM model.
2. The method according to claim 1, characterized in that The step of clipping the stretched body model based on the boundary of the target terrain surface model to obtain the target stretched body model includes: Acquire a terrain area corresponding to the target terrain surface model; determining a boundary corresponding to the target terrain surface model based on the terrain area; A Boolean operation is performed on the boundary of the target terrain surface model and the stretched body model to obtain a target stretched body model after the stretched body model is trimmed.
3. The method according to claim 2, characterized in that Determining a boundary corresponding to the target terrain surface model based on the terrain area includes: Extracting terrain point cloud data corresponding to the terrain area; A boundary corresponding to the terrain point cloud data is calculated based on the terrain point cloud data, and the boundary corresponding to the terrain point cloud data is used as a boundary corresponding to the target terrain surface model.
4. The method according to claim 1, wherein The determining, based on the characteristics of the target real scene model, a target terrain surface model corresponding to the target real scene model includes: Acquiring feature data of the three-dimensional real scene image, wherein the feature data is used for reconstructing a terrain grid model; Based on the target real scene model, plotting the target cropping area from the three-dimensional real scene image; Extracting target point cloud data corresponding to the target cropping area and a point cloud data boundary corresponding to the target point cloud data from the feature data; Performing filtering on the target point cloud data to obtain terrain point cloud data; constructing the terrain surface model based on the terrain point cloud data; The terrain surface model is clipped based on the boundary of the point cloud data to obtain a target terrain surface model.
5. The method according to claim 1, characterized in that Obtain the target real scene model corresponding to the 3D real scene image, including: Obtaining a real-scene model corresponding to the three-dimensional real-scene image; Extracting the closed boundary of the target BIM model and determining the target cropping area of the real scene model; The real scene model is cropped based on the target cropping area to obtain a target real scene model, wherein the target real scene model includes a target cropping model corresponding to the target cropping area.
6. The method according to claim 5, characterized in that Extracting the closed boundary of the target BIM model and determining the target cropping area of the real scene model includes: Obtaining model point cloud data corresponding to the target BIM model; Extracting a model point cloud boundary corresponding to the model point cloud data, wherein the model point cloud boundary includes a plurality of straight line segments; Performing fitting processing on the model point cloud boundary, deleting redundant straight line segments, and obtaining a closed boundary corresponding to the model point cloud boundary; The closed boundary is compared with the real scene model to determine whether the closed boundary corresponds to a target cropping area of the real scene model.
7. The method according to claim 1, characterized in that The constructing a stretching body model based on the target BIM model includes: Obtaining the minimum tight bounding box corresponding to the target BIM model; Determining the position of the lower bottom surface of the stretched body based on the size information of the minimum tight bounding box; Based on the lower bottom surface position, a stretching body model corresponding to the target BIM model is constructed.
8. A model fusion device, characterized in that: include: An acquisition module is used to acquire a target BIM model and a target real-scene model corresponding to the three-dimensional real-scene image, wherein the target real-scene model has a target cropping area corresponding to the target BIM model; A construction module, configured to construct a tensile body model based on the target BIM model; a determination module, configured to determine a target terrain surface model corresponding to the target real scene model based on features of the target real scene model; a clipping module, configured to clip the stretched body model based on the boundary of the target terrain surface model to obtain a target stretched body model, wherein the target stretched body model is an underground model corresponding to the target real scene model; A fusion module is used to superimpose the target BIM model and the target stretched body model on the target real scene model including the target cropping area to obtain a fusion model of the target real scene model and the target BIM model.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the model fusion method described in any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the model fusion method described in any one of claims 1 to 7.
Citation Information
Patent Citations
A 3D city modeling method based on BIM and GIS
CN109410327A
Multi-model fusion method and system based on smart city
CN112560137A