Skip to content

Commit

Permalink
Merge pull request #46 from danini/fix-clang
Browse files Browse the repository at this point in the history
replace R with q
  • Loading branch information
ducha-aiki authored Mar 20, 2024
2 parents 8c951dd + 73dd749 commit 55c7d75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pygcransac/include/relative_pose/bundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int lm_pnp_impl(const JacobianAccumulator &accum,

CameraPose pose_new;
Eigen::Matrix3d R = pose->R();
pose_new.R = R + R * (a * sw + (1 - b) * sw * sw);
pose_new.q = pose_new.rotmat_to_quat(R + R * (a * sw + (1 - b) * sw * sw));
pose_new.t = pose->t + R * sol.block<3, 1>(3, 0);
double cost_new = accum.residual(pose_new);

Expand Down Expand Up @@ -149,7 +149,7 @@ int lm_6dof_impl(const JacobianAccumulator &accum, CameraPose *pose, const Bundl

CameraPose pose_new;
Eigen::Matrix3d R = pose->R();
pose_new.R = R + R * (a * sw + (1 - b) * sw * sw);
pose_new.q = pose_new.rotmat_to_quat(R + R * (a * sw + (1 - b) * sw * sw));
pose_new.t = pose->t + R * sol.block<3, 1>(3, 0);
double cost_new = accum.residual(pose_new);

Expand Down

0 comments on commit 55c7d75

Please sign in to comment.