scipy.ndimage.
fourier_shift#
- scipy.ndimage.fourier_shift(input, shift, n=-1, axis=-1, output=None)[source]#
- 多维傅里叶位移滤波器。 - 数组乘以位移操作的傅里叶变换。 - 参数:
- 返回值:
- fourier_shiftndarray
- 已位移的输入。 
 
 - 示例 - >>> from scipy import ndimage, datasets >>> import matplotlib.pyplot as plt >>> import numpy.fft >>> fig, (ax1, ax2) = plt.subplots(1, 2) >>> plt.gray() # show the filtered result in grayscale >>> ascent = datasets.ascent() >>> input_ = numpy.fft.fft2(ascent) >>> result = ndimage.fourier_shift(input_, shift=200) >>> result = numpy.fft.ifft2(result) >>> ax1.imshow(ascent) >>> ax2.imshow(result.real) # the imaginary part is an artifact >>> plt.show() 