OpenCV  3.0.0-dev
Open Source Computer Vision
SFM module installation


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

The module is only available for Linux/GNU systems.


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
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
2 cd ceres-solver
3 mkdir build && cd build
4 cmake ..
5 make -j4
6 make test
7 sudo make install