diff options
Diffstat (limited to 'src/lsq_cylindrical.mac')
-rw-r--r-- | src/lsq_cylindrical.mac | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lsq_cylindrical.mac b/src/lsq_cylindrical.mac index 9a1d61a..09921eb 100644 --- a/src/lsq_cylindrical.mac +++ b/src/lsq_cylindrical.mac @@ -1,22 +1,20 @@ /* - * This is the basic pinhole projection model with distortion correction + * cylindrical projection model */ -x : tan(m_view - c_view)$ +x : m_view - c_view$ y : tan(c_nick - m_nick)$ x_rot : y * sin(c_tilt) + x * cos(c_tilt)$ y_rot : y * cos(c_tilt) - x * sin(c_tilt)$ -d : 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$ +x_scale : x_rot * scale$ +y_scale : y_rot * scale$ /* * Some mangling for C code generation */ -x_expand : trigexpand(x_dist)$ -y_expand : trigexpand(y_dist)$ +x_expand : trigexpand(x_scale)$ +y_expand : trigexpand(y_scale)$ args: "(double c_view, double c_nick, double c_tilt, double scale, double k0, double k1, double m_view, double m_nick)"$ |