kabsch_umeyama

Crates.iokabsch_umeyama
lib.rskabsch_umeyama
version0.1.2
sourcesrc
created_at2024-11-15 08:37:04.207484
updated_at2024-11-16 05:34:30.690264
descriptionThe Kabsch-Umeyama algorithm is a method for aligning and comparing the similarity between two sets of points. It finds the optimal translation, rotation and scaling by minimizing the root-mean-square deviation (RMSD) of the point pairs.
homepage
repositoryhttps://github.com/dat58/kabsch_umeyama
max_upload_size
id1448878
size21,456
(dat58)

documentation

README

Kabsch-Umeyama   Build Status Latest Version

The Kabsch-Umeyama algorithm is a method for aligning and comparing the similarity between two sets of points. It finds the optimal translation, rotation and scaling by minimizing the root-mean-square deviation (RMSD) of the point pairs.


Features

  • Efficient and accurate implementation of the Kabsch-Umeyama algorithm.
  • Calculates translation, and (optional) scaling matrices (RxC dimensions).
  • Suitable for various applications involving point cloud alignment.

Dependency

If you have Ubuntu, follow the command below:

sudo apt install gfortran cmake

If you encounter an error, please check the requirements at nalgebra-lapack


Examples

use kabsch_umeyama::{Array2, estimate};

fn main() {
    // create an array src with 2 rows and 3 columns from a nested array
    let src = Array2::from([[1., 2., 3.], [4., 5., 6.]]);

    // create a dst array with 2 rows and 3 columns from a reference array
    let dst = Array2::<2, 3>::from(&[2., 3., 4., 5., 6., 7.]);
    
    // estimate the translation matrix
    let t = estimate(src, dst, true);
    println!("The homogeneous similarity transformation matrix is: {}", t);
}

References

Commit count: 15

cargo fmt