[python-dtcwt] 372/497: registration: revert to old level-picking

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository python-dtcwt.

commit ae6f6644727690cea828198fadecc5dca47612df
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date:   Fri Feb 7 16:08:53 2014 +0000

    registration: revert to old level-picking
---
 dtcwt/registration.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/dtcwt/registration.py b/dtcwt/registration.py
index 3909645..823d660 100644
--- a/dtcwt/registration.py
+++ b/dtcwt/registration.py
@@ -292,7 +292,7 @@ def estimatereg(source, reference, regshape=None):
     # Extract number of levels and shape of level 3 subband
     nlevels = len(source.highpasses)
     if regshape is None:
-        avecs_shape = source.highpasses[3].shape[:2] + (6,)
+        avecs_shape = source.highpasses[2].shape[:2] + (6,)
     else:
         avecs_shape = tuple(regshape[:2]) + (6,)
 
@@ -309,10 +309,9 @@ def estimatereg(source, reference, regshape=None):
         avecs[:,:,idx] = a[idx]
 
     # Refine estimate
-    for it in xrange(2 * (nlevels - 1)):
-        s, e = nlevels, nlevels - 1 - it//2
-        levels = list(x for x in xrange(s, e-1, -1)
-                      if x>=3 and x<nlevels and source.highpasses[x].shape[0] <= 2*avecs.shape[0] and source.highpasses[x].shape[1] <= 2*avecs.shape[1])
+    for it in xrange(2 * (nlevels-3) - 1):
+        s, e = nlevels, nlevels - 2 - (it+1)//2
+        levels = list(x for x in xrange(s, e-1, -1) if x>=2 and x<nlevels)
         if len(levels) == 0:
             continue
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-dtcwt.git



More information about the debian-science-commits mailing list