• Stars
    star
    399
  • Rank 104,545 (Top 3 %)
  • Language
    Python
  • Created about 7 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

3D reconstruction, sfm with Python3

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.

Note: Steps and code in this repo is my hobby / learning exercise. Ie, its probably not very efficient. If you wish to use a more production-ready library, check out OpenCV's SFM module. I have a docker environment for it at: https://github.com/alyssaq/reconstruction

Prerequisites

Example 3D cube reconstruction

$ python3 cube_reconstruction.py

Example Dino 3D reconstruction from 2D images

Download images from https://www.robots.ox.ac.uk/~vgg/data/mview/ and place into imgs/dinos

$ 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

License

MIT

More Repositories

1

face_morpher

👼 Morph faces with Python, Numpy, Scipy
Python
865
star
2

opencv

Find squares in an image with OpenCV C++
C++
239
star
3

hough_transform

Hough Transform implementation in Python
Python
122
star
4

usda-sqlite

USDA food files SR28 to SQLite
Python
115
star
5

reconstruction

3D reconstruction with openCV and SFM
C++
77
star
6

react-redux-table-example

React-Redux Router Table Sample App
JavaScript
50
star
7

stats-analysis

Engineering Statistics and Data Analysis
JavaScript
32
star
8

prequest

Promisified HTTP requests with `bluebird` and `request` modules
JavaScript
27
star
9

flask-restful-api-appengine

A restful API with flask for Google App Engine
Python
23
star
10

timeseries

Time series analytics with Python
Python
17
star
11

stasm_build

Mac/unix build scripts for stasm 4.1 with OpenCV 2 & 3
CMake
14
star
12

face-find-fun

Browser head-tracking and draws a party hat! - uses webrtc getUserMedia API, headtrackr and canvas
HTML
11
star
13

celery-flask-demo

Simple Flask app using celery with broker and backend
Python
10
star
14

python-data-science-intro

Intro to Python for Data Science for GA class
Jupyter Notebook
8
star
15

stasm

python wrapper for stasm - face points detector
C++
8
star
16

heap

Heap implementation in C++
C++
8
star
17

stl-complexities

C++ STL container complexities
8
star
18

MOOCS

MOOCS I love
7
star
19

alyssaq.github.io

Personal blog
CSS
5
star
20

esm-browser-example

ES modules in the browser
JavaScript
5
star
21

node-mongodb-api

Nodejs, MongoDB, Mongoose API boilerplate
JavaScript
4
star
22

hawkersg

Map markers and directions to hawker centres in Singapore
JavaScript
4
star
23

face_verifier

Verify whether a face is present in an image
Python
3
star
24

timezones-buddy

Convert between different timezones and unix timestamps
JavaScript
3
star
25

robotics_nanodegree_udacity_2019

Udacity's robotics nanodegree (2019)
CMake
3
star
26

kaggle

python notebooks for kaggle
Jupyter Notebook
3
star
27

egg

Egg math equation drawn with canvas
JavaScript
3
star
28

bottle-heroku-skeleton

Bottle skeleton with scientific packages for deployment on Heroku
Python
2
star
29

face-trackr-canvas

Face detection and canvas shape
JavaScript
2
star
30

cs231n-2017

Assignment solutions for cs231n 2017
Jupyter Notebook
2
star
31

financial-report

A payment report for rental property
JavaScript
2
star
32

alyssa.asia

My online CV - alyssa.asia site
JavaScript
1
star
33

backbone-basics

Simple backbonejs apps
JavaScript
1
star
34

appcache_sample

Sample offline app with appcache manifest
JavaScript
1
star
35

face_morpher_slides

Face Morpher Slides for FOSS Asia 2015
CSS
1
star
36

meetup_events

Find meetup events in your country
JavaScript
1
star
37

proxy

Go Proxy Server Example
Go
1
star
38

tornado-examples

Tornado examples showing async, coroutines, yield, periodic calls, etc
Python
1
star
39

facebook_api_user

Get user info from Facebook Graph API
JavaScript
1
star
40

threejs-jam

Three.js playground - ball bouncing
1
star
41

rainbow

RGB to hex visualizer, slider
JavaScript
1
star