Commit f325986e authored by Patrik Huber's avatar Patrik Huber

Fix fit-model-ceres: Need to use explicit type for shape instance

Otherwise an Eigen expression (CWise...something) will be returned and subsequent code will fail.
parent ef853722
......@@ -420,7 +420,7 @@ int main(int argc, char *argv[])
return std::vector<float>(std::begin(vec), std::end(vec));
};
auto blendshape_coeffs_float = vectord_to_vectorf(blendshape_coefficients);
auto shape_ceres = morphable_model.get_shape_model().draw_sample(shape_coefficients) + to_matrix(blendshapes) * Eigen::Map<const Eigen::VectorXf>(blendshape_coeffs_float.data(), blendshape_coeffs_float.size());
Eigen::VectorXf shape_ceres = morphable_model.get_shape_model().draw_sample(shape_coefficients) + to_matrix(blendshapes) * Eigen::Map<const Eigen::VectorXf>(blendshape_coeffs_float.data(), blendshape_coeffs_float.size());
core::Mesh mesh = morphablemodel::sample_to_mesh(shape_ceres, morphable_model.get_color_model().draw_sample(colour_coefficients), morphable_model.get_shape_model().get_triangle_list(), morphable_model.get_color_model().get_triangle_list(), morphable_model.get_texture_coordinates());
for (auto&& idx : vertex_indices)
{
......
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