summaryrefslogtreecommitdiff
path: root/stabilize.py
diff options
context:
space:
mode:
Diffstat (limited to 'stabilize.py')
-rw-r--r--stabilize.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/stabilize.py b/stabilize.py
index ab11b51..50d064b 100644
--- a/stabilize.py
+++ b/stabilize.py
@@ -39,13 +39,15 @@ def get_maps(xres,yres):
# is 92 deg. -> angle over half a diagonal's length is 92/2 deg
constant2= 1./(math.sqrt((1280/2)**2+(720/2)**2))*(92/2)/180*math.pi
+ foo = math.tan( 92/2/math.sqrt(16**2+9**2)*16. ) * constant / math.tan(1280/2 * constant2)
+
for y in xrange(0,yres):
xtmp=[]
ytmp=[]
yy=(y-yres/2.)/xres # yes, xres.
for x in xrange(0,xres):
- xx=math.tan((x-xres/2.)/xres)
+ xx=math.tan((x-xres/2.)/xres*foo)/foo
dist = math.sqrt(xx**2 + yy**2)