Undo np.fft.fft2 to get the original image
问题 I've just started to learn about images frecuency domain. I have this function: def fourier_transform(img): f = np.fft.fft2(img) fshift = np.fft.fftshift(f) magnitude_spectrum = 20*np.log(np.abs(fshift)) return magnitude_spectrum And I want to implement this function: def inverse_fourier_transform(magnitude_spectrum): return img But I don't know how. My idea is to use magnitude_spectrum to get the original img . How can I do it? 回答1: You are loosing phases here: np.abs(fshift) . np.abs takes