make rr and g as const
							parent
							
								
									b844026951
								
							
						
					
					
						commit
						2d739dd5e8
					
				|  | @ -105,8 +105,8 @@ Point2 Cal3Bundler::calibrate(const Point2& pi, OptionalJacobian<2, 3> Dcal, | ||||||
|   int iteration = 0; |   int iteration = 0; | ||||||
|   do { |   do { | ||||||
|     // initialize pn with distortion included
 |     // initialize pn with distortion included
 | ||||||
|     double rr = (px * px) + (py * py); |     const double rr = (px * px) + (py * py); | ||||||
|     double g = (1 + k1_ * rr + k2_ * rr * rr); |     const double g = (1 + k1_ * rr + k2_ * rr * rr); | ||||||
|     pn = invKPi / g; |     pn = invKPi / g; | ||||||
| 
 | 
 | ||||||
|     if (distance2(uncalibrate(pn), pi) <= tol_) break; |     if (distance2(uncalibrate(pn), pi) <= tol_) break; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue