Suppose, I have this image in my hand and nothing else. Clearly, this is a Magnitude-plot of some unknown image.
Is it possible to apply an Inverse Fast Fourier Transform (I-FFT) operation to recover the original Grayscale image from this image?
N.B. For more information and actual C# source code, please follow this link.
Answer
Suppose, I have this image in my hand and nothing else. Clearly, this is a Magnitude-plot of some unknown image.
Sounds like you're losing the phase information in the signal; you only have the pixel values, correct?
Is it possible to apply an Inverse Fast Fourier Transform (I-FFT) operation to recover the original Grayscale image from this image?
The important information in images tends to edges -- edges contain most detail in the image. This information is carried in the phase information -- when decomposed into sinusoidal signals, a square wave can have arbitrary location only if the waves contain phase information.
Additionally, real world images tend to look roughly the same in the frequency spectrum when only plotting magnitude. These images tend to have a large (in magnitude) low frequency components with (much) smaller high frequency components. It's reasonable to say that a significant portion of the entropy (or information) is carried in the phase information.
With a naïve inverse Fourier transform on the values obtained from the image, it is not possible (at least by experiment) to recover the original signal. However, the phase only inverse Fourier transform (where we divide by the magnitude to only preserve the phase).
The data behind the image was generated with
x = rgb2gray(astronaut())
X = fft2(x)
X_mag = np.abs(X) # magnitude only
X_pha = X / (np.abs(X)) # phase only
y_mag = ifft2(X_mag) # both y_mag and y_pha have max(y.imag) < 1e-15
y_pha = ifft2(X_pha) # (some Fourier transform theory here + floating point precision)
No comments:
Post a Comment