Mapping method, computer device and computer-readable storage medium
The mapping method based on voxel division and secondary verification solves the problem of reduced point cloud map accuracy caused by dynamic object interference in existing technologies, and realizes efficient and accurate 3D mapping on robot platforms with limited resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-04-14
AI Technical Summary
Existing mapping technologies struggle to efficiently and accurately filter out interference from dynamic objects in environments with frequent human activity, leading to reduced point cloud map accuracy, excessive computational and storage resource consumption, and an inability to achieve large-scale 3D mapping on resource-constrained robotic platforms.
A voxel partitioning method is used to map point cloud data into voxels. The data is divided into target voxels and interference voxels using a preset fixed cutoff distance and scanning beam incident angle. The accuracy of filtering is improved through secondary verification operations, and a three-dimensional model is constructed.
It significantly improves the representation accuracy of small indoor objects, reduces the misclassification rate of static points, improves the accuracy and reliability of dynamic point cloud filtering, and reduces the consumption of computing and storage resources.
Smart Images

Figure CN121353560B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer vision technology, and in particular relates to a mapping method, a computer device, and a computer-readable storage medium. Background Technology
[0002] In cutting-edge fields such as robot navigation, 3D environmental mapping technology is fundamental to ensuring accurate perception and navigation. Constructing point cloud maps is a crucial step in this process. However, in environments with frequent human activity, such as factories and construction sites, the movement of people or other objects can create "human walls" that obstruct the point cloud map, interfering with its accuracy and reducing its usability. Therefore, to improve the accuracy and value of point cloud maps, employing dynamic filtering algorithms to remove interfering elements related to human activity is essential.
[0003] Existing mapping schemes rely on dynamic object filtering based on ray projection. The core idea is to record the hit and traversal status of each grid cell during historical scans. When a point in a point cloud frame falls into a grid area marked as traversed, that point is considered part of the dynamic point cloud and filtered out. However, implementing these methods requires significant computational and storage resources, making it difficult to achieve large-scale 3D mapping on resource-constrained robotic platforms. How to map the environment more accurately is a technical problem that urgently needs to be solved by those skilled in the art.
[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the Invention
[0005] Therefore, it is necessary to propose a mapping method, computer equipment, and computer-readable storage medium to address the above problems, which can more accurately model indoor scenes.
[0006] The technical problem solved by this application is achieved by the following technical solution:
[0007] This application provides a mapping method for use in a scanning robot, comprising the following steps: acquiring point cloud data of the target detection range and mapping the point cloud data to corresponding voxels; performing a segmentation operation on the voxels using a preset fixed cutoff distance to divide the voxels into target voxels and interference voxels; filtering out the point cloud data corresponding to the interference voxels; constructing a 3D model of the target object within the target detection range based on the point cloud data corresponding to the target voxels, and outputting the 3D model.
[0008] In an optional embodiment of this application, the method further includes: acquiring the movement speed and scanning frequency of the scanning robot; calculating and determining a first duration based on the movement speed and scanning frequency; determining a second duration based on the first duration, wherein the second duration is greater than or equal to the first duration; acquiring point cloud data of the target detection range and mapping the point cloud data to corresponding voxels, including: acquiring and storing point cloud data of the second duration, and marking it as first point cloud data; extracting point cloud data of the first duration from the first point cloud data and marking it as second point cloud data; and performing data processing on the second point cloud data to map it to corresponding voxels.
[0009] In an optional embodiment of this application, mapping point cloud data to corresponding voxels includes: optimizing the pose of the point cloud data according to a preset pose optimization algorithm to obtain optimized data; constructing a voxel network within the target detection range; obtaining a preset voxel size, dividing the voxel network into multiple voxels, each voxel being a cube indicating the size of the preset voxel; and mapping the optimized data to the corresponding voxels.
[0010] In an optional embodiment of this application, a voxel segmentation operation is performed using a preset fixed cutoff distance to divide the voxels into target voxels and interfering voxels. This includes: determining the target detection range of the scanning robot into a near end and a far end based on the fixed cutoff distance; the near end is the side of the target detection range closer to the scanning robot; the far end is the side of the target detection range farther from the scanning robot; marking all voxels located at the near end as interfering voxels; and performing a segmentation operation on all voxels located at the far end to divide the voxels into target voxels and interfering voxels.
[0011] In an optional embodiment of this application, the method further includes: acquiring a scanning beam, wherein the scanning beam is a beam emitted by a scanning robot to collect point cloud data; performing a segmentation operation on voxels using a preset fixed cutoff distance to divide the voxels into target voxels and interfering voxels, including: calculating and determining the maximum incident angle based on the fixed cutoff distance; marking voxels outside the maximum incident angle corresponding to the scanning beam as interfering voxels; traversing all voxels within the maximum incident angle, and marking the voxel in the point cloud that the scanning beam finally hits as the target voxel; marking all voxels that the scanning beam passes through during the scanning beam emission process as interfering voxels; if the interfering voxel is within the fixed cutoff distance, then the interfering voxel is not marked.
[0012] In an optional embodiment of this application, after dividing the voxels into target voxels and interfering voxels, the method further includes: determining, based on the point cloud data, whether the number of points in the interfering voxel is lower than a preset upper limit threshold; if the number of points is higher than or equal to the upper limit threshold, then marking the corresponding interfering voxel as a candidate interfering voxel; performing a secondary verification operation on the candidate interfering voxel, and dividing the candidate interfering voxel into target voxels and interfering voxels based on the processing result of the secondary verification operation.
[0013] In an optional embodiment of this application, a secondary verification operation is performed on the candidate interfering voxels, including: acquiring historical target voxels, where historical target voxels are a set of target voxels that were determined before acquiring point cloud data; performing point cloud registration between the point cloud data in the candidate interfering voxels and the historical target voxels according to a preset registration algorithm to obtain a registration result; determining, based on the registration result, whether the point cloud data in the candidate interfering voxels is located within the historical target voxels; if it is located, then marking the candidate interfering voxel as a target voxel; if it is not located, then marking the candidate interfering voxel as an interfering voxel.
[0014] In an optional embodiment of this application, after dividing voxels into target voxels and interference voxels, the method includes: storing each voxel according to a preset key-value pair storage structure, where one key-value pair corresponds to one voxel, the key of the key-value pair is the spatial location of the voxel, and the value of the key-value pair is the marker of the target voxel and interference voxel corresponding to the voxel; filtering out the point cloud data in the interference voxel, constructing a stereo model with the point cloud data in the target voxel and outputting it, including: determining the key-value pair with the marker of the interference voxel by a preset query method, filtering out the point cloud data in the voxel corresponding to the key-value pair; retaining the key-value pair with the value of the target voxel; obtaining the point cloud data corresponding to the key-value pair with the value of the target voxel, marking it as target data; constructing a stereo model based on the target data and outputting it.
[0015] This application also provides a computer device including a processor and a memory: the processor is used to execute a computer program stored in the memory to implement the method as described above.
[0016] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described above.
[0017] The embodiments of this application have the following beneficial effects:
[0018] This application simplifies the calculation steps of the cutoff distance by dividing voxels through a preset fixed cutoff distance. This further reduces the voxel size from the decimeter level in existing technologies, reducing it to the centimeter level while maintaining computational efficiency, significantly improving the representation accuracy of small indoor objects. Furthermore, by dividing interference voxels into target voxels, point clouds within interference voxels can be accurately filtered out, ultimately ensuring that only background and environmental point cloud data are used for mapping. This effectively reduces the false positive rate of static points and improves the accuracy and reliability of dynamic point cloud filtering.
[0019] The above description is merely an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it according to the contents of the specification, and to make the above and other objects, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit this application. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic flowchart of a mapping method provided in one embodiment.
[0022] Figure 2 This is a schematic diagram of prior art interference voxel labeling provided in one embodiment.
[0023] Figure 3 This is a schematic diagram of interference voxel labeling in a mapping method provided in one embodiment.
[0024] Figure 4 This is a flowchart illustrating the partitioning operation provided in one embodiment.
[0025] Figure 5 This is a schematic block diagram of the structure of a computer device provided in one embodiment. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0027] In existing mapping schemes, during the acquisition of point cloud data in a scanning scene, the hit status of each grid during scanning is recorded. If a point in the current frame falls into a grid area previously marked as "dynamic," it is determined to be a dynamic point and filtered out. Existing schemes have significant limitations: First, all grids along the laser beam path need to be marked, resulting in excessive computational and storage overhead; second, the decimeter-level voxel resolution limits its applicability to indoor scenes, and reducing the voxel size further exacerbates the computational burden; finally, when the distance between dynamic interference and static target points is less than the voxel resolution, they are merged into the same unit, leading to the accidental deletion of the target point cloud. To overcome the shortcomings of the existing technology, this application proposes a mapping method that can more efficiently and accurately locate and filter out interfering point clouds while retaining the target point cloud for mapping. For a clear description of the method provided in this embodiment, please refer to... Figures 1-4 This includes steps S110 to S130.
[0028] Step S110: Obtain point cloud data of the target detection range and map the point cloud data to the corresponding voxels.
[0029] In one embodiment, the method further includes: acquiring the movement speed and scanning frequency of the scanning robot; calculating and determining a first duration based on the movement speed and scanning frequency; determining a second duration based on the first duration, wherein the second duration is greater than or equal to the first duration; acquiring point cloud data of the target detection range and mapping the point cloud data to corresponding voxels, including: acquiring and storing point cloud data of the second duration, and labeling it as first point cloud data; extracting point cloud data of the first duration from the first point cloud data and labeling it as second point cloud data; and performing data processing on the second point cloud data to map it to corresponding voxels.
[0030] In one implementation, when using a scanning robot to scan the environment for 3D mapping, it is necessary to mark and filter out any interfering point clouds that may be generated. Interfering point clouds include, but are not limited to, the following: 1. Typical interference from dynamic objects, such as people walking, pets, moving furniture (e.g., chairs), swaying curtains, rotating fan / air conditioner blades, etc. This type of interference will cause "ghosting" or false structures in the model. 2. Typical interference from flyers, such as discrete points caused by sensor noise, dust, or airborne suspended particles (e.g., smoke, water vapor), i.e., isolated points in the point cloud data that are far from the actual surface. 3. Typical interference from sensor noise, such as random noise collected by a depth camera during the acquisition process, or multipath errors caused by multiple reflections of light from a lidar sensor. These situations will cause "burrs" or non-physical unevenness on the point cloud surface. 4. Typical interference from small structures or hanging objects, such as lamps, wires, plant branches and leaves, spider webs, etc., which will increase the complexity of the model and may affect the extraction of ground / wall surfaces.
[0031] These interfering point clouds need to be identified and filtered out. Let... Let m+1 be the set of voxels mapped from the point cloud. For from the first Frame to the The set of interfering voxels labeled with frames. Assuming an anomaly is detected or collection begins at time m of the acquired point cloud data, collection needs to continue for a period of time, for example, until time m+k, to determine whether the data in the point cloud is interference or a target. Therefore, for any voxel... The filtering criteria are as follows:
[0032] (1)
[0033] For the scenario where the robot encounters a pedestrian at a new corner, the point cloud of the first m frames does not label the voxel corresponding to the dynamic point cloud of the (m+1)th frame:
[0034] (2)
[0035] If the value of k is small, for example, k is 1, meaning that the amount of point cloud data used for acquisition and processing is too small, the following situation will occur:
[0036] (3)
[0037] (4)
[0038] This means that it becomes impossible to accurately distinguish between target and interfering voxels, leading to the failure of subsequent point cloud filtering. Filtering can only be achieved if the value of k is sufficiently large, i.e., satisfying the following condition:
[0039] (5)
[0040] It is evident that a smaller k leads to filtering failure in new scenarios, while a larger k improves environmental adaptability but increases computational burden. The optimal k requires a balance between filtering effectiveness and computational efficiency. Therefore, it is necessary to calculate and determine the value of k to determine the optimal acquisition time. For this purpose, this application uses the scanning robot's movement speed... and scan frequency The calculation of the value of k is shown in the following formula.
[0041] (6)
[0042] In the above formula, k, also known as the first duration, is the minimum value that, after calculation, can be used to accurately distinguish between interfering voxels and dynamic voxels. It represents a balance between filtering effectiveness and computational efficiency, and is expressed in frames. Motion speed. This refers to the robot's minimum or average speed. It's understandable that a scanning robot may be equipped with more than one data acquisition device, including but not limited to acoustic radar, lidar, and depth cameras; therefore, the scanning frequency... It is the minimum scanning frequency of the scanning robot's data acquisition device. This is the preset movement distance. For example, using... Taking 1m as an example, assuming =0.2m / s, =10Hz, and introduce random error. =2cm, then when the distance moved =1m>> At this point, the position of the obstacle changes significantly in the point cloud, and k=50. That is, only 50 frames of data are needed to accurately distinguish between the interfering voxels and the target voxels.
[0043] Furthermore, the first duration k is the duration of the point cloud data used for subsequent processing. The duration of the collected and stored point cloud data needs to be greater than or equal to the first duration k. Based on this relationship, the second duration t can be determined through the first duration k. The second duration t only needs to satisfy the relationship that the second duration t is greater than or equal to the first duration k relative to the first duration k. There are no restrictions on the specific calculation method. For example, it can be a positive integer multiple. In a preferred embodiment, the value of the second duration t will not exceed the first duration k by much. For example, the second duration t can be set to 1.5 times the first duration k.
[0044] In step S110, point cloud data corresponding to the second duration t can be stored in a sliding window and marked as first point cloud data. In a preferred embodiment, the first point cloud data is in a cached state, meaning that when new point cloud data is acquired, the previously stored first point cloud data is updated to keep the stored first point cloud data up-to-date and control the storage space usage, thereby significantly reducing memory consumption. The point cloud data used for processing and mapped to voxels is extracted from the first point cloud data, corresponding to the first duration k, and marked as second point cloud data. The second point cloud data will be used for processing to map to the corresponding voxels. It can be seen that the second point cloud data is a subset of the first point cloud data. Specifically, the first point cloud data has a fixed duration of the second duration t and is used for real-time storage; the second point cloud data is the first point cloud data with a fixed duration between the first duration k and the second duration t, and is used for processing to map to voxels. By default, voxels that have not been updated after processing the second point cloud data corresponding to the first time period k can be regarded as target voxels, and the corresponding objects are regarded as static objects, which are the objects that need to be used for modeling later.
[0045] In one embodiment, mapping point cloud data to corresponding voxels includes: optimizing the pose of the point cloud data according to a preset pose optimization algorithm to obtain optimized data; determining the target detection range of the scanning robot and constructing a voxel network within the target detection range; obtaining a preset voxel size and dividing the voxel network into multiple voxels, each voxel being a cube indicating the preset voxel size; and mapping the optimized data to the corresponding voxels.
[0046] In one implementation, it is understood that the scanning robot may acquire point cloud data through multiple sensors, thus requiring pose optimization of the point cloud data. The goal is to find the optimal position and orientation (translation and rotation) of the sensor or object in space by minimizing the pose-related error function. Possible pose optimization algorithms include, but are not limited to, Iterative Closest Point (ICP), Feature-based methods, and Lie Group Optimization. Different algorithms have different advantages and disadvantages, and the specific algorithm chosen can be selected based on the characteristics of the target detection range; no restriction is placed on this. The pose optimization process of each algorithm will not be elaborated further; the point cloud data after pose optimization is referred to as optimized data. The target detection range of the scanning robot is determined, and a voxel network is constructed within this range. Specifically, the target detection range can be the scanning range of the scanning robot; for example, in the case of a LiDAR, the target detection range can be the radar's field of view. This range is a 3D space within which the voxel network is constructed. A preset voxel size is obtained. In a preferred embodiment, the preset voxel size can be 2cm, that is, the voxel network is divided into multiple cubes with a side length of 2cm, and each cube is a voxel. The optimized data is essentially point cloud data, which records the spatial positions of all points. Each voxel is a cube in three-dimensional space, and there is a spatial mapping relationship between the two. Through this spatial mapping relationship, the point cloud data can be mapped to the corresponding voxel. A voxel in a voxel network is equivalent to a pixel in a two-dimensional image. This application reduces the voxel size to the centimeter level, which greatly improves the resolution and the accuracy of subsequent analysis.
[0047] Step S120: Perform a segmentation operation on the voxels using a preset fixed cutoff distance to divide the voxels into target voxels and interference voxels.
[0048] In one embodiment, a voxel segmentation operation is performed using a preset fixed cutoff distance to divide the voxels into target voxels and interfering voxels. This includes: determining, based on the fixed cutoff distance, to divide the target detection range of the scanning robot into a proximal end and a distal end; the proximal end is the side of the target detection range closer to the scanning robot; the distal end is the side of the target detection range farther from the scanning robot; marking all voxels located at the proximal end as interfering voxels; and performing a segmentation operation on all voxels located at the distal end to divide the voxels into target voxels and interfering voxels.
[0049] In one embodiment, a schematic diagram illustrating the division of interference voxels and target voxels in the prior art can be found by referring to... Figure 2As shown. An interfering voxel, or a voxel in a voxel network, contains point clouds that fall under the interference conditions described above. A target voxel, on the other hand, refers to the voxel containing the point clouds ultimately used for modeling; that is, the target voxel encompasses the target object required for modeling. Figure 2 The concept of a grid within a voxel network is introduced as an example. A grid is the collective term for all voxels on one face of a voxel network. If the voxel network is 3D, the grid is one of its faces, and all grids stacked together constitute the voxel network. Figure 2 The grid shown consists of multiple squares arranged vertically from A to F and vertically from 1 to 5. Each square corresponds to a voxel, and for ease of description, they will be referred to directly by the coordinates of the voxels.
[0050] Assuming the scanning robot is located at F4, it scans towards points A1 to F1, which represent the wall surface. The black dot at B1 represents a point cloud obtained by the scanning robot in the current frame, while C1, D1, and E1 represent other point clouds obtained in other frames. The blue line from F4 towards B1 represents the scanning robot's scanning beam. In existing technology, interference voxels and target voxels are distinguished: the voxel containing the final point cloud is the target voxel, while the voxels through which the scanning beam passes are interference voxels. Figure 2 For example, when the incident angle of the scanning beam is large (the incident angle is determined as follows...), Figure 2 As shown in the diagram, for example, if the angle exceeds 45°, the scanning beam will pass through C1, D1, and E1, causing C1, D1, and E1 to be marked as interfering voxels. Points that were originally correct are mistakenly identified as interfering voxels and filtered out. This scenario is common on ground / wall surfaces. To avoid false positives on target point clouds, existing technology uses a method where, when traversing the optical path from the radar point (i.e., the scanning robot), the traversal ends once a "safe plane" is reached. This prevents point clouds below the "safe plane" from being falsely identified. The "safe plane" is a virtual plane at a certain distance from the target voxel towards the scanning robot. Figure 2 The blue line in the middle represents the connection between A2~F2 and A3~F3. In a 2D raster, the "safety surface" appears as a line, while in a voxel network it is a 2D plane. The original method for determining the "safety surface" was to first find the neighboring nodes and then calculate the normal vector. The "safety surface" is perpendicular to the normal vector and is typically one or two voxel lengths away from the point cloud. Figure 2 In this context, this distance is called the calculated cutoff distance, and it is calculated as the length of two voxels. Therefore, Figure 2 The voxels marked as interfering elements are squares with slashes.
[0051] As you can see, Figure 2The number of interfering voxels that can be labeled is small and the accuracy is insufficient, resulting in a large amount of calculation required when summarizing and filtering out the interfering voxels. Therefore, to speed up the calculation, this application adopts a preset fixed cutoff distance. The setting of the fixed cutoff distance is determined according to the accuracy requirements. In a preferred embodiment, the fixed cutoff distance can be set to 5 voxels.
[0052] The cutoff distance is used to determine the safety surface. The method for determining the safety surface in this application differs from existing technologies. For ease of understanding, please refer to [the relevant documentation / reference]. Figure 3 As shown. The distance for determining the safety surface provided in this application is a fixed value, rather than the existing method that requires real-time calculation. This fixed value is called the fixed cutoff distance, and the safety surface determined by the fixed cutoff distance also differs from that of the prior art. In one embodiment, as... Figure 3 As shown, the safety plane can be defined as the point along the scanning beam towards the scanning robot at a fixed cutoff distance, starting from the point cloud hit. This cutoff point is defined as the point where all cutoff points converge. The surface encompassing all cutoff points is called the safety plane. It is understandable that the scanning robot emits more than one scanning beam simultaneously (e.g., ...). Figure 3 The blue and red colors represent the two scanning rays emitted by the scanning robot at the same time. Furthermore, during continuous scanning, due to changes in the scanning angle and the shape of the surface of the object being scanned, the safety surface is not a perfectly flat plane; in reality, it may be uneven. Figure 3 The plane shown is for ease of understanding only; therefore, two straight lines, blue and red, are used to represent the safety plane. After determining the safety plane based on a fixed cutoff distance, voxels can be divided into two categories within the grid. The side of the safety plane closer to the scanning robot is called the proximal end, and the side farther from the robot is called the distal end. For example, using... Figure 3 As shown, assuming a fixed cutoff distance of 3 (the distance indicated by the curly braces), the scanning beam velocity at point A1 is represented by the blue light beam in the second row of voxels, which is the safety plane. The other scanning beam emitted by the scanning robot is indicated in red, with the corresponding fixed cutoff distance and safety plane also shown in red. The side closer to the scanning robot is called the proximal end; taking the blue scanning beam as an example, the proximal end is the 3rd, 4th, and 5th rows of voxels. All voxels in the proximal end can be labeled as interfering voxels, and the point cloud contained within these interfering voxels will be filtered out later. The voxels in the 1st and 2nd rows are located at the distal end. Voxels in the distal end will be distinguished as interfering voxels and target voxels in subsequent segmentation operations.
[0053] As mentioned earlier, the grid is only one surface within the target detection range, therefore Figure 3Although the near and far ends are presented in 2D, within the target detection range, they are two separate 3D spaces distinguished by a 2D safety plane. It's understandable that mapping requires the point cloud ultimately scanned at the target object, while voxels in the free space between the target object and the scanning robot, or any point clouds within them, can be filtered out. The safety plane is designed to ensure that point clouds on objects near the target object are not mistakenly deleted. For this reason, all voxels located at the near end can be marked as interfering voxels, meaning all point clouds existing in free space can be deleted, thus ultimately mapping only the target object at the far end. Furthermore, to avoid accidental deletion and to more accurately distinguish the target object from other interference, voxels located at the far end need to be segmented to accurately differentiate between interfering and target voxels.
[0054] For details on the partitioning operation, please refer to [link / reference]. Figure 3 , 4 As shown, it includes steps S210 to S250.
[0055] Step S210: Acquire the scanning beam; calculate and determine the maximum incident angle based on the fixed cutoff distance; mark the voxels outside the maximum incident angle corresponding to the scanning beam as interfering voxels.
[0056] In one embodiment, the scanning beam is the beam emitted by the scanning robot collecting point cloud data, such as the laser emitted by a lidar sensor. Figure 3 The launch direction is indicated by a blue line with an arrow. The maximum angle of incidence is determined by calculating a fixed cutoff distance; the calculation method for the maximum angle of incidence can be found in the following formula.
[0057] (7)
[0058] In the above formula, This is the maximum angle of incidence. The method for setting the angle of incidence can be found in [reference needed]. Figure 2 or Figure 3 As shown; To establish a fixed cutoff distance. As mentioned earlier, in a preferred embodiment, the fixed cutoff distance can be set to 5 voxels. =5, maximum angle of incidence The value is approximately 78.7°. Voxels located outside the maximum incident angle corresponding to the scanning beam are marked as interfering voxels. This means that only laser beams with an incident angle greater than 78.7° will cause false deletions of static point clouds. Figure 3 As shown, voxels C1 to F1 will be labeled with interfering voxels. If the existing technique is used, the maximum incident angle will be 45°. Figure 3In this process, voxels B1 to F1 will be used to label interfering voxels. Compared to the existing technology's 45° incident angle limitation, the angle threshold of this application is significantly improved. It is worth noting that the maximum incident angle is determined based on a fixed cutoff distance. That is to say, the fixed cutoff distance can control the actual filtering effect; the larger the fixed cutoff distance, the larger the maximum incident angle, resulting in fewer initially identified interfering voxels. Balancing computational efficiency and result accuracy, this application uses a fixed cutoff distance of 5 voxels as a preferred implementation method for reference; however, in practice, this can also be adjusted according to the actual filtering effect, and is not limited here.
[0059] Step S220: Traverse all voxels within the maximum incident angle, mark the voxel where the point cloud is finally hit by the scanning beam as the target voxel; mark all voxels that the scanning beam passes through during the scanning beam emission process as interfering voxels; if the interfering voxel is within the fixed cutoff distance, then do not mark the interfering voxel.
[0060] In one embodiment, voxels within the maximum incident angle are distinguished as target voxels and interfering voxels based on the relationship between the scanning beam and the voxels. The voxel in the point cloud ultimately hit by the scanning beam is marked as the target voxel, such as... Figure 3 As shown, this is A1. The voxels through which the beam passes are marked as interfering voxels, i.e. Figure 3 Voxels B1, B2, and C2 are already marked as interfering voxels, so further explanation is unnecessary. Furthermore, setting a fixed cutoff distance ensures that interfering voxels are not mistakenly deleted. If a voxel is marked as interfering because it has been traversed by the scanning beam, it can be determined whether the voxel is within the fixed cutoff distance, i.e., within the safe plane. If so, the mark is ignored, meaning the label indicating that the voxel is an interfering voxel is disregarded.
[0061] In one embodiment, the interfering voxels of this application can also be filtered out in a conventional manner. That is, the fixed cutoff distance is set to ensure that voxels within the safety plane are not marked as interfering voxels. Figure 3 For example, under the blue scanning beam, the voxels that pass through include A1, B1, B2, C2, D2, D3, E3, E4, and F4. These voxels are all marked as interfering voxels. However, since A1, B1, B2, and C2 are all within the safe zone encompassed by the fixed cutoff distance, their interfering voxel marking is ignored, and they are identified as target voxels. Therefore, the final preliminary calibration result is... Figure 3 As shown, the five squares D2, D3, E3, E4, and F4 are marked as interfering voxels (i.e., the shaded marks shown in the figure). It is worth noting that... Figure 3The marking method shown is only for illustrative purposes regarding this embodiment, and this embodiment is not mutually exclusive with other embodiments. That is to say, the interfering voxel marking in this embodiment is only one option. In other embodiments, the required marking methods can be arbitrarily combined according to needs to distinguish between interfering voxels and target voxels. For example, if a near-end and far-end distinction is used, all voxels in the second row will be marked as interfering voxels; for calculations using the maximum reflection angle, all voxels to the right of the blue scanning beam will be marked as interfering voxels. As mentioned above, different voxel selection methods address different accuracy requirements and can be arbitrarily selected and combined according to actual needs without restriction.
[0062] Here, we can introduce a concept: in addition to classifying interfering voxels and target voxels, this application may also include unknown voxels. Unknown voxels are not a specific type of voxel; more accurately, they are voxels that have not yet been processed, or are considered unprocessed. It can be understood that the filtering scheme of this application is an ongoing process, so there is always the possibility that some voxels may not have been detected, and that the detection results may differ at different times. Therefore, these voxels are referred to as unknown voxels. Similarly, using... Figure 3 For example, assume the red and blue scanning beams are the same scanning beam at different time points (the blue horizontal line represents the safety plane of the blue scanning beam, and the red horizontal line represents the safety plane of the red scanning beam). Then, according to... Figure 3 As shown, if we follow the conventional method of distinguishing between interfering and target voxels, firstly, voxels that are not passed through or hit by the scanning beam can be identified as unknown voxels. Secondly, there is a difference between the two scanning beams in determining whether D2 is an interfering voxel: the blue scanning beam identifies D2 as an interfering voxel, while D2 is within the safe zone of the red scanning beam and is identified as a target voxel. For voxel classification results that are uncertain, they can be temporarily marked as unknown voxels. After the scanning robot completes the traversal of the target detection range, it is determined whether it belongs to the target voxel or the interfering voxel based on the classification results at all time points. For example, the number of classification results can be used to determine the value. Specifically, assuming that D2 is scanned a total of 8 times during the traversal, and is identified as a target voxel 5 times, then D2 is finally marked as a target voxel. If the number of times it is identified as a target voxel and the number of times it is identified as an interfering voxel are the same, it can be regarded as an interfering voxel and further verified to determine its classification.
[0063] Furthermore, it is understood that the scanning robot continuously moves within the target detection range, continuously scanning the detection space. This means it will eventually traverse all voxels in the entire voxel network, thus assigning a corresponding label to each voxel to determine whether it is an interfering voxel or a target voxel. For interfering voxels, this application will employ secondary verification in subsequent steps S230-S250 to re-verify the interfering voxels, thereby preventing the accidental deletion of point clouds containing target voxels and improving recognition accuracy and results. Specific processing details will be described later and will not be elaborated here.
[0064] Step S230: Based on the point cloud data, determine whether the number of point clouds within the interference voxel is lower than the preset upper limit threshold.
[0065] In one embodiment, furthermore, there may be misjudgments regarding the interfering voxels identified in step S220. To address this, the interfering voxels identified in step S220 can be verified to determine if they are likely misjudged. Specifically, this can be done by determining, based on the point cloud data, whether the number of points within the interfering voxel is below a preset upper limit threshold. It is understood that the point clouds required in this application will be used for stereo modeling, and the modeled object is typically an environment or static background, usually a large object, thus containing a large number of points. If the number of points within a voxel is too small, on the one hand, it can be considered an interfering voxel and filtered out; on the other hand, even if the number of points is too small, even if they are not originally interfering voxels, the small number of points will not hinder the final modeling and can be filtered out.
[0066] If the number of point clouds is lower than the upper limit threshold, then proceed to step S240: determine it as an interfering voxel.
[0067] If the number of point clouds is higher than or equal to the upper limit threshold, then proceed to step S250: mark the corresponding interfering voxels as candidate interfering voxels; perform a secondary verification operation on the candidate interfering voxels, and divide the candidate interfering voxels into target voxels and interfering voxels according to the processing result of the secondary verification operation.
[0068] In one implementation, the upper threshold can be set according to actual needs. For example, if the known target detection range is simple and the modeling objects are mostly large-volume walls, the upper threshold can be set higher, such as 20. That is, if a single interfering voxel contains fewer than 20 point clouds, it can be identified as an interfering voxel and filtered out in subsequent processing; otherwise, further processing is performed. If the known target detection range is more complex and the modeling objects may contain various objects, such as multiple sparse iron fences, the upper threshold can be set lower, such as 5. This retains voxels with a smaller number of point clouds but more than the upper threshold as target voxels, to handle situations where the modeling objects are more detailed and complex.
[0069] In one embodiment, for the initially screened interfering voxels, the number of points they contain is determined based on the point cloud data. If the number is lower than a preset upper threshold, it is identified as an interfering voxel. Otherwise, if the number of points in the interfering voxel is greater than or equal to the upper threshold, it is necessary to determine whether the voxel may have been misclassified, misclassifying a target voxel as an interfering voxel. The voxel that may have been misclassified is marked as a candidate interfering voxel, and a secondary verification operation is performed. Based on the processing result of the secondary verification operation, the candidate interfering voxels are divided into target voxels and interfering voxels.
[0070] A secondary verification operation is performed on the candidate interfering voxels, including: acquiring historical target voxels, which are the set of target voxels that were determined before acquiring the point cloud data; performing point cloud registration between the point cloud data in the candidate interfering voxels and the historical target voxels according to a preset registration algorithm to obtain the registration result; determining whether the point cloud data in the candidate interfering voxels is located in the historical target voxels based on the registration result; if it is located, the candidate interfering voxel is marked as a target voxel; if it is not located, the candidate interfering voxel is marked as an interfering voxel.
[0071] In one implementation, a secondary verification operation is performed on candidate interfering voxels, requiring the acquisition of historical target voxels. Historical target voxels are the set of voxels already identified as target voxels before point cloud data acquisition. It is understood that point cloud data acquisition, i.e., the division of target and interfering voxels, is continuous. Voxels already identified as target voxels in previous processes can be stored in advance, and the set of voxels already identified as target voxels is called historical target voxels. Candidate interfering voxels and historical target voxels are then registered using a preset registration algorithm, which can be a Normal Distributions Transform (NDT), etc. By dividing the target point cloud (point cloud within historical target voxels) into several cells, fitting a normal distribution (e.g., a Gaussian distribution) to the point cloud within each cell, and then mapping the points of the source point cloud (point cloud within candidate interfering voxels) onto these distributions, the pose is optimized by maximizing the probability of the current point cloud in the target distribution, thereby obtaining the registration result. The registration process is determined based on the selected preset registration algorithm; the specific details of this application will not be described in detail. The registration result is used to characterize whether the point cloud data of the candidate interfering voxel is located within the historical target voxel. If it is located, it indicates that the candidate interfering voxel has been misclassified and should be restored as the target voxel. If it is not located, it indicates that the candidate interfering voxel is indeed an interfering voxel and should be marked as such.
[0072] Through the above partitioning process, all voxels within the voxel grid are distinguished as target voxels or interference voxels, effectively controlling the computational load while ensuring accuracy. Furthermore, for voxels already identified as target voxels, they can be merged into historical target voxels for updating, thus facilitating the registration process for candidate interference voxels and avoiding accidental deletion. Existing technologies merge interference voxels and target voxels into the same cell when the distance between them is less than the voxel resolution, leading to the accidental deletion of target voxels. The method proposed in this application employs a dual verification mechanism: first, interference voxels are initially screened based on their relationship with a fixed cutoff distance (i.e., the scanning beam); then, a secondary verification is performed using an NDT matching mechanism for interference voxels with a small number of points in the point cloud. This effectively reduces the false positive rate of static points and improves the accuracy and reliability of dynamic point cloud filtering.
[0073] Step S130: Filter out the point cloud data corresponding to the interfering voxels; construct a stereo model of the target object within the target detection range based on the point cloud data corresponding to the target voxels, and output the stereo model.
[0074] In one embodiment, after dividing voxels into target voxels and interference voxels, the method includes: storing each voxel according to a preset key-value pair storage structure, where one key-value pair corresponds to one voxel, the key of the key-value pair is the spatial location of the voxel, and the value of the key-value pair is the marker of the target voxel and interference voxel corresponding to the voxel; filtering out the point cloud data in the interference voxels, constructing a stereo model with the point cloud data in the target voxels, and outputting it, including: determining the key-value pairs whose values are markers of interference voxels through a preset query method, filtering out the point cloud data in the voxels corresponding to the key-value pairs; retaining the key-value pairs whose values are target voxels; obtaining the point cloud data corresponding to the key-value pairs whose values are target voxels, marking them as target data; and constructing a stereo model based on the target data and outputting it.
[0075] In one embodiment, the aforementioned steps are repeatedly executed until all voxels within the target detection range are traversed, distinguishing voxels into interfering voxels and target voxels. During the traversal, voxels can be continuously updated, with the final update result determining the voxel type. Previously, this application used a sliding window model to store point cloud data, thereby controlling the amount of real-time acquired point cloud data stored. Similarly, a similar scheme can be adopted for storing target voxels and interfering voxels. This application can also use a sliding window model to retain the voxel state for a certain duration. This duration can be related to the first and second durations mentioned above, being less than or equal to the second duration and greater than or equal to the first duration. It is understood that the second duration is the storage duration for point cloud data, and the first duration is the processing duration for point cloud data. Therefore, at least the first duration of point cloud data is required to distinguish whether a voxel is a target voxel or an interfering voxel; and simultaneously, the point cloud data will be updated after the second duration. Therefore, the occupancy state of the target voxel can be maintained for two durations, for example, the first duration is 10 seconds and the second duration is 20 seconds, then the voxel's retention state lasts for 15 seconds. If the voxel remains identified as the target voxel beyond 15 seconds, the object corresponding to the point cloud data within that voxel can be considered a static object, and the voxel will no longer be updated or processed, thus significantly reducing memory usage. Addressing the problem of memory overflow caused by marking all grids along the entire laser path in existing technologies, this application provides a solution based on the spatial distribution characteristics and motion trends of the point cloud, retaining only the marking of grids for a specific duration. This significantly reduces the number of grids that need to be stored and processed, effectively reducing memory usage and making it possible to achieve large-scale 3D mapping on resource-constrained robotic platforms.
[0076] Simultaneously, this application reduces the voxel size from the decimeter level of existing technologies to the centimeter level, for example, setting the voxel size to a fine voxel resolution of 2cm as mentioned above, to meet the needs of indoor scenes. Furthermore, it can limit the target detection range, for example, a ±5 meter (horizontal) and ±2 meter (vertical) area centered on the LiDAR, effectively controlling the computational load while ensuring accuracy. Under this setting, the maximum number of voxels that can be labeled in a single frame of point cloud is:
[0077] (8)
[0078] Assuming the robot's speed is 1 m / s, the number of voxels marked by the robot is:
[0079] (9)
[0080] The aforementioned number poses a challenge to voxel data storage. Therefore, this application employs a pre-defined key-value pair storage structure to store each voxel. Specifically, this data structure can be an unordered_map data structure. Storing voxels using this data structure results in a total overhead of approximately 32 bytes per element. Assuming the scanning robot has 32GB of memory, it can store approximately 1 billion key-value pairs, meeting the calculated storage requirement of 62,500,000 voxels (Num_voxel_1), thereby controlling the robot's manufacturing costs and resource allocation, allowing the robot to allocate more storage space to perform other tasks. The unordered_map utilizes its efficient hash mapping mechanism to achieve fast lookups. Compared to the quadtree structure used in existing solutions (where the lookup complexity is O(log n)... n This application optimizes the voxel lookup time complexity to constant level O(1), improving the efficiency of voxel lookup. Specifically, a voxel is stored through a key-value pair, where the key is the spatial location of the voxel (e.g., the xyz coordinate system); and the value is the label of the target voxel and the interfering voxel (e.g., 0 for the target voxel and 1 for the interfering voxel).
[0081] By employing the hash mapping mechanism of `unordered_map`, after completing the voxel partitioning within all voxel networks, interfering voxels can be quickly retrieved and identified. This involves determining key-value pairs with values indicating interfering voxels using a preset query method, filtering out the point cloud data within the corresponding voxels, and retaining only the point cloud data within the target voxels. The remaining point cloud data is then marked as target data, and a 3D model is constructed and output based on the target data. Existing technologies using decimeter-level voxel resolution perform poorly in indoor scenes, making it difficult to accurately represent small objects such as tables and chairs. Attempting to reduce voxel size to improve accuracy significantly increases the computational burden. The method provided in this application introduces a hash table to directly store voxels. The use of a hash table greatly improves the search speed for marked voxels, thereby enabling the reduction of voxels to the centimeter level while maintaining computational efficiency, significantly improving the representation accuracy of small indoor objects.
[0082] Therefore, compared with the numerous drawbacks of existing technologies in large-scale dynamic point cloud filtering, this application demonstrates significant advantages, effectively solving the problems of resource consumption, mapping accuracy, and dynamic / static point differentiation in existing technologies. It simplifies the calculation steps of the truncation distance by dividing voxels using a preset fixed truncation distance, further reducing voxel sizes from the decimeter level in existing technologies to the centimeter level while maintaining computational efficiency, significantly improving the representation accuracy of small indoor objects. Furthermore, by utilizing the division of interference voxels and target voxels, point clouds within interference voxels can be accurately filtered out, ultimately ensuring that only background and environmental point cloud data are used for mapping, effectively reducing the false positive rate of static points and improving the accuracy and reliability of dynamic point cloud filtering.
[0083] Figure 5 An internal structural diagram of a computer device in one embodiment is shown. This computer device can specifically be a terminal or a server. Figure 5 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a mapping method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to perform a mapping method. Those skilled in the art will understand that... Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0084] In one embodiment, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the method as described in any of the foregoing embodiments.
[0085] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0086] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0087] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A mapping method, characterized in that, When applied to scanning robots, the following steps are included: Obtain point cloud data of the target detection range and map the point cloud data into the corresponding voxels; The voxels are divided into target voxels and interference voxels using a preset fixed cutoff distance; the fixed cutoff distance is a preset distance drawn from the point cloud hit by the scanning beam along the scanning beam toward the scanning robot; the scanning beam is the beam emitted by the scanning robot to collect the point cloud data. The segmentation operation includes: calculating and determining the maximum incident angle based on the fixed cutoff distance, and obtaining the incident angle of the scanning beam; marking the voxels traversed by the scanning beam as candidate voxels; if the distance between the candidate voxel and the point cloud is greater than the fixed cutoff distance, and the incident angle is less than or equal to the maximum incident angle, then marking the corresponding candidate voxel as an interfering voxel; and marking the voxels that are not marked as interfering voxels and are the voxels in the point cloud hit by the scanning beam as target voxels. The method for determining the maximum angle of incidence based on the fixed cutoff distance is as follows: The maximum incident angle; The fixed cutoff distance; The point cloud data corresponding to the interfering voxels is filtered out; a 3D model of the target object within the target detection range is constructed based on the point cloud data corresponding to the target voxels, and the 3D model is output.
2. The mapping method as described in claim 1, characterized in that, The method further includes: The scanning robot's movement speed and scanning frequency are obtained; A first duration is calculated and determined based on the movement speed and the scanning frequency; a second duration is determined based on the first duration, wherein the second duration is greater than or equal to the first duration; The step of acquiring point cloud data of the target detection range and mapping the point cloud data to the corresponding voxels includes: Acquire and store the point cloud data of the second duration, and label it as the first point cloud data; Extract the point cloud data of the first duration from the first point cloud data and mark it as the second point cloud data; The second point cloud data is processed to map it into the corresponding voxel.
3. The mapping method as described in claim 1, characterized in that, The step of mapping the point cloud data to the corresponding voxels includes: The point cloud data is then pose-optimized according to a preset pose optimization algorithm to obtain optimized data. Construct a voxel network within the target detection range; Obtain a preset voxel size, divide the voxel network into multiple voxels, and each voxel is a cube whose size is indicated by the preset voxel size; The optimized data is mapped to the corresponding voxels.
4. The mapping method as described in claim 1, characterized in that, After dividing the voxels into target voxels and interfering voxels, the method further includes: Based on the point cloud data, determine whether the number of point clouds within the interfering voxel is lower than a preset upper limit threshold. If the number of point clouds is higher than or equal to the upper limit threshold, the corresponding interfering voxel is marked as a candidate interfering voxel. A secondary verification operation is performed on the candidate interfering voxels. Based on the processing result of the secondary verification operation, the candidate interfering voxels are divided into the target voxels and the interfering voxels.
5. The mapping method as described in claim 4, characterized in that, The secondary verification operation on the candidate interfering voxels includes: Obtain historical target voxels, which are sets of target voxels that were identified before the point cloud data was acquired; The point cloud data within the candidate interference voxels are registered with the historical target voxels using a preset registration algorithm to obtain the registration result. Based on the registration result, it is determined whether the point cloud data within the candidate interfering voxel is located within the historical target voxel; If it is located, then the candidate interfering voxel is marked as the target voxel; If not located, the candidate interfering voxel is marked as the interfering voxel.
6. The mapping method as described in claim 1, characterized in that, After dividing the voxels into target voxels and interfering voxels, the method includes: Each voxel is stored according to a preset key-value pair storage structure. One key-value pair corresponds to one voxel. The key of the key-value pair is the spatial location of the voxel, and the value of the key-value pair is the marker of the target voxel and the interference voxel corresponding to the voxel. Filtering out the point cloud data within the interfering voxel, constructing a stereo model using the point cloud data within the target voxel, and outputting the model includes: The key-value pairs whose values are markers of the interfering voxels are determined by a preset query method, and the point cloud data in the voxels corresponding to the key-value pairs are filtered out; the key-value pairs whose values are the target voxels are retained. Obtain the point cloud data corresponding to the key-value pair with the value of the target voxel, and mark it as target data; construct the stereo model based on the target data and output it.
7. A computer device, characterized in that, Including processor and memory; The processor is used to execute a computer program stored in the memory to implement the method as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Point cloud determination method and device, point cloud screening method and device, and computer equipment
CN111815707A
High-precision modeling method based on truncated symbol distance function and fused with laser point cloud
CN118334263A