Code Monkey home page Code Monkey logo

3dreconstruction's Introduction

3D reconstruction

3D reconstruction from 2D images pipeline

Steps:

  1. Detect 2D points
  2. Match 2D points across 2 images
  3. Epipolar geometry
    3a. If both intrinsic and extrinsic camera parameters are known, reconstruct with projection matrices.
    3b. If only the intrinsic parameters are known, normalize coordinates and calculate the essential matrix.
    3c. If neither intrinsic nor extrinsic parameters are known, calculate the fundamental matrix.
  4. With fundamental or essential matrix, assume P1 = [I 0] and calulate parameters of camera 2.
  5. Triangulate knowing that x1 = P1 * X and x2 = P2 * X.
  6. Bundle adjustment to minimize reprojection errors and refine the 3D coordinates.

Prerequisites

  • Python 3.5+
  • Install opencv
  • pip install -r requirements.txt

Example 3D cube reconstruction

$ python3 cube_reconstruction.py

Example Dino 3D reconstruction from 2D images

Download images from http://www.robots.ox.ac.uk/~vgg/data/data-mview.html and place into imgs/dino

$ python3 example.py

Detected points and matched across 2 images.

3D reconstructed dino with essential matrix

3D to 2D Projection

$ python3 camera.py

3D points of model house from Oxford University VGG datasets.

Projected points

Datasets

References

3dreconstruction's People

Contributors

alyssaq avatar

Watchers

Bai Feng 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.