Smithangshu / Incremental-SfM

An Incremental SfM program. 增量式SfM程序

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incremental Sfm

This program is a simple Incremental Sfm (Structure from Motion) project. It uses sequential or unordered images as inputs, then restores camera poses and reconstructs 3D point cloud information of scene. I finished and improved this program based on the MonocularSfM and colmap, thanks for their great work!

Similar to ORBSLAM, the initialization process considers both planar and non-planar cases. Then this program uses PnP algorithm in registering (front end) and bundle adjustment optimization in the back end. This program save results in .ply format and you can visualize the point cloud in Meshlab, Colmap or other software.

Note that this code is relatively simple, mainly for learning use. I will optimize this program in the future to improve the accuracy.

1 Prerequisites

  • C++11 Compiler. Some functionalities of C++11 are used.

  • OpenCV. Because sift or surf feature points are required, additional contrib modules need to be installed.

  • Eigen3. A C++ template library for linear algebra.

  • g2o. A library for nonlinear optimization, like bundle adjustment.

2 Installation

Clone the repository and make:

git clone https://github.com/gjgjh/Incremental-SfM
cd Incremental-SfM
mkdir build
cd build
cmake ..
make -j4

3 Usage

Before running the program, you may need to adjust some parameters setting in config/custom_config.yaml. Some famous datasets config files are also provided. For detailed information, you can look into the comment.

Then for example, simply run these from the command line:

bin/FeatureExtraction config/south-building.yaml
bin/ComputeMatches config/south-building.yaml
bin/Reconstruction config/south-building.yaml

4 License

The source code is released under GPLv3 license.

We are still working on improving the code reliability. For any technical issues or commercial inquiries, please contact GJH guojh_rs@pku.edu.cn.

About

An Incremental SfM program. 增量式SfM程序

License:GNU General Public License v3.0


Languages

Language:C 98.3%Language:C++ 1.6%Language:CMake 0.1%