Crate modern_icp

Crate modern_icp 

Source
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§

convergence
correspondence
filter_points
icp
pca
reject_outliers
transform_estimation

Structs§

MaskedPointCloud
Plane
Plane that is described by the equation normal.dot(point_on_plane.coords) - constant == 0
PointCloudIterator
PointCloudPoint

Traits§

ToPointCloud

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.

Type Aliases§

Plane3
PointCloud