OpenCV  3.1.0
Open Source Computer Vision
SFM module installation

Dependencies

The Structure from Motion module depends on some open source libraries.

Note
The module is only available for Linux/GNU systems.

Installation

Required Dependencies

In case you are on Ubuntu you can simply install the required dependencies by typing the following command:

1 sudo apt-get install libeigen3-dev libgflags-dev libgoogle-glog-dev

Ceres Solver

Start by installing all the dependencies:

1 # CMake
2 sudo apt-get install cmake
3 # google-glog + gflags
4 sudo apt-get install libgoogle-glog-dev
5 # BLAS & LAPACK
6 sudo apt-get install libatlas-base-dev
7 # Eigen3
8 sudo apt-get install libeigen3-dev
9 # SuiteSparse and CXSparse (optional)
10 # - If you want to build Ceres as a *static* library (the default)
11 # you can use the SuiteSparse package in the main Ubuntu package
12 # repository:
13 sudo apt-get install libsuitesparse-dev
14 # - However, if you want to build Ceres as a *shared* library, you must
15 # add the following PPA:
16 sudo add-apt-repository ppa:bzindovic/suitesparse-bugfix-1319687
17 sudo apt-get update
18 sudo apt-get install libsuitesparse-dev

We are now ready to build, test, and install Ceres:

1 git clone https://ceres-solver.googlesource.com/ceres-solver
2 cd ceres-solver
3 mkdir build && cd build
4 cmake ..
5 make -j4
6 make test
7 sudo make install