File: sfm_installation.markdown

package info (click to toggle)
opencv 3.2.0%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 238,480 kB
  • sloc: xml: 901,650; cpp: 703,419; lisp: 20,142; java: 17,843; python: 17,641; ansic: 603; cs: 601; sh: 516; perl: 494; makefile: 117
file content (63 lines) | stat: -rw-r--r-- 1,995 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
SFM module installation {#tutorial_sfm_installation}
=======================

Dependencies
------------

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

  - [Eigen](http://eigen.tuxfamily.org) 3.2.2 or later. \b Required
  - [GLog](http://code.google.com/p/google-glog) 0.3.1 or later. \b Required
  - [GFlags](http://code.google.com/p/gflags). \b Required
  - [Ceres Solver](http://ceres-solver.org). Needed by the reconstruction API in order to solve part of the Bundle Adjustment plus the points Intersect. If Ceres Solver is not installed on your system, the reconstruction funcionality will be disabled. \b Recommended

@note The module is only available for Linux/GNU systems.


Installation
------------

__Required Dependencies__

In case you are on [Ubuntu](http://www.ubuntu.com) you can simply install the required dependencies by typing the following command:

@code{.bash}
  sudo apt-get install libeigen3-dev libgflags-dev libgoogle-glog-dev
@endcode

__Ceres Solver__

Start by installing all the dependencies:

@code{.bash}
  # 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
@endcode

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

@code{.bash}
  git clone https://ceres-solver.googlesource.com/ceres-solver
  cd ceres-solver
  mkdir build && cd build
  cmake ..
  make -j4
  make test
  sudo make install
@endcode