Home > phiwave > uvi_wave > iwt.m

iwt

PURPOSE ^

IWT Discrete Inverse Wavelet Transform.

SYNOPSIS ^

function y=iwt(wx,rh,rg,scales,tam,sc_levels,del1,del2)

DESCRIPTION ^

 IWT  Discrete Inverse Wavelet Transform.
 
        IWT (WX,RH,RG,SCALES) calculates the 1D inverse wavelet transform
        of vector WX, which should be a SCALES-scales direct wavelet
        transform. If WX is a matrix, then it's supposed to hold a wavelet
        transform vector in each of its rows, and every one of them will be
        inverse transformed. The second argument RH is the synthesis
        lowpass filter and the third argument RG the synthesis highpass
        filter.

        IWT will calculate the size of the reconstructed vector(s) the
        largest as possible (maybe 1 point larger than the original) unless
        it is provided using IWT(WX,RH,RG,SCALES,SIZ). A value of 0 for SIZ
        is the same as ommiting it.


        IWT can be used to perform a single process of multiresolution
        analysis. The way to do it is by selecting the scales whose
        highpass bands (detail signals) should be ignored for
        reconstruction.

        Using IWT(WX,RH,RG,SCALES,SIZ,SC_LEVELS) where SC_LEVELS is a
        SCALES-sized vector, 1's or 0's. An i-th coefficient of 0 means
        that the i-th scale detail (starting from the deepest) should be
        ignored. SC_LEVELS vector can be replaced by a single number for
        selecting just only the SC_LEVELS deepest scales.

        An all-ones vector, or a single number equal to SCALES, is the same
        as the normal inverse transform.
         
        IWT (WX,RH,RG,SCALES,SIZ,SC_LEVELS,DEL1,DEL2) calculates the
        inverse transform or performs the multiresolution analysis, but
        allowing the users to change the alignment of the outputs with
        respect to the input signal. This effect is achieved by setting to
        DEL1 and DEL2 the analysis delays of H and G respectively, and
        calculating the complementary delays for synthesis filters RH and
        RG. The default values of DEL1 and DEL2 are calculated using the
        function WTCENTER.
 
 This function is a wrapper for iwtnd, for compatibility with UviWave.  See
 below for UviWave copyright.

 See also:  WTND, WT, IWT, WTCENTER, ISPLIT.

 $Id: iwt.m,v 1.1 2004/09/26 04:00:24 matthewbrett Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function y=iwt(wx,rh,rg,scales,tam,sc_levels,del1,del2)
0002 % IWT  Discrete Inverse Wavelet Transform.
0003 %
0004 %        IWT (WX,RH,RG,SCALES) calculates the 1D inverse wavelet transform
0005 %        of vector WX, which should be a SCALES-scales direct wavelet
0006 %        transform. If WX is a matrix, then it's supposed to hold a wavelet
0007 %        transform vector in each of its rows, and every one of them will be
0008 %        inverse transformed. The second argument RH is the synthesis
0009 %        lowpass filter and the third argument RG the synthesis highpass
0010 %        filter.
0011 %
0012 %        IWT will calculate the size of the reconstructed vector(s) the
0013 %        largest as possible (maybe 1 point larger than the original) unless
0014 %        it is provided using IWT(WX,RH,RG,SCALES,SIZ). A value of 0 for SIZ
0015 %        is the same as ommiting it.
0016 %
0017 %
0018 %        IWT can be used to perform a single process of multiresolution
0019 %        analysis. The way to do it is by selecting the scales whose
0020 %        highpass bands (detail signals) should be ignored for
0021 %        reconstruction.
0022 %
0023 %        Using IWT(WX,RH,RG,SCALES,SIZ,SC_LEVELS) where SC_LEVELS is a
0024 %        SCALES-sized vector, 1's or 0's. An i-th coefficient of 0 means
0025 %        that the i-th scale detail (starting from the deepest) should be
0026 %        ignored. SC_LEVELS vector can be replaced by a single number for
0027 %        selecting just only the SC_LEVELS deepest scales.
0028 %
0029 %        An all-ones vector, or a single number equal to SCALES, is the same
0030 %        as the normal inverse transform.
0031 %
0032 %        IWT (WX,RH,RG,SCALES,SIZ,SC_LEVELS,DEL1,DEL2) calculates the
0033 %        inverse transform or performs the multiresolution analysis, but
0034 %        allowing the users to change the alignment of the outputs with
0035 %        respect to the input signal. This effect is achieved by setting to
0036 %        DEL1 and DEL2 the analysis delays of H and G respectively, and
0037 %        calculating the complementary delays for synthesis filters RH and
0038 %        RG. The default values of DEL1 and DEL2 are calculated using the
0039 %        function WTCENTER.
0040 %
0041 % This function is a wrapper for iwtnd, for compatibility with UviWave.  See
0042 % below for UviWave copyright.
0043 %
0044 % See also:  WTND, WT, IWT, WTCENTER, ISPLIT.
0045 %
0046 % $Id: iwt.m,v 1.1 2004/09/26 04:00:24 matthewbrett Exp $
0047 
0048 %--------------------------------------------------------
0049 % Copyright (C) 1994, 1995, 1996, by Universidad de Vigo
0050 %
0051 %
0052 % Uvi_Wave is free software; you can redistribute it and/or modify it
0053 % under the terms of the GNU General Public License as published by the
0054 % Free Software Foundation; either version 2, or (at your option) any
0055 % later version.
0056 %
0057 % Uvi_Wave is distributed in the hope that it will be useful, but WITHOUT
0058 % ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0059 % FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
0060 % for more details.
0061 %
0062 % You should have received a copy of the GNU General Public License
0063 % along with Uvi_Wave; see the file COPYING.  If not, write to the Free
0064 % Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
0065 %
0066 %       Author: Sergio J. Garcia Galan
0067 %       e-mail: Uvi_Wave@tsc.uvigo.es
0068 %--------------------------------------------------------
0069 
0070 if nargin < 4
0071   error('Need data to iwt, two filters and number of scales');
0072 end
0073 if nargin < 5
0074   tam = [];
0075 end
0076 if nargin < 6
0077   sc_levels = [];
0078 end
0079 if nargin < 7
0080   del1 = [];
0081 end
0082 if nargin < 8
0083   del2 = [];
0084 end
0085 
0086 sz = size(wx);
0087 n_dims = length(sz);
0088 p_dims = zeros(1, n_dims);
0089 if sz(2) > 1
0090   p_dims(2) = 1;
0091 else 
0092   p_dims(1) = 1; 
0093 end
0094   
0095 if n_dims > 2
0096   warning('iwt does a 1D transform; use iwtnd for N-D transforms');
0097 end
0098 y = iwtnd(wx, rh, rg, scales, tam, sc_levels, del1, del2, p_dims);

Generated on Wed 06-Jul-2005 18:07:21 by m2html © 2003