Expand description
A modern modular pure Rust implementation of the Iterative Closest Point algorithm.
§Example
let (alignee_transform, error_sum) = estimate_transform(
alignee_cloud,
&target_cloud,
20, // max iterations
BidirectionalDistance::new(&target_cloud),
accept_all,
reject_n_sigma_dist(3.0),
point_to_plane_lls::estimate_isometry,
same_squared_distance_error(1.0),
);§Integrations
An integrations with the modelz crate is provided so you can use Model3D with the estimate_transform function.
use modelz::Model3D;
if let (Ok(alignee), Ok(target)) = (Model3D::load("alignee.gltf"), Model3D::load("target.stl")) {
let (transform, error_sum) = estimate_transform(
alignee,
&target,
20, // max iterations
BidirectionalDistance::new(&target),
accept_all,
reject_n_sigma_dist(3.0),
point_to_plane_lls::estimate_isometry,
same_squared_distance_error(1.0),
);
}Modules§
Structs§
- Masked
Point Cloud - Plane
- Plane that is described by the equation
normal.dot(point_on_plane.coords) - constant == 0 - Point
Cloud Iterator - Point
Cloud Point
Traits§
Functions§
- compute_
centroid - Computes the centroid (geometric center) of the point cloud.
- demean_
into_ matrix - Demeans the point cloud by subtracting the centroid from every point and returns the demeaned point cloud as a matrix.
- golden_
section_ search - See the paper from Dong et al.
- kd_
tree_ of_ point_ cloud - point_
cloud_ from_ position_ slice - sum_
squared_ distances - transform_
point_ cloud - Transforms every point in the point cloud using the given transform.