From 1a9cf0e213af0de7c447c7085a04f4c7b2c3e4b7 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Wed, 27 Aug 2014 02:08:40 +0200 Subject: zylindrische projektion statt planare --- stabilize.py | 4 ++-- warp.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/stabilize.py b/stabilize.py index c24f1f8..ab11b51 100644 --- a/stabilize.py +++ b/stabilize.py @@ -45,7 +45,7 @@ def get_maps(xres,yres): yy=(y-yres/2.)/xres # yes, xres. for x in xrange(0,xres): - xx=(x-xres/2.)/xres + xx=math.tan((x-xres/2.)/xres) dist = math.sqrt(xx**2 + yy**2) @@ -67,7 +67,7 @@ def get_maps(xres,yres): return xmap,ymap -xmap,ymap = get_maps(1600/2,900/2) +xmap,ymap = get_maps(1280,720) diff --git a/warp.py b/warp.py index 746b665..f6407e9 100644 --- a/warp.py +++ b/warp.py @@ -18,7 +18,8 @@ def get_maps(xres,yres): yy=(y-yres/2.)/xres # yes, xres. for x in xrange(0,xres): - xx=(x-xres/2.)/xres + xx_=(x-xres/2.)/xres + xx=math.tan(xx_) dist = math.sqrt(xx**2 + yy**2) -- cgit v1.2.3