[python-dtcwt] 133/497: Extra demo in docs of modified wavelets.
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:05:57 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 7a4db5253669ff595cc190a7d1e232e3da29620e
Author: Stewart Forshaw <not.my.real at email.address.com>
Date: Thu Nov 7 14:45:52 2013 +0000
Extra demo in docs of modified wavelets.
---
docs/lena_error.png | Bin 0 -> 107265 bytes
docs/lena_no_error.png | Bin 0 -> 127809 bytes
docs/variant.rst | 38 +++++++++++++++++++++++++++++++++++++-
matlab/regen_verification.sh | 6 +++---
tests/verification.npz | Bin 251136 -> 251136 bytes
5 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/docs/lena_error.png b/docs/lena_error.png
new file mode 100644
index 0000000..2df8d2e
Binary files /dev/null and b/docs/lena_error.png differ
diff --git a/docs/lena_no_error.png b/docs/lena_no_error.png
new file mode 100644
index 0000000..53591a7
Binary files /dev/null and b/docs/lena_no_error.png differ
diff --git a/docs/variant.rst b/docs/variant.rst
index 8413b8c..a1eaa4b 100644
--- a/docs/variant.rst
+++ b/docs/variant.rst
@@ -24,7 +24,7 @@ and frequency responses[1].
Usage is very similar to the standard 2-D transform function, but the only supported parameters are
'near_sym_b_bp', 'qshift_b_bp'. These arguments are optional, but it is best practice to include them
-so that your intentions are clear (and becuase it is easier for others to spot than the difference
+so that your intentions are clear (and because it is easier for others to spot than the difference
between 2() and 2b().
.. code-block:: console
@@ -42,5 +42,41 @@ For full details, refer to:
wavelets. *In Proc. European Conference on Signal Processing (EUSIPCO)*,
pages 901–904, 2006. 2, 18, 21
+-------
+Example
+-------
+Working on the Lena image, the standard 2-D DTCWT achieves perfect reconstruction:
+.. codeblock:: console
+
+ # Perform the standard 2-D DTCWT
+ Yl, Yh = dtcwt.dtwavexfm2(image, tfmlevel, 'near_sym_b', 'qshift_b')
+
+ # Perform the inverse transform
+ Z = dtcwt.dtwaveifm2(Yl, Yh, biort='near_sym_b', qshift='qshift_b')
+
+ # Show the error
+ imshow(Z-image, cmap=cm.gray)
+
+.. figure:: lena_no_error.png
+
+The error signal appears to be just noise, which we can attribute to floating-point precision.
+
+
+Using the modified wavelets yields the following result:
+
+.. codeblock:: console
+
+ # Perform the symmetry-modified 2-D DTCWT
+ Yl, Yh = dtcwt.dtwavexfm2b(image, tfmlevel, 'near_sym_b_bp', 'qshift_b_bp')
+
+ # Perform the inverse transform
+ Z = dtcwt.dtwaveifm2b(Yl, Yh, biort='near_sym_b_bp', qshift='qshift_b_bp')
+
+ # Show the error
+ imshow(Z-image, cmap=cm.gray)
+
+..figure:: lena_error.png
+
+As we would expect, the error is more significant, but only near 45 and 135 degree edge features.
diff --git a/matlab/regen_verification.sh b/matlab/regen_verification.sh
index a13414b..8bf7b3c 100755
--- a/matlab/regen_verification.sh
+++ b/matlab/regen_verification.sh
@@ -3,13 +3,13 @@
## CONFIGURATION
# Path to dtcwt toolbox
-DTCWT_TOOLBOX=$HOME/Downloads/dtcwt_toolbox4_3
+DTCWT_TOOLBOX=/media/Data/MATLAB\ Toolboxes/dtcwt_toolbox4_3
# Path to dtcwt keypoints toolbox
-DTCWT_KEYPOINTS=$HOME/Downloads/DTCWTkeypoints
+DTCWT_KEYPOINTS=/media/Data/MATLAB\ Toolboxes/DTCWTkeypoints
# Path to MATLAB
-MATLAB=/opt/MATLAB/R2013b/bin/matlab
+MATLAB=/usr/local/MATLAB/R2013a/bin/matlab
## END OF CONFIGURATION
diff --git a/tests/verification.npz b/tests/verification.npz
index 6843631..4d28a3c 100644
Binary files a/tests/verification.npz and b/tests/verification.npz differ
--
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