A three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning

By using 3D laser scanning technology, combined with UAV data and deep learning algorithms, high-precision registration and texture restoration of 3D models of ancient buildings have been achieved, improving the automation and geometric accuracy of the modeling process and ensuring the historical accuracy of the model.

CN120912795BActive Publication Date: 2026-02-03XIAN UNVERSITY OF ARTS & SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511449663.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-11
Publication Date
2026-02-03
Estimated Expiration
2045-10-11

AI Technical Summary

Technical Problem

Existing technologies for 3D modeling of ancient buildings suffer from problems such as low registration accuracy, easy distortion of texture restoration, and low automation in complex scenes, resulting in poor modeling effects.

Method used

A 3D laser scanning-based method is adopted to acquire raw point cloud data and texture image data through UAVs. Point cloud-image registration is performed by combining UAV flight logs. Image inpainting and feature extraction are performed using a CNN-PMRF fusion model. Geometric feature extraction is performed by combining the PointNet++ algorithm. Cross-modal fusion is performed through a dual-channel attention network to generate a geometry-texture joint feature vector. The mesh model is optimized. Finally, the model parameters are adjusted through the GBDT model to improve geometric accuracy.

Benefits of technology

It achieved high-precision registration and texture restoration of ancient building models, improved the automation level of modeling, ensured that the models conformed to historical craftsmanship standards, and solved the problem of resemblance in form but not in spirit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912795B_ABST
    Figure CN120912795B_ABST
Patent Text Reader

Abstract

The application belongs to the field of digital protection of cultural heritage, and discloses a three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning, which comprises the following steps: extracting feature points of point cloud data sets and texture image data and combining with unmanned aerial vehicle flight logs for registration; performing image restoration and feature extraction on the texture image data and point cloud-image registration results through a convolutional neural network-probabilistic Markov random field (CNN-PMRF) model; performing geometric feature extraction on the point cloud data sets and fusing texture image feature vectors to obtain geometric-texture joint feature vectors, and optimizing a rough grid model generated based on the point cloud data sets; mapping the restored texture image data to the optimized grid model to obtain a preliminary three-dimensional grid model; processing preliminary model parameters through a gradient boosting decision tree (GBDT) model to obtain a correction value, and adjusting the preliminary three-dimensional grid model based on the correction value to obtain an optimal three-dimensional model. The application can improve the accuracy of three-dimensional modeling of ancient buildings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of digital preservation technology for cultural heritage, and includes, but is not limited to, a method for three-dimensional modeling of ancient buildings based on three-dimensional laser scanning. Background Technology

[0002] Ancient architecture, as an important part of human historical and cultural heritage, carries rich cultural, artistic, and historical value. However, with the passage of time and the impact of the natural environment, many ancient buildings face varying degrees of damage and aging. To better protect and pass on these precious cultural heritages, 3D digital technology has gradually become an important tool for the protection and research of ancient buildings. Through 3D modeling, the geometric structure and textural details of ancient buildings can be accurately recorded, providing strong support for their restoration, protection, research, and display.

[0003] In recent years, with the rapid development of drone technology, LiDAR technology, high-definition photogrammetry technology, and deep learning algorithms, the accuracy and efficiency of 3D modeling of ancient buildings have been significantly improved. Drones equipped with LiDAR and high-definition cameras can quickly acquire high-precision point cloud data and texture image data of ancient buildings, providing rich basic data for 3D modeling. At the same time, the application of deep learning technology in image processing and point cloud analysis makes texture restoration, feature extraction, and model optimization more efficient and intelligent. However, traditional texture restoration methods are prone to distortion when processing complex textures, have low accuracy in point cloud and image registration in low-texture areas, and the optimization process of 3D models relies on manual adjustments, which is inefficient and has a high error rate, resulting in poor performance of 3D modeling of ancient buildings in complex scenes.

[0004] Therefore, there is an urgent need for a highly accurate method for modeling ancient buildings to solve the problems of low registration accuracy, easy distortion of texture restoration, and low degree of automation in existing technologies, so as to achieve a significant improvement in the automation and accuracy of ancient building modeling and ensure historical authenticity. Summary of the Invention

[0005] This application provides a method for 3D modeling of ancient buildings based on 3D laser scanning.

[0006] The technical solution of this application embodiment is implemented as follows:

[0007] In a first aspect, embodiments of this application provide a method for 3D modeling of ancient buildings based on 3D laser scanning. The method includes: acquiring an original point cloud dataset, original texture image data, and drone flight logs after scanning the ancient building using a drone; preprocessing the original point cloud dataset and original texture image data to generate a point cloud dataset and texture image data; extracting feature points from the point cloud dataset and texture image data, and performing point cloud-image registration in conjunction with the drone flight logs to obtain a point cloud-image registration result; inputting the texture image data and the point cloud-image registration result into a CNN-PMRF fusion model for image restoration and feature extraction to obtain restored texture image data and texture image feature vectors; and then using P... The ointNet++ algorithm extracts geometric features from a point cloud dataset to obtain point cloud geometric feature vectors. A dual-channel attention network fuses the texture image feature vectors with the point cloud geometric feature vectors to generate a geometry-texture joint feature vector. A coarse mesh model is generated based on the point cloud dataset. The mesh structure of the coarse mesh model is optimized using the geometry-texture joint feature vector to obtain an optimized mesh model. The repaired texture image data is then mapped to the optimized mesh model to obtain a preliminary 3D mesh model. Preliminary model parameters are extracted from the preliminary 3D mesh model and input into the GBDT model to obtain correction values. Based on these correction values, the preliminary 3D mesh model is adjusted to obtain the optimal 3D model.

[0008] The technical solution provided in this application acquires the original point cloud dataset, original texture image data, and UAV flight logs after scanning ancient buildings by a UAV, ensuring the accuracy of the original data and laying a solid foundation for subsequent processing based on the original data. The original point cloud dataset and original texture image data are preprocessed to generate point cloud datasets and texture image data. Feature points are extracted from the point cloud dataset and texture image data, and point cloud-image registration is performed in conjunction with the UAV flight logs to obtain point cloud-image registration results, achieving high-precision registration of low-texture areas of the ancient building. The texture image data and point cloud-image registration results are input into a CNN-PMRF fusion model for image restoration and feature extraction, obtaining restored texture image data and texture image feature vectors. This achieves intelligent restoration guided by 3D geometry, improving the quality of the texture image while strictly maintaining the coordinate relationship between the texture image and the 3D model. Geometric features are extracted from the point cloud dataset using the PointNet++ algorithm. A density-adaptive strategy is employed to address the uneven density of point clouds, yielding geometric feature vectors that enable precise extraction of detailed geometric features from ancient architectural components. A dual-channel attention network fuses texture image feature vectors with point cloud geometric feature vectors, achieving cross-modal fusion. This automatically focuses on and enhances the texture and geometric information of key areas, generating a geometry-texture joint feature vector to guide subsequent modeling. A coarse mesh model is generated based on the point cloud dataset. The mesh structure of the coarse mesh model is optimized using the geometry-texture joint feature vector, resulting in an optimized mesh model. The repaired texture image data is then mapped onto the optimized mesh model to obtain a preliminary 3D mesh model. Preliminary model parameters are extracted from the preliminary 3D mesh model and input into the GBDT model to obtain correction values. Based on these correction values, the preliminary 3D mesh model is adjusted to obtain the optimal 3D model. This significantly improves the geometric accuracy of the ancient architectural model and ensures that the model conforms to historical craftsmanship standards, resolving the issue of superficial resemblance to historical features.

[0009] Optionally, feature points are extracted from the point cloud dataset and texture image data, and point cloud-image registration is performed in conjunction with UAV flight logs to obtain point cloud-image registration results. This includes: projecting the point cloud dataset onto a two-dimensional plane and extracting the first Harris corner and geometric edge features from it; extracting the second Harris corner and image edge features from the texture image data; providing initial pose estimation using UAV attitude data and GNS positioning information from the UAV flight logs; performing feature matching based on the first Harris corner, geometric edge features, second Harris corner, and image edge features; determining the initial transformation matrix using the RANSAC-PnP algorithm based on the matched feature pairs; and performing fine registration of the initial transformation matrix using the ICP variant algorithm in conjunction with the point cloud reflection intensity value and image grayscale value to obtain point cloud-image registration results. The point cloud-image registration results include a registration matrix and a pixel coordinate correspondence table.

[0010] Optionally, the CNN-PMRF fusion model includes a first convolutional neural network, a PMRF network, and a second convolutional neural network, with the PMRF network embedded in the fully connected layer of the first convolutional neural network. The texture image data and point cloud-image registration results are input into the CNN-PMRF fusion model for image inpainting and feature extraction, resulting in inpainted texture image data and texture image feature vectors. This includes: processing the texture image data using the first convolutional neural network to generate an initial feature map, the first convolutional neural network containing two convolutional layers and no pooling layers; dividing the initial feature map into multiple feature blocks and compressing them into fixed-dimensional vectors to form multiple feature nodes using the PMRF network; constructing a node graph and improving texture similarity for feature nodes in the point cloud geometric edge image region. Degree weights are assigned, an energy function is designed, and a belief propagation algorithm is executed to iteratively optimize the feature nodes, resulting in an optimized feature map. The energy function includes the Euclidean distance between node features and local texture similarity. Edge feature maps and texture direction maps are extracted from the optimized feature map to obtain restoration cues. The texture image data is divided into pixel block nodes, and the 3D spatial distance between the corresponding point clouds of adjacent pixel block nodes is determined according to the pixel coordinate correspondence table. A restoration energy function is constructed and optimized based on the 3D spatial distance. Combining the restoration cues, the restoration energy function is iteratively optimized through the belief propagation algorithm until it is minimized, resulting in a restored texture image. The restored texture image is processed by a second convolutional neural network to extract the depth features of the restored texture image and generate a texture image feature vector.

[0011] Optionally, geometric feature extraction is performed on the point cloud dataset using the PointNet++ algorithm to obtain point cloud geometric feature vectors. This includes: segmenting the point cloud dataset into components based on a region growing algorithm to obtain multiple independent component point sets, including columns, beams, and brackets; normalizing each independent component point set; and sampling key points from each normalized independent component point set using a farthest point sampling algorithm to obtain a key point set; inputting the key point set into the PointNet++ algorithm, where farthest point sampling is performed on the key point set at each set abstraction layer in the PointNet++ algorithm to obtain the next... A sampling point set is generated, and for each point in the sampling point set, a ball query is used to determine the neighborhood point set of each point. For the neighborhood point set of high-density regions, feature aggregation is performed through max pooling and attention weighting mechanisms. For the neighborhood point set of low-density regions, feature aggregation is performed through average pooling and global feature supplementation mechanisms to obtain the geometric feature vector corresponding to each independent component point set. The geometric feature vectors corresponding to each independent component point set are fused and processed through a fully connected layer to obtain the point cloud geometric feature vector. The point density in high-density regions is higher than 100 points per square meter, and the point density in low-density regions is lower than 50 points per square meter.

[0012] Optionally, a dual-channel attention network is used to fuse the texture image feature vector and the point cloud geometric feature vector to generate a geometry-texture joint feature vector. This includes: matching the point cloud geometric feature vector with the corresponding texture image feature vector based on a pixel coordinate correspondence table; for unmatched features, interpolation is performed from neighboring successfully matched features using a spatially weighted K-nearest neighbor algorithm before rematching; each pair of matched texture image feature vectors is concatenated with the point cloud geometric feature vector to generate an initial fused feature vector; the initial fused feature vector is processed by a channel attention network to generate a channel attention weight vector; the channel attention weight vector is multiplied element-wise with the initial fused feature vector to obtain a channel-weighted feature vector. In the process, the channel attention weight vector assigns higher weights to the texture detail channel in the texture image feature vector and the geometric structure channel in the point cloud geometric feature vector than to the other channels. The channel-weighted feature vector is input into the spatial attention network, and a spatial attention weight map is generated by combining it with the pixel coordinate correspondence table. The spatial attention weight map is multiplied element-wise with the channel-weighted feature vector to obtain a channel-spatial dual-weighted feature vector. The spatial attention weight map assigns higher weights to the key structural areas of the ancient building than to the other structural areas. The channel-spatial dual-weighted feature vector is then standardized to obtain a standardized fusion feature. Abnormal features in the standardized fusion feature are then removed to obtain a geometric-texture joint feature vector.

[0013] Optionally, a coarse mesh model is generated based on the point cloud dataset. The mesh structure of the coarse mesh model is optimized using geometry-texture joint feature vectors to obtain an optimized mesh model. The repaired texture image data is then mapped to the optimized mesh model to obtain a preliminary 3D mesh model. This includes: processing the point cloud dataset using the Poisson surface reconstruction algorithm to generate a preliminary triangular mesh model, and simplifying the preliminary triangular mesh model to generate a coarse mesh model; identifying high curvature regions and textured complex regions in the coarse mesh model based on geometry-texture joint feature vectors, adaptively refining the mesh in these regions, and smoothing the refined mesh surface using the Laplacian smoothing algorithm to obtain an optimized mesh model; and using a region-based UV unwrapping strategy based on a pixel coordinate correspondence table, independently calculating UV coordinates according to the semantic partitions of each independent component in the optimized mesh model, and attaching the repaired texture image data to the surface of the optimized mesh model according to the UV coordinates to generate a textured preliminary 3D mesh model.

[0014] Optionally, the GBDT model is trained through the following process: obtaining preliminary model parameter samples, inputting the preliminary model parameter samples into the GBDT model to be trained to obtain the predicted parameter correction values; calculating the loss between the predicted parameter correction values ​​and the true parameter correction values ​​based on the preset loss function, and using the loss to train the GBDT model to be trained until the GBDT model reaches the preset accuracy.

[0015] Optionally, the preliminary model parameters include geometric parameters and texture parameters. Geometric parameters include vertex coordinate deviation, component size, and structural angles, while texture parameters include sharpness and color values. The preliminary model parameters are input into the GBDT model to obtain correction values. Based on the correction values, the preliminary 3D mesh model is adjusted to obtain the optimal 3D model. This includes: predicting the preliminary model parameters using the trained GBDT model to obtain geometric parameter correction values ​​and texture parameter correction values; adjusting the vertex coordinate deviation, component size, and structural angles of the preliminary 3D mesh model based on the geometric parameter correction values, and adjusting the sharpness and color values ​​of the preliminary 3D mesh model based on the texture parameter correction values ​​to obtain optimized model parameters; calculating the mean square error between the optimized model parameters and the actual ancient building parameters. If the mean square error is greater than a preset threshold, the GBDT model is retrained and the optimized model parameters are iteratively optimized until the optimized model parameters reach a preset accuracy, thus obtaining the optimal 3D model.

[0016] Secondly, embodiments of this application provide an electronic device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements the steps in the above-mentioned method for three-dimensional modeling of ancient buildings based on three-dimensional laser scanning.

[0017] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the above-described method for three-dimensional modeling of ancient buildings based on three-dimensional laser scanning.

[0018] The beneficial effects of the technical solutions provided in this application include at least the following:

[0019] This application provides a method for 3D modeling of ancient buildings based on 3D laser scanning. It acquires the original point cloud dataset, original texture image data, and UAV flight logs after scanning the ancient building using a UAV, ensuring the accuracy of the original data and laying a solid foundation for subsequent processing based on the original data. The method preprocesses the original point cloud dataset and original texture image data to generate point cloud datasets and texture image data. Feature points are extracted from the point cloud dataset and texture image data, and point cloud-image registration is performed using the UAV flight logs to obtain the point cloud-image registration result, achieving high-precision registration of low-texture areas of the ancient building. The texture image data and point cloud-image registration result are input into a CNN-PMRF fusion model for image restoration and feature extraction, obtaining restored texture image data and texture image feature vectors. This achieves intelligent restoration guided by 3D geometry, improving the quality of the texture image while strictly maintaining the coordinate relationship between the texture image and the 3D model. The point cloud dataset is further processed using the PointNet++ algorithm. Geometric feature extraction is performed, employing a density adaptive strategy to address the uneven density of point clouds, resulting in geometric feature vectors that accurately extract detailed geometric features of ancient architectural components. A dual-channel attention network fuses texture image feature vectors with point cloud geometric feature vectors, achieving cross-modal fusion. This automatically focuses on and enhances the texture and geometric information of key areas, generating a geometry-texture joint feature vector to guide subsequent modeling. A coarse mesh model is generated based on the point cloud dataset. The mesh structure of the coarse mesh model is optimized using the geometry-texture joint feature vector, resulting in an optimized mesh model. The repaired texture image data is then mapped to the optimized mesh model, yielding a preliminary 3D mesh model. Preliminary model parameters are extracted from the preliminary 3D mesh model and input into the GBDT model to obtain correction values. Based on these correction values, the preliminary 3D mesh model is adjusted to obtain the optimal 3D model, significantly improving the geometric accuracy of the ancient architectural model and ensuring it conforms to historical craftsmanship standards, thus resolving the issue of superficial resemblance to historical features. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application, 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein:

[0021] Figure 1 A flowchart illustrating a method for 3D modeling of ancient buildings based on 3D laser scanning, provided as an embodiment of this application;

[0022] Figure 2 This is a schematic diagram of the hardware entity of an electronic device provided in an embodiment of this application. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0025] It should be noted that the terms "first, second, and third" used in the embodiments of this application are merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0026] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. It should also be understood that terms such as those defined in general dictionaries should be understood to have a meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0027] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0028] In view of the current problems in the research on three-dimensional modeling of ancient buildings in the field of digital preservation technology of cultural heritage, this application provides a method for three-dimensional modeling of ancient buildings based on three-dimensional laser scanning.

[0029] The technical solution of this application is described below, starting with the method embodiments.

[0030] Please refer to Figure 1 It illustrates a flowchart of a three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning, as provided in an embodiment of this application. Figure 1 As shown, the method includes at least the following steps S110 to S150.

[0031] Step S110: Obtain the original point cloud dataset, original texture image data, and drone flight logs after the drone scans the ancient building.

[0032] In this embodiment, an unmanned aerial vehicle (UAV) is used to scan the ancient building from all directions to obtain the original point cloud dataset, original texture image data, and UAV flight log. The UAV is equipped with a lidar and a high-definition camera. Based on the structural characteristics of the ancient building, a layered and partitioned scanning strategy is adopted to divide the ancient building into three areas: the bottom area, the middle area, and the top area. The corresponding flight altitude is used for scanning, and finally the original point cloud dataset and high-definition original texture image data are obtained. The precise spatiotemporal information of all data is recorded through the UAV flight log.

[0033] Step S120: Preprocess the original point cloud dataset and the original texture image data to generate point cloud dataset and texture image data. Extract feature points from the point cloud dataset and texture image data, and perform point cloud-image registration in conjunction with UAV flight logs to obtain point cloud-image registration results.

[0034] In this embodiment, the original point cloud dataset is preprocessed. Specifically, isolated noise points are removed from the original point cloud dataset through statistical filtering, and filtering is performed according to the point cloud density distribution. Small-radius fine filtering is used for high-density areas, and large-radius filtering is used to remove flying points for low-density areas. Finally, a feature-preserving downsampling strategy is used to reduce the number of points in the original point cloud dataset after denoising and filtering to below a preset number, and the point cloud data is uniformly converted to a geodetic coordinate system to obtain the preprocessed point cloud dataset. The original texture image data is also preprocessed. Specifically, distortion correction is performed on the original texture image data based on camera intrinsic parameters obtained using the Zhang Zhengyou calibration method, and an adaptive denoising strategy is used. Gaussian filtering is applied to smooth areas in the distortion-corrected original texture image data, and non-local mean denoising is applied to high-detail areas. Finally, all texture images are adjusted to uniform pixels to obtain the preprocessed texture image data.

[0035] In this embodiment, feature points are extracted from the point cloud dataset and texture image data, and point cloud-image registration is performed in conjunction with UAV flight logs to obtain the point cloud-image registration result. Specifically, the preprocessed point cloud dataset is projected onto a two-dimensional plane, from which first Harris corner points based on normal vector changes and geometric edge features based on normal vector mutations are extracted. Second Harris corner points based on grayscale gradients and image edge features are extracted from the preprocessed texture image data. High-precision initial pose estimation is provided using UAV attitude data and Global Navigation Satellite System (GNSS) positioning information from the UAV flight logs, significantly reducing the search space and improving the initial accuracy and efficiency of registration. Based on the first Harris corner points, geometric edge features, second Harris corner points, and image edge features, the RANSAC-PnP algorithm is used to determine the initial transformation matrix, thereby completing the initial registration. Furthermore, by combining the point cloud reflection intensity value and the image grayscale value, the initial transformation matrix is ​​finely registered according to the ICP variant algorithm to minimize the registration error. The registration error includes geometric error and photometric error. The geometric error is the point cloud coordinate, and the photometric error is the difference between the point cloud reflection intensity value and the image grayscale value. This significantly improves the registration stability and accuracy in low-texture areas, and finally obtains the point cloud-image registration result. The point cloud-image registration result includes a registration matrix and a pixel coordinate correspondence table. The registration matrix includes the spatial transformation relationship between the point cloud and the texture image, and the pixel coordinate correspondence table includes the mapping relationship between the texture image pixels and the three-dimensional coordinates of the point cloud.

[0036] Step S130: Input the texture image data and point cloud-image registration results into the CNN-PMRF fusion model for image inpainting and feature extraction to obtain the inpainted texture image data and texture image feature vector; extract geometric features from the point cloud dataset using the PointNet++ algorithm to obtain the point cloud geometric feature vector; and fuse the texture image feature vector and the point cloud geometric feature vector using a dual-channel attention network to generate a geometric-texture joint feature vector.

[0037] In this embodiment, texture image data and point cloud-image registration results are input into a CNN-PMRF fusion model for image inpainting and feature extraction, resulting in inpainted texture image data and texture image feature vectors. Specifically, the CNN-PMRF fusion model includes a first convolutional neural network, a PMRF network, and a second convolutional neural network. The PMRF network is embedded in the fully connected layer of the first convolutional neural network. The texture image data is processed by the first convolutional neural network, which contains two convolutional layers. The first convolutional layer extracts basic color blocks and edge contours, such as wall boundaries, while the second convolutional layer enhances texture detail features, such as brick seam direction and carved pattern direction, thereby obtaining an initial feature map. Furthermore, there are no pooling layers in the convolutional neural network, ensuring that the output initial feature map maintains the original spatial resolution. Furthermore, the initial feature map is divided into multiple feature blocks using a PMRF network, and each feature block is compressed into a fixed-dimensional vector through global average pooling to form multiple feature nodes. All feature nodes are connected using a 4-neighborhood approach to construct a sparse Markov random field node graph. The image pixel regions corresponding to the geometric edges of the point cloud are determined based on the registration matrix. An energy function incorporating Euclidean distance and local texture similarity of node features is designed, and the texture similarity weight is increased for feature nodes in the geometric edge image regions of the point cloud. The feature nodes are iteratively optimized using a belief propagation algorithm, with 10-15 iterations to optimize the feature values ​​of all nodes. The optimized node features are then reconstructed to obtain the optimized feature map. Edge feature maps and texture direction maps are extracted from the optimized feature map and used as the basis for repair. The guiding cues, or repair cues, are further used to construct a repair energy function. This repair energy function includes a data term and a smoothing term. The data term is used to protect the undamaged areas, and the smoothing term is used to ensure the continuity between the repaired area and the surrounding area. The texture image data is divided into pixel block nodes, and the three-dimensional spatial distance between the point clouds corresponding to adjacent pixel block nodes is determined according to the pixel coordinate correspondence table to determine whether the adjacent pixel block nodes belong to the same building component. The repair energy function is optimized based on the three-dimensional spatial distance. For example, when the three-dimensional spatial distance is greater than 0.05, it indicates that adjacent image nodes may cross components, so the weight of the smoothing term in the repair energy function is reduced to avoid mutual interference between textures of different components. Combined with the repair cues, the repair energy function is iteratively optimized through a belief propagation algorithm until the optimized repair energy function is minimized, thus obtaining the repaired texture image.The restored texture image is processed by a second convolutional neural network to extract its depth features. This second convolutional neural network includes 5 convolutional layers and 2 max pooling layers. The first and second convolutional layers are used to capture local features, such as carved patterns, while the third, fourth, and fifth convolutional layers are used to integrate global features, such as the overall structure of the bracket set, to obtain a texture image feature vector. Furthermore, the texture image feature vector is bound to a pixel coordinate mapping table so that the texture image feature vector can be mapped to three-dimensional point cloud coordinates.

[0038] In this embodiment, the PointNet++ algorithm is used to extract geometric features from the point cloud dataset to obtain point cloud geometric feature vectors. Specifically, the point cloud dataset is segmented into components based on a region growing algorithm, resulting in multiple independent component point sets including columns, beams, and brackets. Coordinate normalization is performed on each independent component point set, unifying its coordinate values ​​to the [-1, 1] interval. Then, a farthest-point sampling algorithm is used to sample 1024 key points from each normalized independent component point set, resulting in a key point set. This key point set is input into the PointNet++ algorithm, which includes three ensemble abstraction layers. In the first ensemble abstraction layer, farthest-point sampling is performed on the 1024 key points to obtain a downsampled point set containing 512 key points. For each point in this downsampled point set, a ball query is used to determine the neighborhood point set. Similarly, the second ensemble abstraction layer samples 256 key points, and the ball query radius is expanded to capture a wider range of features. The third ensemble abstraction layer samples 128 points to integrate macroscopic structural features. Furthermore, for the neighborhood point sets of high-density areas such as dougong (bracket sets) with a point density exceeding 100 points per square meter, a strategy combining max pooling and attention weighting is adopted. Specifically, attention weights are generated by calculating the geometric correlation (i.e., Euclidean distance) and detail importance (i.e., curvature value) between neighborhood points and the center point. After weighting, max pooling is performed to preserve detailed features, thus completing the feature aggregation processing of high-density areas. For the neighborhood point sets of low-density areas with a point density below 50 points per square meter, a strategy combining average pooling and global feature supplementation is adopted. After feature supplementation is completed through K-nearest neighbor interpolation, the global features and local features of the current layer are concatenated to construct fused features. Then, average pooling is performed to enhance continuity, thus completing the feature aggregation processing of low-density areas. This yields the geometric feature vector corresponding to each independent component point set. The geometric feature vectors corresponding to each independent component point set are fused and processed through a fully connected layer to obtain the point cloud geometric feature vector. This point cloud geometric feature vector includes geometric features such as the size of each component, structural outline, and spatial relationships.

[0039] In this embodiment, a dual-channel attention network is used to fuse texture image feature vectors and point cloud geometric feature vectors to generate a geometry-texture joint feature vector. Specifically, based on a pixel coordinate correspondence table, the point cloud geometric feature vectors and their corresponding texture image feature vectors are precisely matched according to their spatial positions. For features that fail to match due to occlusion or other reasons, a spatially weighted K-nearest neighbor algorithm is used to interpolate and fill the gaps from the three nearest successfully matched features before rematching. Abnormal matching pairs with geometric-texture logical conflicts are eliminated based on normal vector consistency checks. Each pair of matched texture image feature vectors is then concatenated with the point cloud geometric feature vectors to generate an initial fused feature vector. Furthermore, the initial fused feature vector is input into a channel attention network. Channel statistics are obtained through global average pooling, and channel attention weight vectors are obtained through a two-layer fully connected network. The channel attention weight vector is then multiplied element-wise with the initial fused feature vector. For texture detail channels in the texture image feature vector, such as painted colors and carved patterns, a 20% weighting is applied. For geometric structure channels in the point cloud geometric feature vector, such as component size and spatial position, a 30% weighting is applied, resulting in a channel-weighted feature vector. The channel-weighted feature vector is then concatenated and compressed with the three-dimensional spatial coordinates provided by the pixel coordinate correspondence table. This is then processed through a spatial attention network to obtain a spatial attention weight map. The spatial attention weight map is then multiplied element-wise with the channel-weighted feature vector. Key structural areas such as brackets and painted decorations of ancient buildings are assigned a weight of 1.2 to 1.5 times, while ordinary structural areas such as flat wall areas are assigned a weight of 0.8 to 1.0 times, resulting in a channel-space dual-weighted feature vector. Finally, the channel-space weighted feature vectors are standardized through a batch normalization layer to obtain standardized fused features. The cosine similarity of features in the same type of component region is calculated, and abnormal features with similarity greater than 0.3 in different types of region are removed. Finally, the geometry-texture joint feature vector is obtained.

[0040] Step S140: Generate a coarse mesh model based on the point cloud dataset, optimize the mesh structure of the coarse mesh model through the geometry-texture joint feature vector to obtain an optimized mesh model, and map the repaired texture image data to the optimized mesh model to obtain a preliminary three-dimensional mesh model.

[0041] In this embodiment, a coarse mesh model is generated based on a point cloud dataset. The mesh structure of the coarse mesh model is optimized using a geometry-texture joint feature vector to obtain an optimized mesh model. The repaired texture image data is then mapped to the optimized mesh model to obtain a preliminary 3D mesh model. Specifically, the point cloud dataset is processed using the Poisson surface reconstruction algorithm to generate a preliminary mesh model containing approximately 1.8 million triangular faces, i.e., a preliminary triangular mesh model. A feature-sensitive simplification algorithm is then used to simplify the preliminary triangular mesh model, retaining more than 95% of the detailed features while reducing the number of triangular faces in the model to 1.62 million. Non-manifold geometric structures are also cleaned up to obtain the coarse mesh model. Furthermore, based on the geometry-texture joint feature vector identification, key regions in the coarse mesh model are identified, namely high-curvature regions such as the corners of the bracket sets with a curvature value greater than 0.5 and textured complex regions such as painted areas with a texture complexity greater than 30. The meshes corresponding to these high-curvature and textured complex regions are adaptively refined, and the refined mesh surface is smoothed using a Laplacian smoothing algorithm to eliminate jagged imperfections, resulting in an optimized mesh model with approximately 1.56 million triangular facets. Further, based on the pixel coordinate correspondence table, a regional UV unwrapping strategy is adopted. UV coordinates are independently calculated according to the semantic partitions of each independent component in the optimized mesh model, such as bracket sets, columns, and walls, avoiding cross-component texture stretching. The repaired texture image data is accurately mapped to the surface of the optimized mesh model according to the UV coordinates, ultimately generating a preliminary textured 3D mesh model with more than or equal to 1 million triangular facets and a texture mapping error less than or equal to 0.1 mm. This preliminary 3D mesh model fully preserves millimeter-level details such as bracket tenon and mortise joints and carved patterns.

[0042] Step S150: Extract preliminary model parameters from the preliminary 3D mesh model, input the preliminary model parameters into the GBDT model to obtain correction values, adjust the preliminary 3D mesh model based on the correction values, and obtain the optimal 3D model.

[0043] In this embodiment, preliminary model parameters are extracted from a preliminary 3D mesh model. These parameters include geometric parameters and texture parameters. Geometric parameters include vertex coordinate deviation, component dimensions, and structural angles. Texture parameters include sharpness and color values. The preliminary model parameters are input into the GBDT model to obtain correction values. Based on these correction values, the preliminary 3D mesh model is adjusted to obtain the optimal 3D model. Specifically, the GBDT model is trained through the following process: obtaining preliminary model parameter samples; inputting these samples into the GBDT model to be trained to obtain predicted parameter correction values; calculating the loss between the predicted parameter correction values ​​and the actual parameter correction values ​​based on a preset loss function; and using this loss to train the GBDT model until it reaches a preset accuracy. The initial model parameters are input into the trained GBDT model for prediction, resulting in geometric parameter correction values ​​and texture parameter correction values. Based on the geometric parameter correction values, the vertex coordinate deviation, component dimensions, and structural angles of the initial 3D mesh model are adjusted. Based on the texture parameter correction values, the sharpness and color values ​​of the initial 3D mesh model are adjusted to obtain optimized model parameters. For example, the width of the bracket set is corrected from 0.32 meters to 0.28 meters, the roof slope from 32 degrees to 30 degrees, and the vertex coordinate deviation is reduced to 0.004 meters. The mean square error between the optimized model parameters and the actual ancient building parameters is calculated. If the mean square error exceeds a preset threshold, the GBDT model is retrained, and the optimized model parameters are iteratively optimized until they reach the preset accuracy, resulting in the optimal 3D model.

[0044] In summary, the present application provides a method for 3D modeling of ancient buildings based on 3D laser scanning. This method acquires the original point cloud dataset, original texture image data, and UAV flight logs after scanning the ancient building using a UAV, ensuring the accuracy of the original data and laying a solid foundation for subsequent processing based on the original data. Preprocessing of the original point cloud dataset and original texture image data generates point cloud datasets and texture image data. Feature points are extracted from the point cloud dataset and texture image data, and point cloud-image registration is performed using the UAV flight logs to obtain point cloud-image registration results, achieving high-precision registration of low-texture areas of the ancient building. The texture image data and point cloud-image registration results are input into a CNN-PMRF fusion model for image restoration and feature extraction, obtaining restored texture image data and texture image feature vectors. This achieves intelligent restoration guided by 3D geometry, improving the quality of the texture image while strictly maintaining the coordinate relationship between the texture image and the 3D model. The PointNet++ algorithm is used to process the point cloud data. Geometric feature extraction is performed on the dataset. A density-adaptive strategy is used to address the uneven density of point clouds, resulting in geometric feature vectors for the point clouds. This enables precise extraction of detailed geometric features of ancient architectural components. A dual-channel attention network is used to fuse texture image feature vectors with point cloud geometric feature vectors, achieving cross-modal fusion. This automatically focuses on and enhances the texture and geometric information of key areas, generating a geometry-texture joint feature vector, which guides subsequent modeling processes. A coarse mesh model is generated based on the point cloud dataset. The mesh structure of the coarse mesh model is optimized using the geometry-texture joint feature vector, resulting in an optimized mesh model. The repaired texture image data is then mapped onto the optimized mesh model to obtain a preliminary 3D mesh model. Preliminary model parameters are extracted from the preliminary 3D mesh model and input into the GBDT model to obtain correction values. The preliminary 3D mesh model is then adjusted based on these correction values ​​to obtain the optimal 3D model. This significantly improves the geometric accuracy of the ancient architectural model and ensures that the model conforms to historical craftsmanship standards, resolving the issue of superficial resemblance to historical features.

[0045] It should be noted that, in the embodiments of this application, if the above-mentioned method for 3D modeling of ancient buildings based on 3D laser scanning is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.

[0046] Correspondingly, embodiments of this application provide a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps in any of the three-dimensional laser scanning-based three-dimensional modeling methods for ancient buildings described in the above embodiments. Correspondingly, embodiments of this application also provide a computer program product. When executed by a processor of an electronic device, the computer program product is used to implement the steps in any of the three-dimensional laser scanning-based three-dimensional modeling methods for ancient buildings described in the above embodiments.

[0047] Based on the same technical concept, this application provides an electronic device for implementing a three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning as described in the above method embodiments. Figure 2 This is a hardware entity diagram of an electronic device provided in an embodiment of this application, such as... Figure 2 As shown, the electronic device 200 includes a memory 210 and a processor 220. The memory 210 stores a computer program that can run on the processor 220. When the processor 220 executes the program, it implements the steps in any of the embodiments of this application of a three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning.

[0048] The memory 210 is configured to store instructions and applications executable by the processor 220, and can also cache data to be processed or already processed by the processor 220 and various modules in the electronic device (e.g., image data, audio data, voice communication data and video communication data), which can be implemented by flash memory or random access memory (RAM).

[0049] When processor 220 executes a program, it implements the steps of a three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning, as described above. Processor 220 typically controls the overall operation of electronic device 200.

[0050] The aforementioned processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that other electronic devices can also implement the functions of the aforementioned processor, and this application does not specifically limit the specific implementation.

[0051] The aforementioned computer storage media / memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various electronic devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0052] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0053] It should be understood that the phrase "an embodiment" or "one embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "one embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0054] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0055] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0056] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0057] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0058] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause the device automatic test line to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0059] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0060] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0061] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for 3D modeling of ancient buildings based on 3D laser scanning, characterized in that, The method includes: Obtain the raw point cloud dataset, raw texture image data, and drone flight logs after the drone scans the ancient building; The original point cloud dataset and original texture image data are preprocessed to generate point cloud dataset and texture image data. Feature points are extracted from the point cloud dataset and texture image data, and point cloud-image registration is performed in combination with UAV flight logs to obtain point cloud-image registration results. The texture image data and point cloud-image registration results are input into the CNN-PMRF fusion model for image inpainting and feature extraction, resulting in inpainted texture image data and texture image feature vectors. Geometric features are extracted from the point cloud dataset using the PointNet++ algorithm to obtain point cloud geometric feature vectors. The texture image feature vectors and point cloud geometric feature vectors are fused using a dual-channel attention network to generate a geometric-texture joint feature vector. The CNN-PMRF fusion model includes a first convolutional neural network, a PMRF network, and a second convolutional neural network, with the PMRF network embedded in the fully connected layer of the first convolutional neural network. A coarse mesh model is generated based on a point cloud dataset. The mesh structure of the coarse mesh model is optimized by using geometry-texture joint feature vectors to obtain an optimized mesh model. The repaired texture image data is then mapped to the optimized mesh model to obtain a preliminary 3D mesh model. Preliminary model parameters are extracted from the preliminary 3D mesh model, and then input into the GBDT model to obtain correction values. The preliminary 3D mesh model is adjusted based on the correction values ​​to obtain the optimal 3D model. The texture image data and point cloud-image registration results are input into the CNN-PMRF fusion model for image inpainting and feature extraction, resulting in inpainted texture image data and texture image feature vectors, including: The texture image data is processed by the first convolutional neural network to generate an initial feature map. The first convolutional neural network contains two convolutional layers and no pooling layers. The initial feature map is divided into multiple feature blocks and compressed into fixed-dimensional vectors to form multiple feature nodes using a PMRF network. A node graph is constructed, and the texture similarity weights of feature nodes in the geometric edge image region of the point cloud are increased. An energy function is designed, and a belief propagation algorithm is executed to iteratively optimize the feature nodes, resulting in an optimized feature map. The energy function includes the Euclidean distance of node features and local texture similarity. Edge feature maps and texture orientation maps are extracted from the optimized feature map to obtain repair clues. The texture image data is divided into pixel block nodes. The three-dimensional spatial distance between the point clouds corresponding to adjacent pixel block nodes is determined according to the pixel coordinate correspondence table. A repair energy function is constructed and optimized based on the three-dimensional spatial distance. Combined with repair cues, the repair energy function is iteratively optimized through the belief propagation algorithm until it is minimized, and the repaired texture image is obtained. The restored texture image is processed by a second convolutional neural network to extract its depth features and generate a texture image feature vector.

2. The method according to claim 1, characterized in that, Feature points were extracted from point cloud datasets and texture image data, and point cloud-image registration was performed using UAV flight logs to obtain point cloud-image registration results, including: The point cloud dataset is projected onto a two-dimensional plane and the first Harris corner and geometric edge features are extracted from it. The second Harris corner and image edge features are extracted from the texture image data. Initial pose estimation is provided by using UAV attitude data and GNS positioning information from UAV flight logs. Feature matching is performed based on the first Harris corner, geometric edge features, second Harris corner, and image edge features. The initial transformation matrix is ​​determined by the RANSAC-PnP algorithm based on the matched feature pairs. By combining the point cloud reflection intensity value and the image gray value, the initial transformation matrix is ​​finely registered according to the ICP variant algorithm to obtain the point cloud-image registration result, which includes the registration matrix and the pixel coordinate correspondence table.

3. The method according to claim 1, characterized in that, Geometric features of the point cloud dataset are extracted using the PointNet++ algorithm to obtain point cloud geometric feature vectors, including: The point cloud dataset is segmented into components based on the region growing algorithm to obtain multiple independent component point sets, including columns, beams, and brackets. Each independent component point set is normalized, and key points are sampled from each normalized independent component point set using the farthest point sampling algorithm to obtain a key point set. The keypoint set is input into the PointNet++ algorithm. At each set abstraction layer in the PointNet++ algorithm, the farthest point of the keypoint set is sampled to obtain the downsampled point set. For each point in the downsampled point set, the neighborhood point set of each point is determined by ball query. For neighborhood point sets in high-density areas, feature aggregation is performed using max pooling and attention weighting mechanisms. For neighborhood point sets in low-density areas, feature aggregation is performed using average pooling and global feature supplementation mechanisms to obtain geometric feature vectors corresponding to each independent component point set. The geometric feature vectors corresponding to each independent component point set are then fused and processed through a fully connected layer to obtain point cloud geometric feature vectors. The point density in high-density areas is higher than 100 points per square meter, and the point density in low-density areas is lower than 50 points per square meter.

4. The method according to claim 3, characterized in that, A dual-channel attention network is used to fuse texture image feature vectors and point cloud geometric feature vectors to generate a geometry-texture joint feature vector, including: Based on the pixel coordinate correspondence table, the point cloud geometric feature vector and the corresponding texture image feature vector are matched. For unmatched features, the spatial weighted K-nearest neighbor algorithm is used to interpolate and fill the neighboring successfully matched features before matching. Each pair of matched texture image feature vectors is concatenated with the point cloud geometric feature vector to generate an initial fused feature vector. The initial fused feature vector is processed by a channel attention network to generate a channel attention weight vector. The channel attention weight vector is then multiplied element-wise with the initial fused feature vector to obtain a channel-weighted feature vector. The channel attention weight vector assigns higher weights to the texture detail channel in the texture image feature vector and the geometric structure channel in the point cloud geometric feature vector than to the other channels. The channel-weighted feature vector is input into the spatial attention network, and a spatial attention weight map is generated by combining it with the pixel coordinate correspondence table. The spatial attention weight map is multiplied element by element with the channel-weighted feature vector to obtain a channel-spatial dual-weighted feature vector. The spatial attention weight map assigns higher weights to the key structural areas of the ancient building than to the other structural areas. The channel-space weighted feature vectors are standardized to obtain standardized fused features. Abnormal features in the standardized fused features are then removed to obtain geometric-texture joint feature vectors.

5. The method according to claim 4, characterized in that, A coarse mesh model is generated based on a point cloud dataset. The mesh structure of the coarse mesh model is optimized using geometry-texture joint feature vectors to obtain an optimized mesh model. The repaired texture image data is then mapped to the optimized mesh model to obtain a preliminary 3D mesh model, including: The point cloud dataset is processed using the Poisson surface reconstruction algorithm to generate a preliminary triangular mesh model. The preliminary triangular mesh model is then simplified to generate a coarse mesh model. Based on the geometry-texture joint feature vector identification, high curvature regions and complex texture regions in the coarse mesh model are identified, and the meshes in the high curvature regions and complex texture regions are adaptively refined. The refined mesh surface is then smoothed using the Laplacian smoothing algorithm to obtain an optimized mesh model. Based on the pixel coordinate correspondence table, a regional UV unwrapping strategy is adopted. The UV coordinates are calculated independently according to the semantic partitions of each independent component in the optimized mesh model. The repaired texture image data is then attached to the surface of the optimized mesh model according to the UV coordinates to generate a preliminary textured 3D mesh model.

6. The method according to claim 1, characterized in that, The GBDT model is trained through the following process: Obtain preliminary model parameter samples, input the preliminary model parameter samples into the GBDT model to be trained, and obtain the predicted parameter correction values; The loss between the predicted parameter correction value and the true parameter correction value is calculated based on the preset loss function, and the GBDT model to be trained is trained using the loss until the GBDT model reaches the preset accuracy.

7. The method according to claim 6, characterized in that, The initial model parameters include geometric parameters and texture parameters. Geometric parameters include vertex coordinate deviation, component size and structural angle, while texture parameters include sharpness and color values. The initial model parameters are input into the GBDT model to obtain correction values. Based on these correction values, the initial 3D mesh model is adjusted to obtain the optimal 3D model, including: The trained GBDT model is used to predict the initial model parameters, and the geometric parameter correction values ​​and texture parameter correction values ​​are obtained. The vertex coordinate deviation, component size, and structural angle of the preliminary 3D mesh model are adjusted based on the geometric parameter correction values, and the sharpness and color values ​​of the preliminary 3D mesh model are adjusted based on the texture parameter correction values ​​to obtain the optimized model parameters. The mean square error between the optimized model parameters and the actual ancient building parameters is calculated. If the mean square error is greater than the preset threshold, the GBDT model is retrained and the optimized model parameters are iteratively optimized until the optimized model parameters reach the preset accuracy, thus obtaining the optimal 3D model.

8. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • News scene three-dimensional reconstruction and visualization method based on multi-source remote sensing data

    CN119904592A

  • Real scene three-dimensional modeling method and system fusing laser point cloud and image

    CN120147563A