LEMARIE Generates the quadrature filters given by Battle and Lemarie. [H,G,RH,RG] = LEMARIE (NUM_COEFS) returns the coeficients of orthonormal Battle-Lemarie wavelets. NUM_COEFS specifies the number of coefficients. H is the analysis lowpass filter, RH the synthesis lowpass filter, G the analysis higthpass filter and RG the synthesis highpass filter. References: S. Mallat, "A Theory for Multiresolution Signal Decomposition: The Wavelet Representation", IEEE Trans. on Patt. An. and Mach. Intell., July 1989 $Id: lemarie.m,v 1.1 2004/09/26 04:00:24 matthewbrett Exp $
0001 function [h,g,rh,rg]=lemarie(num_coefs) 0002 0003 %LEMARIE Generates the quadrature filters given by Battle and Lemarie. 0004 % 0005 % [H,G,RH,RG] = LEMARIE (NUM_COEFS) returns the coeficients of 0006 % orthonormal Battle-Lemarie wavelets. NUM_COEFS specifies the 0007 % number of coefficients. 0008 % 0009 % H is the analysis lowpass filter, RH the synthesis lowpass 0010 % filter, G the analysis higthpass filter and RG the synthesis 0011 % highpass filter. 0012 % 0013 % References: S. Mallat, "A Theory for Multiresolution Signal 0014 % Decomposition: The Wavelet Representation", IEEE Trans. 0015 % on Patt. An. and Mach. Intell., July 1989 0016 % 0017 % $Id: lemarie.m,v 1.1 2004/09/26 04:00:24 matthewbrett Exp $ 0018 0019 %-------------------------------------------------------- 0020 % Copyright (C) 1994, 1995, 1996, by Universidad de Vigo 0021 % 0022 % 0023 % Uvi_Wave is free software; you can redistribute it and/or modify it 0024 % under the terms of the GNU General Public License as published by the 0025 % Free Software Foundation; either version 2, or (at your option) any 0026 % later version. 0027 % 0028 % Uvi_Wave is distributed in the hope that it will be useful, but WITHOUT 0029 % ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0030 % FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0031 % for more details. 0032 % 0033 % You should have received a copy of the GNU General Public License 0034 % along with Uvi_Wave; see the file COPYING. If not, write to the Free 0035 % Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 0036 % 0037 % Author: Jose Martin Garcia 0038 % e-mail: Uvi_Wave@tsc.uvigo.es 0039 %-------------------------------------------------------- 0040 0041 0042 % frequency axis 0043 L=128; 0044 w=[0:2*pi/L:2*pi*(1-1/L)]; 0045 w(1)=eps; 0046 w(65)=w(65)+1e-15; 0047 0048 % calculation of frequency response of analysis lowpass filter 0049 num=0;den=0; 0050 K=36; 0051 for k=-K:K, 0052 num=1./((w+2*pi*k).^8)+num; 0053 den=1./((2*w+2*pi*k).^8)+den; 0054 end 0055 H=sqrt(num./(2.^8*den)); 0056 H(1)=1; 0057 0058 % obtain the time response of lowpass filter 0059 h=real(ifft(H,L)); 0060 h=[ h(128-floor(num_coefs/2)+1:128) h(1:ceil(num_coefs/2))]; 0061 h=sqrt(2)/sum(h)*h; 0062 0063 [rh,rg,h,g]=rh2rg(fliplr(h));