function [ new T error ] = compress2( image, T )
% Compress the original image by setting lower frequencies to zero
% and emphasizing the amplitudes of the higher frequencies

F=fft2(image);
f=abs(F);
TT=max(f(:))*0.7;
FH=F.*(abs(F)>TT);
FH=FH*0.1+F; %emphasize the amplitudes of the higher frequencies
%image=ifft2(FH);

FC=FH.*(abs(FH)>T);
new=ifft2(FC);
error=abs(new-image);
error=std(error(:));

