Compute several 2D continuous wavelet transforms
out = cwt2d(fimg, wavname, scales, angles [,WaveletParameter] [,'Norm',NormValue] [,'Contrast'])
out = cwt2d(fimg, wavname, scales, angles [,'WaveletOptionName', WaveletOptionValue] [,'Norm',NormValue] [,'Contrast'])
This function computes the 2d continuous wavelet transform of an image. Wavelets are taken inside the sub directory 'wave_defs' (see the README to know how to write your own wavelet)
>> [x,y] = meshgrid(-64:64); >> img = max( abs(x), abs(y) ) < 30; >> fimg = fft2(img); >> wimg = cwt2d(fimg, 'morlet', 2, 0); >> yashow(wimg);Give the 2D Morlet wavelet transform of a 64 pixel width square for a scale equal to 2 and angle equal to 0. The implicit values are the Morlet wavelet parameters: w0=6; sigma=1. For other values, you can type something like
>> wimg = cwt2d(fimg, 'morlet', 2, 0, 7, 2);or,
>> wimg = cwt2d(fimg, 'morlet', 2, 0, 'w0', 7 , 'sigma', 2);This change values of w0 and sigma respectively to 7 and 2. Note that the first example is order dependant and not the second.
Finally, you can change the normalization of the cwt with the following command:
>> wimg = cwt2d(fimg, 'morlet', 2, 0, 'w0', 7 , 'sigma', 2, ...
'norm','l1');
for the L1 normalization (and 'l2' for L2).
[1]: M. Duval-Destin, M.A. Muschietti and B. Torresani, Continous wavelet decompositions, multiresolution and contrast analysis" SIAM J. Math Anal. 24 (1993).
cauchy2d cwt2d dergauss2d dog2d esmex2d gauss2d gaussx2d gaussz2d mexican2d morlet2d samcwt2d sarcwt2d sdog2d sqdog2d yashow