//Lecture et affichage de l'image source
N = 500*640;
a = read("im34.txt",-1,640);
ap = uint8(255*a);
figure();
ShowImage(ap,'Image originale');

//Traitement de l'image

a=matrix(a ,1, N);
A = fft(a,-1);
Amod = abs(A);

figure();
plot2d([2:N/2],Amod(1,2:N/2))

seuil = 0.1 * max(Amod)

for (i=seuil:(N-seuil))
        A(i)=0;
end

// FFT inverse et affichage et l'image reconstruite

A1 = fft(A,1);
Amod2 = abs(A1);
a2 = matrix(Amod2,500,640);
ap1 = uint8(255*a2);
figure();
ShowImage(ap1,'Image Reconstruite');

