Filter Point Cloud Using Statistical Outlier Removal
SUMMARY
Filter Point Cloud Using Statistical Outlier Removal removes noise by analyzing the distribution of distances between each point and its neighbors, eliminating points that deviate significantly from the local average.
This Skill is useful in industrial, mobile, and humanoid robotics pipelines for cleaning and stabilizing point cloud data. For example, it can reduce sensor noise on parts in industrial assembly, clean LIDAR scans for mobile robots, or filter stray points when a humanoid robot interacts with objects. Removing statistical outliers improves the reliability of downstream perception, clustering, and 6D pose estimation.
Use this Skill when you want to denoise a point cloud while preserving the main geometry for accurate processing.
The Skill
from telekinesis import vitreous
filtered_point_cloud = vitreous.filter_point_cloud_using_statistical_outlier_removal(
point_cloud=point_cloud,
num_neighbors=90,
standard_deviation_ratio=0.1,
)Data Transfer Notice
There is no longer a fixed limit of 1 million points per request. However, very large datasets may result in slower data transfer and processing times. We are continuously optimizing performance as part of our beta program, with ongoing improvements to enhance speed and reliability.
Example
Raw Sensor Input
Unprocessed point cloud captured directly from the sensor.
Mild Outlier Removal
Filtered point cloud produced using statistical outlier removal to eliminatie points that deviate significantly from their local neighborhood distribution. The thin outlier lines are partly removed.
Parameters: standard_deviation_ratio=5.0.
Moderate Outlier Removal
Full removal of the thin outlier lines.
Parameters: standard_deviation_ratio=3.0.
Aggressive Outlier Removal
Heavy outlier removal results in the removal of not only the thin noise lines but also some points belonging to the actual structure.
Parameters: standard_deviation_ratio=0.1.
The Code
from telekinesis import vitreous
from datatypes import datatypes, io
import pathlib
# Optional for logging
from loguru import logger
DATA_DIR = pathlib.Path("path/to/telekinesis-data")
# Load point cloud
filepath = str(DATA_DIR / "point_clouds" / "mounts_3_raw.ply")
point_cloud = io.load_point_cloud(filepath=filepath)
logger.success(f"Loaded point cloud with {len(point_cloud.positions)} points")
# Execute operation
filtered_point_cloud = vitreous.filter_point_cloud_using_statistical_outlier_removal(
point_cloud=point_cloud,
num_neighbors=90,
standard_deviation_ratio=0.1,
)
logger.success(f"Filtered point cloud to {len(filtered_point_cloud.positions)} points using statistical outlier removal")The Explanation of the Code
The example begins by importing necessary modules for point cloud manipulation, data handling, and optional logging, including vitreous, datatypes, io, pathlib, and loguru.
from telekinesis import vitreous
from datatypes import datatypes, io
import pathlib
# Optional for logging
from loguru import loggerNext, a point cloud is loaded from a .ply file, and the total number of points is logged to confirm successful loading.
DATA_DIR = pathlib.Path("path/to/telekinesis-data")
# Load point cloud
filepath = str(DATA_DIR / "point_clouds" / "mounts_3_raw.ply")
point_cloud = io.load_point_cloud(filepath=filepath)
logger.success(f"Loaded point cloud with {len(point_cloud.positions)} points")The key operation applies the filter_point_cloud_using_statistical_outlier_removal Skill. This Skill identifies and removes noisy points based on the distribution of distances to their neighbors. Points that deviate beyond a specified standard deviation ratio are filtered out, resulting in a cleaner, more uniform point cloud. This preprocessing step is especially useful in robotics pipelines for segmentation, object detection, or precise motion planning where noise can cause errors.
# Execute operation
filtered_point_cloud = vitreous.filter_point_cloud_using_statistical_outlier_removal(
point_cloud=point_cloud,
num_neighbors=90,
standard_deviation_ratio=0.1,
)
logger.success(f"Filtered point cloud to {len(filtered_point_cloud.positions)} points using statistical outlier removal")Running the Example
Runnable examples are available in the Telekinesis examples repository. Follow the README in that repository to set up the environment. Once set up, you can run this specific example with:
cd telekinesis-examples
python examples/vitreous_examples.py --example filter_point_cloud_using_statistical_outlier_removalHow to Tune the Parameters
The filter_point_cloud_using_statistical_outlier_removal Skill has two parameters that control the outlier removal:
num_neighbors (required):
- The number of nearest neighbors used to compute mean distance for each point
- Increase (20-50) to provide more stable distance statistics but is slower and may smooth out local variations
- Decrease (10-20) for faster computation but may be more sensitive to noise
- Typical range: 10-50
- For dense clouds, use 20-50
- For sparse clouds, use 10-20
standard_deviation_ratio (required):
- The multiplier for standard deviation to determine the outlier threshold
- Points with mean distance > (mean + ratio * std_dev) are removed
- Increase (2.0-3.0) to remove fewer points (more lenient), keeping points that are moderately far from neighbors
- Decrease (0.5-1.0) to remove more points (stricter), keeping only points very close to their neighbors
- Typical range: 0.5-3.0
- Use 1.0-2.0 for moderate filtering, 2.0-3.0 for light filtering, 0.5-1.0 for aggressive filtering
TIP
Best practice: Start with default values (num_neighbors=20, standard_deviation_ratio=2.0) and adjust based on results. Increase standard_deviation_ratio if too many points are removed, decrease if too few outliers are removed.
Where to Use the Skill in a Pipeline
Statistical outlier removal is commonly used in the following pipelines:
- Point cloud denoising
- Preprocessing before registration
- Noise removal for segmentation
- Data cleaning for clustering
A typical pipeline for point cloud denoising looks as follows:
# Example pipeline using statistical outlier removal (parameters omitted).
from telekinesis import vitreous
# 1. Load point cloud
point_cloud = vitreous.load_point_cloud(...)
# 2. Optional: Downsample first to reduce computation
downsampled_cloud = vitreous.filter_point_cloud_using_voxel_downsampling(...)
# 3. Remove statistical outliers
filtered_cloud = vitreous.filter_point_cloud_using_statistical_outlier_removal(
point_cloud=downsampled_cloud,
num_neighbors=90,
standard_deviation_ratio=0.1,
)
# 4. Optional: Further processing
clusters = vitreous.cluster_point_cloud_using_dbscan(...)Related skills to build such a pipeline:
filter_point_cloud_using_radius_outlier_removal: alternative outlier removal methodfilter_point_cloud_using_voxel_downsampling: reduce point cloud density before filteringcluster_point_cloud_using_dbscan: process cleaned point cloudsregister_point_clouds_using_point_to_point_icp: register cleaned point clouds
Alternative Skills
| Skill | vs. Filter Point Cloud Using Statistical Outlier Removal |
|---|---|
| filter_point_cloud_using_radius_outlier_removal | Use radius outlier removal when you want to remove points with too few neighbors. Use statistical outlier removal when you want to remove points based on distance distribution. |
When Not to Use the Skill
Do not use filter point cloud using statistical outlier removal when:
- The point cloud is very sparse (the filter may not work well with insufficient neighbors)
- You need to preserve all points (this filter removes outliers)
- Point density varies significantly (the filter may not work well with varying density)
- You want neighbor-count-based filtering (use
filter_point_cloud_using_radius_outlier_removalinstead) - The point cloud is already clean (no need for additional filtering)

