3

I'm working on a Matlab project which uses 2D wavelet transform. I am working on a Wavelet Transformation Modulus Maxima method (WTMM). I work with the Matlab wavelet toolbox. I have some questions about wavelets and WTMM method : - I use the 2D discrete wavelet transformation (dwt2 and wavedec2 too) but I don't really understand the role of the dwt2 outputs Approximation/Vertical/Horizontal/Diagonal. I saw they were the result of low pass and high pass filters (https://www.clear.rice.edu/elec301/Projects02/artSpy/dwt.html), but which ouput should I use to find local maximas on the image ?

[A,H,V,D] = dwt2(X,'wname')
  • I also use multifractal formalism in my project. In order to plot the scale function, I have to plot firstly the partition function (according to this article http://www.scholarpedia.org/article/Wavelet-based_multifractal_analysis, in the "WTMM method" part). However I don't know how to plot correctly this; here my code :

     [A,H,D,V] = dwt2(im,'haar');         
     im_max = imregionalmax(abs(A)); % Modulus Maxima of the wavelet 
                                     Transform, using the Approximation 
                                     wavelet
     figure, imshow(im_max);
    
     %% Partition Function Z
    
     Z = 0; % Initialization of the partition function
    
     for q = -5:5
    
     Z = Z + abs(im_max).^q ;% Definition of the partition function.
     %Certainly wrong, I think q can't be the variable for the loop and 
     % im_max is not the correct input in abs.
    
     end
    
    a = 2; % scale factor. It is supposed to vary, I put it to 2 just for
           %  tests
    
    tau =  log(z)/log(a); % scaling function, in function of q according to
                          % the article
    
    plot(tau,q);
    

Thanks in advance for your help

Whatzat
  • 81
  • 6

1 Answers1

0

Just a quick update on your question which I stumbled upon by chance, stressing a few basic things: WTMM requires you to compute continuous wavelets, it won't work with a discrete basis. You can use a simple Mexican hat or the third derivative of the Gaussian wavelet for instance, and make sure that the results don't vary significantly. As for the partition function, you could have picked just the sum of the modulus of the wavelet over the entire domain. It was shown however that this choice is less stable than computing the sum of the maxima, especially for negative q. So, you need to take a whole range of scales 'a', from the Nyquist inverse frequency to say one hundred thousandth of the domain size, find the local maxima for each, and discard those that can't be joined in lines across scales. That's the tricky bit, which make the computation quite cumbersome. As you reach finer and finer scales more and more lines appear. You repeat this for every q within a reasonable range like q in [-1:6], smaller q will give unreliable results typically. Once you have obtained Z(a, q) like this, you check if there is good scaling behavior for a subrange of scales. The power law exponent is generally denoted tau(q): Z ~ a^tau. It's the thermodynamic analog of a free energy. If tau(q) is close to a straight line, you have a fractal, if it is closer to a parabola, you have a multifractal. If it's anything else, you should go through the previous steps twice. There is more to the analysis in order to get to the spectrum D(h) (or f(alpha)) than doing a Legendre transform, which can be also computationally unstable. Hope it helps long after you asked.