[feat] Optimize clustering
Goal
The goal of this MR is to improve the clustering result, such as remove false positive (tree, leaves, wall et etc in the scene).
Change
-
Add function
ExtractClustersWithRegionGrowing
to grow region on a voxel grid map of motion points. A structVoxel
and a structClusteringGrid
are added. -
Add function
InitClusteringGrid
to initialize parameters ofClusteringGrid
and create theBackgroundMap
. A background voxel grid is created during the initialisation phase to check the validity of a cluster. If 50% of a cluster's voxel can be found in theBackgroundMap
, this cluster should be considered as background not a moving object. -
The output of clusters' information is now in the order of the clusterID.
Result
Demo
Here is a demo with a velodyne dataset
Improvement
Please see document here for the details.
Parameters
Runtime
livox-hap average runtime | |
---|---|
Motion estimation | 38.9ms |
Create background map | 8.8ms |
extract cluster with region growing | 1.58ms |
Future improvement
- Separation of a big cluster which contains more than one object.
- Fix axis-z for bounding box