Building Theia Library
Theia source code and documentation are hosted on Github where you can always grab the latest version
Theia relies on a number of open source libraries. Luckily, most of the will be included in Ceres
- C++11 is needed for certain functionality and added models to the stdlib. C++0x will probably work in most cases, but is not guaranteed. As such, you need a compiler that supports C++11 appropriately.
- CMake is a cross platform build system. Theia needs a relatively recent version of CMake (version 2.8.0 or better).
- eigen3 is used extensively for doing nearly all the matrix and linear algebra operations.
- libCVD is used as the underlying image class for Theia.
- Ceres Solver is a library for solving non-linear least squares problems. In particular, Theia uses it for Bundle Adjustment.
NOTE: Theia also depends on the following libraries, but they are included in the installation of Ceres so it is likely that you do not need to reinstall them.
- google-glog is used for error checking and logging. Ceres needs glog version 0.3.1 or later. Version 0.3 (which ships with Fedora 16) has a namespace bug which prevents Ceres from building.
- gflags is a library for processing command line flags. It is used by some of the examples and tests.
Make sure all of these libraries are installed properly before proceeding. Improperly installing any of these libraries can cause Theia to not build.
Building should be equivalent on all platforms, thanks to CMake. To install Theia, simply run the following commands after you have installed the Dependencies.
tar zxf theia-0.0.1.tar.gz
If all tests pass, then you are ready to install. Theia can be install using the make install command
You can also try running the unit tests individually. The executables should be located in the bin directory of the theia-build folder.
Customizing the build
It is possible to customize the build process by passing appropriate flags to
CMake. Use these flags only if you really know what you are doing.
- -DBUILD_TESTING=OFF: Use this flag to enable or disable building the unit tests. By default, this option is enabled.
- -DOPENMP=OFF: By default, Theia uses OpenMP to multithread/parallelize certain parts of the code. Certain platforms don’t play nice with this, so you can disable this option.
- -DBUILD_TUTORIALS=OFF: By default, building Theia will build several tutorial programs to demonstrate some uses of the library. You can disable this option.
- -DBUILD_DOCUMENTATION=ON: Turn this flag to ON to build the documentation with Theia. This option is disabled by default.