Commit a07f1c28 authored by Patrik Huber's avatar Patrik Huber

Added relative paths to the Matlab fitting function

This works when the current working directory in matlab is eos/matlab!
parent d822417c
...@@ -12,26 +12,29 @@ function [mesh, rendering_parameters] = fit_shape_and_pose(morphable_model, ... ...@@ -12,26 +12,29 @@ function [mesh, rendering_parameters] = fit_shape_and_pose(morphable_model, ...
% It fits the pose (camera), PCA shape model, and expression blendshapes % It fits the pose (camera), PCA shape model, and expression blendshapes
% in an iterative way. % in an iterative way.
% %
% Default values: num_iterations = 5, num_shape_coefficients_to_fit = all % landmarks must be a 68 x 2 vector with ibug landmarks, in the order
% (-1), and lambda = 30.0. % from 1 to 68.
%
% Default values for some of the parameters:: num_iterations = 5,
% num_shape_coefficients_to_fit = all (-1), and lambda = 30.0.
% %
% Please see the C++ documentation for the description of the parameters: % Please see the C++ documentation for the description of the parameters:
% http://patrikhuber.github.io/eos/doc/ (TODO: Update documentation!) % http://patrikhuber.github.io/eos/doc/ (TODO: Update to v0.9.1!)
% %
% NOTE: In contrast to the C++ function, this Matlab function expects the % NOTE: In contrast to the C++ function, this Matlab function expects the
% morphable_model, blendshapes, landmark_mapper, edge_topology, % morphable_model, blendshapes, landmark_mapper, edge_topology,
% contour_landmarks and model_contour as *filenames* to the respective % contour_landmarks and model_contour as *filenames* to the respective
% files in the eos/share/ directory, and not the objects directly. % files in the eos/share/ directory, and not the objects directly.
morphable_model = ''; morphable_model = '../share/sfm_shape_3448.bin';
blendshapes = ''; blendshapes = '../share/expression_blendshapes_3448.bin';
landmarks = zeros(68, 2); % 68 x 2 vector with ibug LMs, in order! 1 to 68 landmarks = zeros(68, 2);
landmark_mapper = ''; landmark_mapper = '../share/ibug2did.txt';
image_width = 1280; image_width = 1280;
image_height = 720; image_height = 720;
edge_topology = ''; edge_topology = '../share/sfm_3448_edge_topology.json';
contour_landmarks = ''; contour_landmarks = '../share/ibug2did.txt';
model_contour = ''; model_contour = '../share/model_contours.json';
if (~exist('num_iterations', 'var')), num_iterations = 5; end if (~exist('num_iterations', 'var')), num_iterations = 5; end
if (~exist('num_shape_coefficients_to_fit', 'var')), num_shape_coefficients_to_fit = -1; end if (~exist('num_shape_coefficients_to_fit', 'var')), num_shape_coefficients_to_fit = -1; end
if (~exist('lambda', 'var')), lambda = 30.0; end if (~exist('lambda', 'var')), lambda = 30.0; end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment