summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-12-17 16:32:43 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-12-17 16:32:43 +0100
commite6963a176230f9a39fc09e3619fe66459ba588a4 (patch)
tree01f37052f3abe0fdc4ea6b8ac283ef61ce7682e3
parent15135029f42ea07b4800e1a66cc4b2d8216c2d5a (diff)
implement LSQ based cylindrcal projection
-rw-r--r--src/lsq_cylindrical.mac14
-rw-r--r--src/lsq_rectilinear.mac2
2 files changed, 7 insertions, 9 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)"$
diff --git a/src/lsq_rectilinear.mac b/src/lsq_rectilinear.mac
index 662680a..69a9642 100644
--- a/src/lsq_rectilinear.mac
+++ b/src/lsq_rectilinear.mac
@@ -1,5 +1,5 @@
/*
- * This is the basic pinhole projection model with distortion correction
+ * rectilinear (pinhole) projection model with distortion correction
*/
x : tan(m_view - c_view)$