Code covered by the BSD License
 analysis(f, J, alpha, tau)% signal is first prefiltered, and then a Jlevel wavelet decomposition
 analysis(inImg, J, alpha,...% First, project the image into the four (tensor) approximation space.
 autocorr(M, alpha)% computes the autocorrelation filter A(z) for the fractional Bspline.
 autocorr(M, alpha)% computes the autocorrelation filter A(z) for the fractional Bspline.
 displayFigures (inImg, w,...% Plots the original and the reconstructed images, and the modulus of the
 displayResults(f, recon, w)% display the original and the reconstructed signal, the real and the
 exception( f )% Checks for inconsistencies.
 exception(f, J)% check and correct for inconsistency.
 filters(M, alpha, tau, flag)% sets up the multiresolution spline filters.
 filters(M, alpha, tau, tag)% Computes the analysis and synthesis filters corresponding to the
 generate.m
 generateGaborWavelets.m
 postfilter(Y, L, alpha, t...% Inverts the prefiltering operation.
 prefilter(im0, alpha, tau...% projects the image onto the four different approximation spaces used in
 projectionFilters(M, alph...% projects the signal onto the four 'matched' approximtion spaces.
 projectionFilters(M, alph...% projects the signal onto the two 'matched' approximtion spaces.
 synthesis(lowpass, w, J, ...% reconstructs the signal from the lowpass signal and the complex wavelet
 synthesis(lowpass, w, J, ...% reconstructs the image from the lowpass signals, and the complex wavelet
 demo.m
 demo.m

View all files
Multiresolution Gaborlike transforms
by
Kunal Chaudhury
11 May 2012
(Updated
14 May 2012)
Matlab implementation of the multiresolution Gabor filters in 1 and 2 dimensions.

projectionFilters(M, alpha, tau) 
function [P1, P2] = projectionFilters(M, alpha, tau)
%
% projects the signal onto the two 'matched' approximtion spaces.
% note that M must be odd.
%
shift = 1/2;
h = 1/(M  1);
mid = (M + 1)/2;
% symmetric frequency (center at the origin)
nu = zeros(1, M);
for k = 1 : (M1)/2
nu(1, mid+k) = k * h;
nu(1, midk) = k * h;
end
w = sqrt(1)*(2*pi*nu);
p1 = 0.5*(alpha + 1) + tau;
q1 = 0.5*(alpha + 1)  tau;
p2 = 0.5*(alpha + 1) + tau + shift;
q2 = 0.5*(alpha + 1)  tau  shift;
P1 = zeros(1, M);
P2 = zeros(1, M);
P1(mid) = 1;
P2(mid) = 1;
% sample the continuous filter (defined on the real line)
for k = 1 : M
if k == mid
continue;
else
temp = (1  exp(w(k)))/w(k);
tempConj = conj(temp);
P1(k) = temp^p1 * tempConj^q1;
P2(k) = temp^p2 * tempConj^q2;
end
end
% move the center frequency to one end (Matlab convention)
P1 = conj( ifftshift(P1) );
P2 = conj( ifftshift(P2) );


Contact us