Ceiling point cloud main body region extraction method, device and storage medium
Patent Information
- Application Number
- CN202611102992.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-20
AI Technical Summary
[0007]本申请的主要目的在于提供一种顶棚点云主体区域提取方法、设备及存储介质,旨在解决现有方向校正依赖外部定位定姿设备且主体提取依赖固定参数或人工操作,导致处理结果对外部传感误差与主观设定高度敏感、整体鲁棒性不足的技术问题
对原始顶棚点云构建有向包围盒,获取所述原始顶棚点云的三个主轴方向,将所述原始顶棚点云从设备采集坐标系转换至以所述有向包围盒中心为原点的坐标系;根据顶棚结构先验知识,对转换后的三个主轴方向进行人工轴映射和符号翻转,将所述原始顶棚点云转换至结构主方向坐标系,使所述原始顶棚点云的主轴方向与顶棚结构的高度方向和横向方向相对应;在所述结构主方向坐标系中,分别沿高度方向和横向方向对点云进行一维分箱统计,得到高度方向的一维点数分布和横向方向的一维点数分布;分别确定所述高度方向的一维点数分布的主峰位置和所述横向方向的一维点数分布的主峰位置;根据各方向的一维点数分布中的主峰位置和分箱计数,分别确定所述高度方向和所述横向方向对应的主体窗口,其中,所述高度方向的左右边界按照非对称的扩展约束条件确定,所述横向方向的左右边界按照对称的扩展约束条件确定;保留同时落入所述高度方向的主体窗口和所述横向方向的主体窗口内的点云,作为顶棚主体区域点云。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This application relates to the field of point cloud data processing technology, and in particular to a method, device and storage medium for extracting the main area of a ceiling point cloud. Background Technology
[0002] In the field of 3D spatial data acquisition, consumer-grade drones and lightweight mobile scanning systems are widely used due to their operational flexibility. However, limited by hardware costs, the accuracy of their onboard global navigation satellite systems and inertial measurement units is limited, and the positioning and attitude determination results fluctuate significantly in environments with signal obstruction or electromagnetic interference, resulting in considerable uncertainty in the spatial reference of the acquired point clouds.
[0003] During flight, airflow disturbances and vibrations cause continuous changes in the platform's pitch, roll, and yaw, resulting in relative rotation and translational misalignment between point clouds in different flight paths or sorties. Due to the lack of high-precision differential signals or fiber optic inertial navigation support, there is a generally systematic deviation between the overall horizontal plane inclination of the point cloud and the actual geographical direction, which changes dynamically with time and path, making it difficult to compensate uniformly through simple translation or a single rotation.
[0004] The perimeter of the main ceiling area often contains non-target structures such as walls, supporting columns, and suspended components. Conventional methods rely on manual selection or rigid cropping based on height and coordinate ranges, which is cumbersome and prone to significant variability in judgment. When dealing with complex buildings or batch projects, the efficiency bottlenecks and lack of adaptability are particularly prominent, making it difficult to meet the requirements of standardized and automated processes.
[0005] Clustering, planar fitting, and semantic segmentation methods are highly sensitive to point density, neighborhood parameters, training samples, and data quality, and often implicitly assume that the point cloud is correctly oriented. When the input data has tilt or rotational deviations, geometric feature extraction and judgment produce a chain of errors, and the accuracy of main region extraction decreases significantly. There is an urgent need for a direction-robust, lightweight, and low-intervention-requirement processing strategy.
[0006] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0007] The main purpose of this application is to provide a method, device and storage medium for extracting the main body region of a ceiling point cloud, which aims to solve the technical problems of existing orientation correction relying on external positioning and attitude determination equipment and main body extraction relying on fixed parameters or manual operation, resulting in the processing results being highly sensitive to external sensing errors and subjective settings, and lacking overall robustness.
[0008] To achieve the above objectives, this application proposes a method for extracting the main region of a ceiling point cloud, the method comprising: A directed bounding box is constructed on the original ceiling point cloud to obtain the three principal axis directions of the original ceiling point cloud, and the original ceiling point cloud is transformed from the device acquisition coordinate system to a coordinate system with the center of the directed bounding box as the origin. Based on prior knowledge of the ceiling structure, artificial axis mapping and sign flipping are performed on the three principal axis directions after conversion to transform the original ceiling point cloud to the structural principal direction coordinate system, so that the principal axis directions of the original ceiling point cloud correspond to the height direction and the lateral direction of the ceiling structure. In the main coordinate system of the structure, one-dimensional binning statistics are performed on the point cloud along the height direction and the lateral direction to obtain the one-dimensional point distribution in the height direction and the one-dimensional point distribution in the lateral direction. Determine the main peak positions of the one-dimensional point distribution in the height direction and the one-dimensional point distribution in the lateral direction, respectively. Based on the main peak position and bin count in the one-dimensional point distribution of each direction, the main window corresponding to the height direction and the lateral direction is determined respectively. The left and right boundaries of the height direction are determined according to the asymmetric extension constraint condition, and the left and right boundaries of the lateral direction are determined according to the symmetric extension constraint condition. The point cloud that falls within both the main window in the vertical direction and the main window in the horizontal direction is retained as the point cloud of the main area of the ceiling.
[0009] In one embodiment, before the step of constructing a directed bounding box on the original ceiling point cloud and obtaining the three principal axis directions of the original ceiling point cloud, the method further includes: The original canopy point cloud is preprocessed, including the removal of outlier noise points and uniform downsampling. Based on the local neighborhood density distribution of each point in the original ceiling point cloud, points with fewer than a preset neighborhood number threshold are identified as outlier noise points and removed. Voxel grid downsampling is performed on the point cloud after removing outlier noise points. The average coordinates of all points falling within the same voxel grid are used as the retained points of the voxel grid to reduce the point cloud density and preserve the overall geometry of the ceiling.
[0010] In one embodiment, the prior knowledge of the ceiling structure includes the correspondence between the height direction and the vertical direction of the ceiling, and the correspondence between the horizontal direction and the horizontal direction of the ceiling. The step of performing artificial axis mapping and sign flipping on the three principal axis directions after conversion based on the prior knowledge of the ceiling structure includes: The principal axis direction with the smallest angle to the vertical direction among the three principal axis directions is mapped to the height direction of the structural principal axis coordinate system, and the principal axis direction with the smallest angle to the horizontal direction among the three principal axis directions is mapped to the horizontal direction of the structural principal axis coordinate system. Based on the coordinate value distribution of the original ceiling point cloud in the height direction, determine whether the positive direction of the height direction points to the higher side of the ceiling; otherwise, flip the sign of the height direction. Based on the coordinate distribution of the original ceiling point cloud in the horizontal direction, determine whether the positive direction of the horizontal direction points to a preset horizontal reference direction; otherwise, flip the sign of the horizontal direction.
[0011] In one embodiment, the step of determining the main peak positions of the one-dimensional point distribution in the height direction and the one-dimensional point distribution in the lateral direction respectively includes: In the one-dimensional point distribution along the height direction, all box intervals are traversed, and the coordinate position corresponding to the box interval with the largest number of points is determined as the main peak position in the height direction and the lateral direction; When there are multiple maximum binning intervals with the same number of points in the one-dimensional point distribution in the height direction or the one-dimensional point distribution in the lateral direction, the average value of the center coordinates of the multiple maximum binning intervals with the same number of points is taken as the main peak position in the corresponding direction.
[0012] In one embodiment, the step of determining the main window corresponding to the height direction and the lateral direction based on the main peak position and bin count in the one-dimensional point distribution of each direction includes: Starting from the compartment where the main peak is located in the height direction, expand outwards in sections along the direction of decreasing height coordinate value, and compare the compartment count of the currently expanded compartment with the peak value of the main peak in the height direction. When the box count of two or more consecutive box intervals is lower than the product of the peak value of the main peak in the height direction and the first side expansion constraint threshold in the height direction, the expansion in the direction of decreasing coordinate value stops, and the box interval before the stopping position is taken as the boundary of the height direction on the side of decreasing coordinate value. Starting from the compartment where the main peak is located in the height direction, expand outwards in sections along the direction of increasing height coordinate value, and compare the compartment count of the currently expanded compartment with the peak value of the main peak in the height direction. When the box count of two or more consecutive box intervals is lower than the product of the peak value of the main peak in the height direction and the second side expansion constraint threshold in the height direction, the expansion in the direction of increasing coordinate value is stopped, and the box interval before the stop position is taken as the boundary of the height direction on the side of increasing coordinate value. The main window in the height direction is determined by the boundary on the side where the coordinate value decreases and the boundary on the side where the coordinate value increases.
[0013] In one embodiment, the step of determining the main window corresponding to the height direction and the lateral direction based on the main peak position and bin count in the one-dimensional point distribution of each direction includes: Taking the compartment where the main peak is located in the horizontal direction as the starting interval, the intervals are synchronously expanded outwards in the directions of decreasing and increasing horizontal coordinate values, respectively. The bin count of the currently expanded bin interval is compared with the product of the main peak value in the lateral direction and the expansion constraint threshold in the lateral direction. When the box count of multiple consecutive box intervals on a certain side is lower than the product, the side stops expanding, and the previous box interval at the stopping position is taken as the boundary of the lateral direction on that side. When both sides stop expanding, the main window in the horizontal direction is determined.
[0014] In one embodiment, after the step of retaining the point cloud that simultaneously falls within the main window in the vertical direction and the main window in the horizontal direction as the point cloud of the main area of the ceiling, the method further includes: Perform connectivity analysis on the point cloud of the main area of the ceiling, and extract the connected component with the largest area in the point cloud of the main area of the ceiling as the final main area of the ceiling; Based on the spatial adjacency relationship of points within each connected component, points whose distance to each other is less than a preset adjacency distance threshold are grouped into the same connected component. Calculate the number of points contained in each connected region, determine the connected region with the most points as the final main area of the ceiling, and remove the points in the remaining connected regions.
[0015] In one embodiment, the original ceiling point cloud is any one of airborne lidar point cloud, photogrammetric point cloud, ground-based mobile scanning point cloud, or fused point cloud. When the original ceiling point cloud contains color information or reflection intensity information, before the step of performing one-dimensional binning statistics on the point cloud along the height and lateral directions in the principal coordinate system of the structure, the method further includes: The point cloud is pre-screened based on the color information or the reflection intensity information, and points whose color value or reflection intensity value does not meet the ceiling material feature threshold are pre-removed. After the step of retaining the point cloud that simultaneously falls within the main window in the vertical direction and the main window in the horizontal direction as the point cloud of the main area of the ceiling, the method further includes: The color information or the reflection intensity information is used as auxiliary verification information to remove points in the extraction results whose color value or reflection intensity value deviates from the ceiling material feature threshold.
[0016] In addition, to achieve the above objectives, this application also proposes a ceiling point cloud main region extraction device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the ceiling point cloud main region extraction method as described above.
[0017] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the ceiling point cloud main region extraction method described above.
[0018] One or more technical solutions proposed in this application have at least the following technical effects: A directed bounding box is constructed from the original ceiling point cloud to obtain its three principal axis directions. The original ceiling point cloud is then transformed from the device acquisition coordinate system to a coordinate system with the center of the directed bounding box as the origin. Based on prior knowledge of the ceiling structure, manual axis mapping and sign flipping are performed on the transformed three principal axis directions to transform the original ceiling point cloud into the structural principal direction coordinate system, so that the principal axis directions of the original ceiling point cloud correspond to the height and lateral directions of the ceiling structure. In the structural principal direction coordinate system, one-dimensional binning statistics are performed on the point cloud along the height and lateral directions respectively to obtain the one-dimensional height direction. The point cloud is divided into a point distribution and a one-dimensional point distribution in the horizontal direction. The main peak positions of the one-dimensional point distribution in the vertical direction and the one-dimensional point distribution in the horizontal direction are determined respectively. Based on the main peak positions and bin counts in the one-dimensional point distribution in each direction, the main windows corresponding to the vertical direction and the horizontal direction are determined respectively. The left and right boundaries of the vertical direction are determined according to the asymmetric expansion constraint conditions, and the left and right boundaries of the horizontal direction are determined according to the symmetric expansion constraint conditions. The point clouds that fall into both the main windows in the vertical direction and the main windows in the horizontal direction are retained as the point clouds of the main area of the ceiling.
[0019] The technical solution of this application achieves adaptive orientation correction and boundary scene-driven extraction without the need for external sensors and manual parameters. It solves the technical problems of uncontrollable error and parameter disconnection under the open-loop paradigm, and realizes the technical leap from external dependence to data autonomy and from fixed rules to scene adaptation. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart illustrating the first embodiment of the ceiling point cloud main area extraction method of this application; Figure 2 This is a detailed process diagram based on step S20 in the first embodiment; Figure 3 This is a detailed schematic diagram of step S40 in the first embodiment; Figure 4 This is a detailed process diagram based on step S50 in the first embodiment; Figure 5 This is a schematic diagram of another detailed process based on step S50 in the first embodiment; Figure 6 This is a flowchart illustrating the second embodiment of the ceiling point cloud main area extraction method of the present invention; Figure 7 This is a flowchart illustrating the third embodiment of the ceiling point cloud main area extraction method of the present invention; Figure 8 This is a schematic diagram of point cloud preprocessing and orientation correction. Figure 9 A schematic diagram of the main area of the ceiling is extracted; Figure 10 This is a schematic diagram of the hardware operating environment involved in the method for extracting the main area of the ceiling point cloud in this embodiment of the application.
[0023] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0024] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0025] In the field of point cloud data processing, orientation correction relies on external positioning and attitude determination equipment, while subject extraction uses fixed parameters or manual cropping. These solutions directly read the sensor attitude angles, perform rotational transformations, and then crop the target area according to a preset height or coordinate range. Under ideal conditions, the process is intuitive and easy to operate, but it is essentially an open-loop dependent paradigm that neither utilizes the point cloud's own distribution characteristics nor establishes an adaptive relationship between the boundary and the real scene. External sensors are affected by occlusion and noise, leading to systematic biases in attitude calculations; fixed parameters and manual operation rely on subjective experience, failing to perceive the distribution differences of different building structures and lacking dynamic adjustment capabilities. Sensor angle errors directly distort geometric feature extraction, and preset thresholds inevitably lead to over- or under-cropping of the subject, introducing data loss or redundancy into subsequent processing.
[0026] The core dilemma of the above approach is that the processing method based on external sensing and fixed parameters is fundamentally contradictory to the inherent requirements of point cloud processing for spatial consistency and extraction completeness, and cannot autonomously compensate for data deviations and structural differences.
[0027] To address this deficiency, this application proposes a method for autonomous orientation correction and main body region extraction from point clouds. The method estimates the principal orientation based on the eigenvectors of the point cloud's own covariance matrix, and completes overall correction through the rotation relationship between the eigenvectors and the reference axis. Subsequently, it projects and statistically analyzes point density along the vertical direction in layers, identifies density abrupt change locations as candidate boundary thresholds, and uses outlier filtering to eliminate noise interference, automatically determining the effective spatial range of the main body. Specifically, this includes: constructing a three-dimensional covariance matrix and calculating eigenvectors; using the direction corresponding to the largest eigenvalue as the principal axis and rotating it for alignment; then analyzing the vertical projection distribution and automatically extracting the ceiling region based on the density curve.
[0028] Through the above methods, this application achieves adaptive orientation correction and boundary scene-driven extraction without the need for external sensors and manual parameters, solving the technical problems of uncontrollable errors and parameter disconnection under the open-loop paradigm, and realizing a technical leap from external dependence to data autonomy, and from fixed rules to scene adaptation.
[0029] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0030] Based on this, embodiments of this application provide a method for extracting the main region of a ceiling point cloud, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the ceiling point cloud main region extraction method of this application. In this embodiment, the ceiling point cloud main region extraction method includes steps S10~S60: Step S10: Construct a directed bounding box for the original ceiling point cloud, obtain the three principal axis directions of the original ceiling point cloud, and transform the original ceiling point cloud from the device acquisition coordinate system to a coordinate system with the center of the directed bounding box as the origin. Constructing a directed bounding box and performing coordinate system transformation on the original ceiling point cloud is a fundamental step in the entire orientation correction and main body region extraction method. The core purpose of this step is to obtain the principal axis of the point cloud in three-dimensional space through directed bounding box analysis, thereby transforming the original point cloud from the device acquisition coordinate system to a standardized coordinate system with the center of the bounding box as the origin, laying a spatial reference for subsequent orientation unification and main body extraction.
[0031] In practical applications, the initial step is to acquire raw ceiling point cloud data using a 3D laser scanning device or photogrammetry system. This raw point cloud data uses the device's acquisition coordinate system as the spatial reference, with its origin typically located at the device's own position. The directions of the three coordinate axes are determined by the device's attitude at the time of acquisition. Due to the continuous changes in attitude caused by airflow disturbances and motor vibrations during flight, point clouds acquired from different sorties, or even different flight paths within the same sortie, exhibit different spatial orientations in the device's acquisition coordinate system. The construction process of the directed bounding box is as follows: Principal component analysis is performed on all points in the raw ceiling point cloud to calculate the 3D covariance matrix. This covariance matrix reflects the dispersion of the point cloud distribution in various directions within 3D space. Eigenvalue decomposition is then performed on the covariance matrix to obtain three eigenvalues and their corresponding eigenvectors. These three eigenvectors are orthogonal to each other, constituting the three principal directions of the point cloud in 3D space. The eigenvector corresponding to the largest eigenvalue indicates the direction where the point cloud distribution is most concentrated, while the eigenvectors corresponding to the second largest and smallest eigenvalues indicate the secondary principal and minimum dispersion directions of the point cloud distribution, respectively. Using these three eigenvectors as the three principal axes of the directed bounding box, and the geometric center of all points in the point cloud as the center point of the bounding box, a minimal directed bounding box enclosing the original ceiling point cloud is constructed. The three principal axes of this bounding box actually reflect the main extension and normal directions of the ceiling structure in space. However, since principal component analysis itself is based solely on data distribution statistics, the order and positive / negative directions of the three eigenvectors are arbitrary. Therefore, the principal axes obtained at this point cannot directly correspond to the height or lateral direction of the ceiling structure.
[0032] After obtaining the three principal axes and the center of the bounding box, a coordinate transformation operation is performed. Let p be any point in the original point cloud, and let the three unit principal axis vectors of the bounding box form a rotation matrix B, where the three unit principal axes are respectively... , , If the center of the bounding box is o, then the coordinates p′ of the point in the new coordinate system are calculated using the following formula: ; Where p is the 3D coordinate vector of any point in the original point cloud in the device's acquisition coordinate system; o is the coordinate vector of the center point of the directed bounding box, i.e., the geometric center of all points in the original point cloud; B is a 3×3 rotation matrix composed of the three principal axis direction vectors of the directed bounding box, and its column vectors are as follows: , , The matrix is composed of three unit principal axes. ; Let p' be the transpose of matrix B; p' is the 3D coordinate vector of the point in the new coordinate system after coordinate transformation. The geometric meaning of this transformation is: first, the point cloud is translated to a coordinate system with the bounding box center as the origin; then, a rotation matrix is used to map the basis vectors of the point cloud from the device's acquisition coordinate system to the basis vectors defined by the principal axes of the directed bounding box. After this transformation, all points in the original point cloud have the bounding box center as the origin and the three principal axes of the directed bounding box as the coordinate axes, forming a normalized coordinate system aligned with the spatial distribution characteristics of the original point cloud itself. This transformation does not rely on information provided by any external positioning and attitude determination equipment; it is entirely based on the spatial distribution statistical characteristics of the point cloud data itself. In practical implementation, if the amount of original point cloud data is large, the point cloud can be appropriately downsampled to reduce the computational load of covariance matrix calculation. However, during downsampling, the overall spatial distribution shape of the point cloud must remain unchanged to ensure the accuracy of the principal direction analysis. The original point cloud has been transformed into a coordinate system with the center of the directed bounding box as the origin and the three main directions as coordinate axes. This coordinate system eliminates the spatial position offset of the original point cloud caused by different device acquisition postures. However, the correspondence between the three coordinate axes and the actual height and lateral directions of the ceiling structure has not yet been established. This correspondence will be achieved in subsequent steps through manual axis mapping and symbol flipping.
[0033] Step S20: Based on prior knowledge of the ceiling structure, perform artificial axis mapping and sign flipping on the three principal axis directions after conversion, and convert the original ceiling point cloud to the structural principal direction coordinate system so that the principal axis directions of the original ceiling point cloud correspond to the height direction and the lateral direction of the ceiling structure. After completing the coordinate transformation based on the directed bounding box, the point cloud has been placed in a coordinate system with the center of the bounding box as the origin and the three principal directions as coordinate axes. However, the correspondence between the three coordinate axes and the actual height and lateral directions of the ceiling structure is still unclear. The core objective is to perform artificial axis mapping and sign flipping on the three principal axes after transformation, based on prior knowledge of the ceiling structure, to further transform the point cloud from the established standard coordinate system to the structural principal direction coordinate system, so that the principal axes of the point cloud correctly correspond to the height and lateral directions of the ceiling structure.
[0034] While the three eigenvectors obtained from principal component analysis represent the three principal discrete directions of the point cloud in 3D space, their order is based on the eigenvalues from largest to smallest. However, the order of eigenvalues has no necessary connection to the geometric semantics of the ceiling structure. For example, for large-scale ceiling structures, the distribution range of the point cloud in the horizontal direction may be much larger than its thickness in the vertical direction. In this case, the direction corresponding to the largest eigenvalue may be the horizontal direction rather than the vertical direction. Conversely, if the ceiling area includes tall parapet walls or auxiliary structures, the distribution range in the vertical direction may also increase, changing the order of eigenvalues corresponding to the vertical direction. Furthermore, the sign of the eigenvectors is arbitrary; that is, each eigenvector, when reversed, remains a valid eigenvector corresponding to its eigenvalue. This means that the positive directions of the three coordinate axes may point in directions completely opposite to the prior knowledge of the scene. Therefore, relying solely on the mathematical results of principal component analysis cannot directly yield a principal direction coordinate system consistent with the semantics of the ceiling structure.
[0035] To address the aforementioned issues, this step introduces an artificial axis mapping and sign reversal mechanism based on prior structural knowledge. The core logic of this mechanism is to utilize the inherent geometric features of the ceiling structure in space as a basis for judgment, establishing a mapping relationship between the three principal axes of the directed bounding box and the height and lateral directions of the ceiling structure, and correcting the signs of each axis. In specific implementation, the expected representation of the height direction in the coordinate system is first determined based on prior knowledge of the ceiling structure. The ceiling structure typically has a relatively concentrated distribution range in the height direction, with a thickness generally not exceeding a few meters, while the ceiling extends extensively in the horizontal direction. Therefore, the projection span or variance of the point cloud along each principal axis direction can be used to assist in the judgment: the principal axis corresponding to the height direction usually has a smaller projection span, while the principal axis corresponding to the lateral direction usually has a larger projection span. Based on this judgment logic, the operator can determine which of the three principal axes corresponds to the height direction, which corresponds to the lateral direction, and the remaining axis corresponds to the longitudinal extension direction of the ceiling, thus completing the axis mapping, that is, assigning specific geometric semantic labels to the three abstract principal axis directions. After axis mapping is completed, the signs of each axis are further reversed for correction. Taking the height direction as an example, the height coordinates of the ceiling structure should generally be positive or within a specific range. If the direction of the current principal axis in the height direction causes the height coordinates of the ceiling point cloud to be negative or contradicts common sense about the scene, then the sign of that axis is reversed, that is, all coordinate values of that axis are inverted. The sign reversal in the horizontal direction is also determined based on the actual distribution of the point cloud in the horizontal direction, so that the coordinate distribution of the main body of the ceiling in the horizontal direction is within a reasonable positive and negative range.
[0036] After the aforementioned manual axis mapping and symbol flipping operations, the original point cloud is ultimately transformed from a standard coordinate system with the principal axes of the directed bounding box as coordinate axes to a structural principal direction coordinate system. In this coordinate system, the three coordinate axes clearly correspond to the height, lateral, and longitudinal directions of the roof structure, and the positive directions of each axis are consistent with the scene priors. Point clouds collected from different sorties and flight attitudes are all unified into the same structural principal direction coordinate system after processing in steps S10 and S20, eliminating the problem of relative rotation and orientation inconsistencies between point clouds in the original equipment acquisition coordinate system. Although the manual axis mapping and symbol flipping mechanism introduced in this step introduces manual judgment at the operational level, this judgment is based on the geometric priors generally present in the roof structure, with concentrated distribution in the height direction and extended distribution in the lateral direction, possessing strong universality, and can be applied to the batch processing of all acquired data in that scene after one scene calibration. Based on the above, see Figure 8 , Figure 8 This is a schematic diagram of point cloud preprocessing and orientation correction.
[0037] Step S30: In the main coordinate system of the structure, perform one-dimensional binning statistics on the point cloud along the height direction and the lateral direction respectively to obtain the one-dimensional point distribution in the height direction and the one-dimensional point distribution in the lateral direction. After completing orientation correction and unifying the point cloud to the structural principal direction coordinate system, the core purpose of this step is to perform one-dimensional binning statistics on the point cloud along the height and lateral directions respectively, in order to obtain the spatial distribution characteristics of the point cloud in these two directions, providing a data foundation for the subsequent determination of the main window. The essence of one-dimensional binning statistics is to discretize the continuous spatial coordinates into a series of equally spaced intervals, and to reveal the density distribution pattern of the point cloud in a certain direction by counting the number of points falling into each interval.
[0038] In the principal coordinate system of the structure, the height direction corresponds to the z-axis, and the lateral direction corresponds to the y-axis. After orientation correction, one-dimensional binning statistics are performed on the point cloud along the z and y directions to obtain the point distribution in the corresponding directions. Let the statistical peak value in a certain direction be... Then, starting from the main peak, the expansion extends to the left and right sides respectively. When the count of the sub-boxes on one side drops to a certain proportion of the peak value, the expansion stops, thus obtaining the main peak window in that direction.
[0039] coordinate values in any direction , with step size If we perform box-by-box statistics, then the first... The number of points in the interval is: ; in, This represents the number of point clouds within the k-th bin interval, i.e., the number of points falling into that bin. To represent the number of elements in the set, i.e., the counting operation (counting the total number of points that meet the conditions); i is the index of any point in the point cloud, used to traverse all points in the point cloud; This represents the coordinates of the i-th point in that direction (e.g., the z-coordinate or y-coordinate). It is the minimum value of the coordinates of all points in this direction (i.e., the lower bound of the coordinate distribution in this direction); A non-negative integer representing the serial number of the box (starting from 0); The preset box division step size is the equal spacing width of each box division interval.
[0040] After performing the above binning statistical operations along the height and lateral directions respectively, two one-dimensional point distribution sequences were obtained. The one-dimensional point distribution along the height direction reflects the aggregation characteristics of the point cloud in the vertical direction: the main area of the ceiling usually presents a distinct main peak in the height direction, which corresponds to the main height layer of the ceiling panel; above the main peak, there may be a small amount of point cloud generated by local protruding structures or noise, while below the main peak, there may be point clouds of non-target structures such as walls and supporting columns mixed in. The one-dimensional point distribution along the lateral direction reflects the extension range of the ceiling in the horizontal direction: the main body of the ceiling presents a large-scale continuous distribution in the lateral direction, forming a broad main peak area; the point count on both sides of the main peak gradually decreases, corresponding to non-target areas outside the ceiling boundary.
[0041] In practical implementation, binning statistics need to consider the scale of the point cloud data. For large-scale scene data containing millions or even tens of millions of point clouds, the computational cost of traversing all points for binning statistics is significant. The following optimization strategy can be adopted: first, construct a spatial index for the point cloud, such as a kd-tree or octree index, and then quickly obtain the coordinate distribution range in each direction using the index and perform binning counting. Furthermore, outlier filtering preprocessing can be performed on the point cloud before statistics to remove isolated noise points that are significantly deviated from the main spatial area, thereby reducing the interference of noise on the binning distribution. Two one-dimensional point distribution sequences in the height and lateral directions are obtained. These two distribution sequences directly reflect the spatial aggregation location and range of the main ceiling area in these two directions, forming the data basis for subsequent main peak location and main window determination. It is worth noting that the one-dimensional binning statistics method used does not rely on any external reference information or manually set spatial ranges; its statistical results are entirely determined by the distribution of the point cloud data itself, thus exhibiting good scene adaptability.
[0042] Step S40: Determine the main peak positions of the one-dimensional point distribution in the height direction and the one-dimensional point distribution in the lateral direction, respectively; After obtaining the one-dimensional point distribution in the height and lateral directions, the core objective of this step is to accurately locate the main peak position from the point distribution in each direction, that is, to find the spatial location where the point cloud is most concentrated in that direction. The main peak position is the starting reference point for subsequent main body window expansion, and its accuracy directly affects the final extraction accuracy of the main body region.
[0043] The basic logic of peak localization lies in finding the coordinate position corresponding to the bin with the largest count in a one-dimensional point distribution sequence. This position represents the spatial region where the point cloud is most densely distributed in that direction. For ceiling point clouds, the peak in the height direction usually corresponds to the main elevation layer of the ceiling panel, where most of the points in the main ceiling area are concentrated; the peak in the horizontal direction corresponds to the center position of the main ceiling structure in the horizontal direction, where the ceiling point clouds on both sides are symmetrically or approximately symmetrically distributed. In actual one-dimensional point distribution sequences, due to factors such as uneven point cloud sampling, local structural gaps, or noise interference, the point distribution is not an ideal smooth single-peak curve and may have local fluctuations or secondary peaks. Therefore, directly taking the globally largest count bin as the peak position may be affected by local noise peaks, leading to peak localization deviation.
[0044] To improve the robustness of main peak localization, the one-dimensional point distribution sequence can be pre-processed with smoothing during implementation. Smoothing can be achieved using methods such as sliding window averaging or Gaussian filtering to eliminate high-frequency noise and local spikes in the distribution curve, making the main peak shape clearer and more identifiable. On the smoothed distribution sequence, the coordinate position corresponding to the global maximum count bin is the main peak position in that direction. If multiple peaks with similar amplitudes exist in the distribution sequence, prior knowledge of the ceiling structure is needed for auxiliary identification: in the height direction, the main body of the ceiling usually corresponds to the main peak distributed in the lower height range, while higher secondary peaks may correspond to parapet walls or auxiliary structures; in the lateral direction, the main peak located in the distribution center area is the lateral center position of the main body of the ceiling, while peaks far from the center may correspond to non-target structures.
[0045] For a one-dimensional point distribution in the height direction, determining the location of the main peak requires consideration of the actual physical characteristics of the roof structure. The roof panels have a certain thickness, composed of multiple layers including structural, insulation, and waterproofing layers, which manifest as a narrow band in the height direction in the point cloud. Therefore, the main peak in the height direction actually corresponds to the location with the densest point count within this narrow band, i.e., the core elevation layer of the roof panel. After locating the main peak, this location can be used as the starting point for subsequent expansion of the height direction window. For a one-dimensional point distribution in the lateral direction, the main roof structure typically exhibits a large-scale continuous distribution laterally, with the main peak location corresponding to the location of the roof's lateral centerline. Since the roof structure usually has good symmetry laterally, the point count decay patterns on both sides of the main peak are also basically symmetrical.
[0046] In practice, the location of the main peak can be determined as follows: First, determine the global maximum count value and its corresponding bin index in the binning sequence. Then, use the center coordinates of that bin as the initial location of the main peak. To further improve positioning accuracy, sub-binning level precise positioning can be performed within the range of the maximum bin and its adjacent bins. For example, parabolic fitting can be performed on the counts of the maximum bin and one bin to its left and right, and the vertex of the fitted curve can be used as the precise location of the main peak. This refinement process can, to some extent, eliminate the discretization error caused by the binning step size, making the location of the main peak more accurately reflect the actual aggregation center of the point cloud.
[0047] Step S50: Based on the main peak position and bin count in the one-dimensional point distribution of each direction, determine the main window corresponding to the height direction and the lateral direction respectively, wherein the left and right boundaries of the height direction are determined according to the asymmetric extension constraint condition, and the left and right boundaries of the lateral direction are determined according to the symmetric extension constraint condition. After determining the positions of the main peaks in the vertical and horizontal directions, the core objective of this step is to expand outwards from the main peak positions based on the one-dimensional point distribution in each direction, thereby determining the corresponding main window ranges in the vertical and horizontal directions. The key technical approach in this step is that the left and right boundaries in the vertical direction are determined according to asymmetric expansion constraints to accommodate the asymmetric characteristics of the point cloud distribution on the upper and lower sides of the ceiling; the left and right boundaries in the horizontal direction are determined according to symmetrical expansion constraints to accommodate the symmetrical characteristics of the horizontal distribution of the ceiling.
[0048] The basic logic of the main window expansion is as follows: starting from the compartment where the main peak is located, expand compartment by compartment towards both the decreasing and increasing coordinate values until a compartment that meets the stopping condition is encountered. The coordinate range covered by all compartments before that compartment is taken as the main window in that direction. The core criterion for stopping is the ratio of the compartment count to the main peak value: when the count of a compartment falls below a preset stopping threshold during the expansion process, further expansion in that direction is stopped. The basic principle of this expansion strategy is that the main area of the ceiling has a high point density in spatial distribution, forming a main peak in the point distribution; while the non-target structures or blank areas outside the boundary of the main area have a significantly lower point density, manifested as a sharp drop in the compartment count relative to the main peak value. By monitoring the change in the compartment count relative to the main peak value, the boundary position of the main area can be automatically identified.
[0049] For the height direction, an asymmetric expansion constraint is adopted. This design is based on the fact that the upper and lower sides of the ceiling structure have different physical meanings and point cloud distribution characteristics in the height direction. The left side of the height direction corresponds to the lower side of the ceiling, which is usually connected to non-target structures such as walls, supporting columns, and floor slabs. The point cloud distribution of these structures is relatively dispersed and numerous in the height direction, resulting in a slower point count decay rate. If the same stopping threshold as the right side is used, it is easy to include non-target structures such as walls in the main window, resulting in an excessively wide lower boundary. Therefore, a relatively high stopping threshold is adopted for the left side of the height direction, for example, setting the stopping threshold to 0.6, so that the expansion stops when the bin count drops to 60% of the peak value, thereby tightening the lower boundary and effectively excluding non-target structures such as walls and supporting surfaces. The right side of the height direction corresponds to the higher side of the ceiling. This side is affected by factors such as sparse sampling, changes in structural thickness, changes in incident angle, and local occlusion. The point cloud density of the upper part of the ceiling is inherently low, and the point count decays faster. Using a high stopping threshold can easily lead to premature termination of expansion, resulting in the incorrect exclusion of a large number of upper points that still belong to the main body of the ceiling. Therefore, a relatively low stopping threshold is used for the right side in the height direction, for example, setting the stopping threshold to 0.3, so that expansion stops only when the bin count drops to 30% of the main peak value, thereby widening the upper boundary and retaining sparsely sampled or partially occluded upper points of the ceiling.
[0050] For the lateral direction, symmetrical expansion constraints are adopted. This design is based on the fact that the distribution of the main structure of the ceiling in the horizontal direction typically exhibits good symmetry, with both sides of the main area being continuous extensions of the ceiling structure, and the point cloud distribution characteristics on both sides being basically consistent. There are no special cases like the lower wall connection in the vertical direction on either side of the lateral direction; therefore, the same stopping threshold can be used on both sides. In actual implementation, the stopping threshold in the lateral direction can be set to 0.4, meaning that expansion stops when the bin count drops to 40% of the main peak value. This value maintains the integrity of the lateral main area, avoiding the introduction of non-target points due to an excessively wide window caused by a threshold that is too low, while also controlling the expansion range, avoiding the omission of points near the main boundary due to an excessively narrow window caused by a threshold that is too high.
[0051] In practice, the stopping condition for the expansion process can also be determined by combining the counting gradients of adjacent sub-boxes. For example, the main boundary is only confirmed when the counts of multiple consecutive sub-boxes are all below the stopping threshold, in order to avoid premature cessation of expansion due to accidental fluctuations in individual sub-boxes. After the expansion operation, a main window in the height direction and a main window in the lateral direction are obtained. These two windows together define the spatial range of the main roof area in the main structural coordinate system.
[0052] Step S60: Retain the point cloud that falls within both the main window in the height direction and the main window in the horizontal direction, as the point cloud of the main area of the ceiling.
[0053] After determining the main windows in the height and lateral directions, the core objective is to perform spatial filtering on the point cloud based on these two windows, retaining the point cloud that falls within both the height and lateral main windows as the final extracted point cloud of the main ceiling area.
[0054] For each point in the point cloud after orientation correction, obtain its height coordinate (z) and lateral coordinate (y) in the main structural coordinate system. Determine if the point simultaneously meets two conditions: first, the z-coordinate falls within the height window [z_left, z_right], i.e., z_left ≤ z ≤ z_right; second, the y-coordinate falls within the lateral window [y_left, y_right], i.e., y_left ≤ y ≤ y_right. If both conditions are met, the point is considered part of the main ceiling area and retained; if either condition is not met, the point is considered part of a non-target structure or background noise and discarded.
[0055] The geometric meaning of this screening strategy is as follows: the main area of the ceiling is represented in the structural principal direction coordinate system as the intersection of two-dimensional windows in the height and lateral directions. The height window defines the effective thickness range of the ceiling in the vertical direction, from the lower surface to the upper surface of the ceiling; the lateral window defines the effective extension range of the ceiling in the horizontal direction, from the left and right boundaries of the main ceiling area. The intersection of the two windows is the projection range of the main ceiling area on the height-lateral two-dimensional plane. The vertical direction is not involved in the screening in this step because the main ceiling area usually has a long continuous extension in the vertical direction, and the boundary in this direction is often less clear than in the height and lateral directions. The constraints of the height and lateral dimensions are sufficient to effectively separate the main ceiling area from non-target structures.
[0056] After the above spatial filtering, points in the original point cloud that fall outside the main ceiling area, including wall points, supporting column points, and floor slab points located below the ceiling, parapet walls or auxiliary structures located above the ceiling, and non-target structures located on both sides of the ceiling, are effectively removed. The remaining point cloud is the main ceiling area point cloud, which, while maintaining spatial orientation consistency, further achieves a clean separation between the main area and the background structure. In practice, this filtering operation can be implemented by traversing all points in the point cloud and performing coordinate comparisons, with a computational complexity of O(N), where N is the total number of points in the point cloud, demonstrating high computational efficiency. For large-scale point cloud data, spatial indexing or parallel computing techniques can be used to accelerate the filtering process. (See attached image for more details.) Figure 9 , Figure 9 This is a schematic diagram of the main area of the ceiling.
[0057] The entire point cloud orientation correction and main area extraction process is now complete. The output is point cloud data unified to the structural principal orientation coordinate system and containing only the main area of the ceiling. This output point cloud can be directly used for subsequent engineering applications such as ceiling structure modeling, deformation analysis, and dimensional measurement.
[0058] Furthermore, based on the content of the first embodiment above, the original ceiling point cloud is any one of airborne lidar point cloud, photogrammetric point cloud, ground-based mobile scanning point cloud, or fused point cloud. When the original ceiling point cloud contains color information or reflection intensity information, before the step of performing one-dimensional binning statistics on the point cloud along the height and lateral directions in the principal coordinate system of the structure, the method further includes: The point cloud is pre-screened based on the color information or the reflection intensity information, and points whose color value or reflection intensity value does not meet the ceiling material feature threshold are pre-removed. After the step of retaining the point cloud that simultaneously falls within the main window in the vertical direction and the main window in the horizontal direction as the point cloud of the main area of the ceiling, the method further includes: The color information or the reflection intensity information is used as auxiliary verification information to remove points in the extraction results whose color value or reflection intensity value deviates from the ceiling material feature threshold.
[0059] Based on the orientation correction and one-dimensional binning statistical subject extraction framework established in the foregoing embodiments, this dependent claim further introduces point cloud data type extension and auxiliary screening and verification mechanisms based on color information or reflection intensity information, aiming to improve the method's adaptability to different data sources and the purity of subject region extraction.
[0060] The objects processed in the aforementioned steps are the raw ceiling point clouds, which can be obtained from various acquisition methods. Airborne lidar point clouds are generated by actively detecting the ceiling structure from the air using a laser scanning system, directly obtaining high-precision three-dimensional spatial coordinates. Some systems also record the reflection intensity information of the laser echo. Photogrammetric point clouds are generated through dense matching of multi-view images. Their advantage lies in naturally including red, green, and blue color information, but the accuracy of the point cloud is greatly affected by image resolution, lighting conditions, and matching algorithms. Ground-based mobile scanning point clouds are acquired by vehicle-mounted or backpack mobile scanning systems and are suitable for acquiring ceiling structure data from near-ground perspectives. Their point density is usually high and can simultaneously contain color and reflection intensity information. Fuded point clouds are the result of spatial registration and information fusion of point cloud data from the above multiple sources, taking into account multi-dimensional information such as geometric accuracy, color texture, and reflection characteristics. When the original ceiling point cloud originates from any of the above acquisition methods and contains color information or reflection intensity information, the aforementioned one-dimensional binning statistical subject extraction process can be supplemented with processing steps based on these auxiliary information to further improve the extraction quality.
[0061] Before performing one-dimensional binning statistics along the height and lateral directions, the point cloud is first pre-screened based on color or reflectance intensity information. The core logic of this pre-screening is that roof structures are usually made of specific materials, which have relatively stable characteristic distribution ranges in color space or reflectance intensity space. For example, concrete roofs typically exhibit grayish-white to light gray tones in the red-green-blue color space, with the values of their red, green, and blue channels falling within a specific range; metal roofs usually have higher reflectance values, while wood or plastic materials have relatively lower reflectance values. Through pre-statistical analysis or experimental calibration, the characteristic threshold of the roof material in the color space or reflectance intensity space can be determined. Based on this threshold, each point in the point cloud is judged: if the color value or reflectance intensity value of the point falls within the characteristic threshold range of the roof material, the point is retained for subsequent binning statistics; if the color value or reflectance intensity value of the point deviates significantly from the threshold range, the point is determined to belong to a non-roof material target, such as vegetation, rusted areas, graffiti, or foreign object occlusion, and the point is pre-removed. This pre-screening operation is performed before binning statistics, which can effectively reduce the interference of non-ceiling material point clouds on the one-dimensional point distribution, making the main peak shape clearer and the main window more accurately determined.
[0062] After filtering the point clouds that fall within both the vertical and horizontal main windows, color information or reflection intensity information is used as auxiliary verification information to further verify and refine the extraction results. The core logic of this secondary verification is that the point cloud retained after geometric window filtering is spatially limited to the main ceiling area, but this area may still contain local anomalies that do not match the ceiling material characteristics. For example, auxiliary facilities such as lights, vents, and pipe supports installed on the ceiling surface, although spatially located within the main ceiling area, have significantly different materials from the main ceiling material. By using color information or reflection intensity information as auxiliary verification methods, a material consistency check is performed on each point in the extraction results: if the color value or reflection intensity value of the point falls within the ceiling material characteristic threshold range, the point is confirmed to belong to the main ceiling and is ultimately retained; if the color value or reflection intensity value of the point deviates from the ceiling material characteristic threshold, the point is determined to belong to a non-ceiling material accessory within the main ceiling area and is removed from the extraction results. This secondary elimination operation can further purify the extraction results based on geometric screening, so that the final output point cloud of the main area of the ceiling is consistent with the main body of the ceiling in both spatial range and material properties.
[0063] The aforementioned pre-screening and secondary verification stages form a dual-protection mechanism based on color or reflectance intensity information. Pre-screening, before binning and statistical analysis, reduces interference from non-target materials at the source, ensuring the accuracy of main peak location and window determination. Secondary verification, after geometric screening, refines the extraction results for material consistency, eliminating outliers with correct spatial locations but inconsistent material properties. These two stages work together to improve the purity and reliability of the extracted main area. In specific implementation, the ceiling material feature threshold can be set in the following ways: manually selecting a small number of typical ceiling material points from the original point cloud as training samples, statistically analyzing the mean and standard deviation of these samples in the color space or reflectance intensity space, and using the mean plus or minus a certain number of standard deviations as the range of the feature threshold; alternatively, an automated method can be used, automatically identifying the main distribution interval as the feature threshold through statistical analysis of the global distribution of color or reflectance intensity values. The above threshold setting methods can be flexibly selected according to the actual data quality and scene complexity.
[0064] Furthermore, you can also view Figure 2 , Figure 2 This is a detailed process diagram based on step S20 in the first embodiment. Figure 2 The prior knowledge of the ceiling structure includes the correspondence between the height direction and the vertical direction of the ceiling, and the correspondence between the horizontal direction and the horizontal direction of the ceiling. The steps of manually mapping and reversing the three principal axis directions after conversion based on the prior knowledge of the ceiling structure include S21~S23: Step S21: Map the principal axis direction with the smallest angle to the vertical direction among the three principal axis directions to the height direction of the structural principal axis coordinate system, and map the principal axis direction with the smallest angle to the horizontal direction among the three principal axis directions to the horizontal direction of the structural principal axis coordinate system. Step S22: Based on the coordinate value distribution of the original ceiling point cloud in the height direction, determine whether the positive direction of the height direction points to the higher side of the ceiling; otherwise, flip the sign of the height direction. Step S23: Based on the coordinate value distribution of the original ceiling point cloud in the horizontal direction, determine whether the positive direction of the horizontal direction points to a preset horizontal reference direction; otherwise, perform a sign flip on the horizontal direction.
[0065] Based on the established framework for manual axis mapping and sign reversal, the specific execution rules for axis mapping and sign reversal are further defined. By introducing an axis mapping strategy based on the principle of minimum included angle and a direction positive / negative determination strategy based on the distribution of coordinate values, the manual axis mapping and sign reversal operation has clear and quantifiable execution basis, thereby improving the operability and result consistency of this step in different scenarios.
[0066] There is no definite correspondence between the three principal axes obtained through the directed bounding box and the height and lateral directions of the ceiling structure. Prior knowledge of the ceiling structure is needed to complete axis mapping and sign flipping. In this dependent claim, the prior knowledge of the ceiling structure is further specified as two basic geometric constraints: the height direction of the ceiling corresponds to the vertical direction, and the lateral direction of the ceiling corresponds to the horizontal direction. The vertical direction can be determined by the direction of gravity, and in the setting of the principal axis coordinate system of the structure, a certain coordinate axis direction of the coordinate system is usually used as a reference for the vertical direction; the horizontal direction is any direction in a plane perpendicular to the vertical direction, usually determined according to the overall orientation of the scene or the direction of the acquisition path.
[0067] Among the three principal axes obtained from the directed bounding box, the principal axes closest to the vertical and horizontal directions are found and mapped to the height and lateral directions of the structural principal coordinate system. The remaining principal axis automatically corresponds to the vertical direction of the structural principal coordinate system. In practice, the angles between the three principal axis vectors and the vertical unit vector are calculated, and the smallest angle is selected as the height direction. Similarly, the angles between the three principal axis vectors and the horizontal unit vector are calculated, and the smallest angle is selected as the lateral direction. The geometric meaning of this minimum angle principle is that the principal axis directions of the point cloud reflect the main distribution direction of the point cloud in space. Since the thickness of the ceiling structure in the vertical direction is much smaller than its horizontal extension, the principal axis closest to the vertical direction corresponds to the distribution direction of the point cloud in the height direction; similarly, the principal axis closest to the horizontal direction corresponds to the distribution direction of the point cloud in the horizontal direction. When the ceiling structure is tilted or there is rotational deviation in the horizontal plane, the principle of minimum included angle can still accurately lock the principal axis that is closest to the actual height direction and the horizontal direction, thus ensuring the robustness of axis mapping under structural tilt or equipment posture deviation. In comparing the angles between the three principal axis direction vectors and the vertical or horizontal direction, the dot product of the direction vectors can be used to simplify the angle calculation; the direction vector with the largest dot product value is the direction vector with the smallest included angle. This method avoids the computational overhead of inverse trigonometric functions and improves execution efficiency.
[0068] After mapping a principal axis to a height direction, the positive direction of this height direction may point to the top or bottom of the ceiling. The validity of the current positive direction needs to be determined based on the coordinate distribution of the original ceiling point cloud along the height direction. The ceiling structure has a clear up-down orientation; the upper surface of the ceiling is at a higher position, and the lower surface is at a lower position. Typically, the direction pointing to the higher side of the ceiling is set as the positive direction of the height direction. In practice, all coordinate values of the original ceiling point cloud along the mapped height direction are obtained, and the statistical distribution characteristics of these coordinate values are calculated, such as the mean or median. Then, it is determined whether this statistical value corresponds to the higher side of the ceiling. If the statistical distribution of the coordinate values is located in the lower region of the overall ceiling space, it means that the current positive direction of the height direction points to the lower side of the ceiling. In this case, a sign flip is needed, i.e., the coordinate values of all points in this direction are reversed. Conversely, if the statistical distribution of the coordinate values is located in the higher region of the overall ceiling space, it means that the current positive direction of the height direction already points to the higher side of the ceiling, and no sign flip is needed. When making this determination, the range of coordinate values in the height direction of the original point cloud or a comparison with a known reference height in the scene can be used to help determine whether the positive direction is reasonable. After sign flip correction, the positive direction of the height direction is unified as the direction from the bottom of the ceiling to the top, that is, the direction in which the ceiling height coordinate value increases with the increase of the structure height.
[0069] This function is responsible for verifying and correcting the sign of the mapped lateral direction. After mapping a principal axis to a lateral direction, the positive direction of that lateral direction may point to one of two opposite directions within the horizontal plane. It is necessary to determine the validity of the current positive direction based on the coordinate distribution of the original ceiling point cloud in the lateral direction or a preset reference direction for the scene. Unlike the height direction, which has a clear up-down orientation, there is no absolute right or wrong in choosing the positive direction of the lateral direction. However, when processing multiple flights of data in batches, if the lateral positive directions of different flights are inconsistent, it will lead to inconsistent signs of the lateral coordinate values in the processed point cloud, affecting subsequent joint analysis and comparison of cross-flight data. Therefore, it is necessary to unify the lateral positive direction of all data based on a preset lateral reference direction. This preset lateral reference direction can be determined based on the overall orientation of the scene. For example, in a road or bridge scene, the lateral reference direction can be set to one side of the road; in a building scene, the lateral reference direction can be set to the direction consistent with the orientation of the main facade of the building. In practice, the coordinate distribution characteristics of the original ceiling point cloud in the mapped lateral direction are first obtained to determine whether its positive direction is consistent with the preset lateral reference direction. If the current positive direction in the horizontal direction points to the opposite direction of the preset reference direction, then the sign of that direction is flipped, meaning the coordinate values of all points in that direction are reversed. If the current positive direction in the horizontal direction is consistent with the preset reference direction, then that direction remains unchanged. After sign flipping correction, data from different sorties and different collection batches have a unified definition of the positive direction in the horizontal direction, providing a consistent spatial reference for subsequent cross-data comparison, stitching, and fusion analysis.
[0070] The above content collectively constitutes a complete mapping and correction process from the principal axis direction to the structural principal direction coordinate system. By using the principle of minimum included angle, a deterministic mapping from the three abstract principal axes to the height and lateral directions is achieved, resolving the issue of chaotic axis order. The distribution of height coordinate values ensures uniformity of the vertical orientation of the positive height direction. A preset lateral reference direction ensures consistency across multiple data points in the positive lateral direction. This transforms manual axis mapping and sign flipping operations from relying on subjective judgment to a semi-automated process with clear geometric meaning and quantifiable judgment standards, significantly improving the reproducibility and consistency of results across different operators and scenarios. In specific implementation, the vertical and horizontal unit vectors can be pre-determined based on the structural principal direction coordinate system and input as fixed parameters in this step; the selection of the lateral reference direction is determined when processing a specific scenario for the first time and recorded as a processing parameter for that scenario, to be reused in all subsequent data collection for that scenario.
[0071] Furthermore, you can also view Figure 3 , Figure 3This is a detailed process diagram based on step S40 in the first embodiment. Figure 3 The steps of determining the main peak positions of the one-dimensional point distribution in the height direction and the one-dimensional point distribution in the lateral direction respectively include S41~S42: Step S41: In the one-dimensional point distribution in the height direction, traverse all box intervals and determine the coordinate position corresponding to the box interval with the largest number of points as the main peak position in the height direction and the lateral direction. Step S42: When there are multiple maximum binning intervals with the same number of points in the one-dimensional point distribution in the height direction or the one-dimensional point distribution in the lateral direction, the average value of the center coordinates of the multiple maximum binning intervals with the same number of points is taken as the main peak position in the corresponding direction.
[0072] Based on the established framework for determining the location of the main peak, the specific rules for determining the location of the main peak are further defined, including the maximum binning location rule under normal circumstances and the average processing rule under multiple peak conditions. This provides a clear and complete execution logic for the location of the main peak, ensuring the certainty and uniqueness of the location of the main peak under different distribution patterns.
[0073] The location of the main peak is determined by finding the coordinate position corresponding to the box with the largest count in the one-dimensional point distribution sequence. In the one-dimensional point distribution sequence along the height direction, all box intervals are traversed one by one, comparing the point counts of each interval, and the box interval with the largest number of points is identified. The coordinate position corresponding to this box interval is determined as the main peak location in that direction. This coordinate position is usually taken as the center coordinate value of the box interval, i.e., the midpoint between the left and right boundaries of the box. For the one-dimensional point distribution sequence along the horizontal direction, the same traversal and comparison operation is performed to determine the main peak location in the horizontal direction. The rationale for this maximum box determination rule is that the essence of box statistics is to discretize continuous spatial coordinates into equally spaced intervals. The number of points in each box reflects the aggregation density of the point cloud at the corresponding spatial location; the box interval with the largest number of points is the spatial location where the point cloud is most concentrated in that direction. This location physically corresponds to the core aggregation location of the main structure of the ceiling in that direction—the main elevation layer of the ceiling panel in the height direction, and the horizontal centerline of the main structure of the ceiling in the horizontal direction. Since this judgment rule only involves comparing the number of bins and does not involve complex mathematical calculations or parameter settings, it has the advantages of high execution efficiency and clear and stable judgment results. In specific implementation, when traversing all bin intervals, the current maximum number of points and its corresponding bin index can be recorded simultaneously. After the traversal is completed, the coordinate value corresponding to the bin index is used as the position of the main peak. This method can avoid multiple traversals or additional storage overhead, thus improving computational efficiency.
[0074] In a one-dimensional point distribution, the presence of multiple maximum bin intervals with the same number of points typically occurs in scenarios where the point cloud distribution is relatively flat or exhibits a multi-peak pattern. For example, when a ceiling panel has a significant thickness in the height direction, the point cloud distribution in that direction may present a relatively flat top shape, with multiple adjacent bin intervals containing similar and maximum point counts. In this case, these bin intervals collectively constitute the core thickness layer of the ceiling panel. Similarly, when the ceiling structure has symmetrical auxiliary structures in the horizontal direction, the one-dimensional point distribution in the horizontal direction may show two peaks with similar amplitudes, corresponding to the center of the main structure and the location of the auxiliary structures, respectively. In such cases where multiple maximum bin intervals coexist, determining the location of only one maximum bin interval as the main peak position would lead to arbitrariness in the main peak location. Different execution processes might select different maximum bins as the main peak, thus affecting the consistency of the starting reference for subsequent window expansion. To address this issue, an averaging rule is introduced: when multiple maximum bin intervals with the same number of points exist in the one-dimensional point distribution along the height or lateral direction, the average of the center coordinates of these multiple maximum bin intervals is taken as the main peak position in that direction. The geometric significance of this averaging rule is that multiple maximum bin intervals with the same number of points collectively represent a densely distributed area of the point cloud in that direction. Taking the average of the center coordinates of these bins can comprehensively characterize the center position of this dense area, avoiding the arbitrariness caused by a single selection. For example, when there are three adjacent bins with the same number of points in the height direction, and all are maximum values, the center coordinates of these three bins might be 1.02 meters, 1.07 meters, and 1.12 meters, respectively. Taking the average yields 1.07 meters as the main peak position, which is located precisely at the geometric center of the three bins, objectively reflecting the center elevation of the core thickness layer of the ceiling panel.
[0075] As a general processing flow, this method is applicable to peak location operations in all situations. As an optional supplementary rule during execution, it is only triggered when multiple maximum binning intervals are detected. In specific implementation, the execution flow can be described as follows: First, the one-dimensional point distribution sequence is traversed, recording the maximum point count C_max and the index list of all binning intervals with points equal to C_max. After the traversal, if the index list contains only one binning index, the center coordinate position of that bin is directly determined as the peak position. If the index list contains multiple binning indices, the center coordinate positions of these binning intervals are calculated separately, and then the arithmetic mean of these center coordinate positions is calculated. This average is used as the peak position. This execution flow organically integrates the above content into a complete processing logic, ensuring that a unique and reasonable peak position can be determined regardless of whether the point distribution exhibits a single-peak, flat-top, or multi-peak pattern.
[0076] The above-mentioned elements collectively construct a complete system of rules for determining the location of the main peak. This system uses the maximum binning location as the basic rule and multi-maximum binning averaging as a supplementary rule. The two work together to ensure the determinism of the main peak location determination; that is, regardless of changes in the distribution of points, this rule system can output a unique main peak location result. This determinism is crucial for the subsequent expansion of the main window: the expansion of the main window uses the main peak location as the starting reference point. If the main peak location is uncertain in different execution processes or scenarios, it will directly lead to inconsistencies in the window expansion results. Through the determination rules defined in this dependent claim, the process of determining the main peak location has a clear and repeatable execution logic, providing a key guarantee for the stability and reproducibility of the entire main area extraction process.
[0077] Furthermore, you can also view Figure 4 , Figure 4 This is a detailed process diagram based on step S50 in the first embodiment. Figure 4 The step of determining the main window corresponding to the height direction and the lateral direction based on the main peak position and bin count in the one-dimensional point distribution of each direction includes S51~S54: Step S51: Taking the compartment where the main peak is located in the height direction as the starting compartment, expand outwards in the direction of decreasing height coordinate value, and compare the compartment count of the currently expanded compartment with the peak value of the main peak in the height direction. Step S52: When the box count of two or more consecutive box intervals is lower than the product of the peak value of the main peak in the height direction and the first side expansion constraint threshold in the height direction, stop the expansion in the direction of decreasing coordinate value, and take the box interval before the stop position as the boundary of the height direction on the side of decreasing coordinate value. Step S53: Taking the compartment where the main peak is located in the height direction as the starting compartment, expand outwards in the direction of increasing height coordinate value, and compare the compartment count of the currently expanded compartment with the peak value of the main peak in the height direction. Step S54: When the box count of two or more consecutive box intervals is lower than the product of the peak value of the main peak in the height direction and the second side expansion constraint threshold in the height direction, stop the expansion in the direction of increasing coordinate value, and take the box interval before the stop position as the boundary of the height direction on the side of increasing coordinate value. Step S55: Determine the main window in the height direction by the boundary on the side where the coordinate value decreases and the boundary on the side where the coordinate value increases.
[0078] Based on the established asymmetric expansion threshold strategy framework, the specific expansion execution rules of the main window in the height direction are further defined, including the starting position of the expansion on the left and right sides, the expansion direction, the comparison and judgment logic, as well as the stopping conditions and boundary determination methods. A stopping judgment mechanism is introduced when the number of consecutive multi-bins falls below the threshold, so that the expansion process of the main window in the height direction has clear and robust operation specifications, thereby effectively avoiding the problem of premature stopping caused by accidental fluctuations in a single bin and ensuring the stability and reliability of the window boundary determination.
[0079] Asymmetric extended constraints are used in the height direction. A higher stop threshold is used on the left side corresponding to the lower part of the ceiling to tighten the lower boundary, while a lower stop threshold is used on the right side corresponding to the higher part of the ceiling to relax the upper boundary.
[0080] This function initiates and executes the expansion operation along the height direction in the direction of decreasing coordinate values. Its core logic is to use the compartment containing the determined main peak position in the height direction as the starting compartment for expansion. From this starting compartment, it expands outwards compartment by compartment along the direction of decreasing height coordinate values. Each time it expands to a new compartment, it obtains the compartment count for that compartment and compares this count with the peak value of the main peak in the height direction. The count value of the compartment with the largest number of points determined by the peak value in the height direction represents the point density of the most densely distributed position of the main structure of the ceiling in the height direction. By comparing the count of the currently expanded compartment with the peak value, the density of the current compartment relative to the main peak position can be quantitatively assessed, thereby determining whether the current compartment is still part of the main structure area of the ceiling or has entered a non-target area. This expansion operation traverses the compartments one by one in order from the main peak position outwards, with the execution logic being the same at each step, until a stopping condition is met.
[0081] During the interval-by-interval expansion process, the box count of each box interval is continuously monitored. When the box count of two or more consecutive box intervals is lower than the product of the peak value of the main peak in the height direction and the first side expansion constraint threshold in the height direction, further expansion in the direction of decreasing coordinate value is stopped. The first side expansion constraint threshold here is the left-side stop threshold in the height direction, which is usually set to 0.6. This product constitutes the stop judgment baseline for left-side expansion. When the count of a box interval is lower than this baseline, it indicates that the point density in the box interval is significantly lower than the point density of the main peak area, and the spatial location corresponding to the interval has exceeded the dense distribution range of the main ceiling area. The reason for requiring two or more consecutive box intervals to be lower than this baseline before triggering the stop is to avoid premature stoppage due to accidental count fluctuations in a single box interval, such as abnormally low box counts caused by local noise or uneven sampling. After using the joint judgment of multiple consecutive boxes, the main boundary is only determined to have been reached when the point density in this direction does indeed show a continuous trend of being lower than the threshold, thereby significantly improving the robustness of boundary judgment. When the stopping condition is triggered, the previous bin section at the stopping position is taken as the boundary in the height direction on the side where the coordinate value decreases, i.e., the left boundary z_left. The meaning of this boundary determination method is: the last bin section that is still considered to belong to the main area is the boundary, while the bin section that triggered the stop and all other sections are judged to be outside the main area.
[0082] The system initiates and executes an expansion operation along the direction of increasing height coordinates. Its core logic starts with the compartment containing the main peak in the height direction as the initial compartment. From this initial compartment, it expands outwards compartment by compartment along the direction of increasing height coordinates. Each time it expands to a new compartment, it obtains the compartment count for that compartment and compares this count with the peak value of the main peak in the height direction. This expansion operation traverses the compartments one by one in order from the main peak outwards until the stopping condition on the right is met.
[0083] In determining the stopping condition for right-side expansion and defining the right-side boundary, different expansion constraint thresholds are used: when the bin counts of two or more consecutive bin sections are lower than the product of the peak value of the main peak in the height direction and the second-side expansion constraint threshold in the height direction, further expansion in the direction of increasing coordinate values stops. This second-side expansion constraint threshold is the right-side stopping threshold in the height direction, typically set at 0.3. This product forms the baseline for stopping right-side expansion. Compared to the left threshold of 0.6, the right threshold of 0.3 is significantly lower, meaning the stopping condition in the right direction is more lenient, requiring the bin count to drop to a lower level before triggering a stop, thus allowing the right-side boundary to expand to a greater extent. This asymmetric design is precisely to accommodate the naturally lower point density on the higher side of the ceiling due to sparse sampling, changes in the incident angle, and local occlusion, avoiding premature stopping of expansion due to an excessively high stopping threshold, which would result in a large number of points being missed in the upper part of the ceiling. Similar to left-side expansion, right-side expansion also requires two or more consecutive bin sections to be lower than the baseline before triggering a stop, to eliminate the influence of occasional fluctuations in a single bin. Once the stopping condition is triggered, the previous bin section at the stopping position is taken as the boundary in the height direction on the side where the coordinate value increases, i.e., the right boundary z_right.
[0084] The results of the left and right expansions are combined, and the main body window [z_left, z_right] in the height direction is jointly determined by the boundary z_left on the side with decreasing coordinate values and the boundary z_right on the side with increasing coordinate values. The physical meaning of this window is: in the height direction, the spatial range within all compartments covered from the left boundary to the right boundary is considered the effective distribution range of the main body of the ceiling in the height direction. Points located outside this window, points with height coordinate values less than z_left or greater than z_right, are judged as non-target structures or noise and will be removed in subsequent step S60.
[0085] The steps described above together constitute a complete expansion rule system for the main window in the height direction. The core technological contributions of this system are twofold: first, by employing different expansion constraint thresholds on the left and right sides, an asymmetric expansion strategy is achieved, adapting to the different point cloud distribution characteristics on the upper and lower sides of the ceiling; second, by introducing a stopping mechanism where the count of two or more consecutive bins falls below a threshold, boundary misjudgments caused by accidental fluctuations in a single bin are effectively avoided, improving the robustness of window determination. The expansion operations on the left and right sides are logically independent and do not affect each other. The determination of the left boundary does not depend on the progress of the right expansion, and vice versa. Expansion on both sides can be executed in parallel to improve processing efficiency. After completing this set of steps, the main window in the height direction is uniquely determined, and this window will be directly used together with the main window in the horizontal direction to complete the spatial filtering of the point cloud.
[0086] Furthermore, you can also view Figure 5 , Figure 5 This is a schematic diagram of another detailed process based on step S50 in the first embodiment. Figure 5 The step of determining the main window corresponding to the height direction and the lateral direction based on the main peak position and bin count in the one-dimensional point distribution of each direction includes S56~S59: Step S56: Taking the box interval where the main peak position in the horizontal direction is located as the starting interval, expand outward synchronously interval by interval along the directions of decreasing and increasing horizontal coordinate values respectively; Step S57: Compare the bin count of the currently expanded bin interval with the product of the main peak value in the lateral direction and the expansion constraint threshold in the lateral direction, respectively. Step S58: When the box count of multiple consecutive box intervals on a certain side is lower than the product, the side stops expanding and the previous box interval at the stopping position is taken as the boundary of the lateral direction on that side. Step S59: When both sides stop expanding, determine the main window in the horizontal direction.
[0087] Based on the established main window expansion framework, the specific expansion execution rules for the main window in the horizontal direction are further defined. These include simultaneous expansion to both sides from the starting interval of the main peak location, stopping based on the comparison of the product of the sub-box count, the main peak value, and the expansion constraint threshold, and the operation specifications for forming a complete window after the boundaries of both sides are determined independently. Unlike the asymmetric expansion threshold used in the height direction, the horizontal direction uses symmetrical expansion constraints, with the same stopping criteria used on both sides. The expansion process employs simultaneous monitoring on both sides; if either side meets the stopping condition first, that side stops independently. The window is determined after both sides have stopped, thus achieving efficient and consistent automatic definition of the horizontal main window.
[0088] The horizontal direction corresponds to the horizontal strip distribution of the main body of the canopy. Both sides gradually decrease in size outwards from the main body. A low and symmetrical stopping threshold is used to maintain the integrity of the horizontal main body area and control the expansion range. Specifically, the bin section where the determined horizontal main peak is located is used as the starting interval for expansion. Starting from this starting interval, expansion proceeds synchronously outwards interval by interval along the directions of decreasing and increasing horizontal coordinate values. The horizontal main peak position corresponds to the center position of the main body of the canopy in the horizontal direction. The canopy point clouds on both sides of this position are symmetrically or approximately symmetrically distributed, so using this position as the starting reference point for expansion is reasonable. Synchronous expansion on both sides means that in each expansion iteration, one bin section is advanced in both the direction of decreasing and increasing coordinate values, and the currently expanded bin sections on both sides are judged simultaneously. The advantage of this synchronous expansion method is that it can shorten the overall processing time and facilitate monitoring the relative relationship of the expansion progress on both sides. The expansion operation traverses the bin sections one by one in the order from the main peak position outwards. The execution logic of each step on each side is the same until the stopping condition is met on that side.
[0089] In the comparison and judgment logic for the currently expanded compartments, each time a new compartment is expanded, the compartment count of that compartment is obtained and compared with the product of the main peak value in the lateral direction and the lateral expansion constraint threshold. The count value of the compartment with the largest number of points determined by the main peak value in the lateral direction represents the point density of the most densely distributed position of the ceiling structure in the lateral direction. The lateral expansion constraint threshold is the described lateral stop threshold, which is usually set to 0.4. The same threshold is used on both the left and right sides to reflect the symmetry constraint of lateral expansion. This product constitutes the stop judgment baseline for lateral expansion on both sides. Its physical meaning is: when the point density of the compartment expanded to one side drops below 40% of the main peak density, the spatial position corresponding to that compartment has exceeded the effective boundary of the ceiling structure in the lateral direction. By applying this comparison logic to the currently expanded compartments on the left and right sides respectively, independent monitoring of the expansion status on both sides is achieved.
[0090] In the core logic of determining the stopping conditions and boundary positions of each side, expansion on a side stops when the bin counts of multiple consecutive bin intervals on that side are all lower than the product of the peak value of the main peak in the lateral direction and the expansion constraint threshold in the lateral direction. The previous bin interval at the stopping position is taken as the lateral boundary on that side. Compared with the determination condition of two or more consecutive bins used in the height direction expansion, the description of multiple consecutive bins is adopted. In actual implementation, the specific number can be set according to the actual distribution characteristics of the point cloud and the bin step size. Usually, it can be set to trigger the stop when two or three consecutive bin intervals are lower than the baseline. The design intention of this joint determination of multiple consecutive bins is consistent with the design in the height direction expansion, avoiding boundary misjudgment due to the accidental count fluctuation of a single bin. The main boundary is determined only when the point density in this direction shows a continuous trend of being lower than the threshold. The stopping determinations of the left and right sides are independent of each other: the left side may meet the stopping condition at an earlier position and stop expansion, while the right side may continue to expand outward until it meets its own stopping condition. Once one side stops, that side no longer participates in subsequent expansion iterations, while the other side continues to expand outward and continuously checks the stopping condition. This independent stopping mechanism allows the left and right boundaries to adapt to the actual point cloud distribution range in their respective directions. Even if the distribution range of the main body of the ceiling on both sides is not completely symmetrical, for example, if the point cloud density decays more slowly on one side and more quickly on the other due to the offset of the acquisition path, this mechanism can still determine reasonable boundary positions separately.
[0091] After expansion stops on both sides, the main body window in the horizontal direction is determined. Once the left and right sides in the horizontal direction have both stopped and their respective boundary positions determined, the main body window in the horizontal direction [y_left, y_right] is jointly determined by the boundary y_left (where the coordinate value decreases) and the boundary y_right (where the coordinate value increases). The physical meaning of this window is: in the horizontal direction, the spatial range within all compartments covered from the left boundary to the right boundary is considered the effective distribution range of the main body of the ceiling in the horizontal direction. Points located outside this window, with horizontal coordinate values less than y_left or greater than y_right, are considered non-target structures outside the ceiling boundary and will be removed subsequently.
[0092] The above elements together constitute a complete expansion rule system for the main window in the horizontal direction. The key difference from the vertical expansion lies in the following: the horizontal direction employs a symmetrical expansion constraint threshold, using the same stopping baseline on both sides; expansion on both sides starts synchronously and stops independently, stopping independently when either side meets the stopping condition first, without waiting for the other side. This symmetrical threshold design is based on the prior knowledge that the ceiling structure has good symmetry in the horizontal direction, while the independent stopping mechanism on both sides provides adaptability to potential asymmetric acquisition deviations in real-world scenarios. After completing this set of steps, the main window in the horizontal direction is uniquely determined, and this window will be used together with the main window in the vertical direction for point cloud spatial filtering operations.
[0093] You can also view Figure 6 , Figure 6 This is a flowchart illustrating the second embodiment of the ceiling point cloud main region extraction method of the present invention, based on... Figure 6 Before the step of constructing a directed bounding box for the original ceiling point cloud and obtaining the three principal axis directions of the original ceiling point cloud, steps S70~S90 are further included: Step S70: Preprocess the original canopy point cloud, the preprocessing including removing outlier noise points and uniform downsampling. Step S80: Based on the local neighborhood density distribution of each point in the original ceiling point cloud, points with fewer than a preset neighborhood point number threshold are identified as outlier noise points and removed. Step S90: Voxel grid downsampling is performed on the point cloud after removing outlier noise points. The average coordinates of all points falling within the same voxel grid are used as the retained points of the voxel grid to reduce the point cloud density and retain the overall geometry of the ceiling.
[0094] Based on the established point cloud orientation correction and main region extraction framework, a point cloud preprocessing step was further introduced, including outlier noise point removal based on local neighborhood density distribution and uniform downsampling processing based on voxel grid. This aims to eliminate the interference of isolated noise points in the original point cloud on subsequent main orientation analysis and binning statistics. At the same time, by reducing the point cloud density, the overall computational efficiency is improved, ensuring the processing quality and operating efficiency of the aforementioned steps under high noise and large-scale point cloud data.
[0095] Starting with the original ceiling point cloud, a directed bounding box is directly constructed from it for subsequent analysis. However, in actual data acquisition, the original point cloud inevitably contains various noise points. During scanning, airborne lidar systems may encounter birds, floating objects, or atmospheric particles, generating echoes. These echoes correspond to points randomly distributed in space and far from the main ceiling structure. During image matching, photogrammetric systems may generate incorrect matching points in non-target areas due to poor texture or matching algorithm errors, forming clusters of noise points isolated from the main structure. Even ground-based mobile scanning systems struggle to avoid outliers caused by multipath reflections or occlusion by moving objects. Although these outliers are relatively few in number, their spatial location deviates significantly from the main ceiling area. When constructing the directed bounding box, the presence of a few noise points far from the main structure in the point cloud will significantly affect the eigenvalue decomposition results of the covariance matrix. The principal direction corresponding to the largest eigenvalue may be pulled towards the direction of the noise point distribution rather than the true principal direction of the ceiling structure, thus impairing the accuracy of orientation correction. Meanwhile, in one-dimensional binning statistics, isolated noise points may form secondary peaks or increase background counts within certain binning intervals, interfering with the identification of the main peak and the accurate expansion of the main window. Therefore, effective noise filtering of the original point cloud before main direction analysis is an important prerequisite for ensuring the quality of subsequent processing steps.
[0096] This embodiment defines the types of preprocessing operations, which include two components: outlier removal and uniform downsampling. These two operations are logically sequential; denoising should precede downsampling. The rationale is as follows: if downsampling is performed first, the selection rule for retaining points in voxel grid downsampling is to take the average coordinates of all points within the grid. This means that if a voxel grid contains both normal main points and isolated noise points, the retained point after downsampling will be the average of their coordinates. This point belongs neither to the original noise point nor to the true main point, but is a mixture of both. Such a mixed point cannot be effectively identified and removed by the subsequent outlier removal operation. Therefore, outlier removal is performed first to ensure that the point cloud participating in downsampling does not contain noise points, and then downsampling is used to reduce the data volume.
[0097] Furthermore, the specific implementation method for outlier noise removal is defined. Its core logic is as follows: for each point in the original ceiling point cloud, calculate the number of neighboring points within its local neighborhood within a preset spatial radius, i.e., the local neighborhood density. If a point is part of the main ceiling structure, it usually has a large number of neighboring points, resulting in a large number of local neighborhood points; conversely, if the point is an isolated noise point, there are almost no other points within the same spatial radius, resulting in a very small number of local neighborhood points. By setting a preset threshold for the number of neighborhood points, points with fewer than this threshold in their local neighborhood are identified as outlier noise points and removed. The advantage of this local neighborhood density-based denoising method is that its parameters have clear physical meanings: the spatial radius can be set based on the average point spacing of the original point cloud, typically 2 to 3 times the average point spacing; the neighborhood point threshold can be flexibly adjusted according to the noise level of the application scenario, typically ranging from 5 to 10 points. Compared to global statistical filtering methods, this local density method is better suited to situations with uneven point cloud density. In areas of higher density, normal points naturally have more neighboring points; conversely, in areas of lower density, normal points may have fewer neighboring points. However, by combining a fixed spatial radius with a neighboring point threshold, this method can relatively stably distinguish between normal and noise points. In practical implementation, spatial indexing structures such as kd-trees can be used to accelerate neighbor search, thereby improving the processing efficiency of large point clouds.
[0098] Furthermore, this embodiment specifies the concrete implementation method of uniform downsampling. Its core logic is as follows: after removing outlier noise points from the original ceiling point cloud, voxel grid downsampling is performed on the remaining point cloud. The basic operation of voxel grid downsampling is to divide the three-dimensional space into a series of small cubic grids of equal size, each grid being called a voxel. For all points falling within the same voxel grid, the average coordinates of these points are calculated, and the point corresponding to this average value is taken as the retained point of that voxel grid. All other points within that voxel are discarded. The geometric significance of this downsampling method is that within each voxel grid, the retained point is located at the geometric center of all points within that voxel, and this retained point can better represent the local spatial distribution characteristics of the original point cloud within that voxel. Since the size of the voxel grid is fixed, the downsampled point cloud exhibits a uniform distribution in space, and its density is determined by the size of the voxel grid. Compared to random downsampling or spacing-based downsampling, the core advantage of voxel grid downsampling lies in its uniformity. The downsampled point cloud avoids areas of excessive density or sparseness, which is beneficial for the stability of the principal direction analysis of the directed bounding box. When the point cloud density is uneven, denser regions receive greater weight in the covariance matrix calculation, potentially biasing the principal direction towards higher density rather than the main extension direction of the structure. Uniform downsampling eliminates the weight bias caused by density differences, allowing the principal direction analysis to more purely reflect the spatial geometry of the structure. The size of the voxel grid can be set according to the original point cloud density and the accuracy requirements of subsequent steps, typically 2 to 5 times the original average point spacing, minimizing the data volume while ensuring the overall ceiling geometry is not overly smoothed.
[0099] The above elements together constitute the preprocessing stage for each of the preceding steps. The denoising operation eliminates spatially isolated noise points through local neighborhood density determination, ensuring that the directed bounding box main direction analysis and one-dimensional binning statistics are not affected by outliers. The downsampling operation reduces the point cloud density by averaging using a voxel grid, significantly reducing the data size while preserving the overall geometry of the ceiling, thus improving the computational efficiency of subsequent steps. The strict order of these two operations—noise filtering followed by uniform downsampling—ensures the purity and representativeness of the points retained after downsampling. The point cloud output after this preprocessing stage has data quality and size suitable for subsequent processing, providing a prerequisite guarantee for the efficient and stable operation of the entire technical solution in practical engineering.
[0100] You can also view Figure 7 , Figure 7 This is a flowchart illustrating the third embodiment of the ceiling point cloud main region extraction method of the present invention, based on... Figure 7After the step of retaining the point cloud that simultaneously falls within the main window in the vertical direction and the main window in the horizontal direction as the point cloud of the main area of the ceiling, the method further includes steps S100~S120: Step S100: Perform connected component analysis on the point cloud of the main area of the ceiling, and extract the connected component with the largest area in the point cloud of the main area of the ceiling as the final main area of the ceiling. Step S110: Based on the spatial adjacency relationship of points within each connected component, points whose distance to each other is less than a preset adjacency distance threshold are grouped into the same connected component. Step S120: Calculate the number of points contained in each connected domain, determine the connected domain with the most points as the final main area of the ceiling, and remove the points in the remaining connected domains.
[0101] Based on the obtained main region point cloud, a post-processing step based on connected component analysis was further introduced. The point cloud was divided into different connected components through spatial adjacency, and the connected component with the most points was taken as the final main ceiling region. This aims to remove isolated noise point clusters or non-target regions that may still remain after geometric window screening or are structurally independent but intersecting with the main space, thereby further improving the completeness and purity of the main region extraction results.
[0102] By filtering through the spatial intersection of the main window in the height direction and the main window in the horizontal direction, a large number of non-target structural point clouds located outside the main space of the ceiling have been eliminated. These include wall points and supporting column points located below the ceiling, parapet wall points located above the ceiling, and non-target structural points located on both sides of the ceiling. The point cloud retained after this geometric window filtering is spatially limited to the height and horizontal range of the main ceiling structure. However, in actual acquisition scenarios, there are still two types of interference factors that may affect the purity of the extraction results. The first type of interference comes from isolated noise point clusters generated during the acquisition process. Although outlier noise points have been removed in the preprocessing stage, some small noise clusters may not be identified as noise because the number of points in their local neighborhood just meets the neighborhood point count threshold, or the noise points happen to fall within the main window range and escape outlier filtering. These noise point clusters are spatially isolated from the main structure and have no continuous point cloud connection with the main structure. The second type of interference originates from non-target structures actually existing within the main ceiling area, such as air conditioning units, ventilation ducts, and suspended lighting fixtures installed on the ceiling surface. Although these facilities are spatially located within the window area of the main ceiling, they are not part of the main ceiling structure itself. While the number of these two types of interference may be far fewer than in the main ceiling area, if they are not effectively eliminated in subsequent engineering applications such as structural modeling and deformation analysis, they will directly affect the accuracy and reliability of the analysis results. Based on the above requirements, connected component analysis is introduced to eliminate the above two types of interference by extracting the spatially continuous and largest connected component.
[0103] Furthermore, in defining the specific rules for determining connected components, points whose distance to each other is less than a preset adjacency distance threshold are grouped into the same connected component based on the spatial adjacency relationship of each point cloud in 3D space. The geometric meaning of this rule is that points belonging to the same physical structure surface in the point cloud are spatially continuous and adjacent, with relatively small distances between them; while point clusters belonging to different structures or independent points show significant jumps in distance at their boundaries, exceeding the distance between points within the same structure. By setting an adjacency distance threshold, it is possible to determine whether any two points are adjacent. If the Euclidean distance between two points is less than this threshold, they are determined to belong to the same connected component; otherwise, they are determined to belong to different connected components. This connected component analysis is typically implemented using breadth-first search or disjoint-set data structure algorithms. The specific execution process is as follows: A spatial index is created for all points in the point cloud. For each unlabeled point, starting from that point, all neighboring points within its spatial neighborhood with a distance less than a preset threshold are searched. These neighboring points are then marked with the same connected component identifier as the starting point. The search continues outward from the newly labeled point until all points satisfying the adjacency condition are included in the connected component. The next unlabeled point is then selected, and the above process is repeated until all points in the point cloud are assigned a connected component identifier. The preset adjacency distance threshold can be determined based on the average point spacing of the original point cloud, typically 2 to 3 times the average point spacing. This value ensures that points on the same structural surface are correctly assigned to the same connected component while avoiding incorrect connections between different structures due to an excessively large threshold.
[0104] Furthermore, the method for determining the final main area of the ceiling is also specified. The core logic is that after marking the connected components of all points, the number of points contained in each connected component is calculated. All connected components are then sorted according to the number of points, and the connected component with the most points is determined as the final main area of the ceiling. All points in the remaining connected components are then eliminated. This determination rule is based on the following: the main area of the ceiling is the largest continuous structure in the entire scene, with the most point clouds, exhibiting a large-scale continuous distribution in space. The first type of interference, isolated noise point clusters, typically contains only a very small number of points, and their connected component point count is much smaller than that of the main connected component. The second type of interference, the ancillary facilities on the ceiling surface, although spatially located within the main window area, are usually small-scale structures, and their corresponding connected component point count is also much smaller than that of the main ceiling structure. Therefore, by selecting the connected component with the most points as the final main area of the ceiling, both types of interference can be effectively eliminated statistically. When performing this step, if the difference in the number of points between the connected component with the most points and the second most connected component is not significant enough, for example, if the main area is partially truncated due to the limitation of the collection range, the spatial range information of the connected components can be introduced to assist in the judgment. For example, the bounding box volume or projected area of each connected component can be calculated, and the point count can be combined with the spatial range for a comprehensive judgment to further improve the reliability of the judgment.
[0105] The above steps constitute the refined post-processing stage of the extracted results. This stage uses connected component analysis driven by spatial adjacency to group the point cloud according to the continuity of the physical structure. The connected component with the most points is then used as the final extraction result, effectively eliminating noisy point clusters and non-target ancillary facilities that are spatially located within the main window but structurally independent. This post-processing stage forms a complete processing chain with the aforementioned pre-processing stage. The pre-processing stage eliminates spatially discrete noise points and data redundancy at the beginning of the process through local neighborhood density analysis and voxel grid downsampling. The post-processing stage eliminates local interference that intersects with the main space but is structurally independent at the end of the process through connected component analysis. Together, they ensure the purity and integrity of the final output point cloud in multiple dimensions such as spatial range, structural continuity, and material consistency, providing a high-quality data foundation for subsequent engineering applications such as ceiling structure modeling, deformation analysis, and dimensional measurement.
[0106] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the method for extracting the main area of the ceiling point cloud in this application. Any simple transformations based on this technical concept are within the protection scope of this application.
[0107] This application provides a ceiling point cloud main region extraction device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the ceiling point cloud main region extraction method in the above embodiment 1.
[0108] The following is for reference. Figure 10 The diagram illustrates a structural schematic suitable for implementing a ceiling point cloud main region extraction device in the embodiments of this application. The ceiling point cloud main region extraction device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 10 The ceiling point cloud main area extraction device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0109] like Figure 10As shown, the ceiling point cloud main region extraction device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the ceiling point cloud main region extraction device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following can be connected to I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the ceiling point cloud main region extraction device to exchange data wirelessly or via wired communication with other devices. Although various ceiling point cloud main region extraction devices are shown in the figures, it should be understood that it is not required to implement or possess all of them. More or fewer may be implemented alternatively.
[0110] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0111] The ceiling point cloud main body region extraction device provided in this application, employing the ceiling point cloud main body region extraction method in the above embodiments, can solve the technical problems of existing orientation correction relying on external positioning and attitude determination equipment and main body extraction relying on fixed parameters or manual operation, resulting in the processing results being highly sensitive to external sensing errors and subjective settings, and lacking overall robustness. Compared with the prior art, the beneficial effects of the ceiling point cloud main body region extraction device provided in this application are the same as those of the ceiling point cloud main body region extraction method provided in the above embodiments, and other technical features in this ceiling point cloud main body region extraction device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0112] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0113] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0114] This application provides a storage medium, which is a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the ceiling point cloud main region extraction method in the above embodiments.
[0115] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be executed by instructions, used by devices, or used in conjunction with them. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0116] The aforementioned computer-readable storage medium may be included in the ceiling point cloud main area extraction device; or it may exist independently and not be assembled into the ceiling point cloud main area extraction device.
[0117] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the ceiling point cloud main region extraction device, the ceiling point cloud main region extraction device implements the technical content of the ceiling point cloud main region extraction method embodiment shown above.
[0118] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0119] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using dedicated hardware-based implementations that perform the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions.
[0120] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0121] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described ceiling point cloud main body region extraction method. This solves the technical problem that existing methods rely on external positioning and attitude determination equipment for orientation correction and fixed parameters or manual operation for main body extraction, resulting in highly sensitive processing results to external sensing errors and subjective settings, and insufficient overall robustness. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the ceiling point cloud main body region extraction method provided in the above embodiments, and will not be repeated here.
Claims
1. A method for extracting the main region of a point cloud on a roof, characterized in that, The method for extracting the main area of the ceiling point cloud includes the following steps: A directed bounding box is constructed on the original ceiling point cloud to obtain the three principal axis directions of the original ceiling point cloud, and the original ceiling point cloud is transformed from the device acquisition coordinate system to a coordinate system with the center of the directed bounding box as the origin. Based on prior knowledge of the ceiling structure, artificial axis mapping and sign flipping are performed on the three principal axis directions after conversion to transform the original ceiling point cloud to the structural principal direction coordinate system, so that the principal axis directions of the original ceiling point cloud correspond to the height direction and the lateral direction of the ceiling structure. In the main coordinate system of the structure, one-dimensional binning statistics are performed on the point cloud along the height direction and the lateral direction to obtain the one-dimensional point distribution in the height direction and the one-dimensional point distribution in the lateral direction. Determine the main peak positions of the one-dimensional point distribution in the height direction and the one-dimensional point distribution in the lateral direction, respectively. Based on the main peak position and bin count in the one-dimensional point distribution of each direction, the main window corresponding to the height direction and the lateral direction is determined respectively. The left and right boundaries of the height direction are determined according to the asymmetric extension constraint condition, and the left and right boundaries of the lateral direction are determined according to the symmetric extension constraint condition. The point cloud that falls within both the main window in the vertical direction and the main window in the horizontal direction is retained as the point cloud of the main area of the ceiling.
2. The method for extracting the main area of a ceiling point cloud as described in claim 1, characterized in that, Before the step of constructing a directed bounding box on the original ceiling point cloud and obtaining the three principal axis directions of the original ceiling point cloud, the method further includes: The original canopy point cloud is preprocessed, including the removal of outlier noise points and uniform downsampling. Based on the local neighborhood density distribution of each point in the original ceiling point cloud, points with fewer than a preset neighborhood number threshold are identified as outlier noise points and removed. Voxel grid downsampling is performed on the point cloud after removing outlier noise points. The average coordinates of all points falling within the same voxel grid are used as the retained points of the voxel grid to reduce the point cloud density and preserve the overall geometry of the ceiling.
3. The method for extracting the main area of a point cloud on a ceiling as described in claim 1, characterized in that, The prior knowledge of the ceiling structure includes the correspondence between the ceiling's height direction and the vertical direction, and the correspondence between the ceiling's horizontal direction and the horizontal direction. The steps of manually mapping and reversing the signs of the three principal axes after conversion based on this prior knowledge include: The principal axis direction with the smallest angle to the vertical direction among the three principal axis directions is mapped to the height direction of the structural principal axis coordinate system, and the principal axis direction with the smallest angle to the horizontal direction among the three principal axis directions is mapped to the horizontal direction of the structural principal axis coordinate system. Based on the coordinate value distribution of the original ceiling point cloud in the height direction, determine whether the positive direction of the height direction points to the higher side of the ceiling; otherwise, flip the sign of the height direction. Based on the coordinate distribution of the original ceiling point cloud in the horizontal direction, determine whether the positive direction of the horizontal direction points to a preset horizontal reference direction; otherwise, flip the sign of the horizontal direction.
4. The method for extracting the main area of a point cloud on a ceiling as described in claim 1, characterized in that, The steps of determining the main peak positions of the one-dimensional point distribution in the height direction and the one-dimensional point distribution in the lateral direction respectively include: In the one-dimensional point distribution along the height direction, all box intervals are traversed, and the coordinate position corresponding to the box interval with the largest number of points is determined as the main peak position in the height direction and the lateral direction; When there are multiple maximum binning intervals with the same number of points in the one-dimensional point distribution in the height direction or the one-dimensional point distribution in the lateral direction, the average value of the center coordinates of the multiple maximum binning intervals with the same number of points is taken as the main peak position in the corresponding direction.
5. The method for extracting the main area of a point cloud on a ceiling as described in claim 1, characterized in that, The step of determining the main window corresponding to the height direction and the lateral direction based on the main peak position and bin count in the one-dimensional point distribution of each direction includes: Starting from the compartment where the main peak is located in the height direction, expand outwards in sections along the direction of decreasing height coordinate value, and compare the compartment count of the currently expanded compartment with the peak value of the main peak in the height direction. When the box count of two or more consecutive box intervals is lower than the product of the peak value of the main peak in the height direction and the first side expansion constraint threshold in the height direction, the expansion in the direction of decreasing coordinate value stops, and the box interval before the stopping position is taken as the boundary of the height direction on the side of decreasing coordinate value. Starting from the compartment where the main peak is located in the height direction, expand outwards in sections along the direction of increasing height coordinate value, and compare the compartment count of the currently expanded compartment with the peak value of the main peak in the height direction. When the box count of two or more consecutive box intervals is lower than the product of the peak value of the main peak in the height direction and the second side expansion constraint threshold in the height direction, the expansion in the direction of increasing coordinate value is stopped, and the box interval before the stop position is taken as the boundary of the height direction on the side of increasing coordinate value. The main window in the height direction is determined by the boundary on the side where the coordinate value decreases and the boundary on the side where the coordinate value increases.
6. The method for extracting the main area of a ceiling point cloud as described in claim 1, characterized in that, The step of determining the main window corresponding to the height direction and the lateral direction based on the main peak position and bin count in the one-dimensional point distribution of each direction includes: Taking the compartment where the main peak is located in the lateral direction as the starting compartment, the compartments are expanded outward synchronously in the directions of decreasing and increasing lateral coordinate values, respectively. The bin count of the currently expanded bin interval is compared with the product of the main peak value in the lateral direction and the expansion constraint threshold in the lateral direction. When the box count of multiple consecutive box intervals on a certain side is lower than the product, the side stops expanding, and the previous box interval at the stopping position is taken as the boundary of the lateral direction on that side. When both sides stop expanding, the main window in the horizontal direction is determined.
7. The method for extracting the main area of a point cloud on a ceiling as described in claim 1, characterized in that, After the step of retaining the point cloud that simultaneously falls within the main window in the vertical direction and the main window in the horizontal direction as the point cloud of the main area of the ceiling, the method further includes: Perform connectivity analysis on the point cloud of the main area of the ceiling, and extract the connected component with the largest area in the point cloud of the main area of the ceiling as the final main area of the ceiling; Based on the spatial adjacency relationship of points within each connected component, points whose distance to each other is less than a preset adjacency distance threshold are grouped into the same connected component. Calculate the number of points contained in each connected region, determine the connected region with the most points as the final main area of the ceiling, and remove the points in the remaining connected regions.
8. The method for extracting the main area of a ceiling point cloud as described in claim 1, characterized in that, The original ceiling point cloud is any one of airborne lidar point cloud, photogrammetric point cloud, ground-based mobile scanning point cloud, or fused point cloud. When the original ceiling point cloud contains color information or reflection intensity information, before the step of performing one-dimensional binning statistics on the point cloud along the height and lateral directions in the principal coordinate system of the structure, the method further includes: The point cloud is pre-screened based on the color information or the reflection intensity information, and points whose color value or reflection intensity value does not meet the ceiling material feature threshold are pre-removed. After the step of retaining the point cloud that simultaneously falls within the main window in the vertical direction and the main window in the horizontal direction as the point cloud of the main area of the ceiling, the method further includes: The color information or the reflection intensity information is used as auxiliary verification information to remove points in the extraction results whose color value or reflection intensity value deviates from the ceiling material feature threshold.
9. A device for extracting the main area of a ceiling point cloud, characterized in that, The ceiling point cloud main area extraction device stores a computer program, which, when executed by a processor, implements the ceiling point cloud main area extraction method according to any one of claims 1-8.
10. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method for extracting the main area of a ceiling point cloud as described in any one of claims 1-8.