Created
May 31, 2017 06:26
-
-
Save RodolfoFerro/5f0124d6babeec8cac9a7bb2e8537c2f to your computer and use it in GitHub Desktop.
2D - DFT: 2D - Discrete Fourier Transform
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
# 2 Dimension Fourier Transform: | |
def FT_2D(X): | |
m, n = X.shape | |
return np.array([ [ sum([ sum([ X[i,j]*np.exp(-1j*2*np.pi*(k_m*i/m + k_n*j/n)) for i in range(m) ]) for j in range(n) ]) for k_n in range(n) ] for k_m in range(m) ]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can you provide the full code that takes an image as an input, please?