Created
February 25, 2017 18:31
-
-
Save VladimirGl/a5c64e32caa2a501895ed1db6e2d52d2 to your computer and use it in GitHub Desktop.
phase+mag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
F_mag = np.fft.fft2(im_magnutide[:,:,0]) | |
F_ph = np.fft.fft2(im_phase) | |
mag = np.absolute(F_mag) | |
phase = np.arctan2(F_ph.imag, F_ph.real) | |
re = np.multiply(mag, np.cos(phase)) | |
im = np.multiply(mag, np.sin(phase)) | |
res = re + 1j * im | |
res = np.fft.ifft2(res).real | |
plt.imshow(res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment