Skip to content

Commit

Permalink
Improved accuracy for analytic undistortion
Browse files Browse the repository at this point in the history
  • Loading branch information
roderick-koehle authored Jul 9, 2021
1 parent a411b66 commit 66af007
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gtsam/geometry/Cal3Fisheye.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ Point2 Cal3Fisheye::calibrate(const Point2& uv, OptionalJacobian<2, 9> Dcal,
const double u = uv.x(), v = uv.y();
const double yd = (v - v0_) / fy_;
const double xd = (u - s_ * yd - u0_) / fx_;
Point2 pi(xd, yd);
const double theta = sqrt(xd * xd + yd * yd);

This comment has been minimized.

Copy link
@dellaert

dellaert Jul 9, 2021

Member

comment?/reference?

const double scale = (theta > 0) ? tan(theta) / theta;
Point2 pi(scale * xd, scale * yd);

// Perform newtons method, break when solution converges past tol_,
// throw exception if max iterations are reached
Expand Down

0 comments on commit 66af007

Please sign in to comment.