Ancient building parameterized three-dimensional modeling method and system based on point cloud and texture features
By combining cross-modal data registration and feature fusion with PointNet-CNN hybrid network and Pix2Pix-HD network, a high-precision editable BIM model of ancient buildings is generated, solving the problem of accuracy and efficiency in the digital protection of ancient buildings and realizing efficient digital archiving and restoration of ancient buildings.
Patent Information
- Application Number
- CN202511151232.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-12-02
AI Technical Summary
Existing technologies struggle to achieve millimeter-level geometric precision and efficient restoration of surface textures in the digital preservation of ancient buildings, and lack editable parametric models. Traditional methods are inefficient and lack sufficient intelligence in the components.
By fusion of laser point cloud and UAV texture data through cross-modal data registration, geometric and texture features are extracted and fused. The improved density-sensitive DBSCAN algorithm is used to segment components, the PointNet-CNN hybrid network is used to identify component categories, and the damaged areas are repaired through the Pix2Pix-HD network. Finally, a BIM model of the ancient building is generated and verified.
It achieves high-precision and high-efficiency digital protection of ancient buildings, generates editable BIM models, significantly improves the efficiency of segmentation and recognition of complex components and the ability to restore details, and ensures the reliability and integrity of the model.
Smart Images

Figure CN121053293A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision and 3D reconstruction technology, and specifically relates to a parametric 3D modeling method and system for ancient buildings based on point cloud and texture features. Background Technology
[0002] The field of digital preservation of ancient buildings is facing severe challenges. Many national-level protected wooden ancient buildings have structural damage, but traditional surveying methods are inefficient, and existing 3D reconstruction technology cannot achieve both millimeter-level geometric accuracy and surface texture restoration. The industry still needs to overcome the problems of "efficiency-accuracy-cost". Although oblique photogrammetry modeling is fast, it loses details such as brackets and dougong. Laser point cloud is precise but cannot be parametrically edited. The lack of ancient building component library in BIM technology means that most restoration projects still rely on hand-drawn drawings.
[0003] Traditional total station surveying requires months of manual measurement, while laser point cloud reconstruction, although accurate to the millimeter level, lacks semantic information and cannot generate editable parametric models; the texture maps generated by oblique photogrammetry have large registration errors with point clouds, resulting in misalignment of painted patterns, and existing algorithms are unable to repair large-area damage, complex components such as brackets rely on manual identification and modeling, and BIM software lacks a dedicated component library for ancient buildings.
[0004] Existing technologies suffer from problems such as an imbalance between accuracy and efficiency, a disconnect between texture and geometry, and a lack of component intelligence. Summary of the Invention
[0005] (a) Technical problems to be solved
[0006] To address the problems in related technologies, this invention provides a parametric 3D modeling method for ancient buildings based on point cloud and texture features, in order to overcome the aforementioned technical problems existing in the existing related technologies.
[0007] (II) Technical Solution
[0008] To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution:
[0009] S1. Register the ancient building point cloud set and the ancient building texture image set through cross-modal data registration to obtain a point cloud set with texture coordinates;
[0010] S2. Extract the geometric and texture features of the point cloud set with texture coordinates, and perform feature fusion to obtain the ancient building fusion feature; use the improved density-sensitive DBSCAN algorithm to segment the ancient building fusion feature into components to obtain the independent component point cloud set;
[0011] S3. Merge PointNet and CNN to obtain a PointNet-CNN hybrid network; use the PointNet-CNN hybrid network to process the point cloud of independent components to obtain the component category probability distribution set; perform parameter template matching and parameter optimization based on the component category probability distribution set to obtain the optimal component parameter set;
[0012] S4. Generate a component LOD model set based on the optimal component parameter set; based on the component LOD model set, repair the damaged area through the Pix2Pix-HD network to obtain the repaired component LOD model set;
[0013] S5. Generate an ancient building BIM model based on the repaired component LOD model set; verify the geometric accuracy and texture accuracy of the ancient building BIM model. If the verification is successful, the ancient building BIM model is used as the final ancient building BIM model. Otherwise, perform error diagnosis and continue to correct the ancient building BIM model to obtain the final ancient building BIM model.
[0014] This invention generates a point cloud with texture coordinates by fusing laser point cloud and UAV texture data through cross-modal registration; extracts and fuses geometric and texture features, and uses an improved density-sensitive DBSCAN algorithm to accurately segment components; employs a PointNet-CNN hybrid network to identify component categories, combines a knowledge base to match parameter templates, and optimizes the solution; generates LOD component models hierarchically based on optimal parameters, and uses a Pix2Pix-HD network to repair damage; assembles a BIM model and uses a double-precision verification and diagnostic feedback mechanism for closed-loop correction; solves the texture-geometric separation problem, achieving accurate and high-fidelity pattern restoration; significantly improves the efficiency of complex component segmentation and recognition, and generates editable BIM components through parameterized templates; hierarchical modeling and intelligent repair fully preserve the details of ancient buildings, and the closed-loop verification mechanism ensures model reliability, providing efficient and accurate technical support for the digital protection of ancient buildings.
[0015] Preferably, step S1 includes the following steps:
[0016] S11. Use a ground-based laser scanner to collect point clouds of ancient buildings to obtain a set of point clouds of ancient buildings; use a drone equipped with a tilting camera to take multi-angle photos of ancient buildings to obtain a set of texture images of ancient buildings.
[0017] S12. Use the 3D-SIFT algorithm to calculate the local features of the point cloud set of ancient buildings to obtain a 3D key point set; the 3D key point set contains location and feature descriptors;
[0018] The 2D-SIFT algorithm is used to detect image feature points in the ancient building texture image set to obtain a 2D keypoint set; the 2D keypoint set includes pixel coordinates and descriptors.
[0019] The RANSAC algorithm filters reliable matching pairs in the 3D keypoint set and the 2D keypoint set to obtain the 2D-3D corresponding point pair set;
[0020] Based on the 2D-3D corresponding point pair set, the rigid body transformation matrix is obtained through ICP iterative optimization;
[0021] Based on the point cloud set of ancient buildings and the rigid body transformation matrix, a point cloud set with textured coordinates is obtained through coordinate transformation calculation; the point cloud set with textured coordinates contains the geometric and texture binding information of the ancient buildings.
[0022] This invention acquires point cloud and texture data through ground-based laser scanning and UAV oblique photography, extracts features using 3D-SIFT / 2D-SIFT, and combines RANSAC to screen reliable 2D-3D matching pairs. The rigid body transformation matrix is then optimized using ICP to achieve accurate cross-modal data registration, generating a point cloud set with geometrically and texturally bound data. This method overcomes the limitations of traditional registration methods with large errors, ensuring millimeter-level geometric accuracy and spatial consistency of high-resolution textures. This lays a reliable foundation for subsequent feature fusion and component segmentation, significantly improving the integrity and authenticity of ancient building digitization.
[0023] Preferably, step S2 includes the following steps:
[0024] S21. Calculate the normal vector and curvature value of the point cloud in the point cloud set with textured coordinates using PCA covariance analysis to obtain the geometric features of the ancient building.
[0025] Using the OpenCV image processing library, the HSV color histogram and LBP texture descriptor of the point cloud set with texture coordinates are extracted to obtain the texture features of the ancient building.
[0026] S22. Based on the statistical features of local point clouds, the geometric weights and texture weights of ancient buildings are obtained through the variance analysis formula.
[0027] Based on the geometric and texture weights of ancient buildings, a weighted splicing algorithm is used to fuse the geometric and texture features of ancient buildings to obtain the fused features of ancient buildings.
[0028] S23. Use the improved density-sensitive DBSCAN to segment the fusion features of ancient buildings and obtain the cloud of independent component points;
[0029] This invention extracts normal vectors and curvature geometric features through PCA, and obtains HSV and LBP texture features through OpenCV. Multimodal features are generated by weighted fusion through variance analysis. An improved DBSCAN is used to achieve intelligent segmentation of components. This invention significantly improves the segmentation accuracy of dense and complex components such as brackets, solves the problem of missegmentation caused by geometric texture fragmentation in traditional methods, and lays the foundation for parametric modeling.
[0030] Preferably, the improved density-sensitive DBSCAN algorithm in S23 is obtained through the following steps:
[0031] Replace the Euclidean distance in the DBSCAN algorithm with the fused feature cosine similarity;
[0032] The fixed neighborhood radius in the DBSCAN algorithm is replaced with a gradient adaptive radius (the gradient adaptive radius is smaller when the feature gradient is large, so as to preserve details), and feature consistency constraints are added (the number of points in the neighborhood is greater than the preset minimum number of points; the average texture feature value of the points in the neighborhood is greater than the average texture feature value threshold), resulting in an improved density-sensitive DBSCAN algorithm.
[0033] This invention addresses the problem of missegmentation of textured components (such as merging carved window lattices and plain beams and columns) caused by the traditional DBSCAN algorithm, which relies solely on Euclidean distance and uses only geometric features, by replacing the Euclidean distance in the DBSCAN algorithm with fused feature cosine similarity. It also solves the problem that the fixed neighborhood radius cannot adapt to changes in component scale (smaller radius is needed for densely packed brackets, and larger radius is needed for large roof surfaces) by replacing the fixed neighborhood radius with a gradient adaptive radius. Furthermore, it adds feature consistency constraints to solve the problem of blurred edges on ancient building components.
[0034] Preferably, step S3 includes the following steps:
[0035] S31. Construct PointNet and CNN networks; use PointNet as the point cloud feature extraction branch and CNN as the texture feature extraction branch, construct a feature fusion layer and a classification decision layer to obtain a PointNet-CNN hybrid network;
[0036] S32. Project the point cloud of the independent component point cloud set to obtain the component point cloud projection image set;
[0037] S33. Input the independent component point cloud set and the component point cloud projection image set into the PointNet-CNN hybrid network to obtain the component category probability distribution set;
[0038] S34. Based on the component categories of the independent component point cloud, template retrieval is performed through the ancient building component knowledge base to obtain a parameterized template set and an adjustable parameter set;
[0039] Based on the bounding box size of the component point cloud in the independent component point cloud set, the initial component parameter set is obtained by initialization through scaling rules;
[0040] S35. Based on the independent component point cloud set, parameterized template set, and adjustable parameter set, an optimization objective function is constructed through distance loss and regularization term; based on the optimization objective function and the initial component parameter set, the optimal component parameter set is obtained through the Levenberg-Marquardt algorithm; the regularization term is constrained by historical form data to make the optimal parameters conform to the parameters of ancient building specifications;
[0041] This invention accurately identifies component categories by constructing a PointNet-CNN hybrid network (integrating point cloud geometry and projection image texture features); it matches parameterized templates based on an ancient building knowledge base, initializes parameters using bounding box dimensions, and optimizes the optimal component parameter set conforming to ancient building standards using the LM algorithm through distance loss and historical form regularization constraints; it realizes the transformation from point cloud to intelligent parameterized BIM components, solving the industry pain points of traditional point cloud being uneditable and BIM lacking an ancient building database.
[0042] Preferably, step S33 includes the following steps:
[0043] S331. Input the point cloud set of independent components into the PointNet network in the PointNet-CNN hybrid network, align the point cloud through the spatial transformation network, extract local features through the multilayer perceptron, and obtain global geometric features through max pooling to obtain a feature vector set representing the overall shape of the component.
[0044] S332. Input the component point cloud projection image set into the CNN network in the PointNet-CNN hybrid network, extract the features from each viewpoint using ResNet50, and perform feature fusion to obtain the component texture feature vector set;
[0045] S333: The feature vector set representing the overall shape of the component and the feature vector set representing the texture of the component are concatenated and weighted by attention through the feature fusion layer, and the compressed features are reduced in dimensionality through the fully connected layer to obtain the compressed fusion feature set;
[0046] S334. Input the compressed and fused feature set into the classification decision layer with a double fully connected layer structure, and activate the output probability distribution through Softmax to obtain the component category probability distribution set;
[0047] This invention extracts component shape features by performing spatial transformation alignment, MLP local features, and max pooling global geometry through PointNet branch, and extracts texture features by performing ResNet50 multi-view fusion through CNN branch; after splicing and attention-weighted fusion, dimensionality is reduced, and finally the classification probability is output by dual fully connected layers; the deep fusion of geometric structure and surface texture information significantly improves the classification accuracy of complex carved components and provides a reliable category basis for parametric reconstruction.
[0048] Preferably, step S4 includes the following steps:
[0049] S41. Based on the optimal component parameter set, the component LOD model set is obtained through the L1 base layer, L2 decoration layer and L3 color layer respectively;
[0050] S42. Based on the component LOD model set, a damaged area mask set is obtained through Canny edge detection and morphological detection; based on the damaged area mask set, the damaged area is repaired through the Pix2Pix-HD network to obtain the repaired component LOD model set.
[0051] This invention generates a layered LOD model by using a base layer, a decorative layer, and a color layer, and locates damaged areas based on Canny edge detection, and uses a Pix2Pix-HD network for intelligent repair; it achieves high-fidelity restoration of the geometric structure and surface texture of ancient building components, effectively solving the shortcomings of traditional methods in restoring damaged areas.
[0052] Preferably, step S41 includes the following steps:
[0053] S411. Input the optimal component parameter set and independent component point cloud set into the L1 base layer, obtain the base BIM model through NURBS surface fitting, and generate a simplified mesh by Poisson surface reconstruction.
[0054] S412. Input the component point cloud projection image set and the density distribution of the component point cloud in the independent component point cloud set into the L2 decoration layer. Obtain the normal map and displacement map through Sobel operator gradient calculation and point cloud density distribution analysis.
[0055] S413. Input the basic BIM model set and component texture image set into the L3 color layer, obtain the UV mapping set (for texture mapping basis) through the LSCM algorithm, and generate the painted texture set through pixel-level projection.
[0056] The component LOD model set is obtained through S411, S412, and S413;
[0057] This invention employs layered modeling. Layer L1 generates a parametric base mesh through NURBS surface fitting and Poisson reconstruction. Layer L2 combines Sobel gradient and point cloud density analysis to output normals and displacement maps to express carving details. Layer L3 utilizes the LSCM algorithm to achieve UV mapping and pixel-level color mapping. This enables multi-layered artifact-level precision restoration of geometry, decoration, and color, breaking through the limitations of traditional single-modeling in expressing details.
[0058] Preferably, step S5 includes the following steps:
[0059] S51. Based on the optimal component parameter set and the repaired component LOD model set, a BIM model component set is obtained through the IFC SDK development package;
[0060] S52. Based on ancient building archive data and ancient building material testing reports, obtain BIM metadata through XML parsing;
[0061] S53. Construct a BIM model of ancient buildings based on BIM model component set and BIM metadata;
[0062] S54. Verify the geometric and textural accuracy of the ancient building BIM model. If the verification is successful, the ancient building BIM model will be used as the final ancient building BIM model.
[0063] If the verification fails, an error type diagnosis is performed to obtain the diagnosis result; the diagnosis result includes geometric shape deviation, texture misalignment / blurring, component connection misalignment, and overall model distortion; if it is geometric shape deviation, return to S3; if it is texture misalignment / blurring, return to S4; if it is component connection misalignment, return to S2; if it is overall model distortion, return to S1.
[0064] Based on the diagnostic results, the ancient building BIM model was revised to obtain the final ancient building BIM model;
[0065] This invention generates BIM components by integrating and repairing LOD components using the IFC SDK, and constructs a complete BIM model by incorporating metadata from XML parsing of archival materials, etc. It innovatively adopts a dual-precision verification mechanism of geometry and texture to intelligently diagnose four typical errors (geometric deviation, texture anomaly, connection misalignment, and overall distortion) and trace back to the corresponding links (S1-S4) for closed-loop correction; ensuring millimeter-level accuracy and historical authenticity of the model, forming a self-optimizing cultural relic-level digital twin.
[0066] The ancient building parametric 3D modeling system based on point cloud and texture features is used to implement the above-mentioned ancient building parametric 3D modeling method based on point cloud and texture features. It includes a cross-modal data registration module, a feature fusion and component segmentation module, a parametric template matching and optimization module, a multi-level LOD modeling and repair module, and a BIM integration and closed-loop verification module.
[0067] The cross-modal data registration module is used for the precise alignment of point cloud and texture data of ancient buildings. High-density point clouds are collected by a ground laser scanner, and high-resolution texture images are obtained by combining UAV oblique photography. Local features of point cloud and image are extracted using 3D-SIFT and 2D-SIFT respectively. Reliable 2D-3D matching point pairs are selected by RANSAC algorithm, and rigid body transformation matrix is calculated by iterative optimization based on ICP. Finally, a point cloud set with texture coordinates is output to realize the binding of geometry and texture.
[0068] The feature fusion and component segmentation module achieves intelligent segmentation of component-level point clouds. By extracting geometric and texture features of the point cloud, geometric / texture weights are dynamically allocated and weighted fusion is performed through variance analysis. An improved density-sensitive DBSCAN algorithm is adopted, using cosine similarity instead of Euclidean distance to measure the distance in the feature space. A dynamic neighborhood radius with adaptive feature gradient is introduced. Texture consistency constraints are added to output independent component point cloud subsets such as roofs, beams, columns, and brackets, solving problems such as missegmentation of textured similar components and scale sensitivity in traditional methods.
[0069] The parameterized template matching and optimization module realizes component semantic recognition and parameter inversion; a PointNet-CNN hybrid network is constructed, with the PointNet branch extracting global geometric features of the point cloud and the CNN branch analyzing the texture features of the projected image. After attention-weighted fusion, the component category probability is output through Softmax classification; based on the component category, the ancient building knowledge base is retrieved, and combined with the bounding box size initialization parameters, an optimization objective function containing distance loss and historical form regularization term is constructed. The optimal component parameter set that conforms to the ancient building specifications is solved by the Levenberg-Marquardt algorithm.
[0070] The multi-level LOD modeling and repair module is used to generate multi-level detail component models and repair defects. The LOD model is constructed in three layers: the L1 base layer uses NURBS surface fitting to generate a BIM structural model, and Poisson reconstruction simplifies the mesh; the L2 decoration layer generates normal / displacement maps based on point cloud density and Sobel gradients to restore details such as carvings; the L3 color layer uses the LSCM algorithm to map UV coordinates and generate painted texture maps; for damaged areas, Canny edge detection is used to locate the missing parts, and Pix2Pix-HD network is used for texture / geometry joint repair, outputting a complete component LOD model set.
[0071] The BIM integration and closed-loop verification module completes BIM model construction and quality control; based on optimal parameters and repaired models, it assembles BIM components through the IFC SDK development package, integrates metadata such as material properties and age parsed from XML, and exports ancient building BIM models; during the verification phase, it detects geometric accuracy and texture quality, and if it fails, it diagnoses the error type: geometric deviation returns parameter optimization, texture problems return mapping correction, connection misalignment triggers component re-segmentation, and overall distortion restarts the registration process, forming a closed-loop quality control chain.
[0072] (III) Beneficial Effects
[0073] The present invention has the following beneficial effects:
[0074] This invention, through deep fusion of point cloud geometry and image texture information, an improved density-sensitive DBSCAN algorithm, and a PointNet-CNN hybrid network, achieves parametric BIM component generation and layered detail expression, and establishes a closed-loop verification and correction mechanism. It successfully overcomes three core challenges in the digital preservation of ancient buildings: the imbalance between "precision, efficiency, and cost," the separation of "texture and geometry," and the lack of "component intelligence." This provides strong technical support and a reliable data foundation for the high-precision, high-efficiency, and low-cost digital archiving, research, monitoring, and restoration of ancient buildings.
[0075] This invention breaks through the bottleneck of "accuracy-efficiency-cost" to achieve high-precision and high-efficiency modeling. Through cross-modal data registration, it fundamentally solves the problem of the separation of geometric data and texture information in traditional methods, ensuring the simultaneous realization of geometric accuracy and high-fidelity surface decoration restoration. The improved density-sensitive DBSCAN algorithm significantly improves the automatic segmentation accuracy and robustness of complex, dense, and scale-variable ancient architectural components, overcoming the defects of traditional methods that rely on manual identification, rough segmentation, or missegmentation, greatly reducing manual intervention and improving modeling efficiency. The PointNet-CNN hybrid network makes full use of the geometric structure information of point clouds and the texture detail information of projected images to perform joint feature extraction and classification recognition, significantly improving the accuracy of component recognition, especially for components with complex patterns or local damage, providing a reliable foundation for subsequent parametric modeling.
[0076] This invention enables intelligent, parametric, and editable BIM model construction. Through parameter template matching and parameter optimization, the segmented and identified point cloud components are automatically converted into parametric BIM components that conform to ancient building standards, solving the core pain points of uneditable laser point cloud models and the lack of ancient building component libraries in BIM software. Through layered LOD model generation, the geometric basis, carved decorations, and painted patterns of ancient building components are finely expressed. The generated model is not only geometrically accurate but also rich in detail and distinct in layers, meeting the accuracy requirements of different application scenarios. Based on the Pix2Pix-HD network, the damaged area repair can intelligently fill in the texture and geometric damage caused by component aging, occlusion, or scan loss, effectively restoring the original appearance of ancient buildings and reducing the workload of subsequent manual repair.
[0077] This invention constructs a closed-loop quality assurance system to ensure model reliability. By introducing geometric and texture accuracy verification and error diagnosis feedback mechanisms, the generated BIM model is rigorously verified, and the system intelligently backtracks to the corresponding processing stage for correction based on the specific error type diagnosed. This closed-loop self-optimization process greatly ensures the accuracy and reliability of the final output model and reduces the risk of error accumulation. Integrating ancient building archive data and material testing reports as BIM metadata into the model enhances the model's information carrying capacity and its authority as a digital archive.
[0078] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0079] To more clearly illustrate the technical solutions of the embodiments of the invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the invention. For those skilled in the art, the drawings can be obtained from these drawings without creative effort.
[0080] Figure 1 This is a flowchart illustrating the parametric 3D modeling method for ancient buildings based on point cloud and texture features according to the present invention.
[0081] Figure 2 This is a schematic diagram of the feature fusion process using the PointNet-CNN hybrid network in the parametric 3D modeling method for ancient buildings based on point cloud and texture features of the present invention.
[0082] Figure 3 This is a flowchart illustrating the process when the geometric and texture accuracy verification of the ancient building BIM model fails in the parametric 3D modeling method for ancient buildings based on point cloud and texture features according to the present invention.
[0083] Figure 4 This is a schematic diagram of the modules of the parametric 3D modeling system for ancient buildings based on point cloud and texture features of the present invention. Detailed Implementation
[0084] The technical solutions of the embodiments of the invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the invention, and not all embodiments. Based on the embodiments of the invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the invention.
[0085] In the description of this invention, it should be understood that the terms "opening", "upper", "lower", "top", "middle", "inner", etc., which indicate orientation or positional relationship, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the components or elements referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the invention.
[0086] Example 1:
[0087] Please see Figure 1 , Figure 2 , Figure 3This invention discloses a parametric 3D modeling method for ancient buildings based on point cloud and texture features, comprising the following steps:
[0088] S1. Register the ancient building point cloud set and the ancient building texture image set through cross-modal data registration to obtain a point cloud set with texture coordinates;
[0089] S1 includes the following steps:
[0090] S11. Use a terrestrial laser scanner (such as Faro Focus S350) to acquire point clouds of ancient buildings with an accuracy of ≤3mm, obtaining a point cloud set of ancient buildings; the scanning density is ≥500 points / m. 2 Multi-site scanning of complex structures (such as bracket sets) with a single-site overlap rate of ≥30%;
[0091] Using a drone equipped with a 20-megapixel tilting camera, the ancient buildings were photographed from multiple angles with a resolution of ≥300dpi. The photos were taken on cloudy days or under uniform light sources to avoid highlight reflections, resulting in a set of texture images of the ancient buildings.
[0092] S12. Use the 3D-SIFT algorithm to calculate the local features of the point cloud set of ancient buildings to obtain a 3D key point set; the 3D key point set contains location and feature descriptors;
[0093] The 2D-SIFT algorithm is used to detect image feature points in the ancient building texture image set to obtain a 2D keypoint set; the 2D keypoint set includes pixel coordinates and descriptors.
[0094] The RANSAC algorithm filters reliable matching pairs in the 3D keypoint set and the 2D keypoint set to obtain the 2D-3D corresponding point pair set;
[0095] Based on the 2D-3D corresponding point pair set, the rigid body transformation matrix is obtained through ICP iterative optimization;
[0096] Based on the point cloud set of ancient buildings and the rigid body transformation matrix, a point cloud set with textured coordinates is obtained through coordinate transformation calculation; the point cloud set with textured coordinates contains the geometric and texture binding information of the ancient buildings.
[0097] S2. Extract the geometric and texture features of the point cloud set with texture coordinates, and perform feature fusion to obtain the ancient building fusion feature; use the improved density-sensitive DBSCAN algorithm to segment the ancient building fusion feature into components to obtain the independent component point cloud set;
[0098] S2 includes the following steps:
[0099] S21. Calculate the normal vector and curvature value of the point cloud in the point cloud set with textured coordinates using PCA covariance analysis to obtain the geometric features of the ancient building.
[0100] Using the OpenCV image processing library, the HSV color histogram and LBP texture descriptor of the point cloud set with texture coordinates are extracted to obtain the texture features of the ancient building.
[0101] S22. Based on the statistical features of local point clouds, the geometric weights and texture weights of ancient buildings are obtained through the variance analysis formula.
[0102] Based on the geometric and texture weights of ancient buildings, a weighted splicing algorithm is used to fuse the geometric and texture features of ancient buildings to obtain the fused features of ancient buildings.
[0103] S23. Use the improved density-sensitive DBSCAN to segment the fusion features of ancient buildings into components, and obtain independent component point clouds; the independent component point clouds include independent component point cloud subsets such as roof, beams and columns, and brackets;
[0104] The improved density-sensitive DBSCAN algorithm in S23 is obtained through the following steps:
[0105] The improved density-sensitive DBSCAN algorithm is obtained by replacing the Euclidean distance in the DBSCAN algorithm with the cosine similarity of the fused features, replacing the fixed neighborhood radius with the gradient adaptive radius (the gradient adaptive radius is small when the feature gradient is large, so as to preserve details), and adding feature consistency constraints (the number of points in the neighborhood is greater than the preset minimum number of points; the average texture feature value of the points in the neighborhood is greater than the average texture feature value threshold).
[0106] S23 includes the following steps:
[0107] The improved density-sensitive DBSCAN algorithm first replaces the distance metric by using the fusion features of ancient buildings and calculates the distance between points in the feature space using the cosine similarity formula, thereby generating an n×n feature space distance matrix. This step replaces the traditional Euclidean distance as the basis for subsequent clustering and can better capture the directional similarity between feature vectors.
[0108] By adopting a dynamic neighborhood radius strategy, based on the feature gradient of each point, the independent neighborhood radius of each point is calculated through an adaptive radius formula, which effectively solves the scale sensitivity problem in traditional clustering algorithms and enables the algorithm to adapt to changes in point cloud density in different regions.
[0109] By constraining feature consistency, the first requirement is that the number of points in the neighborhood is greater than the preset minimum number of points; the second requirement is that the average texture feature value of the points in the neighborhood is greater than the threshold of 0.7. The core points selected by these conditions form a set, which ensures the texture consistency of the clustering results.
[0110] The connection analysis of the core points and their neighborhoods is performed by a depth-first search method, and the point cloud is segmented into multiple connected subsets, which are output as the final segmentation results. This step completes the entire process from point cloud to semantic segmentation and effectively realizes the clustering and segmentation of point cloud data.
[0111] S3. Merge PointNet and CNN to obtain a PointNet-CNN hybrid network; use the PointNet-CNN hybrid network to process the point cloud of independent components to obtain the component category probability distribution set; perform parameter template matching and parameter optimization based on the component category probability distribution set to obtain the optimal component parameter set;
[0112] S3 includes the following steps:
[0113] S31. Construct PointNet and CNN networks; use PointNet as the point cloud feature extraction branch and CNN as the texture feature extraction branch, construct a feature fusion layer and a classification decision layer to obtain a PointNet-CNN hybrid network;
[0114] S32. Project the point cloud of the independent component point cloud set to obtain the component point cloud projection image set;
[0115] S33. Input the independent component point cloud set and the component point cloud projection image set into the PointNet-CNN hybrid network to obtain the component category probability distribution set;
[0116] S33 includes the following steps:
[0117] S331. Input the point cloud set of independent components into the PointNet network in the PointNet-CNN hybrid network, align the point cloud through the spatial transformation network, extract local features through the multilayer perceptron, and obtain global geometric features through max pooling to obtain a feature vector set representing the overall shape of the component.
[0118] S332. Input the component point cloud projection image set into the CNN network in the PointNet-CNN hybrid network, extract the features from each viewpoint using ResNet50, and perform feature fusion to obtain the component texture feature vector set;
[0119] S333: The feature vector set representing the overall shape of the component and the feature vector set representing the texture of the component are concatenated and weighted by attention through the feature fusion layer, and the compressed features are reduced in dimensionality through the fully connected layer to obtain the compressed fusion feature set;
[0120] S334. Input the compressed and fused feature set into the classification decision layer with a double fully connected layer structure, and activate the output probability distribution through Softmax to obtain the component category probability distribution set;
[0121] S34. Based on the component categories of the independent component point cloud, template retrieval is performed through the ancient building component knowledge base to obtain a parametric template set and an adjustable parameter set; template examples are as follows.
[0122] Component type parameter example
[0123] Dougong (bracket set) {number of projecting brackets, dimensions of the bracket set, angle of the bracket arm}
[0124] Column base {drum diameter, inverted bowl curvature, carving depth}
[0125] Based on the bounding box size of the component point cloud in the independent component point cloud set, the initial component parameter set is obtained by initialization through scaling rules;
[0126] S35. Based on the independent component point cloud set, parameterized template set, and adjustable parameter set, an optimization objective function is constructed through distance loss and regularization term; based on the optimization objective function and the initial component parameter set, the optimal component parameter set is obtained through the Levenberg-Marquardt algorithm (adaptive step-size gradient descent); the regularization term is constrained by historical form data to make the optimal parameters conform to the parameters of ancient building specifications;
[0127] S4. Generate a component LOD model set based on the optimal component parameter set; based on the component LOD model set, repair the damaged area through the Pix2Pix-HD network to obtain the repaired component LOD model set;
[0128] S4 includes the following steps:
[0129] S41. Based on the optimal component parameter set, the component LOD model set is obtained through the L1 base layer, L2 decoration layer and L3 color layer respectively;
[0130] S41 includes the following steps:
[0131] S411. Input the optimal component parameter set and independent component point cloud set into the L1 base layer. Obtain the basic BIM model (for structural stress analysis) through NURBS surface fitting. Reconstruct the Poisson surface to generate a simplified mesh (triangle face number ≈ 5K, for fast loading of large scenes).
[0132] S412. Input the component point cloud projection image set and the density distribution of the component point cloud in the independent component point cloud set into the L2 decoration layer. Through Sobel operator gradient calculation and point cloud density distribution analysis, obtain the normal map (for VR display of bump effect) and displacement map (for such as carving depth restoration).
[0133] S413. Input the basic BIM model set and component texture image set into the L3 color layer, obtain the UV mapping set (for texture mapping basis) through the LSCM algorithm, and generate the painted texture set through pixel-level projection.
[0134] The component LOD model set is obtained through S411, S412, and S413;
[0135] S42. Based on the component LOD model set, obtain the damaged area mask set through Canny edge detection and morphological detection; based on the damaged area mask set, repair the damaged area through Pix2Pix-HD network to obtain the repaired component LOD model set.
[0136] S5. Generate a BIM model of the ancient building based on the repaired component LOD model set; verify the geometric accuracy and texture accuracy of the ancient building BIM model. If the verification is successful, the ancient building BIM model is used as the final ancient building BIM model. Otherwise, perform error diagnosis and continue to correct the ancient building BIM model to obtain the final BIM model.
[0137] S5 includes the following steps:
[0138] S51. Based on the optimal component parameter set and the repaired component LOD model set, a BIM model component set is obtained through the IFC SDK development package (based on the BuildingSMART standard); the BIM model component set is such as {column, beam, bracket, etc.}.
[0139] S52. Based on ancient building archive data and ancient building material testing reports, BIM metadata is obtained through XML parsing; the BIM metadata includes material properties (nanmu / pine), age (Qing Dynasty / Ming Dynasty), restoration records, etc.
[0140] S53. Based on the BIM model component set and BIM metadata, the ancient building BIM model (containing geometric and semantic information) is obtained through the IFC4.0 standard exporter;
[0141] S54. Verify the geometric and textural accuracy of the ancient building BIM model. If the verification is successful, the ancient building BIM model will be used as the final ancient building BIM model.
[0142] If the verification fails, an error type diagnosis is performed to obtain the diagnosis result; the ancient building BIM model is then corrected based on the diagnosis result to obtain the final ancient building BIM model.
[0143] The diagnostic results include geometric shape deviation (return to S3 for parameter optimization), texture misalignment / blurring (return to S4 for texture mapping), component connection misalignment (return to S2 for component resegmentation), and overall model distortion (return to S1 for reregistration).
[0144] Example 2:
[0145] Please see Figure 4 A parametric 3D modeling system for ancient buildings based on point cloud and texture features is used to implement the above-mentioned parametric 3D modeling method for ancient buildings based on point cloud and texture features. It includes a cross-modal data registration module, a feature fusion and component segmentation module, a parametric template matching and optimization module, a multi-level LOD modeling and repair module, and a BIM integration and closed-loop verification module.
[0146] The cross-modal data registration module is used for the precise alignment of point cloud and texture data of ancient buildings. High-density point clouds are collected by a ground laser scanner, and high-resolution texture images are obtained by combining UAV oblique photography. Local features of point cloud and image are extracted using 3D-SIFT and 2D-SIFT respectively. Reliable 2D-3D matching point pairs are selected by RANSAC algorithm, and rigid body transformation matrix is calculated by iterative optimization based on ICP. Finally, a point cloud set with texture coordinates is output to realize the binding of geometry and texture.
[0147] The feature fusion and component segmentation module achieves intelligent segmentation of component-level point clouds. By extracting geometric and texture features of the point cloud, geometric / texture weights are dynamically allocated and weighted fusion is performed through variance analysis. An improved density-sensitive DBSCAN algorithm is adopted, using cosine similarity instead of Euclidean distance to measure the distance in the feature space. A dynamic neighborhood radius with adaptive feature gradient is introduced. Texture consistency constraints are added to output independent component point cloud subsets such as roofs, beams, columns, and brackets, solving problems such as missegmentation of textured similar components and scale sensitivity in traditional methods.
[0148] The parameterized template matching and optimization module realizes component semantic recognition and parameter inversion; a PointNet-CNN hybrid network is constructed, with the PointNet branch extracting global geometric features of the point cloud and the CNN branch analyzing the texture features of the projected image. After attention-weighted fusion, the component category probability is output through Softmax classification; based on the component category, the ancient building knowledge base is retrieved, and combined with the bounding box size initialization parameters, an optimization objective function containing distance loss and historical form regularization term is constructed. The optimal component parameter set that conforms to the ancient building specifications is solved by the Levenberg-Marquardt algorithm.
[0149] The multi-level LOD modeling and repair module is used to generate multi-level detail component models and repair defects. The LOD model is constructed in three layers: the L1 base layer uses NURBS surface fitting to generate a BIM structural model, and Poisson reconstruction simplifies the mesh; the L2 decoration layer generates normal / displacement maps based on point cloud density and Sobel gradients to restore details such as carvings; the L3 color layer uses the LSCM algorithm to map UV coordinates and generate painted texture maps; for damaged areas, Canny edge detection is used to locate the missing parts, and Pix2Pix-HD network is used for texture / geometry joint repair, outputting a complete component LOD model set.
[0150] The BIM integration and closed-loop verification module completes BIM model construction and quality control; based on optimal parameters and repaired models, it assembles BIM components through the IFC SDK development package, integrates metadata such as material properties and age parsed from XML, and exports ancient building BIM models; during the verification phase, it detects geometric accuracy and texture quality, and if it fails, it diagnoses the error type: geometric deviation returns parameter optimization, texture problems return mapping correction, connection misalignment triggers component re-segmentation, and overall distortion restarts the registration process, forming a closed-loop quality control chain.
[0151] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0152] The preferred embodiments of the invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention.
Claims
1. A parametric 3D modeling method for ancient buildings based on point cloud and texture features, characterized in that, Includes the following steps: S1. Register the ancient building point cloud set and the ancient building texture image set through cross-modal data registration to obtain a point cloud set with texture coordinates; S2. Extract the geometric and texture features of the point cloud set with texture coordinates, and perform feature fusion to obtain the ancient building fusion features; The improved density-sensitive DBSCAN algorithm is used to segment the components of the ancient building fusion features, resulting in a cloud of independent component points. S3. Merge PointNet and CNN to obtain a PointNet-CNN hybrid network; use the PointNet-CNN hybrid network to process the point cloud of independent components to obtain the component category probability distribution set; perform parameter template matching and parameter optimization based on the component category probability distribution set to obtain the optimal component parameter set; S4. Generate a component LOD model set based on the optimal component parameter set; Based on the component LOD model set, the damaged area is repaired using the Pix2Pix-HD network to obtain the repaired component LOD model set; S5. Generate a BIM model of the ancient building based on the repaired component LOD model set; The geometric and textural accuracy of the ancient building BIM model are verified. If the verification is successful, the ancient building BIM model is used as the final ancient building BIM model. Otherwise, error diagnosis is performed and the ancient building BIM model is further corrected to obtain the final ancient building BIM model.
2. The parametric 3D modeling method for ancient buildings based on point cloud and texture features according to claim 1, characterized in that, S1 includes the following steps: S11. Use a ground-based laser scanner to collect point clouds of ancient buildings to obtain a set of point clouds of ancient buildings; use a drone equipped with a tilting camera to take multi-angle photos of ancient buildings to obtain a set of texture images of ancient buildings. S12. Use the 3D-SIFT algorithm to calculate the local features of the point cloud set of ancient buildings and obtain the 3D key point set; The 2D-SIFT algorithm was used to detect image feature points in the ancient building texture image set to obtain a 2D key point set. The RANSAC algorithm filters reliable matching pairs between the 3D keypoint set and the 2D keypoint set to obtain the 2D-3D corresponding point pair set; Based on the 2D-3D corresponding point pair set, the rigid body transformation matrix is obtained through ICP iterative optimization; Based on the point cloud set of ancient buildings and the rigid body transformation matrix, a point cloud set with textured coordinates is obtained through coordinate transformation calculation.
3. The parametric 3D modeling method for ancient buildings based on point cloud and texture features according to claim 1, characterized in that, S2 includes the following steps: S21. Calculate the normal vector and curvature value of the point cloud in the point cloud set with textured coordinates using PCA covariance analysis to obtain the geometric features of the ancient building. Using the OpenCV image processing library, the HSV color histogram and LBP texture descriptor of the point cloud set with texture coordinates are extracted to obtain the texture features of the ancient building. S22. Based on the statistical features of local point clouds, the geometric weights and texture weights of ancient buildings are obtained through the variance analysis formula. Based on the geometric and texture weights of ancient buildings, a weighted splicing algorithm is used to fuse the geometric and texture features of ancient buildings to obtain fused features of ancient buildings. S23. Use the improved density-sensitive DBSCAN to segment the components of the ancient building's fusion features and obtain the cloud of independent component points.
4. The parametric 3D modeling method for ancient buildings based on point cloud and texture features according to claim 3, characterized in that, The improved density-sensitive DBSCAN algorithm in S23 is obtained through the following steps: Replace the Euclidean distance in the DBSCAN algorithm with the fused feature cosine similarity; By replacing the fixed neighborhood radius in the DBSCAN algorithm with a gradient-adaptive radius and adding feature consistency constraints, an improved density-sensitive DBSCAN algorithm is obtained.
5. The parametric 3D modeling method for ancient buildings based on point cloud and texture features according to claim 1, characterized in that, S3 includes the following steps: S31. Construct PointNet and CNN networks; use PointNet as the point cloud feature extraction branch and CNN as the texture feature extraction branch, construct a feature fusion layer and a classification decision layer to obtain a PointNet-CNN hybrid network; S32. Project the point cloud of the independent component point cloud set to obtain the component point cloud projection image set; S33. Input the independent component point cloud set and the component point cloud projection image set into the PointNet-CNN hybrid network to obtain the component category probability distribution set; S34. Based on the component categories of the independent component point cloud, template retrieval is performed through the ancient building component knowledge base to obtain a parameterized template set and an adjustable parameter set; Based on the bounding box size of the component point cloud in the independent component point cloud set, the initial component parameter set is obtained by initialization through scaling rules; S35. Based on the independent component point cloud set, parameterized template set, and adjustable parameter set, an optimization objective function is constructed through distance loss and regularization term; based on the optimization objective function and the initial component parameter set, the optimal component parameter set is obtained through the Levenberg-Marquardt algorithm.
6. The parametric 3D modeling method for ancient buildings based on point cloud and texture features according to claim 5, characterized in that, S33 includes the following steps: S331. Input the point cloud set of independent components into the PointNet network in the PointNet-CNN hybrid network, align the point cloud through the spatial transformation network, extract local features through the multilayer perceptron, and obtain global geometric features through max pooling to obtain a feature vector set representing the overall shape of the component. S332. Input the component point cloud projection image set into the CNN network in the PointNet-CNN hybrid network, extract the features from each viewpoint using ResNet50, and perform feature fusion to obtain the component texture feature vector set; S333: The feature vector set representing the overall shape of the component and the feature vector set representing the texture of the component are concatenated and weighted by attention through the feature fusion layer, and the compressed features are reduced in dimensionality through the fully connected layer to obtain the compressed fusion feature set; S334. Input the compressed and fused feature set into the classification decision layer with a double fully connected layer structure, and activate the output probability distribution through Softmax to obtain the component category probability distribution set.
7. The parametric 3D modeling method for ancient buildings based on point cloud and texture features according to claim 1, characterized in that, S4 includes the following steps: S41. Based on the optimal component parameter set, the component LOD model set is obtained through the L1 base layer, L2 decoration layer and L3 color layer respectively; S42. Based on the component LOD model set, a damaged area mask set is obtained through Canny edge detection and morphological detection. Based on the damaged area mask set, the damaged area is repaired through the Pix2Pix-HD network to obtain the repaired component LOD model set.
8. The parametric 3D modeling method for ancient buildings based on point cloud and texture features according to claim 7, characterized in that, S41 includes the following steps: S411. Input the optimal component parameter set and independent component point cloud set into the L1 base layer, obtain the base BIM model through NURBS surface fitting, and generate a simplified mesh by Poisson surface reconstruction. S412. Input the component point cloud projection image set and the density distribution of the component point cloud in the independent component point cloud set into the L2 decoration layer. Obtain the normal map and displacement map through Sobel operator gradient calculation and point cloud density distribution analysis. S413. Input the basic BIM model set and component texture image set into the L3 color layer, obtain the UV mapping set through the LSCM algorithm, and generate the painted texture set through pixel-level projection. The component LOD model set is obtained through S411, S412 and S413.
9. The parametric 3D modeling method for ancient buildings based on point cloud and texture features according to claim 1, characterized in that, S5 includes the following steps: S51. Based on the optimal component parameter set and the repaired component LOD model set, obtain the BIM model component set through the IFC SDK development package; S52. Based on ancient building archive data and ancient building material testing reports, obtain BIM metadata through XML parsing; S53. Construct a BIM model of ancient buildings based on BIM model component set and BIM metadata; S54. Verify the geometric and textural accuracy of the ancient building BIM model. If the verification is successful, the ancient building BIM model will be used as the final ancient building BIM model. If the verification fails, an error type diagnosis is performed to obtain a diagnosis result. The diagnosis result includes geometric shape deviation, texture misalignment / blurring, component connection misalignment, and overall model distortion. If the diagnosis result is geometric shape deviation, return to S3; if it is texture misalignment / blurring, return to S4; if it is component connection misalignment, return to S2; if it is overall model distortion, return to S1. Based on the diagnostic results, the BIM model of the ancient building was revised to obtain the final BIM model of the ancient building.
10. A parametric 3D modeling system for ancient architecture based on point cloud and texture features, characterized in that: The system implements the parametric 3D modeling method for ancient buildings based on point cloud and texture features as described in any one of claims 1-9, and includes a cross-modal data registration module, a feature fusion and component segmentation module, a parametric template matching and optimization module, a multi-level LOD modeling and repair module, and a BIM integration and closed-loop verification module.
Citation Information
Cited By
Method for reasoning and reconstructing original appearance of decorative component of damaged ancient building
CN121746887A