УДК 004.8
Perfilev Dmitrii
Master student of Lanzhou University of Technology School of Computer and Communication (Lanzhou, China)
ENHANCING LIDAR POINT CLOUD PROCESSING THROUGH NOISE REDUCTION AND CLUSTERING TECHNIQUES
Аннотация: efficient processing of LiDAR point cloud data is essential for various applications, including autonomous driving, robotics, and geographic information systems, where accurate environmental perception is critical. This paper presents a structured approach to enhance LiDAR data processing through noise reduction and clustering, leveraging the Open3D library for visualization. Our method begins by loading raw point cloud data and applies K-means clustering to segment the data based on spatial location. Noise is filtered by removing points far from primary clusters, presumed to represent background or non-essential objects. Subsequently, bounding boxes are generated around clusters, enabling a clearer spatial understanding of object distribution within the scene. Additionally, distances from the LiDAR sensor center to cluster centers are visualized, allowing for an assessment of cluster characteristics relative to sensor positioning. Results indicate that clustering effectively organizes point cloud data, revealing patterns where denser clusters form closer to the sensor, offering high-resolution object detection, while distant clusters display fewer points, affecting detection accuracy. By computing intra-cluster variability and applying the custom Variety Index for internal homogeneity assessment, this method allows for optimized LiDAR data segmentation and facilitates insights into spatial relationships within the environment. This framework contributes to enhanced point cloud processing and paves the way for robust environmental perception in dynamic applications.
Ключевые слова: point cloud, cluster, K-means, object detection, lidar.
1. Introduction.
LiDAR point cloud data is essential for understanding the surrounding environment in various applications, including autonomous driving, robotics, and geographic information systems. Due to the high density and noise levels of raw
LiDAR data, processing and organizing this data efficiently is crucial for accurate object detection and scene understanding. Clustering methods [1,2], in particular, offer an effective way to group spatially related points, aiding in the segmentation and classification of objects based on their spatial features. This study proposes a systematic approach to LiDAR point cloud processing by integrating clustering and visualization techniques using the Open3D library. By applying K-means clustering, noise reduction, and spatial segmentation, we aim to enhance the clarity and usability of LiDAR data. The process involves loading and visualizing raw point cloud data, filtering noise, and segmenting the data into clusters. Additionally, bounding boxes are generated for each cluster, enabling us to better analyze the spatial distribution and density of detected objects, especially as these attributes change with distance from the LiDAR sensor. Through visualization and clustering, we observe significant insights into the density and distribution patterns of point cloud data. For instance, points closer to the LiDAR sensor typically form denser clusters, facilitating more detailed object definitions. In contrast, objects at greater distances contain fewer data points, impacting the precision of detection and classification. By enhancing the quality of point cloud data through clustering and noise reduction, our approach supports more accurate environmental interpretation, making it suitable for real-time applications in dynamic environments. This approach provides a robust foundation for advanced LiDAR processing, improving the reliability and accuracy of perception systems in autonomous systems.
2. Problem Statement.
This study addresses the challenge of processing LiDAR point cloud data to improve environmental perception for applications such as autonomous driving and robotics. Raw LiDAR data often includes noise and high data volume, which can hinder accurate analysis and increase computational requirements. Traditional clustering techniques, while effective for grouping spatially close points, may not fully capture intra-cluster variability or handle noise effectively in unstructured environments. To tackle these issues, we propose a preprocessing approach that
integrates K-means clustering and a novel Variety Index to measure intra-cluster variability. This method aims to enhance the quality and efficiency of LiDAR data processing by reducing noise, improving the homogeneity within clusters, and supporting detailed environmental analysis. Our approach seeks to offer more precise object detection, classification, and spatial understanding, ultimately contributing to improved decision-making in automated and robotic systems.
3. Method.
The proposed approach for processing LiDAR [3] point cloud data consists of several key steps aimed at enhancing data quality and extracting useful spatial information through clustering and visualization. The methodology is detailed as follows:
Loading and Initial Visualization of Raw Point Cloud Data: Using the Open3D [4] library, we load raw LiDAR point cloud data from a .bin file and visualize it in its unprocessed form. This initial step provides insight into the raw spatial distribution of data points (Fig. 2).
Noise Reduction via K-means Clustering: To improve data quality, we apply K-means clustering with 200 clusters. This clustering step groups points based on their spatial proximity, which assists in identifying and filtering out points likely to be noise or irrelevant, such as ground points or background objects located far from the main clusters (Fig. 3).
Removing Isolated Noisy Points: Points identified as noise are excluded from the point cloud, refining the data by enhancing clarity and reducing unnecessary variance. This step is critical for improving the data's overall quality, especially for downstream tasks like object detection and classification (Fig. 4).
Bounding Box Creation for Clusters: For each identified cluster, a bounding box is created around the clustered points to aid in spatial analysis. This bounding box provides a clearer structure of the objects within each cluster, allowing for easier interpretation and organization of the clustered data points (Fig. 5).
Calculating Distances to Cluster Centers: Distances from the LiDAR sensor's center to the center of each cluster are visualized, illustrating the relative positions of clusters in the environment. This distance-based visualization offers insight into the spatial arrangement and density of objects within the scene (Fig. 6).
Evaluation of Intra-Cluster Variability: We introduce the Variety Index to assess the variability within clusters by calculating the average intra-cluster variance across all clusters. This metric emphasizes the degrof internal homogeneity within each cluster, providing a detailed measure of point spread and aiding in the interpretation of the clustering results.
Comparison of Clustering Results Using Internal Validation Indexes: The clustering results are evaluated through various internal metrics, including the Dunn Index, Calinski-Harabasz Index, Silhouette Score, Davies-Bouldin Index, and our custom Variety Index. This evaluation offers a comprehensive view of the clustering quality, helping to identify the scenarios with optimal intra-cluster compactness and inter-cluster separation.
This multi-step approach provides a systematic way to process and analyze LiDAR point cloud data, leveraging clustering and visualization to improve data clarity and interpretability. By reducing noise and refining cluster structure, the method enhances the quality of point cloud data, ultimately supporting accurate object classification and spatial analysis in autonomous and robotic applications.
4. Experiments.
High within-cluster similarity indicates that points in the same cluster have comparable features, while low between-cluster similarity ensures that points in different clusters are noticeably dissimilar, as shown in Figure 1.
Fig. 1. Ground truth.
4.1. Loading and Visualizing Raw Point Cloud.
Objective: Load the raw LiDAR point cloud data and visualize it in its unprocessed form.
Process:
• Using the Open3D library[3], the .bin file containing point cloud data is loaded. Point cloud data from LiDAR sensors typically consists of millions of points, each representing a 3D coordinate in space.
• Visualization: At this stage, no preprocessing or filtering is applied to the data. The goal is to simply visualize the raw point cloud to observe how the points are distributed in 3D space.
• Outcome: The raw point cloud gives an initial sense of the spatial distribution of objects, ground, and noise. It shows how dense or sparse certain regions are, providing insight into the structure of the environment captured by the LiDAR sensor
• Figure 2 shows the raw point cloud as loaded from the .bin file, highlighting the unprocessed state of the data.
Fig. 2. KITTI visualized.
4.2. Noise Removal from Point Cloud.
Objective: Improve the quality of the point cloud by removing noise using clustering techniques.
Process:
• The K-means clustering algorithm is used to divide the point cloud into 200 clusters. Clustering helps in identifying groups of points that are closely located in space, which often corresponds to different objects or parts of the environment.
• After clustering, points that are far away from the main clusters (presumed to be background noise, irrelevant data, or artifacts such as the ground) are identified.
• By removing these outliers, we enhance the clarity and focus on relevant points in the scene.
• Outcome: At this stage, the data is cleaned up, removing noise and irrelevant points, which are usually background or ground points that do not contribute to the object detection or classification process.
• Figure 3 shows the point cloud after applying noise removal using clustering, where the unnecessary noise has been removed, revealing cleaner clusters of points.
• In Figure 3, the M-estimator SAmple Consensus (MSAC) algorithm, a variant of the RANdom SAmple Consensus (RANSAC) algorithm, was used for ground extraction. This method aims to fit a plane to the point cloud data, identifying ground points as inliers. Points that do not fit this plane are considered outliers, which are the points of interest for further clustering. As shown in Figure 3.3, the original point cloud demonstrates that the ground removal procedure was successful, leaving only the relevant points for subsequent analysis.
Fig. 3. Noise Removal.
4.3. Removing Noise from Point Cloud.
Objective: Refine the point cloud by eliminating noisy or irrelevant points identified in the previous step[5]. Process:
• Based on the clusters generated from the previous step, points that were identified as noise or outliers are excluded from the point cloud.
• This step focuses on isolating the meaningful data from the background noise, ensuring that only points belonging to significant objects (e.g., vehicles, pedestrians, buildings) are kept.
• Outcome: After removing noisy points, the point cloud becomes more accurate and reliable for subsequent analysis and detection tasks. This clean dataset is crucial for ensuring that the model's performance is not hindered by irrelevant data.
• Figure 4 illustrates the point cloud after noise removal, where the cleaner dataset is shown, frfrom irrelevant points.
Fig. 4. Removing Noise.
4.4. Creating Bounding Boxes for Clusters.
Objective: Enclose each cluster within a bounding box for easier visualization and analysis.
Process:
• For each cluster generated by the K-means algorithm, a bounding box is created around the points that belong to that cluster.
• The bounding box helps in visually segmenting each object or part of the environment, providing a clear spatial boundary around the group of points.
• Outcome: The bounding boxes make it easier to visualize the structure and size of each cluster, facilitating a better understanding of how objects are spatially organized within the point cloud.
• Figure 5 shows the bounding boxes around the clusters, allowing for better visual comprehension of object sizes and spatial arrangements.
Fig. 5. Creating Bounding Boxes.
4.5. Visualizing Distances to Cluster Centers.
Objective: Analyze the spatial distribution of clusters relative to the LiDAR coordinate center.
Process:
• The distance between the LiDAR sensor's coordinate center (the point where the sensor is placed) and the center of each cluster is calculated.
• These distances are visualized using lines drawn from the coordinate center to each cluster's center, giving a clear idea of how far each cluster is from the sensor.
• This step is crucial for evaluating the dispersion of objects in the scene and how they are distributed in relation to the LiDAR sensor's position.
• Outcome: By visualizing these distances, we can assess the spatial distribution of clusters, which is essential for understanding the structure of the environment and for tasks such as object detection or scene segmentation.
• Figure 6 displays the lines connecting the LiDAR sensor's center to each cluster center, illustrating the dispersion of clusters and helping evaluate the proximity of objects.
Fig. 6. Visualizing Distances to Cluster Centers.
4.6. Enlarged View of Clusters.
Objective: Provide a closer view of the individual clusters, particularly focusing on clusters containing specific objects.
Process:
• An enlarged view is presented to better visualize the clusters generated in the previous steps. This magnification helps in identifying the structure and composition of the clusters in greater detail.
• In the enlarged view, thrclusters containing cars can be clearly identified, showcasing the effectiveness of the clustering process in grouping similar objects together.
• Outcome: This detailed view allows us to inspect how well the clustering algorithm has grouped points belonging to the same object (e.g., cars) and how distinct the boundaries are between different clusters.
• Figure 7 shows an enlarged version of the clustered point cloud, highlighting thrclusters that represent cars.
Fig. 7. Enlarged View of Clusters.
4.7. Details.
The following subsections provide a step-by-step explanation of the preprocessing, scaling, clustering, and visualization techniques applied to the point cloud data. Each process was designed to optimize the accuracy and efficiency of the clustering and analysis workflow.
Data Preprocessing:
• Data sourced from the KITTI dataset [6] (Velodyne files).
• Height-based cropping applied using a threshold (-1.2) to remove points below a certain level.
Data Scaling:
• StandardScaler used for normalizing the point cloud data before clustering. Clustering Algorithm:
• K-Means algorithm employed to divide the point cloud into clusters.
• Chosen number of clusters: 400 (in one experiment, 15 for smaller datasets).
• Parameter random_state=0 was set to ensure reproducibility. Density-Based Data Filtering:
• Nearest Neighbors algorithm (with 1 neighbor) applied for filtering points by
density.
• Points with low density were removed using the 1st percentile of the average distance between the nearest points.
Visualization:
• Clusters were visualized with different colors for each cluster.
• AxisAlignedBoundingBox was used to visually represent the boundaries of each cluster.
• Display of central points (spheres) and connection of these points to cluster centers using lines.
4.8 The clustering model.
Fig. 8. Visualization of clusters. The results are also shown in Table 1, a - cluster ID 2, b - cluster ID 5, and c - cluster ID 10.
Processing LiDAR data is essential for assessing the surrounding environment in various applications, such as autonomous driving, robotics, and geographic information systems. Clustering is an effective technique for analyzing LiDAR data, as it groups data points based on their spatial location. This section outlines the approach for handling LiDAR point cloud data through clustering and visualization using the Open3D framework, with results presented in Fig. 8. From the clustering outcomes shown in Table 1, the following insights can be drawn: The variation in the number of points across different clusters indicates that the point cloud data's density and resolution change with distance from the LiDAR sensor. Clusters closer to the sensor (e.g., Fig. 8, Cluster 2) contain more points, leading to greater detail and clearer shapes. Conversely, clusters farther away (e.g., Fig. 8, Cluster 5) have fewer points, which may affect the accuracy and reliability of object detection and classification. The ability to differentiate between objects like cars and motorcycles highlights the clustering algorithm's effectiveness in categorizing point cloud data based on spatial and geometric characteristics.
Table 1. Clusters details.
Cluster ID Label Number of points Distance to LiDAR
2 Car 8512 2.4
5 Car 554 9.13
10 Motorcycle 1479 4.5
5. Conclusion.
This approach enables efficient processing and analysis of LiDAR point cloud data, offering valuable insights into the spatial arrangement of the surrounding environment and its objects. The visualization of processed data facilitates a deeper understanding of the geographical distribution of objects, making it easier to identify key features and patterns. By leveraging these insights, data-driven decisions can be made more effectively, particularly in applications such as autonomous driving, robotics, and GIS. The ability to separate and classify various objects enhances the overall accuracy of environmental mapping, improving the potential for real-time analysis and decision-making. Furthermore, the proposed methods, including clustering and visualization, provide a robust framework for LiDAR data processing, ensuring that the analysis is both comprehensive and scalable.
СПИСОК ЛИТЕРАТУРЫ:
1. Abiodun M. Ikotun et al. K-means Clustering Algorithms: A Comprehensive Review, Variants Analysis, and Advances in the Era of Big Data // Inf. Sci. 2022
2. Hamerly G., Elkan C. Alternatives to the k-means algorithm that find better clusterings. 2002. P. 600-607
3. Ullrich A., Pfennigbauer M. Advances in lidar point cloud processing. SPIE, 2019. Vol. 11005. P. 157-166
4. Qian-Yi Zhou et al. Open3D: A Modern Library for 3D Data Processing // ArXiv Comput. Vis. Pattern Recognit. 2018
5. Whelan T. et al. Robust real-time visual odometry for dense RGB-D mapping. I E E E, 2013. P. 5724-5731
6. Geiger A. et al. Vision meets robotics: The kitti dataset // Int. J. Robot. Res. Sage Publications Sage UK: London, England, 2013. Vol. 32, № 11. P. 1231-1237