kabschjs
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

example workflow     example workflow

kabschjs

A simple library to compute rigid transformation matrix between two point sets. Implements kabsch algorithm as explained in https://en.wikipedia.org/wiki/Kabsch_algorithm to compute rotation matrix. By default, utilizes gpu if webgl is supported.

usage

import { getRigidTransformation } from 'kabschjs';

const setA = [ [1,2,3], [4,5,6] ];
const setB = [ [11,12,13], [14,15,16] ];

const [R, T] = getRigidTransformation(setA, setB);

getRigidTransformation returns rigid transformation between two points sets setA and setB (from setA to setB).

SetA and SetB are two dimensional arrays. As the expected point dimension is 3, each element of a set must be array and of length 3.

The output is also a two dimension array of size: 4x3 which represents the rigid transformation matrix. First element is the rotation matrix and the second one is the translation vector.

installation

npm install kabschjs

Package Sidebar

Install

npm i kabschjs

Weekly Downloads

1

Version

1.2.0

License

MIT

Unpacked Size

156 kB

Total Files

52

Last publish

Collaborators

  • sha-kil