Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I found the answer on my own, just for those who maybe have the same problem:

x=im.shape[0]
y=im.shape[1]
fft =  np.fft.fft2(im)
fshift = np.fft.fftshift(fft)
#the frequencies will be shifted to the center:
fshx=np.fft.fftshift(np.fft.fftfreq((fft.shape[0])))
fshy=np.fft.fftshift(np.fft.fftfreq((fft.shape[1])))
for i in xrange(x):
     for j in xrange(y):
         fre = np.sqrt(fshx[i]**2 + fshy[j]**2)

it works for me as I expected, hope its correct :P