clear all;
close all;
border=100
A = imread('rieka.pgm','pgm');
B=double(A)+1;
B=log(B);
C=fft2(B);
D=fftshift(C);
mask=[ones(border,256);ones(256-2*border,border) zeros(256-2*border,256-2*border) ones(256-2*border,border);ones(border,256)];
E=D.*mask;
F=ifft2(ifftshift(E));
G=exp(abs(F));
maxx=max(max(G));
maxx=255/maxx;
G=G.*maxx;
figure
imshow(A)
figure
imshow(uint8(G))