This post is written by HeejoonLee

1. Preface

This post briefly introduces the methods used to generate a minimap from the point cloud output of a SLAM framework(dso).

All images shown in the post were created using the PCL. Follow the link for more information on the point cloud library.

The base image used in the post is generated from the TUM mono sequence_01 dataset using the dso framework.

The map generation process mainly consists of three steps: filtering, segmentation, and reconstruction.

2. Filtering

The point cloud output of dso is a .pcd file containing the 3D coordinates of the features detected by the framework. The coordinates can easily be visualized using the pcl viewer that comes with the point cloud library. However, the raw point cloud output of a SLAM framework usually contains many defects, such as outliers, uneven density, unnecessary points, or missing points, that need to be processed adequately before the set of points can be used as an input to generate a minimap.

The most simple form of processing that can be applied is filtering, where we remove points from the point cloud based on certain criteria.

The two mainly used filters available in the point cloud library are: statistical outlier removal filter and voxel grid filter.

2.1. Statistical Outlier Removal Filter

(TODO: Description of the statistical outlier removal filter)

Parameter Description
meanK (TODO)
stddevMulThresh (TODO)

The table below shows the result of applying the statistical outlier removal filter on the raw point cloud:

meanK = 50, stddevMulThresh = 1.0 (The same filter applied twice)
stat01 stat02

The point cloud shown on the second column(generated by appling the same filter twice) will be used as the input point cloud to all other processing methods explained below.

2.2. Voxel Grid Filter

The voxel grid filter defines a grid of fixed-sized cubes called voxels with the length of each side given by the leafSize parameter. The filter removes all points but one(randomly chosen) in each voxel.

Parameter Description
leafSize (TODO)

The table below shows the result of applying the voxel grid filter on the point cloud:

leafSize = 0.05 leafSize = 0.1 leafSize = 0.5
voxel_0.05 voxel_0.1 voxel_0.5

Notice that the density of the point cloud decreases with increasing voxel length.

By treating each voxel index as a coordinate in 3D space, a grid map can be generated by coloring the voxel that contains a point. The image below shows the resulting grid map:

3D grip map from voxel grid(voxel length = 0.5)
grid

3. Segmentation

Although the filtering process removes unnecessary information from the point cloud, we may still need to derive some meanings from the points instead of purely treating them as a group of points in 3D space.

Segmentation tries to obtain higher dimensional information from the points by extracting geometric shapes from the point cloud.

Plane segmentation and region growing segmentation methods are implemented in the point cloud library.

3.1. Plane Segmentation

Parameter Description
distanceThreshold (TODO)
distanceThreshold = 0.1
plane_segmentation

Each point is colored based on the plane that it is a part of.

3.2. Region Growing Segmentation

Parameter Description
(TODO) (TODO)
region growing segmentation walls only top view
region_growing_segmentation walls_only top_view

4. Reconstruction

With both filtering and segmentation applied, the point cloud now conveys more meaning: the groups of points that form walls, floor and ceiling are easily identified.

The current point cloud, however, is still far from being a usable minimap that we are trying to generate.

One flaw that stands out in the current form is the sheer amount of missing information from the dataset. The walls that should be a single plane are disjointed, and the doorway is no longer recognizable. Such lack of data points may be due to the inherent characteristic of a sparse SLAM framework such as dso or the use of a monocular camera which cannot natively capture the depth of each point.

We can compensate for the absence of information using various reconstruction methods. The point cloud library provides the moving least squares surface reconsturction API, which we apply to our point cloud:

Before applying MLS After applying MLS(radius=0.30)
MLS_before MLS_after

Projecting the trajectory of the camera on the point cloud can help us to identify where the doors are supposed to be:

Trajectory
trajectory

Leave a comment