Crates.io | kabsch_umeyama |
lib.rs | kabsch_umeyama |
version | 0.1.2 |
source | src |
created_at | 2024-11-15 08:37:04.207484 |
updated_at | 2024-11-16 05:34:30.690264 |
description | 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. |
homepage | |
repository | https://github.com/dat58/kabsch_umeyama |
max_upload_size | |
id | 1448878 |
size | 21,456 |
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.
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
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);
}