function result = apply_highpass_filter(image, cutoff)
%   function result = apply_highpass_filter(image, cutoff)
% $Id: apply_highpass_filter.m,v 1.1 2002/07/02 11:59:34 tobin Exp $
[f1,f2] = freqspace(size(image),'meshgrid');
Hd = ones(size(image));
r = sqrt(f1.^2 + f2.^2);
Hd(r<cutoff) = 0;
%I think perhaps it would be better to do some kind of checking
%that the filter really is symmetrical; perhaps it would be good to
%use some kind of anti-aliasing?  i.e. where does the imaginary
%component of the result come from?
%Hd = (Hd + rot90(Hd,1) + rot90(Hd,2) + rot90(Hd,3)) / 4; 
result = ifft2(fft2(image) .* fftshift(Hd));

     

