Skip to content

Commit

Permalink
Improve different model support
Browse files Browse the repository at this point in the history
  • Loading branch information
Alpus committed Feb 18, 2019
1 parent 2488919 commit 183fbf3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/fit-model-ceres.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,11 @@ int main(int argc, char* argv[])

auto model_fitter =
fitting::ModelFitter<EOS_CERES_EXAMPLE_SHAPES_NUM, EOS_CERES_EXAMPLE_BLENDSHAPES_NUM,
EOS_CERES_EXAMPLE_COLOR_COEFFS_NUM>(&morphable_model, &blendshapes);
EOS_CERES_EXAMPLE_COLOR_COEFFS_NUM>(
&morphable_model,
morphable_model.has_separate_expression_model() ? nullptr : &blendshapes
);

auto camera = fitting::PerspectiveCameraParameters(image.width(), image.height());
model_fitter.add_camera_cost_function(camera, indexed_landmarks);
model_fitter.set_shape_coefficients_constant();
Expand Down
3 changes: 2 additions & 1 deletion include/eos/morphablemodel/MorphableModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ class MorphableModel
if (has_texture_coordinates())
{
mesh = sample_to_mesh(shape, color, shape_model.get_triangle_list(),
color_model.get_triangle_list(), texture_coordinates);
color_model.get_triangle_list(), texture_coordinates,
texture_triangle_indices);
} else
{
mesh = sample_to_mesh(shape, color, shape_model.get_triangle_list(),
Expand Down

0 comments on commit 183fbf3

Please sign in to comment.