@@ -26,7 +26,7 @@ At the moment, it mainly provides the following functionality:
...
@@ -26,7 +26,7 @@ At the moment, it mainly provides the following functionality:
## Usage
## Usage
* Tested with the following compilers: >=gcc-4.8.4, >=clang-3.5, Visual Studio 2015
* Tested with the following compilers: >=gcc-4.9, >=clang-3.5, Visual Studio 2015
* Needed dependencies for the library: Boost system (>=1.50.0), OpenCV core (>=2.4.3)
* Needed dependencies for the library: Boost system (>=1.50.0), OpenCV core (>=2.4.3)
To use the library in your own project, just add the following directories to your include path:
To use the library in your own project, just add the following directories to your include path:
...
@@ -34,6 +34,8 @@ To use the library in your own project, just add the following directories to yo
...
@@ -34,6 +34,8 @@ To use the library in your own project, just add the following directories to yo
*`eos/include`
*`eos/include`
*`eos/3rdparty/cereal-1.1.1/include`
*`eos/3rdparty/cereal-1.1.1/include`
*`eos/3rdparty/glm`
*`eos/3rdparty/glm`
*`eos/3rdparty/nanoflann/include`
*`eos/3rdparty/eigen3-nnls/src`
**Make sure to clone with `--recursive` to download the required submodules!**
**Make sure to clone with `--recursive` to download the required submodules!**
...
@@ -82,7 +84,7 @@ The full model is available at [http://www.cvssp.org/facemodel](http://www.cvssp
...
@@ -82,7 +84,7 @@ The full model is available at [http://www.cvssp.org/facemodel](http://www.cvssp
## Python bindings
## Python bindings
_Experimental_: eos includes python bindings for some of its functionality (and more can be added!). Set `-DGENERATE_PYTHON_BINDINGS=on` when running `cmake` to build them (and optionally set `PYTHON_EXECUTABLE` to point to your python interpreter if it's not found automatically).
_Experimental_: eos includes python bindings for some of its functionality (and more can be added!). Set `-DEOS_GENERATE_PYTHON_BINDINGS=on` when running `cmake` to build them (and optionally set `PYTHON_EXECUTABLE` to point to your python interpreter if it's not found automatically).
After building the bindings, they can be used like any python module:
After building the bindings, they can be used like any python module:
...
@@ -99,7 +101,7 @@ help(eos) # check the documentation
...
@@ -99,7 +101,7 @@ help(eos) # check the documentation
## Matlab bindings
## Matlab bindings
_Experimental_: eos includes Matlab bindings for the `fit_shape_and_pose(...)` function, which means the fitting can be run from Matlab. Set `-DGENERATE_MATLAB_BINDINGS=on` when running `cmake` to build the required mex-file and run the `INSTALL` target to install everything. (Set `Matlab_ROOT_DIR` to point to your Matlab directory if it's not found automatically). More bindings (e.g. the MorphableModel itself) might be added in the future.
_Experimental_: eos includes Matlab bindings for the `fit_shape_and_pose(...)` function, which means the fitting can be run from Matlab. Set `-DEOS_GENERATE_MATLAB_BINDINGS=on` when running `cmake` to build the required mex-file and run the `INSTALL` target to install everything. (Set `Matlab_ROOT_DIR` to point to your Matlab directory if it's not found automatically). More bindings (e.g. the MorphableModel itself) might be added in the future.
Go to the `install/eos/matlab` directory and run [`demo.m`](https://github.com/patrikhuber/eos/blob/master/matlab/demo.m) to see how to run the fitting. The result is a mesh and rendering parameters (pose).
Go to the `install/eos/matlab` directory and run [`demo.m`](https://github.com/patrikhuber/eos/blob/master/matlab/demo.m) to see how to run the fitting. The result is a mesh and rendering parameters (pose).
set(BUILD_EXAMPLES ON CACHE BOOL "Build the example applications." FORCE)
set(EOS_BUILD_EXAMPLES ON CACHE BOOL "Build the example applications." FORCE)
set(BUILD_CERES_EXAMPLE OFF CACHE BOOL "Build the fit-model-ceres example (requires Ceres)." FORCE)
set(EOS_BUILD_CERES_EXAMPLE OFF CACHE BOOL "Build the fit-model-ceres example (requires Ceres)." FORCE)
set(BUILD_UTILS OFF CACHE BOOL "Build utility applications." FORCE)
set(EOS_BUILD_UTILS OFF CACHE BOOL "Build utility applications." FORCE)
set(BUILD_DOCUMENTATION OFF CACHE BOOL "Build the library documentation." FORCE)
set(EOS_BUILD_DOCUMENTATION OFF CACHE BOOL "Build the library documentation." FORCE)
set(GENERATE_PYTHON_BINDINGS OFF CACHE BOOL "Build python bindings. Requires python to be installed." FORCE)
set(EOS_GENERATE_PYTHON_BINDINGS OFF CACHE BOOL "Build python bindings. Requires python to be installed." FORCE)
set(GENERATE_MATLAB_BINDINGS OFF CACHE BOOL "Build Matlab bindings. Requires Matlab with the compiler installed or the Matlab Compiler Runtime." FORCE)
set(EOS_GENERATE_MATLAB_BINDINGS OFF CACHE BOOL "Build Matlab bindings. Requires Matlab with the compiler installed or the Matlab Compiler Runtime." FORCE)
# The standard find_package for boost on Win finds the dynamic libs, so for dynamic linking to boost we need to #define:
# The standard find_package for boost on Win finds the dynamic libs, so for dynamic linking to boost we need to #define:
add_definitions(-DBOOST_ALL_NO_LIB)# Don't use the automatic library linking by boost with VS (#pragma ...). Instead, we specify everything here in cmake.
add_definitions(-DBOOST_ALL_NO_LIB)# Don't use the automatic library linking by boost with VS (#pragma ...). Instead, we specify everything here in cmake.
...
@@ -21,7 +30,7 @@ matlab_add_mex(
...
@@ -21,7 +30,7 @@ matlab_add_mex(
SRC +eos/+fitting/private/fitting.cpp
SRC +eos/+fitting/private/fitting.cpp
OUTPUT_NAME fitting #[OUTPUT_NAME output_name]
OUTPUT_NAME fitting #[OUTPUT_NAME output_name]
# DOCUMENTATION +eos/+fitting/fit_shape_and_pose.m # doesn't work - wrong path probably. But it renames the file to fitting.m, so not what we want anyway.
# DOCUMENTATION +eos/+fitting/fit_shape_and_pose.m # doesn't work - wrong path probably. But it renames the file to fitting.m, so not what we want anyway.