A method, device and equipment for measuring a main frame of a building
By performing voxelization and semantic attachment on point cloud data, combined with BIM information and image processing technology, the problem of lack of semantic information in point cloud data is solved, enabling rapid and accurate classification and measurement of building components, and improving detection efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-05-19
AI Technical Summary
In existing technologies, the lack of semantic information in raw point cloud data makes it difficult to automatically classify building components, the adhesion between components leads to low instance segmentation accuracy, and the direct extraction of boundaries in 3D space has poor noise resistance, affecting the efficiency and accuracy of building quality inspection.
A hash table-organized voxel graph structure is used to spatially divide point cloud data into voxels. A semantic configuration file is constructed in conjunction with BIM drawings. Components are classified by local planar features and normal vector orientation. Instance segmentation is performed using a color region growing algorithm and a BEV spatial projection strategy. Geometric parameters are calculated by combining the minimum envelope box and RANSAC algorithm, and an error report is generated.
It enables rapid and accurate measurement of ceilings, floors, and walls facing all directions, significantly improving the efficiency and accuracy of building construction quality acceptance and operation and maintenance testing.
Smart Images

Figure CN121482134B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of architectural surveying, and in particular to a method, apparatus and equipment for measuring the main frame of a building. Background Technology
[0002] With the deep integration of industrialized building technology and information technology, construction quality inspection is shifting from traditional manual sampling and measurement to comprehensive digital inspection based on 3D point clouds. 3D laser scanning equipment can quickly acquire massive amounts of point cloud data from the construction site, providing a data foundation for automated measurement of the building's main frame.
[0003] During the quality acceptance process of the main building frame, the core task is to accurately measure the actual dimensions and flatness of each component (including ceilings, floors, and walls facing each direction) and compare them with the BIM design model to assess construction deviations. However, from the original point cloud data to the final generation of a reliable error analysis report, a key technical problem needs to be solved: how to automatically and accurately extract the instance point cloud of each building component from the original point cloud containing only spatial coordinates, and complete the accurate calculation of its geometric parameters, without human intervention.
[0004] However, raw point clouds themselves do not carry any semantic information, and the system cannot directly determine whether a point belongs to the ceiling, the floor, or a wall. Meanwhile, the construction site environment is complex, with different components spatially intertwined, making accurate separation difficult using only geometric features. Furthermore, point cloud data inevitably contains noise and occlusion leading to localized gaps, making direct boundary extraction in 3D space prone to error accumulation. These intertwined factors make the fully automated processing from raw point clouds to component-level instance segmentation and geometric parameter calculation the core bottleneck restricting the improvement of efficiency and accuracy in building quality inspection.
[0005] In view of the above, this application is hereby submitted. Summary of the Invention
[0006] This invention discloses a method, apparatus, and equipment for measuring the main frame of a building, aiming to solve the problems of difficulty in automatic classification of building components due to lack of semantic information in raw point cloud data, low instance segmentation accuracy due to adhesion between components, and poor noise resistance of direct extraction of boundaries in three-dimensional space.
[0007] The first embodiment of the present invention provides a method for measuring the main frame of a building, including:
[0008] Point cloud data is acquired, and the point cloud data is spatially divided into voxels using a voxel graph structure organized by a hash table. The voxel index is used as a hash key to associate octree nodes to store the set of three-dimensional points in each voxel, thus obtaining voxelized point cloud data.
[0009] For each non-empty voxel in the voxelized point cloud data, calculate the local planar features. Based on the flatness, normal vector orientation, and voxel center height, classify each non-empty voxel into ceiling voxel, ground voxel, X-oriented wall voxel, or Y-oriented wall voxel to obtain the component voxel set.
[0010] Based on BIM drawings, a semantic configuration file is constructed. According to the position attributes of each voxel in the component voxel set, the corresponding BIM component information associated with the semantic configuration file is queried. Color values and BIM design dimension values are attached to the three-dimensional points in each voxel to obtain the semantic component point cloud.
[0011] The semantic component point cloud is downsampled and outlier removed, and grouped into wall point cloud group and non-wall point cloud group according to color value;
[0012] The wall point cloud group and the non-wall point cloud group are respectively segmented by a color region growth algorithm with normal vector constraints to obtain point cloud instance clusters. Each point cloud instance cluster is projected into the BEV space and image processing is performed to extract boundary information to obtain a BEV processed image.
[0013] Based on the BEV processed image, the boundary-crossing point cloud is determined and re-divided to obtain the optimal instance point cloud for each component. The size and flatness of the optimal instance point cloud are compared with the BIM design size values attached to the semantic component point cloud to generate an error report.
[0014] Preferably, the voxel index The calculation method is as follows:
[0015]
[0016] in, , , Here are the coordinate components of a 3D point, S is the voxel size, and INT indicates the rounding operation.
[0017] The mapping relationship of the hash table is as follows: ,in, This is an octree node pointer, whose spatial range is centered on the voxel center and has a side length of 1 / 4 of the voxel size S.
[0018] Preferably, the semantic configuration file is an offline information file pre-written based on BIM drawings. After aligning the BIM coordinate system and the point cloud coordinate system, the color RGB value and BIM design dimension value of the corresponding building component in the semantic configuration file are queried through the spatial position of each voxel in the component voxel set and attached to the three-dimensional point in each voxel.
[0019] Preferably, the step of downsampling and outlier removal of the semantic component point cloud, and grouping it into a wall point cloud group and a non-wall point cloud group according to color values, specifically involves:
[0020] The semantic component point cloud is downsampled using a voxel downsampling algorithm, and outliers are removed using a statistical filtering algorithm.
[0021] The point clouds of ceiling components, ground components, wall components facing X and wall components facing Y are obtained by separating them according to color values. The point clouds of ceiling components and ground components are merged into a non-wall point cloud group, and the point clouds of wall components facing X and wall components facing Y are merged into a wall point cloud group.
[0022] Preferably, the step of performing instance segmentation on the wall point cloud group and the non-wall point cloud group using a color region growing algorithm with normal vector constraints to obtain point cloud instance clusters specifically involves:
[0023] Using an unmarked point as a seed point, search for a neighboring point in its spatial neighborhood that satisfies the following conditions: the color distance between the neighboring point and the seed point is less than the color threshold, the plane curvature is less than the curvature threshold, and the angle between the normal vectors is less than the angle threshold.
[0024] Neighboring points that meet the criteria are grouped into the same point cloud instance cluster and used as new seed points to continue growing until no new points are added; each point cloud instance cluster retains its associated BIM design dimension values.
[0025] Preferably, the image processing includes:
[0026] The BEV projection image is sequentially processed by grayscale conversion, median filtering, and morphological dilation.
[0027] Connectivity component analysis and pixel line edge extraction are performed on the BEV projection image corresponding to the wall point cloud group to generate a wall BEV processed image;
[0028] The Suzuki-Abe contour extraction algorithm is used to determine the contour boundaries of the ceiling and the ground for the BEV projection image corresponding to the non-wall point cloud group, and the non-wall BEV processed image is generated.
[0029] Preferably, the step of determining the boundary-crossing point cloud based on the BEV processed image and re-dividing it to obtain the optimal instance point cloud for each component specifically involves:
[0030] For the BEV processed image of the wall, the pixel position of the cast-in-place location between the walls is obtained by calculating the intersection of the set of line segments. ,by Four orthogonal quadrant regions are defined around the center. By querying the pixel coordinates of the XY plane boundary point clouds of the current two sets of walls, the boundary point clouds are determined and reassigned to the other set of walls.
[0031] For the non-wall BEV processed image, extract the contour boundary lines of each color category, and determine the position of the center pixel of the line. Define the upper and lower regions around the center, and determine the boundary point cloud by querying the pixel coordinates of the boundary point cloud of the YZ plane of the currently adjacent wall. Then, reassign the boundary point cloud to the adjacent ceiling or ground.
[0032] Preferably, the minimum envelope box algorithm is used to calculate the length and height of the optimal instance point cloud;
[0033] Flatness calculation uses the RANSAC algorithm to fit the best plane, and calculates the standard deviation of the distance from the point cloud to the fitted plane as the flatness index.
[0034] The formula for calculating the relative error ratio is: ;in, These are actual measured dimensions. The BIM design dimension values associated with the point cloud of the best instance.
[0035] The second embodiment of the present invention provides a measuring device for the main frame of a building, comprising:
[0036] The point cloud voxelization module is used to acquire point cloud data. It uses a voxel graph structure organized by a hash table to divide the point cloud data into spatial voxels. It uses the voxel index as a hash key to associate octree nodes to store the set of three-dimensional points in each voxel, thereby obtaining voxelized point cloud data.
[0037] The component coarse classification module is used to calculate local planar features for each non-empty voxel in the voxelized point cloud data, and classify each non-empty voxel into ceiling voxel, ground voxel, X-direction wall voxel or Y-direction wall voxel according to flatness, normal vector orientation and voxel center height, to obtain the component voxel set.
[0038] The semantic attachment module is used to construct a semantic configuration file based on BIM drawings. It queries the BIM component information associated with the semantic configuration file according to the position attributes of each voxel in the component voxel set, attaches color values and BIM design dimension values to the three-dimensional points in each voxel, and obtains the semantic component point cloud.
[0039] The point cloud preprocessing module is used to downsample and remove outliers from the semantic component point cloud, and group them into wall point cloud group and non-wall point cloud group according to color value;
[0040] The instance segmentation module is used to segment the wall point cloud group and the non-wall point cloud group into point cloud instance clusters by using a color region growth algorithm with normal vector constraints, respectively. Each point cloud instance cluster is then projected into the BEV space and image processing is performed to extract boundary information to obtain a BEV processed image.
[0041] The geometric parameter calculation module is used to determine the boundary point cloud based on the BEV processed image and re-divide it to obtain the best instance point cloud for each component. The module calculates the size and flatness of the best instance point cloud and compares it with the BIM design size value attached to the semantic component point cloud to generate an error report.
[0042] The third embodiment of the present invention provides a measuring device for the main frame of a building, including a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement a method for measuring the main frame of a building as described in any of the above embodiments.
[0043] Based on the method, apparatus, and equipment for measuring the main frame of a building provided by this invention, the method first performs voxelization processing on the collected point cloud map file and calculates the planar distribution within each sub-voxel to classify the component point cloud types. Then, a semantic information file is constructed based on BIM drawings to assist in semantically attaching color and size information to the point cloud. On this basis, a statistical filtering algorithm is used to remove outliers, and a color region growing algorithm is combined to refine the extraction of each component point cloud. Furthermore, a BEV spatial projection strategy is used to determine the boundary of the component point cloud, thereby determining the optimal instance component point cloud. Finally, the minimum envelope box (OBB) and RANSAC algorithm are applied to calculate the component dimensions and flatness, and the results are compared with BIM standard dimensions to generate an error report. This method enables rapid classification and accurate measurement of ceilings, floors, and walls facing various directions, significantly improving the efficiency and accuracy of building construction quality acceptance and operation and maintenance inspection. Attached Figure Description
[0044] Figure 1 This is a flowchart illustrating a method for measuring the main frame of a building according to the first embodiment of the present invention.
[0045] Figure 2 This invention provides a point cloud verification model for a three-bedroom, one-living-room apartment layout.
[0046] Figure 3 This is the BEV processing result provided by the present invention;
[0047] Figure 4 This is the segmentation result after processing by the BEV strategy provided by this invention;
[0048] Figure 5 This is a schematic diagram of a module for measuring the main frame of a building provided in the second embodiment of the present invention. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0051] This invention discloses a method, apparatus, and equipment for measuring the main frame of a building, aiming to solve the problems of difficulty in automatic classification of building components due to lack of semantic information in raw point cloud data, low instance segmentation accuracy due to adhesion between components, and poor noise resistance of direct extraction of boundaries in three-dimensional space.
[0052] Please see Figure 1 The first embodiment of the present invention provides a method for measuring the main frame of a building, which can be executed by a building main frame measuring device (hereinafter referred to as the measuring device or system), specifically, by one or more processors within the measuring device, to at least implement the following steps:
[0053] S101, acquire point cloud data, use a hash table-organized voxel graph structure to divide the point cloud data into spatial voxels, use the voxel index as a hash key to associate octree nodes to store the set of three-dimensional points in each voxel, and obtain voxelized point cloud data.
[0054] In this embodiment, the measuring device can be a desktop computer, laptop computer, server, or other terminal with data processing capabilities. The measuring device can be equipped with a corresponding operating system and application software, and the functions required in this embodiment can be realized through the combination of the operating system and application software.
[0055] In this embodiment, please refer to Figure 2 First, the point cloud map file is read, and all 3D points are stored sequentially using a point cloud container. To improve memory utilization efficiency and spatial query performance for large-scale point cloud data, a voxel graph structure organized by a hash table is used to spatially partition the point cloud data into voxels. Specifically, the point cloud container is imported into the voxel graph structure in fixed blocks. For each 3D point, the corresponding voxel index is calculated based on its coordinate components. The voxel index is calculated by: dividing the coordinate components of the 3D point... , , After dividing by the preset voxel size S, the result is rounded down. It should be noted that if the coordinate components contain negative numbers, an additional unit integer needs to be subtracted from the negative part before performing the rounding operation. If <0, execute first. Similarly, the INT operation means to discard the decimal part of the coordinates.
[0056] The mapping relationship of the hash table is as follows: ,in Use voxel indexes as hash keys. The pointers to the corresponding octree nodes are used as hash values to store the 3D points associated with the currently partitioned voxels. This data management method, which uses voxel indices as hash keys to associate octree nodes, significantly improves memory utilization efficiency. During the block import process, if the calculated voxel index already exists in the hash table, the current 3D point is added to the point list of the octree node corresponding to that voxel, and the count is updated; if the voxel index does not exist in the hash table, a new octree node pointer object is created, and the spatial range of the octree node is initialized. The spatial range is centered on the voxel center and has a side length of 1 / 4 of the voxel size S. The current 3D point is then added to the octree node associated with the new voxel. Through the above processing, voxelized point cloud data containing multiple non-empty voxels is obtained.
[0057] S102, calculate the local planar features of each non-empty voxel in the voxelized point cloud data, and classify each non-empty voxel into ceiling voxel, ground voxel, X-direction wall voxel or Y-direction wall voxel according to flatness, normal vector orientation and voxel center height, to obtain the component voxel set.
[0058] After obtaining the voxelized point cloud data, local planar features are calculated for the set of 3D points within each non-empty voxel (i.e., an octree node) to achieve coarse classification of building components. Local planar features include flatness F and normal vector n. Specifically, the covariance matrix of the set of 3D points within each non-empty voxel is calculated using principal component analysis, and the three eigenvalues of this covariance matrix are solved. , , ,in Flatness F is used to characterize the degree of planar distribution of point clouds within a voxel, and its calculation formula is as follows: A smaller flatness value indicates that the point cloud is closer to a planar distribution. The normal vector n is the smallest eigenvalue. The corresponding eigenvectors are used to characterize the spatial orientation of the plane.
[0059] After calculating the flatness and normal vector of each non-empty voxel, coarse classification of parts is performed based on the voxel center height Z_c. A flatness threshold is set. and height threshold Among them, height threshold The value is taken as 1 / 2 of the building's floor height. The classification criteria are as follows: if flatness... Furthermore, the normal vector n is approximately parallel to the Z-axis of the world coordinate system. When this occurs, it indicates that the point cloud within the voxel is on a horizontal plane. Further judgment is then made based on the voxel center height. Then classify the non-empty voxel as a ceiling voxel, if Then it is classified as a ground voxel; if flatness Furthermore, the normal vector n is approximately parallel to the X-axis of the world coordinate system. This indicates that the point cloud within the voxel is a vertical plane perpendicular to the X-axis, classifying the non-empty voxel as an X-oriented wall voxel; if flatness Furthermore, the normal vector n is approximately parallel to the Y-axis of the world coordinate system. This indicates that the point cloud within the voxel is a vertical plane perpendicular to the Y-axis, and the non-empty voxel is classified as a Y-oriented wall voxel; other non-empty voxels that do not meet the above conditions are temporarily marked as unclassified structures. Through the above processing, a set of component voxels containing ceiling voxels, ground voxels, X-oriented wall voxels, and Y-oriented wall voxels is obtained.
[0060] S103, construct a semantic configuration file based on BIM drawings, query the BIM component information associated with the semantic configuration file according to the position attributes of each voxel in the component voxel set, attach color values and BIM design dimension values to the three-dimensional points in each voxel, and obtain the semantic component point cloud.
[0061] After obtaining the voxel set of components, semantic information needs to be attached to the 3D points within each voxel to support subsequent refined instance segmentation and error analysis. Based on BIM drawings, information such as the location, dimensions, color, and name of each building component is pre-written, and a semantic configuration file is constructed and stored offline. This semantic configuration file records the spatial location range of each building component in the design model, design dimension parameters, and RGB color values used to distinguish different components, with different wall, ceiling, and floor areas assigned different color identifiers.
[0062] After importing the semantic configuration file, the first step is to align the BIM coordinate system and the point cloud map coordinate system, ensuring they match within the same spatial reference frame. After coordinate system alignment, the semantic configuration file is used to query the corresponding BIM component information based on the spatial location attributes of each voxel in the component voxel set. Specifically, this involves determining which building component's spatial location range each voxel's center coordinates fall within in the semantic configuration file, thus associating the voxel with its corresponding BIM component. Once associated, the RGB color value and design dimension value of the BIM component from the semantic configuration file are attached to all 3D points within that voxel. Through this process, the point cloud data, originally containing only spatial coordinates, acquires semantic attributes such as color and size, forming a semantic component point cloud.
[0063] S104, downsample and remove outliers from the semantic component point cloud, and group them into wall point cloud group and non-wall point cloud group according to color value;
[0064] After obtaining the semantic component point cloud, preprocessing is required to reduce subsequent computation and improve segmentation quality. First, a voxel downsampling algorithm is used to downsample the semantic component point cloud. This algorithm selects a representative point within each voxel to replace all points within that voxel, effectively reducing the number of points while preserving the overall geometric features of the point cloud. Then, a statistical filtering algorithm is used to remove outliers. This algorithm calculates the average distance from each point to its neighbors and identifies points whose average distance exceeds a certain standard deviation of the global mean as outliers, thus eliminating the interference of noise points generated during laser scanning on subsequent processing.
[0065] After downsampling and outlier removal, the point clouds are grouped according to the color values attached to each 3D point in the semantic component point cloud. Since different RGB values have been assigned to different types of building components during the semantic information attachment stage, the point clouds can be separated into four categories based on color values: ceiling component point cloud, ground component point cloud, X-direction wall component point cloud, and Y-direction wall component point cloud. Considering that the ceiling and ground are both horizontal structures and have similar subsequent processing methods, the ceiling component point cloud and the ground component point cloud are merged into a non-wall point cloud group; the X-direction wall and the Y-direction wall are both vertical structures, so the X-direction wall component point cloud and the Y-direction wall component point cloud are merged into a wall point cloud group.
[0066] S105, the wall point cloud group and the non-wall point cloud group are respectively segmented by a color region growth algorithm with normal vector constraints to obtain point cloud instance clusters. Each point cloud instance cluster is projected into the BEV space and image processing is performed to extract boundary information to obtain a BEV processed image.
[0067] Please combine Figure 3After point cloud preprocessing and grouping, a color region growing algorithm with normal vector constraints is used for refined instance segmentation of the wall point cloud group and the non-wall point cloud group. This algorithm uses each unlabeled 3D point as a seed point and searches for neighboring points that meet specific conditions within its spatial neighborhood. Specifically, a neighboring point must simultaneously meet the following three conditions to be assigned to the same point cloud instance cluster: the color distance between the neighboring point and the seed point is less than a preset color threshold, the planar curvature of the neighboring point is less than a preset curvature threshold, and the angle between the normal vectors of the neighboring point and the seed point is less than a preset angle threshold. Neighboring points that meet the above conditions are marked and assigned to the same point cloud instance cluster as the seed point, and this neighboring point is then used as a new seed point to continue growing outwards. This process is iterated until no new points are added to the current point cloud instance cluster. Then, the next unlabeled 3D point is selected as the new seed point, and the above process is repeated until all 3D points are marked. Using this algorithm, the wall point cloud group and the non-wall point cloud group are each divided into multiple point cloud instance clusters with independent color identifiers, and each point cloud instance cluster retains its associated BIM design dimension value.
[0068] After obtaining the point cloud instance clusters, the boundaries of each component's point cloud are determined using a BEV space projection strategy. Each point cloud instance cluster is then projected into the BEV space to generate a BEV projection image. The projection formula is as follows:
[0069]
[0070]
[0071]
[0072]
[0073] In the formula, It is the world coordinate range of the X-axis. It is the world coordinate range of the Y-axis. It is spatial resolution. It is the height of the BEV image. This is the width of the BEV image. The pixel value of each pixel in the BEV projection image is assigned the color component of the point cloud instance cluster to which all projected points at that pixel location belong.
[0074] Image processing is performed on the generated BEV projection images to extract boundary information. First, the three-channel images are converted to single-channel images by sequentially performing grayscale conversion. Median filtering is used to remove noise from the grayscale images, and a morphological dilation algorithm is used to connect broken areas and fill holes. For the BEV projection images corresponding to the wall point cloud groups, connected component analysis and pixel line edge extraction are performed after the above processing to generate the wall BEV processed images. For the BEV projection images corresponding to non-wall point cloud groups, the Suzuki-Abe contour extraction algorithm is used to determine the contour boundaries of the ceiling and floor, generating non-wall BEV processed images.
[0075] S106, based on the BEV processed image, determine the out-of-bounds point cloud and re-divide it to obtain the best instance point cloud for each component. Compare the size and flatness of the best instance point cloud with the BIM design size value attached to the semantic component point cloud to generate an error report.
[0076] Please combine Figure 4 After obtaining the BEV-processed image, the boundary-crossing point cloud is identified and re-divided based on this image to obtain the optimal instance point cloud for each component. For the BEV-processed image of the wall, the intersection points of the set of straight line segments are calculated to obtain the pixel positions of the cast-in-place locations between walls. ,by Four orthogonal quadrant regions are defined around the center. The existence of boundary-crossing point clouds is determined by querying the pixel coordinates of the XY plane boundary point clouds of the current two sets of walls. If the pixel coordinates of a point cloud fall within the quadrant region of an adjacent wall, it is considered a boundary-crossing point cloud. This boundary-crossing point cloud is removed from the current wall instance cluster and reassigned to another wall instance cluster. For non-wall BEV processed images, the contour boundary lines of each color category are extracted, and their center pixel positions are used as the boundary boundary. The system defines upper and lower regions around a central point. By querying the pixel coordinates of the point clouds at the YZ plane boundary of the currently adjacent wall, it identifies out-of-bounds point clouds and reassigns them to the point clouds of the adjacent ceiling or floor components. Through this process of identifying and reassigning out-of-bounds point clouds, the problem of blurred segmentation boundaries caused by adhesion between components is effectively solved, resulting in the acquisition of the optimal instance point clouds for each component.
[0077] After obtaining the optimal instance point cloud, its geometric parameters are calculated. Dimension calculation employs the minimum bounding box algorithm (OBB algorithm), which calculates the smallest directed bounding box that completely encloses the optimal instance point cloud, thus obtaining the length and height dimensions of each instance point cloud. Flatness calculation uses the RANSAC algorithm (Random Sample Consensus Algorithm) to fit the optimal plane. This algorithm randomly selects a subset of the point cloud to fit candidate planes and counts the number of interior points, iteratively selecting the plane with the most interior points as the optimal fitting plane. Then, the standard deviation of the distance from all points in the optimal instance point cloud to this fitted plane is calculated as a flatness index; the smaller the index value, the smoother the component surface.
[0078] After completing the geometric parameter calculations, the measured dimensions of each instance cluster are compared with their associated BIM design dimensions to calculate the relative error ratio of each dimension. The formula for calculating the relative error ratio is as follows: ,in The measured dimensions were obtained using the minimum envelope box algorithm. Associate the BIM design dimensions with the best instance point cloud. Generate error reports based on the dimensional errors and flatness indices of each component, providing quantitative basis for building construction quality acceptance.
[0079] Please see Figure 5 The second embodiment of the present invention provides a measuring device for the main frame of a building, comprising:
[0080] Point cloud voxelization module 201 is used to acquire point cloud data. It uses a voxel graph structure organized by a hash table to divide the point cloud data into spatial voxels. It uses the voxel index as a hash key to associate octree nodes to store the three-dimensional point set in each voxel, thereby obtaining voxelized point cloud data.
[0081] The component coarse classification module 202 is used to calculate local planar features for each non-empty voxel in the voxelized point cloud data, and classify each non-empty voxel into ceiling voxel, ground voxel, X-direction wall voxel or Y-direction wall voxel according to flatness, normal vector orientation and voxel center height, to obtain the component voxel set.
[0082] The semantic attachment module 203 is used to construct a semantic configuration file based on BIM drawings, query the BIM component information associated with the semantic configuration file according to the position attributes of each voxel in the component voxel set, attach color values and BIM design dimension values to the three-dimensional points in each voxel, and obtain the semantic component point cloud.
[0083] Point cloud preprocessing module 204 is used to downsample and remove outliers from the semantic component point cloud, and group them into wall point cloud group and non-wall point cloud group according to color value;
[0084] The instance segmentation module 205 is used to segment the wall point cloud group and the non-wall point cloud group into point cloud instance clusters by using a color region growth algorithm with normal vector constraints, project each point cloud instance cluster into the BEV space and perform image processing to extract boundary information to obtain a BEV processed image.
[0085] The geometric parameter calculation module 206 is used to determine the boundary point cloud based on the BEV processed image and re-divide it to obtain the best instance point cloud of each component. The module calculates the size and flatness of the best instance point cloud and compares it with the BIM design size value attached to the semantic component point cloud to generate an error report.
[0086] The third embodiment of the present invention provides a measuring device for the main frame of a building, including a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement a method for measuring the main frame of a building as described in any of the above embodiments.
[0087] Based on the method, apparatus, and equipment for measuring the main frame of a building provided by this invention, the method first performs voxelization processing on the collected point cloud map file and calculates the planar distribution within each sub-voxel to classify the component point cloud types. Then, a semantic information file is constructed based on BIM drawings to assist in semantically attaching color and size information to the point cloud. On this basis, a statistical filtering algorithm is used to remove outliers, and a color region growing algorithm is combined to refine the extraction of each component point cloud. Furthermore, a BEV spatial projection strategy is used to determine the boundary of the component point cloud, thereby determining the optimal instance component point cloud. Finally, the minimum envelope box (OBB) and RANSAC algorithm are applied to calculate the component dimensions and flatness, and the results are compared with BIM standard dimensions to generate an error report. This method enables rapid classification and accurate measurement of ceilings, floors, and walls facing various directions, significantly improving the efficiency and accuracy of building construction quality acceptance and operation and maintenance inspection.
[0088] Exemplary examples show that the computer program described in the third and fourth embodiments of the present invention can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in implementing a measuring device for the main frame of a building. For example, the apparatus described in the second embodiment of the present invention.
[0089] The processor referred to can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the method for measuring the main frame of a building, connecting various parts of the method through various interfaces and lines.
[0090] The memory can be used to store the computer program and / or modules. The processor, by running or executing the computer program and / or modules stored in the memory and calling the data stored in the memory, realizes various functions of a method for measuring the main frame of a building structure. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, text conversion function, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, text message data, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0091] If the implemented module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0092] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0093] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for measuring the main frame of a building, characterized in that, include: Point cloud data is acquired, and the point cloud data is spatially divided into voxels using a voxel graph structure organized by a hash table. The voxel index is used as a hash key to associate octree nodes to store the set of three-dimensional points in each voxel, thus obtaining voxelized point cloud data. Local planar features are calculated for each non-empty voxel in the voxelized point cloud data. The local planar features include flatness and normal vector. Based on the flatness, the orientation of the normal vector, and the height of the voxel center, each non-empty voxel is classified into ceiling voxel, ground voxel, X-oriented wall voxel, or Y-oriented wall voxel to obtain a set of component voxels. Based on BIM drawings, a semantic configuration file is constructed. According to the position attributes of each voxel in the component voxel set, the corresponding BIM component information associated with the semantic configuration file is queried. Color values and BIM design dimension values are attached to the three-dimensional points in each voxel to obtain the semantic component point cloud. The semantic component point cloud is downsampled and outlier removed, and grouped into wall point cloud group and non-wall point cloud group according to color value; The wall point cloud group and the non-wall point cloud group are respectively segmented by a color region growth algorithm with normal vector constraints to obtain point cloud instance clusters. Each point cloud instance cluster is projected into the BEV space and image processing is performed to extract boundary information to obtain a BEV processed image. Based on the BEV processed image, the boundary-crossing point cloud is determined and re-divided to obtain the optimal instance point cloud for each component. The size and flatness of the optimal instance point cloud are compared with the BIM design size values attached to the semantic component point cloud to generate an error report.
2. The method for measuring the main frame of a building according to claim 1, characterized in that, The voxel index The calculation method is as follows: in, , , Here are the coordinate components of a 3D point, S is the voxel size, and INT indicates the rounding operation. The mapping relationship of the hash table is as follows: ,in, This is an octree node pointer, whose spatial range is centered on the voxel center and has a side length of 1 / 4 of the voxel size S.
3. The method for measuring the main frame of a building according to claim 1, characterized in that, The semantic configuration file is an offline information file pre-written based on BIM drawings. After aligning the BIM coordinate system and the point cloud coordinate system, the color RGB value and BIM design dimension value of the corresponding building component in the semantic configuration file are queried through the spatial position of each voxel in the component voxel set and attached to the three-dimensional point in each voxel.
4. The method for measuring the main frame of a building according to claim 1, characterized in that, The process of downsampling and outlier removal of the semantic component point cloud, and grouping them by color value into a wall point cloud group and a non-wall point cloud group, specifically involves: The semantic component point cloud is downsampled using a voxel downsampling algorithm, and outliers are removed using a statistical filtering algorithm. The point clouds of ceiling components, ground components, wall components facing X and wall components facing Y are obtained by separating them according to color values. The point clouds of ceiling components and ground components are merged into a non-wall point cloud group, and the point clouds of wall components facing X and wall components facing Y are merged into a wall point cloud group.
5. The method for measuring the main frame of a building according to claim 1, characterized in that, The point cloud instance clusters are obtained by performing instance segmentation using a color region growing algorithm with normal vector constraints on the wall point cloud group and the non-wall point cloud group, respectively. Using an unmarked point as a seed point, search for a neighboring point in its spatial neighborhood that satisfies the following conditions: the color distance between the neighboring point and the seed point is less than the color threshold, the plane curvature is less than the curvature threshold, and the angle between the normal vectors is less than the angle threshold. Neighboring points that meet the criteria are grouped into the same point cloud instance cluster and used as new seed points to continue growing until no new points are added; each point cloud instance cluster retains its associated BIM design dimension values.
6. The method for measuring the main frame of a building according to claim 1, characterized in that, The process of projecting each point cloud instance cluster onto the BEV space and performing image processing to extract boundary information to obtain a BEV processed image specifically involves: Each point cloud instance cluster is projected onto the BEV space to generate a BEV projection image. The BEV projection image is then processed sequentially with grayscale conversion, median filtering, and morphological dilation. Connectivity component analysis and pixel line edge extraction are performed on the BEV projection image corresponding to the wall point cloud group to generate a wall BEV processed image; The Suzuki-Abe contour extraction algorithm is used to determine the contour boundaries of the ceiling and the ground for the BEV projection image corresponding to the non-wall point cloud group, and the non-wall BEV processed image is generated.
7. The method for measuring the main frame of a building according to claim 6, characterized in that, The process of determining out-of-bounds point clouds and re-dividing them based on the BEV-processed image to obtain the optimal instance point cloud for each component specifically involves: For the BEV processed image of the wall, the pixel position of the cast-in-place location between the walls is obtained by calculating the intersection of the set of line segments. ,by Four orthogonal quadrant regions are defined around the center. By querying the pixel coordinates of the XY plane boundary point clouds of the current two sets of walls, the boundary point clouds are determined and reassigned to the other set of walls. For the non-wall BEV processed image, extract the contour boundary lines of each color category, and determine the position of the center pixel of the line. Define the upper and lower regions around the center, and determine the boundary point cloud by querying the pixel coordinates of the boundary point cloud of the YZ plane of the currently adjacent wall. Then, reassign the boundary point cloud to the adjacent ceiling or ground.
8. The method for measuring the main frame of a building according to claim 1, characterized in that, The dimensions are calculated using the minimum envelope box algorithm to determine the length and height of the optimal instance point cloud. Flatness calculation uses the RANSAC algorithm to fit the best plane, and calculates the standard deviation of the distance from the point cloud to the fitted plane as the flatness index. The formula for calculating the relative error ratio is: ;in, These are actual measured dimensions. The BIM design dimension values associated with the point cloud of the best instance.
9. A measuring device for the main frame of a building, characterized in that, include: The point cloud voxelization module is used to acquire point cloud data. It uses a voxel graph structure organized by a hash table to divide the point cloud data into spatial voxels. It uses the voxel index as a hash key to associate octree nodes to store the set of three-dimensional points in each voxel, thereby obtaining voxelized point cloud data. The component coarse classification module is used to calculate local planar features for each non-empty voxel in the voxelized point cloud data. The local planar features include flatness and normal vector. Based on the flatness, the orientation of the normal vector and the voxel center height, each non-empty voxel is classified into ceiling voxel, ground voxel, X-oriented wall voxel or Y-oriented wall voxel to obtain the component voxel set. The semantic attachment module is used to construct a semantic configuration file based on BIM drawings. It queries the BIM component information associated with the semantic configuration file according to the position attributes of each voxel in the component voxel set, attaches color values and BIM design dimension values to the three-dimensional points in each voxel, and obtains the semantic component point cloud. The point cloud preprocessing module is used to downsample and remove outliers from the semantic component point cloud, and group them into wall point cloud group and non-wall point cloud group according to color value; The instance segmentation module is used to segment the wall point cloud group and the non-wall point cloud group into point cloud instance clusters by using a color region growth algorithm with normal vector constraints, respectively. Each point cloud instance cluster is then projected into the BEV space and image processing is performed to extract boundary information to obtain a BEV processed image. The geometric parameter calculation module is used to determine the boundary point cloud based on the BEV processed image and re-divide it to obtain the best instance point cloud for each component. The module calculates the size and flatness of the best instance point cloud and compares it with the BIM design size value attached to the semantic component point cloud to generate an error report.
10. A measuring device for the main frame of a building, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program that can be executed by the processor to implement a method for measuring the main frame of a building as described in any one of claims 1 to 8.