[python-dtcwt] 269/497: registration: remove older affine... functions
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:13 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 6395ea832d9a589493e22b60921c244703e50825
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date: Thu Jan 30 11:59:38 2014 +0000
registration: remove older affine... functions
Nothing uses these functions any more so don't let them bitrot
---
dtcwt/registration.py | 70 ---------------------------------------------------
1 file changed, 70 deletions(-)
diff --git a/dtcwt/registration.py b/dtcwt/registration.py
index aac7dce..9b586f0 100644
--- a/dtcwt/registration.py
+++ b/dtcwt/registration.py
@@ -23,9 +23,6 @@ import numpy as np
__all__ = [
'EXPECTED_SHIFTS',
- 'affinevelocityfield',
- 'affinewarp',
- 'affinewarphighpass',
'confidence',
'estimatereg',
'normsample',
@@ -253,73 +250,6 @@ def normsample(Yh, xs, ys, method=None):
"""
return dtcwt.sampling.sample(Yh, xs*Yh.shape[1], ys*Yh.shape[0], method=method)
-def affinevelocityfield(a, xs, ys):
- r"""
- Evaluate the velocity field parametrised by *a* at *xs* and *ys*.
-
- Return a pair *vx*, *vy* giving the x- and y-component of the velocity.
-
- The velocity vector is given by :math:`\mathbf{v} = \mathbf{K} \mathbf{a}` where
-
- .. math::
- \mathbf{K} = \begin{bmatrix}
- 1 & 0 & x & 0 & y & 0 \\
- 0 & 1 & 0 & x & 0 & y
- \end{bmatrix}
-
- """
- return (a[0] + a[2]*xs + a[4]*ys), (a[1] + a[3]*xs + a[5]*ys)
-
-def affinewarphighpass(Yh, a, method=None):
- r"""
- Given a NxMx6 array of subband responses, warp it according to affine transform
- parametrised by the vector *a* s.t. the pixel at (x,y) samples from (x',y') where
-
- .. math::
- [x', y']^T = \mathbf{T} \ [1, x, y]^T
-
- and
-
- .. math::
- \mathbf{T} = \begin{bmatrix}
- a_0 & a_2 & a_4 \\
- a_1 & a_3 & a_5
- \end{bmatrix}
-
- .. note::
- The sample co-ordinates are in *normalised* co-ordinates such that the
- image width and height are both unity.
-
- """
- xs, ys = np.meshgrid(np.arange(0,1,1/Yh.shape[1]), np.arange(0,1,1/Yh.shape[0]))
- vxs, vys = affinevelocityfield(a, xs, ys)
- return normsamplehighpass(Yh, xs+vxs, ys+vys, method=method)
-
-def affinewarp(Yh, a, method=None):
- r"""
- Given a NxM image, warp it according to affine transform parametrised by
- the vector *a* s.t. the pixel at (x,y) samples from (x',y') where
-
- .. math::
- [x', y']^T = \mathbf{T} \ [1, x, y]^T
-
- and
-
- .. math::
- \mathbf{T} = \begin{bmatrix}
- a_0 & a_2 & a_4 \\
- a_1 & a_3 & a_5
- \end{bmatrix}
-
- .. note::
- The sample co-ordinates are in *normalised* co-ordinates such that the
- image width and height are both unity.
-
- """
- xs, ys = np.meshgrid(np.arange(0,1,1/Yh.shape[1]), np.arange(0,1,1/Yh.shape[0]))
- vxs, vys = affinevelocityfield(a, xs, ys)
- return normsample(Yh, xs+vxs, ys+vys, method=method)
-
def warptransform(t, avecs, levels, method='bilinear'):
"""
Return a warped version of a transformed image acting only on specified levels.
--
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