Efficient Analysis and Synthesis using a New Factorization of the Gabor Frame Matrix.

S. Moreno, F.J. Ferri, M. Arevalillo, W. Diaz

http://www.uv.es/prcv




Matlab code

The purpose of this code is to illustrate the use of a novel decomposition
of the Gabor Frame operator. In particular, it leads to an efficient DGE
algorithm if some conditions are fulfilled. The new algorithm could be of interest
when using short analysis windows and their corresponding (longer) canonical duals
for synthesis. Ïnstead of using a long support algorithm for synthesis
(as the Factorization algorithm) or excessively truncating the dual (or looking for
alternative short duals), one can exactly compute the DGE (to a desired numerical
tolerance) at a competitive cost which depends on the support of the anaysis window
instead of its dual.

The current version of the code has been deeply tested for compatibility with LTFAT.
Some parts of the algorithm have been improved. The decomposition now uses a
minimal block size and Steps 6, 7 and 8 use sparse matrices.

 
The main functions provided are:


dgtP   : DGT using Portnoff which is very efficient for short FIR windows

idgtP  : which is needed by Algorithm 2. You can use it also if you explicitly
         obtain the (usually longer) FIR dual window.

idgtID : DGE using Algorithm 2


These functions do not have dependencies on any specific toolbox but they are
prepared to use signal, windows and transforms produced by the the
Large Time/Frequency Analysis Toolbox (LTFAT) toolbox:

http://ltfat.sourceforge.net/  

Therefore, this library needs to be installed before the scripts described below are run.
To this end, you shall download the appropiate binary for your system from

https://sourceforge.net/projects/ltfat/files/ltfat/2.0/

Then uncompress the downloaded file, get into the ltfat directory and run the script ltfatstart.m

The remaining functions/scripts are of internal use or to produce comparative
figures.

+ use toyGabor.m to generate illustrative figures for matrices S, E and D

+ use paper_figures.m to run/display all experiments described in the paper

+ A complete listing follows (also in file GaborCodeList.txt)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Main functions to implement the proposed DGE algorithm (Algorithm 2 in the paper):


idgtID.m          (* proposed algorithm to compute the DGE using the analysis window   )
                  (* this is a general DGE algorithm that needs no dual window         )
                  
gGblock.m         (* Step 1. Puts the analysis window in block matrix form: gG         )
InitS.m           (* Step 2. Computes P,V blocks                                       )
BasicRecurrence.m (* Step 3. Solves the recurrence in Eq. 5                            )
estimaJordan.m    (* Step 4. Estimates No and canonical dual support from Q. Lgd=2NoKs )
idgtP.m           (* Step 5. DGE (Portnoff). This is a general DGE algorithm           )
Steps678.m        (* Steps 678. Core of the proposed algorithm                         )

% Auxiliar functions used in the proposed algorithm

blockSize.m       (* computes Ks from Lg,a,M                       )
expandSignal.m    (* zero-pads signal so that L=aN=bM or L=KsNs=bM )


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Other quite general functions

dgtP.m            (* DGT (Portnoff). This is a general DGT algorithm           )
essSupport.m      (* computes essential support and gives a compact window     )
startGaborCode.m  (* sets the path to use ltfat toolbox. Put your own inside!  )


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Illustrative functions (FIGURE 1)

toyGabor.m        (  Compute S, E and D from P, V, A, B and Q and show them graphically
                     The analysis window and its canonical dual are also shown.
                     Several parameters can be changed inside.
                     Figure 1 in the paper has been generated as:

                     toyGabor(36,3,4,14,1,false)                                          )


% Auxiliar functions used by toyGabor:

fullMats.m        (  computes full matrices S, E and D from blocks. Even for Ns=2 )
showMatrix.m      (  displays a matrix as an image                                )
imagescMat        (  modified imagesc used by showMatrix                          )


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Functions used for the numerical experiments (TABLE II, FIGURES 2 and 3)


runOne.m          (x runs different DGT/DGE options for a given Gabor frame and
                     saves/displays CPU times, reconstruction errors, dual sizes, etc
                     Data in Table II was obtained by

                     [Outs, Ins] = runOne(30,60,120,1,10*44100);
                     [Outs, Ins] = runOne(30,60,120,1,20*44100);

                     Timing of Portnoff using a short dual was simulated as:

                     [Outs, Ins] = runOne(30,60,120,1,'dualMax',120)


showBars.m        (x shows CPU times as bars. Used by runOne )


runLgs.m
runMa.m           
runLgM.m          (x runs series of experiments varying one or several parameters )
                     Figures 2a,2b and 3ab were generated as:

                     [Outs, Ins] = runLgs(30,60,60:30:300,10*44100);
                     [Outs, Ins] = runLgM(30,40:15:200,2,10*44100);
                     [Outs, Ins] = runMa(40:40:240,2,2,10*44100);
                     [Outs, Ins] = runMa(40:40:240,2.2,2,10*44100);

showExp.m         (x displays results from the above series of experiments:       )
                     showExp(Ins,Outs,1)

mystyles.m        (x auxiliar function used by showExp                            )


paper_figures.m   (x script that runs/shows experiments corresponding to          )
                  (  FIGURES 2, 3 and gives some more information                 )

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%