A method and system for calculating the floor area of a house
By employing a method to segment and fit planes to wall points in point cloud data, the method addresses inaccuracies in calculating house floor areas, achieving high precision and meeting project requirements.
Patent Information
- Application Number
- CN202210879392.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-25
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-07-25
AI Technical Summary
In the three-dimensional reconstruction process, the floor area of the house is difficult to accurately calculate due to the lack of house wall structure and deformation and distortion.
By eliminating the roof point clouds, dividing the wall point clouds, performing plane fitting and clustering, obtaining the best fit plane, and calculating the enclosed area of the intersection points of the four plane intersection lines, achieving accurate calculation of the bottom area of the house.
The abnormal points are effectively removed, and the structural deficiencies and distorted walls are accurately extracted, which improves the calculation accuracy of the floor area of the house, and the error is controlled within 6%, meeting the needs of land acquisition immigration projects.
Smart Images

Figure CN115457107B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of building measurement, and specifically relates to a method and system for calculating the floor area of a house. Background Art
[0002] In projects such as land acquisition and resettlement, smart cities, smart construction sites, land planning, and engineering quantity measurement, the calculation of house attributes is the most crucial part in the monomerization of buildings, which is related to the attribute query and assignment of monomerized objects. In the house household survey in the resettlement project, what the business personnel are most concerned about is the measurement of the floor area of the house.
[0003] In the existing technology for measuring the floor area of a house, three-dimensional point clouds have xyz spatial coordinate information and RGB color information. It is a feasible method to accurately calculate the floor area of a house from the three-dimensional spatial structure. With the continuous development and progress of the unmanned aerial vehicle (UAV) oblique photography surveying and mapping technology, a new technical path is provided for real-scene three-dimensional modeling. By using the UAV to take multi-angle photos of the area to be modeled, the three-dimensional reconstruction of the house is realized. However, due to the dense distribution of buildings and mutual occlusion, it is impossible to take a 360° panoramic image of the building, resulting in problems such as missing wall structures and deformation and distortion of the house during the three-dimensional reconstruction process, making it difficult to accurately calculate the floor area of the house. Summary of the Invention
[0004] To solve the problem in the background art that it is difficult to accurately calculate the floor area of a house due to reasons such as missing wall structures and deformation and distortion of the house in the existing house floor area measurement method, the present invention provides a method for calculating the floor area of a house, and the specific technical solution is as follows.
[0005] A method for calculating the floor area of a house, the method comprising the following steps:
[0006] S1. According to the direction of the normal vectors of the point clouds in the point cloud set of the house to be measured, remove the roof point clouds of the house from the point cloud set to obtain a point cloud set of the house walls;
[0007] S2. According to the positions and the directions of the normal vectors of the point clouds in the point cloud set of the house walls, divide the point cloud set of the house walls into four point cloud sets of the walls;
[0008] S3. Perform plane fitting on the four point cloud sets of the walls to obtain a set of fitting planes for each wall;
[0009] S4. Obtain the best fitting plane for each wall:
[0010] If there is a fitting plane in the set of fitting planes of a certain wall whose included angle with the XY plane is greater than or equal to α1, retain the fitting plane with the largest included angle with the XY plane in it as the best fitting plane of the wall;
[0011] If there is no fitting plane in the fitting plane set of a certain wall whose angle with the XY plane is greater than or equal to α1, select the point clouds in the point cloud set of this wall whose normal vectors have an angle with the XY plane greater than or equal to β1. Perform clustering operations on these point clouds to obtain multiple point cloud clusters, perform plane fitting on the multiple point cloud clusters to obtain multiple fitting planes, and retain the fitting plane with the largest angle with the XY plane as the best fitting plane of this wall;
[0012] Among them, 75°≤α1≤90°, 70°≤β1≤90°, and β1<α1;
[0013] S5. Obtain four plane intersection lines of the four walls according to the best fitting planes of the four walls;
[0014] S6. Obtain four intersection points of the four plane intersection lines with the XY plane;
[0015] S7. Obtain the area of the quadrilateral enclosed by the four intersection points, that is, obtain the floor area of the house.
[0016] The point cloud set of the house to be measured is a set of point cloud data of a single house to be measured. The point cloud data of the house is directly read from the prior art, and the data format is point cloud coordinates (x, y, z). The origin of the point cloud coordinate system is the lower left rear vertex of the smallest bounding cube of the single house. The x-axis and Y-axis of the point cloud coordinate system are parallel to the two side faces where the smallest bounding cube intersects respectively, and the Z-axis is perpendicular to the bottom surface and upward. The smallest bounding cube of the single house can be obtained by using existing methods, such as the bounding box algorithm.
[0017] Preferably, the normal vectors of the point clouds in the point cloud set of the house to be measured are obtained according to the following method:
[0018] Use the KNN algorithm to obtain multiple neighborhood points of a certain point cloud, obtain the fitting plane of the multiple neighborhood points through plane fitting, and use the normal vector of the fitting plane as the normal vector of the point cloud.
[0019] Preferably, in step S1, remove the point clouds in the point cloud set whose normal vector directions are perpendicular to the XY plane and whose angles with the XY plane are in the range of 30 - 45°, to obtain the point cloud set of the house wall.
[0020] Specifically, the point clouds in the point cloud set of the house wall are segmented into point cloud sets of four walls according to the following method:
[0021] S21. Divide the point clouds in the point cloud set of the house wall whose normal vector directions have an angle with the XZ plane greater than or equal to γ1 into the first point cloud set, and divide the point clouds whose normal vector directions have an angle with the YZ plane greater than or equal to γ1 into the second point cloud set; among them, 60°≤γ1≤90°, and γ1<β1;
[0022] S22. Construct the straight line equation L between point A1 and point B1 AB1 , substitute the coordinates of each point cloud in the second point cloud set into the straight line equation L AB1 , divide the point cloud with calculation results greater than 0 into the first wall, and divide the point cloud with calculation results less than 0 into the second wall; construct the straight line equation L between point C1 and point D1 AB2 , substitute the coordinates of each point cloud in the first point cloud set into the straight line equation L AB2 , divide the point cloud with calculation results greater than 0 into the third wall, and divide the point cloud with calculation results less than 0 into the fourth wall;
[0023] The coordinates of point A1 are [(x 1max -x 1min ) / 2,y 1min ,0], the coordinates of point B1 are [(x 1max -x 1min ) / 2,y 1max ,0], the coordinates of point C1 are [x 2min ,(y 2max -y 2min ) / 2,0], the coordinates of point D1 are [x 2max ,(y 2max -y 2min ) / 2,0]; x 1max is the maximum value of X in the first point cloud set, x 1min is the minimum value of X in the first point cloud set, y 1max is the maximum value of Y in the first point cloud set, y 1min is the minimum value of Y in the first point cloud set; x 2max is the maximum value of X in the second point cloud set, x 2min is the minimum value of X in the second point cloud set, y 2max is the maximum value of Y in the second point cloud set, y 2min is the minimum value of Y in the second point cloud set.
[0024] Specifically, the point clouds are clustered to obtain a plurality of point cloud clusters with similar positions by the following method: point clouds with distances between them less than L are clustered into the same point cloud cluster, where 0.01≤L≤0.05n.
[0025] Preferably, before plane fitting is performed on the plurality of point cloud clusters, the following step is further included: eliminating point cloud clusters with a point cloud density less than M points / square meter, where 400≤M≤600.
[0026] Based on the same inventive concept, the present invention also provides a house floor area calculation system, which includes a computer device. The computer device includes a memory, a processor, and program instructions stored in the memory and executable by the processor. The processor executes the program instructions to implement the steps of the above-mentioned house floor area calculation method.
[0027] Due to the adoption of the above technical solutions, compared with the prior art, the present invention can not only effectively eliminate abnormal points, achieve accurate extraction of the vertical surfaces of missing walls in the structure, but also efficiently and accurately fit the vertical surfaces of distorted walls, solving the problem that it is difficult to accurately calculate the floor area of a house due to reasons such as missing and distorted wall structures in existing house floor area measurement methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a flowchart of the house floor area calculation method of the present invention;
[0029] Figure 2 is a schematic diagram of the point cloud set of the house to be measured;
[0030] Figure 3 is a schematic diagram of the point cloud set of the house walls;
[0031] Figure 4 is a schematic diagram of the segmentation of the house walls;
[0032] Figure 5 is a schematic diagram of the best-fitting planes of the four walls;
[0033] Figure 6 is a schematic diagram of the house floor area;
[0034] Figure 7 is a schematic diagram of the point cloud clusters obtained after point cloud clustering;
[0035] Figure 8 is a schematic diagram of the best-fitting planes of each wall. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0036] The present invention will be further described in detail below with reference to the accompanying drawings.
[0037] As Figure 1 shown, a house floor area calculation method includes the following steps:
[0038] S1. According to the direction of the normal vectors of the points in the point cloud set of the house to be measured, remove the point cloud of the house roof from the point cloud set to obtain the point cloud set of the house walls; the point cloud of the house roof is the point cloud whose normal vector direction is perpendicular to the XY plane and the included angle with the XY plane is in the range of 30 - 45°;
[0039] Specifically, the KNN algorithm is used to obtain 50 neighborhood points of a certain point cloud. The fitting plane of these 50 neighborhood points is obtained through plane fitting, and the normal vector of this fitting plane is used as the normal vector of the point cloud;
[0040] The neighborhood points are denoted as:
[0041] N = {p i (x i , y i , z i ) | i = 1, 2, …, n}
[0042] N is the neighborhood point set, p i (x i , y i , z i ) is a point cloud point, and i is the point cloud index;
[0043] The fitting plane formula:
[0044]
[0045] where A, B, C, and D are equation parameters;
[0046] The least squares method is used for plane fitting, that is, to solve the following minimum problem:
[0047]
[0048] The normal vector of the point cloud: where is the required normal vector,
[0049] n x , n y , n z are the values in three directions;
[0050] S2. According to the positions and normal vector directions of the point clouds in the house wall point cloud set, the house wall point cloud set is divided into four wall point cloud sets; specifically, the following steps are included:
[0051] S21. The point clouds in the house wall point cloud set whose included angle between the normal vector direction and the XZ plane is greater than or equal to γ1 are divided into the first point cloud set, and the point clouds whose included angle between the normal vector direction and the YZ plane is greater than or equal to γ1 are divided into the second point cloud set; where 60° ≤ γ1 ≤ 90°, and γ1 < β1;
[0052] S22. Construct the straight line equation L of point A1 and point B1 AB1 , and substitute the coordinates of each point cloud in the second point cloud set into the straight line equation L AB1, the point clouds with calculation results greater than 0 are divided into the first wall, and the point clouds with calculation results less than 0 are divided into the second wall; construct the straight line equation L of point C1 and point D1 AB2 , substitute the coordinates of each point cloud in the first point cloud set into the straight line equation L AB2 , the point clouds with calculation results greater than 0 are divided into the third wall, and the point clouds with calculation results less than 0 are divided into the fourth wall;
[0053] Among them, the coordinates of point A1 are [(x 1max -x 1min ) / 2, y 1min , 0], the coordinates of point B1 are [(x 1max -x 1min ) / 2, y 1max , 0], the coordinates of point C1 are [x 2min , (y 2max -y 2min ) / 2, 0], the coordinates of point D1 are [x 2max , (y 2max -y 2min ) / 2, 0]; x 1max is the maximum value of X in the first point cloud set, x 1min is the minimum value of X in the first point cloud set, y 1max is the maximum value of Y in the first point cloud set, y 1min is the minimum value of Y in the first point cloud set; x 2max is the maximum value of X in the second point cloud set, x 2min is the minimum value of X in the second point cloud set, y 2max is the maximum value of Y in the second point cloud set, y 2min is the minimum value of Y in the second point cloud set; S3. Use the Ransac algorithm to perform plane fitting on the point cloud sets of the four walls to obtain the fitting plane sets of each wall; in this embodiment, when the number of planes found after 5000 iterations is less than 3000 points, or three unmarked points cannot be found, end the plane fitting;
[0054] S4. Obtain the best fitting plane of each wall:
[0055] If there is a fitting plane in the fitting plane set of a certain wall whose angle with the XY plane is greater than or equal to 85°, retain the plane with the largest angle with the XY plane as the best fitting plane of the wall; specifically, calculate the angles between all fitting planes in the fitting plane set of a certain wall and the XY plane, and then traverse all fitting planes: if the angle between the fitting plane and the XY plane is greater than or equal to 85°, retain all the point clouds of the fitting plane; if the next fitting plane meets the above conditions and the angle is greater than the previously saved fitting plane, delete the previous fitting plane and save all the point clouds of the current fitting plane until all fitting planes are screened, and finally save all the point clouds of one best fitting plane.
[0056] If there is no fitting plane in the fitting plane set of a certain wall whose angle with the XY plane is greater than or equal to 85°, screen out the point clouds in the point cloud set of the wall whose angle between the normal vector and the XY plane is greater than or equal to 80°, cluster the point clouds with a distance less than 0.05 m between the point clouds into the same point cloud cluster to obtain multiple point cloud clusters with similar positions; eliminate the point cloud clusters with a point cloud density less than 500 points per square meter; use the Ransac algorithm to perform plane fitting on multiple point cloud clusters to obtain multiple planes, and retain the plane with the largest angle with the XY plane as the best fitting plane of the wall;
[0057] S5. Obtain four plane intersection lines of the four walls according to the best fitting planes of the four walls;
[0058] S6. Obtain four intersection points of the four plane intersection lines and the XY plane;
[0059] S7. Obtain the area of the quadrilateral enclosed by the four intersection points, that is, obtain the bottom area of the house.
[0060] As can be seen from the following table results, the bottom area of the house calculated by the method of the present invention has a small difference from the actual area of the real house, and the overall error is controlled within 6%, meeting the business requirements in the land expropriation and resettlement project, indicating that the technical method of the present invention has excellent application benefits.
[0061] Table 1. Comparison of the calculation results of the method of the present invention with the actual bottom area of the real house
[0062]
[0063]
[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for calculating the floor area of a house, characterized in that, The method includes the following steps: S1. According to the directions of the normal vectors of the point clouds in the point cloud set of the house to be measured, remove the point clouds of the house roof from the point cloud set to obtain a point cloud set of the house wall; S2. According to the positions and the directions of the normal vectors of the point clouds in the point cloud set of the house wall, divide the point cloud set of the house wall into four point cloud sets of the walls; S3. Perform plane fitting on the four point cloud sets of the walls to obtain a set of fitting planes for each wall; S4. Obtain the best fitting plane for each wall: If there is a fitting plane in the set of fitting planes of a certain wall whose angle with the XY plane is greater than or equal to α1, retain the fitting plane with the largest angle with the XY plane in it as the best fitting plane for this wall; If there is no fitting plane in the set of fitting planes of a certain wall whose angle with the XY plane is greater than or equal to α1, screen out the point clouds in the point cloud set of this wall whose normal vectors have an angle with the XY plane greater than or equal to β1, perform clustering operations on these point clouds to obtain multiple point cloud clusters, perform plane fitting on the multiple point cloud clusters to obtain multiple fitting planes, and retain the fitting plane with the largest angle with the XY plane in it as the best fitting plane for this wall; where, 75° ≤ α1 ≤ 90°, 70° ≤ β1 ≤ 90°, and β1 < α1; S5. Obtain four plane intersection lines of the four walls according to the best fitting planes of the four walls; S6. Obtain four intersection points of the four plane intersection lines with the XY plane; S7. Obtain the area of the quadrilateral enclosed by the four intersection points, that is, obtain the bottom area of the house.
2. The method for calculating the floor area of a house according to claim 1, characterized in that The normal vectors of the point clouds in the point cloud set of the house to be measured are obtained according to the following method: Use the KNN algorithm to obtain multiple neighborhood points of a certain point cloud, obtain the fitting plane of these multiple neighborhood points through plane fitting, and use the normal vector of this fitting plane as the normal vector of this point cloud.
3. The method for calculating the floor area of a house according to claim 1 or 2, characterized in that: In step S1, remove the point clouds whose normal vector directions are perpendicular to the XY plane and whose angles with the XY plane are in the range of 30 - 45° from the point cloud set to obtain a point cloud set of the house wall.
4. The method for calculating the floor area of a house according to claim 1 or 2, characterized in that, The point clouds in the point cloud set of the house wall are divided into four point cloud sets of the walls according to the following method: S21. Divide the point clouds in the point cloud set of the house wall whose normal vector directions have an angle with the XZ plane greater than or equal to γ1 into the first point cloud set, and divide the point clouds whose normal vector directions have an angle with the YZ plane greater than or equal to γ1 into the second point cloud set; where, 60° ≤ γ1 ≤ 90°, and γ1 < β1; S22. Construct the straight-line equation L of point A1 and point B1 AB1 , substitute the point cloud coordinates in the second point cloud set into the straight-line equation L AB1 , divide the point clouds with calculation results greater than 0 into the first wall, and divide the point clouds with calculation results less than 0 into the second wall; construct the straight-line equation L of point C1 and point D1 AB2 , substitute the point cloud coordinates in the first point cloud set into the straight-line equation L AB2 , divide the point clouds with calculation results greater than 0 into the third wall, and divide the point clouds with calculation results less than 0 into the fourth wall; Among them, the coordinates of point A1 are [(x 1max -x 1min ) / 2, y 1min , 0], the coordinates of point B1 are [(x 1max -x 1min ) / 2, y 1max , 0], the coordinates of point C1 are [x 2min , (y 2max -y 2min ) / 2, 0], the coordinates of point D1 are [x 2max , (y 2max -y 2min ) / 2, 0]; x 1max is the maximum value of X in the first point cloud set, x 1min is the minimum value of X in the first point cloud set, y 1max is the maximum value of Y in the first point cloud set, y 1min is the minimum value of Y in the first point cloud set; x 2max is the maximum value of X in the second point cloud set, x 2min is the minimum value of X in the second point cloud set, y 2max is the maximum value of Y in the second point cloud set, y 2min is the minimum value of Y in the second point cloud set.
5. The method for calculating the floor area of a house according to claim 1 or 2, characterized in that The point clouds are clustered into multiple point cloud clusters with close positions through the following method: Cluster the point clouds with a distance less than L between them into the same point cloud cluster, where 0.01 ≤ L ≤ 0.05 m.
6. The method for calculating the floor area of a house according to claim 5, wherein Before performing plane fitting on the multiple point cloud clusters, the following steps are also included: Remove the point cloud clusters with a point cloud density less than M points per square meter, where 400 ≤ M ≤ 600.
7. A house bottom area calculation system, the system includes a computer device, the computer device includes a memory, a processor, and program instructions stored in the memory and available for the processor to run, where the processor executes the program instructions to implement the steps described in any one of claims 1 - 6.
Citation Information
Patent Citations
Optimal reconstruction method for a complex three-dimensional building point cloud roof and a side surface
CN109993783A
House measurement and wall flatness detection method based on laser
CN112833815A