Filter Point Cloud

Performs various operations on point clouds, depending on the selected mode.

Input

One or more point clouds

Output

A number of point clouds between zero and the input size, depending on the selected mode and whether Create new point cloud is enabled. Note that some modes will create new point clouds irrespective of whether Create new point cloud is set.

Description

Several filter modes are supported, which typically come with their own specific configuration options. In addition, all modes offer a Use GPU option, which attempts to improve performance by moving some of the computation onto the GPU. Note that how much work is shifted this way depends on the mode and may be nothing.

The individual modes and their options are:

  • Normal Computation
    This mode computes a normal for each point from the relative positions of itself and other nearby points. If the point cloud is dense and has both non-zero camera intrinsics and a non-identity transform matrix, the resulting normals are chosen to point towards the camera.
    • Window Size: If the point cloud is dense and Use NN is disabled, this parameter determines the range around each point included in the computation. Otherwise it has no effect. Specifically, the range in indices of the dense point cloud is from -s to s-1 along both axes around each point, where s is the value of Window Size divided by 2, rounding down, and clamped to the range [1,8]. Note that the computation fails for any point with less than (s+1)*(s+1) valid points in this search window. See Distance threshold for which points are valid.
    • Radius: If the point cloud is either not dense or Use NN is enabled, this parameter determines the radius in which neighboring points are considered for the computation. Otherwise this option has no effect.
    • Distance threshold: If the point cloud is dense and Use NN is disabled, this parameter determines whether a pair of points is too far apart to be allowed for the computation. Otherwise this option has no effect. Specifically, if the physical distance in Millimeters between the target point and another point in the search window (see Window Size) is at least this value, that other point is considered invalid for the purpose of that computation and will be ignored.
    • Remove points without normal: If enabled, points where the normal computation fails are removed. Otherwise their normal is set to NAN.
    • Use NN: If enabled, dense point clouds will use the same computational approach as sparse ones (see Radius). Does not have any effect on sparse point clouds.
  • Denoising Filter
    This filter fits a plane at the position of each point, using randomly chosen points from the vicinity of that target point. The target point is then displaced onto that plane. Any points where only 5 or less neighbors can be found within this range will not be processed.
    • Window Size:
      • If Use GPU is enabled and the point cloud is dense, this value determines the search range for finding neighbor voxels. In particular, the search window in indices of the dense point cloud has a range of Window Size divided by 2, rounding down, in either direction around the target point.
      • Otherwise this setting does nothing.
    • Radius:
      • If Use GPU is disabled or the point cloud is not dense, this value is the search range in Millimeters for finding the nearest neighbor voxels when estimating the local plane. Irrespective of this value, the number of neighbors considered is never larger than 7.
      • Otherwise this setting does nothing.
  • SOR Filter
    This mode removes all points where the average distance to the k nearest neighbors exceeds a threshold. The value of this threshold is the average of the distance to the k nearest neightbors across all points of the point cloud, plus the standard deviation of this measurement multiplied by M.
    • Neighbors: Equivalent to k+1 in the threshold equation above, so how many neighbor points to consider when computing the distance statistic on each target point.
    • Standard Deviation Multiplier: The parameter M in the threshold equation above, lower values cause a stricter filtering.
  • Distance Subsampling
    Removes all points where one of their nearest neighbors is closer than a specified distance.
    • Radius: The minimum distance in Millimeters, all points with neighbors below this distance are removed.
  • Border Removal
    If the point cloud is dense, this removes the boundary by an erosion operation. Otherwise it does nothing.
    • Border pixels: Size of the erosion, in pixels of the dense point cloud.
    • Crop: Vector of 4 indices for additional cropping after the erosion operation. Specifies the thickness of the boundary area to be removed in indices of the dense point cloud, in the format low x, high x, low y, high y.
  • Viewing Angle Filter
    Removes all points where the dot product between a points’ normal vector and the normalized vector from the origin to that point falls below a given threshold. Does not do anything on point clouds without point normals.
    • Max viewing angle: The maximum allowed angle between the point position and point normal, in degrees. Note that only the cosine of this value is used, so e.g. 90 or 270 are equivalent.
  • Additive Noise Filter
    Adds Gaussian noise to the position of all points.
    • Noise Standard Deviation: The standard deviation of the used Gaussian probability distribution, in Millimeters.
    • Add Noise in Normal Direction: If this is set and the point cloud has point normals, each point is displaced along its normals by a length sampled from the distribution. Otherwise each point is displaced along each coordinate axis indipendently by a length sampled from the distribution. Note that in the latter case the magnitude of the total shift no longer follows a Gaussian distribution.
  • Random Subsampling
    Discards points from the point cloud at random.
    • Discard Probability: When this mode is active, each point is independently discarded with the given probability (between 0 and 1).
    • Final number of points: When this mode is active, the point cloud is brought to the specified number of points. If it is originally larger, the surplus is discarded by randomly selecting points. If it is smaller instead, the missing number of points is created by duplicating random existing points. In cases where the number of missing points exceeds the size of the original point cloud, the entire point cloud is duplicated (potentially multiple times) before the random selection duplication is performed for the remaining fractional part.
  • Invert Normals
    This mode flips the sign on all point normals.
  • Voxel Grid Subsampling
    Converts the point cloud to a voxel grid, then creates a new point cloud by averaging the points inside each voxel.
    • Leaf size: The size of a voxel in Millimeters
  • Uniform Subsampling
    Converts the point cloud to a voxel grid, then creates a new point cloud by keeping the points closest to each voxel center and discarding the rest.
    • Leaf size: The size of a voxel in Millimeters
  • Radius Outlier Removal
    Removes all points that have less than the required number of neighbors inside the given radius.
    • Radius: Search radius around each point, in Millimeters.
    • Min number of neighbors: Amount of other points required inside the search volume to keep the target point.
  • Iterative Clustered Subsampling
    Downsamples the point cloud by grouping nearby points into clusters, then replacing them with the average over each cluster. Clusters are created by iteratively adding nearby points that meet the conditions specified by the 3 configuration parameters.
    • Radius: The maximum distance in Millimeters for points to be considered for the same cluster
    • Max number of points per cluster: When a cluster already includes this many points, a new one is created instead of adding further points to it.
    • Maximum variation: If adding a point to a cluster would push that clusters variation (the variance along the least significant principal component, divided by the sum of variances across all 3 principal components) above this value, the point is not added.
  • Hierarchical Clustered Subsampling
    Downsamples the point cloud by grouping nearby points into clusters, then replacing them with the average over each cluster. Clusters are created by first putting the entire point cloud into a cluster, then succesively splitting all clusters that do not meet the conditions imposed by the settings below along the axis of their most significant principal component.
    • Max number of points per cluster: If a cluster has more than this number of points, it will be split.
    • Maximum variation: If the variation (the variance along the least significant principal component, divided by the sum of variances across all 3 principal components) of a cluster is above this value, it will be split.
  • Connected Component Removal
    If the point cloud is dense, this filter groups the point clouds index map into connected components and discards all points with indices whose component does not reach the specified minimum size. Otherwise this filter does nothing.
    • Min size: Minimum size of the connected component, in pixels of the dense point cloud.
    • Max number: Maximum number of connected components to remain.
    • Dilation radius: If greater than 0, the point cloud’s index map is first being dilated with the specifies radius before runnung a connected component analysis on it.
  • Flying Pixel Filter
    If the point cloud is dense this filter converts it to a depth image, then for each pixel of that depth image computes the mean of the absolute difference between the pixel and all other pixels in a given search window centered on it. If this value exceeds a given threshold, the associated point on the dense cloud is discarded. For non-dense point clouds this filter does nothing.
    • Window Size: Diameter of the search window around each pixel on the depth image. This value must be odd, if it is not the algorithm will subtract 1.
    • Max Allowed Depth Variation: Threshold for the mean absolute difference between a depth image pixel and its neighbors.
  • Normalize
    Moves the point clouds such that the center is at the coordinate origin. Afterwards the point positions are multiplied with a scaling factor chosen to meet a criterium depending on whether Sphere or Bounding Box mode is active.
    • Sphere: In this mode the point most distant from the center ends up with a distance of half the Scale value.
    • Bounding Box: In this mode the largest direction on the axis-aligned bounding box ends up with a length of Scale.
    • Scale: Target size in Millimeters.
    • Apply same scale to all point clouds: If this is enabled, the same multiplier is applied to all point clouds in the input, which typically means that only the largest one will meet the conditions outlined above afterwards. Otherwise each point cloud is normalized separately.
  • Estimate curvature
    Computes the direction of maximum curvature at each point, then creates 3 output point clouds that encode the 3 components of this direction vector as heat map (red > blue) stored in the point colors.
    • Neighbors: Amount of other nearby points to consider when computing the curvature at each point.
  • Quadric based subsampling
    This algorithm creates a probabilistic plane quadric at each point, converts the point cloud to a sparse voxel grid, then averages the quadrics and normals of voxels within a certain radius. Afterwards the averaged quadrics and normals on each voxel are used to construct a point cloud again.
    • Leaf size: Cell size of the voxel grid, in Millimeters.
    • Consolidating radius: Radius for averaging, in Millimeters.
    • Std of normal: Variance for constructing the quadric.
    • Angle threshold: Neighboring voxels are only considered if the angle between their normal and the normal of the target voxels exceeds this value.
    • Color threshold: If Use color weighting is enabled, neighboring voxels are only considered if the dot product of their and the target voxel’s normalized(!) RGB color exceeds this value.
    • Use color weighting: See above.