pointcloudset.filter.stat module

Utility function for filtering frames based on statistics.

pointcloudset.filter.stat.quantile_filter(pointcloud: PointCloud, dim: str, relation: str = '>=', cut_quantile: float = 0.5) PointCloud

Filtering based on quantile values of dimension dim of the data.

Parameters:
  • pointcloud (PointCloud) – PointCloud to be filtered.

  • dim (str) – Dimension to limit. Any column in data (not just x, y or z, but also “intensity”)

  • relation (str, optional) – Any operator as string. Defaults to “>=”.

  • cut_quantile (float, optional) – Quantile to compare to. Defaults to 0.5.

Returns:

PointCloud which fullfils the criteria.

Return type:

PointCloud

pointcloudset.filter.stat.value_filter(pointcloud: PointCloud, dim: str, relation: str, value: float) PointCloud

Limit the range of certain values in a PointCloud.

Parameters:
  • pointcloud (PointCloud) – PointCloud to be filtered.

  • dim (str) – Dimension to limit. Any column in data (not just x, y or z, but also “intensity”)

  • relation (str) – Any operator as string.

  • value (float) – Value to limit.

Returns:

PointCloud which fullfils the criteria.

Return type:

PointCloud

pointcloudset.filter.stat.remove_radius_outlier(pointcloud: PointCloud, nb_points: int, radius: float) PointCloud

Remove points that have fewer than nb_points neighbours within radius.

Parameters:
  • pointcloud (PointCloud) – PointCloud from which to remove points.

  • nb_points (int) – Minimum number of neighbours required (excluding the point itself). Must be >= 1.

  • radius (float) – Search radius. Must be positive.

Returns:

PointCloud without outliers.

Return type:

PointCloud

Raises:

ValueError – If nb_points is less than 1 or radius is not positive.