make rr and g as const

release/4.3a0
Varun Agrawal 2021-06-03 14:05:34 -04:00
parent b844026951
commit 2d739dd5e8
1 changed files with 2 additions and 2 deletions

View File

@ -105,8 +105,8 @@ Point2 Cal3Bundler::calibrate(const Point2& pi, OptionalJacobian<2, 3> Dcal,
int iteration = 0;
do {
// initialize pn with distortion included
double rr = (px * px) + (py * py);
double g = (1 + k1_ * rr + k2_ * rr * rr);
const double rr = (px * px) + (py * py);
const double g = (1 + k1_ * rr + k2_ * rr * rr);
pn = invKPi / g;
if (distance2(uncalibrate(pn), pi) <= tol_) break;