Giter Club home page Giter Club logo

scene_reconstruction's Introduction

Non stereo scene Reconstruction

Reconstruction of a scene given two non stereo images and the camera intrinsic parameters matrix. Four different methods are implemented, the first three perform a sparse reconstruction using feature matching (SIFT and SURF) or sparse optical flow (Lucas-Kanade). The fourth method performs a dense reconstruction using optical flow (Farneback).

The workflow of this project is based on the examples provided in the book: Mastering OpenCV with Practical Computer Vision Projects.

Prerequisites

Install the OpenCV. When running the cmake, make sure to enable the non free packages in order to be able to use the SIFT and SURF features.

cmake -D CMAKE_BUILD_TYPE=RELEASE \
	-D CMAKE_INSTALL_PREFIX=/usr/local \
	-D INSTALL_PYTHON_EXAMPLES=ON \
	-D INSTALL_C_EXAMPLES=OFF \
	-D OPENCV_ENABLE_NONFREE=ON \
	-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
	-D PYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/python \
	-D BUILD_EXAMPLES=ON .

For the scene point cloud visualization, the python library is used. In order to install it:

pip install open3d 

Usage

The program takes as input: the path to the two images, the path to a .txt file containing the camera intrisic parameters matrix, the type of features used for the reconstruction, and optionally, the feature matching method which is set by default to bruteforce.

Usage: scene_reconstruction [params] image1 image2 

    -K (value:./path/to/K.txt)
		intrisic parameters matrix path
	--features (value:sift)
		feature type , SIFT, SURF, OF_SPARSE, OF_DENSE
	--help (value:true)
		print this message
	--matcher (value:bruteforce)
		matcher type

	image1 (value:./img1.jpg)
		image1 path
	image2 (value:./img2.jpg)
		image2 path

An example would be:

./scene_reconstruction ../images/pic1.png ../images/pic2.png -K=../intrisic_matrix.txt -features=SIFT

Results


SIFT: Matching points and Reconstructed Scene

Logo

SURF: Matching points and Reconstructed Scene

Logo

Sparse Optical Flow: Points flow and Reconstructed Scene

Logo

Dense Optical Flow: Image flow and Reconstructed Scene

Logo

scene_reconstruction's People

Contributors

anbenpue avatar

Watchers

 avatar  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.