Building active viewpoint planning method and system based on scanning completeness analysis
Patent Information
- Application Number
- CN202611160050.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2046-08-03
AI Technical Summary
此类方法本质上是离线的、依赖先验模型(CAD图纸或BIM)的静态站点布设,在既有建筑改造普查、装修后未及时更新图纸、或部分区域根本没有可用先验模型的场景下,房间实际布局与图纸的偏差会直接导致离线规划的站点失效或出现遮挡盲区;同时,这类方法主要面向架站式静态扫描仪的固定站点选取,无法在手持/背包式设备连续移动扫描过程中,根据现场已采集数据实时在线地动态调整下一步视点与路径,适应性不足
[0017]本申请提供的一种基于扫描完整度分析的建筑主动视点规划方法及系统,对激光扫描帧进行预处理,并基于预处理后的激光扫描帧确定当前帧位姿,得到实时点云流及对应位姿轨迹;将实时点云流沿高度方向特定区域做切片,投影生成二维占据栅格图,将二维占据栅格图分割为多个房间多边形,得到室内拓扑图;其中,室内拓扑图包括房间多边形集合、多个房间多边形的拓扑结构和几何中心;对每个房间多边形的包围盒划分体素,并基于体素的状态计算对应房间的扫描完整度指标和全局完整度;其中,体素的状态包括占据、空闲和未知;对未知状态的体素进行聚类得到若干未扫描空洞区域簇,计算每个未扫描空洞区域簇的质心及主方向,并在以该质心为中心的圆环采样带上生成候选视点;基于候选视点的信息增益和可达性代价,计算联合评分,并选取联合评分最高的前多个候选视点作为目标视点;以目标视点所属房间在拓扑图中的连通关系为约束,结合二维占据栅格图做路径搜索,得到路径点序列;若全局完整度大于预设完整度阈值且所有房间的扫描完整度指标大于预设指标阈值,或目标视点的集合为空,则扫描完成;通过实时量化空间覆盖完整度,结合房间拓扑结构自动生成下一步最佳视点与移动路径,并以完整度阈值作为闭环终止判据,从而在保证扫描完整性的前提下减少人工判断误差与冗余路径。
Smart Images

Figure CN122695144B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D real-scene reconstruction, specifically to a method and system for active viewpoint planning of buildings based on scan integrity analysis. Background Technology
[0002] Currently, mainstream handheld and backpack laser scanning equipment typically only displays the scanning trajectory and point cloud density in real time on a touchscreen or tablet during operation. Operators rely on experience to visually judge whether the corners, walls, and ceilings of the room have been "scanned." This type of solution lacks quantitative indicators of spatial coverage completeness, and operators' judgment standards vary from person to person. It is particularly prone to missing hidden areas such as behind furniture, inside ceiling access panels, and under stairwells. These missed areas are often only discovered in the later point cloud stitching and modeling stages. By this time, the equipment has already been removed from the site, requiring a new appointment and re-installation of the equipment for rescanning. This results in a high rate of secondary return visits, high on-site rework rates, and increased project timelines and labor costs. For large-scale building survey projects distributed across multiple cities, the return costs are particularly prominent.
[0003] Some studies have proposed observation network planning methods for static terrestrial laser scanners (such as VF-Plan based on visibility fields, facade scanning network planning with local-global optimization, and two-stage scanning planning frameworks for large-scale building facades). These methods model viewpoint planning as a variant of the art gallery problem, solving for a set of fixed scanning stations offline based on architectural drawings or existing BIM models before scanning, and establishing connectivity between scanning stations to support subsequent point cloud registration. Essentially, these methods rely on offline, static site deployment based on prior models (CAD drawings or BIM). In scenarios such as existing building renovation surveys, unupdated drawings after renovation, or areas lacking usable prior models, discrepancies between the actual room layout and the drawings can directly lead to the failure of offline planned sites or the emergence of blind spots. Furthermore, these methods primarily target fixed site selection for stationary static scanners and cannot dynamically adjust the next viewpoint and path in real-time based on collected data during continuous scanning with handheld / backpack-type devices, resulting in insufficient adaptability.
[0004] Cutting-edge explorations in the field of mobile robotics differ from traditional NBV (Next-Best-View) methods, which are primarily geared towards 3D reconstruction of open scenes or single objects. These methods rely on the visible information gain of grid map boundaries or viewpoint candidates as the basis for decision-making. However, purely greedy selection based on information gain can easily lead to problems such as repeated jumps between rooms and long, circuitous paths when viewpoint selection occurs. For example, if there are still some uncovered voxels in the current room and there are candidate viewpoints with higher information gain in adjacent rooms, the greedy strategy may lead the device to frequently travel between the two rooms instead of prioritizing the completion of the current room's scan before moving on. Furthermore, such methods typically use the information gain approaching zero or reaching a fixed number of iterations as the stopping condition, without forming an explicit termination criterion with an interpretable scan completeness threshold. This results in low planning efficiency, ambiguous termination conditions, and difficulty for operators to know how much more is needed.
[0005] Therefore, there is an urgent need for a method that can efficiently and dynamically adjust the next viewpoint and path based on on-site data in real time. Summary of the Invention
[0006] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a method and system for active viewpoint planning in architecture based on scan integrity analysis.
[0007] According to one aspect of this application, a building active viewpoint planning method based on scan integrity analysis is provided, comprising: preprocessing a laser scan frame and determining the current frame pose based on the preprocessed laser scan frame to obtain a real-time point cloud flow and corresponding pose trajectory; slicing the real-time point cloud flow along a specific region in the height direction, projecting it to generate a two-dimensional occupancy grid map, and dividing the two-dimensional occupancy grid map into multiple room polygons to obtain an indoor topology map; wherein, the indoor topology map includes a set of room polygons, the topological structure of the multiple room polygons, and their geometric centers; dividing the bounding box of each room polygon into voxels, and calculating the scan integrity index and global integrity of the corresponding room based on the voxel state; wherein, the voxel's bounding box is divided into voxels. The states include occupied, idle, and unknown. Voxels in unknown states are clustered to obtain several unscanned void region clusters. The centroid and principal direction of each unscanned void region cluster are calculated, and candidate viewpoints are generated on a circular sampling band centered on the centroid. Based on the information gain and reachability cost of the candidate viewpoints, a joint score is calculated, and the top few candidate viewpoints with the highest joint scores are selected as target viewpoints. Using the connectivity of the room to which the target viewpoint belongs in the topology map as a constraint, a path search is performed in conjunction with the two-dimensional occupied grid map to obtain a path point sequence. If the global completeness is greater than a preset completeness threshold and the scan completeness index of all rooms is greater than a preset index threshold, or the set of target viewpoints is empty, then the scan is complete.
[0008] In one embodiment, the preprocessing of the laser scanning frame and the determination of the current frame pose based on the preprocessed laser scanning frame to obtain the real-time point cloud flow and corresponding pose trajectory include: distorting the laser scanning frame and interpolating the distorted points within the laser scanning frame using angular velocity and acceleration to obtain a single-frame point cloud; wherein the single-frame point cloud includes: three-dimensional coordinates, reflection intensity, acquisition timestamp, and the corresponding scan line number; using a tightly coupled laser-inertial odometry system, the current frame pose of the single-frame point cloud is estimated using error state Kalman filtering or factor graph optimization; generating a primary subgraph based on multi-frame point cloud data, and performing loop closure detection on the subgraph and the global pose graph to correct accumulated drift, thereby obtaining the real-time point cloud flow and corresponding pose trajectory.
[0009] In one embodiment, the step of slicing the real-time point cloud stream along a specific region in the height direction, projecting it to generate a two-dimensional occupancy raster, and segmenting the two-dimensional occupancy raster into multiple room polygons to obtain an indoor topology map includes: slicing the real-time point cloud stream along a specific region in the height direction and projecting it to generate the two-dimensional occupancy raster; wherein, the raster value of the two-dimensional occupancy raster is the occupancy probability of the number of points in the specific region after normalization; performing a morphological closing operation on the two-dimensional occupancy raster to remove burrs, and using a region segmentation algorithm based on wall line extraction to segment the two-dimensional occupancy raster into room polygons; detecting the doorway connections between each room polygon, and constructing the indoor topology map.
[0010] In one embodiment, the step of dividing the bounding box of each room polygon into voxels and calculating the scan completeness index and global completeness of the corresponding room based on the voxel state includes: dividing the bounding box of each room polygon into voxels; determining the state of the corresponding voxel based on the number of points within the voxel; calculating the scan completeness index of the corresponding room based on the voxel state; and calculating the global completeness based on the scan completeness index of each room.
[0011] In one embodiment, determining the state of a voxel based on the number of points within the voxel includes: if the number of points within the voxel is greater than or equal to a preset number, then the state of the corresponding voxel is determined to be occupied; if the ray from any known scan pose to the voxel is not blocked but the number of points within the voxel is 0, then the state of the corresponding voxel is determined to be idle; if the voxel is blocked by other occupied voxels, making it unreachable from all scan poses, then the state of the corresponding voxel is determined to be unknown.
[0012] In one embodiment, the step of clustering voxels in unknown states to obtain several unscanned cavity region clusters, calculating the centroid and principal direction of each unscanned cavity region cluster, and generating candidate viewpoints on a circular sampling band centered on the centroid includes: clustering voxels in unknown states to obtain several unscanned cavity region clusters; calculating the centroid and principal direction of each unscanned cavity region cluster, and generating the candidate viewpoints at equal angular intervals on a circular sampling band centered on the centroid; and for each candidate viewpoint, performing voxel-level visibility projection at the sensor field of view angle, and counting the number of unknown voxels visible from the candidate viewpoint.
[0013] In one embodiment, the step of calculating a joint score based on the information gain and accessibility cost of the candidate viewpoints, and selecting the top few candidate viewpoints with the highest joint scores as target viewpoints, includes: calculating the information gain of the candidate viewpoints based on the number of unknown voxels visible to the candidate viewpoints; calculating the accessibility cost based on the walkable path length from the current viewpoint to the candidate viewpoint on the indoor topology map; calculating the joint score based on the information gain and the accessibility cost; and arranging the candidate viewpoints in descending order of the joint scores, and selecting the top few with the highest joint scores as the target candidates.
[0014] In one embodiment, the step of using the connectivity of the room to which the target viewpoint belongs in the topology map as a constraint and combining the two-dimensional occupancy grid map to perform path search to obtain the path point sequence includes: using the connectivity of the room to which the target viewpoint belongs in the topology map as a constraint, employing a heuristic algorithm combining nearest neighbor insertion and local optimization to solve the access sequence of the target viewpoint, so as to minimize the total path length; for the access paths between adjacent viewpoints, combining the two-dimensional occupancy grid map to perform path search and using cubic splines to smooth the polyline paths to obtain the path point sequence.
[0015] In one embodiment, the step of completing the scan if the global completeness is greater than a preset completeness threshold and the scan completeness index of all rooms is greater than a preset index threshold, or the set of target viewpoints is empty, includes: if the global completeness is greater than a preset completeness threshold and the scan completeness index of all rooms is greater than a preset index threshold, or the set of target viewpoints is empty, then outputting a scan completion prompt and ending the process; otherwise, generating new candidate viewpoints based on the current set of rooms that do not meet the standard and the updated set of unknown voxels, and repeating the subsequent steps.
[0016] According to another aspect of this application, a building active viewpoint planning system based on scan integrity analysis is provided, comprising: a point cloud pose acquisition module, used to preprocess laser scan frames and determine the current frame pose based on the preprocessed laser scan frames to obtain a real-time point cloud flow and corresponding pose trajectory; an indoor topology generation module, used to slice the real-time point cloud flow along a specific area in the height direction, project it to generate a two-dimensional occupancy grid map, and divide the two-dimensional occupancy grid map into multiple room polygons to obtain an indoor topology map; wherein, the indoor topology map includes a set of room polygons, the topological structure of the multiple room polygons, and their geometric centers; and an integrity calculation module, used to divide the bounding box of each room polygon into voxels, and calculate the scan integrity index and global integrity of the corresponding room based on the voxel state; wherein, the voxel state includes occupancy... The system includes modules for identifying unscanned, idle, and unknown voxels; a candidate viewpoint generation module, which clusters voxels in unknown states to obtain several unscanned void region clusters, calculates the centroid and principal direction of each unscanned void region cluster, and generates candidate viewpoints on a circular sampling strip centered on the centroid; a target viewpoint selection module, which calculates a joint score based on the information gain and reachability cost of the candidate viewpoints, and selects the top few candidate viewpoints with the highest joint scores as target viewpoints; a path sequence planning module, which performs path search based on the connectivity of the rooms to which the target viewpoints belong in the topology map, combined with the two-dimensional occupied grid map, to obtain a path point sequence; and a scan result determination module, which determines that scanning is complete if the global completeness is greater than a preset completeness threshold and the scan completeness index of all rooms is greater than a preset index threshold, or if the set of target viewpoints is empty.
[0017] This application provides a building active viewpoint planning method and system based on scan integrity analysis. The method preprocesses laser scan frames and determines the current frame pose based on the preprocessed laser scan frames, obtaining a real-time point cloud flow and corresponding pose trajectory. The real-time point cloud flow is sliced along a specific region in the height direction and projected to generate a two-dimensional occupancy raster map. This two-dimensional occupancy raster map is then divided into multiple room polygons to obtain an indoor topology map. The indoor topology map includes a set of room polygons, the topological structure of multiple room polygons, and their geometric centers. The bounding box of each room polygon is divided into voxels, and the scan integrity index and global integrity of the corresponding room are calculated based on the voxel states. The voxel states include occupied, idle, and unknown. Voxels in unknown states are clustered to obtain several unscanned void region clusters, and the scan integrity index and global integrity of each unscanned void region are calculated. The system scans the centroid and main direction of the hollow region clusters and generates candidate viewpoints on the annular sampling band centered on these centroids. Based on the information gain and accessibility cost of the candidate viewpoints, a joint score is calculated, and the top candidate viewpoints with the highest joint scores are selected as target viewpoints. Using the connectivity of the rooms to which the target viewpoints belong in the topology map as constraints, a path search is performed in conjunction with the two-dimensional occupancy grid map to obtain a path point sequence. If the global integrity is greater than a preset integrity threshold and the scan integrity index of all rooms is greater than a preset index threshold, or the set of target viewpoints is empty, the scan is completed. By quantifying the spatial coverage integrity in real time and combining it with the room topology, the system automatically generates the next optimal viewpoint and movement path, and uses the integrity threshold as the closed-loop termination criterion, thereby reducing human judgment errors and redundant paths while ensuring scan integrity. Attached Figure Description
[0018] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0019] Figure 1 This is a flowchart illustrating an exemplary embodiment of the active viewpoint planning method for buildings based on scan integrity analysis provided in this application.
[0020] Figure 2 This is a schematic diagram of the structure of an active viewpoint planning system for buildings based on scan integrity analysis, provided in an exemplary embodiment of this application.
[0021] Figure 3 This is a structural diagram of an electronic device provided in an exemplary embodiment of this application. Detailed Implementation
[0022] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.
[0023] Figure 1 This is a flowchart illustrating an exemplary embodiment of the active viewpoint planning method for buildings based on scan completeness analysis provided in this application. Figure 1 As shown, the active viewpoint planning method for buildings based on scan completeness analysis includes the following steps: Step 110: Preprocess the laser scanning frame and determine the pose of the current frame based on the preprocessed laser scanning frame to obtain the real-time point cloud flow and the corresponding pose trajectory.
[0024] This application converts the raw data (laser scan frames) collected by handheld / backpack laser scanners into point cloud streams with global pose, which serve as the input source for subsequent integrity analysis. The raw data input includes raw LiDAR scan frames, IMU six-axis data, and odometry data.
[0025] Step 120: Slice the real-time point cloud stream along a specific region in the height direction, project it to generate a two-dimensional occupancy raster map, and divide the two-dimensional occupancy raster map into multiple room polygons to obtain an indoor topology map.
[0026] The indoor topology map includes a set of room polygons, the topological structure of multiple room polygons, and their geometric centers. Based on the scanned point cloud, this application identifies room boundaries and constructs indoor spatial topological relationships, providing structured constraints for viewpoint planning.
[0027] Step 130: Divide the bounding box of each room polygon into voxels, and calculate the scan integrity index and global integrity of the corresponding room based on the voxel state.
[0028] The voxel states include occupied, idle, and unknown. This application divides the bounding box of each room polygon into voxels and calculates the scan completeness index and global completeness of the corresponding room based on the voxel states, transforming the abstract concept of whether the scan is complete into a calculable quantitative index.
[0029] Step 140: Cluster the voxels in the unknown state to obtain several unscanned cavity region clusters, calculate the centroid and principal direction of each unscanned cavity region cluster, and generate candidate viewpoints on the annular sampling band centered on the centroid.
[0030] This application clusters voxels in unknown states to obtain several unscanned cavity region clusters, calculates the centroid and principal direction of each unscanned cavity region cluster, and generates candidate viewpoints on the annular sampling band centered on the centroid to locate the region to be scanned and generate a set of candidate viewpoints.
[0031] Step 150: Calculate the joint score based on the information gain and reachability cost of the candidate viewpoints, and select the top candidate viewpoints with the highest joint scores as the target viewpoints.
[0032] This application calculates a joint score based on the information gain and accessibility cost of candidate viewpoints, and selects the top few candidate viewpoints with the highest joint scores as target viewpoints. The candidate viewpoints are ranked and selected in order of merit, taking into account both coverage benefits and mobility costs.
[0033] Step 160: Using the connectivity of the room to which the target viewpoint belongs in the topology map as a constraint, and combining it with the two-dimensional occupancy grid map, perform path search to obtain the path point sequence.
[0034] This application uses the connectivity of the room to which the target viewpoint belongs in the topology map as a constraint, and combines it with a two-dimensional occupancy grid map to perform path search, obtain a sequence of path points, and organize the selected candidate viewpoints into an executable movement path.
[0035] Step 170: If the global integrity is greater than the preset integrity threshold and the scan integrity index of all rooms is greater than the preset index threshold, or the set of target viewpoints is empty, then the scan is complete.
[0036] This application determines whether to continue the next round of supplementary scanning or end the data collection based on the overall integrity and the scan integrity indicators of all rooms, thus forming a closed loop.
[0037] This application provides a building active viewpoint planning method based on scan integrity analysis. The method preprocesses laser scan frames and determines the current frame pose based on the preprocessed laser scan frames, obtaining a real-time point cloud flow and corresponding pose trajectory. The real-time point cloud flow is sliced along a specific region in the height direction and projected to generate a two-dimensional occupancy raster map. This two-dimensional occupancy raster map is then divided into multiple room polygons to obtain an indoor topology map. The indoor topology map includes a set of room polygons, the topological structure of multiple room polygons, and their geometric centers. The bounding box of each room polygon is divided into voxels, and the scan integrity index and global integrity of the corresponding room are calculated based on the voxel states. The voxel states include occupied, idle, and unknown. Voxels in unknown states are clustered to obtain several unscanned void region clusters, and the scan integrity index and global integrity of each unscanned void region are calculated. The centroid and main direction of the cave region cluster are determined, and candidate viewpoints are generated on the annular sampling zone centered on the centroid. Based on the information gain and accessibility cost of the candidate viewpoints, a joint score is calculated, and the top candidate viewpoints with the highest joint scores are selected as target viewpoints. Using the connectivity of the rooms to which the target viewpoints belong in the topology map as constraints, a path search is performed in conjunction with the two-dimensional occupancy grid map to obtain a path point sequence. If the global integrity is greater than a preset integrity threshold and the scan integrity index of all rooms is greater than a preset index threshold, or the set of target viewpoints is empty, the scan is determined to be complete. By quantifying the spatial coverage integrity in real time, the next optimal viewpoint and movement path are automatically generated in conjunction with the room topology, and the integrity threshold is used as the closed-loop termination criterion, thereby reducing human judgment errors and redundant paths while ensuring scan integrity.
[0038] In one embodiment, step 110 can be implemented as follows: the laser scanning frame is distorted, and the distorted points within the laser scanning frame are interpolated and compensated using angular velocity and acceleration to obtain a single-frame point cloud; wherein, the single-frame point cloud includes: three-dimensional coordinates, reflection intensity, acquisition timestamp, and the scan line number to which it belongs; a tightly coupled laser-inertial odometry is used to estimate the current frame pose of the single-frame point cloud using error state Kalman filtering or factor graph optimization; a primary sub-graph is generated based on multi-frame point cloud data, and loop closure detection is performed between the sub-graph and the global pose graph to correct the accumulated drift, thereby obtaining the real-time point cloud flow and the corresponding pose trajectory.
[0039] This application performs distortion correction on laser scanning frames at a frequency of 10Hz to 20Hz, and uses IMU angular velocity and acceleration to interpolate and compensate for distorted points within the laser scanning frames, obtaining single-frame point clouds and caching them in the form of a structure array. The single-frame point cloud includes: three-dimensional coordinates, reflection intensity, acquisition timestamp, and the corresponding scan line number. A tightly coupled laser-inertial odometry is used, employing error-state Kalman filtering or factor map optimization to estimate the current frame pose of the single-frame point cloud (including position, attitude quaternions, velocity, and IMU zero bias). Sub-map generation is triggered every 20 frames acquired or when the movement distance exceeds 1 meter. Loop closure detection is performed between the sub-image and the global pose graph. The loop closure detection is based on coarse matching and fine registration of similarity described by keyframe point cloud features. When the loop closure residual is lower than a set threshold (e.g., 0.03 meters), pose graph optimization is performed to correct the cumulative drift. The distortion-reduced and pose-corrected point cloud is downsampled by voxel filtering at 0.1-meter voxels and then appended to the global point cloud cache. The cache structure is organized using a block hash table, with each 2-meter × 2-meter × 2-meter block as a storage block. This facilitates incremental queries by spatial region by subsequent modules without full loading, so as to obtain a real-time point cloud stream with globally consistent pose and corresponding pose trajectory.
[0040] In one embodiment, step 120 can be implemented as follows: slice a specific region along the height direction of the real-time point cloud stream and project it to generate a two-dimensional occupancy grid map; wherein, the grid value of the two-dimensional occupancy grid map is the occupancy probability of the number of points in the specific region after normalization; perform morphological closing operation on the two-dimensional occupancy grid map to remove burrs, and use a region segmentation algorithm based on wall line extraction to segment the two-dimensional occupancy grid map into room polygons; detect the doorway connections between each room polygon and construct an indoor topology map.
[0041] This application slices a specific region (between 1.0 and 1.8 meters, avoiding interference from floor furniture and ceiling pipes, and preserving the wall cross-section relatively completely) along the height direction of the real-time point cloud flow, and projects it to generate a two-dimensional occupancy raster map (raster resolution set to 0.05 meters). The raster values in the two-dimensional occupancy raster map are the normalized occupancy probabilities of points within that specific region. Morphological closing operations (using a 3×3 square kernel for the structuring element, iterated twice) are performed on the two-dimensional occupancy raster map to remove burrs, and a region segmentation algorithm based on wall line extraction (Hough) is employed. The transformation detects straight wall segments with an angular resolution of 1 degree and an accumulator threshold of 15% of the short side length of the raster image. Combined with the connected component filling method, it performs region growth within the closed area enclosed by the wall lines to divide the 2D occupied raster image into room polygons (each room polygon is stored as an ordered vertex coordinate array and room number). It detects the doorway connections between the room polygons (positions where the wall line on the raster image is interrupted and the interruption width is between 0.7 meters and 1.5 meters), constructs an indoor topology map, and stores it in an adjacency list structure to support subsequent queries of the set of adjacent rooms for any room.
[0042] In one embodiment, step 130 can be implemented as follows: dividing the bounding box of each room polygon into voxels; determining the state of the corresponding voxel based on the number of points within the voxel; calculating the scan completeness index of the corresponding room based on the voxel state; and calculating the global completeness based on the scan completeness index of each room.
[0043] This application divides the bounding box of each room's polygon into a 3D voxel grid with a side length of 0.1 meters. The 3D voxel grid is organized using an octree structure, with each leaf node storing a state label, the number of hit points, and the pose index at the time of the most recent update. For each voxel, its state is determined based on the number of points falling within it and the view traversal. The scan completeness index of the corresponding room is calculated based on the voxel's state. The global completeness is calculated based on the scan completeness index of each room. The formulas for calculating the scan completeness index of a single room and the global completeness are as follows: C j =(N occ,j +N free,j ) / N j ; C global =Σ(A j ·C j ) / ΣA j ; in, C j For the first j The scan integrity index for each room N occ,j For the first j The number of voxels in each room whose status has been determined is the number of voxels occupied. N free,j For the first j The number of voxels in each room that are currently in an idle state has been determined. N j For the first j The total number of voxels contained in the bounding box of each room. C global For global integrity, A j For the first j The floor area of each room.
[0044] In one embodiment, the specific implementation of step 130 above may be as follows: if the number of points in a voxel is greater than or equal to a preset number, the state of the corresponding voxel is determined to be occupied; if the ray from any known scan pose to the voxel is not blocked but the number of points in the voxel is 0, the state of the corresponding voxel is determined to be idle; if the voxel is blocked by other occupied voxels, making it unreachable from all scan poses, the state of the corresponding voxel is determined to be unknown.
[0045] The occlusion determination uses voxel-level ray projection, and checks each voxel along the line from the sensor optical center to the voxel center to see if there are any occupied voxels that have been occluded in advance. The traversal of a single ray is accelerated by a three-dimensional digital differential analysis algorithm to avoid the overhead of floating-point intersection calculation for each voxel.
[0046] In one embodiment, step 140 can be implemented as follows: clustering voxels in unknown states to obtain several unscanned void region clusters; calculating the centroid and principal direction of each unscanned void region cluster, and generating candidate viewpoints at equal angular intervals on a circular sampling band centered on the centroid; for each candidate viewpoint, performing voxel-level visibility projection with the sensor field of view angle, and counting the number of unknown voxels visible from the candidate viewpoint.
[0047] This application performs Euclidean clustering on voxels in unknown states (cluster radius 0.15 meters, minimum cluster number 10) to obtain several unscanned void region clusters, filtering out isolated noise clusters with fewer than 5 voxels (these noise clusters are mostly caused by sparse point cloud edges or voxelization quantization errors, and are not actual occlusion voids); for each unscanned void region cluster, its centroid and principal direction are calculated (principal component analysis is performed on the voxel coordinates within the cluster to obtain the first principal axis), and candidate viewpoints (24 in total) are generated at equal angular intervals (e.g., 15 degrees) on a circular sampling zone centered on this centroid (radius corresponding to the effective ranging range of a typical indoor laser scanner, e.g., 6 meters). The candidate viewpoints are limited to... Within the walkable area of the room polygon (i.e., marked as empty in the grid and more than 0.3 meters from the nearest wall, satisfying the physical size constraints of the device), for void clusters located in corridors or narrow passages, additional sampling is performed along the wall normal direction at a step size of 0.5 meters to avoid circular sampling having no effective candidates due to limited walkable areas in narrow spaces; for each candidate viewpoint, voxel-level visibility projection is performed using the sensor field of view angle (360 degrees horizontally, -15 degrees to +75 degrees vertically, corresponding to the parameters of mainstream prism laser scanning heads), the number of unknown voxels visible at the candidate viewpoint is counted, and the suggested yaw angle of the candidate viewpoint toward the centroid of the void cluster is recorded simultaneously.
[0048] In one embodiment, step 150 can be implemented as follows: calculate the information gain of a candidate viewpoint based on the number of unknown voxels visible to the candidate viewpoint; calculate the reachability cost based on the traversable path length from the current viewpoint to the candidate viewpoint on the indoor topology map; calculate the joint score based on the information gain and the reachability cost; sort the candidate viewpoints in descending order of the joint score, and select the top few with the highest joint scores as target candidates.
[0049] This application calculates the information gain of candidate viewpoints based on the number of unknown voxels visible from them; it calculates the reachability cost based on the shortest traversable path length from the current viewpoint to a candidate viewpoint on the indoor topology map, and adds a topology hop penalty if the candidate viewpoint and the current viewpoint are not in the same room vertex or adjacent vertices; it calculates a joint score based on the information gain and reachability cost; it sorts candidate viewpoints in descending order of joint score, and selects the top few (e.g., 3) with the highest joint scores as target candidates to avoid frequent pose jitter in a single optimal solution; if the overlap rate of potential coverage voxel sets among the top few candidate viewpoints after sorting exceeds 60% (i.e., two candidate viewpoints substantially cover the same void area), it retains the one with the higher score and replaces it with the next-ranked viewpoint from the candidate set to avoid redundant movement caused by repeatedly assigning viewpoints. The formulas for calculating the information gain and joint score of candidate viewpoints are as follows: g(v) = |Vis(v) ∩ U| - λ occ ·Occ penalty (v) ; F(v)=g(v) / (d(v)+β·hop(v)+ε) ; in, g(v) Candidate viewpoints v Information gain |Vis(v)∩U| Candidate viewpoints v The number of visible unknown voxels, λ occ =0.4, Occ penalty (v) Candidate viewpoints v The estimated occlusion attenuation penalty term on the path to the target cluster. F(v) For joint scoring, d(v) The shortest walkable path length. β·hop(v) For topological hop count penalty, ε To prevent constant terms with a denominator of zero, ε=0.5 .
[0050] In one embodiment, the specific implementation of step 160 above may be as follows: using the connectivity relationship of the room to which the target viewpoint belongs in the topology map as a constraint, a heuristic algorithm combining nearest neighbor insertion and local optimization is used to solve the access sequence of the target viewpoint so that the total path length is minimized; for the access path between adjacent viewpoints, a path search is performed in combination with the two-dimensional occupied grid map and the polyline path is smoothed with cubic splines to obtain the path point sequence.
[0051] This application uses the connectivity of the room to which the target viewpoint belongs in the topology graph as a constraint, and adopts a heuristic algorithm combining nearest neighbor insertion and local optimization to solve the access sequence of the target viewpoint, so as to minimize the total path length. Multiple candidate viewpoints in the same room must be visited consecutively to avoid going back and forth across rooms. For the access path between adjacent viewpoints, a path search is performed in combination with a two-dimensional occupancy grid map and the polyline path is smoothed with cubic splines to obtain a path point sequence (the path point spacing is set to 0.3 meters). For handheld / backpack scenarios (without autonomous movement capability), the path sequence is presented in the form of augmented reality prompts or highlighted arrows on a tablet map, and the suggested standing point and orientation are marked. For wheeled mobile robot scenarios, the path sequence is directly sent to the navigation module for execution.
[0052] In one embodiment, step 170 can be implemented as follows: if the global completeness is greater than a preset completeness threshold and the scan completeness index of all rooms is greater than a preset index threshold, or the set of target viewpoints is empty, then output a scan completion prompt and end the process; otherwise, generate new candidate viewpoints based on the current set of rooms that do not meet the standard and the updated set of unknown voxels, and repeat the subsequent steps.
[0053] If the global completeness is greater than the preset completeness threshold (e.g., 0.97) and the scan completeness index of all rooms is greater than the preset index threshold (e.g., 0.95) (these two thresholds can be configured according to the project accuracy level; for example, they can be increased to 0.99 for completion and acceptance level projects and decreased to 0.90 for rapid survey level projects), or the target viewpoint set is empty, then a scan completion prompt is output and the process ends; otherwise, new candidate viewpoints are generated based on the current set of rooms that do not meet the standard and the updated set of unknown voxels, and the subsequent steps are repeated to form a closed-loop iteration. Each iteration also records the completeness increment of this round compared to the previous round. If the completeness increment of three consecutive rounds is less than 0.002, it is judged as diminishing returns, and a prompt of "limited returns in the remaining area, manual confirmation is recommended" is given in advance to avoid doing multiple rounds of supplementary scanning for corners with extremely low marginal returns. To avoid inflated integrity scores or dead loops caused by voxel noise, a maximum limit on the number of iterations is set (e.g., 30). If convergence is not achieved after reaching the limit, manual review is initiated, listing the remaining rooms that do not meet the standards, their integrity scores, and the corresponding unknown voxel distribution locations, so that operators can decide whether to accept the current integrity score or use other supplementary scanning methods (such as ladder scanning or changing the sensor field of view).
[0054] The following example illustrates the implementation plan of this application using the third floor of a five-story frame-structure office building in an office park (with a building area of approximately 1,800 square meters, including 27 room units, 2 corridors, 1 open office area, and several restrooms and equipment rooms): The scanning host employs a backpack-style scanning system, equipped with a LiDAR and a nine-axis inertial measurement unit, along with a panoramic camera for texture acquisition. The host connects to the wearable edge computing unit via USB, and the front-end interaction is achieved through a tablet communicating with the backpack host to display real-time integrity values and suggest the next station.
[0055] The operator carried the equipment and walked along the corridor at a constant speed (approximately 0.8 m / s). The equipment continuously acquired laser frames at a frequency of 10 Hz. A single operation accumulated approximately 42 minutes of acquisition across the entire floor, resulting in an initial point cloud of approximately 72 million points. The system compensated for motion distortion in each point cloud frame using IMU interpolation and employed tightly coupled LIO for online pose estimation. A sub-image was generated for every 1 meter of movement, and loop closure detection was performed. In this operation, approximately 680 sub-images were generated, triggering loop closure corrections 14 times. All loop closure residuals converged to below 0.03 meters, ultimately yielding a globally consistent point cloud and trajectory with a total trajectory length of approximately 1150 meters.
[0056] The system slices the accumulated point cloud at a height of 1.0 to 1.8 meters, generating a two-dimensional raster map with a resolution of 0.05 meters (corresponding to a local working area of approximately 36,000 × 28,000 raster units, which is actually dynamically maintained in segments according to the corridor, with a single frame processing window not exceeding 2,000 × 2,000 raster units to control memory). After morphological closing operation (3 × 3 square kernel, iterated twice) and Hough wall line detection (angle resolution of 1 degree), it identifies 30 room polygons (27 independent room units + 2 corridors + 1 open office area) that are basically consistent with the design drawings, and detects 32 door openings at the wall line breaks, constructing an indoor topology map containing 30 vertices and 32 edges. After manual comparison with the as-built drawings, the deviation of the boundaries of 29 rooms from the drawings in this room segmentation result was less than 0.15 meters. Only one open office area had a local deviation of about 1.2 meters from the original drawings due to the addition of a lightweight partition wall on site. This deviation was correctly identified by the system as an independent partition based on the actual point cloud boundary, and outdated drawing information was not used. This reflects the characteristics of this application, which does not rely on prior models and is based on on-site measured data. The system persists the indoor topology map and room polygons as a JSON structure. The fields include room number, room type label, polygon vertex coordinate array, ground area, connected doorway number, and a list of adjacent room numbers, which can be used by subsequent modules to index queries using room number as the key. The response time for a single query is less than 5 milliseconds.
[0057] Each room was divided into voxels with a side length of 0.1 meters based on its bounding box. A single room of approximately 20 square meters and a floor height of 3.3 meters corresponds to approximately 66,000 voxels. The maximum depth of the octree was set to 10 levels to balance memory usage and query efficiency (a single voxel status query takes approximately 0.8 microseconds). The system continuously marked each voxel with three states: occupied, idle, and unknown. At the end of this round of data collection, the total number of voxels in the entire floor was approximately 540,000, of which 216,000 were occupied (40%), 292,000 were idle (54%), and 32,000 were unknown (6%). The overall integrity score for this round, calculated by weighting room area, was 0.94. Three rooms (a corner of an open office area with partitioned furniture and an equipment room with a ceiling-mounted access panel) had integrity scores of 0.83, 0.88, and 0.91 respectively, all below the room threshold of 0.95. The integrity scores of the remaining 27 rooms were all above 0.96. Corridors and open office areas, due to their openness and accessibility from multiple angles, generally had integrity scores above 0.97. The system displays the integrity score of each room in real-time on the tablet interface using the polygon fill color (red for integrity scores below 0.90, yellow for 0.90 to 0.95, and green for above 0.95). This allows operators to intuitively identify priority areas for cleaning without having to visually check each room individually.
[0058] The system clustered unknown voxels in three non-compliant rooms (neighborhood radius 0.15 meters, minimum cluster size 10), identifying five unscanned void clusters. After removing one noisy cluster with four voxels, four valid clusters remained: two located in the corners of the open office area (obstructed by greenery and mobile storage cabinets respectively), one above the maintenance access panel in the equipment room ceiling, and one behind a column in another open office area. For the centroid of each void cluster, 24 candidate viewpoints were generated at 15-degree intervals on a 6-meter radius ring, resulting in a total of 96 candidate viewpoints. After filtering by walkable areas (requiring candidate points to fall on free grids and be more than 0.3 meters from the nearest wall), 41 valid candidates remained. For each valid candidate viewpoint, voxel-level visibility projection is performed, and information gain and reachability path cost (including one cross-room topology hop count and hop count penalty) are calculated. After sorting, the system detects that the second and third ranked candidate viewpoints correspond to the same void cluster behind the same pillar, with a potential coverage voxel overlap rate of approximately 72%. The system retains the viewpoint with the higher score according to the overlap elimination rule and replaces it as the next ranked viewpoint. Finally, the three ranked candidate viewpoints are selected for this round of rescanning, with potential coverage voxel counts of 1420, 980, and 860, respectively, which are expected to improve the global integrity from 0.94 to approximately 0.985.
[0059] The system uses nearest neighbor insertion to solve for the access order of three candidate viewpoints and their respective two rooms, resulting in a total path length of approximately 38 meters (saving about 21 meters compared to the information gain greedy sorting scheme without topological constraints. This greedy scheme, due to the alternating lead of candidate viewpoints in the two open office areas, would guide the operator to travel back and forth between the two rooms twice. The continuous room access constraint of this invention eliminates such back-and-forth travel, reducing one cross-floor corridor turnaround). The path points are discretized at 0.3-meter intervals and smoothed with cubic splines. The tablet interface guides the operator's movement and direction with highlighted arrows and text prompts (such as "Go to the southeast corner of the equipment room, 6.2 meters away" and "Please face 30 degrees east of south to re-scan the ceiling maintenance access area"). The operator arrives at the three stations in sequence according to the prompts and completes the re-scan. The total time for a single re-scan is about 6 minutes, including about 2 minutes of movement between stations and about 4 minutes of in-situ re-scanning at the station.
[0060] After the supplementary scanning was completed, the system executed another iteration. In this round, the global completeness improved to 0.985, and the completeness of the three previously substandard rooms improved to 0.97, 0.98, and 0.96 respectively, all exceeding 0.95. The global completeness also exceeded 0.97. At the same time, the candidate viewpoint generation module no longer detected any effective void clusters, and the system determined that the termination condition was met. The tablet interface displayed the message "Scan completed, global completeness 98.5%". The entire supplementary scanning loop executed two iterations, without reaching the maximum iteration limit. The entire process (including the first round of acquisition, voxel analysis, and one round of supplementary scanning iteration) took approximately 53 minutes. Compared to the traditional operation method where operators judged the completion time based on experience and then initiated a second return visit due to omissions (including round-trip transportation and equipment setup, usually adding 2 to 4 hours), this embodiment completed the quantitatively confirmed complete coverage in the same on-site operation, avoiding the need for a second return visit.
[0061] To facilitate understanding of the actual effects of this application, another operator on the same floor performed the work in a traditional manner, visually judging the completion of the work based solely on the trajectory coverage heat map on the tablet. Afterwards, the voxel integrity analysis tool of this invention was used for offline verification, and it was found that the actual global integrity was only 0.89. In one corner of the open office area, due to being blocked by green plants and lockers, the integrity was only 0.71. This omission was not noticed by the operator during the on-site operation and was only discovered when the point cloud was stitched together to generate an orthophoto image. It was necessary to reschedule the site and send a vehicle to rescan, with the round-trip transportation and equipment setup taking a total of about 3 hours.
[0062] The viewpoint planning node runs a main loop with a fixed cycle of 2Hz. Each loop sequentially queries the S101 point cloud cache increment, triggers the voxel status refresh of the affected rooms in S103 (only refreshing the spatial area where new point clouds have been written in the last 30 seconds to avoid duplicate calculations across the entire floor), and determines whether there are any pending integrity query requests. The system provides three types of interfaces: first, an integrity status interface for the tablet front-end to poll, returning the current integrity of each room, the global integrity, and a list of rooms that do not meet the standards, with an interface response time of less than 50 milliseconds; second, a candidate viewpoint and path query interface for the path guidance interface; and third, a historical cycle recording interface for the back-end management platform to record the integrity change curve of each iteration, used for process traceability and quality tracking during the project acceptance phase.
[0063] Figure 2 This is a schematic diagram of the structure of an active viewpoint planning system for buildings based on scan integrity analysis, provided in an exemplary embodiment of this application. Figure 2 As shown, the building active viewpoint planning system 20 based on scan integrity analysis includes: a point cloud pose acquisition module 21, used to preprocess the laser scan frame and determine the pose of the current frame based on the preprocessed laser scan frame, obtaining a real-time point cloud flow and corresponding pose trajectory; an indoor topology generation module 22, used to slice the real-time point cloud flow along a specific area in the height direction, project it to generate a two-dimensional occupancy grid map, and divide the two-dimensional occupancy grid map into multiple room polygons to obtain an indoor topology map; wherein, the indoor topology map includes a set of room polygons, the topological structure of multiple room polygons, and their geometric centers; and an integrity calculation module 23, used to divide the bounding box of each room polygon into voxels, and calculate the scan integrity index and global integrity of the corresponding room based on the voxel state; wherein, the voxel state includes occupied, idle, and unoccupied. The system comprises the following modules: a candidate viewpoint generation module 24, which clusters voxels in unknown states to obtain several unscanned void region clusters, calculates the centroid and principal direction of each unscanned void region cluster, and generates candidate viewpoints on a circular sampling strip centered on the centroid; a target viewpoint selection module 25, which calculates a joint score based on the information gain and reachability cost of the candidate viewpoints, and selects the top few candidate viewpoints with the highest joint scores as target viewpoints; a path sequence planning module 26, which performs path search by combining the connectivity relationship of the room to which the target viewpoint belongs in the topology map with a two-dimensional occupied grid map to obtain a path point sequence; and a scan result determination module 27, which determines that the scan is complete if the global completeness is greater than a preset completeness threshold and the scan completeness index of all rooms is greater than a preset index threshold, or if the set of target viewpoints is empty.
[0064] This application provides an active viewpoint planning system for buildings based on scan integrity analysis. A point cloud pose acquisition module 21 preprocesses laser scan frames and determines the current frame pose based on the preprocessed laser scan frames, obtaining a real-time point cloud flow and corresponding pose trajectory. An indoor topology generation module 22 slices the real-time point cloud flow along a specific area in the height direction, projects it to generate a two-dimensional occupancy grid map, and divides the two-dimensional occupancy grid map into multiple room polygons to obtain an indoor topology map. The indoor topology map includes a set of room polygons, the topological structure of multiple room polygons, and their geometric centers. An integrity calculation module 23 divides the bounding box of each room polygon into voxels and calculates the scan integrity index and global integrity of the corresponding room based on the voxel state. The voxel state includes occupied, idle, and unknown. A candidate viewpoint generation module 24 clusters voxels in the unknown state to obtain several unscanned void region clusters and calculates the scan integrity index and global integrity of each room. The centroid and main direction of each unscanned void region cluster are determined, and candidate viewpoints are generated on a circular sampling band centered on the centroid. The target viewpoint selection module 25 calculates a joint score based on the information gain and accessibility cost of the candidate viewpoints, and selects the top candidate viewpoints with the highest joint scores as target viewpoints. The path sequence planning module 26 uses the connectivity of the room to which the target viewpoint belongs in the topology map as a constraint, and performs path search in combination with the two-dimensional occupied grid map to obtain a path point sequence. If the global integrity is greater than the preset integrity threshold and the scan integrity index of all rooms is greater than the preset index threshold, or the set of target viewpoints is empty, the scan result determination module 27 determines that the scan is complete. By quantifying the spatial coverage integrity in real time, the next optimal viewpoint and movement path are automatically generated in combination with the room topology, and the integrity threshold is used as the closed-loop termination criterion, thereby reducing human judgment errors and redundant paths while ensuring scan integrity.
[0065] In one embodiment, the point cloud pose acquisition module 21 can be further configured to: perform distortion correction on the laser scanning frame and interpolate the distorted points within the laser scanning frame using angular velocity and acceleration to obtain a single-frame point cloud; wherein, the single-frame point cloud includes: three-dimensional coordinates, reflection intensity, acquisition timestamp, and the scan line number to which it belongs; use a tightly coupled laser-inertial odometry to estimate the current frame pose of the single-frame point cloud using error state Kalman filtering or factor graph optimization; generate a primary sub-graph based on multi-frame point cloud data, and perform loop closure detection on the sub-graph and the global pose graph to correct the accumulated drift, thereby obtaining the real-time point cloud flow and the corresponding pose trajectory.
[0066] In one embodiment, the aforementioned indoor topology generation module 22 can be further configured to: slice a specific region along the height direction of the real-time point cloud flow and project it to generate a two-dimensional occupancy grid map; wherein, the grid value of the two-dimensional occupancy grid map is the occupancy probability of the number of points in the specific region after normalization; perform morphological closing operation on the two-dimensional occupancy grid map to remove burrs, and use a region segmentation algorithm based on wall line extraction to segment the two-dimensional occupancy grid map into room polygons; detect the doorway connections between each room polygon to construct an indoor topology map.
[0067] In one embodiment, the integrity calculation module 23 can be further configured to: divide the bounding box of each room polygon into voxels; determine the state of the corresponding voxel based on the number of points within the voxel; calculate the scan integrity index of the corresponding room based on the state of the voxel; and calculate the global integrity based on the scan integrity index of each room.
[0068] In one embodiment, the completeness calculation module 23 can be further configured as follows: if the number of points within a voxel is greater than or equal to a preset number, the state of the corresponding voxel is determined to be occupied; if the ray from any known scan pose to the voxel is not blocked but the number of points within the voxel is 0, the state of the corresponding voxel is determined to be idle; if the voxel is blocked by other occupied voxels, making it unreachable from all scan poses, the state of the corresponding voxel is determined to be unknown.
[0069] In one embodiment, the candidate viewpoint generation module 24 can be further configured to: cluster voxels in unknown states to obtain several unscanned void region clusters; for each unscanned void region cluster, calculate its centroid and principal direction, and generate candidate viewpoints at equal angular intervals on a circular sampling band centered on the centroid; for each candidate viewpoint, perform voxel-level visibility projection with the sensor field of view angle, and count the number of unknown voxels visible from the candidate viewpoint.
[0070] In one embodiment, the target viewpoint selection module 25 can be further configured to: calculate the information gain of the candidate viewpoint based on the number of unknown voxels visible to the candidate viewpoint; calculate the accessibility cost based on the walkable path length from the current viewpoint to the candidate viewpoint on the indoor topology map; calculate the joint score based on the information gain and the accessibility cost; sort the candidate viewpoints in descending order of the joint score, and select the top few with the highest joint scores as target candidates.
[0071] In one embodiment, the path sequence planning module 26 can be further configured to: use the connectivity of the room to which the target viewpoint belongs in the topology map as a constraint, and use a heuristic algorithm combining nearest neighbor insertion and local optimization to solve the access sequence of the target viewpoint so that the total path length is minimized; for the access path between adjacent viewpoints, combine the two-dimensional occupancy grid map to perform path search and use cubic splines to smooth the polyline path to obtain the path point sequence.
[0072] In one embodiment, the scanning result determination module 27 can be further configured to: if the global completeness is greater than the preset completeness threshold and the scanning completeness index of all rooms is greater than the preset index threshold, or the set of target viewpoints is empty, then output a scanning completion prompt and end the process; otherwise, generate new candidate viewpoints based on the current set of rooms that do not meet the standard and the updated set of unknown voxels, and repeat the subsequent steps.
[0073] Below, for reference Figure 3 To describe an electronic device according to embodiments of this application. For example... Figure 3 As shown, the electronic device 10 includes one or more processors 11 and memory 12.
[0074] The processor 11 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
[0075] The memory 12 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may execute the program instructions to implement the methods of the various embodiments of this application described above and / or other desired functions. Various contents such as input signals, signal components, and noise components may also be stored in the computer-readable storage medium.
[0076] In one example, the electronic device 10 may also include an input device 13 and an output device 14, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0077] When the electronic device is a standalone device, the input device 13 can be a communication network connector for receiving the collected input signals from the first device and the second device.
[0078] In addition, the input device 13 may also include, for example, a keyboard, a mouse, etc.
[0079] The output device 14 can output various information to the outside, including determined distance information, direction information, etc. The output device 14 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.
[0080] Of course, for the sake of simplicity, Figure 3 Only some of the components of the electronic device 10 relevant to this application are shown in this illustration; components such as buses, input / output interfaces, etc., are omitted. In addition, the electronic device 10 may include any other suitable components depending on the specific application.
[0081] In addition to the methods and apparatus described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the methods according to various embodiments of this application described in the "Exemplary Methods" section above.
[0082] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0083] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the methods according to various embodiments of this application described in the "Exemplary Methods" section above.
[0084] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, 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 device, magnetic storage device, or any suitable combination thereof.
[0085] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0086] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0087] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.
[0088] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0089] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A building active viewpoint planning method based on scan integrity analysis, characterized in that, include: The laser scanning frame is preprocessed, and the pose of the current frame is determined based on the preprocessed laser scanning frame to obtain the real-time point cloud flow and the corresponding pose trajectory. The real-time point cloud stream is sliced along a specific region in the height direction, projected to generate a two-dimensional occupancy grid map, and the two-dimensional occupancy grid map is divided into multiple room polygons to obtain an indoor topology map; wherein, the specific region is in the range of 1.0 meter to 1.8 meters, and the indoor topology map includes a set of room polygons, the topological structure of multiple room polygons, and their geometric centers; The bounding box of each room polygon is divided into voxels, and the scan completeness index and global completeness of the corresponding room are calculated based on the voxel state; where the voxel state includes occupied, idle and unknown. Clustering of voxels in unknown states yields several clusters of unscanned void regions. The centroid and principal direction of each unscanned void region cluster are calculated, and candidate viewpoints are generated on the annular sampling band centered on the centroid. Based on the information gain and reachability cost of the candidate viewpoints, a joint score is calculated, and the top candidate viewpoints with the highest joint scores are selected as the target viewpoints. Using the connectivity of the room to which the target viewpoint belongs in the topology map as a constraint, and combining the two-dimensional occupancy grid map, a path search is performed to obtain a sequence of path points; If the global integrity is greater than the preset integrity threshold and the scan integrity index of all rooms is greater than the preset index threshold, or the set of target viewpoints is empty, then the scan is complete. The process of dividing the bounding box of each room polygon into voxels and calculating the scan completeness index and global completeness of the corresponding room based on the voxel state includes: The bounding box of each room polygon is divided into a three-dimensional voxel grid with a side length of 0.1 meters; wherein the three-dimensional voxel grid is organized in an octree structure, and each leaf node stores the status label, the number of hit points, and the pose index at the most recent update; The state of the corresponding voxel is determined based on the number of points within the voxel; wherein, the determination of the state of the corresponding voxel based on the number of points within the voxel includes: determining the state of the corresponding voxel for each voxel based on the number of points falling into it and the traversal of the line of sight. The scan integrity index of the corresponding room is calculated based on the state of the voxels; The global integrity score is calculated based on the scan integrity index for each room; the formulas for calculating the scan integrity index for a single room and the global integrity score are as follows: C j =(N occ,j +N free,j ) / N j ; C global =Σ(A j ·C j ) / ΣA j ; in, C j For the first j The scan integrity index for each room N occ,j For the first j The number of voxels in each room whose status has been determined is the number of voxels occupied. N free,j For the first j The number of voxels in each room that are currently in an idle state has been determined. N j For the first j The total number of voxels contained in the bounding box of each room. C global For global integrity, A j For the first j The floor area of each room.
2. The active viewpoint planning method for buildings based on scan integrity analysis according to claim 1, characterized in that, The process of preprocessing the laser scanning frame and determining the current frame pose based on the preprocessed laser scanning frame to obtain the real-time point cloud flow and corresponding pose trajectory includes: The laser scanning frame is distorted, and the distorted points within the laser scanning frame are interpolated and compensated using angular velocity and acceleration to obtain a single-frame point cloud; wherein, the single-frame point cloud includes: three-dimensional coordinates, reflection intensity, acquisition timestamp, and the scan line number to which it belongs. A tightly coupled laser-inertial odometry is used to estimate the current frame pose of the single-frame point cloud using error-state Kalman filtering or factor graph optimization. A primary subgraph is generated based on multi-frame point cloud data, and loop closure detection is performed between the subgraph and the global pose graph to correct cumulative drift, thereby obtaining the real-time point cloud flow and the corresponding pose trajectory.
3. The active viewpoint planning method for buildings based on scan integrity analysis according to claim 1, characterized in that, The step of slicing the real-time point cloud stream along a specific region in the height direction, projecting it to generate a two-dimensional occupancy raster map, and dividing the two-dimensional occupancy raster map into multiple room polygons to obtain an indoor topology map includes: The real-time point cloud stream is sliced along a specific region in the height direction and projected to generate the two-dimensional occupancy grid map; wherein, the grid value of the two-dimensional occupancy grid map is the occupancy probability of the number of points in the specific region after normalization. A morphological closing operation is performed on the two-dimensional occupancy grid to remove burrs, and a region segmentation algorithm based on wall line extraction is used to segment the two-dimensional occupancy grid into room polygons; The doorway connections between the polygons of each room are detected to construct the indoor topology map.
4. The active viewpoint planning method for buildings based on scan integrity analysis according to claim 1, characterized in that, The process of determining the state of a corresponding voxel based on the number of points within the voxel includes: If the number of points within a voxel is greater than or equal to a preset number, the corresponding voxel is determined to be occupied; if the ray from any known scan pose to the voxel is not blocked but the number of points within the voxel is 0, the corresponding voxel is determined to be idle; if the voxel is blocked by other occupied voxels, making it unreachable from all scan poses, the corresponding voxel is determined to be unknown.
5. The active viewpoint planning method for buildings based on scan integrity analysis according to claim 1, characterized in that, The process of clustering voxels in unknown states to obtain several unscanned cavity region clusters, calculating the centroid and principal direction of each unscanned cavity region cluster, and generating candidate viewpoints on a circular sampling band centered on the centroid includes: Clustering voxels in unknown states yields several clusters of unscanned void regions; For each cluster of unscanned void regions, calculate its centroid and principal direction, and generate the candidate viewpoints at equal angular intervals on a circular sampling band centered on the centroid. For each candidate viewpoint, voxel-level visibility projection is performed using the sensor's field of view, and the number of unknown voxels visible from that candidate viewpoint is counted.
6. The active viewpoint planning method for buildings based on scan integrity analysis according to claim 5, characterized in that, The step of calculating a joint score based on the information gain and reachability cost of the candidate viewpoints, and selecting the top candidate viewpoints with the highest joint scores as the target viewpoints, includes: The information gain of the candidate viewpoint is calculated based on the number of unknown voxels visible from the candidate viewpoint. The reachability cost is calculated based on the length of the walkable path from the current viewpoint to the candidate viewpoint on the indoor topology map. The joint score is calculated based on the information gain and the reachability cost. The candidate viewpoints are sorted in descending order of their joint scores, and the top few with the highest joint scores are selected as the target candidates.
7. The active viewpoint planning method for buildings based on scan integrity analysis according to claim 1, characterized in that, The path search, which uses the connectivity of the room to which the target viewpoint belongs in the topology map as a constraint and combines it with the two-dimensional occupancy grid map, yields a path point sequence including: Using the connectivity of the room to which the target viewpoint belongs in the topology graph as a constraint, a heuristic algorithm combining nearest neighbor insertion and local optimization is used to solve the access sequence of the target viewpoint, so as to minimize the total path length. For the access path between adjacent viewpoints, a path search is performed using the two-dimensional occupied raster map, and the polyline path is smoothed using cubic splines to obtain the path point sequence.
8. The active viewpoint planning method for buildings based on scan integrity analysis according to claim 1, characterized in that, If the global completeness is greater than a preset completeness threshold and the scan completeness index of all rooms is greater than a preset index threshold, or the set of target viewpoints is empty, then the scan is complete, including: If the global integrity is greater than the preset integrity threshold and the scan integrity index of all rooms is greater than the preset index threshold, or the set of target viewpoints is empty, then a scan completion prompt will be output and the process will end.
9. A building active viewpoint planning system based on scan integrity analysis, characterized in that, include: The point cloud pose acquisition module is used to preprocess the laser scanning frame and determine the pose of the current frame based on the preprocessed laser scanning frame to obtain the real-time point cloud flow and the corresponding pose trajectory. An indoor topology generation module is used to slice the real-time point cloud stream along a specific region in the height direction, project it to generate a two-dimensional occupancy grid map, and divide the two-dimensional occupancy grid map into multiple room polygons to obtain an indoor topology map; wherein, the specific region is in the range of 1.0 meter to 1.8 meters, and the indoor topology map includes a set of room polygons, the topological structure of multiple room polygons, and their geometric centers; The integrity calculation module is used to divide the bounding box of each room polygon into voxels, and calculate the scan integrity index and global integrity of the corresponding room based on the voxel state; where the voxel state includes occupied, idle and unknown. The candidate viewpoint generation module is used to cluster voxels in unknown states to obtain several unscanned cavity region clusters, calculate the centroid and principal direction of each unscanned cavity region cluster, and generate candidate viewpoints on the annular sampling band centered on the centroid. The target viewpoint selection module is used to calculate a joint score based on the information gain and reachability cost of the candidate viewpoints, and select the top multiple candidate viewpoints with the highest joint scores as the target viewpoints. The path sequence planning module is used to perform path search by combining the connectivity of the room to which the target viewpoint belongs in the topology map with the two-dimensional occupancy grid map, and obtain the path point sequence. The scanning result determination module is used to determine if the global integrity is greater than a preset integrity threshold and the scanning integrity index of all rooms is greater than a preset index threshold, or if the set of target viewpoints is empty, then the scanning is complete. The integrity calculation module is further configured as follows: The bounding box of each room polygon is divided into a three-dimensional voxel grid with a side length of 0.1 meters; wherein the three-dimensional voxel grid is organized in an octree structure, and each leaf node stores the status label, the number of hit points, and the pose index at the most recent update; The state of the corresponding voxel is determined based on the number of points within the voxel; wherein, the determination of the state of the corresponding voxel based on the number of points within the voxel includes: determining the state of the corresponding voxel for each voxel based on the number of points falling into it and the traversal of the line of sight. The scan integrity index of the corresponding room is calculated based on the state of the voxels; The global integrity score is calculated based on the scan integrity index for each room; the formulas for calculating the scan integrity index for a single room and the global integrity score are as follows: C j =(N occ,j +N free,j ) / N j ; C global =Σ(A j ·C j ) / ΣA j ; in, C j For the first j The scan integrity index for each room N occ,j For the first j The number of voxels in each room whose status has been determined is the number of voxels occupied. N free,j For the first j The number of voxels in each room that are currently in an idle state has been determined. N j For the first j The total number of voxels contained in the bounding box of each room. C global For global integrity, A j For the first j The floor area of each room.
Citation Information
Patent Citations
Autonomous exploration method and system of mobile robot in unknown environment
CN120213009A
Search robot autonomous exploration method for collapse catastrophe environment
CN122219440A
