Zum Inhalt springen

3D Point Cloud Preprocessing for SLAM

5. Oktober 2026 durch
Leo Drive Teknoloji A.Ş., Sibel Turgut

When working with LiDAR sensors, the output is a 3D Point Cloud, a massive digital representation of the environment. SLAM (Simultaneous Localization and Mapping) relies on this data to determine the robot's position and build a map. However, raw point clouds are enormous, noisy, and often warped by the sensor's own movement.

Feeding raw point clouds directly into a SLAM algorithm will result in high latency. A robust preprocessing pipeline is required to prepare the data.

1. Voxel Grid Filtering (Downsampling)

The Concept: Filtering out redundant data while preserving the overall geometry.

How it Works: The 3D space is divided into a grid of tiny cubes called voxels. For each voxel, the algorithm calculates the geometric centroid (the average position) of all those points and then N points are replaced by this single centroid point:

2. Motion Distortion Deskewing

The Concept: Correcting the "wavy" or stretched structures that occur when a sensor moves while actively scanning.

How it Works: Deskewing mathematically projects every single point p_i captured at its specific timestamp t_i back to a unified coordinate frame (usually t_{start}).

To do this, you need high-frequency odometry, usually from an IMU (Inertial Measurement Unit). By integrating IMU data, you estimate the continuous pose (position and orientation) of the sensor. Let T_i be the transformation matrix of the sensor at time t_i. We transform each raw point p_{raw} to the reference frame using:

3. Outlier Removal (Noise Filtering)

The Concept: Removing "ghost points" caused by dust, rain, or reflections before they trick the SLAM algorithm into thinking false obstacles exist.

How it Works: There are two primary algorithms used:

1. Radius Outlier Removal (ROR): You specify a search radius r and a minimum number of neighbors k. The algorithm queries the KD-Tree structure. If a point has fewer than k neighbors within radius r, it is deleted. It is fast but can struggle with varying point densities.

2. Statistical Outlier Removal (SOR): For every point, it computes the mean distance to its k nearest neighbors. It then calculates the global mean and standard deviation of all these distances. A point is classified as an inlier only if its mean distance d_i satisfies (where α is a multiplier you define):

4. Feature Extraction: Curvature-Based Edges and Planes

The Concept: We need to find distinct, unique landmarks (features) to track the robot's movement from frame to frame so that we can have less numbered but more meaningful set of points. We divide these into two categories:

1. Edge Features: Sharp corners (tree trunks, building corners, poles).

2. Planar Features: Flat surfaces (walls, large signs).

How it Works: To figure out if a point is an edge or a plane, we calculate its Curvature (often called "smoothness" or c). We do this by comparing a point (p_i) to its immediate neighbors on the exact same laser ring (the set of neighboring points S).

Here is the mathematical formula used in LOAM-based algorithms to calculate the curvature c:

Let's translate that into plain English:

  • p_i is the specific point we are evaluating.
  • p_j are the neighboring points immediately to the left and right of p_i.
  • We subtract the coordinates of the neighbors from our point, add those vectors together, and look at the magnitude (length) of the result.

The Logic:

  • If the surface is flat (a wall): The vectors to the left and right will point in exactly opposite directions. When you add them together, they cancel each other out. The curvature c will be very close to 0. The algorithm labels this a Planar Feature.
  • If the surface is sharp (a corner): The vectors to the neighbors will bend around the corner. They won't cancel out. The vector sum will be large, meaning the curvature c will be a high number. The algorithm labels this an Edge Feature.

Summary

Raw LiDAR point clouds are massive, noisy, and distorted by the sensor's movement. To allow SLAM algorithms to accurately map an environment and track a robot's position without lagging, the raw data can be cleaned through a preprocessing pipeline:

  • Downsampling (Voxel Grid): Averages points within small 3D cubes to drastically reduce the overall data size without losing the environment's geometric shape.
  • Deskewing: Used to mathematically "untwist" motion distortion caused by the robot moving while the sensor is actively scanning.
  • Noise Filtering: Deletes isolated "ghost points" (caused by dust, rain, or reflections) by removing points that lack close neighbors.
  • Feature Extraction: Analyzes the curvature of the remaining points to isolate highly distinct landmarks, like sharp corners (edges) and flat walls (planes).

Ultimately, preprocessing turns an overwhelming, messy cloud of dots into a lightweight, clean, and highly structured map.

Lie Theory for SLAM Pose Estimation