From 4b10f41eb35e32951516c8dcce69410ef2247a4a Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Thu, 10 Oct 2013 23:40:06 +0200 Subject: use proper distance for distortion correction --- src/lsq_rectilinear.mac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lsq_rectilinear.mac b/src/lsq_rectilinear.mac index bbe60b8..95ed273 100644 --- a/src/lsq_rectilinear.mac +++ b/src/lsq_rectilinear.mac @@ -25,7 +25,7 @@ x_rot : y * sin(c_tilt) + x * cos(c_tilt) + x0$ y_rot : y * cos(c_tilt) - x * sin(c_tilt)$ /* distortion correction */ -d : x_rot ^ 2 + y_rot ^ 2$ +d : sqrt(x_rot ^ 2 + y_rot ^ 2)$ dist_fact : d ^ 2 * k1 + d * k0$ x_dist : x_rot * (1 + dist_fact) * scale$ y_dist : y_rot * (1 + dist_fact) * scale$ -- cgit v1.2.3