Automatic modeling method of building 3D model based on 3D point cloud
Through an automated modeling method based on three-dimensional point clouds, point cloud normals and statistical filtering technology are used to segment and fit building circular pillar point clouds, solving the problems of low building modeling efficiency and accuracy in the existing technology. , achieving efficient and accurate 3D model construction.
Patent Information
- Application Number
- CN202411111430.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-14
AI Technical Summary
In the existing technology, the overall accuracy and efficiency of 3D building modeling are low, and it is difficult to effectively extract building parameters through slicing and manual tracking methods, resulting in low modeling efficiency.
Using an automated modeling method based on three-dimensional point clouds, by calculating point cloud normals, area growth, statistical filtering and least squares fitting, the point cloud of circular pillars of the building is segmented and extracted, a three-dimensional model is established, and the three-dimensional model is constructed. Verify model accuracy and consistency in the modeling software.
It improves the accuracy and efficiency of building 3D models, ensures the geometric accuracy and visual consistency of the model, and is suitable for real-life cities, smart cities and other fields.
Smart Images

Figure CN118628682B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of 3D modeling, and in particular to an automated modeling method for a 3D building model based on a three-dimensional point cloud. Background Art
[0002] As an important tool in the digital age, 3D modeling technology is gradually penetrating into all walks of life, especially in the fields of architecture, urban planning, industrial design, etc., showing great application potential. With the continuous advancement of technology, the accuracy and efficiency of 3D modeling are constantly improving, providing a technical basis for the automated modeling of buildings. Three-dimensional point cloud technology obtains three-dimensional coordinate information of a large number of points on the surface of an object through laser scanning or other sensors, which can accurately reflect the shape, size, texture and other characteristics of the object. Compared with traditional real-scene 3D modeling technology, three-dimensional point cloud technology is efficient and accurate, which can greatly improve the accuracy and efficiency of architectural drawing.
[0003] In the existing technology, most of the building-related parameters are extracted through slicing and manual tracking methods to achieve building modeling. However, the slicing and manual tracking methods are difficult to reflect the overall size of the building and are not efficient. Therefore, how to improve the overall modeling accuracy and efficiency of the building is the problem we need to solve. To this end, an automatic building modeling method based on three-dimensional point cloud is proposed. Summary of the invention
[0004] The present invention aims to provide a method for automatically building a 3D model of a building based on a three-dimensional point cloud, so as to solve the problems raised in the above-mentioned background technology.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] The method for automatically building a 3D model of a building based on a 3D point cloud comprises the following steps:
[0007] Step 1: collect the original point cloud data of the target building, calculate the normal of each point in the point cloud for regional growth, set the normal deviation threshold and curvature difference threshold to segment the original point cloud data, and segment the circular column point cloud of the building;
[0008] Step 2: A filter is established based on a statistical method. The average distance from a point to its neighboring points is calculated, the mean and standard deviation are determined, and a distance threshold from the point to its neighboring points is set to remove gross errors from the segmented point cloud of circular columns of buildings.
[0009] Step 3, traverse the point cloud after deleting gross errors, calculate the minimum and maximum elevation values of the point cloud, determine the elevation range of the target building components, and project the point cloud onto the horizontal plane. Use the least squares method to fit a circle on the projected point cloud to obtain the cross-sectional circle parameters, which are the center coordinates and radius of the cross-sectional circle.
[0010] Step 4: Determine the drawing parameters of the 3D model based on the obtained cross-section circle parameters and the elevation range of the point cloud, draw the 3D model of the circular column of the target building in the 3D modeling software, and compare it with the original point cloud data to verify the accuracy and consistency of the model.
[0011] A further improvement of the technical solution of the present invention is that in step 1, the segmentation and extraction process of the point cloud of the circular column of the building is:
[0012] Step 101, using a laser scanner or a 3D camera to collect 3D point cloud data of a target building, and using a KD tree algorithm to organize the point cloud data to quickly retrieve spatial neighboring points in the point cloud;
[0013] Step 102, for each point P i , determine the point set in its neighborhood, and calculate the covariance moment C of the point set, perform eigenvalue decomposition on the covariance matrix C, and the eigenvector corresponding to the minimum eigenvalue is the normal direction of the point;
[0014] Step 103, calculate the normal change deviation between adjacent points, estimate the curvature of the point in the area, sort the points from small to large according to the curvature value, set the point with the smallest curvature value as the seed point, and calculate the normal difference between the seed point and the adjacent points;
[0015] Step 104, setting a difference threshold. If the normal difference between the seed point and the neighboring point is less than the set difference threshold, and the curvature value is also less than the set difference threshold, the seed point is added to the seed point set and classified into one category.
[0016] Step 105, removing the seed points classified into one category from the original point cloud, and growing the next area until the number of points remaining in the original point cloud is less than the minimum number of cluster points;
[0017] Step 106, dividing the point cloud into different regions according to the curvature value and the normal direction, and separating the point cloud of the circular column of the building.
[0018] A further improvement of the technical solution of the present invention is that the expression of the covariance matrix is:
[0019]
[0020] Among them, C is the covariance matrix, which is used to describe the distribution of points in the point cloud, k is the number of neighbors considered, and p i For point P i The coordinate vector in space, is the mean vector of the points in the neighborhood;
[0021] The expression of the eigenvalue decomposition is:
[0022]
[0023] Among them, λ j is the j-th eigenvalue of the covariance matrix, is the jth eigenvector, which represents the main distribution trend of the point cloud in the direction of the eigenvector. The eigenvalue is a non-negative real number, which represents the distribution variance of the point cloud in the direction of the eigenvector.
[0024] A further improvement of the technical solution of the present invention is that in step 2, the process of deleting gross errors from the point cloud of the circular column of the building is as follows:
[0025] Step 201: Input the point cloud of the circular column of the building. For each point P in the point cloud i , determine the set of spatial points in its neighborhood, and calculate the point P i To point P in its neighborhood j Calculate the Euclidean distance of point P i The average distance to the points in its neighborhood is denoted by μ i , the point P i To point P in its neighborhood j The expression of the Euclidean distance is:
[0026] d ij =||p i -p j ||;
[0027] Among them, d ij For point p i With point p j The Euclidean distance between i is the midpoint P in three-dimensional space i The coordinate vector, p j is the midpoint P in three-dimensional space j The coordinate vector of ij The value range of is [0, +∞), indicating the distance;
[0028] The point P i The expression for the average distance to points in its neighborhood is:
[0029]
[0030] Among them, μ i For point P i The average distance to points in its neighborhood, N i For point P i The number of points in the neighborhood of ;
[0031] Step 202, calculate point P i The standard deviation of the distance to points in its neighborhood σ i, analysis point P i The discrete degree of the distribution of the neighborhood points, the point P i The standard deviation of the distance to points in its neighborhood σ i The expression is:
[0032]
[0033] Among them, σ i For point P i The standard deviation of the distance to the points in its neighborhood, indicating that point P i The degree of dispersion of point distribution within the neighborhood;
[0034] Step 203, calculate μ of all points i The global mean μ and standard deviation σ of the data are set, and a standard deviation multiple t is set as the judgment threshold of the gross error point. The value of t is usually between 1 and 3, depending on the sensitivity to gross errors.
[0035] Step 204, traverse point P in the point cloud i , determine whether it is a rough error point, if point P i The average distance to its neighboring points μ i If the difference from the global mean μ exceeds t times the global standard deviation σ, then P i For rough almost;
[0036] Step 205: Delete all points identified as gross error points from the point cloud data.
[0037] A further improvement of the technical solution of the present invention is that: μ of all points i The expression of the global mean μ is:
[0038]
[0039] Where μ is all points μ i The global average value represents the average distance of the entire point cloud neighborhood points, n is the total number of points in the point cloud, μ i For point P i The average distance to points in its neighborhood;
[0040] μ of all points i The expression of the global standard deviation σ is:
[0041]
[0042] Among them, σ is the global standard deviation, which means that all points μ i The degree of dispersion relative to the global average μ, the rough error point judgment condition, if the condition |μ i -μ|>t·σ holds, then point P i Considered a rough cutoff.
[0043] A further improvement of the technical solution of the present invention is that in step 3, the process of obtaining the cross-section circle parameters is as follows:
[0044] Step 301, traverse the point cloud after deleting gross errors, for each point P i , read its three-dimensional coordinates (x i ,y i , z i );
[0045] Step 302, calculate the minimum and maximum values of the z coordinates (elevation values) of all points, and calculate the minimum value H of the z coordinates (elevation values) according to the minimum value H min and the maximum value H max , determine the elevation range H, where H = H max -H min , H min =min(z1, z2, ..., z n ), H max = max (z1,z2,…,z n ), n is the total number of points in the point cloud;
[0046] Step 303: each point P in the point cloud i Project it onto the horizontal plane at z=0, and fit the projected point cloud with a circle whose center coordinates are (x0, y0) and radius is R;
[0047] Step 304, derive the radius R and the center coordinates (x0, y0) of the circle according to the least squares principle.
[0048] A further improvement of the technical solution of the present invention is that the least squares principle is used to deduce the radius R and the coordinates of the center of the circle (x0, y0), which are expressed as follows:
[0049] (x-x0) 2 +(y-y0) 2 =R 2 ;
[0050]
[0051] Among them, (x0, y0) is the coordinate of the center of the circle, and R is the radius of the circle.
[0052] A further improvement of the technical solution of the present invention is that in step 4, the process of drawing the three-dimensional model of the circular column of the target building is:
[0053] Step 401, using the cross-section circle parameters obtained from the point cloud data, including the center coordinates (x0, y0) and the radius R, and extracting the obtained elevation range (H min , Hmax );
[0054] Step 402: In the 3D modeling software, (x0, y0, z min ) as the base center, R as the base radius, and draw a circle with the same radius R at (x0, y0, z max ) as the center, draw another circle as the top surface of the cylinder;
[0055] Step 403, using the "stretch" or "rotate" function of the 3D modeling software, a cylinder is created by stretching the bottom circle along the z-axis to a height of H;
[0056] Step 404 , compare the drawn three-dimensional cylindrical model with the original point cloud data to verify the accuracy and consistency of the model.
[0057] A further improvement of the technical solution of the present invention is that the process of verifying the accuracy and consistency of the model is:
[0058] Step 4041, aligning the cylindrical model in the 3D modeling software and the original point cloud data correctly in the same coordinate system;
[0059] Step 4042, for each point P in the point cloud i , calculate the shortest distance d to the surface of the cylindrical model i ;
[0060] Step 4043, for all points P i The distance d i Perform statistical analysis and calculate the maximum error, minimum error, mean error, and standard deviation;
[0061] Step 4044, set the error threshold, check whether the statistical error is within the set threshold, if the error of all points |d i | are all less than or equal to the threshold T, then the model accuracy meets the requirements;
[0062] Step 4045, if the model accuracy is insufficient, return to the modeling process for adjustment, re-fit the cross-section circle, adjust the elevation range or modify the modeling parameters, repeat the process of verifying the model until the model accuracy meets the requirements, and output the verified three-dimensional model to the required format for further use.
[0063] A further improvement of the technical solution of the present invention is that: the shortest distance d i The calculation formula is:
[0064]
[0065] Among them, d i For point P iThe shortest distance to the surface of the cylindrical model, z is the z coordinate of any point on the surface of the cylinder, R is the radius, and (x0, y0) is the coordinate of the center of the bottom of the cylinder;
[0066] The maximum error expression is: max =max|d i |;
[0067] The expression of the minimum error is: min =min|d i |;
[0068] The expression of the average error is:
[0069] The expression of the standard deviation is:
[0070] Due to the adoption of the above technical solution, the present invention has the following technical advances compared with the prior art:
[0071] 1. The present invention provides an automated modeling method for 3D models of buildings based on three-dimensional point clouds. Compared with the traditional method of slicing point clouds and manually drawing cross-section circles, the method comprehensively considers the point cloud data of the entire cylinder and performs fitting through the least squares method, so that the drawn three-dimensional model is closer to the entire point cloud data. While improving the modeling accuracy, the method calculates relevant parameters and establishes a three-dimensional model, thereby improving the modeling efficiency. At the same time, the three-dimensional model established by this method can be applied to real cities, smart cities, metaverses, etc., and has certain promotion value.
[0072] 2. The present invention provides an automated modeling method for 3D building models based on three-dimensional point clouds. By using point cloud processing technology, utilizing region growing method, statistical filtering and least squares method, the accuracy and consistency of the building model are significantly improved, the features of the building are accurately extracted from the original point cloud data, the distance from the point cloud to the model surface is accurately calculated, and statistical analysis is performed. This not only improves the geometric accuracy of the model, but also ensures the visual consistency of the model with the actual building, providing a reliable foundation for subsequent applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0074] Figure 1 is a flow chart of the method of the present invention;
[0075] Figure 2This is a flow chart for segmenting and extracting the point cloud of circular columns of a building according to the present invention. DETAILED DESCRIPTION
[0076] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0077] Embodiment 1, as Figure 1 , Figure 2 As shown, the present invention provides a method for automatically building a 3D model of a building based on a three-dimensional point cloud, comprising the following steps:
[0078] Step 1: Collect the original point cloud data of the target building, calculate the normal of each point in the point cloud for regional growth, set the normal deviation threshold and curvature difference threshold, segment the original point cloud data, and segment the circular column point cloud of the building. Use a laser scanner or a 3D camera to collect the 3D point cloud data of the target building, and use the KD tree algorithm to organize the point cloud data to quickly retrieve the spatial neighboring points in the point cloud. For each point P i , determine the point set in its neighborhood, and calculate the covariance moment C of the point set, perform eigenvalue decomposition on the covariance matrix C, the eigenvector corresponding to the minimum eigenvalue is the normal direction of the point, calculate the normal change deviation between adjacent points, estimate the curvature of the point in the area, sort the points from small to large according to the curvature value, set the point with the smallest curvature value as the seed point, and calculate the normal difference between the seed point and the neighboring point, set the difference threshold, if the normal difference between the seed point and the neighboring point is less than the set difference threshold, and the curvature value is also less than the set difference threshold, then add the seed point to the seed point set and classify it into one category, remove the seed points classified into one category from the original point cloud, and grow the next area until the number of points remaining in the original point cloud is less than the minimum number of clustering points, divide the point cloud into different areas according to the curvature value and the normal direction, and segment the point cloud of the circular column of the building;
[0079] Furthermore, the expression of the covariance matrix is:
[0080]
[0081] Among them, C is the covariance matrix, which is used to describe the distribution of points in the point cloud, k is the number of neighbors considered, and p i For point P i The coordinate vector in space, is the mean vector of the points in the neighborhood. The covariance matrix is a d×d symmetric positive definite matrix, where d is the dimension of the point. In two-dimensional or three-dimensional space, d is 2 or 3 respectively. The diagonal elements of the covariance matrix represent the variance of the point cloud in each dimension, and the off-diagonal elements represent the covariance between different dimensions.
[0082] The expression of eigenvalue decomposition is:
[0083]
[0084] Among them, λ j is the j-th eigenvalue of the covariance matrix, is the jth eigenvector, indicating the main distribution trend of the point cloud in the direction of the eigenvector. The eigenvalue is a non-negative real number, indicating the distribution variance of the point cloud in the direction of the eigenvector. The eigenvalues are usually sorted from large to small, that is, λ1≥λ2≥…≥λ d ≥0, the point cloud changes more in the direction of the eigenvector corresponding to the larger eigenvalue, which can be considered as the main change direction of the point cloud;
[0085] Step 2: Use a statistical method to establish a filter, calculate the average distance from a point to its neighboring points, determine the mean and standard deviation, set the distance threshold from the point to its neighboring points, and remove gross errors from the segmented point cloud of the circular columns of the building. Input the point cloud of the circular columns of the building, and for each point P in the point cloud i , determine the set of spatial points in its neighborhood, and calculate the point P i To point P in its neighborhood j Calculate the Euclidean distance of point P i The average distance to the points in its neighborhood is denoted by μ i , click P i To point P in its neighborhood j The expression of the Euclidean distance is:
[0086] d ij =||p i -p j ||;
[0087] Among them, d ij For point p i With point p j The Euclidean distance between i is the midpoint P in three-dimensional space i The coordinate vector, p j is the midpoint P in three-dimensional space j The coordinate vector of ij The value range of is [0, +∞), indicating the distance;
[0088] Point P i The expression for the average distance to points in its neighborhood is:
[0089]
[0090] Among them, μ i For point P i The average distance to points in its neighborhood, N i For point P i The number of points in the neighborhood of ;
[0091] Calculate point P i The standard deviation of the distance to points in its neighborhood σ i , analysis point P i The degree of discreteness of the distribution of neighboring points, point P i The standard deviation of the distance to points in its neighborhood σ i The expression is:
[0092]
[0093] Among them, σ i For point P i The standard deviation of the distance to the points in its neighborhood, indicating that point P i The degree of dispersion of point distribution within the neighborhood;
[0094] Calculate μ for all points i The global mean μ and standard deviation σ of the point cloud are set, and a standard deviation multiple t is set as the judgment threshold of the gross error point. The value of t is usually between 1 and 3, depending on the sensitivity to gross errors. i , determine whether it is a rough error point, if point P i The average distance to its neighboring points μ i If the difference from the global mean μ exceeds t times the global standard deviation σ, then P i For gross error points, all points identified as gross error points are deleted from the point cloud data;
[0095] Furthermore, μ of all points i The expression of the global mean μ is:
[0096]
[0097] Where μ is all points μ i The global average value represents the average distance of the entire point cloud neighborhood points, n is the total number of points in the point cloud, μ i For point P i The average distance to points in its neighborhood;
[0098] μ of all points i The expression of the global standard deviation σ is:
[0099]
[0100] Among them, σ is the global standard deviation, which means that all points μ i The degree of dispersion relative to the global average μ, the rough error point judgment condition, if the condition |μ i -μ|>t·σ holds, then point P i It is considered a rough handicap;
[0101] Step 3: traverse the point cloud after deleting the gross errors, calculate the minimum and maximum elevation values of the point cloud, determine the elevation range of the target building components, and project the point cloud onto the horizontal plane. Use the least squares method to fit the projected point cloud to obtain the cross-sectional circle parameters, which are the center coordinates and radius of the cross-sectional circle. Traverse the point cloud after deleting the gross errors, and for each point P after denoising, i , read its three-dimensional coordinates (x i ,y i , z i ), calculate the minimum and maximum values of the z coordinates (elevation values) of all points, and according to the minimum value H of the z coordinate (elevation value) min and the maximum value H max , determine the elevation range H, where H = H max -H min , H min =min(z1, z2, ..., z n ), H max = max (z1,z2,…,z n ), n is the total number of points in the point cloud, and each point P in the point cloud i Project it onto the horizontal plane at z=0, and fit the projected point cloud with a circle whose center coordinates are (x0, y0) and radius R. The radius R and center coordinates (x0, y0) of the circle are derived based on the least squares principle.
[0102] Furthermore, the least squares principle derives the radius R and the center coordinates (x0, y0) of the circle, which are expressed as follows:
[0103] (x-x0) 2 +(y-y0) 2 =R 2 ;
[0104]
[0105] Among them, (x0, y0) is the coordinate of the center of the circle, and R is the radius of the circle;
[0106] Step 4: Determine the drawing parameters of the 3D model based on the obtained cross-section circle parameters and the elevation range of the point cloud, and draw the 3D model of the circular column of the target building in the 3D modeling software, and compare it with the original point cloud data to verify the accuracy and consistency of the model. Use the cross-section circle parameters obtained from the point cloud data, including the center coordinates (x0, y0) and radius R, and extract the obtained elevation range (h min , H max ), in 3D modeling software, (x0, y0, z min ) as the base center, R as the base radius, and draw a circle with the same radius R at (x0, y0, z max ) as the center of the circle, draw another circle as the top surface of the cylinder, use the "stretch" or "rotate" function of the 3D modeling software, stretch the bottom circle along the z axis to a height of H to create a cylinder, compare the drawn 3D cylinder model with the original point cloud data, verify the accuracy and consistency of the model, and make the cylinder model in the 3D modeling software and the original point cloud data correctly aligned in the same coordinate system. For each point P in the point cloud i , calculate the shortest distance d to the surface of the cylindrical model i , for all points P i The distance d i Perform statistical analysis, calculate the maximum error, minimum error, average error and standard deviation, set the error threshold, and check whether the statistical error is within the set threshold. If the error of all points is within the set threshold, i | are all less than or equal to the threshold T, the model accuracy meets the requirements. If the model accuracy is insufficient, return to the modeling process for adjustment, re-fit the cross-section circle, adjust the elevation range or modify the modeling parameters, and repeat the process of verifying the model until the model accuracy meets the requirements, and output the verified 3D model to the required format for further use;
[0107] Furthermore, the shortest distance d i The calculation formula is:
[0108]
[0109] Among them, d i For point P i The shortest distance to the surface of the cylindrical model, z is the z coordinate of any point on the surface of the cylinder, R is the radius, and (x0, y0) is the coordinate of the center of the bottom of the cylinder;
[0110] The expression of the maximum error is: W max = max |d i |;
[0111] The expression of minimum error is: W min =min|di |;
[0112] The expression of the average error is:
[0113] The expression for standard deviation is:
[0114] Example 2, based on Example 1, the present invention provides an experimental scheme, the experimental software environment is: Windows 1164-bit operating system, VS2019 C++, PCL 1.12.1 (Point cloud library), the experimental data is collected by Tianbao 3D laser scanner, and the point cloud of Shandong Theater collected in a certain engineering project is used for the experiment. Shandong Theater is an antique building with four circular columns at the door. The overall point cloud data volume of the building is large. In order to reduce the calculation time and avoid interference from other data, the open source point cloud processing software CloudCompare is used to intercept the point cloud data of the cylinder and surrounding building components;
[0115] The point cloud of the cylinder and the surrounding building structure is complex, and the curvature of the point clouds of each component varies greatly. In view of this, the region growing method is used to segment the point cloud region, calculate the normal and curvature of each point, and classify the points according to the normal deviation and curvature difference between the points to segment the cylinder point cloud;
[0116] The calculation parameters are as follows: when calculating the point normal, the point cloud search radius is 32 and the number of search points is 30; when performing region growth segmentation of the point cloud, the normal deviation allowable value is 1.5 and the curvature difference allowable value is 1. When the normal deviation and curvature difference meet the above conditions at the same time, the points are classified into one category and the classified point clouds are stored separately;
[0117] Due to measurement errors and other reasons, there are gross error points in the scanned data. By observing the point cloud, most of the gross error points are scattered outside the main point cloud. The statistical filtering method has a good effect on removing outlier gross error points. In view of this, the point cloud is filtered using statistical filtering to remove outlier gross error points. The calculation parameters are as follows: the number of nearest neighbor points is 5, and the standard deviation multiplier is 1.5;
[0118] Traverse the points in the cylindrical point cloud and sort the elevation coordinates to obtain the minimum elevation of the cylindrical point cloud as 1.2788 meters and the maximum elevation as 8.0403 meters;
[0119] The cylindrical point cloud after deleting the gross errors is projected onto the horizontal plane, and the least square method is used to fit the projected cylindrical section point cloud to obtain the section circle. The parameters of the section circle are as follows: the center coordinates are (0.5039, 17.3408), and the radius is 0.3231 meters;
[0120] Through the above process, the center coordinates, radius, and elevation range of the cross-section circle are obtained, and the drawing parameters of the cylindrical 3D model are obtained: the center coordinates of the cylinder bottom circle are (0.5039, 17.3408, 1.2788), and the cylinder height is 6.7615. The cylindrical 3D model is drawn using the parameters, and the drawn 3D model is compared with the cylindrical point cloud.
[0121] Traverse the points in the cylindrical point cloud and calculate the distance between each point and the cylindrical surface. Some calculated values are shown in Table 1. The accuracy of the three-dimensional model is obtained by analyzing each distance: the maximum error is 0.008m, the minimum error is 0.000m, the average error is 0.002m, and the standard deviation is 0.002m;
[0122] Table 1 3D model distance and distance of some points
[0123]
[0124]
[0125] The point cloud of each component of the building is segmented by using Autodesk Recap software, and then imported into Autodesk Rev it software to slice the point cloud to draw the component section contour line, change path and other information to establish a parametric component family library, and then establish a method for building construction model. The cylindrical point cloud is sliced, and the upper part of the cylindrical point cloud is relatively complete and the lower part of the cylindrical point cloud is seriously missing. The slice thickness is 0.1 meter. Three points are drawn in AUTOCAD to obtain the cylindrical section circle. The center coordinates of the circle drawn by the upper point cloud slice are (0.5033, 17.3404), and the radius is 0.3237m; the center coordinates of the circle drawn by the lower point cloud slice are (0.4999, 17.3422), and the radius is 0.3216m.
[0126] The three-dimensional cylindrical model is drawn using the circle parameters drawn by the upper point cloud slice and the lower point cloud slice respectively. The points in the denoised cylindrical point cloud are traversed, and the distance between each point and the cylindrical surface is calculated. The three-dimensional model drawn by the lower slice with incomplete point cloud has a relatively large error, with a maximum error of 0.014 meters and a standard deviation of 0.005 meters. The three-dimensional model drawn by the upper slice with relatively complete point cloud has a relatively small error, with a maximum error of 0.010 meters and a standard deviation of 0.003 meters. Through comparison, it is found that the maximum error and standard deviation of the three-dimensional model drawn by the method in this paper are smaller than the results obtained by using Autodesk Recap software to segment the point clouds of various building components, importing Autodesk Revit software to slice the point cloud to draw the cross-section contour lines of the components, changing paths and other information to establish a parametric component family library, and then establishing a building construction model. This method can draw high-precision three-dimensional models.
[0127] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for automatically modeling a 3D building model based on a 3D point cloud, characterized in that: The following steps are involved: Step 1: Collect the original point cloud data of the target building, segment the original point cloud data by region growing method, calculate the normal of each point in the point cloud for region growing, set the normal deviation threshold and region difference threshold to segment each part of the point cloud, and segment the circular column point cloud of the building; Step 2: A filter is established based on a statistical method to calculate the average distance from the point cloud point to the neighboring point, determine the distance mean and standard deviation, set the distance threshold from the point to the neighboring point, and remove gross errors from the segmented point cloud of the circular column of the building; Step 3, traverse the point cloud, calculate the minimum and maximum elevation values of the point cloud, determine the elevation range of the target building components, project the point cloud onto the horizontal plane, use the least squares method to fit the projected point cloud into a circle, and obtain the cross-sectional circle parameters, which are the center coordinates and radius of the cross-sectional circle. In step 3, the process of obtaining the cross-sectional circle parameters is as follows: Step 301, traverse the point cloud after removing gross errors, for each point P i , read its three-dimensional coordinates (x i ,y i , z i ); Step 302, calculate the minimum and maximum values of the z coordinates of all points, and calculate the minimum value H of the z coordinate elevation value according to the minimum value H of the z coordinate elevation value. min and the maximum value H max , determine the elevation range H, where H = H max -H min , H min =min(z1, z2, ..., z n ), H max =max(z1, z2, ..., z n ), n is the total number of points in the point cloud; Step 303: each point P in the point cloud i Project it onto the horizontal plane at z=0, and fit the projected point cloud with a circle whose center coordinates are (x0, y0) and radius is R; Step 304, deriving the radius R and the center coordinates (x0, y0) of the circle according to the least squares principle; The least squares principle derives the radius R and the center coordinates (x0, y0) of the circle, which are expressed as follows: (x-x0) 2 +(y-y0) 2 =R 2 ; Among them, (x0, y0) is the coordinate of the center of the circle, and R is the radius of the circle; Step 4: Determine the drawing parameters of the 3D model based on the obtained cross-section circle parameters and the elevation range of the point cloud, draw the 3D model of the circular column of the target building in the 3D modeling software, and compare it with the original point cloud data to verify the accuracy and consistency of the model.
2. The method for automatically building a 3D model of a building based on a three-dimensional point cloud according to claim 1, characterized in that: In step 1, the segmentation and extraction process of the circular column point cloud of the building is as follows: Step 101, collecting three-dimensional point cloud data of the target building, and using the KD tree algorithm to organize the point cloud data, and quickly retrieve spatial neighboring points in the point cloud; Step 102, for each point P i , determine the point set in its neighborhood, and calculate the covariance moment C of the point set, perform eigenvalue decomposition on the covariance matrix C, and the eigenvector corresponding to the minimum eigenvalue is the normal direction of the point; Step 103, calculate the normal change deviation between adjacent points, estimate the curvature of the point in the area, sort the points from small to large according to the curvature value, set the point with the smallest curvature value as the seed point, and calculate the normal difference between the seed point and the adjacent points; Step 104, setting a difference threshold. If the normal difference between the seed point and the neighboring point is less than the set difference threshold, and the curvature value is also less than the set difference threshold, the seed point is added to the seed point set and classified into one category. Step 105, removing the seed points classified into one category from the original point cloud, and growing the next area until the number of points remaining in the original point cloud is less than the minimum number of cluster points; Step 106, dividing the point cloud into different regions according to the curvature value and the normal direction, and segmenting the point cloud of the circular column of the building.
3. The method for automatically building a 3D model of a building based on a three-dimensional point cloud according to claim 2, characterized in that: The expression of the covariance matrix is: Among them, C is the covariance matrix, which is used to describe the distribution of points in the point cloud, k is the number of neighbors considered, and p i For point P i The coordinate vector in space, is the mean vector of the points in the neighborhood; The expression of the eigenvalue decomposition is: Among them, λ j is the j-th eigenvalue of the covariance matrix, is the jth eigenvector, which represents the main distribution trend of the point cloud in the direction of the eigenvector. The eigenvalue is a non-negative real number, which represents the distribution variance of the point cloud in the direction of the eigenvector.
4. The method for automatically building a 3D model of a building based on a three-dimensional point cloud according to claim 3, characterized in that: In step 2, the process of deleting gross errors from the point cloud of circular columns of the building is as follows: Step 201: Input the point cloud of the circular column of the building. For each point P in the point cloud i , determine the set of spatial points in its neighborhood, and calculate point P i To point P in its neighborhood j Calculate the Euclidean distance of point P i The average distance to the points in its neighborhood is denoted by μ i , the point P i To point P in its neighborhood j The expression of the Euclidean distance is: d ij =||p i -p j ||; Among them, d ij For point p i With point p j The Euclidean distance between i is the midpoint P in three-dimensional space i The coordinate vector, p j is the midpoint P in three-dimensional space j The coordinate vector of The point P i The expression for the average distance to points in its neighborhood is: Among them, μ i For point P i The average distance to points in its neighborhood, N i For point P i The number of points in the neighborhood of ; Step 202, calculate point P i The standard deviation of the distance to points in its neighborhood σ i , analysis point P i The discrete degree of the distribution of the neighborhood points, the point P i The standard deviation of the distance to points in its neighborhood σ i The expression is: Among them, σ i For point P i The standard deviation of the distance to the points in its neighborhood, indicating that point P i The degree of dispersion of point distribution within the neighborhood; Step 203, calculate μ of all points i The global mean μ and standard deviation σ of , and a standard deviation multiple t is set as the judgment threshold of the noise point; Step 204, traverse point P in the point cloud i , determine whether it is a rough error point, if point P i The average distance to its neighboring points μ i If the difference from the global mean μ exceeds t times the global standard deviation σ, then P i For rough almost; Step 205: Delete all points identified as gross error points from the point cloud data.
5. The method for automatically building a 3D model of a building based on a three-dimensional point cloud according to claim 4, characterized in that: μ of all points i The expression of the global mean μ is: Where μ is all points μ i The global average value represents the average distance of the entire point cloud neighborhood points, n is the total number of points in the point cloud, μ i For point P i The average distance to points in its neighborhood; μ of all points i The expression of the global standard deviation σ is: Among them, σ is the global standard deviation, which means that all points μ i The degree of dispersion relative to the global mean μ.
6. The method for automatically building a 3D model of a building based on a three-dimensional point cloud according to claim 1, characterized in that: In step 4, the process of drawing the three-dimensional model of the circular column of the target building is as follows: Step 401, using the cross-section circle parameters obtained from the point cloud data, including the center coordinates (x0, y0) and the radius R, and extracting the obtained elevation range (H min , H max ); Step 402: In the 3D modeling software, (x0, y0, z min ) as the base center, R as the base radius, and draw a circle with the same radius R at (x0, y0, z max ) as the center, draw another circle as the top surface of the cylinder; Step 403, using the "stretch" or "rotate" function of the 3D modeling software, a cylinder is created by stretching the bottom circle along the z-axis to a height of H; Step 404 , compare the drawn three-dimensional cylindrical model with the original point cloud data to verify the accuracy and consistency of the model.
7. The method for automatically building a 3D model of a building based on a three-dimensional point cloud according to claim 6, characterized in that: The process of verifying the accuracy and consistency of the model is: Step 4041, aligning the cylindrical model in the 3D modeling software and the original point cloud data correctly in the same coordinate system; Step 4042, for each point P in the point cloud i , calculate the shortest distance d to the surface of the cylindrical model i ; Step 4043, for all points P i The distance d i Perform statistical analysis and calculate the maximum error, minimum error, mean error, and standard deviation; Step 4044, set the error threshold, check whether the statistical error is within the set threshold, if the error of all points |d i | are all less than or equal to the threshold T, then the model accuracy meets the requirements; Step 4045, if the model accuracy is insufficient, return to the modeling process for adjustment, re-fit the cross-section circle, adjust the elevation range or modify the modeling parameters, repeat the process of verifying the model until the model accuracy meets the requirements, and output the verified three-dimensional model to the required format for further use.
8. The method for automatically building a 3D model of a building based on a three-dimensional point cloud according to claim 7, characterized in that: The shortest distance d i The calculation formula is: Among them, d i For point P i The shortest distance to the surface of the cylindrical model, z is the z coordinate of any point on the surface of the cylinder, R is the radius, and (x0, y0) is the coordinate of the center of the bottom of the cylinder; The maximum error expression is: max =max|d i |; The expression of the minimum error is: min =min|d i |; The expression of the average error is: The expression of the standard deviation is:
Citation Information
Patent Citations
Flexible cable identification and three-dimensional reconstruction method based on point cloud
CN112907735A
Cylinder feature-based tree trunk point cloud efficient extraction method
CN114241217A
