[python-dtcwt] 325/497: move registration example to doc-time compile
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:21 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 5025491bb683077555673843dfd4ce3afa88af21
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date: Mon Feb 3 13:49:59 2014 +0000
move registration example to doc-time compile
---
docs/examples.rst | 3 +--
docs/tennis-registration.png | Bin 854860 -> 0 bytes
docs/traffic-registration.png | Bin 756385 -> 0 bytes
examples/image-registration.py | 12 +++++-------
4 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/docs/examples.rst b/docs/examples.rst
index 79a8ee6..8c7d4b8 100644
--- a/docs/examples.rst
+++ b/docs/examples.rst
@@ -43,6 +43,5 @@ traffic at a road junction.
It will attempt to register two image pairs: a challenging sequence from a
video sequence and a sequence from a traffic camera. The result is shown below.
-.. image:: tennis-registration.png
+.. plot:: ../examples/image-registration.py
-.. image:: traffic-registration.png
diff --git a/docs/tennis-registration.png b/docs/tennis-registration.png
deleted file mode 100644
index c39dafd..0000000
Binary files a/docs/tennis-registration.png and /dev/null differ
diff --git a/docs/traffic-registration.png b/docs/traffic-registration.png
deleted file mode 100644
index 5603746..0000000
Binary files a/docs/traffic-registration.png and /dev/null differ
diff --git a/examples/image-registration.py b/examples/image-registration.py
index 90098ea..32053b3 100755
--- a/examples/image-registration.py
+++ b/examples/image-registration.py
@@ -22,12 +22,12 @@ from dtcwt.registration import *
logging.basicConfig(level=logging.INFO)
+import datasets
+
def register_frames(filename):
# Load test images
logging.info('Loading frames from "{0}"'.format(filename))
- test_frames = np.load(filename)
- f1 = test_frames['f1']
- f2 = test_frames['f2']
+ f1, f2 = datasets.regframes(filename)
# Take the DTCWT of both frames.
logging.info('Taking DTCWT')
@@ -75,7 +75,5 @@ def register_frames(filename):
savefig(os.path.splitext(os.path.basename(filename))[0] + '-registration.png')
-register_frames(os.path.join(os.path.dirname(__file__), '..', 'tests', 'traffic.npz'))
-register_frames(os.path.join(os.path.dirname(__file__), '..', 'tests', 'tennis.npz'))
-
-show()
+register_frames('traffic')
+register_frames('tennis')
--
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