Skip to main content

align_points

Function align_points 

Source
pub fn align_points<T>(
    x: &OMatrix<T, U3, Dyn>,
    y: &OMatrix<T, U3, Dyn>,
    algorithm: Algorithm,
) -> Result<(T, Matrix3<T>, Matrix3x1<T>)>
where T: RealField + Copy + TotalOrder,
Expand description

Find the linear transformation that converts 3D points x as close as possible to points y.

The best (scale, rotation, translation) are returned.

The Kabsch-Umeyama implementation is based on that in https://github.com/clementinboittiaux/umeyama-python/blob/main/umeyama.py.

The robust Arun implementation is based on that in https://github.com/strawlab/MultiCamSelfCal/blob/main/MultiCamSelfCal/CoreFunctions/estsimt.m. That code claims to be an implementation of the Arun, Huang, and Blostein algorithm, but contains an extra bit to determine scaling which works differently, and in my experience is more robust than, the Kabsch-Umeyama algorithm.