Method for generating a three-dimensional real scene model of a building based on field surveying
By acquiring point cloud data at different times and performing slicing, density analysis, and component module determination, the problem of separating rigid components and flexible vegetation in complex scenes using point cloud processing methods was solved, generating high-quality 3D real-world building models and achieving high-precision preservation of component details and noise removal.
Patent Information
- Application Number
- CN202611685070.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-29
- Publication Date
- 2026-11-27
AI Technical Summary
Existing point cloud processing methods cannot effectively separate rigid components from flexible vegetation when dealing with complex aliasing scenes, resulting in geometric breaks in components, loss of details, or severe residual noise in vegetation in the real-world model, making it difficult to meet the needs of high-precision reverse modeling.
By acquiring point cloud data of the same building facade at different times, vertical slicing and density feature analysis are performed to screen candidate locations, determine the scan deviation vector and global component modulus, construct a directed graph and extract the optimal component candidate location sequence, and perform noise reduction processing to generate high-quality point cloud data.
It effectively removes outliers and redundant points, preserves the edge and detail features of components to the greatest extent, and generates high-quality 3D real-world architectural models to meet the needs of high-precision reverse modeling.
Smart Images

Figure CN123181744A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of architectural data mapping technology, specifically to a method for generating a three-dimensional real-scene model of a building based on on-site surveying. Background Technology
[0002] In the construction of digital twin cities and reverse engineering of Building Information Modeling (BIM), vehicle-mounted or backpack-mounted mobile laser scanning (MLS) systems have become the mainstream method for 3D mapping of building facades due to their efficient data acquisition capabilities. However, in the complex urban environment, building facades are often covered with semi-transparent artificial details such as balcony railings, security grilles, and air conditioning louvers. These details are often closely intertwined and overlapped with natural vegetation such as tree branches and ivy in space.
[0003] Existing point cloud segmentation and denoising techniques mainly rely on static geometric features (such as curvature and normals) or local point cloud density obtained from a single scan. However, when faced with slender and similarly shaped railing posts and vegetation branches, the static geometric features are prone to failure because the two are extremely similar in local geometry and space occupancy. This results in existing point cloud processing methods being unable to effectively separate rigid components from flexible vegetation when dealing with complex aliasing scenes. The resulting real-world models often suffer from geometric breaks in components, loss of details, or severe residual vegetation noise, making it difficult to meet the needs of high-precision reverse modeling. Summary of the Invention
[0004] To address the technical problem that existing point cloud processing methods cannot effectively separate rigid components from flexible vegetation when dealing with complex aliased scenes, resulting in real-world models that often exhibit geometric breaks in components, missing details, or severe residual noise in vegetation, this invention aims to provide a method for generating 3D real-world architectural models based on on-site surveying. The specific technical solution adopted is as follows: Obtain point cloud data of the same building facade at the first and second time points; The point cloud data at the first moment is vertically sliced to obtain slice subsets; the density characteristics of the point cloud data within each slice subset are analyzed to select candidate positions; within the preset observation window of each candidate position, the position distribution difference characteristics of the point cloud data at the first and second moments are analyzed to determine the scanning deviation vector of each candidate position; the distance characteristics between candidate positions within each slice subset are analyzed to determine the global component module. The neighborhood interval of each candidate position is determined based on the global component modulus. Within the neighborhood interval, the synchronous change characteristics between the scanning deviation vectors of the candidate positions are analyzed to determine the directional consistency index of each candidate position. Within each slice subset, the directional consistency index, scanning deviation vector, and global component modulus of the candidate positions are fused to construct a directed graph corresponding to the candidate positions, and the optimal component candidate position sequence is extracted through path search. In all the optimal component candidate position sequences, the point cloud data at the first moment is denoised based on the position characteristics of the candidate positions, the global component modulus, and the orientation consistency index to obtain high-quality point cloud data for generating a 3D real-world model of the building.
[0005] Furthermore, the method for obtaining the slice subset includes: Set a vertical slice height parameter, and use the vertical slice height parameter to extract the point cloud data at the first moment into multiple continuous horizontal layers along the vertical direction. The point cloud data contained in each horizontal layer is taken as a slice subset.
[0006] Furthermore, the method for obtaining the candidate positions includes: Within each slice subset, the point cloud data at the first moment is projected onto a horizontal projection axis parallel to the elevation orientation, and the number of point cloud data within a unit step size is counted on the horizontal projection axis as a quantity factor. All quantity factors are curve fitted to obtain the point cloud density waveform curve. All maxima are obtained on the point cloud density waveform curve, and the coordinates corresponding to all maxima on the horizontal projection axis are used as candidate positions.
[0007] Furthermore, the method for obtaining the scanning deviation vector includes: Construct a corresponding preset observation window centered on each candidate position; Within a preset observation window corresponding to each candidate position, the point cloud data at the first moment within the preset observation window is obtained as the first point cloud subset, and the point cloud data at the second moment within the preset observation window is obtained as the second point cloud subset. The first point cloud subset and the second point cloud subset are meshed using a preset size to obtain all the meshes. The mean value of all point cloud data in each mesh is used as the voxel center point, thereby obtaining the first voxel center point set and the second voxel center point set corresponding to the first point cloud subset and the second point cloud subset, respectively. For any candidate position, calculate the geometric centroid of all voxel centers in the first voxel center point set as the first centroid, calculate the geometric centroid of all voxel centers in the second voxel center point set as the second centroid, and use the vector difference between the second centroid and the first centroid as the scan deviation vector of the candidate position.
[0008] Furthermore, the method for obtaining the global component module includes: Within each slice subset, calculate the absolute value of the distance between any two candidate positions on the horizontal projection axis, and use it as the horizontal distance between the two candidate positions. Statistically analyze the frequency distribution of horizontal distances between all candidate positions within all slice subsets, construct a distance frequency histogram, and obtain the horizontal distance corresponding to the maximum frequency within a preset distance range from the distance frequency histogram as the global component modulus.
[0009] Furthermore, the method for obtaining the neighborhood interval includes: Within each slice subset, the coordinates corresponding to each candidate position on the horizontal projection axis are used as the center coordinates. With the center coordinates as the center and the global component modulus as the expansion radius, the corresponding horizontal coordinate interval is determined on the horizontal projection axis, thereby using the horizontal coordinate interval as the neighborhood interval of each candidate position.
[0010] Furthermore, the method for obtaining the directional consistency index includes: Within the neighborhood interval corresponding to each candidate position, the scan deviation vectors of all candidate positions are used as a local vector set; Calculate the mean of the outer product of each scan deviation vector in the local vector set with its own transpose, and construct the corresponding second-order original moment matrix; The second-order origin moment matrix is decomposed into eigenvalues. The largest eigenvalue is taken as the principal eigenvalue, and the second largest eigenvalue is taken as the secondary eigenvalue. The difference between the principal eigenvalue and the secondary eigenvalue is calculated as the deviation value. The numerator is the average magnitude of all scan deviation vectors in the local vector set, and the denominator is the average magnitude of all scan deviation vectors in the local vector set. The resulting ratio is used as the same-direction weighting factor. The product of the ratio of the deviation value to the principal feature value and the same-direction weighting factor is used as the directional consistency index for each candidate position.
[0011] Furthermore, the method for obtaining the directed graph includes: Within each slice subset, obtain the horizontal distance between any two candidate positions. If the horizontal distance satisfies the spacing constraint condition set based on the global component module, then construct a directed edge between the two candidate positions, and the directed edge points from the candidate position with the smaller horizontal coordinate to the candidate position with the larger horizontal coordinate. For each directed edge, the minimum value of the directional consistency index of the two candidate positions connected by the directed edge is obtained as the analysis value. The vector difference modulus between the scanning deviation vectors of the two candidate positions is calculated as the displacement cost term. The absolute value of the minimum difference between the horizontal distance between the two candidate positions and multiple preset integer multiples of the global component modulus is calculated as the modulus cost term. The sum of the displacement cost term and the modulus cost term is used as the cost factor. The ratio of the cost factor to the analysis value is used as the connection cost of the directed edge. Construct a directed graph corresponding to each slice subset by combining all candidate positions and all directed edges with connection costs.
[0012] Furthermore, the method for obtaining the optimal candidate component position sequence includes: In the directed graph corresponding to each slice subset, a virtual source point and a virtual sink point are created. Candidate positions with a directional consistency index greater than a preset confidence threshold are used as marker points. Marker points whose horizontal coordinates are within the leftmost preset width range of the slice subset are formed into a starting point set. A directed edge is established from the virtual source point to each marker point in the starting point set, with the connection cost set to a preset value. Marker points whose horizontal coordinates are within the rightmost preset width range of the slice subset are formed into a termination point set. A directed edge is established from each marker point in the termination point set to the virtual sink point, with the connection cost set to a preset value, thereby obtaining the updated graph structure. In the updated graph structure, the Dijkstra algorithm is used to obtain the shortest path, and the virtual source and virtual sink points on the shortest path are removed to obtain the optimal component candidate position sequence.
[0013] Furthermore, the method for acquiring the high-quality point cloud data includes: For any candidate position in the sequence of all optimal component candidate positions, within the preset observation window of the candidate position corresponding to that candidate position, extract the maximum and minimum coordinate values of all point cloud data at the first moment in the direction perpendicular to the building facade, and form the depth distribution interval of that candidate position; Using the position coordinates of the candidate location as the center, and combining the vertical slice height parameter, depth distribution range, and global component modulus of the slice subset to which the candidate location belongs, construct the three-dimensional spatial bounding box corresponding to the candidate location; If the orientation consistency index of the candidate position is greater than or equal to the preset confidence threshold, then all point cloud data at the first moment within the 3D bounding box corresponding to the candidate position are retained; if the orientation consistency index of the candidate position is less than the preset confidence threshold, then the distance between the point cloud data at the first moment within the 3D bounding box and the first centroid of the candidate position corresponding to the candidate position is calculated as a distance parameter, and point cloud data with a distance parameter less than the preset distance threshold are retained. All point cloud data retained at the first moment are merged to form high-quality point cloud data.
[0014] The present invention has the following beneficial effects: First, point cloud data of the same building facade at the first and second time points are acquired. The 3D point cloud data of the building facade is massive and its spatial topology is complex. By vertically slicing the point cloud data at the first time point to obtain subsets, the computational complexity of subsequent analysis can be significantly reduced. Solid components inevitably generate point cloud density clusters on the projection axis. By analyzing the density characteristics of the point cloud data within each subset and filtering candidate locations, key feature areas with high point cloud density can be automatically located. Then, within a preset observation window at each candidate location, the difference in point cloud position distribution between the two time points is analyzed to determine the scanning deviation vector, accurately capturing local systematic deviations at each candidate location caused by scanning attitude drift or environmental changes. Furthermore, the distance characteristics between candidate locations within each subset are analyzed to determine the global component modulus. This allows for the establishment of spatial association constraints between components from a global perspective. Based on the global component modulus, the neighborhood interval of each candidate location is determined. When the deviation vector changes in the same direction, it indicates belonging to the same component; when it changes in opposite directions or irregularly, it may indicate noise or component boundaries. Therefore, the synchronous change characteristics between the scanning deviation vectors of candidate locations are analyzed within the neighborhood interval to determine the directional consistency index. Next, a directed graph is constructed by fusing directional consistency index, scan deviation vector, and global component modulus. The optimal component candidate position sequence is extracted through path search. Based on the position features of nodes, global component modulus, and directional consistency index, all point cloud data at the first moment are denoised from all optimal component candidate position sequences. The identified component topological relationships and directional consistency can be used to adaptively remove noise. While effectively removing outliers and redundant points, the edge and detail features of components are preserved to the greatest extent. Finally, high-quality point cloud data is generated for the reconstruction of the 3D real scene model of the building. Attached Figure Description
[0015] Figure 1 The present invention provides a method flowchart for generating a three-dimensional real-scene model of a building based on on-site surveying, as an embodiment of the present invention. Detailed Implementation
[0016] Please see Figure 1 The diagram illustrates a method flowchart for generating a 3D building reality model based on on-site surveying, according to an embodiment of the present invention. The method includes the following steps: Step S1: Obtain point cloud data of the same building facade at the first and second time points.
[0017] Using a vehicle-mounted or backpack-mounted mobile laser scanning system, the facade of the target building is scanned in two independent surveying operations, and the original 3D point cloud data are recorded as the first and second time points, respectively. The original point cloud data is usually located in an arbitrary world coordinate system, and the building facade has random angles with the coordinate axes. To avoid geometric overlap and distortion in subsequent projection operations, coordinate system normalization processing needs to be performed on the two sets of point cloud data.
[0018] The random sampling consensus algorithm is used to perform plane fitting on the point cloud data at the first moment. The plane containing the most points is extracted as the main plane of the building facade, and the initial normal vector of the main plane is obtained. Then, the direction vector from the scanner origin to the main plane is calculated. The direction vector is multiplied by the initial normal vector. If the result of the dot product is less than zero, the initial normal vector is reversed to obtain a target normal vector that points to the outside of the building.
[0019] Next, a rotation matrix is constructed based on the target normal vector. This rotation matrix is used to rotate the target normal vector to the depth direction parallel to the target coordinate system, i.e., the Y-axis. Finally, the rotation matrix is used to perform a rigid body rotation transformation on the point cloud data at the first and second time moments. The transformed building facade is parallel to the horizontal-vertical plane of the target coordinate system, i.e., the XOZ plane.
[0020] Step S2: Vertically slice the point cloud data at the first time step to obtain slice subsets; analyze the density characteristics of the point cloud data within each slice subset and select candidate positions; within the preset observation window of each candidate position, analyze the positional distribution difference characteristics of the point cloud data at the first and second time steps and determine the scanning deviation vector of each candidate position; analyze the distance characteristics between candidate positions within each slice subset and determine the global component module.
[0021] The amount of 3D point cloud data of building facades is extremely large, and different components may overlap significantly in the vertical direction. Direct processing in 3D space can easily cause cross-floor feature interference. In this embodiment of the invention, the point cloud data at the first moment is fixed as the reference feature. Therefore, the point cloud data at the first moment can be vertically sliced, realizing dimensionality reduction and decoupling in 3D space, obtaining a slice subset, dividing the complex 3D data into multiple independent height layers, avoiding topological chaos in the vertical direction, and greatly reducing the computational complexity of subsequent analysis.
[0022] Preferably, in one embodiment of the present invention, the method for obtaining a subset of slices includes: A vertical slice height parameter is set, and the point cloud data at the first moment is extracted into multiple continuous horizontal layers along the vertical direction using this parameter. The point cloud data contained in each horizontal layer is taken as a slice subset. It should be noted that in this embodiment of the invention, the vertical slice height parameter is set to 50 mm. The specific value can be adjusted according to the implementation scenario and is not limited here.
[0023] Since the point cloud generated by laser scanning contains tens of millions of discrete points, the efficiency of point-by-point calculation is extremely low, and a single point cannot represent the structural features of the component. However, after the solid component is projected, point cloud clusters will inevitably be generated on the horizontal axis. Therefore, we can analyze the density characteristics of the point cloud data in each slice subset, screen out candidate positions, and use them to quickly filter out large areas of blank and invalid regions, structuring the massive scattered point cloud data into a few high-value discrete primitives (candidate positions).
[0024] Preferably, in one embodiment of the present invention, the method for obtaining candidate positions includes: The point cloud within the slice subset is still spatially scattered. Therefore, within each slice subset, the point cloud data at the first moment is projected onto a horizontal projection axis (X-axis) parallel to the elevation direction for further dimensionality reduction, compressing the spatial discrete points into a one-dimensional signal. Then, the number of point cloud data within a unit step size (set to 20 mm in this embodiment, but the specific value can be adjusted according to the implementation scenario and is not limited here) on the horizontal projection axis is counted as a quantity factor. That is, the disordered point cloud coordinates are transformed into a numerical sequence with an ordered distribution along the horizontal projection axis. The larger the quantity factor, the more point cloud data fall within that unit step size, and the greater the density will be. All quantity factors are curve fitted to obtain the point cloud density waveform curve.
[0025] Finally, all the maxima are obtained on the point cloud density waveform curve, and the coordinates of all the maxima on the horizontal projection axis are used as candidate positions. The candidate positions are the positions where the point cloud data is more dense, and they are more likely to correspond to rigid building components or flexible vegetation noise.
[0026] Because a single scan cannot distinguish between rigid railings and flexible tree branches with similar shapes, and because a moving laser inevitably introduces trajectory system errors when passing the same location twice, the system errors cause the point cloud data of the same rigid object to exhibit a general and regular translation. However, for flexible tree branches, in addition to the system errors, they may also be subject to random deformation due to wind noise, resulting in a chaotic and divergent point cloud data. Therefore, a preset observation window was determined for each candidate position, and the positional distribution differences of the point cloud data at the first and second moments were analyzed within the preset observation window to determine the scanning deviation vector for each candidate position, which is used to characterize the system trajectory drift and the displacement characteristics of the object itself.
[0027] Preferably, in one embodiment of the present invention, the method for obtaining the scanning deviation vector includes: A corresponding preset observation window is constructed with each candidate position as the center. In this embodiment of the invention, the size of the preset observation window is set as follows: with the candidate position coordinates as the center, the width is set to 80 mm on the horizontal projection axis, the height is set to the vertical slice height parameter of the slice subset in the Z-axis direction, and the Y-axis direction covers the entire measurement range.
[0028] Then, within the preset observation window corresponding to each candidate position, the point cloud data at the first moment within the preset observation window is obtained as the first point cloud subset, and the point cloud data at the second moment within the preset observation window is obtained as the second point cloud subset.
[0029] Because the point cloud density distribution varies during mobile scanning, directly calculating the point cloud data in the first and second point cloud subsets will cause the subsequent calculation of the geometric centroid to shift towards the high-density region. Therefore, the first and second point cloud subsets are meshed using a preset size to obtain all the meshes. The mean value of all point cloud data in each mesh is used as the voxel center point, thus obtaining the first voxel center point set and the second voxel center point set corresponding to the first and second point cloud subsets, respectively.
[0030] Next, for any candidate position, the geometric centroids of all voxel centers within the first voxel center set are calculated as the first centroid, and the geometric centroids of all voxel centers within the second voxel center set are calculated as the second centroid. The first and second centroids represent the equivalent spatial center positions of the local entity corresponding to the candidate position at the first and second time points, respectively. Finally, the vector difference between the second and first centroids is calculated as the scan deviation vector for the candidate position. This scan deviation vector mainly reflects the system trajectory drift and the displacement characteristics of the object itself.
[0031] The installation spacing of man-made components (such as railing posts and window frames) varies in different buildings. If fixed parameters set manually are used for evaluation, the applicability to different facade specifications will be lost. Therefore, in this embodiment of the invention, the arrangement rules of man-made building components are utilized. Based on the distance characteristics between candidate positions in each slice subset, the global component module is determined, providing an adaptive benchmark for subsequent processes.
[0032] Preferably, in one embodiment of the present invention, the method for obtaining the global component module includes: First, within each slice subset, calculate the absolute value of the distance between any two candidate positions on the horizontal projection axis. This value is used as the horizontal distance between the two candidate positions. The larger the horizontal distance, the farther apart the two candidate positions are, which reflects the possible range of the entity's location.
[0033] Then, the frequency distribution of horizontal distances between all candidate locations within all slice subsets is statistically analyzed, and a distance frequency histogram is constructed. In the distance frequency histogram, the larger the frequency, the more often the corresponding horizontal distance appears, and the more likely it is to be the standard spacing of regular components arranged on the building facade. Therefore, the horizontal distance corresponding to the maximum frequency within the preset distance range is taken as the global component module.
[0034] It should be noted that if the horizontal distance is too small (e.g., less than 50mm), it may be random noise within the same cloud cluster; if the horizontal distance is too large, it exceeds the arrangement interval of regular railings, louvers and other periodic components. Therefore, the preset distance range in this embodiment of the present invention is set to (50, 500], in millimeters. The specific value can be adjusted according to the implementation scenario and is not limited here.
[0035] Step S3: Determine the neighborhood interval of each candidate position based on the global component modulus, and analyze the synchronous change characteristics between the scanning deviation vectors of the candidate positions within the neighborhood interval to determine the directional consistency index of each candidate position; within each slice subset, fuse the directional consistency index, scanning deviation vector, and global component modulus of the candidate positions to construct the directed graph corresponding to the candidate positions, and extract the optimal component candidate position sequence through path search.
[0036] In order to ensure that the range of data extracted when evaluating the location of a component conforms to its own reasonable physical structural span, the neighborhood interval of each candidate location can be determined based on the global component modulus obtained in the aforementioned steps.
[0037] Preferably, in one embodiment of the present invention, the method for obtaining the neighborhood interval includes: Within each slice subset, the coordinates of each candidate position on the horizontal projection axis are used as the center coordinates. Using these center coordinates as the center and the global component module as the expansion radius, a corresponding horizontal coordinate interval is determined on the horizontal projection axis. The interval range is... ,in, This represents the center coordinates of the i-th candidate position. This represents the global component module, thus using the horizontal coordinate interval as the neighborhood interval for each candidate position.
[0038] Given that individual deviation vectors may contain errors, the scanning deviation vectors of all candidate positions can be analyzed within the aforementioned neighborhood interval. It is known that the overall offset of a rigid object results in absolutely parallel and synchronous vectors; while the random swaying of flexible vegetation results in divergent and chaotic vectors. Therefore, within the neighborhood interval of each candidate position, the synchronous change characteristics among the scanning deviation vectors of all candidate positions in that local range are analyzed. This quantifies the distribution pattern of the group, yields the directional consistency index for each candidate position, and assigns a rigid body confidence level to each candidate position.
[0039] Preferably, in one embodiment of the present invention, the method for obtaining the directional consistency index includes: Within the neighborhood interval corresponding to each candidate position, the scanning deviation vectors of all candidate positions are used as a local vector set, which represents the overall displacement trend of the candidate position and its surroundings.
[0040] Then, the mean of the outer product of each scan deviation vector and its own transpose within the local vector set is calculated to construct the corresponding second-order original moment matrix. The second-order original moment matrix can quantify the energy distribution of the scan deviation vector in three-dimensional space.
[0041] Then, the second-order origin moment matrix is decomposed into eigenvalues. The largest eigenvalue is taken as the principal eigenvalue. The principal eigenvalue represents the energy of the local vector set in the main direction of change, that is, the magnitude of the system trajectory drift. The second largest eigenvalue is taken as the secondary eigenvalue. The secondary eigenvalue represents the degree of dispersion of the local vector set in the direction perpendicular to the principal direction, that is, the magnitude of the local random disturbance such as wind force.
[0042] The difference between the primary eigenvalue and the secondary eigenvalue is calculated as the deviation value. When the candidate location belongs to a rigid component, it is affected by the overall system drift, and the local vector set is highly consistent. Therefore, the secondary eigenvalue tends to be close to 0, and the deviation value will be larger. Conversely, when the candidate location belongs to flexible vegetation, the primary and secondary eigenvalues are similar, and the deviation value is close to 0.
[0043] Finally, the magnitude of the average of all scan deviation vectors in the local vector set is calculated and divided by the mean of the magnitudes of all scan deviation vectors in the local vector set to obtain the homing weight factor. When all vectors of a rigid component are in the same direction, the homing weight factor approaches 1, and vice versa. The ratio of the deviation value to the principal eigenvalue is multiplied by the homing weight factor, and the resulting product is used as the directional consistency index for each candidate position. When the directional consistency index is larger, it indicates that the scan deviation vectors in the neighborhood of the candidate position are highly synchronized, and the confidence that the candidate position belongs to a rigid component is higher. Conversely, when the directional consistency index is smaller, it means that the scan deviation vectors in the neighborhood of the candidate position are more dispersed, and the confidence that it belongs to flexible vegetation or noise is higher.
[0044] It should be noted that if a special case occurs where the principal feature value is 0, then when calculating the directional consistency index, the denominator is the sum of the principal feature value and the preset constant. The purpose of the preset constant is to prevent the denominator from being 0, and it can be set to 0.001. The specific value can be adjusted according to the implementation scenario.
[0045] The aforementioned calculated directional consistency index can occasionally produce false positives (e.g., a leaf happens to undergo parallel displacement). Therefore, judging each candidate position in isolation based on this index can lead to broken components or residual isolated noise in the extracted components. In this embodiment of the invention, within each slice subset, the directional consistency index, scanning deviation vector, and global component modulus representing whether the building design spacing is met, calculated within the neighborhood interval of each candidate position, are fused to construct a directed graph corresponding to the candidate positions. After the directed graph is established, in order to select the coordinates corresponding to the true continuous components from the complex candidate positions and filter out the coordinates composed of vegetation, global optimization is performed in the directed graph. This automatically bypasses vegetation interference nodes and connects discrete high-confidence primitives, elevating local features to a global topological structure, eliminating isolated noise, ensuring the continuity and integrity of the extracted components, and extracting the optimal component candidate position sequence.
[0046] Preferably, in one embodiment of the present invention, the method for obtaining the optimal candidate position sequence of components includes: Within each slice subset, the horizontal distance between any two candidate positions is obtained. If the horizontal distance satisfies the spacing constraint set based on the global component module, a directed edge is constructed between these two candidate positions, with the directed edge pointing from the candidate position with the smaller horizontal coordinate to the candidate position with the larger horizontal coordinate. The spacing constraint here is set as follows: ;in, This represents the horizontal distance between candidate position i and candidate position j. This represents the global component module. The spacing constraint setting can eliminate invalid combinations of candidate positions with extremely unreasonable spatial distances (redundant nodes or noise points that are too close together, and combinations of faults that are too far apart). The specific numerical settings here can be adjusted according to the implementation scenario and are not limited here.
[0047] Then, for each directed edge, the minimum value of the directional consistency index between the two candidate positions connected by the directed edge is obtained as the analysis value. The reason for selecting the minimum value is to represent the lowest rigidity confidence in this connection. If the minimum value is still larger at this time, it indicates that both ends are stable components. The vector difference modulus between the scanning deviation vectors of the two candidate positions is calculated as the displacement cost term. The smaller the displacement cost term, the smaller the degree of spatial deformation between the two candidate positions, that is, the higher the consistency of the system drift they are subjected to. Conversely, the larger the displacement cost term, the more severe the deformation has occurred, which is very likely to be connected to an irrelevant noise point. The absolute value of the minimum difference between the horizontal distance between the two candidate positions and multiple preset integer multiples of the global component modulus is calculated as the modulus cost term. The modulus cost term is used to characterize the degree of obedience of the horizontal distance between the two candidate nodes to the building arrangement rule. The larger the value, the more scattered the arrangement. It should be noted that in this embodiment of the invention, the preset integer is {1, 2, 3}. In architectural design, rigid components such as balcony railings and exterior wall louvers are arranged according to the standard spacing (i.e., the global component module) and other rhythms. The actual horizontal distance between two components should theoretically be strictly equal to 1 times (adjacent components), 2 times (one component apart), or 3 times (two components apart) the module. If the absolute value of the difference calculated when calculating the module cost is extremely small (tending to 0), it means that the two candidate positions conform to the standard rhythm and have a very high probability of being artificial components. Therefore, the module cost is extremely low. If it is a randomly growing tree branch with no regularity in spacing, the absolute value of the calculated difference will be very large, resulting in a very high cost.
[0048] Next, the sum of the displacement cost term and the modulus cost term is calculated as the cost factor. The larger the cost factor, the lower the probability that the two candidate positions are real continuous components, and therefore the higher the cost. Based on the previous analysis, the larger the analysis value, the higher the probability that they are real continuous components. Therefore, the ratio of the cost factor to the analysis value is used as the connection cost of the directed edge. The larger the connection cost, the less likely it is to be a candidate position corresponding to a component.
[0049] Construct a directed graph corresponding to each slice subset by combining all candidate positions and all directed edges with connection costs.
[0050] If the search is performed directly in the aforementioned directed graph, it is highly likely to start from noisy points, resulting in an unexpected final result. Therefore, in the directed graph corresponding to each slice subset, virtual source points and virtual sink points are created. Candidate positions with a directional consistency index greater than a preset confidence threshold (set to 0.8 in this embodiment, the specific value can be adjusted according to the implementation scenario) are designated as marker points. Marker points whose horizontal coordinates are within a preset width range (e.g., 300 mm from the leftmost edge) of the slice subset are formed into a starting point set. Directed edges are established from the virtual source point to each marker point in the starting point set, with the connection cost set to a preset value. Marker points whose horizontal coordinates are within a preset width range (e.g., 300 mm from the rightmost edge) of the slice subset are formed into a termination point set. Directed edges are established from each marker point in the termination point set to the virtual sink point, with the connection cost set to a preset value, thereby obtaining the updated graph structure. It should be noted that in this embodiment of the invention, the preset value is 0, indicating that the starting and ending actions do not incur additional penalties.
[0051] Finally, in updating the graph structure, Dijkstra's algorithm is used to obtain the shortest path, find the through path with the minimum cumulative cost, eliminate candidate locations that may represent vegetation with extremely high cost, thus stripping away the complex noise superimposed in the components, removing the virtual source points and virtual sink points on the shortest path, and obtaining the optimal component candidate location sequence.
[0052] It should be noted that Dijkstra's algorithm is a well-known technique, and the process of finding the shortest path will not be elaborated here. Since directed edges can only point from left to right (horizontal coordinates from smaller to larger), and the source vertex is restricted to the leftmost and the sink vertex to the rightmost, Dijkstra's algorithm is forced to find a path that traverses the entire graph. Under this rigid premise of traversing the entire graph, the algorithm finds the path with the minimum total cost, thus accurately identifying the most tightly connected, lowest-cost, and most continuous structural skeleton of real components.
[0053] Step S4: In all the optimal component candidate position sequences, based on the position characteristics of the candidate positions, the global component modulus, and the orientation consistency index, all point cloud data at the first moment are denoised to obtain high-quality point cloud data for generating a 3D real-world model of the building.
[0054] The optimal component candidate position sequence in the aforementioned steps determines all position coordinates representing the center of the component skeleton. Here, the position coordinates of each candidate position, the global component module, and the orientation consistency index can be used to denoise all point cloud data at the first moment, thereby obtaining high-quality point cloud data and generating a 3D real-world model of the building.
[0055] Preferably, in one embodiment of the present invention, the method for acquiring high-quality point cloud data includes: For any candidate position in the sequence of all optimal component candidate positions, within the preset observation window of the candidate position, extract the maximum and minimum coordinate values of all point cloud data at the first moment in the direction perpendicular to the building facade, which constitutes the depth distribution range of the candidate position, and can provide accurate depth constraints for subsequent selection of point cloud data.
[0056] Centered on the position coordinates of the candidate location, and combined with the vertical slice height parameter (determining the Z-axis clipping height), depth distribution range (determining the Y-axis clipping thickness), and global component module (determining the X-axis clipping width) of the slice subset to which the candidate location belongs, a three-dimensional spatial bounding box corresponding to the candidate location is constructed. The constructed three-dimensional spatial bounding box can fit the local real physical volume of the component.
[0057] If the directional consistency index of a candidate location is greater than or equal to a preset confidence threshold, it indicates that the local area is extremely pure and free from vegetation interference. Retaining all point clouds within the bounding box maximizes the preservation of the original geometric texture of the components. Therefore, all point cloud data at the first moment within the 3D bounding box corresponding to the candidate location are retained. Conversely, if the directional consistency index of a candidate location is less than the preset confidence threshold, it indicates that the corresponding candidate location may be mixed with a large amount of noise. Therefore, the distance between the point cloud data at the first moment within the 3D bounding box and the first centroid of the candidate location is calculated as a distance parameter. Only point cloud data with a distance parameter less than a preset distance threshold are retained. This achieves strict reduction of the retention distance and precise removal of noise adhering to the surface for areas with low confidence (low index, risk of vegetation attachment).
[0058] Finally, all point cloud data retained at the first moment are merged to form high-quality point cloud data.
[0059] It should be noted that the preset confidence threshold can be set to 0.75, and the preset distance threshold can be set to 0.4 times the global component modulus. The specific values can be adjusted according to the implementation scenario and are not limited here.
[0060] After obtaining high-quality point cloud data, it can be used to generate a 3D reality model of the building. The output 3D reality model has a clear building appearance without messy vegetation, and maintains extremely high geometric accuracy and topological integrity, perfectly meeting the needs of subsequent BIM reverse modeling and digital twin applications.
[0061] In summary, point cloud data of the same building facade at the first and second time points are first acquired. The 3D point cloud data of the building facade is massive and its spatial topology is complex. By vertically slicing the point cloud data at the first time point to obtain subsets, the computational complexity of subsequent analysis can be significantly reduced. Solid components inevitably generate point cloud density clusters on the projection axis. By analyzing the density characteristics of the point cloud data within each subset and filtering candidate locations, key feature areas with high point cloud density can be automatically located. Then, within a preset observation window at each candidate location, the difference in point cloud position distribution between the two time points is analyzed to determine the scanning deviation vector, accurately capturing local systematic deviations at each candidate location caused by scanning attitude drift or environmental changes. Furthermore, the distance characteristics between candidate locations within each subset are analyzed to determine the global component modulus. This allows for the establishment of spatial association constraints between components from a global perspective. Based on the global component modulus, the neighborhood interval of each candidate location is determined. When the deviation vector changes in the same direction, it indicates belonging to the same component; when it changes in opposite directions or irregularly, it may indicate noise or component boundaries. Therefore, the synchronous change characteristics between the scanning deviation vectors of candidate locations are analyzed within the neighborhood interval to determine the directional consistency index. Next, a directed graph is constructed by fusing directional consistency index, scan deviation vector, and global component modulus. The optimal component candidate position sequence is extracted through path search. Based on the position features of nodes, global component modulus, and directional consistency index, all point cloud data at the first moment are denoised from all optimal component candidate position sequences. The identified component topological relationships and directional consistency can be used to adaptively remove noise. While effectively removing outliers and redundant points, the edge and detail features of components are preserved to the greatest extent. Finally, high-quality point cloud data is generated for the reconstruction of the 3D real scene model of the building.
[0062] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0063] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A method for generating a 3D real-scene model of a building based on on-site surveying, characterized in that, The method includes: Obtain point cloud data of the same building facade at the first and second time points; The point cloud data at the first moment is vertically sliced to obtain slice subsets; the density characteristics of the point cloud data within each slice subset are analyzed to select candidate positions; within the preset observation window of each candidate position, the position distribution difference characteristics of the point cloud data at the first and second moments are analyzed to determine the scanning deviation vector of each candidate position; the distance characteristics between candidate positions within each slice subset are analyzed to determine the global component module. The neighborhood interval of each candidate position is determined based on the global component modulus. Within the neighborhood interval, the synchronous change characteristics between the scanning deviation vectors of the candidate positions are analyzed to determine the directional consistency index of each candidate position. Within each slice subset, the directional consistency index, scanning deviation vector, and global component modulus of the candidate positions are fused to construct a directed graph corresponding to the candidate positions, and the optimal component candidate position sequence is extracted through path search. In all the optimal component candidate position sequences, the point cloud data at the first moment are denoised based on the position characteristics of the candidate positions, the global component modulus, and the orientation consistency index to obtain high-quality point cloud data for generating a 3D real-world model of the building.
2. The method for generating a 3D real-scene model of a building based on on-site surveying according to claim 1, characterized in that, The method for obtaining the slice subset includes: Set a vertical slice height parameter, and use the vertical slice height parameter to extract the point cloud data at the first moment into multiple continuous horizontal layers along the vertical direction. The point cloud data contained in each horizontal layer is taken as a slice subset.
3. The method for generating a three-dimensional real-scene model of a building based on on-site surveying according to claim 1, characterized in that, The method for obtaining the candidate positions includes: Within each slice subset, the point cloud data at the first moment is projected onto a horizontal projection axis parallel to the elevation orientation, and the number of point cloud data within a unit step size is counted on the horizontal projection axis as a quantity factor. All quantity factors are curve fitted to obtain the point cloud density waveform curve. All maxima are obtained on the point cloud density waveform curve, and the coordinates corresponding to all maxima on the horizontal projection axis are used as candidate positions.
4. The method for generating a three-dimensional real-scene model of a building based on on-site surveying according to claim 1, characterized in that, The method for obtaining the scanning deviation vector includes: Construct a corresponding preset observation window centered on each candidate position; Within a preset observation window corresponding to each candidate position, the point cloud data at the first moment within the preset observation window is obtained as the first point cloud subset, and the point cloud data at the second moment within the preset observation window is obtained as the second point cloud subset. The first point cloud subset and the second point cloud subset are meshed using a preset size to obtain all the meshes. The mean value of all point cloud data in each mesh is used as the voxel center point, thereby obtaining the first voxel center point set and the second voxel center point set corresponding to the first point cloud subset and the second point cloud subset, respectively. For any candidate position, calculate the geometric centroid of all voxel centers in the first voxel center point set as the first centroid, calculate the geometric centroid of all voxel centers in the second voxel center point set as the second centroid, and use the vector difference between the second centroid and the first centroid as the scan deviation vector of the candidate position.
5. The method for generating a three-dimensional real-scene model of a building based on on-site surveying according to claim 1, characterized in that, The method for obtaining the global component modulus includes: Within each slice subset, calculate the absolute value of the distance between any two candidate positions on the horizontal projection axis, and use it as the horizontal distance between the two candidate positions. Statistically analyze the frequency distribution of horizontal distances between all candidate positions within all slice subsets, construct a distance frequency histogram, and obtain the horizontal distance corresponding to the maximum frequency within a preset distance range from the distance frequency histogram as the global component modulus.
6. The method for generating a three-dimensional real-scene model of a building based on on-site surveying according to claim 1, characterized in that, The method for obtaining the neighborhood interval includes: Within each slice subset, the coordinates corresponding to each candidate position on the horizontal projection axis are used as the center coordinates. With the center coordinates as the center and the global component modulus as the expansion radius, the corresponding horizontal coordinate interval is determined on the horizontal projection axis, thereby using the horizontal coordinate interval as the neighborhood interval of each candidate position.
7. The method for generating a three-dimensional real-scene model of a building based on on-site surveying according to claim 1, characterized in that, The method for obtaining the directional consistency index includes: Within the neighborhood interval corresponding to each candidate position, the scan deviation vectors of all candidate positions are used as a local vector set; Calculate the mean of the outer product of each scan deviation vector in the local vector set with its own transpose, and construct the corresponding second-order original moment matrix; The second-order origin moment matrix is decomposed into eigenvalues. The largest eigenvalue is taken as the principal eigenvalue, and the second largest eigenvalue is taken as the secondary eigenvalue. The difference between the principal eigenvalue and the secondary eigenvalue is calculated as the deviation value. The numerator is the average magnitude of all scan deviation vectors in the local vector set, and the denominator is the average magnitude of all scan deviation vectors in the local vector set. The resulting ratio is used as the same-direction weighting factor. The product of the ratio of the deviation value to the principal feature value and the same-direction weighting factor is used as the directional consistency index for each candidate position.
8. The method for generating a three-dimensional real-scene model of a building based on on-site surveying according to claim 1, characterized in that, The method for obtaining the directed graph includes: Within each slice subset, obtain the horizontal distance between any two candidate positions. If the horizontal distance satisfies the spacing constraint condition set based on the global component module, then construct a directed edge between the two candidate positions, and the directed edge points from the candidate position with the smaller horizontal coordinate to the candidate position with the larger horizontal coordinate. For each directed edge, the minimum value of the directional consistency index of the two candidate positions connected by the directed edge is obtained as the analysis value. The vector difference modulus between the scanning deviation vectors of the two candidate positions is calculated as the displacement cost term. The absolute value of the minimum difference between the horizontal distance between the two candidate positions and multiple preset integer multiples of the global component modulus is calculated as the modulus cost term. The sum of the displacement cost term and the modulus cost term is used as the cost factor. The ratio of the cost factor to the analysis value is used as the connection cost of the directed edge. Construct a directed graph corresponding to each slice subset by combining all candidate positions and all directed edges with connection costs.
9. The method for generating a three-dimensional real-scene model of a building based on on-site surveying according to claim 1, characterized in that, The method for obtaining the optimal component candidate position sequence includes: In the directed graph corresponding to each slice subset, a virtual source point and a virtual sink point are created. Candidate positions with a directional consistency index greater than a preset confidence threshold are used as marker points. Marker points whose horizontal coordinates are within the leftmost preset width range of the slice subset are formed into a starting point set. A directed edge is established from the virtual source point to each marker point in the starting point set, with the connection cost set to a preset value. Marker points whose horizontal coordinates are within the rightmost preset width range of the slice subset are formed into a termination point set. A directed edge is established from each marker point in the termination point set to the virtual sink point, with the connection cost set to a preset value, thereby obtaining the updated graph structure. In the updated graph structure, the Dijkstra algorithm is used to obtain the shortest path, and the virtual source and virtual sink points on the shortest path are removed to obtain the optimal component candidate position sequence.
10. A method for generating a three-dimensional real-scene model of a building based on on-site surveying according to claim 4, characterized in that, The method for acquiring high-quality point cloud data includes: For any candidate position in the sequence of all optimal component candidate positions, within the preset observation window of the candidate position corresponding to that candidate position, extract the maximum and minimum coordinate values of all point cloud data at the first moment in the direction perpendicular to the building facade, and form the depth distribution interval of that candidate position; Using the position coordinates of the candidate location as the center, and combining the vertical slice height parameter, depth distribution range, and global component modulus of the slice subset to which the candidate location belongs, construct the three-dimensional spatial bounding box corresponding to the candidate location; If the orientation consistency index of the candidate position is greater than or equal to the preset confidence threshold, then all point cloud data at the first moment within the 3D bounding box corresponding to the candidate position are retained; if the orientation consistency index of the candidate position is less than the preset confidence threshold, then the distance between the point cloud data at the first moment within the 3D bounding box and the first centroid of the candidate position corresponding to the candidate position is calculated as a distance parameter, and point cloud data with a distance parameter less than the preset distance threshold are retained. All point cloud data retained at the first moment are merged to form high-quality point cloud data.
