结构运动Structure From Motion,SFM模块安装
来源 http://docs.opencv.org/master/db/db8/tutorial_sfm_installation.html
依赖关系
从运动模块结构取决于一些开源库。
- Eigen 3.2.2 或更高版本。 要求
- GLog 0.3.1或更高版本。 要求
- GFlags 。 要求
- Ceres Solver. Ceres解算器 为了解决重建所需的API的一部分包调整加上点相交。 如果不安装在您的系统上,谷神星解决重建funcionality将被禁用。 推荐
安装
所需的依赖项
以防你在 Ubuntu 您可以简单地通过键入下面的命令安装所需的依赖关系:
sudo apt-get install libeigen3-dev libgflags-dev libgoogle-glog-dev
Ceres解算器
首先安装所有的依赖关系:
# 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