diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-12-17 16:32:43 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-12-17 16:32:43 +0100 |
commit | e6963a176230f9a39fc09e3619fe66459ba588a4 (patch) | |
tree | 01f37052f3abe0fdc4ea6b8ac283ef61ce7682e3 /src/lsq_cylindrical.mac | |
parent | 15135029f42ea07b4800e1a66cc4b2d8216c2d5a (diff) |
implement LSQ based cylindrcal projection
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)"$ |