Skip to content

Commit

Permalink
Fix a few bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alpus committed Feb 18, 2019
1 parent b4b9960 commit 2488919
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/fit-model-ceres.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ int main(int argc, char* argv[])
camera.calculate_projection_matrix(), camera.get_viewport());
ceres_example::draw_landmarks(outimg, indexed_landmarks);

const auto camera_euler_rotation = camera.get_euler_rotation();
auto camera_euler_rotation = camera.get_euler_rotation();
fitting_log << "Pose fit with mean shape:\tYaw " << glm::degrees(camera_euler_rotation[1]) << ", Pitch "
<< glm::degrees(camera_euler_rotation[0]) << ", Roll "
<< glm::degrees(camera_euler_rotation[2]) << "; t & f: " << camera.translation_and_intrinsics
Expand Down
6 changes: 3 additions & 3 deletions include/eos/fitting/ceres_nonlinear.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ struct LandmarkCost
// Todo: use get_opencv_viewport() from nonlin_cam_esti.hpp.
const tvec4<T> viewport(0, image_height, image_width, -image_height); // OpenCV convention

tvec3<T> projected_point(); // Note: could avoid default construction by using a lambda and
tvec3<T> projected_point; // Note: could avoid default construction by using a lambda and
// immediate invocation
if (use_perspective)
{
Expand Down Expand Up @@ -868,8 +868,8 @@ class ModelFitter
std::unique_ptr<ceres::Problem> problem;

private:
const morphablemodel::MorphableModel* const morphable_model;
const morphablemodel::Blendshapes* const blendshapes;
const morphablemodel::MorphableModel* morphable_model;
const morphablemodel::Blendshapes* blendshapes;
};

} /* namespace fitting */
Expand Down
2 changes: 1 addition & 1 deletion include/eos/render/texture_extraction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ eos::core::Image4u extract_texture(const core::Mesh& mesh, glm::mat4x4 view_mode
vector<vec4> wnd_coords; // will contain [x_wnd, y_wnd, z_ndc, 1/w_clip]
for (auto&& vtx : mesh.vertices)
{
auto clip_coords = projection_matrix * view_model_matrix * glm::tvec4(vtx.x(), vtx.y(), vtx.z(), 1.0f);
auto clip_coords = projection_matrix * view_model_matrix * glm::vec4(vtx.x(), vtx.y(), vtx.z(), 1.0f);
clip_coords = divide_by_w(clip_coords);
const vec2 screen_coords = clip_to_screen_space(clip_coords.x, clip_coords.y, image.width(), image.height());
clip_coords.x = screen_coords.x;
Expand Down

0 comments on commit 2488919

Please sign in to comment.