依存関係
Structure from Motion モジュールは、いくつかのオープンソースライブラリに依存している。
- Eigen 3.2.2 以降。必須
- GLog 0.3.1 以降。必須
- GFlags。必須
- Ceres Solver。再構成APIが、バンドル調整の一部と点の交差を解くために必要とする。Ceres Solverがシステムにインストールされていない場合、再構成機能は無効になる。推奨
インストール
必須の依存関係
Ubuntu を使用している場合は、次のコマンドを入力するだけで必要な依存関係を簡単にインストールできる:
sudo apt-get install libeigen3-dev libgflags-dev libgoogle-glog-dev
Ceres Solver
まず、すべての依存関係をインストールする:
# CMake
sudo apt-get install cmake
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev
# BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# Eigen3
sudo apt-get install libeigen3-dev
# SuiteSparse and CXSparse (optional)
# - If you want to build Ceres as a *static* library (the default)
# you can use the SuiteSparse package in the main Ubuntu package
# repository:
sudo apt-get install libsuitesparse-dev
# - However, if you want to build Ceres as a *shared* library, you must
# add the following PPA:
sudo add-apt-repository ppa:bzindovic/suitesparse-bugfix-1319687
sudo apt-get update
sudo apt-get install libsuitesparse-dev
これでCeresのビルド、テスト、インストールの準備が整った:
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
mkdir build && cd build
cmake ..
make -j4
make test
sudo make install