Rotator ancient building component model reconstruction method based on least square method

The rotation axis is determined by fitting the circle with three-dimensional laser scanning and least squares method, and fitting the rotation bus with the non-uniform rational B-spline curve, which solves the problem of insufficient reconstruction accuracy of the model of the rotating ancient building components, and realizes high-precision three-dimensional model reconstruction.

CN120493352APending Publication Date: 2025-08-15RIZHAO VOCATIONAL & TECHNICAL UNIVERSITY
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510520835.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The prior art is difficult to realize high-precision three-dimensional model reconstruction of rotating ancient building components, especially when extracting the rotation axis and the rotation busbar.

Method used

Three-dimensional laser scanning technology is used to obtain point cloud data, and the rotation axis position is determined by fitting the circle through slice and projection combined with least squares method. The rotation bus is fitted using a non-uniform rational B-spline curve, and the three-dimensional model is reconstructed by rotating the rotation bus around the rotation axis.

Benefits of technology

The accuracy of model reconstruction is improved, ensuring that the extraction of rotating shafts and rotating busbars is accurate, and the model can more accurately reflect the actual shape and size of ancient building components, providing reliable data support for protection and restoration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120493352A_ABST
    Figure CN120493352A_ABST
Patent Text Reader

Abstract

The invention discloses a rotating body ancient building part model reconstruction method based on a least square method, and relates to the technical field of model reconstruction analysis, and the method comprises the steps: obtaining ancient building part point cloud through employing a three-dimensional laser scanning technology; the historic building part point cloud is sliced and projected to a horizontal plane, a circle is fitted by using a least square method, circle center coordinates are extracted, and the position of a rotating shaft is determined. According to the method, the precision of model reconstruction is effectively improved by accurately extracting the rotating shaft and fitting the rotating generatrix, high-precision point cloud data is obtained by using a three-dimensional laser scanning technology, and accurate extraction of the rotating shaft and the rotating generatrix is ensured through the steps of slicing, projection, least square fitting and the like; a non-uniform rational B-spline curve is adopted to fit a rotating bus, the rotating bus is rotated around a rotating shaft to reconstruct a three-dimensional model, the three-dimensional model of the ancient building part model is parameterized, the geometric accuracy of the model is further improved, and the reconstructed model can more accurately reflect the actual shape and size of the ancient building part.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of model reconstruction analysis, and in particular to a method for reconstructing a model of a rotating ancient building component based on a least squares method. Background Art

[0002] As an important material carrier of Chinese civilization, ancient Chinese architecture carries rich historical, cultural, artistic, and scientific value. However, in the rapid development of modern society, ancient Chinese architecture faces many challenges such as earthquakes, natural erosion, and human destruction. Many ancient buildings have gradually lost their original style and are even on the verge of extinction. To protect this precious cultural heritage, it is particularly important to collect the geometric and textural characteristics of ancient buildings and establish digital archives. Such digital archives not only provide valuable data for the protection and restoration of ancient buildings, but also provide a basis for reconstruction work after damage.

[0003] In the process of digital protection of ancient buildings, 3D laser scanning technology (also known as "real-scene replication technology") is widely used due to its non-contact, high efficiency and high precision. This technology obtains the surface characteristics of the object by emitting a laser beam and receiving the reflected signal from the target, thereby accurately collecting the geometric information of the ancient building. With the advancement of technology, researchers have developed many advanced data reduction and point cloud registration algorithms, making the application of 3D laser scanning technology in the field of ancient building protection more mature. In addition, the rise of historical building information modeling (HBIM) has also completely changed the mode of architectural heritage management and provided new means for the management and protection of historical buildings.

[0004] However, for ancient architectural components with more complex geometric shapes, traditional three-dimensional model reconstruction methods often find it difficult to achieve ideal accuracy. Therefore, how to achieve high-precision three-dimensional model reconstruction of rotating ancient architectural components by extracting the rotation axis and rotation generatrix of the rotating body and fitting them using the least squares method is the problem to be solved by the present invention. To this end, a model reconstruction method for rotating ancient architectural components based on the least squares method is proposed. Summary of the Invention

[0005] The purpose of the present invention is to provide a method for reconstructing a model of a rotating ancient building component based on the least squares method to solve the problems raised in the above background technology.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0007] The method for reconstructing the model of the rotating ancient building component based on the least squares method includes the following steps:

[0008] Step 1: Use 3D laser scanning technology to obtain point clouds of ancient building components to ensure data accuracy and integrity, providing a foundation for subsequent steps;

[0009] Step 2: Slice the point cloud of the ancient building components and project it onto the horizontal plane. Use the least squares method to fit a circle, extract the coordinates of the circle center, and determine the position of the rotation axis.

[0010] Step 3: translate the point cloud so that the bottom center is at the origin, project it onto a specific plane, and use the improved alphashape algorithm to extract the rotation generatrix point cloud;

[0011] Step 4: Use non-uniform rational B-spline (NURBS) curves to fit the rotation generatrix point cloud, and determine the direction and shape of the curve through principal component analysis (PCA);

[0012] Step 5: Reconstruct a three-dimensional model of the rotating body component by rotating the rotating generatrix 360 degrees around the rotation axis according to the extracted rotation axis and the fitted rotation generatrix curve, and translate the three-dimensional model to match the original point cloud of the ancient building component to obtain a model that matches the original point cloud;

[0013] Step 6: traverse the point cloud of the ancient building components, calculate the minimum distance from the point to the three-dimensional model, evaluate the model accuracy, and ensure the accuracy and reliability of the reconstructed model.

[0014] A further improvement of the technical solution of the present invention is that: the step 1 specifically includes:

[0015] Investigate and analyze the components of the ancient buildings, clarify the scanning objectives, scope, and key areas, and deploy 3D laser scanners based on the structural characteristics of the ancient buildings. Develop a scanning plan, including the selection of scanning equipment, setting of scanning resolution, and planning of scanning paths.

[0016] According to the established scanning plan, the ancient building components were scanned using a 3D laser scanner. The 3D laser scanner emitted a laser beam and received the reflected signal from the component surface. By calculating the round-trip time and angle information of the laser beam, the 3D coordinate data of the component surface was obtained. Multiple scans were performed on various angles and details of the ancient building components to ensure that comprehensive and complete point cloud data was obtained.

[0017] The original point cloud data collected on site is imported into the 3D data processing software for pre-processing, the point cloud data is aligned and spliced, and the point cloud data from multiple scanning perspectives are integrated to obtain a complete point cloud of ancient building components.

[0018] A further improvement of the technical solution of the present invention is that: the step 2 specifically includes:

[0019] Slice the point cloud data of the ancient building components. According to the geometric characteristics of the rotating components, select the slicing direction and slicing interval, perform horizontal slicing along the height direction of the components, and adjust the slicing interval according to the size of the components to ensure that the slices can cover the key feature areas of the components. Then, split the point cloud data of the ancient building components into multiple two-dimensional slice point clouds, each slice containing point cloud data within a certain height range;

[0020] Project the sliced point cloud data onto the horizontal plane so that each point in the sliced point cloud is projected onto the horizontal plane to form a two-dimensional point cloud projection;

[0021] After obtaining the projected two-dimensional point cloud data, the least squares method is used to fit a circle. Then, the optimal solution of the center coordinates and radius of the circle is obtained by calculating the sum of squares of the residuals between the point cloud data and the fitted circle and taking its derivative.

[0022] For rotating parts, the rotation axis is determined by fitting the center coordinates of the circle. Circle fitting is performed on multiple slice point clouds to obtain the center coordinates of each slice. The position of the rotation axis of the rotating part is determined by analyzing the changing trend of the center coordinates of all slices.

[0023] A further improvement of the technical solution of the present invention is that the process of extracting the rotating axis of the rotating body component includes:

[0024] Extract the minimum value z of the Z coordinate of the point cloud of the rotating body component min and the maximum value z max , get the minimum Z coordinate and maximum Z coordinate of the height of the rotation axis l;

[0025] For the X and Y coordinates of the rotation axis, slice the upper and lower parts of the point cloud of the rotating body to obtain the sliced point cloud s t and s b ;

[0026] Project the slice point clouds onto the XOY plane to obtain point clouds s pt and s pb , respectively for point cloud s pt and s pb Perform circle fitting to obtain the center coordinates O t and O b If the distance between the two points is less than the set threshold, the midpoint coordinates of the line connecting the two points (x l ,y l ) as the plane coordinate of the rotation axis l, and the starting point of the rotation axis (x l ,y l , z min ) and the end point (x l ,y l , z max ).

[0027] A further improvement of the technical solution of the present invention is that when fitting the horizontal projection point cloud of the slice of the rotating body, the least squares principle is used to fit the point cloud into a circle, and the coordinates of the center of the circle are extracted. The radius of the fitting circle is R, and the coordinates of the center of the circle are (x0, y0). Then the equation of the fitting circle of the slice projection point cloud is:

[0028] (x-x0) 2 +(y-y0) 2 =R 2 (1)

[0029] The residual equation of the slice horizontal projection point cloud and the fitted circle is:

[0030] ε i =(x i -x0) 2 +(y i -y0) 2 -R 2 (2)

[0031] Where, i∈E, E is the set of slice projection point clouds, (x i ,y i ) The coordinates of the midpoint of the horizontal projection point cloud of the rotating body slice, (x0, y0) are the coordinates of the center of the fitted circle;

[0032] The function of the sum of squares of the rotation volume slice projection point cloud and the fitted circular residual is:

[0033]

[0034] Where Q represents the function value of the residual sum of squares between the projected point cloud of the rotational volume slice and the fitted circle, which is used to evaluate the degree of fit between the projected point cloud of the rotational volume slice and the fitted circle;

[0035] According to the least squares principle, find the partial derivative of x0, y0, and R:

[0036]

[0037] The following formula is obtained:

[0038]

[0039] For the convenience of expression, the following expression is set:

[0040]

[0041] Where x m is x to the power of m, y n is the nth power of y, is the mth power of the x-coordinate of the i-th point, is the nth power of the y coordinate of the i-th point;

[0042] Combining formula (6) to simplify formula (5) we can get:

[0043]

[0044] Arranging formula (6) yields:

[0045]

[0046] The parameters x0, y0, and R of the fitting circle can be derived from formula (7) and formula (1), as shown in formula (8):

[0047]

[0048] The horizontal projection point clouds of the upper and lower slices of the rotating body are traversed by formula (8) to obtain the coordinates of the center of the fitting circle of the upper slice (x t ,y t ) and the coordinates of the center of the lower slice fitting circle (x b ,y b ), if the distance between the two points does not exceed the threshold, the threshold refers to the distance difference between the two points. In theory, the two points should coincide, and the difference can be set to 3mm. The middle point of the line connecting the two points is taken as the plane coordinate of the rotation axis of the rotating body (x l ,y l ), as shown in formula (9), if the distance between two points is greater than the threshold, the slice position or thickness is adjusted until the center position that meets the conditions is found;

[0049]

[0050] A further improvement of the technical solution of the present invention is that: the step 3 specifically includes:

[0051] By analyzing the point cloud data of the ancient building component, the geometric center point of the bottom of the component is found, the bottom center position of the component point cloud is determined, and the vector from the geometric center point to the coordinate origin is calculated. The entire point cloud data of the ancient building component is translated in the opposite direction of the vector so that the bottom center of the component coincides with the coordinate origin;

[0052] Project the translated component point cloud onto the XOZ plane, and the projected point cloud forms a two-dimensional point cloud image;

[0053] Based on the projected 2D point cloud, the improved alpha shape algorithm is applied and initialized, and the alpha value is set as the algorithm parameter to prepare for the boundary extraction operation.

[0054] The alpha shape algorithm is applied to extract the boundaries of the projected two-dimensional point cloud image. By calculating the distance relationship between points in the point cloud and combining it with the set alpha value, the boundary contour of the point cloud is gradually constructed. An arbitrary point in the point cloud dataset is selected as the starting point, and the distance from this point to other points is calculated. The set of points that meet the conditions is screened out, and the boundary points are determined by the distance intersection method. The above operation is repeated to gradually extract the complete boundary point cloud. The boundary point cloud is further processed, and the final boundary point cloud is the rotation generatrix point cloud, where the rotation generatrix point cloud reflects the contour characteristics of the rotating body component.

[0055] A further improvement of the technical solution of the present invention is that: the step 4 specifically includes:

[0056] Preprocess the extracted rotation generatrix point cloud to ensure data integrity and accuracy, remove existing noise points and outliers, smooth the point cloud to reduce data fluctuations, and analyze the overall distribution characteristics of the point cloud, including dense and sparse areas of the point cloud, to clarify the general shape and direction of the rotation generatrix;

[0057] Principal component analysis (PCA) is applied to analyze the rotation generatrix point cloud and calculate the covariance matrix of the point cloud data. By solving the eigenvalues and eigenvectors of the covariance matrix, the degree of change of the point cloud data in each direction is found. The larger the eigenvalue, the more significant the data change in the direction of the corresponding eigenvector. The eigenvector corresponding to the largest eigenvalue is selected as the main direction of the rotation generatrix, which represents the main extension direction of the point cloud data.

[0058] The principal directions and distribution range of the point cloud data obtained by principal component analysis are analyzed, and the control points and node vectors of the non-uniform rational B-spline curve (NURBS) are initialized. The initial control points are evenly placed within the range of the point cloud data along the principal directions. The number of control points is adjusted according to the complexity of the point cloud and the required fitting accuracy. The node vectors of the non-uniform rational B-spline curve (NURBS) are set, and the first three values of the node vectors are set to 0, the last three values are set to 1, and the middle node values are evenly distributed between 0 and 1. This constructs a preliminary non-uniform rational B-spline curve (NURBS) model.

[0059] The initialized non-uniform rational B-spline curve (NURBS) is optimized and fitted to improve the fitting accuracy of the curve to the rotation generatrix point cloud. The objective function is constructed by calculating the distance between the point cloud data and the non-uniform rational B-spline curve (NURBS). The objective function includes the distance error from the point cloud to the curve and the smoothness constraint of the curve. The position of the control point is adjusted using the least squares method to minimize the value of the objective function. During the optimization process, the position of the control point is continuously iteratively updated until the preset convergence condition is met (the change in the control point position is less than a certain threshold or the objective function value no longer decreases significantly). Finally, the rotation generatrix point cloud is fitted with the obtained NURBS curve to reflect the geometric shape and characteristics of the rotation generatrix.

[0060] A further improvement of the technical solution of the present invention is that: the step 5 specifically includes:

[0061] The direction and position of the extracted rotation axis are clarified to ensure that the rotation axis is consistent with the actual rotation axis of the rotating body component. At the same time, the obtained rotation generatrix point cloud is parameterized and represented as a mathematical curve.

[0062] According to the extracted rotation axis, the rotation generatrix curve is rotated 360 degrees around the rotation axis to generate a three-dimensional model of the rotation body component, wherein the three-dimensional model of the rotation body component is implemented in 3ds Max;

[0063] The reconstructed 3D model of the rotating body is translated to match the spatial position of the original point cloud data. According to the position of the rotation axis and the geometric characteristics of the original point cloud, the vector that the 3D model of the rotating body needs to be translated is calculated, and the 3D model of the rotating body is translated along the vector. Through model translation and matching, the 3D model reconstruction of the rotating body component is completed.

[0064] A further improvement of the technical solution of the present invention is that: the step 6 specifically includes:

[0065] Load the reconstructed 3D model of the rotating body, traverse each point in the point cloud, and calculate the minimum distance between the point and the 3D model;

[0066] Perform statistical analysis on the distance between each point and the model, and calculate the maximum distance, minimum distance, average distance, and standard deviation indicators to fully reflect the overall deviation between the point cloud data and the 3D model. Then, identify points with larger distances and analyze their causes.

[0067] The accuracy of the model is evaluated based on the statistically obtained distance data. If the maximum distance and average distance are small, and the standard deviation is also small, it means that the 3D model fits the point cloud data well and the model accuracy is high. If the distance is large or the standard deviation is large, it means that the 3D model fits the point cloud data poorly and further optimization and adjustment of the 3D model is required.

[0068] Due to the adoption of the above technical solution, the present invention has the following technical advancements compared to the prior art:

[0069] 1. The present invention provides a method for reconstructing the model of rotating ancient building components based on the least squares method. By accurately extracting the rotation axis and fitting the rotation generatrix, the accuracy of model reconstruction is effectively improved. Three-dimensional laser scanning technology is used to obtain high-precision point cloud data, and through slicing, projection, least squares fitting and other steps, the extraction of the rotation axis and rotation generatrix is ensured to be accurate. When extracting the rotation generatrix, a non-uniform rational B-spline curve is used for fitting, which further improves the geometric accuracy of the model, so that the reconstructed model can more accurately reflect the actual shape and size of the ancient building components, providing reliable data support for the protection and restoration of ancient buildings.

[0070] 2. The present invention provides a method for reconstructing the model of a rotating ancient building component based on the least squares method. By fitting the rotation axis and the rotation generatrix using the least squares method, the error between the point cloud data and the fitting curve can be effectively reduced. The least squares method determines the optimal fitting parameters by minimizing the sum of squared residuals, so that the fitting curve can more accurately reflect the geometric characteristics of the rotating component, and can significantly improve the accuracy of the three-dimensional model of the rotating component, making it closer to the real shape. Especially when dealing with ancient building components with complex geometric shapes, the least squares method can better capture detailed features and reduce deviations caused by data noise or local anomalies, thereby ensuring high-precision reconstruction of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0072] Figure 1 is a flow chart of the present invention;

[0073] Figure 2 This is a model accuracy analysis diagram of the present invention. DETAILED DESCRIPTION

[0074] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0075] Example 1, as Figure 1 、 Figure 2 As shown, the present invention provides a method for reconstructing a model of a rotating ancient building component based on the least squares method, comprising the following steps:

[0076] Step 1: Use 3D laser scanning technology to obtain point clouds of ancient building components to ensure data accuracy and integrity, provide a basis for subsequent steps, investigate and analyze the ancient building components, clarify the scanning targets, scope and key areas, and deploy 3D laser scanners according to the structural characteristics of the ancient buildings. Develop a scanning plan, including the selection of scanning equipment, the setting of scanning resolution and the planning of scanning paths. According to the developed scanning plan, use a 3D laser scanner to scan the ancient building components. Use the 3D laser scanner to emit a laser beam and receive the reflected signal from the surface of the component. By calculating the round-trip time and angle information of the laser beam, the 3D coordinate data of the component surface is obtained. During the scanning process, the stability of the scanner and the accuracy of the scanning parameters are ensured to avoid errors in data collection caused by equipment movement or improper parameter settings. Multiple scans are performed on various angles and details of the ancient building components to ensure the acquisition of comprehensive and complete point cloud data. The original point cloud data collected on site is imported into the 3D data processing software for pre-processing to remove noise, fill in missing parts, and optimize the point cloud density and distribution. During the processing, the filtering algorithm is used to remove abnormal points and outliers in the point cloud, and the interpolation algorithm is used to fill in the scanning blind spots or data missing areas. At the same time, the point cloud data is aligned and spliced, and the point cloud data from multiple scanning perspectives are integrated to obtain a complete point cloud of the ancient building components.

[0077] Step 2: Slice the point cloud of the ancient building component and project it to the horizontal plane. Use the least squares method to fit a circle, extract the coordinates of the center of the circle, determine the position of the rotation axis, slice the point cloud data of the ancient building component, select the slicing direction and slicing interval according to the geometric characteristics of the rotating body component, perform horizontal slicing along the height direction of the component, adjust the slicing interval according to the size of the component to ensure that the slice can cover the key feature area of the component, and then divide the point cloud data of the ancient building component into multiple two-dimensional slice point clouds, each slice contains point cloud data within a certain height range, and project the sliced point cloud data to the horizontal plane so that the points in each slice point cloud are projected onto the horizontal plane to form a two-dimensional point cloud projection. The purpose of the projection operation is to simplify the point cloud data in the three-dimensional space into a two-dimensional plane data. In order to facilitate the subsequent circular fitting calculation, during the projection process, it is necessary to ensure the accuracy of the projection to avoid the subsequent fitting results being affected by the projection error. After obtaining the projected two-dimensional point cloud data, the least squares method is used to perform circular fitting on it, and then the residual sum of squares between the point cloud data and the fitting circle is calculated and differentiated to obtain the optimal solution of the center coordinates and radius. For the rotating body component, its rotation axis is determined by the center coordinates of the fitting circle. Circular fitting is performed on multiple slice point clouds to obtain the center coordinates of each slice. The position of the rotation axis of the rotating body component is determined by analyzing the change trend of the center coordinates of all slices. Among them, if the center coordinates have an obvious linear distribution in a certain direction, the center coordinates of all slices are connected into a straight line as the approximate position of the rotation axis.

[0078] The extraction process of the rotating shaft of the rotating body component includes:

[0079] Extract the minimum value z of the point cloud of the rotating body component min and the maximum value z max , get the minimum Z coordinate and maximum Z coordinate of the rotation axis l; for the X coordinate and Y coordinate of the rotation axis, slice the upper and lower halves of the rotation point cloud to get the sliced point cloud s t and s b ; Project the slice point cloud onto the XOY plane to obtain point cloud s pt and s pb , respectively for point cloud s pt and s pb Perform circle fitting to obtain the center coordinates O t and O b If the distance between the two points is less than the set threshold, the midpoint coordinates of the line connecting the two points (x l ,y l ) as the plane coordinate of the rotation axis l, and the starting point of the rotation axis (x l ,y l , z min ) and the end point (x l,y l , z max );

[0080] In addition, when fitting the horizontal projection point cloud of the slice of the rotating body, the least squares principle is used to fit the point cloud into a circle, and the center coordinates of the circle are extracted. The radius of the fitting circle is R, and the center coordinates are (x0, y0). Then the equation of the fitting circle of the slice projection point cloud is:

[0081] (x-x0) 2 +(y-y0) 2 =R 2 (1)

[0082] The residual equation of the slice horizontal projection point cloud and the fitted circle is:

[0083] ε i =(x i -x0) 2 +(y i -y0) 2 -R 2 (2)

[0084] Where, i∈E, E is the set of slice projection point clouds, (x i ,y i ) The coordinates of the midpoint of the horizontal projection point cloud of the rotating body slice, (x0, y0) are the coordinates of the center of the fitted circle;

[0085] The function of the sum of squares of the rotation volume slice projection point cloud and the fitted circular residual is:

[0086]

[0087] Where Q represents the function value of the residual sum of squares between the projected point cloud of the rotational volume slice and the fitted circle, which is used to evaluate the degree of fit between the projected point cloud of the rotational volume slice and the fitted circle;

[0088] According to the least squares principle, find the partial derivative of x0, y0, and R:

[0089]

[0090] The following formula is obtained:

[0091]

[0092] For the convenience of expression, the following expression is set:

[0093]

[0094] Where x m is x to the power of m, y n is y to the power of n, is the mth power of the x-coordinate of the i-th point, is the nth power of the y coordinate of the i-th point;

[0095] Combining formula (6) to simplify formula (5) we can get:

[0096]

[0097] Arranging formula (6) yields:

[0098]

[0099] The parameters x0, y0, and R of the fitting circle can be derived from formula (7) and formula (1), as shown in formula (8):

[0100]

[0101] The horizontal projection point clouds of the upper and lower slices of the rotating body are traversed by formula (8) to obtain the coordinates of the center of the fitting circle of the upper slice (x t ,y t ) and the coordinates of the center of the lower slice fitting circle (x b ,y b ), if the distance between the two points does not exceed the threshold, the threshold refers to the distance difference between the two points. In theory, the two points should coincide, and the difference can be set to 3mm. The middle point of the line connecting the two points is taken as the plane coordinate of the rotation axis of the rotating body (x l ,y l ), as shown in formula (9), if the distance between two points is greater than the threshold, the slice position or thickness is adjusted until the center position that meets the conditions is found;

[0102]

[0103] Step 3. Translate the point cloud so that the bottom center is at the origin, project it to a specific plane, and use the improved alphashape algorithm to extract the rotation generatrix point cloud. By analyzing the point cloud data of the ancient building component, find the geometric center point of the bottom of the component, determine the bottom center position of the component point cloud, and calculate the vector from the geometric center point to the coordinate origin. Translate the entire ancient building component point cloud data in the opposite direction of the vector so that the bottom center of the component coincides with the coordinate origin. Project the translated component point cloud to the XOZ plane. The projected point cloud forms a two-dimensional point cloud map. Based on the projected two-dimensional point cloud map, apply and initialize the improved alpha shape algorithm, set the alpha value as the algorithm parameter, and prepare for the boundary extraction operation. The alpha value determines the tightness of the point cloud boundary extraction. If the alpha value is too large, the boundary will be too loose and cannot accurately reflect the shape of the component. If the alpha value is too small, the boundary will be too complex and contain too many noise points. Applying alpha The shape algorithm extracts the boundary of the projected two-dimensional point cloud image. By calculating the distance relationship between points in the point cloud and combining it with the set alpha value, it gradually constructs the boundary contour of the point cloud. It randomly selects a point from the point cloud dataset as the starting point, calculates the distance from this point to other points, and selects a set of points that meet the conditions. The boundary points are determined by the distance intersection method. The above operation is repeated to gradually extract the complete boundary point cloud. The boundary point cloud is further processed. The final boundary point cloud is the rotation generatrix point cloud, where the rotation generatrix point cloud reflects the contour characteristics of the rotating body component.

[0104] In addition, based on the obtained rotation axis of the rotating body component, the component point cloud is translated so that the bottom center point of the component point cloud is located at the coordinate origin, which is the coordinate value of the starting point (lowest point) of the rotation axis. The rotating body component point cloud is projected onto the XOZ plane to obtain the component's cross-sectional point cloud. When extracting the boundary of the cross-sectional point cloud, the alpha shape algorithm is used. The basic principle of the alpha shape algorithm is to roll a circle with a radius of α outside a pile of unordered point sets S. When α is large enough, the circle will not roll into the point set, and the trace of its rolling is the boundary line of the point set. The specific process is as follows:

[0105] (1) Set the radius α;

[0106] (2) Pick any point P from the point cloud dataset S k ;

[0107] (3) Calculate P k The distance to other points in the point set S, all points with point P k Points with a distance less than 2 times α are recorded in set K;

[0108] (4) Pick any point Q in the set K k ;

[0109] (5) Obtain the value of P by using the distance intersection method k , Q k And the circle with radius α, let the center of the circle be O1, O2; if the distance between all points in the point cloud dataset S and O1 or O2 is greater than the radius α, then P k , Q k is a boundary point, otherwise it is a non-boundary point;

[0110] (6) Take a point Q from the set K k+1 , repeat step (5);

[0111] (7) Take a point P from the point cloud dataset S k+1 , repeat the process (3)-(6);

[0112] The extracted projection boundary point cloud is the cross-sectional point cloud of the entire rotating body component. All points with X coordinates not less than 0 are extracted from the cross-sectional point cloud. If the rotating generatrix is separated from the rotation axis, the minimum Z coordinate value in the point cloud is extracted. min and the maximum value of the Z coordinate z max , along z min and z max Set certain thresholds downward and upward to extract the upper and lower boundary point clouds of the point cloud, and extract the point in the upper right corner of the upper boundary point cloud as the upper boundary point of the rotation generatrix, that is, the maximum value x of the x coordinate of the upper boundary point cloud. min and the maximum value of the Z coordinate z max , extract the point in the lower right corner of the lower boundary point cloud as the lower boundary point of the rotation generatrix, that is, the maximum value x of the X coordinate of the lower boundary point cloud max and the minimum value of the Z coordinate z min , and finally get the complete point cloud of the rotating generatrix. If the generatrix of the rotating body component intersects with the rotation axis of the rotating body component, make a longitudinal slice along the rotation axis to get the boundary points of the point cloud of the rotating generatrix.

[0113] Step 4: Use non-uniform rational B-spline curve (NURBS) to fit the rotation generatrix point cloud, determine the direction and shape of the curve through principal component analysis (PCA), pre-process the extracted rotation generatrix point cloud to ensure the integrity and accuracy of the data, remove existing noise points and outliers, smooth the point cloud to reduce data fluctuations, and analyze the overall distribution characteristics of the point cloud, including the dense and sparse areas of the point cloud, clarify the approximate shape and direction of the rotation generatrix, apply principal component analysis (PCA) to analyze the rotation generatrix point cloud, calculate the covariance matrix of the point cloud data, and find the degree of change of the point cloud data in each direction by solving the eigenvalues and eigenvectors of the covariance matrix. The larger the eigenvalue, the more significant the data change in the direction of the corresponding eigenvector. The eigenvector corresponding to the largest eigenvalue is selected as the main direction of the rotation generatrix, which represents the main extension direction of the point cloud data. According to the principal component analysis method, the main direction and the distribution range of the point cloud data are analyzed, and the control points and node vectors of the non-uniform rational B-spline curve (NURBS) are initialized. The initial control points are evenly placed, where the number of control points is adjusted according to the complexity of the point cloud and the fitting accuracy requirements. The node vectors of the non-uniform rational B-spline curve (NURBS) are set, and the first three values of the node vector are set to 0, the last three values are set to 1, and the intermediate node values are evenly distributed between 0 and 1. A preliminary non-uniform rational B-spline curve (NURBS) model is constructed, and the initialized non-uniform rational B-spline curve (NURBS) is optimized to improve the fitting accuracy of the curve to the rotation generatrix point cloud. The objective function is constructed by calculating the distance between the point cloud data and the non-uniform rational B-spline curve (NURBS). The objective function includes the distance error from the point cloud to the curve and the smoothness constraint of the curve. The position of the control points is adjusted using the least squares method to minimize the value of the objective function. During the optimization process, the position of the control points is continuously iteratively updated until the preset convergence condition is met (the change in the control point position is less than a certain threshold or the objective function value no longer decreases significantly). Finally, the rotation generatrix point cloud is fitted with the obtained NURBS curve to reflect the geometric shape and characteristics of the rotation generatrix.

[0114] In addition, the obtained rotation generatrix point cloud is defined as P = {p i (x i ,y i ), i=1,2,…,m}, where p1, p2, p3,…p m is a point in the point cloud set, m is the number of points in the point cloud of the rotation generatrix, and the point cloud data is fitted with a non-uniform rational B-spline curve to obtain a parameterized curve expression of the rotation generatrix;

[0115] Non-Uniform Rational B-Splines (NURBS) is a piecewise defined curve that generates a smooth curve by interpolating or approximating between given control points. To find a NURBS approximation of a point in a point cloud of a rotation generatrix, the order v of the NURBS must be determined first, and a set of control points B = {b i , i=0,1,…,n}, n refers to the number of the control point, there are n+1 control points in total, determine the knot vector (knotvector) ξ={ξ i , i=1,2,…,n+v+1}, the NURBS is expressed as:

[0116]

[0117] Where c(t) is the NURBS point at parameter t, is the basis function of NURBS, b i is the selected i-th control point, j = 0, 1, ..., v, t is the parameter of NURBS, which is a real number used to interpolate within the domain of NURBS to generate points on NURBS. t takes values in a subinterval of the knot vector. In order to ensure that NURBS is defined under the influence of each control point, the parameter t is in the intersection of the support intervals of all basis functions. The value range of t can only be [ξ i ,ξ i+p+1 ], basis functions Only in the interval [ξ i ,ξ i+p+1 ] is non-zero.

[0118] Basis functions Expressed as:

[0119]

[0120] The principal component analysis (PCA) is used to determine the approximate direction and shape of the NURBS, and the control point B and the node vector ξ are initialized. First, the covariance matrix of the points in the rotation generatrix point cloud set P is calculated. This matrix is a 2×2 matrix whose elements represent the covariance of the point cloud data in different dimensions. It is calculated using formula (3):

[0121]

[0122] Where, represents the variance of the x dimension, represents the variance of the y dimension, Represents the covariance of the x-dimension and the y-dimension, m is the number of points in the rotation generatrix point cloud, and the characteristic equation |C-λI|=0 is listed, where λ is the eigenvalue and I is the unit matrix. The two eigenvalues λ1 and λ2 are obtained by solving the equation. Substitute the eigenvalues λ1 and λ2 into the equation Cr=λr, where r is the eigenvector, and the corresponding eigenvectors r1 and r2 are obtained by solving the equation. The larger the eigenvalue λ, the more significant the change of the point cloud data in the direction of the eigenvector r, that is, the more dispersed the distribution of the point cloud data in this direction. This direction is selected as the main direction of NURBS;

[0123] After determining the main direction of NURBS, the control points B are evenly placed within the range of the rotation generatrix point cloud set P along the main direction of NURBS. The x coordinate range of P is [x min , x max ], the x coordinate range is [y min ,y max ], calculate the center point coordinates (x center ,y center ), place control points evenly from the center point to both sides along the main direction. In order to make the control points better approximate the shape of the point cloud data, adjust the position of the initially placed control points. Move each control point a certain distance in the direction perpendicular to the main direction to make the control point closer to the point cloud data;

[0124] In order to make the NURBS curve smoother at the first and last control points and have a certain interpolation property, the first three node values of the node vector ξ are set to 0, the last three node values are set to 1, and the other node values are evenly distributed between 0 and 1;

[0125] The best approximate feature of the rotating generatrix point cloud set P is the global minimization of the objective function of the control point B. In order to obtain the best fitting NURBS, this paper first derives the objective function of the control point B, and then uses the control point B solved by Eigen. For the point p in the rotating generatrix point cloud set P, i , first calculate the initial NURBS distance p i The nearest point c(t i ), p i Pointing to c(t i ) is the vector d i , then p i With c(t i ) between the points (PD)e i =||d i ||, in solving the nearest point c(t i ), use d(t)=||c(t)-p i || means p iThe minimum value of the distance function d(t) is the shortest distance between the two. Since it is more complicated to directly derive the distance function, we first derive the square of the distance function d(t), that is, Then by solving Find the minimum extreme point, start from t1, and use the iterative formula of Newton's method to iterate and solve it, see formula (13) for details, until certain convergence conditions are met, such as the difference between the t values of two adjacent iterations is less than a certain threshold, or the change in the distance function value is less than a certain threshold, and obtain the parameter t that makes the distance function take the minimum value, and then find the shortest distance;

[0126]

[0127] Where, f(t n ) is shown in the following formula, which is the derivative of the square of the distance from the curve point to the point cloud point with respect to the parameter t;

[0128]

[0129] Among them, the square of the distance between the point on the curve and the point in the point cloud of the rotation generatrix is in the brackets, and t is the variable of the curve;

[0130] In order to make NURBS smoother and minimize the curvature change, formula (15) is added to the objective function;

[0131] f s (b i )=∫||c``(t)|| 2 dt (15)

[0132] Where c``(t) is the curvature vector of the NURBS at point t.

[0133] At this point, the final objective function of control point B is obtained:

[0134]

[0135] Step 5, according to the extracted rotation axis and the fitted rotation generatrix curve, reconstruct the 3D model of the rotating body component by rotating the rotation generatrix 360 degrees around the rotation axis, translate the 3D model to match the original ancient building component point cloud, obtain a model that matches the original point cloud, clarify the direction and position of the extracted rotation axis, ensure that the rotation axis is consistent with the actual rotation axis of the rotating body component, and at the same time, perform parameterization on the obtained rotation generatrix point cloud and express it as a mathematical curve. The purpose of parameterization is to accurately express the geometric features of the rotation generatrix point cloud with mathematical formulas, so as to facilitate subsequent rotation operations and 3D model reconstruction. Through parameterization, it is convenient to take any point on the rotation generatrix point cloud and calculate its position during the rotation process. According to the extracted rotation axis, the rotation generatrix curve is rotated 360 degrees around the rotation axis to generate a 3D model of the rotating body component, wherein the 3D model of the rotating body component is in 3ds In Max, the reconstructed 3D model of the rotating body is translated to match the spatial position of the original point cloud data. Based on the position of the rotation axis and the geometric characteristics of the original point cloud, the vector that the 3D model of the rotating body needs to be translated is calculated, and the 3D model of the rotating body is translated along this vector. The translated 3D model of the rotating body should be completely aligned with the original point cloud in spatial position to ensure that the model can accurately reflect the actual position and posture of the ancient building components. Through model translation and matching, the 3D model reconstruction of the rotating body components is completed.

[0136] Step 6: traverse the point cloud of the ancient building components, calculate the minimum distance from the point to the 3D model, evaluate the model accuracy, ensure the accuracy and reliability of the reconstructed model, load the reconstructed 3D model of the rotating body, traverse each point in the point cloud, calculate the minimum distance from the point to the 3D model, and for the convenience of calculation, point p i Instead of rotating the NURBS, rotate it in the opposite direction around the Z axis (i.e. the rotation axis) to rotate it to the XOZ plane. i The coordinates of (x i ,y i , z i ), then the point p' after it rotates to the XOZ plane i The coordinates are Starting from the minimum value of the curve parameter t, traverse the value interval of the rotation generatrix curve parameter t at a certain interval, and iteratively calculate p' i Distance to the curve, extract p' iThe minimum distance to the curve is the minimum distance from the point to the 3D model. The calculated distance from each point to the model is statistically analyzed to calculate the maximum distance, minimum distance, average distance and standard deviation indicators to fully reflect the overall deviation between the point cloud data and the 3D model. Then, points with larger distances are identified and the reasons are analyzed. Based on the statistically obtained distance data, the accuracy of the model is evaluated. If the maximum distance and average distance are small, and the standard deviation is also small, it means that the 3D model fits the point cloud data well and the model accuracy is high. If the distance is large or the standard deviation is large, it means that the 3D model fits the point cloud data poorly and the 3D model needs to be further optimized and adjusted.

[0137] Example 2, as Figure 1 、 Figure 2 As shown, based on Example 1, the present invention provides a technical solution: preferably, in the case where the point cloud is complete, the top of the Hall of Prayer for Good Harvests in Beijing is selected for verification. As shown in the figure, point cloud data of the top of the Hall of Prayer for Good Harvests is obtained by a point cloud acquisition method;

[0138] 1. Traverse the point cloud of the top component and obtain the maximum z coordinate of the point cloud as 17.5160m and the minimum z coordinate as 15.7456m. Slice upwards at the 1 / 3 height (16.9258m) and 2 / 3 height (16.3357m) of the component point cloud with a slice width of 0.1m to obtain the upper and lower slice point clouds;

[0139] Project the upper and lower point cloud slices onto the XOY plane, and perform circular fitting on the upper and lower slice projected point clouds, respectively. The circle radii are 0.8225 meters and 0.9252 meters, respectively. The center coordinates are (115.9305, 34.9380) and (115.9304, 34.9379), respectively. The difference between the two center points is 0.0001 meters. The midpoint of the line connecting the two center points is taken as the plane coordinate of the component's rotation axis, that is, (115.9305, 34.9380). At this time, the start and end coordinates of the component's rotation axis are obtained, that is, (115.9305, 34.9380, 15.7456) and (115.9305, 34.9380, 17.5160).

[0140] 2. Translate the component point cloud (-115.9305, -34.9380, -15.7456) so that the center of the component bottom is at the origin of the coordinate system, project the translated component point cloud onto the XOZ plane, and sample alpha The shape algorithm extracts the boundary of the projected point cloud, where the extraction parameter alpha is 1.5, and the component cross-section boundary point cloud is obtained. All points with X coordinates less than 0 in the boundary point cloud are deleted, and all points with Z coordinates in the boundary point cloud [0, 0.003] are extracted, that is, the lower boundary point cloud. The maximum value of the X coordinate of the lower boundary point cloud is 0.5561 meters. The lower boundary point cloud is deleted from the boundary point cloud, and the lower boundary point of the boundary point cloud is added with coordinates (0.5561, 0, 0). The points with X coordinates in the range of [0, 0.003] in the above boundary point cloud are extracted, that is, the upper boundary point cloud. The point with the minimum X coordinate in the upper boundary point cloud is extracted with coordinates (0.0027, 0, 1.7704), and its coordinates are modified to (0, 0, 1.7704) so that the upper part of the boundary point cloud intersects with the rotation axis Z axis. At this point, the rotation generatrix of the component rotation body is obtained;

[0141] 3. Traverse the rotation generatrix point cloud and calculate the point cloud coordinate mean as (0.6293, 1.1500). The covariance matrix of the point cloud is calculated by the point cloud coordinate mean as follows: The covariance matrix is used to further calculate the point cloud eigenvalues to be 175.3973 and 23.4173, and the corresponding eigenvectors are (0.2508, -0.9680) and (-0.9680, -0.2508);

[0142] Define two third-order NURBS curves, named curve 1 and curve 2. Initially, curve 1 evenly places 10 control points along the main direction (0.2508, -0.9680) within the coordinate range of the rotation generatrix point cloud data. 14 NURBS nodes are set. The first three node values are the same, 0 and 1, and the middle 8 node values are evenly distributed between [0, 1]. The node interval values are stored in double floating-point data types with an interval value of 0.11111111111111110, resulting in the last three node values being 1.0000000000000002 instead of 1. Construct NURBS based on the initial control points and node vectors, traverse the rotation generatrix point cloud, solve the NURBS point closest to the point cloud, and extract the corresponding The parameter t is used to solve the linear equations to minimize the objective function and obtain the optimal solution of the control points. The maximum number of iterations is set to 100. The above steps are iterated until the increase or decrease of the control points is less than the set threshold 1e-6. The coordinates of the optimized control points are obtained, where the coordinates of the starting control point (control point No. 1) are (0.0401, 1.7785) and the coordinates of the ending control point (control point No. 10) are (0.5592, 0.0008). In order to make curve 1 intersect with the X-axis and the Z-axis, a control point (0.0000, 1.7785) is inserted before the starting control point as a new starting control point, and the coordinates of the ending control point are modified to (0.5592, 0.0000) as the new ending control point. Finally, 11 control points are determined.

[0143] Curve 2 initially defines 20 control points and 24 node vectors. The intermediate node interval value is 0.055555555555555552, and the last three node values are 1.0000000000000002. The iterative optimization parameters are the same as those of curve 1. The coordinates of the optimized starting control point (control point No. 1) are (0.0210, 1.7736), and the coordinates of the ending control point (control point No. 10) are (0.5564, 0.00003). The control point (0.0000, 1.7736) is inserted before the starting control point as the new starting control point, and the coordinates of the ending control point are modified to (0.5564, 0.0000) as the new ending control point. Finally, 21 control points are determined.

[0144] 4. Traverse the point cloud of building components, a total of 99,977 points, rotate each point to the XOZ plane, calculate the minimum distance from each point to the rotation generatrix, and measure the accuracy of the constructed three-dimensional model by the minimum distance. When calculating the minimum distance, the curve parameter of curve 1 starts from 0 and gradually increases by 0.0001 until it reaches 1. Finally, use the parameter 1.0000002 to extract the end point of the curve one by one, compare these curve points with the point cloud points, determine the curve point closest to the point cloud point, calculate the distance between them, and use it to represent the error between the two. If the X coordinate and Y coordinate of the point cloud point are both less than the curve point coordinate, the error is defined as a negative error. The final calculation results are: the maximum negative error is -0.0127 meters, the maximum positive error is 0.0074 meters, the average error is -0.0004 meters, the standard deviation is 0.0039 meters, and the error distribution is as follows: Figure 2 As shown, the error exceeds 0.005 meters at most points. The accuracy of curve 2 is assessed by traversing each point. The maximum negative error of curve 2 is -0.0034 meters, the maximum positive error is 0.0016 meters, the average error is 0.0000 meters, and the standard deviation is 0.0006 meters.

[0145] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for reconstructing the model of a rotating ancient building component based on the least squares method, characterized in that: The following steps are involved: Step 1: Use 3D laser scanning technology to obtain point clouds of ancient building components; Step 2: Slice the point cloud of the ancient building components and project it onto the horizontal plane. Use the least squares method to fit a circle, extract the coordinates of the circle center, and determine the position of the rotation axis. Step 3: translate the point cloud so that the bottom center is at the origin, project it onto a specific plane, and use the improved alpha shape algorithm to extract the rotation generatrix point cloud; Step 4: Use a non-uniform rational B-spline curve to fit the rotation generatrix point cloud, determine the initial curve direction and shape through principal component analysis, and optimize the initial curve to obtain the rotation generatrix fitting curve; Step 5: Reconstruct a three-dimensional model of the rotating body component by rotating the rotating generatrix 360 degrees around the rotation axis according to the extracted rotation axis and the fitted rotation generatrix curve, and translate the three-dimensional model to match the original point cloud of the ancient building component to obtain a model that matches the original point cloud; Step 6: traverse the point cloud of the ancient building components, calculate the minimum distance from the point to the three-dimensional model, and evaluate the model accuracy.

2. The least squares method-based method for reconstructing a model of a rotating ancient building component according to claim 1, characterized in that: The step 1 specifically includes: Investigate and analyze the components of the ancient buildings, clarify the scanning objectives, scope, and key areas, and deploy 3D laser scanners based on the structural characteristics of the ancient buildings. Develop a scanning plan, including the selection of scanning equipment, setting of scanning resolution, and planning of scanning paths. According to the established scanning plan, the ancient building components are scanned using a 3D laser scanner. The 3D laser scanner emits a laser beam and receives the reflected signal from the surface of the component. By calculating the round-trip time and angle information of the laser beam, the 3D coordinate data of the component surface is obtained. The components of the ancient building are scanned multiple times at various angles and details. The original point cloud data collected on site is imported into the 3D data processing software for pre-processing, the point cloud data is aligned and spliced, and the point cloud data from multiple scanning perspectives are integrated to obtain a complete point cloud of ancient building components.

3. The method for reconstructing the model of a rotating ancient building component based on the least squares method according to claim 2, characterized in that: The step 2 specifically includes: Slice the point cloud data of the ancient building components. Select the slicing direction and slicing interval according to the geometric characteristics of the rotating components. Perform horizontal slicing along the height direction of the components. Adjust the slicing interval according to the size of the components to split the point cloud data of the ancient building components into multiple two-dimensional slice point clouds. Project the sliced point cloud data onto the horizontal plane so that each point in the sliced point cloud is projected onto the horizontal plane to form a two-dimensional point cloud projection; After obtaining the projected two-dimensional point cloud data, the least squares method is used to fit a circle. Then, the optimal solution of the center coordinates and radius of the circle is obtained by calculating the sum of squares of the residuals between the point cloud data and the fitted circle and taking its derivative. For rotating parts, the rotation axis is determined by fitting the center coordinates of the circle. Circle fitting is performed on multiple slice point clouds to obtain the center coordinates of each slice. The position of the rotation axis of the rotating part is determined by analyzing the changing trend of the center coordinates of all slices.

4. The method for reconstructing a model of a rotating ancient building component based on the least squares method according to claim 3 is characterized in that: The extraction process of the rotating shaft of the rotating body component includes: Extract the minimum value z of the point cloud of the rotating body component min and the maximum value z max , get the minimum Z coordinate and maximum Z coordinate of the height of the rotation axis l; For the X and Y coordinates of the rotation axis, slice the upper and lower parts of the point cloud of the rotating body to obtain the sliced point cloud s t and s b ; Project the slice point clouds onto the XOY plane to obtain point clouds s pt and s pb , respectively for point cloud s pt and s pb Perform circle fitting to obtain the center coordinates O t and O b If the distance between the two points is less than the set threshold, the midpoint coordinates of the line connecting the two points (x l ,y l ) as the plane coordinate of the rotation axis l, and the starting point of the rotation axis (x l ,y l , z min ) and the end point (x l ,y l , z max ).

5. The method for reconstructing a model of a rotating ancient building component based on the least squares method according to claim 4 is characterized in that: When fitting the horizontal projection point cloud of the slice of the rotating body, the least squares principle is used to fit the point cloud into a circle, and the center coordinates of the circle are extracted. The radius of the fitting circle is R, and the center coordinates are (x0, y0). The equation of the fitting circle of the slice projection point cloud is: (x-x0) 2 +(y-y0) 2 =R 2 (1) The residual equation of the slice horizontal projection point cloud and the fitted circle is: e i =(x i -x0) 2 +(y i -y0) 2 -R 2 (2) Where, i∈E, E is the set of slice projection point clouds, (x i ,y i ) The coordinates of the midpoint of the horizontal projection point cloud of the rotating body slice, (x0, y0) are the coordinates of the center of the fitted circle; The function of the sum of squares of the rotation volume slice projection point cloud and the fitted circular residual is: Where Q represents the function value of the residual sum of squares between the projected point cloud of the rotational volume slice and the fitted circle, which is used to evaluate the degree of fit between the projected point cloud of the rotational volume slice and the fitted circle; According to the least squares principle, find the partial derivative of x0, y0, and R: The following formula is obtained: For the convenience of expression, the following expression is set: Where x m is x to the power of m, y n is y to the power of n, is the mth power of the x-coordinate of the i-th point, is the nth power of the y coordinate of the i-th point; Combining formula (6) to simplify formula (5) we can get: Arranging formula (6) yields: The parameters x0, y0, and R of the fitting circle can be derived from formula (7) and formula (1), as shown in formula (8): The horizontal projection point clouds of the upper and lower slices of the rotating body are traversed by formula (8) to obtain the coordinates of the center of the fitting circle of the upper slice (x t ,y t ) and the coordinates of the center of the lower slice fitting circle (x b ,y b ), if the distance between the two points does not exceed the threshold, take the middle point of the line connecting the two points as the plane coordinate of the rotation axis of the rotating body (x l ,y l ), as shown in formula (9), if the distance between two points is greater than the threshold, the slice position or thickness is adjusted until the center position that meets the conditions is found; 6. The method for reconstructing a model of a rotating ancient building component based on the least squares method according to claim 5, characterized in that: The step 3 specifically includes: By analyzing the point cloud data of the ancient building component, the geometric center point of the bottom of the component is found, the bottom center position of the component point cloud is determined, and the vector from the geometric center point to the coordinate origin is calculated. The entire point cloud data of the ancient building component is translated in the opposite direction of the vector so that the bottom center of the component coincides with the coordinate origin; Project the translated component point cloud onto the XOZ plane, and the projected point cloud forms a two-dimensional point cloud image; Based on the projected 2D point cloud, the improved alpha shape algorithm is applied and initialized, and the alpha value is set as the algorithm parameter to prepare for the boundary extraction operation. The alpha shape algorithm is applied to extract the boundaries of the projected two-dimensional point cloud image. By calculating the distance relationship between points in the point cloud and combining it with the set alpha value, the boundary contour of the point cloud is gradually constructed. An arbitrary point in the point cloud dataset is selected as the starting point, and the distance from this point to other points is calculated. The set of points that meet the conditions is screened out, and the boundary points are determined by the distance intersection method. The above operation is repeated to gradually extract the complete boundary point cloud. The boundary point cloud is further processed, and the final boundary point cloud obtained is the rotation generatrix point cloud.

7. The method for reconstructing a model of a rotating ancient building component based on the least squares method according to claim 6, characterized in that: The step 4 specifically includes: Preprocess the extracted rotation generatrix point cloud to remove existing noise points and outliers, and analyze the overall distribution characteristics of the point cloud, including the dense and sparse areas of the point cloud, to clarify the general shape and direction of the rotation generatrix; Apply principal component analysis to analyze the rotation generatrix point cloud and calculate the covariance matrix of the point cloud data. By solving the eigenvalues and eigenvectors of the covariance matrix, the degree of change of the point cloud data in each direction is found. The eigenvector corresponding to the largest eigenvalue is selected as the main direction of the rotation generatrix. The principal directions and distribution range of the point cloud data obtained by principal component analysis are analyzed, and the control points and node vectors of the non-uniform rational B-spline curve are initialized. The initial control points are evenly placed within the range of the point cloud data along the principal directions. The number of control points is adjusted according to the complexity of the point cloud and the required fitting accuracy. The node vectors of the non-uniform rational B-spline curve are set, and the first three values of the node vectors are set to 0, the last three values are set to 1, and the middle node values are evenly distributed between 0 and 1. This constructs a preliminary non-uniform rational B-spline curve model. The initialized non-uniform rational B-spline curve is optimized and fitted. The objective function is constructed by calculating the distance between the point cloud data and the non-uniform rational B-spline curve. The position of the control points is adjusted using the least squares method to minimize the value of the objective function. During the optimization process, the position of the control points is continuously iteratively updated until the preset convergence conditions are met. Finally, the rotation generatrix point cloud is fitted with the obtained NURBS curve to reflect the geometric shape and characteristics of the rotation generatrix.

8. The method for reconstructing a model of a rotating ancient building component based on the least squares method according to claim 7, characterized in that: The step 5 specifically includes: The direction and position of the extracted rotation axis are clarified. At the same time, the obtained rotation generatrix point cloud is parameterized and represented as a mathematical curve. According to the extracted rotation axis, the rotation generatrix curve is rotated 360 degrees around the rotation axis to generate a three-dimensional model of the rotating body component; The reconstructed 3D model of the rotating body is translated to match the spatial position of the original point cloud data. According to the position of the rotation axis and the geometric characteristics of the original point cloud, the vector that the 3D model of the rotating body needs to be translated is calculated, and the 3D model of the rotating body is translated along the vector. Through model translation and matching, the 3D model reconstruction of the rotating body component is completed.

9. The method for reconstructing a model of a rotating ancient building component based on the least squares method according to claim 8, characterized in that: The step 6 specifically includes: Load the reconstructed 3D model of the rotating body, traverse each point in the point cloud, rotate the point to the XOZ plane, calculate the minimum distance between the point and the rotation generatrix curve, and use the minimum distance as the distance from the point cloud point to the reconstructed 3D model for accuracy assessment; Perform statistical analysis on the distance between each point and the model, and calculate the maximum distance, minimum distance, average distance, and standard deviation indicators to fully reflect the overall deviation between the point cloud data and the 3D model. Then, identify points with larger distances and analyze their causes. The accuracy of the model is evaluated based on the statistically obtained distance data. If the maximum distance and average distance are small, and the standard deviation is also small, it means that the 3D model fits the point cloud data well and the model accuracy is high. If the distance is large or the standard deviation is large, it means that the 3D model fits the point cloud data poorly and further optimization and adjustment of the 3D model is required.

Citation Information

Cited By

  • Ancient clock inscription and texture point cloud projection analysis method based on three-dimensional geometric model

    CN121053336A

  • Method for projecting ancient bell inscription and texture point cloud based on three-dimensional geometric model

    CN121053336B

  • Method and device for extracting point cloud data of beam body structure

    CN121095264A

  • Beam body structure point cloud data extraction method and extraction device

    CN121095264B