GithubHelp home page GithubHelp logo

can-song / umeyama-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clementinboittiaux/umeyama-python

0.0 0.0 0.0 827 KB

Python Umeyama's Algorithm - Transformation between two sets of points

Python 0.10% Jupyter Notebook 99.90%

umeyama-python's Introduction

Python Umeyama's algorithm

A python implementation of Umeyama's algorithm presented in Least-Squares Estimation of Transformation Parameters Between Two Point Patterns (Shinji Umeyama, 1991).

Description

Let X be a set of n m-dimensional points in a given frame. Let Y be a set of the same m-dimensional points in another frame. We have X = {x1, x2, ..., xn}, Y = {y1, y2, ..., yn} where xi and yi are m-dimenstional points. We want to find the transformation from one frame to another such as it minimizes the mean square error between the two sets of points.
More specifically, we want to find [c, R, t] โˆˆ Sim(3) given the minimum value of MSE(Y, c * R ยท X + t).
Notations in the code are consistent with the paper.

Usage

Let X and Y be 3D numpy arrays with shape (m, n) where m is the dimension of the points and n is the number of points in the point set. Let X and Y have consistent indexes, that is, Y[:, i] must be the m-dimensional point corresponding to X[:, i].

from umeyama import umeyama
c, R, t = umeyama(X, Y)

The function returns c, R and t such as Y ~ c * R @ X + t.

Example

We provide an example in the IPython notebook example.ipynb.

umeyama-python's People

Contributors

clementinboittiaux avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.