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

Function to remove points that have less than nb_points in a given sphere of a given radius.

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

  • nb_points (int) – Number of points within the radius.

  • radius (float) – Radius of the sphere.

Returns

PointCloud without outliers.

Return type

PointCloud