Skip to content

Commit

Permalink
Merge pull request #696 from alicevision/fix_ceresUsage
Browse files Browse the repository at this point in the history
[sfm] bugfix: ceres::AngleAxisRotatePoint cannot be used in-place
  • Loading branch information
fabiencastan authored Sep 25, 2019
2 parents 5163b42 + 6109afa commit 9c9d4b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/aliceVision/sfm/ResidualErrorFunctor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ struct ResidualErrorFunctor_Pinhole
const T* cam_t = &subpose_Rt[3];

// Rotate the point according to the camera rotation
ceres::AngleAxisRotatePoint(cam_R, pos_proj, pos_proj);
T pos_proj_tmp[3] = { pos_proj[0], pos_proj[1], pos_proj[2] };
ceres::AngleAxisRotatePoint(cam_R, pos_proj_tmp, pos_proj);

// Apply the camera translation
pos_proj[0] += cam_t[0];
Expand Down

0 comments on commit 9c9d4b4

Please sign in to comment.