comparison util/Rice Wavelet Toolbox/mirdwt.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 [x,L] = mirdwt(yl,yh,h,L);
2 % function [x,L] = mirdwt(yl,yh,h,L);
3 %
4 % Function computes the inverse redundant discrete wavelet
5 % transform x for a 1D or 2D input signal. (Redundant means here
6 % that the sub-sampling after each stage of the forward transform
7 % has been omitted.) yl contains the lowpass and yl the highpass
8 % components as computed, e.g., by mrdwt. In the case of a 2D
9 % signal, the ordering in
10 % yh is [lh hl hh lh hl ... ] (first letter refers to row, second
11 % to column filtering).
12 %
13 % Input:
14 % yl : lowpass component
15 % yh : highpass components
16 % h : scaling filter
17 % L : number of levels. In the case of a 1D signal,
18 % length(yl) must be divisible by 2^L;
19 % in the case of a 2D signal, the row and
20 % the column dimension must be divisible by 2^L.
21 %
22 % Output:
23 % x : finite length 1D or 2D signal
24 % L : number of levels
25 %
26 % HERE'S AN EASY WAY TO RUN THE EXAMPLES:
27 % Cut-and-paste the example you want to run to a new file
28 % called ex.m, for example. Delete out the % at the beginning
29 % of each line in ex.m (Can use search-and-replace in your editor
30 % to replace it with a space). Type 'ex' in matlab and hit return.
31 %
32 %
33 % Example 1:
34 % xin = makesig('Leopold',8);
35 % h = daubcqf(4,'min');
36 % L = 1;
37 % [yl,yh,L] = mrdwt(xin,h,L);
38 % [x,L] = mirdwt(yl,yh,h,L)
39 % x = 0.0000 1.0000 0.0000 -0.0000 0 0 0 -0.0000
40 % L = 1
41 %
42 % Example 2:
43 % load lena;
44 % h = daubcqf(4,'min');
45 % L = 2;
46 % [ll_lev2,yh,L] = mrdwt(lena,h,L); % lena is a 256x256 matrix
47 % N = 256;
48 % lh_lev1 = yh(:,1:N);
49 % hl_lev1 = yh(:,N+1:2*N);
50 % hh_lev1 = yh(:,2*N+1:3*N);
51 % lh_lev2 = yh(:,3*N+1:4*N);
52 % hl_lev2 = yh(:,4*N+1:5*N);
53 % hh_lev2 = yh(:,5*N+1:6*N);
54 % figure; colormap(gray); imagesc(lena); title('Original Image');
55 % figure; colormap(gray); imagesc(ll_lev2); title('LL Level 2');
56 % figure; colormap(gray); imagesc(hh_lev2); title('HH Level 2');
57 % figure; colormap(gray); imagesc(hl_lev2); title('HL Level 2');
58 % figure; colormap(gray); imagesc(lh_lev2); title('LH Level 2');
59 % figure; colormap(gray); imagesc(hh_lev1); title('HH Level 1');
60 % figure; colormap(gray); imagesc(hl_lev2); title('HL Level 1');
61 % figure; colormap(gray); imagesc(lh_lev2); title('LH Level 1');
62 % [lena_Hat,L] = mirdwt(ll_lev2,yh,h,L);
63 % figure; colormap(gray); imagesc(lena_Hat);
64 % title('Reconstructed Image');
65 %
66 % See also: mdwt, midwt, mrdwt
67 %
68 % Warning! min(size(yl))/2^L should be greater than length(h)
69 %
70
71 %File Name: mirdwt.m
72 %Last Modification Date: 08/07/95 15:14:21
73 %Current Version: mirdwt.m 2.4
74 %File Creation Date: Wed Oct 19 10:51:58 1994
75 %Author: Markus Lang <lang@jazz.rice.edu>
76 %
77 %Copyright (c) 2000 RICE UNIVERSITY. All rights reserved.
78 %Created by Markus Lang, Department of ECE, Rice University.
79 %
80 %This software is distributed and licensed to you on a non-exclusive
81 %basis, free-of-charge. Redistribution and use in source and binary forms,
82 %with or without modification, are permitted provided that the following
83 %conditions are met:
84 %
85 %1. Redistribution of source code must retain the above copyright notice,
86 % this list of conditions and the following disclaimer.
87 %2. Redistribution in binary form must reproduce the above copyright notice,
88 % this list of conditions and the following disclaimer in the
89 % documentation and/or other materials provided with the distribution.
90 %3. All advertising materials mentioning features or use of this software
91 % must display the following acknowledgment: This product includes
92 % software developed by Rice University, Houston, Texas and its contributors.
93 %4. Neither the name of the University nor the names of its contributors
94 % may be used to endorse or promote products derived from this software
95 % without specific prior written permission.
96 %
97 %THIS SOFTWARE IS PROVIDED BY WILLIAM MARSH RICE UNIVERSITY, HOUSTON, TEXAS,
98 %AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
99 %BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
100 %FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RICE UNIVERSITY
101 %OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
102 %EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
103 %PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
104 %OR BUSINESS INTERRUPTIONS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
105 %WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
106 %OTHERWISE), PRODUCT LIABILITY, OR OTHERWISE ARISING IN ANY WAY OUT OF THE
107 %USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
108 %
109 %For information on commercial licenses, contact Rice University's Office of
110 %Technology Transfer at techtran@rice.edu or (713) 348-6173
111 %
112 %Change History:
113 %
114 %Modification #1
115 %Mon Aug 7 15:09:51 CDT 1995
116 %Rebecca Hindman <hindman@ece.rice.edu>
117 %Added L to function line so that it can be displayed as an output
118 %
119 %Modification #2
120 %Thursday Mar 2 2000
121 % Added Example 2
122 % Felix Fernandes <felixf@rice.edu>
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138