5 releases (3 breaking)
new 0.4.0 | Sep 11, 2025 |
---|---|
0.3.1 | Aug 9, 2025 |
0.3.0 | Aug 9, 2025 |
0.2.0 | Jul 28, 2025 |
0.1.0 | Jul 9, 2025 |
#2298 in Algorithms
146 downloads per month
Used in 4 crates
145KB
2.5K
SLoC
ThreeCrate Algorithms
High-performance algorithms for 3D point cloud and mesh processing.
Features
- Point Cloud Processing: Filtering, downsampling, and outlier removal
- Registration: ICP (Iterative Closest Point) algorithm for point cloud alignment
- Segmentation: RANSAC plane segmentation and clustering algorithms
- Spatial Queries: K-nearest neighbor search and spatial indexing
- Normal Estimation: Surface normal computation for point clouds
- Parallel Processing: Multi-threaded algorithms using Rayon
Usage
Add this to your Cargo.toml
:
[dependencies]
threecrate-algorithms = "0.1.0"
threecrate-core = "0.1.0"
Example
use threecrate_core::{PointCloud, Point3f};
use threecrate_algorithms::{icp_registration, estimate_normals, plane_segmentation_ransac};
// Load or create point clouds
let source = PointCloud::from_points(vec![/* points */]);
let target = PointCloud::from_points(vec![/* points */]);
// ICP registration
let result = icp_registration(&source, &target, 50, 0.001, 1.0)?;
println!("Registration converged: {}", result.converged);
// Estimate normals
let normals = estimate_normals(&source, 10)?;
// RANSAC plane segmentation
let plane_result = plane_segmentation_ransac(&source, 1000, 0.01)?;
println!("Found {} inliers", plane_result.inliers.len());
Algorithms
- ICP Registration: Point cloud alignment using iterative closest point
- RANSAC Segmentation: Robust plane fitting and outlier detection
- Normal Estimation: Surface normal computation using local neighborhoods
- Filtering: Statistical outlier removal and radius filtering
- Spatial Indexing: KD-tree and R-tree based spatial queries
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Dependencies
~17–36MB
~711K SLoC