Commit a63e3435 authored by Patrik Huber's avatar Patrik Huber

Check whether input landmarks are double in matlab-fitting

Matlab's default precision is double, that's why we only convert MatrixXd for now. Added a note highlighting this.
parent 370d5981
......@@ -15,7 +15,7 @@ function [mesh, rendering_parameters] = fit_shape_and_pose(morphable_model, ...
% landmarks must be a 68 x 2 matrix with ibug landmarks, in the order
% from 1 to 68.
%
% Default values for some of the parameters:: num_iterations = 5,
% 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:
......@@ -26,6 +26,10 @@ function [mesh, rendering_parameters] = fit_shape_and_pose(morphable_model, ...
% contour_landmarks and model_contour as *filenames* to the respective
% files in the eos/share/ directory, and not the objects directly.
if(~isa(landmarks,'double'))
error('Please specify the landmarks as type double.');
end
% We'll use default values to the following arguments, if they're not
% provided:
if (~exist('edge_topology', 'var')), edge_topology = '../share/sfm_3448_edge_topology.json'; end
......
......@@ -33,6 +33,8 @@ namespace mexplus {
/**
* @brief Define a template specialisation for Eigen::MatrixXd for ... .
*
* The default precision in Matlab is double, so for now we only define conversions for MatrixXd.
*
* Todo: Documentation.
*/
template<>
......
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