Skip to content

[feat] Add adaptive outlier removal filter

Tong Fu requested to merge feat/AddFilterToRemoveOutliers into master

Goal

The goal of this MR is to create a filter which can remove outliers of a pointcloud (from LiDAR) with function of the depth.

Change

Add a filter called Adaptive outlier removal:

This filter identifies outliers in a point cloud based on the average distance of neighboring points.

Neighbor point analysis:

For each point in the point cloud, the filter calculates the average distance to its neighboring points. The number of neighbors considered is controlled by the parameter NbNeighbors.

Outlier definition:

A point is classified as an outlier if its average neighbor distance exceeds a computed threshold. The threshold depends on:

  • AveDistThreshold: a base threshold value
  • Factor: a linear scaling factor based on the points' depth

Enable or disable adaptive removal:

  • EnableAdaptiveRemoval = false: The threshold is fixed and equal to AveDistThreshold
  • EnableAdaptiveRemoval = true: The threshold is calculated as the maximum of:
    • AveDistThreshold
    • A depth-based value given by Factor × depth

The default value of Factor is 0.0035, corresponding to an arc-length-based threshold. This value assumes an angular resolution of 0.2 degrees.

Edited by Tong Fu

Merge request reports

Loading