comparison util/Rice Wavelet Toolbox/mdwt.mhelp @ 78:f69ae88b8be5

added Rice Wavelet Toolbox with my modification, so it can be compiled on newer systems.
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Fri, 25 Mar 2011 15:27:33 +0000
parents
children
comparison
equal deleted inserted replaced
76:d052ec5b742f 78:f69ae88b8be5
1 function [y,L] = mdwt(x,h,L);
2 % [y,L] = mdwt(x,h,L);
3 %
4 % Function computes the discrete wavelet transform y for a 1D or 2D input
5 % signal x using the scaling filter h.
6 %
7 % Input:
8 % x : finite length 1D or 2D signal (implicitly periodized)
9 % h : scaling filter
10 % L : number of levels. In the case of a 1D signal, length(x) must be
11 % divisible by 2^L; in the case of a 2D signal, the row and the
12 % column dimension must be divisible by 2^L. If no argument is
13 % specified, a full DWT is returned for maximal possible L.
14 %
15 % Output:
16 % y : the wavelet transform of the signal
17 % (see example to understand the coefficients)
18 % L : number of decomposition levels
19 %
20 % 1D Example:
21 % x = makesig('LinChirp',8);
22 % h = daubcqf(4,'min');
23 % L = 2;
24 % [y,L] = mdwt(x,h,L)
25 %
26 % 1D Example's output and explanation:
27 %
28 % y = [1.1097 0.8767 0.8204 -0.5201 -0.0339 0.1001 0.2201 -0.1401]
29 % L = 2
30 %
31 % The coefficients in output y are arranged as follows
32 %
33 % y(1) and y(2) : Scaling coefficients (lowest frequency)
34 % y(3) and y(4) : Band pass wavelet coefficients
35 % y(5) to y(8) : Finest scale wavelet coefficients (highest frequency)
36 %
37 % 2D Example:
38 %
39 % load test_image
40 % h = daubcqf(4,'min');
41 % L = 1;
42 % [y,L] = mdwt(test_image,h,L);
43 %
44 % 2D Example's output and explanation:
45 %
46 % The coefficients in y are arranged as follows.
47 %
48 % .------------------.
49 % | | |
50 % | 4 | 2 |
51 % | | |
52 % | L,L | H,L |
53 % | | |
54 % --------------------
55 % | | |
56 % | 3 | 1 |
57 % | | |
58 % | L,H | H,H |
59 % | | |
60 % `------------------'
61 %
62 % where
63 % 1 : High pass vertically and high pass horizontally
64 % 2 : Low pass vertically and high pass horizontally
65 % 3 : High pass vertically and low pass horizontally
66 % 4 : Low pass vertically and Low pass horizontally
67 % (scaling coefficients)
68 %
69 %
70 %
71 %
72 % See also: midwt, mrdwt, mirdwt
73 %
74
75 %File Name: mdwt.m
76 %Last Modification Date: 08/07/95 15:13:25
77 %Current Version: mdwt.m 2.4
78 %File Creation Date: Wed Oct 19 10:51:58 1994
79 %Author: Markus Lang <lang@jazz.rice.edu>
80 %
81 %Copyright (c) 2000 RICE UNIVERSITY. All rights reserved.
82 %Created by Markus Lang, Department of ECE, Rice University.
83 %
84 %This software is distributed and licensed to you on a non-exclusive
85 %basis, free-of-charge. Redistribution and use in source and binary forms,
86 %with or without modification, are permitted provided that the following
87 %conditions are met:
88 %
89 %1. Redistribution of source code must retain the above copyright notice,
90 % this list of conditions and the following disclaimer.
91 %2. Redistribution in binary form must reproduce the above copyright notice,
92 % this list of conditions and the following disclaimer in the
93 % documentation and/or other materials provided with the distribution.
94 %3. All advertising materials mentioning features or use of this software
95 % must display the following acknowledgment: This product includes
96 % software developed by Rice University, Houston, Texas and its contributors.
97 %4. Neither the name of the University nor the names of its contributors
98 % may be used to endorse or promote products derived from this software
99 % without specific prior written permission.
100 %
101 %THIS SOFTWARE IS PROVIDED BY WILLIAM MARSH RICE UNIVERSITY, HOUSTON, TEXAS,
102 %AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
103 %BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
104 %FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RICE UNIVERSITY
105 %OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
106 %EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
107 %PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
108 %OR BUSINESS INTERRUPTIONS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
109 %WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
110 %OTHERWISE), PRODUCT LIABILITY, OR OTHERWISE ARISING IN ANY WAY OUT OF THE
111 %USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
112 %
113 %For information on commercial licenses, contact Rice University's Office of
114 %Technology Transfer at techtran@rice.edu or (713) 348-6173
115 %
116 %Change History:
117 %
118 %Modification #1
119 %Mon Aug 7 11:42:11 CDT 1995
120 %Rebecca Hindman <hindman@ece.rice.edu>
121 %Added L to function line so that it can be displayed as an output
122 %
123 %Change History:
124 %
125 %Modification #1
126 %Thu Mar 2 13:07:11 CDT 2000
127 %Ramesh Neelamani<neelsh@ece.rice.edu>
128 %Revamped the help file
129 %
130
131
132