Function icp

Source
pub fn icp<T, const N: usize>(
    points_a: &[Point<T, N>],
    points_b: &[Point<T, N>],
    config: ICPConfiguration<T>,
) -> ICPResult<T, <IsometryAbstractor<T, N> as AbstractIsometry<T, N>>::RotType, N>
Expand description

A free-form version of the ICP function, allowing for any input and output, under the constraints of the function

§Arguments

  • points_a: A slice of Point, representing the source point cloud.
  • points_b: A slice of Point, representing the target point cloud.
  • config: a reference to an ICPConfiguration, specifying the behaviour of the algorithm.

§Generics

  • T: Either f32 or f64
  • R: An [‘SVDIsometry’] of T and N
  • N: a usize, either 2 or 3

§Returns

An ICPSuccess struct with an Isometry transform with a T precision, or an error message explaining what went wrong.


  1. This does not guarantee that the transformation is correct, only that no further benefit can be gained by running another iteration.