Image Processing Reference
In-Depth Information
| F [ p ( t - τ )]| = | e - j ωτ P (ω )| = | e - j ωτ | | P (ω )| = | P (ω )| (2.30)
and since the magnitude of the exponential function is 1.0 then the magnitude of the
Fourier transform of the shifted image equals that of the original (unshifted) version. We
shall use this property later in Chapter 7 when we use Fourier theory to describe shapes.
There, it will allow us to give the same description to different instances of the same shape,
but a different description to a different shape. You do not get something for nothing: even
though the magnitude of the Fourier transform remains constant, its phase does not. The
phase of the shifted transform is:
)] = 〈 e - j ωτ
F [ p ( t - τ
P (ω )
(2.31)
The Mathcad implementation of a shift operator, Code 2.3 , uses the modulus operation
to enforce the cyclic shift. The arguments fed to the function are: the image to be shifted
( pic ), the horizontal shift along the x axis ( x_val ), and the vertical shift down the y axis
( y_val ).
shift(pic,y_val,x_val):= NC cols(pic)
NR rows(pic)
for y 0..NR-1
for x 0..NC-1
shifted y,x
pic mod(y+y_val, NR),mod(x+x_val,NC)
shifted
Code 2.3
Shifting an image
This process is illustrated in Figure 2.18 . An original image, Figure 2.18 (a), is shifted
by 30 pixels along the x and the y axes, Figure 2.18 (d). The shift is cyclical, so parts of the
image wrap around; those parts at the top of the original image appear at the base of the
shifted image. The Fourier transform of the original image and the shifted image are
identical: Figure 2.18 (b) appears the same as Figure 2.18 (e). The phase differs: the phase
of the original image, Figure 2.18 (c), is clearly different from the phase of the shifted
image, Figure 2.18 (f).
The differing phase implies that, in application, the magnitude of the Fourier transform
of a face, say, will be the same irrespective of the position of the face in the image (i.e. the
camera or the subject can move up and down), assuming that the face is much larger than
its image version. This implies that if the Fourier transform is used to analyse an image of
a human face, to describe it by its spatial frequency, then we do not need to control the
position of the camera, or the face, precisely.
2.6.2
Rotation
The Fourier transform of an image rotates when the source image rotates . This is to be
expected since the decomposition into spatial frequency reflects the orientation of features
within the image. As such, orientation dependency is built into the Fourier transform
process.
Search WWH ::




Custom Search