function WFWT2PO, x,L,qmf ;+ ; NAME: ; WFWT2PO ; ; PURPOSE: ; This function performs a 2-dimensional wavelet transform (periodized, orthonormal). ; ; CATEGORY: ; Wavelets ; ; CALLING SEQUENCE: ; wc = WFWT2PO(x,L,qmf) ; ; INPUTS: ; x: 2-d image (n by n array, n dyadic) ; L: coarse level ; qmf: quadrature mirror filter ; ; OUTPUTS: ; wc: 2-d wavelet transform ; ; NOTES: ; A two-dimensional Wavelet Transform is computed for the ; array x. To reconstruct, use WIWT2PO. ; ; EXAMPLE: ; ; SEE ALSO: ; wiwt2po, wmkofilt ; ; MODIFICATION HISTORY: ; Written by: Amara Graps October, 1994 ;Translated from MatLab Wavelab routine: fwt2_po.m ;- n = WQUADLEN(x,J) ;wc = x ;We need to convert to floats here, otherwise the ;coeffs are very rough, and the reconstruction fails! (AG) wc = FLOAT(x) nc = n FOR jscal=J-1, L,-1 DO BEGIN ;use the IDL way to create an index array a = FIX(nc/2+1) & b = 1 & c = nc top = WMKIARRY( a, b, c) a = 1 & b = 1 & c = FIX(nc/2) bot = WMKIARRY( a, b, c) FOR ix=1 , nc DO BEGIN row = wc(0 : nc-1, ix-1) ;idl has rows/cols flipped wc(bot,ix-1) = WDNDYDLO(row,qmf) wc(top,ix-1) = WDNDYDHI(row,qmf) END FOR iy=1, nc DO BEGIN row = TRANSPOSE(wc(iy-1,0 : nc-1)) wc(iy-1,top) = TRANSPOSE(WDNDYDHI(row,qmf)) wc(iy-1,bot) = TRANSPOSE(WDNDYDLO(row,qmf)) END nc = FIX(nc/2) END ; ; Algorithm Source: WaveLab Version 0.600 ; WaveLab WWW site: http://playfair.stanford.edu/ ; WaveLab Questions? e-mail wavelab@playfair.stanford.edu ; RETURN, wc END ;***************************************************