Algorithm of 3D Virtual Reconstruction of Ancient Buildings in Qing Dynasty Based on Image Sequence

,


Introduction
With the development of the economy and the gradual improvement of people's living standards, people are paying more and more attention to the protection of historical sites. After a long period of weathering, corrosion, and man-made destruction, the historic sites will be damaged. How to reconstruct these damaged monuments and ensure the similarity between the reconstructed monuments and the original monuments has become a core issue that needs to be studied in the field of ancient building restoration. At present, the virtual simulation reconstruction of ancient buildings is mainly achieved through two methods. One is to scan and measure physical buildings, convert them into digital information, and build a basic model, then continue to render the basic model, and finally get the restoration results. e ancient buildings are preserved in digital form; the second is to directly construct and process the model based on historical data to obtain the restoration results and compare the restoration results with the ancient buildings in order to guide the restoration work of the ancient buildings.
ere are three main ways to construct 3D models in the current generation. One is to use 3D modelling software to construct 3D models, such as CAD, 3ds Max, SketchUp, etc., and use some basic geometric elements (e.g., cubes, cylinders, etc.) through a series of geometric operations. Construct a three-dimensional model [1]. is method generally uses the two-dimensional GIS data generated by the ground total station survey or aerial photogrammetry method, the paper map, and the two-dimensional plane data provided by CAD and other height auxiliary data to carry out geometric interactive modelling to reconstruct the ancient building model.
is modelling method has low cost, mature development, and wide application. However, due to a large number of ancient buildings in the city and different shapes and structures, it is very time-consuming to reconstruct ancient buildings through interactive methods and requires high professional skills for operators. Another way is to obtain three-dimensional data through equipment. Digital photogrammetry technology obtains three-dimensional geometric information and surface texture information of urban ancient buildings from large-scale aerial images and high-resolution satellite remote sensing images or uses three-dimensional laser scanners to directly obtain threedimensional space coordinates and colors of sampling points on the surface of the ground object information.
is method has a large number of research results, but due to the high cost of data acquisition and the use conditions, it is easy to be restricted by the application environment and the nature of the object being measured. It is mainly used for professional urban surveys and engineering with high investment intensity. Design and more and more city management and social services require simpler, flexible, efficient, and low-cost 3D city modelling technology. Another method is an image-based modelling method, using ordinary digital cameras as image acquisition equipment to directly reconstruct a "photo-level" highly realistic model from the image, due to its low cost, high efficiency, and low labour intensity. It has become a powerful tool for geometric information analysis and extraction and model making that attracts increasing attention and adoption in many fields, especially ground close-up images, which can reflect the geometric details of the ancient building surface and have realistic texture information. It is the current photogrammetry that research hotspots in the field of computer vision [2]. e collection of photos is the most important step in the entire 3D reconstruction process. However, in the imagebased modelling method, an ordinary digital camera is used for image collection, which has more requirements for the resolution, clarity, overlap, and shooting light of the captured images.
With the development of people's research and protection of ancient architecture, the three-dimensional point cloud model of ancient architecture is becoming more and more important, how to restore the three-dimensional coordinates of ancient buildings easily, quickly, and low-costly, and how to construct the cloud model is a hot and difficult research point in academic circles. Previous people have done a lot of research in the field of 3D point cloud generation in ancient buildings: literature [3] directly uses steel rulers to measure wood components, combined with highresolution photographs, using computer-aided design (CAD) and geographic information system (GIS) software to achieve 3D reconstruction of the antique architectural landscape. e three-dimensional fine modelling of Song Tower of the Haiji Temple was completed by ground lidar and unmanned aerial survey data [4], and the three-dimensional reconstruction of the golden roof of the 13th Dalai Lama Temple in Potala Palace was completed using nearsighted photogrammetry technology and scale measurement, using 3ds Max software [5]. Although the threedimensional point cloud accuracy of the ancient building obtained by the above method is high, the data acquisition process is complex, the workload is large, and the cost is high, which cannot meet the simple, fast, and low-cost realization of the three-dimensional point cloud generation of the ancient building.
At present, scholars in related fields have researched the three-dimensional virtual reconstruction algorithm of ancient buildings. Literature [6] proposed the ancient building reconstruction based on three-dimensional laser scanning and drone tilt photography technology, combined with three-dimensional laser scanning and tilt photogrammetry technology. e feature point matching algorithm is used to realize the accurate fusion of multisource data so as to realize the construction of a complete three-dimensional model of ancient buildings indoors and outdoors. Literature [7] proposes a research plan that combines three-dimensional laser scanning technology and UAV aerial survey technology to reconstruct ancient buildings. Based on the internal and external point cloud data and image data of ancient buildings obtained by 3D laser scanners and drones, the point cloud data is used to generate orthophotos and draw flat, vertical, and cross-sectional views, creating 3D models, and finally take the buildings on the spot. Dimensional data is a reference analysis to get the drawings and model errors.
e reconstruction method of damaged monuments is a hot issue that needs to be studied in the field of ancient building restoration. Traditional algorithms are used to reconstruct damaged monuments. If the damaged parts are large or worn, there will be fewer restorable features. In the traditional visual restoration method, when the restoration features are severely worn or damaged, it is difficult to ensure the continuity of the restoration features, which leads to unsatisfactory reconstruction effects, thereby reducing the authenticity of the reconstruction of damaged monuments. Modelling with this type of method is significantly more efficient than traditional methods. However, the combination of 3D laser scanning and drone tilt photography still has some problems to be solved, such as improved model effect and precision in the improved model, but there are some problems of texture distortion in individual locations.
Aiming at the problems of the above methods, this paper proposes a three-dimensional virtual reconstruction algorithm of ancient buildings in the Qing Dynasty based on image sequences. Traditional SIFT algorithms need to locate both local extremum points in scale space and local extremum points in two-dimensional plane space to determine the location of local extremum points and use the selected local extremum points as key points. Calculates the position information of the key, calculates the gradient direction of all points adjacent to the key, determines the main direction of the key, and completes the invariance of the operator geometry transformation and rotation. Traditional SIFT algorithms use Euclidean distance to determine similarity measurements between key measuring points. In addition, PCA theory must break down the sparse matrix, but the decomposition process will make the image vector size too high, and the calculation process is too complex; after the reduction of dimension damage to the original image, the spatial topology cannot be Fan Ying image set nonlinear structure. e improved 2DPCA-SIFT algorithm overcomes these well. Moreover, it redefines the similarity measurement coefficient value with the support of the BRISK descriptor index, thus rematching the image features of ancient Qing dynasties.

How to Obtain Sequence
Images. e use of sequence images to restore the three-dimensional model of ancient buildings in the Qing Dynasty is based on the use of cameras or video cameras to shoot the same object from different angles. Currently, the most widely used model is the pinhole camera model, and projective geometry is the mathematical basis for constructing projective space. e use of sequence images to restore the three-dimensional model of ancient buildings in the Qing Dynasty is based on the use of cameras or video cameras to shoot the same object from different angles. Currently, the most widely used model is the pinhole camera model, and projective geometry is the mathematical basis for constructing projective space [8].
e acquisition of serial images only needs a digital camera to shoot the same object from different angles, and what is produced is a set of serial images of the same object. In the shooting process, in order to preserve most of the features of the object, the same object is rotated at a smaller angle each time it is shot. e sequence of images generated in this way can be based on the transformation relationship between the points in the image, and the three-dimensional information of the points can be obtained through the conversion between the coordinate systems.

Projective Space.
For the homogeneity of three-dimensional points in the projective space, a simple matrix expression can be used to express the imaging model, and the geometric parameters of the camera can also be obtained by matrix expressions. Projective geometry mainly includes vector space, projective space, projective transformation, projection, affine space, Euclidean space, and Euclidean transformation. e easiest space to understand can be considered as Euclidean space. At present, the technologies used in the field of 3D reconstruction are all based on Euclidean space [9]. But at the same time, Euclidean space has many restrictions, which limit the hierarchical expression of the structure in the space, which makes it impossible to operate the internal space well in the experiment [10]. e space structure in the phase reflection space, in general, and its restrictive conditions are the least, so this space can be used in subsequent experiments [11].
Let R n be the array space of the real number domain. For any two vectors a � (a 1 , . . . , a n ) and b � (b 1 , . . . , b n ) in R n , define their inner products as follows: (1) e real vector space that defines the inner product is called Euclidean space. e nonsingular linear transformation from Euclidean space E n to itself is called Euclidean transformation. Each Euclidean transformation will produce a subgroup of the affine transformation. An Euclidean transformation T E can be expressed by the following formula: Among them, R is an orthogonal matrix.

Reconstruction Space.
At present, the most commonly used methods for constructing the world coordinate system are based on the theory of Euclidean geometry. However, the affine coordinate system and the projective coordinate system to construct the world coordinate system can simplify the problem. erefore, the construction of a three-dimensional space can be achieved in three steps: the first step is to obtain the projective reconstruction based on the information of the corresponding points between the images, and thus the projection matrix of the camera under the constraints of the projective theory can be obtained; the second step is based on the projective reconstruction. e corresponding projective space can be upgraded to affine reconstruction by determining the information of the infinity plane; the third step is based on the affine reconstruction information obtained in the second step and some restrictions, so formula (3) is the equation of the cone image, and then the parameters in the camera are obtained to complete the Euclidean reconstruction. However, there is another situation. Based on the known information of the projective reconstruction in advance, the projective reconstruction can be directly upgraded to Euclidean reconstruction according to the actual constraints.
(1) Projective Reconstruction. Determine in advance a pair of corresponding points x i ⟷ x ' i of the two images to obtain a unique matrix F that conforms to e projective reconstruction can be obtained according to the basic matrix. e above formula can prove that when a pair of corresponding points between the images are known, a projective reconstruction can be obtained, but some information (calibration information of the camera) is not needed. However, when the projective reconstruction is obtained by this method, only the information of the projective reconstruction can be obtained, and there is a projective transformation between the actual metric reconstruction and the projective reconstruction [12].
(2) Affine Reconstruction. Finding the position information of the infinity plane is actually taking corresponding measures to determine the affine reconstruction, and the infinity plane is related to the background, position, and calibration information. Generally, let π ∞ � (0, 0, 0, 1) T be the infinity plane at a certain position. However, the invariance of the infinity plane cannot be restricted by projective transformation. erefore, in space, the position of the infinity plane is arbitrary [13]. erefore, the first step should be to determine the spatial position of the infinity plane so that the Security and Communication Networks 3 projective space can be upgraded to the affine space.
If the location information of the target object is determined in advance, the above process is not difficult to do. But if you can find a 4-dimensional vector and use it to represent a plane under the projective space where π is located, you can use it to find the projective transformation from π to (0, 0, 0, 1) T . Due to the different manifestations of the projective transformation in the plane where it is located, the corresponding transformation matrix H must be calculated, which conforms to e transformation process is shown as follows: e above process is to determine the infinity plane position information. By using the transformation matrix H, the point information and the calibration information of the camera can be used to upgrade the projective reconstruction to the affine reconstruction.
e essence of measurement reconstruction is to identify the absolute conic. Because the absolute quadratic curve is a planar quadratic curve on the infinity plane, as long as the relevant information is found, the position information of the infinity plane can be determined. According to the theory of hierarchical reconstruction, the first is to calculate the projective reconstruction, upgrade it to affine reconstruction, and then use the result of affine reconstruction to upgrade to metric reconstruction [14]. As the result of calculating the affine reconstruction already includes the relevant information of the infinity plane, the absolute conic can be obtained directly. If the absolute conic has been found, the next step is to calculate the projective transformation in the Euclidean coordinate system to complete the metric reconstruction.

Sequence Image Matching Reconstruction
Based on Improved 2DPCA-SIFT Feature Matching Algorithm

Improved 2DPCA-SIFT Feature Matching Algorithm.
In the process of 3D reconstruction, it is necessary to acquire a large number of points in the image, but not all of these points can be helpful to the reconstruction during reconstruction. Only the points that are significantly different from the surroundings are the points that are needed. ese points are called feature points. If the two-dimensional coordinates of these feature points can be obtained in the two images, respectively, then three-dimensional reconstruction can be carried out. e traditional SIFT algorithm needs to locate the local extreme points in the scale space and the two-dimensional plane space at the same time to determine the location of the local extreme points and use the selected local extreme points as the key points. e position information of the key point is calculated, and the gradient direction of all points in the neighborhood of the key point is calculated to determine the main direction of the key point, and then the invariance of the geometric transformation and rotation of the operator can be completed [15]. e PCA algorithm can solve the problem of correlation between images and achieve data compression [16]. However, the PCA theory has several key technologies that need to be improved. First, a nonsparse matrix must be decomposed.
e decomposition process will make the image vector dimension too high, make the calculation process too complicated, and damage the original image after dimensionality reduction. e spatial topological structure cannot yet reflect the nonlinear structure contained in the image set, so the improved 2DPCA-SIFT algorithm can solve the above problems well.
BRISK descriptor calculation is a necessary processing link for the improvement of SIFT algorithm. e BRISK descriptor keeps good rotation invariance and scale invariance at all times. When specific information instructions are executed, due to the existence of descriptor indicators, the improvement of SIFT algorithm has strong controllability.
In the actual calculation process, the BRISK descriptor can only be obtained by neighborhood sampling; that is to say, in the pixel block centred on the feature point, the specific position of the BRISK descriptor is determined by concentric circles, and all samples are required. e points must be equally spaced on the circumference [17]. In addition, in order to completely eliminate the transmission differences between the image data of ancient buildings in the Qing Dynasty, all sampling points should be filtered separately.
e specific BRISK description subsampling mode is shown in Figure 1.
Let Ω represent the sampling point pair set; p i , p j , respectively, represent two different SIFT improvement basis vectors; and i, j represent two different images' data information. Combining the above physical quantities, the BRISK descriptor calculation expression can be defined as Among them, N represents the number of information elements in the sampling point pair set Ω, δ max represents the maximum distance threshold, and δ min represents the minimum distance threshold. e traditional SIFT algorithm uses the Euclidean distance to determine the degree of similarity measurement between key surveying points, while the improved SIFT algorithm redefines the similarity measurement coefficient value with the support of the BRISK descriptor index, thereby making the image characteristics of ancient buildings in the Qing Dynasty. e points get rematched. e specific definition of mapping feature point matching is as follows: Among them, a, b are the corresponding feature point descriptors of ancient architecture images in the Qing Dynasty, f represents the SIFT algorithm improvement trend value, λ represents the centralized action authority value of the BRISK descriptor, and ΔT represents the unit matching time of the feature points.

Reconstruction of Sequence Image Matching to Remove
Error Interference. In actual situations, the reconstruction of serial images will be interfered with by many factors, such as environmental factors and factors that obscure ancient buildings. ese interference factors will have some influence on the final reconstruction results. In order to achieve a more perfect reconstruction model of the ancient building target object and improve the accuracy and stability of the matching, the experiment in this chapter uses the 8-point method to calculate the basic matrix of the ancient building as the initial value. e random sampling consensus algorithm (RANSAC iterative algorithm) is used to solve the basic matrix until the final basic matrix is stable. e process is shown in Figure 2.
e specific operation process is as follows: e first step is to extract 8 sets of corresponding points uniformly and randomly from the obtained feature point pairs. e second step uses these 8 sets of corresponding points to find the minimum value of the basic matrix. Evaluate the basic matrix. If the distance is small enough, the corresponding points correspond to each other. e last step is to rebuild and fit all the points according to the results obtained in the above steps to solve a new basic matrix. If not, then go back to the first step and continue to solve until the fundamental matrix is stable. e random sampling consensus algorithm is an algorithm based on fitting data, which has strong stability. e first step of the random sampling consensus algorithm is to determine an objective function corresponding to the actual situation according to the problem to be solved. e second step is to iterate continuously to initialize the value of the parameters in the actual problem. e third step is to initialize in the second step. Based on this, the initial values obtained are classified into "inner points" that meet the model parameters and "outer points" that do not meet the model parameters. e last step is to use the obtained "inner points" and "outer points" pairs in turn. e model is reevaluated, and finally, accurate matching points are obtained to eliminate mismatched points.
After obtaining a large amount of three-dimensional point information of the target object, the relevant theories of image processing must be used to further process these points of the basic matrix, and a more realistic target object model can be obtained. At present, the gridding and rendering technology using three basic matrix dimensional points is the most widely used method in the field of 3D reconstruction. In the final process of the three-dimensional reconstruction of the basic matrix, the information of these points needs to be constructed into a surface, and the triangle theory is called the basic matrix is the simplest surface element. e method chosen for the experiment in this  Security and Communication Networks chapter is the simplest and most mature triangulation method. e final result of the basic matrix 3D reconstruction is to obtain a realistic 3D model of the reconstructed object, but texture mapping is the best way to reflect the realism of the 3D model. erefore, after obtaining a large number of useful three-dimensional points of the target object and the basic matrix, texture can be added to the surface of these target objects. e more widely used method is forward texture mapping. Forward texture mapping can be summarized as mapping the texture space to the screen space, which means that the points corresponding to the two-dimensional image are mapped to the three-dimensional points in the three-dimensional space. It is called texture scanning. Forward texture mapping is the conversion process between the two-dimensional function of the image and the three-dimensional space function, and finally, it can be reflected in the image space by using the projection method.
First, assume that V represents texture coordinates, (x, y) is screen coordinates, and F is a forward mapping function; that is, forward texture mapping can be expressed by l(u, v)).

(7)
According to the above, the forward texture mapping scans the lines in the space. After each scan line in the texture space, after mutual projection in the dimensional space, it can make full use of the texture pixels stored in the memory to speed up the graphics generation speed.

Realization of the Algorithm of Three-Dimensional Reconstruction of Ancient Buildings in the Qing Dynasty
According to the abovementioned matching and reconstruction of the sequence images of ancient buildings in the Qing Dynasty, the accuracy of image reconstruction is improved. After the matching images are obtained, one point of the damaged part of the building in the two sequence images is taken, and the two points are merged to realize the whole process of 3D reconstruction. e fusion process is divided into two parts: one is to determine the consistent corresponding point set in the sequence image, and the other is to solve the transformation matrix to complete the fusion of the two matrix point sets. P 1 , P 2 , respectively, represent the two sequence image systems, count the number of damaged parts in the photo D of the ancient building at the corresponding points in P 1 , P 2 , and the specific implementation method is that, for each image K in D, read it in the two sequence images. e corresponding point in the system is defined as P k1 , P k2 . en calculate the pixel position of P 1 , P 2 , projected on K, and record the projected point coordinates of the three-dimensional point in the common plane. e calculation formula is In the formula, X i represents the three-dimensional point coordinates, P represents the camera matrix corresponding to the image K, and x i represents the twodimensional point coordinates on which X i is projected. e result of projecting P 1 , P 2 to image K is marked as K 1 , K 2 . e projected pixel coordinates calculated by formula (8) are not integers, so it is necessary to round the coordinates of each pixel in the image. After rounding, compare and analyze the coordinate positions of the pixels in the two images and record them. Pixels with overlapping coordinate values are output, and the overlapping pixels form a point set A; then, the points in this set are matching points. In this way, a consistent point pair between the whole point and the local point can be obtained.
In order to achieve accurate alignment of the coordinates of all points in the corresponding point set, it is necessary to find a similarity transformation T. Since the corresponding points of the two sequence images are known, the solution of T is solved using an explicit solution. Transformation T is a combination of three parameters, namely, the translation vector L, the scaling factor s, and the optimal rotation matrix R ′ . From this, the solution problem can be converted into a minimized objective function as follows: en, solve the corresponding transformation by the following method: (1) Solve the translation vector L.
First, calculate the geometric center of P 1 , P 2 by the following formula: In formula (10), O represents the geometric center, N represents the number of points, and then through the obtained O 1 , O 2 , the translation vector L can be calculated as follows: In the actual operation process, the coordinate normalization method is used to translate the center point of the two sequence image systems to the origin O. erefore, formula (11) can also be transformed into the following form: (2) Solve the optimal rotation matrix R ′ . Without considering the scaling factor, formula (12) can be further simplified as follows: In order to ensure that the system coordinates remain unchanged during the selection and transformation process, the selection matrix should satisfy the constraint of det(R) � 1. e optimal rotation matrix R ′ is solved by OPP algorithm as follows: In the formula, U, V, respectively, represent the eigenvector matrix. (3) Solve for scaling factor s. e scaling factor can be obtained directly according to formula (14): In the formula, tr(·) represents the matrix trace [7]. After the scaling, translation and rotation transformation are completed by the above method; the point cloud in the sequence image system P 2 is converted to the P 1 sequence image system by the following formula: As a result, the fusion of the two sequence image point clouds is completed, and the three-dimensional virtual reconstruction algorithm of ancient buildings in the Qing Dynasty is realized.

Experimental Analysis
In order to verify the effectiveness of the three-dimensional virtual reconstruction algorithm of Qing Dynasty ancient buildings designed in this paper based on image sequences, the experiment environment is simulated in MATLAB software, and the algorithm of literature [4], literature [5], and literature [6] and the algorithm of literature [7] are used as the experimental comparison methods to design simulation comparison experiments.

Selection of Experimental Subjects.
e experiment object took the ancient Qing Dynasty building Summer Palace corridor Ru Pavilion as an example. Kuru Pavilion is located on the east embankment south of the newly built gate of the Summer Palace. It is commonly known as Bafang Pavilion. It sets against each other in space with the Seventeen-Hole Bridge and Nanhu Island. Kuo Routing sits north and faces south. e building area is 384.95 square meters, and the plane is octagonal, with 3 rooms on each side, surrounded by corridors, double eaves, eight ridges, and round treasure roofs. ere are 42 pillars in the pavilion. ere is a wooden plaque on each side of the pavilion (8 pieces in total) on which Qianlong imperial poetry is engraved. e schematic diagram of the experimental object is shown in Figure 3.

Experimental Procedure.
e performance of the method is shown by the completeness and accuracy of the ancient building 3D model construction.
e analysis process of the specific experimental results is as follows: reconstruction of the patch according to 7 × 7 blocks, using Unity 3D tools and EditSpline and other methods to composite modelling and processing wireframes, using literature [4], literature [5], and literature [6] algorithm, literature [7] algorithm, and the designed algorithm to realize the three-dimensional virtual reconstruction process, and obtain the three-dimensional virtual reconstruction renderings of the ancient building Summer Palace corridor Rutting of the Qing Dynasty and the completeness and accuracy of the reconstruction Perform analysis.

Analysis of Experimental
Results. According to the above-selected experimental objects and experimental instrument parameter settings, the ancient building threedimensional model construction experiment was carried out. e literature [4], literature [5], and literature [6] algorithm, the literature [7] algorithm, and the designed algorithm were used to perform three-dimensional virtual reconstruction of the summer palace corridor Rutting Pavilion. e effect comparison chart of this method is shown in Figure 4.
Analyzing Figure 4, it can be seen that, using the algorithms of literatures [4][5][6][7] to perform three-dimensional virtual reconstruction of the corridors of ancient buildings in the Qing Dynasty, the completeness of the front reconstruction model is better, but the definition is poor, especially the wall part of the frontal model reconstructed by literature [4]. e performance of the overhead model is poor and the texture information is lost. e reconstruction of the three-dimensional model of the corridor of the Summer Palace obtained by the designed algorithm is relatively complete and clear, such as pavilions, towers, and top views, which proves that the three-dimensional virtual reconstruction effect of the algorithm is excellent. e experiment divides the experimental object into 8 subparts, uses the literature [4], literature [5], and literature [6] algorithm, the literature [7] algorithm, and the designed algorithm to model it in three dimensions, and compares the built model with the actual building to calculate the integrity of the built model. Table 1 shows the completeness data of three-dimensional model construction of ancient buildings.
According to the data in Table 1, for each subpart of the ancient building, the completeness of the three-dimensional model of the designed algorithm is higher than that of the existing method. rough the comparison of average values, it is found that compared with the algorithm in literature [4], literature [5], and literature [6] and the algorithm in literature [7], the completeness of the 3D model of the designed algorithm is improved by 25.21%, 23.18%, 24.41%, and 12.84%, which fully shows that the designed algorithm has better performance in the construction of the ancient building 3D model.
In order to further verify the effectiveness of the method in this paper, the accuracy of the ancient building 3D model construction of the method in this paper, the algorithm in literature [4], literature [5], and literature [6] and the algorithm in literature [7] are compared and analyzed. e comparison result is shown in Figure 5.
According to Figure 5, the accuracy of constructing the 3D model of ancient Qing Dynasty architecture in this paper is up to 100%, while the accuracy of constructing the 3D model of ancient Qing Dynasty in literature [4] algorithm, literature [5] algorithm, and literature [6] algorithm and document [7] is only 71%, 78%, 70%, and 80%. It shows that  Reference [5] algorithm (%) Reference [6] algorithm (%) the construction accuracy of the ancient Qing Dynasty three-dimensional model of the method in this paper is higher than that of the existing methods. It is because the method in this paper preprocesses the sequence image data of the target ancient building, and the sequence image is based on the improved 2DPCA-SIFT feature matching algorithm. Perform matching reconstruction, and use the RANSAC iterative algorithm to remove the interference error in the sequence image reconstruction process, use the consistent corresponding point set in the sequence image to solve the transformation matrix, complete the fusion of the two matrix point sets, and realize the three-dimensional virtual reconstruction of ancient buildings in the Qing Dynasty. Algorithm design improves the accuracy of construction.

Conclusion
is paper designs a three-dimensional virtual reconstruction algorithm for ancient buildings in the Qing Dynasty based on image sequences. Experimental results show the completeness of the three-dimensional virtual reconstruction 3D model of ancient Qing dynasty architecture constructed by the designed algorithm has been significantly improved. e completeness and accuracy of the three-dimensional model construction of the subparts of the ancient Qing dynasty architecture of this method are high, which fully shows that the designed algorithm is in the ancient architecture of the Qing Dynasty. e performance in 3D model construction is better. e primary limitation to the generalization of these results is that the reconstruction efficiency of our algorithm is not high enough; however, we believe that there is a possibility of improvement. In the future, we will carry out our work based on this.

Data Availability
e data used to support the findings of this study are available upon request to the author.

Conflicts of Interest
e author declares that he has no conflicts of interest regarding the publication of this paper. Security and Communication Networks 9