# Dynamic Downsampling Algorithm for 3D Point Cloud Map Based on Voxel Filtering
## Experiments
### Experimental Results and Analysis  
We used the nvida RTX3070 8G video memory in ubuntu 18.04, and the versions corresponding to the environment dependencies used are shown in Table 2.  
Our algorithm was evaluated against traditional downsampling techniques, namely, voxel downsampling, uniform downsampling, random downsampling, grid downsampling, clustering-based downsampling, and farthest-point sampling (FPS), through comparative experiments. The original point cloud used in these experiments consisted of 196,133 points [36]. As shown in Figure 10, the point cloud processed by our method (Figure 10b) has significantly reduced data volume while preserving key boundary information compared to the original point cloud (Figure 10a). Our algorithm is capable of identifying and prioritizing the retention of key points that define the shape and structure of objects. \begin{table}
\begin{tabular}{c c} \hline \hline
**System Environment** & **Version** \\ \hline cuda & 11.0 \\ \hline cuda & 23.1.0 \\ \hline python & 3.7 \\ \hline pytorch & 1.8.1 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: List of environmental dependencies. Figure 10: Comparison between original and proposed methods. Images generated with (**a**) original method and (**b**) our method. Figure 11a-c demonstrate that voxel downsampling mandates the manual tuning of the leafsize parameter. A large leafsize overly sparsens the cloud, erasing critical features, whereas a small leafsize inadequately simplifies the cloud, failing to efficiently reduce data complexity. Figure 11: Cont. Figure 11d-f reveal that uniform downsampling in the PCL library also necessitates manual adjustment, this time of the every_k_points parameter. Higher values of every_k_points lead to excessive data loss, while lower values do not simplify the cloud enough. Our proposed method eliminates the need for such adjustments, automatically adapting to cloud scale and density, thereby preserving edge and feature integrity more effectively. As shown in Figure 11g-i, the proposed downsampling algorithm requires artificial adjustment of the leafsize coefficient, like random downsampling in the PCL library. The difference from voxel downsampling is that if leafsize is too small, the sampling is sparser, and the original points are lost. For cloud feature information, the larger the leafsize, the denser the sampling. Compared with the random downsampling method in the PCL library, the proposed algorithm saves the cost of manual parameter adjustment. It can dynamically segment point cloud maps according to different scales of point cloud maps and different numbers of local point clouds and can effectively preserve the edge of the point cloud image and the feature information of the object. Figure 11j-i illustrate the necessity of manually setting target number of triangles for grid downsampling. This parameter directly influences the downsampling density, with lower values resulting in significant data loss and higher values inadequately simplifying the cloud. Unlike this method, our algorithm requires no manual parameter adjustment and dynamically adjusts parameters to the cloud's complexity, ensuring optimal simplification while retaining critical structural details. Figure 11m-o illustrate that clustering downsampling, like voxel downsampling, necessitates the manual tuning of the leafsize parameter. Oversized leafsize values lead to excessive sparsity and feature loss, whereas too small values result in insufficient simplification, failing to meet the goals of effective point cloud reduction. The FPS (farthest-point sampling) method demands manual specification of the output size, denoted by object number of triangles. A lower count results in overly sparse clouds and potential feature loss, while a higher count compromises the simplification objective. Figure 11p-r display the outcomes of varying the FPS parameters. Table 3 provides a comparative analysis showcasing the effectiveness of our dynamic downsampling algorithm against traditional methods.