Code covered by the BSD License  

Highlights from
Multiresolution Gabor-like transforms

image thumbnail

Multiresolution Gabor-like transforms

by

 

11 May 2012 (Updated )

Matlab implementation of the multiresolution Gabor filters in 1 and 2 dimensions.

demo.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Analysis and reconstruction of 1-dimensional signals in a multiresolution
% framework using Gabor-like wavelets.
%
% Version: April 20, 2008
% Author : K.N. Chaudhury
%
% References:
%
% [1] K.N. Chaudhury and M. Unser, Construction of Hilbert transform pairs 
% of wavelet bases and Gabor-like transforms, IEEE Transactions on Signal 
% Processing, vol. 57, no. 9, pp. 3411-3425, 2009.
%
% [2] K.N. Chaudhury, Optimally Localized Wavelets and Smoothing Kernels,
% Swiss Federal Institute of Technology Lausanne, EPFL, Thesis no. 4968.
%
%
% Notations:
%
% f:           Input signal of length M
% alpha:       Degree of the fractional B-spline
% tau = 0       (default)
% P1, P2:       Projection filters
% H, HH:        Lowpass filters on the analysis and synthesis sides
% G, GG:        Highpass filters on the analysis and synthesis sides
% w:            Complex wavelet coefficients
% lowpass:      Coarsest approximation
%
%
% All filtering (convolution) and subsampling operations are performed in  
% Fourier space; see [2] for implementation details.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clc; clear all; close all force;


%% input signal (sinusoid of fixed frequency)
M  = 512;
f  = sin( 50* pi * (0: 1 : M-1)/M );
M  = length(f); 


%% settings
% parameters for the fractional B-spline wavelets
tau   = 0;         % default 
alpha = input('Enter value of alpha (e.g., alpha = 12): \');  

% level of decomposition
J     = input('Enter the level of wavelet decomposition (e.g., J = 4): \'); 


%% exception handling
[f, flag] = exception(f, J);
if ~flag
    fprintf('Aborted!\n');
    return;
end


%% analysis
[w, lowpass, L1, L2] = analysis(f, J, alpha, tau);


%% synthesis
recon = synthesis(lowpass, w, J, alpha, tau, L1, L2);


%% results
fprintf('The reconstruction error is : %e\n', norm(f - recon));
displayResults(f, recon, w);

Contact us