Giter VIP home page Giter VIP logo

five_point_algorithm's Introduction

Five-Point Algorithm

A MATLAB implementation of the Five-Point Algorithm by David Nistér

Given five points matches between two images, and the intrinsic parameters of each camera. Estimate the essential matrix E, the rotation matrix R and translation vector t, between both images. This algorithm is based on the method described by David Nistér in "An Efficient Solution to the Five-Point Relative Pose Problem"

E_all = FIVE_POINT_ALGORITHM(pts1, pts2, K1, K2) returns in E all the valid essential matrix solutions for the five point correspondence. If you don't need R and t, use this version as it avoids computing unnecessary results.

[E_all, R_all, t_all, Eo_all] = FIVE_POINT_ALGORITHM(pts1, pts2, K1, K2) also returns in R_all and t_all all the rotation matrices and translation vectors of camera 2 for the different essential matrices, such that a 3D point in camera 1 reference frame can be transformed into the camera 2 reference frame through p_2 = R{n}*p_1 + t{n}. Eo_all is the essential matrix before the imposing the structure U*diag([1 1 0])*V'. It should help get a better feeling on the accuracy of the solution. All these return values a nx1 cell arrays.

Arguments:

pts1, pts2 - assumed to have dimension 2x5 and of equal size.

K1, K2 - 3x3 intrinsic parameters of cameras 1 and 2 respectively

Known Issues:

  • R and t computation is done assuming perfect point correspondence.

TODO:

  • Extract R and t from E
  • Provide example cases.
  • Extract R and t without perfect point correspondence
  • Augment example cases.
  • Implement the variant with 5 points over 3 images
  • Handle more than 5 points

Other Info

  • Author: Sérgio Agostinho - sergio(dot)r(dot)agostinho(at)gmail(dot)com
  • Date: Feb 2015
  • Last modified: Mar 2015
  • Version: 0.9

Feel free to provide feedback or contribute.

five_point_algorithm's People

Contributors

sergioragostinho avatar

Stargazers

 avatar

Watchers

 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.