Properties of the Fourier transform#
Objectives#
manipulate the functions
fft2
andfftshift
display adequately the magnitude of the Fourier transform to see the details
observe the effect of a some properties of the Fourier transform (contraction-dilation, rotation, translation)
Some remarks#
After computing the Fourier transform with
numpy.fft.fft2
, use the functionnumpy.fft.fftshift
to shift the zero frequencies at the centre of the image.The Fourier transform being complex, its display is not straightforward: so one need to show its magnitude (
numpy.absolute
) and argument (numpy.angle
).
Results#
This exercise highlights some properties of the Fourier transform.
The images
s1
ands2
show that a “contraction” in the spatial domain (the bands froms1
tos2
get closer and narrower) results in “dilation” in the frequency domain (the points diverge, even if the pattern remains overall the same, whether on the magnitude and the argument).A rotation in the spatial domain results in an identical rotation in the frequency domain (
s3
is a rotation of 90 ° ofs2
).A spatial shift implies a modification on the argument (but not on the magnitude), hence the name of phase shift (the white square of the images
s4
ands5
has been translated).