项目作者: ardcore

项目描述 :
Calculate and apply the optimal transformation matrix that minimizes the RMSD (root mean squared deviation) between two paired sets of points.
高级语言: JavaScript
项目地址: git://github.com/ardcore/fit_transform.git
创建时间: 2019-03-13T14:49:08Z
项目社区:https://github.com/ardcore/fit_transform

开源协议:Mozilla Public License 2.0

下载


fit_transform

Problem

Given two corresponding sets of 2D points A and B, find and apply an optimal transformation matrix to bring set A as close as possible to set B.

Solution

  • fit_transform implements full Kabsch algorithm for datasets where N >= 3
  • closeness of sets is understood as RMSD
  • this implementation focuses on 2D points only, but can be easily
    generalised to support more dimensions

API

  • fitTransform(A, B) -> A' — returns a transformed dataset
  • kabsch(A, B) -> C — returns an optimal rotation matrix

Installation

  1. npm install fit_transform

Building and Testing

  1. yarn
  2. yarn build
  3. yarn test
  4. cd examples/
  5. python -m SimpleHTTPServer

Examples

Image showing fit_transform applied to a 2-point dataset

Image showing fit_transform applied to a 3-point dataset

Image showing fit_transform applied to a 3-point dataset

See also
examples