A complex special-shaped building segmentation method based on a voxel model
By constructing and segmenting voxel models, and utilizing point cloud data and matrix calculation methods, the problem of time-consuming, labor-intensive, and inaccurate traditional methods for measuring the size of irregular buildings has been solved, achieving efficient and accurate measurement of the size of irregular buildings.
Patent Information
- Application Number
- CN202311006628.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-08-10
AI Technical Summary
Traditional methods are time-consuming, labor-intensive, and inaccurate when measuring the size of irregular buildings, making them unsuitable for widespread application. Existing technologies cannot effectively utilize three-dimensional data for efficient segmentation and calculation.
A point cloud model is generated by 3D laser scanning, a voxel model is constructed and segmented, and the building scale of the irregular building is calculated using the matrix calculation method of the voxel model.
It improves the efficiency and accuracy of calculating the size of irregularly shaped buildings, reduces the calculation cost, and is suitable for large-scale promotion.
Smart Images

Figure CN117036452B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of building scale calculation, and particularly relates to a complex special-shaped building segmentation method based on a voxel model. BACKGROUND
[0002] Buildings are carriers of cities, and the degree of grasping the building scale of the cities determines the fineness of city planning and city operation. Traditional special-shaped building scale calculation is usually carried out through basic surveying and mapping, which is time-consuming and labor-consuming and cannot be popularized on a large scale. The building scale of the special-shaped building is calculated in the way of "base area x floor", which is far from the actual scale. Therefore, the application proposes a method of generating a point cloud model according to three-dimensional laser scanning, constructing a voxel model of the building through the point cloud model, segmenting the voxel model, and calculating the building scale of the special-shaped building. SUMMARY
[0003] The application aims to provide a complex special-shaped building segmentation method based on a voxel model.
[0004] Step 1: obtaining point cloud data of the special-shaped building, carrying out surface scanning on the target special-shaped building through a conventional three-dimensional scanner, obtaining point cloud data, and modeling a point cloud model through professional software;
[0005] Step 2: defining the voxel unit edge length according to the complexity of the special-shaped building point cloud model, so that the established voxel model can better reflect the detail features of the actual special-shaped building, and the calculated building scale is more objective and accurate, and the unit edge length of the voxel model is determined according to the accuracy of the obtained point cloud model;
[0006] Step 3: constructing a model library, voxelizing and reconstructing the point cloud model through matrix calculation, voxelizing and constructing the point cloud model of the special-shaped building based on the voxel model edge length determined in step 2 and the ground object, and segmenting the special-shaped building through the matrix model of the voxel model so as to calculate the building scale of the special-shaped building, and the specific calculation formula is as follows:
[0007]
[0008]
[0009]
[0010] Wherein (i, j, k) represents the center point coordinates of the three-dimensional small square, (x, y, z) represents the data point coordinates of the point cloud data, INT is an integer function, and S represents the edge length of the voxel model.
[0011] Traverse all point cloud data, mark the three-dimensional small square whose center point has at least one point cloud data point, that is, mark the position of the corresponding position in the three-dimensional matrix as 1, and the rest as 0. Display all positions marked as 1 according to the center point coordinates (i, j, k) and the edge length S to obtain the voxel model of the special-shaped building.
[0012] Step 4, based on voxel model segmentation entity building, realize the building scale calculation of complex special-shaped building, voxel model segmentation is to add all different dimensions of data in three-dimensional matrix, then determine the model segmentation limit according to the data calculation result. Assuming that the L layer and the M layer of the three-dimensional matrix are two adjacent dimensional matrices in the vertical direction, and the L layer is: The M layer is also The sum of the two matrices is Traverse all dimensions of the three-dimensional matrix, and all three-dimensional matrices obtained by calculation are the voxel models represented by the vertical walls in the vertical direction. If nxs=m, n represents the number of matrix layers, S represents the voxel model edge length calculated in S22, and m represents the average floor height of the building in the study area. If the calculation results of all continuous matrices at the same position are 2, cut the matrix position of all continuous 2;
[0013] Based on the segmented model, the target building scale is calculated. Assuming that N groups of matrices are cut out in S32, the bottom layer of the cut-out matrix is taken, and assuming that the bottom layer has N1 values, the building scale calculation formula of the voxel model represented by the cut-out part is as follows:
[0014] AREA=N1xS 2
[0015] Where AREA represents the building scale represented by the voxel model of the cut-out part, and S represents the edge length of the voxel model calculated in S22.
[0016] Traverse all the voxel models cut out to calculate the AREA, and add all the calculated AREAs to obtain the target building scale.
[0017] Step 5, output the calculation result, and obtain the building scale of the target special-shaped building.
[0018] Preferably, the distance between the point cloud model data points is calculated. The point cloud model is a three-dimensional model composed of a plurality of data points in three-dimensional space. The distance between the point clouds is calculated by calculating the distance between the data points in three-dimensional space. Assuming that two adjacent data points A(x1, y1, z1) and B(x2, y2, z2) are calculated as follows:
[0019]
[0020] wherein d min represents the shortest distance between adjacent point cloud data points, x1, y1, z1 and x2, y2, z2 are the coordinates of data points A and B respectively;
[0021] The shortest distances between all adjacent data points in the point cloud model are calculated to obtain a data set of the shortest distances of the point cloud model.
[0022] Preferably, the accuracy of the point cloud model data points is calculated, the data set of the shortest distances of the point cloud model obtained by the calculation is subjected to an average operation to obtain the average distance between data points of the point cloud model data points, and the smaller the average distance between points is, the more dense the data points in the point cloud model are, and the higher the accuracy of the point cloud model is. The calculation formula is as follows:
[0023]
[0024] wherein, represents the average distance between points of the point cloud model data points, n represents the number of data in the data set of the shortest distances of the point cloud model, and d i represents the distance in the data set of the shortest distances of the point cloud model.
[0025] Preferably, the unit edge length of the voxel model is calculated, in order to ensure that the voxel model of the special-shaped building can better express the building, the average distance between points of the point cloud model calculated is used to determine the unit edge length of the voxel model, and the specific calculation formula is as follows:
[0026]
[0027] wherein S is the edge length of the voxel model, and in order to ensure that the voxel model generated can be as accurate as possible and can truly express the actual object, the edge length of the voxel model is slightly higher than the average distance between points of the point cloud.
[0028] Compared with the prior art, the beneficial effects of the present application are that the voxel model of the building is constructed through the point cloud model, the voxel model is segmented, the building scale of the special-shaped building is calculated, the calculation efficiency is improved, the calculation cost is reduced, and the present application is suitable for large-area popularization. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 It is a voxel model diagram of the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical scheme and advantages of the present application more clear and explicit, the present application is further described in detail below in combination with specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0031] Example 1
[0032] A complex special-shaped building segmentation method based on a voxel model, the specific steps of which are as follows:
[0033] Step 1, obtaining the point cloud data of the special-shaped building, scanning the surface of the target special-shaped building by a conventional three-dimensional scanner, obtaining the point cloud data and modeling the point cloud model by professional software;
[0034] Step 2, defining the voxel unit edge length according to the complexity of the special-shaped building point cloud model, so that the established voxel model can better reflect the detailed features of the actual special-shaped building, and the calculated building scale is more objective and accurate, and the unit edge length of the voxel model is determined by the accuracy of the obtained point cloud model;
[0035] The distance between the data points of the point cloud model is calculated, the point cloud model is composed of a plurality of data points in three-dimensional space, and the distance between the point clouds is calculated, that is, the distance between the data points in three-dimensional space is calculated, assuming that two adjacent data points A(x1, y1, z1) and B(x2, y2, z2) are calculated, and the calculation formula is as follows:
[0036]
[0037] Where d min represents the shortest distance between adjacent point cloud data points, x1, y1, z1; x2, y2, z2 are the coordinates of data points A and B;
[0038] The shortest distance between all adjacent data points in the point cloud model is calculated to obtain a data set of the shortest distance of the point cloud model.
[0039] The accuracy of the data points of the point cloud model is calculated, the data set of the shortest distance of the point cloud model is calculated, and the average data point distance of the point cloud model data points is obtained by averaging operation, and the average point distance is small, which indicates that the data points in the point cloud model are dense, and the accuracy of the point cloud model is higher, and the calculation formula is as follows:
[0040]
[0041] Where, represents the average distance of the point cloud model data points, n represents the data number of the shortest distance data set of the point cloud model, and d i represents the distance of the shortest distance data set of the point cloud model.
[0042] The unit edge length of the voxel model is calculated, in order to ensure that the voxel model of the special-shaped building can better express the building, based on the average distance of the data points of the calculated point cloud model, the unit edge length of the voxel model is determined, and the specific calculation formula is as follows:
[0043]
[0044] wherein S is the side length of the voxel model, in order to ensure that the generated voxel model can be consistent and real expression of the actual substrate, so the voxel model side length is slightly higher than the average distance of the point cloud
[0045] Step 3, constructing a model library, based on the mesh model through matrix calculation for its voxel reconstruction, based on the voxel model side length determined in step 2 and the point cloud model of the ground object is voxelized and constructed, and the voxel model is segmented to calculate the building scale of the special-shaped building through the matrix model of the voxel model, first define the position of the point cloud model data point, carve the voxel model
[0046] Since the point cloud data is a three-dimensional model composed of complex and unordered data points, but the voxel model is composed of three-dimensional small squares, so the center point of a single three-dimensional small square is taken as the target, and the point cloud data is shifted to the center point of the three-dimensional small square, as shown in Figure 1
[0047] The specific calculation formula is as follows:
[0048]
[0049]
[0050]
[0051] wherein (i, j, k) represents the center point coordinates of the three-dimensional small square, (x, y, z) represents the data point coordinates of the point cloud data, INT is the integer function, and S represents the side length of the voxel model;
[0052] Traverse all the point cloud data, mark the three-dimensional small square whose center point has at least one point cloud data point, that is, mark the corresponding position in the three-dimensional matrix as 1, and the rest as 0, display all the positions marked as 1 according to the center point coordinates (i, j, k) and the side length S, and the obtained is the voxel model of the special-shaped building;
[0053] Step 4, based on the voxel model to segment the entity building, realize the building scale calculation of the complex special-shaped building, the voxel model segmentation is to add all the different dimensions of the three-dimensional matrix, and then determine the model segmentation limit according to the data calculation result. Assuming that the L layer and the M layer of the three-dimensional matrix are two matrices adjacent in the vertical direction, and assuming that the L layer is: The M layer is also The sum of the two matrices is The three-dimensional matrix of all dimensions is traversed, and the three-dimensional matrix with the calculation result of 2 is the voxel model represented by the vertical wall in the vertical direction. If nxs=m, n represents the number of matrix layers, s represents the length of the voxel model calculated in S22, and m represents the average floor height of the building in the study area. If the calculation results of the same position of n continuous matrices are all 2, cutting is performed on all the positions of the continuous 2 matrices;
[0054] The target building size is calculated based on the segmentation model. Assuming that N groups of matrices are cut out in S32, the bottom layer of the cut-out matrices is taken, assuming that there are N1 values in the bottom layer, and the building size represented by the cut-out voxel model is calculated according to the following formula:
[0055] AREA=N1×S 2
[0056] wherein AREA represents the building size represented by the cut-out voxel model, and S represents the length of the voxel model calculated in S22.
[0057] The AREA of all the cut-out voxel models is calculated, and the building size of the target is obtained by adding all the calculated AREAs.
[0058] Step 5, output the calculation result, and obtain the building size of the target irregular building.
[0059] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can make equivalent replacements or changes to the technical solution and the inventive concept of the present application within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for segmenting complex irregular buildings based on voxel models, characterized in that: The specific steps of this voxel-based method for segmenting complex irregular buildings are as follows: Step 1: Obtain point cloud data of the irregular building. Use a conventional 3D scanner to scan the surface of the target irregular building to obtain point cloud data and then use professional software to create a point cloud model. Step 2: Define the unit side length of the voxel based on the complexity of the point cloud model of the irregular building. In order for the established voxel model to better reflect the detailed features of the actual irregular building and make the calculated building scale more objective and accurate, the unit side length of the voxel model is determined by the accuracy of the obtained point cloud model. Step 3: Construct a model library. Based on the point cloud model, perform voxel reconstruction using matrix calculations. Based on the unit side length of the voxel model determined in Step 2 and the point cloud model of the terrain features, perform voxel reconstruction. Then, using the matrix model of the voxel model, segment the irregularly shaped building to calculate its scale. The specific calculation formula is as follows: Where (i, j, k) represents the coordinates of the center point of the 3D small square, and (x, y, z) represents the coordinates of the data points in the point cloud data. INT S is the floor function representing the unit side length of the voxel model; Traverse all point cloud data, mark the three-dimensional small squares whose center point has at least one point cloud data point, that is, mark the corresponding position in the three-dimensional matrix as 1, and the rest as 0. Display all the positions marked as 1 in three dimensions according to the center point coordinates (i, j, k) and the side length S, and the result is the voxel model of the irregular building. Step 4: Segment the solid building based on the voxel model to calculate the building scale of complex irregular buildings. Voxel model segmentation involves summing the data from all different dimensions of a 3D matrix, and then determining the model segmentation boundaries based on the calculated results. Assuming that 3D matrix layers L and M are two matrices with adjacent dimensions in the vertical direction, and layer L is: The M layer is also The sum of the two matrices is Traverse all dimensions of the three-dimensional matrix. All three-dimensional matrices with a calculated value of 2 are the voxel models represented by the vertical walls in the vertical direction. If n×S=m, where n represents the number of matrix layers, S represents the unit side length of the voxel model calculated in step 2, and m represents the average floor height of the buildings in the study area, and if there are n consecutive matrices with the same calculated value of 2, then cut along all consecutive matrix positions of 2. The target building scale is calculated based on the segmentation model. Assuming that it is divided into N sets of matrices, the lowest level of the segmented matrix is taken. Assuming that the lowest level matrix has N1 values, the building scale represented by the voxel model of the segmented part is calculated using the following formula: ,in The scale of the building represented by the voxel model of the cut-off part is indicated by S, which represents the unit side length of the voxel model calculated in step 2. Iterate through and calculate all the cut-out voxel models. All the calculations Add them together to get the target building size; Step 5: Output the calculation results. Output the calculation results to obtain the building scale of the target irregular building. The calculation of the spacing between data points in a point cloud model: A point cloud model is a three-dimensional model composed of several data points in three-dimensional space. Calculating the spacing between point clouds is equivalent to calculating the spacing between data points in three-dimensional space. Assuming two adjacent data points A(x1, y1, z1) and B(x2, y2, z2), the calculation formula is as follows: , in, This represents the shortest distance between adjacent point cloud data points, where x1, y1, z1; and x2, y2, z2 are the coordinates of data points A and B, respectively. Calculate the shortest distance between all adjacent data points in the point cloud model to obtain the data set of the shortest distance in the point cloud model; The accuracy of point cloud model data points is calculated by averaging the datasets with the shortest spacing in the point cloud model. A smaller average spacing indicates a denser data point density and higher accuracy in the point cloud model. The calculation formula is as follows: , in, n represents the average spacing between data points in the point cloud model, and n² represents the number of data points in the shortest spacing dataset of the point cloud model. This represents the spacing of the shortest spacing data set in the point cloud model; The unit side length of the voxel model is calculated to ensure that the voxel model of the irregular building can better represent the building. Based on the average spacing of the data points in the calculated point cloud model, the unit side length of the voxel model is determined. The specific calculation formula is as follows: , Where S is the unit side length of the voxel model, and the side length of the voxel model is chosen to be slightly higher than the average spacing of the point cloud.
Citation Information
Patent Citations
Voxelization plane segmentation method based on clustering algorithm
CN114742838A
Building datum extraction from laser scanning data
US20150063683A1