Ancient building three-dimensional modeling method based on three-dimensional laser scanning

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

CN120912795AActive Publication Date: 2025-11-07XIAN UNVERSITY OF ARTS & SCI

Patent Information

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

Smart Images

  • Figure CN120912795A_ABST
    Figure CN120912795A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of cultural heritage digital protection, and discloses an ancient building three-dimensional modeling method based on three-dimensional laser scanning, which comprises the steps of extracting feature points of a point cloud data set and texture image data, and performing registration in combination with a flight log of an unmanned aerial vehicle; performing image restoration and feature extraction on the texture image data and the point cloud-image registration result through a convolutional neural network-probability Markov random field (CNN-PMRF) model; performing geometric feature extraction on the point cloud data set, fusing the texture image feature vector to obtain a geometric-texture joint feature vector, and optimizing a rough mesh model generated based on the point cloud data set; mapping the repaired texture image data to the optimized grid model to obtain a preliminary three-dimensional grid model; and processing the 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 precision of three-dimensional modeling of the ancient building can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of digital protection of cultural heritage, and in particular to a three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning. BACKGROUND

[0002] Ancient buildings, as an important part of human historical and cultural heritage, carry rich cultural, artistic and historical values. However, with the passage of time and the influence of the natural environment, many ancient buildings are facing different degrees of damage and aging problems. In order to better protect and inherit these precious cultural heritage, three-dimensional digital technology has gradually become an important means for the protection and research of ancient buildings. Through three-dimensional modeling, the geometric structure and texture details of ancient buildings can be accurately recorded, providing strong support for their repair, protection, research and display.

[0003] In recent years, with the rapid development of unmanned aerial vehicle technology, laser radar technology, high-definition photogrammetry technology and deep learning algorithms, the precision and efficiency of ancient building three-dimensional modeling have been significantly improved. Unmanned aerial vehicles equipped with laser radars and high-definition cameras can quickly obtain high-precision point cloud data and texture image data of ancient buildings, providing rich basic data for three-dimensional modeling. At the same time, deep learning technology is applied in image processing and point cloud analysis, making the texture repair, feature extraction and model optimization more efficient and intelligent. However, traditional texture repair methods are prone to distortion when dealing with complex textures, and the accuracy of point cloud and image registration in low-texture areas is low. Moreover, the optimization process of three-dimensional models relies on manual adjustment, which is low in efficiency and high in error rate, resulting in poor effect of ancient building three-dimensional modeling in complex scenes.

[0004] Therefore, there is an urgent need for a high-precision ancient building modeling method to solve the related problems of low registration accuracy, texture repair distortion and low automation in the prior art, to greatly improve the automation and accuracy of ancient building modeling, and to ensure historical standardization. SUMMARY

[0005] The present application provides a three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning.

[0006] The technical solution of the present application embodiment is implemented as follows: In a first aspect, the embodiments of the present application provide a three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning, which comprises: obtaining original point cloud data sets, original texture image data and a flight log of a UAV after the UAV scans an ancient building; preprocessing the original point cloud data sets and the original texture image data to generate point cloud data sets and texture image data, extracting feature points from the point cloud data sets and the texture image data, and combining the flight log of the UAV to perform point cloud-image registration 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 to perform image restoration and feature extraction, thereby obtaining restored texture image data and a texture image feature vector; performing geometric feature extraction on the point cloud data sets by using a PointNet++ algorithm to obtain a point cloud geometric feature vector; fusing the texture image feature vector and the point cloud geometric feature vector by using a dual-channel attention network to generate a geometric-texture joint feature vector; generating a rough grid model based on the point cloud data sets, optimizing the grid structure of the rough grid model by using the geometric-texture joint feature vector to obtain an optimized grid model, and mapping the restored texture image data to the optimized grid model to obtain a preliminary three-dimensional grid model; extracting preliminary model parameters from the preliminary three-dimensional grid model, inputting the preliminary model parameters into a 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.

[0007] The technical scheme provided in the application obtains original point cloud data sets, original texture image data and unmanned aerial vehicle flight logs after the ancient building is scanned by the unmanned aerial vehicle, guarantees the accuracy of the original data, and lays a solid foundation for subsequent processing procedures based on the original data; the original point cloud data sets and the original texture image data are preprocessed to generate point cloud data sets and texture image data, feature points are extracted from the point cloud data sets and the texture image data, and point cloud-image registration is performed in combination with the unmanned aerial vehicle flight logs to obtain a point cloud-image registration result, so that high-precision registration of a low-texture area of the ancient building is realized; the texture image data and the point cloud-image registration result are input into a CNN-PMRF fusion model for image restoration and feature extraction to obtain restored texture image data and a texture image feature vector, so that intelligent restoration under three-dimensional geometric guidance is realized, the quality of the texture image is improved, and the coordinate correlation between the texture image and the three-dimensional model is strictly maintained; the point cloud data sets are subjected to geometric feature extraction through a PointNet++ algorithm, the problem of uneven point cloud density is solved through a density adaptive strategy, a point cloud geometric feature vector is obtained, and accurate extraction of the detail geometric features of the ancient building components is realized; the texture image feature vector and the point cloud geometric feature vector are fused through a dual-channel attention network to realize cross-modal fusion, automatically focus on and strengthen the texture and geometric information of a key area, generate a geometric-texture joint feature vector, and guide the subsequent modeling process based on the geometric-texture joint feature vector; a rough grid model is generated based on the point cloud data sets, the grid structure of the rough grid model is optimized through the geometric-texture joint feature vector to obtain an optimized grid model, and the restored texture image data is mapped to the optimized grid model to obtain a preliminary three-dimensional grid model; preliminary model parameters are extracted on the preliminary three-dimensional grid model, the preliminary model parameters are input into a GBDT model to obtain a correction value, the preliminary three-dimensional grid model is adjusted based on the correction value to obtain an optimal three-dimensional model, the geometric precision of the ancient building model is greatly improved, the model is ensured to meet the historical craft specifications, and the problem of similar appearance but not similar to the original is solved.

[0008] Optionally, the point cloud-image registration result is obtained by extracting feature points from the point cloud data sets and the texture image data and performing point cloud-image registration in combination with the unmanned aerial vehicle flight logs, and includes: projecting the point cloud data sets to a two-dimensional plane and extracting first Harris corner points and geometric edge features therefrom, and extracting second Harris corner points and image edge features from the texture image data; providing initial pose estimation through unmanned aerial vehicle attitude data and global navigation satellite system positioning information in the unmanned aerial vehicle flight logs, and performing feature matching based on the first Harris corner points, the geometric edge features, the second Harris corner points and the image edge features, and determining an initial transformation matrix through a RANSAC-PnP algorithm according to the matched feature pairs; and performing fine registration on the initial transformation matrix according to an ICP variant algorithm in combination with point cloud reflection intensity values and image gray values to obtain the point cloud-image registration result, the point cloud-image registration result including a registration matrix and a pixel coordinate correspondence table.

[0009] Optionally, the CNN-PMRF fusion model comprises a first convolutional neural network, a PMRF network and a second convolutional neural network, and the PMRF network is embedded in the full connection layer of the first convolutional neural network; the texture image data and the point cloud-image registration result are input into the CNN-PMRF fusion model for image inpainting and feature extraction to obtain the inpainted texture image data and the texture image feature vector, comprising: processing the texture image data through the first convolutional neural network to generate an initial feature map, the first convolutional neural network comprising two convolutional layers without a pooling layer; dividing the initial feature map into a plurality of feature blocks through the PMRF network and compressing the feature blocks into fixed-dimension vectors to form a plurality of feature nodes; constructing a node graph and improving the texture similarity weight of the feature nodes for the point cloud geometric edge image area, designing an energy function and performing a belief propagation algorithm to iteratively optimize the feature nodes to obtain an optimized feature map, the energy function comprising a node feature Euclidean distance and a local texture similarity; extracting an edge feature map and a texture direction map according to the optimized feature map to obtain an inpainting clue; dividing the texture image data into pixel block nodes, determining the three-dimensional space distance between the corresponding point clouds of adjacent pixel block nodes according to a pixel coordinate correspondence table, constructing an inpainting energy function and optimizing the inpainting energy function based on the three-dimensional space distance; combining the inpainting clue, iteratively optimizing the inpainting energy function through the belief propagation algorithm until it is minimized to obtain the inpainted texture image; processing the inpainted texture image through the second convolutional neural network to extract the deep features of the inpainted texture image and generate the texture image feature vector.

[0010] Optionally, the point cloud dataset is subjected to geometric feature extraction through a PointNet++ algorithm to obtain a point cloud geometric feature vector, comprising: performing component segmentation on the point cloud dataset based on a region growing algorithm to obtain a plurality of independent component point sets, the independent component point sets comprising columns, beams and corbel arches, each independent component point set is subjected to normalization processing, and key points are sampled from each normalized independent component point set through a farthest point sampling algorithm to obtain a key point set; the key point set is input into the PointNet++ algorithm, each layer of set abstraction in the PointNet++ algorithm performs farthest point sampling on the key point set to obtain a down-sampled point set, and the neighborhood point set of each point in the down-sampled point set is determined through a ball query; for the neighborhood point set of the high-density area, feature aggregation processing is performed through a maximum pooling and attention weighting mechanism, and for the neighborhood point set of the low-density area, feature aggregation processing is performed through an average pooling and global feature supplement mechanism to obtain a geometric feature vector corresponding to each independent component point set, the geometric feature vectors corresponding to each independent component point set are fused, and the point cloud geometric feature vector is obtained after processing through a full connection layer, wherein the point density of the high-density area is higher than 100 points per square meter, and the point density of the low-density area is lower than 50 points per square meter.

[0011] Optionally, the texture image feature vector and the point cloud geometry feature vector are fused by a double-channel attention network to generate a geometry-texture joint feature vector, including: matching the point cloud geometry feature vector and the corresponding texture image feature vector based on the pixel coordinate correspondence table, interpolating and filling the unmatched features from the adjacent matched features by a spatial weighted K nearest neighbor algorithm, and then matching, splicing each pair of matched texture image feature vector and point cloud geometry feature vector to generate an initial fusion feature vector; processing the initial fusion feature vector by a channel attention network to generate a channel attention weight vector, and multiplying the channel attention weight vector and the initial fusion feature vector element by element to obtain a channel weighted feature vector, wherein the channel attention weight vector gives higher weight to the texture detail channel in the texture image feature vector and the geometry structure channel in the point cloud geometry feature vector than to the remaining channels; inputting the channel weighted feature vector into a spatial attention network, and generating a spatial attention weight map in combination with the pixel coordinate correspondence table, and multiplying the spatial attention weight map and the channel weighted feature vector element by element to obtain a channel-spatial double-weighted feature vector, wherein the spatial attention weight map gives higher weight to the key structure region of the ancient building than to the remaining structure regions; standardizing the channel-spatial double-weighted feature vector to obtain a standardized fusion feature, and removing abnormal features in the standardized fusion feature to obtain the geometry-texture joint feature vector.

[0012] Optionally, a rough mesh model is generated based on the point cloud dataset, the mesh structure of the rough mesh model is optimized by the geometry-texture joint feature vector to obtain an optimized mesh model, and the repaired texture image data is mapped to the optimized mesh model to obtain a preliminary three-dimensional mesh model, including: processing the point cloud dataset according to a Poisson surface reconstruction algorithm to generate a preliminary triangular mesh model, and performing mesh simplification processing on the preliminary triangular mesh model to generate a rough mesh model; identifying high-curvature regions and texture complex regions in the rough mesh model based on the geometry-texture joint feature vector, and adaptively refining the meshes of the high-curvature regions and the texture complex regions, and smoothing the surfaces of the refined meshes by a Laplace smoothing algorithm to obtain an optimized mesh model; according to the pixel coordinate correspondence table, adopting a regional UV unfolding strategy, calculating UV coordinates according to each independent component semantic partition 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 preliminary three-dimensional mesh model with texture.

[0013] Optionally, the GBDT model is trained through the following process: obtaining a preliminary model parameter sample, inputting the preliminary model parameter sample into the GBDT model to be trained to obtain a predicted parameter correction value; calculating a loss between the predicted parameter correction value and a real parameter correction value based on a preset loss function, and training the GBDT model to be trained using the loss until the GBDT model reaches a preset precision.

[0014] Optionally, the preliminary model parameters include geometric parameters and texture parameters, the geometric parameters include vertex coordinate deviation, component size and structure angle, and the texture parameters include definition and color value; the preliminary model parameters are input into the GBDT model to obtain a correction value, and the preliminary three-dimensional mesh model is adjusted based on the correction value to obtain an optimal three-dimensional model, including: predicting the preliminary model parameters through the trained GBDT model to obtain geometric parameter correction values and texture parameter correction values; adjusting the vertex coordinate deviation, the component size and the structure angle of the preliminary three-dimensional mesh model according to the geometric parameter correction values, and adjusting the definition and the color value of the preliminary three-dimensional mesh model according to the texture parameter correction values to obtain optimized model parameters; calculating a mean square error of the optimized model parameters and real ancient building parameters, and if the mean square error is greater than a preset threshold, retraining the GBDT model and iteratively optimizing the optimized model parameters until the optimized model parameters reach a preset precision to obtain the optimal three-dimensional model.

[0015] In a second aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, the memory stores a computer program capable of running on the processor, and the processor implements the steps of the above-mentioned three-dimensional laser scanning-based ancient building three-dimensional modeling method when executing the program.

[0016] In a third aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the above-mentioned three-dimensional laser scanning-based ancient building three-dimensional modeling method.

[0017] The technical scheme provided by the embodiments of the present application has at least the following beneficial effects: The application provides a three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning, obtains original point cloud data sets, original texture image data and unmanned aerial vehicle flight logs after the unmanned aerial vehicle scans the ancient buildings, guarantees the accuracy of the original data, and lays a solid foundation for subsequent processing procedures based on the original data; the original point cloud data sets and the original texture image data are preprocessed to generate point cloud data sets and texture image data, feature points are extracted from the point cloud data sets and the texture image data, and point cloud-image registration is performed in combination with the unmanned aerial vehicle flight logs to obtain a point cloud-image registration result, so that high-precision registration of a low-texture area of the ancient building is realized; the texture image data and the point cloud-image registration result are input into a CNN-PMRF fusion model to perform image restoration and feature extraction, so that restored texture image data and a texture image feature vector are obtained, intelligent restoration under three-dimensional geometric guidance is realized, the quality of the texture image is improved, and the coordinate correlation between the texture image and the three-dimensional model is strictly maintained; the point cloud data sets are subjected to geometric feature extraction through a PointNet++ algorithm, the problem of uneven point cloud density is solved through a density adaptive strategy, a point cloud geometric feature vector is obtained, and accurate extraction of the detail geometric features of the ancient building components is realized; the texture image feature vector and the point cloud geometric feature vector are fused through a double-channel attention network, cross-modal fusion is realized, the texture and geometric information of a key area is automatically focused and strengthened, a geometric-texture joint feature vector is generated, and the subsequent modeling process is guided based on the geometric-texture joint feature vector; a rough grid model is generated based on the point cloud data sets, the grid structure of the rough grid model is optimized through the geometric-texture joint feature vector, an optimized grid model is obtained, and the restored texture image data is mapped to the optimized grid model to obtain a preliminary three-dimensional grid model; preliminary model parameters are extracted from the preliminary three-dimensional grid model, the preliminary model parameters are input into a GBDT model to obtain a correction value, the preliminary three-dimensional grid model is adjusted based on the correction value, and an optimal three-dimensional model is obtained, so that the geometric precision of the ancient building model is greatly improved, the model is ensured to meet the historical process specifications, and the problem that the model looks similar but does not look like is solved. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor. Figure 1 A flowchart of a three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning provided by the embodiments of the present application; Figure 2 A hardware entity diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0019] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. The following embodiments are used to describe the present application, but not to limit the scope of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0020] In the following description, "some embodiments" are related to a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0021] It should be noted that the terms "first", "second", "third" involved in the embodiments of the present application are only to distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first", "second", "third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0022] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as generally understood by those skilled in the art to which the embodiments of the present application belong. It should also be understood that terms such as those defined in a general dictionary should be understood as having a meaning consistent with that in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as such herein.

[0023] The embodiments of the present application will be further described below with reference to the drawings.

[0024] In view of the problems existing in the research on three-dimensional modeling of ancient buildings in the field of digital protection technology of cultural heritage, the embodiments of the present application provide a three-dimensional modeling method of ancient buildings based on three-dimensional laser scanning.

[0025] The technical solutions of the present application will be introduced below. First, the method embodiments of the present application will be introduced.

[0026] Please refer to Figure 1 , which shows a flowchart of a three-dimensional modeling method of ancient buildings based on three-dimensional laser scanning provided by the embodiments of the present application, as shown in Figure 1 , the method comprises at least the following steps S110 to S150.

[0027] Step S110, obtain the original point cloud data set, the original texture image data and the unmanned aerial vehicle flight log after the unmanned aerial vehicle scans the ancient building.

[0028] In the embodiment of the present application, the original point cloud data set, the original texture image data and the unmanned aerial vehicle flight log are obtained by omnidirectional scanning of the ancient building by the unmanned aerial vehicle. The unmanned aerial vehicle is equipped with a laser radar and a high-definition camera. According to the structural characteristics of the ancient building, a layered and zoned scanning strategy is adopted. The ancient building is divided into three regions, i.e. a bottom region, a middle region and a top region. The corresponding flight height is used for scanning in each region. Finally, the original point cloud data set and the high-definition original texture image data are obtained. The precise space-time information of all data is recorded through the unmanned aerial vehicle flight log.

[0029] Step S120, pre-process the original point cloud data set and the original texture image data to generate the point cloud data set and the texture image data. Feature points are extracted from the point cloud data set and the texture image data. The point cloud-image registration is performed in combination with the unmanned aerial vehicle flight log to obtain the point cloud-image registration result.

[0030] In the embodiment of the present application, the original point cloud data set is pre-processed. Specifically, isolated noise points in the original point cloud data set are removed through statistical filtering. Filtering is performed according to the point cloud density distribution. Small-radius fine filtering is used for high-density regions. Large-radius flying point removal is used for low-density regions. Finally, the number of point clouds in the original point cloud data set after denoising and filtering is reduced to below the preset number through a feature-preserving downsampling strategy. The point cloud data is uniformly converted to the geodetic coordinate system to obtain the pre-processed point cloud data set. The original texture image data is pre-processed. Specifically, the camera internal parameter obtained based on Zhang Zhengyou calibration method is used for distortion correction of the original texture image data. An adaptive denoising strategy is adopted. Gaussian filtering is performed on the smooth regions in the original texture image data after distortion correction. Non-local mean denoising is performed on high-detail regions. Finally, all texture images are adjusted to a uniform pixel to obtain the pre-processed texture image data.

[0031] In the embodiments of the present application, feature points are extracted from the point cloud dataset and the texture image data, and the point cloud-image registration is performed in combination with the unmanned aerial vehicle flight log to obtain a point cloud-image registration result. Specifically, the preprocessed point cloud dataset is projected onto a two-dimensional plane, and first Harris corner points based on normal vector changes and geometric edge features based on normal vector mutations are extracted therefrom, and second Harris corner points based on gray gradient and image edge features are extracted from the preprocessed texture image data. The high-precision initial pose estimation is provided by the unmanned aerial vehicle attitude data and global navigation satellite system positioning information provided by the unmanned aerial vehicle flight log, so as to greatly reduce the search space and improve the initial accuracy and efficiency of registration. Based on the first Harris corner points, the geometric edge features, the second Harris corner points and the image edge features, the RANSAC-PnP algorithm is used to determine an initial transformation matrix, so as to complete the initial registration. Further, in combination with the point cloud reflection intensity value and the image gray value, the initial transformation matrix is precisely registered according to the ICP variant algorithm, so as to minimize the registration error. The registration error includes a geometric error and a 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 gray value, so as to significantly improve the registration stability and accuracy of the low-texture region. Finally, the point cloud-image registration result is obtained, which 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 pixel and the point cloud three-dimensional coordinate.

[0032] In step S130, the texture image data and the point cloud-image registration result are input into the CNN-PMRF fusion model for image inpainting and feature extraction to obtain the repaired texture image data and the texture image feature vector. The PointNet++ algorithm is used to extract the geometric features of the point cloud dataset to obtain a point cloud geometric feature vector. The dual-channel attention network is used to fuse the texture image feature vector and the point cloud geometric feature vector to generate a geometric-texture joint feature vector.

[0033] In the embodiment of the present application, the texture image data and the point cloud-image registration result are input into the CNN-PMRF fusion model for image inpainting and feature extraction to obtain the inpainted texture image data and the texture image feature vector. Specifically, the CNN-PMRF fusion model includes a first convolutional neural network, a PMRF network and a second convolutional neural network, and the PMRF network is embedded in the full connection layer of the first convolutional neural network. The first convolutional neural network processes the texture image data, and the first convolutional neural network includes two convolutional layers. The first convolutional layer extracts basic color blocks and edge contours such as wall boundaries, and the second convolutional layer strengthens texture detail features such as brick joint directions and carved pattern directions, so as to obtain an initial feature map. In addition, there is no pooling layer in the convolutional neural network, so as to ensure that the initial feature map output can maintain the original spatial resolution. Further, the PMRF network divides the initial feature map into a plurality of feature blocks, and compresses each feature block into a fixed dimension vector through global average pooling to form a plurality of feature nodes. All feature nodes are connected in a 4-neighborhood manner to construct a sparse Markov random field node graph. The image pixel area corresponding to the point cloud geometric edge is determined according to the registration matrix, an energy function including the Euclidean distance of node features and the local texture similarity is designed, and the texture similarity weight of the feature nodes in the image area of the point cloud geometric edge is increased. The feature nodes are iteratively optimized through the belief propagation algorithm, the iteration number is 10-15 times, the feature values of all nodes are optimized, the optimized node features are reconstructed, and the optimized feature map is obtained. The edge feature map and the texture direction map are extracted from the optimized feature map, and the edge feature map and the texture direction map are used as the repair clues, i.e. the repair clues. Further, a repair energy function is constructed, which includes a data term and a smoothing term. The data term is used to protect the non-damaged area, and the smoothing term is used to ensure the continuity of the repair area and the surrounding area. The texture image data is divided into pixel block nodes, and the three-dimensional space distance between the corresponding points of 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 space distance, for example, when the three-dimensional space distance is greater than 0.05, it indicates that the adjacent image nodes may cross the component, and then the weight of the smoothing term in the repair energy function is reduced to avoid the interference between the textures of different components. The repair energy function is iteratively optimized through the belief propagation algorithm combined with the repair clues until the optimized repair energy function is minimized, and the inpainted texture image is obtained.The repaired texture image is processed by a second convolutional neural network to extract a deep feature of the repaired texture image, the second convolutional neural network includes five convolutional layers and two maximum pooling layers, the first convolutional layer and the second convolutional layer are used to capture local features such as carved patterns, the third convolutional layer, the fourth convolutional layer and the fifth convolutional layer are used to integrate global features such as the overall structure of the corbel, a texture image feature vector is obtained, and the texture image feature vector is bound with the pixel coordinate correspondence table, so that the texture image feature vector can be mapped to the three-dimensional point cloud coordinates.

[0034] In the embodiment of the present application, the point cloud dataset is processed by the PointNet++ algorithm to obtain a point cloud geometric feature vector. Specifically, the point cloud dataset is segmented into multiple independent component point sets including columns, beams and corbels based on a region growing algorithm, the coordinates of each independent component point set are normalized to the interval [-1, 1], and 1024 key points are sampled from each normalized independent component point set by the farthest point sampling algorithm to obtain a key point set. The key point set is input into the PointNet++ algorithm, which includes three set abstraction layers. In the first set abstraction layer, 1024 key points are sampled by the farthest point sampling algorithm to obtain a down-sampled point set containing 512 key points, and the neighborhood point set of each point in the down-sampled point set is determined by sphere query. Similarly, 256 key points are sampled by the second set abstraction layer, and the sphere query radius is expanded to capture larger range features. 128 points are sampled by the third set abstraction layer to integrate macro-structure features. Further, for the neighborhood point set of high-density areas such as corbel with a point density higher than 100 points per square meter, a strategy combining maximum pooling and attention weighting mechanism is adopted. Specifically, the geometric correlation (i.e. Euclidean distance) and the detail importance (i.e. curvature value) between the neighborhood points and the center point are calculated to generate attention weights, and after weighting, the maximum pooling operation is performed to retain the detail features, completing the feature aggregation processing of high-density areas. For the neighborhood point set of low-density areas with a point density lower than 50 points per square meter, a strategy combining average pooling and global feature supplement is adopted. After feature supplement by K-neighbor interpolation, the global features and local features of the current layer are spliced, average pooling is performed to strengthen the continuity, and the feature aggregation processing of low-density areas is completed, thereby obtaining 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 a point cloud geometric feature vector is obtained after processing by a fully connected layer. The point cloud geometric feature vector includes geometric features such as component size, structure contour and spatial relationship.

[0035] In the embodiment of the present application, the texture image feature vector and the point cloud geometry feature vector are fused by a double-channel attention network to generate a geometry-texture joint feature vector. Specifically, the point cloud geometry feature vector and the corresponding texture image feature vector are accurately matched according to the spatial position based on the pixel coordinate correspondence table. For the unmatched features caused by occlusion and the like, the spatial weighted K nearest neighbor algorithm is used to interpolate and fill in the adjacent three matched features, and the abnormal matching pairs with geometric-texture logical conflicts are removed based on the normal vector consistency check. Each matched texture image feature vector and point cloud geometry feature vector is spliced to generate an initial fusion feature vector. Further, the initial fusion feature vector is input into the channel attention network, the channel statistics are obtained by global average pooling, the channel attention weight vector is obtained by two fully connected networks, the channel attention weight vector and the initial fusion feature vector are multiplied element by element, the texture detail channel in the texture image feature vector, such as painted color, carved pattern, etc. is weighted and improved by 20%, and the geometry structure channel in the part of the point cloud geometry feature vector, such as member size, spatial position, etc. is weighted and improved by 30%, to obtain a channel weighted feature vector. The channel weighted feature vector is spliced and compressed with the three-dimensional space coordinates provided by the pixel coordinate correspondence table, and then processed by the spatial attention network to obtain a spatial attention weight map. The spatial attention weight map and the channel weighted feature vector are multiplied element by element, the key structure area of the ancient building such as the corbel and the painted decoration is given a weight of 1.2 to 1.5 times, and the ordinary structure area such as the flat wall area is given a weight of 0.8-1.0 times, to obtain a channel-space double weighted feature vector. Finally, the channel-space double weighted feature vector is standardized by a batch normalization layer to obtain a standardized fusion feature, the same type of component area feature cosine similarity is calculated, the abnormal features with a similarity greater than 0.3 are removed, and finally a geometry-texture joint feature vector is obtained.

[0036] Step S140, generating a rough grid model based on the point cloud dataset, optimizing the grid structure of the rough grid model by the geometry-texture joint feature vector to obtain an optimized grid model, and mapping the repaired texture image data to the optimized grid model to obtain a preliminary three-dimensional grid model.

[0037] 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.

[0038] 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.

[0039] 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.

[0040] In summary, the three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning provided by the embodiments of the present application acquires the original point cloud data set, the original texture image data and the flight log of the unmanned aerial vehicle after the ancient buildings are scanned by the unmanned aerial vehicle, guarantees the accuracy of the original data, and lays a solid foundation for subsequent processing procedures based on the original data; the original point cloud data set and the original texture image data are preprocessed to generate a point cloud data set and texture image data, feature points are extracted from the point cloud data set and the texture image data, and point cloud-image registration is performed in combination with the flight log of the unmanned aerial vehicle to obtain a point cloud-image registration result, so that high-precision registration of a low-texture area of an ancient building is realized; the texture image data and the point cloud-image registration result are input into a CNN-PMRF fusion model for image restoration and feature extraction to obtain restored texture image data and a texture image feature vector, so that intelligent restoration under three-dimensional geometric guidance is realized, the quality of the texture image is improved, and the coordinate correlation between the texture image and the three-dimensional model is strictly maintained; the point cloud data set is subjected to geometric feature extraction through a PointNet++ algorithm, the problem of uneven density of the point cloud is solved through a density adaptive strategy, a point cloud geometric feature vector is obtained, and accurate extraction of the detailed geometric features of the components of the ancient building is realized; the texture image feature vector and the point cloud geometric feature vector are fused through a dual-channel attention network, cross-modal fusion is realized, the texture and geometric information of a key area is automatically focused and strengthened, a geometric-texture joint feature vector is generated, and the subsequent modeling process is guided based on this; a rough grid model is generated based on the point cloud data set, the grid structure of the rough grid model is optimized through the geometric-texture joint feature vector to obtain an optimized grid model, and the restored texture image data is mapped to the optimized grid model to obtain a preliminary three-dimensional grid model; preliminary model parameters are extracted on the preliminary three-dimensional grid model, the preliminary model parameters are input into a GBDT model to obtain a correction value, the preliminary three-dimensional grid model is adjusted based on the correction value to obtain an optimal three-dimensional model, the geometric precision of the ancient building model is greatly improved, the model is ensured to meet the historical craft specifications, and the problem of similar appearance but not similar to the original is solved.

[0041] It should be noted that, in the embodiments of the present application, if the above-mentioned three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning is realized in the form of a software function 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 solutions of the embodiments of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing an electronic device to execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various media that can store program codes. Thus, the embodiments of the present application are not limited to any specific hardware and software combination.

[0042] Correspondingly, the embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of any one of the ancient building three-dimensional modeling methods based on three-dimensional laser scanning in the above embodiments. Correspondingly, the embodiment of the present application also provides a computer program product, which is used to implement the steps of any one of the ancient building three-dimensional modeling methods based on three-dimensional laser scanning in the above embodiments when the computer program product is executed by a processor of an electronic device.

[0043] Based on the same technical concept, the embodiment of the present application provides an electronic device for implementing the ancient building three-dimensional modeling method based on three-dimensional laser scanning described in the above method embodiments. Figure 2 The hardware entity schematic diagram of the electronic device provided by the embodiment of the present application is shown in FIG. 2, which includes a memory 210 and a processor 220. The memory 210 stores a computer program executable on the processor 220, and the processor 220 implements the steps of any one of the ancient building three-dimensional modeling methods based on three-dimensional laser scanning in the embodiments of the present application when executing the program. Figure 2 The hardware entity schematic diagram of the electronic device provided by the embodiment of the present application is shown in FIG. 2, which includes a memory 210 and a processor 220. The memory 210 stores a computer program executable on the processor 220, and the processor 220 implements the steps of any one of the ancient building three-dimensional modeling methods based on three-dimensional laser scanning in the embodiments of the present application when executing the program.

[0044] The memory 210 is configured to store instructions and applications executable by the processor 220, and can also cache data to be processed by the processor 220 and each module in the electronic device (for example, image data, audio data, voice communication data and video communication data), which can be realized by FLASH or RAM.

[0045] The processor 220 executes the program to implement the steps of any one of the ancient building three-dimensional modeling methods based on three-dimensional laser scanning. The processor 220 usually controls the overall operation of the electronic device 200.

[0046] The processor can be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, or a microprocessor. It can be understood that the electronic device for implementing the functions of the processor can also be other devices, and the embodiments of the present application are not limited in this regard.

[0047] The computer storage medium / memory can be a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Ferromagnetic Random Access Memory (FRAM), a Flash Memory, a magnetic surface memory, an optical disc, a Compact Disc Read-Only Memory (CD-ROM), or the like. It can also be various electronic devices including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, and the like.

[0048] It should be noted that the above description of the storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present application, please refer to the description of the method embodiments for understanding.

[0049] It should be understood that every feature, structure, or characteristic described herein is within a preferred embodiment of the present application. Thus, it is meant that the features, structures, or characteristics can be combined with each other in any manner within a preferred embodiment of the present application. In addition, it is contemplated that each feature, structure, or characteristic can be implemented in hardware, software, or a combination thereof.

[0050] It should be noted that, as used herein, the articles "a", "an", "the", and "at least one" are intended to mean that there is one or more of the elements in the preceding descriptions. The articles "a" (or "an"), as well as the first article "the" and "at least one" do not denote a limitation of quantity, and are used with their plain, ordinary meaning. Thus, these articles should be interpreted in the manner it is employed by those having ordinary skill in the art to which the disclosure relates.

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

[0052] The units described above as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units; they can be located in one place or distributed on multiple network units; and some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0053] In addition, each functional unit in each embodiment of the present 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 realized in the form of hardware or in the form of hardware plus software functional unit.

[0054] Alternatively, the above-mentioned integrated unit of the present application, if realized in the form of a software function module and sold or used as an independent product, can also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable the equipment automatic test line to execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes: mobile storage devices, ROM, magnetic discs or optical discs, and various media that can store program codes.

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

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

[0057] The above is only an implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A three-dimensional modeling method for ancient buildings based on three-dimensional laser scanning, characterized in that, The method comprises: acquiring an original point cloud data set, original texture image data and a UAV flight log after the UAV scans the ancient building; preprocessing the original point cloud data set and the original texture image data to generate a point cloud data set and texture image data, extracting feature points from the point cloud data set and the texture image data, and combining the UAV flight log to perform point cloud-image registration 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 to perform image restoration and feature extraction, obtaining restored texture image data and a texture image feature vector; performing geometric feature extraction on the point cloud data set by a PointNet++ algorithm to obtain a point cloud geometric feature vector; and fusing the texture image feature vector and the point cloud geometric feature vector by a dual-channel attention network to generate a geometric-texture joint feature vector; generating a rough mesh model based on the point cloud data set, optimizing the mesh structure of the rough mesh model by the geometric-texture joint feature vector to obtain an optimized mesh model, and mapping the restored texture image data to the optimized mesh model to obtain a preliminary three-dimensional mesh model; extracting preliminary model parameters on the preliminary three-dimensional mesh model, inputting the preliminary model parameters into a GBDT model to obtain a correction value, and adjusting the preliminary three-dimensional mesh model based on the correction value to obtain an optimal three-dimensional model.

2. The method of claim 1, wherein, The point cloud-image registration result obtained by extracting feature points from the point cloud data set and the texture image data and combining the UAV flight log comprises: projecting the point cloud data set onto a two-dimensional plane and extracting first Harris corner points and geometric edge features therefrom, and extracting second Harris corner points and image edge features from the texture image data; providing an initial pose estimation by UAV attitude data and global navigation satellite system positioning information in the UAV flight log, and performing feature matching based on the first Harris corner points, the geometric edge features, the second Harris corner points and the image edge features, and determining an initial transformation matrix by the RANSAC-PnP algorithm according to the matched feature pairs; combining point cloud reflection intensity values and image gray values, and performing fine registration on the initial transformation matrix according to an ICP variant algorithm to obtain the point cloud-image registration result, wherein the point cloud-image registration result comprises a registration matrix and a pixel coordinate correspondence table.

3. The method of claim 2, wherein, The CNN-PMRF fusion model comprises a first convolutional neural network, a PMRF network and a second convolutional neural network, and the PMRF network is embedded in a full connection layer of the first convolutional neural network; inputting the texture image data and the point cloud-image registration result into the CNN-PMRF fusion model to perform image restoration and feature extraction, obtaining restored texture image data and a texture image feature vector, comprising: processing the texture image data by the first convolutional neural network to generate an initial feature map, wherein the first convolutional neural network comprises two convolutional layers and no pooling layer; The initial feature map is divided into multiple feature blocks and compressed into fixed-dimensional vectors to form multiple feature nodes through the PMRF network; a node graph is constructed, and the texture similarity weight is improved for the feature nodes of the point cloud geometry edge image area, an energy function is designed, and a belief propagation algorithm is executed to iteratively optimize the feature nodes to obtain an optimized feature map, the energy function includes node feature Euclidean distance and local texture similarity; edge feature maps and texture direction maps are extracted according to the optimized feature map to obtain repair clues; The texture image data is divided into pixel block nodes, the three-dimensional space distance between the corresponding point clouds of adjacent pixel block nodes is determined according to the pixel coordinate correspondence table, a repair energy function is constructed, and the repair energy function is optimized based on the three-dimensional space distance; combined with the repair clues, the repair energy function is iteratively optimized until minimized through the belief propagation algorithm, to obtain a repaired texture image; The repaired texture image is processed through the second convolutional neural network to extract the deep features of the repaired texture image, and a texture image feature vector is generated.

4. The method of claim 1, wherein, The point cloud dataset is processed through the PointNet++ algorithm to extract geometric features, and a point cloud geometry feature vector is obtained, including: The point cloud dataset is segmented based on the region growing algorithm to obtain multiple independent component point sets, the independent component point sets include columns, beams and arches, each independent component point set is normalized, and key points are sampled from each normalized independent component point set through the farthest point sampling algorithm to obtain a key point set; The key point set is input into the PointNet++ algorithm, and the farthest point sampling is performed on the key point set at each layer of the PointNet++ algorithm to obtain a down-sampled point set, and the neighborhood point set of each point in the down-sampled point set is determined through ball query; For the neighborhood point set of the high-density area, feature aggregation processing is performed through the maximum pooling and attention weighting mechanism, and for the neighborhood point set of the low-density area, feature aggregation processing is performed through the average pooling and global feature supplement mechanism to obtain a geometric feature vector corresponding to each independent component point set. The geometric feature vectors corresponding to each independent component point set are fused, and a point cloud geometry feature vector is obtained through a full connection layer, wherein the point density of the high-density area is higher than 100 points per square meter, and the point density of the low-density area is lower than 50 points per square meter.

5. The method of claim 4, wherein, The texture image feature vector and the point cloud geometry feature vector are fused through the dual-channel attention network to generate a geometry-texture joint feature vector, including: The point cloud geometry feature vector and the corresponding texture image feature vector are matched based on the pixel coordinate correspondence table, the features that are not matched successfully are interpolated and filled from the adjacent matched features through the spatial weighted K nearest neighbor algorithm, and then matched, each pair of matched texture image feature vector and point cloud geometry feature vector is spliced to generate an initial fusion feature vector; The initial fusion feature vector is processed by a channel attention network to generate a channel attention weight vector, and the channel attention weight vector is multiplied element by element with the initial fusion feature vector to obtain a channel weighted feature vector, wherein the channel attention weight vector gives higher weights to the texture detail channels in the texture image feature vector and the geometric structure channels in the point cloud geometry feature vector than to the remaining channels; The channel weighted feature vector is input into a spatial attention network and combined with a pixel coordinate correspondence table to generate a spatial attention weight map, and the spatial attention weight map is multiplied element by element with the channel weighted feature vector to obtain a channel-spatial doubly weighted feature vector, wherein the spatial attention weight map gives higher weights to key structural regions of the ancient building than to the remaining structural regions; The channel-spatial doubly weighted feature vector is standardized to obtain a standardized fusion feature, and abnormal features in the standardized fusion feature are removed to obtain a geometry-texture joint feature vector.

6. The method of claim 5, wherein, A rough mesh model is generated based on a point cloud dataset, the mesh structure of the rough mesh model is optimized based on the geometry-texture joint feature vector to obtain an optimized mesh model, and the repaired texture image data is mapped to the optimized mesh model to obtain a preliminary three-dimensional mesh model, including: The point cloud dataset is processed according to the Poisson surface reconstruction algorithm to generate a preliminary triangular mesh model, and the preliminary triangular mesh model is subjected to mesh simplification processing to generate a rough mesh model; Based on the geometry-texture joint feature vector, high-curvature regions and texture complex regions in the rough mesh model are identified, the meshes of the high-curvature regions and the texture complex regions are adaptively refined, and the surfaces of the refined meshes are smoothed by a Laplace smoothing algorithm to obtain an optimized mesh model; According to the pixel coordinate correspondence table, a regional UV unfolding strategy is adopted, UV coordinates are independently calculated according to each independent component semantic partition in the optimized mesh model, and the repaired texture image data is attached to the surface of the optimized mesh model according to the UV coordinates to generate a preliminary three-dimensional mesh model with texture.

7. The method of claim 1, wherein, The GBDT model is trained by the following process: Obtain the preliminary model parameter sample, input the preliminary model parameter sample into the GBDT model to be trained to obtain the predicted parameter correction value; Calculate the loss between the predicted parameter correction value and the true parameter correction value based on the preset loss function, and train the GBDT model to be trained using the loss until the GBDT model reaches the preset precision.

8. The method of claim 7, wherein, The preliminary model parameters include geometry parameters and texture parameters, the geometry parameters include vertex coordinate deviation, component size and structure angle, and the texture parameters include definition and color value; The preliminary model parameters are input into the GBDT model to obtain correction values, and the preliminary three-dimensional mesh model is adjusted based on the correction values to obtain an optimal three-dimensional model, including: The trained GBDT model is used to predict the preliminary model parameters to obtain geometry parameter correction values and texture parameter correction values; The vertex coordinate deviation, component size and structure angle of the preliminary three-dimensional mesh model are adjusted according to the geometric parameter correction value, and the definition and color value of the preliminary three-dimensional mesh model are adjusted according to the texture parameter correction value, so as to obtain an optimized model parameter; The mean square error of the optimized model parameter and the real ancient building parameter is calculated, if the mean square error is greater than a preset threshold, the GBDT model is retrained and the optimized model parameter is continuously iteratively optimized until the optimized model parameter reaches a preset precision, and an optimal three-dimensional model is obtained.

9. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, The processor implements the steps in the method of any one of claims 1 to 8 when executing the program.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the steps in the method of any one of claims 1 to 8 when executed by the processor.

Citation Information

Patent Citations

  • Optical lens high-precision three-dimensional reconstruction method and system

    CN119165652A

  • 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

  • Multi-element historic building maintenance and restoration method based on three-dimensional laser scanning

    CN120339550A

Cited By

  • Component identification method and system based on three-dimensional point cloud

    CN121686438A

  • A component recognition method and system based on 3D point cloud

    CN121686438B

  • Multi-source sensor space-time alignment method and system

    CN121788630A