function z = fftview(I) FI = fft2(I); FI = fftshift(FI); FI = log(abs(FI)); FI = mat2gray(FI); figure imshow(FI) figure plot(max(FI)); z = FI;