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.

postfilter(Y, L, alpha, tau, filterID)
function  im  =  postfilter(Y, L, alpha, tau, filterID)
%
% Inverts the prefiltering operation.
%
M  =  length(Y);
P  =  (length(L) - 1)/2;

im              = zeros(M + 1,M + 1);
im(1 : M,1 : M) = Y;
im(:,M+1)       = L(1,1 : P + 1);
im(M+1,1:M)     = L(1, P + 2 : length(L));


[P1, P2] = projectionFilters(M + 1, alpha, tau);
P1inv = conj(P1) ./ (P1.*conj(P1));
P2inv = conj(P2) ./ (P2.*conj(P2));


switch filterID
    
    
    case 1
        
        for i = 1 : M+1
            f = im(:,i);
            F = fft(f).';
            im(:,i) = ifft(P1inv.*F).';
        end
        
        for i = 1 : M+1
            f = im(i,:);
            im(i,:) = ifft(P1inv.*fft(f));
        end
        
        
        
    case 2
        
        for i = 1 : M+1
            f = im(:,i);
            F = fft(f).';
            im(:,i) = ifft(P2inv.*F).';
        end
        
        for i = 1 : M+1
            f = im(i,:);
            im(i,:) = ifft(P2inv.*fft(f));
        end
        
        
    case 3
        
        for i = 1 : M+1
            f = im(:,i);
            F = fft(f).';
            im(:,i) = ifft(P2inv.*F).';
        end
        
        for i = 1 : M+1
            f = im(i,:);
            im(i,:) = ifft(P1inv.*fft(f));
        end
        
        
    case 4
        
        for i = 1 : M+1
            f = im(:,i);
            F = fft(f).';
            im(:,i) = ifft(P1inv.*F).';
        end
        
        for i = 1 : M+1
            f = im(i,:);
            im(i,:) = ifft(P2inv.*fft(f));
        end
        
end

im=real(im(1:P,1:P));


Contact us