Skip to content

[feat] Optimize clustering

Tong Fu requested to merge feat/OptimizeClustering into master

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 struct Voxel and a struct ClusteringGrid are added.

  • Add function InitClusteringGrid to initialize parameters of ClusteringGrid and create the BackgroundMap. 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 the BackgroundMap, 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 Motion_detector_mr

Improvement for single cluster for one object.

The top image is the previous result that a person is extracted as two clusters. The bottom image is the improved result.

Screenshot_from_2024-09-05_11-56-55

Improvement for false positive

The top image is the previous result that a part of wall (fixed object) is detected as a cluster of moving object. The bottom image is the improved result.

Screenshot_from_2024-09-05_11-59-57

Parameters

Parameters for hap dataset Screenshot_from_2024-09-05_12-54-45

Background map (voxel grid)

Screenshot_from_2024-09-05_10-36-46

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
Edited by Tong Fu

Merge request reports