Dip 3
Dip 3
15CS753
MODULE-3
Image Enhancement In The Frequency Domain
• Module – 3 8 Hours
• Image Enhancement In Frequency Domain:
• Introduction,
• Fourier Transform,
• Discrete Fourier Transform (DFT),
• properties of DFT,
• Discrete Cosine Transform (DCT),
• Image filtering in frequency domain..
2
Image Enhancement In The Frequency Domain
• Introduction
• These are proposed by French mathematician Joseph Fourier
• His contribution basically states that, any periodic function can be
expressed as sum of sines and/or cosines of different frequencies
each multiplied by a different coefficient
• This sum is termed as Fourier series.
• Irrespective of how complicated the function is, if it is periodic
and if it satisfies some mathematical conditions, it can be
represented by such a sum
• The functions which are not periodic but whose area under the
curve is finite can be expressed as integral of sines and/or cosines
multiplied by the weighting function.
• This is called as Fourier Transform and is more widely used than
Fourier series
3
Image Enhancement In The Frequency Domain
• The important characteristic of both F.S. and F.T. is that a function
expressed either in F.S. or F.T. can be reconstructed ( recovered)
via a reverse process with no loss of information
• This allows us to work in Fourier domain and then return to the
original domain without loss of information
• Since we are dealing with images which are functions of finite
duration, we will be using Fourier Transform as a tool
• Basic concepts:
• A complex number is defined as C= R+jI
• Where R and I are real numbers and i is imaginary number equal
to square root of -1.
• .
4
Image Enhancement In The Frequency Domain
• Polar representation of complex numbers
• .
5
Image Enhancement In The Spatial Domain
• Fourier Series
• We know that, a function f(t) of a continuous variable t, periodic with
period T can be expresses as sum of sines and cosines multiplied by
appropriate coefficients
• This sum known as Fourier series can be formulated as
• .
• . ……. (1)
• Where the coefficients are
• (2)
Image Enhancement In The Frequency Domain
• Impulses and their Sifting:
• Before studying the Fourier Transforms we need to learn about
impulses and their sifting property
• A unit impulse of a continuous variable t located at t=0 denoted
δ(t) is defined by
• ….3-a.
• ….3.b
• This means that, at time t, impulse can be viewed as a spike of
infinite amplitude and zero duration having unit area
Image Enhancement In The Frequency Domain
• An impulse has the sifting property w.r.t. integration
• …(4)
• .provided that f(t) is continuous at t=0
• Sifting yields the value of the function f(t), at the location of the
impulse. ( previous equation, at t=0)
• A more general statement of the sifting property involves the
impusle located at an arbitrary point t0, denoted by δ(t-t0).
• Now sifting property results in
…..(5)
• ….(9)
• ….(10)
• Where μ is also a continuous variable
• Though we see two variables t and μ, since t gets integrated out,
we can see that F.T. is a function of only one variable
• For simplicity let us denote F.T. as Ƒ{f(t)} = F(μ)
• Thus Fourier transform of f(t) is given by
• …..(11)
Image Enhancement In The Frequency Domain
• Suppose if we are given with F(μ) we can get back f(t) by using
inverse Fourier Transform
• i.e.
• … (12)
• (2)
Image Enhancement In The Frequency Domain
• Fourier transforms of a function with one variable
• Given single variable continuous function f(t) of a continuous
variable t
• Fourier transform F(u) is given by
• ….(10)
• Where μ is also a continuous variable
• Though we see two variables t and μ, since t gets integrated out,
we can see that F.T. is a function of only one variable
• For simplicity let us denote F.T. as Ƒ{f(t)} = F(μ)
• Thus Fourier transform of f(t) is given by
• …..(11)
Image Enhancement In The Frequency Domain
• Suppose if we are given with F(μ) we can get back f(t) by using
inverse Fourier Transform
• i.e.
• … (12)
• … (13)
Image Enhancement In The Frequency Domain
• Computing Fourier transform
• Consider the function shown below
• Using the equation (11) we can write the
• where the – sign indicates the flipping which was done in filtering
• t is the displacement needed to slide one function past the other,
and
• τ is a dummy variable that is integrated out.
• We assume for that the functions extend from -∞ to ∞.
• We have seen the basic mechanics of convolution in module 2,
• At the moment, we are interested in finding the Fourier transform
of Eq (14)
Image Enhancement In The Frequency Domain
• We start with equation
• The term inside the brackets is the Fourier transform of h(t - τ).
• We see later that F{h(t - τ)} = H(μ)e-j2πμτ, where H(μ) is the
Fourier transform of h(t).
• Using this fact in the preceding equation gives us
Image Enhancement In The Frequency Domain
•
• …..(2)
Image Enhancement In The Frequency Domain
• Where S(μ) is the Fourier transform of impulse train and is given
by
~
• The transform F (μ) of the sampled function is given below
• In this case the sampling rate chosen was below minimum required
to maintain distinct copies of F(μ) and thus has failed to preserve
F(μ).
Image Enhancement In The Frequency Domain
• These three cases are known as over-sampling, critically sampling
and under-sampling
• How to choose sampling rate?? - Sampling theorem answers this
• A function f(t) whose Fourier transform is zero for values of
frequencies outside a finite interval (band) [-μmax, μmax] about the
origin is called a band-limited function.
• Figure below is such a function.
• (1)
• By substituting , we get
•
Image Enhancement In The Frequency Domain
• (2)
•
Image Enhancement In The Frequency Domain
• The last step is obtained from the result
~
• We know that, though fn is a discrete function, its Fourier F (μ) is
continuous and infinitely periodic with period 1/ ΔT
~
• Therefore, we need to characterize F (μ) is for one period, and
sampling one period is the basis for the DFT.
~
• Suppose that we want to obtain M equally spaced samples of F (μ)
taken over the period μ = 0 to μ = 1/ ΔT.
• This is accomplished by taking the samples at the following
frequencies:
• (3)
Image Enhancement In The Frequency Domain
• Substituting this result in equation (2) we get
• (4)
• and
• (7)
• (10)
• (11-a)
• (11-b)
Image Enhancement In The Frequency Domain
• Similar to 1-D, the 2-D impulse also exhibits the sifting property
under integration,
• i.e.
• (12)
• We can see that the sifting property yields the value of the function
f(t, z) at the location of the impulse
• For discrete variables x and y, the 2-D discrete impulse is defined
as
Image Enhancement In The Frequency Domain
• Sifting property for discrete impulse is defined by
• (13)
• (14)
• Here also the sifting property of a discrete impulse yields the value
of the discrete function f(x, y) at the location of the impulse
Image Enhancement In The Frequency Domain
• The 2-D Continuous Fourier Transform Pair
• Let f(t, z) be a continuous function of two continuous variables, t
and z.
• The two-dimensional, continuous Fourier transform pair is given
by the expressions
• (15)
• and
• (16)
• where μ and v are the frequency variables.
• When referring to images, t and z are interpreted to be continuous
spatial variables.
• The variables μ and v belong to the continuous frequency domain
Image Enhancement In The Frequency Domain
• Two-Dimensional Sampling and the 2-D Sampling Theorem
• Sampling in two dimensions can be modeled using the sampling
function (2-D impulse train):
• (17)
• where ΔT and ΔZ are the separations between samples along the t-
and z-axis of the continuous function f(t, z).
• Equation (17) describes a set of periodic impulses extending
infinitely along the two axes
• and
• i.e. no information is lost if a 2-D, band-limited, continuous
function is represented by samples acquired at rates greater than
twice the highest frequency content of the function in both the
wand v-directions.
Image Enhancement In The Frequency Domain
• The 2-D Discrete Fourier Transform and Its Inverse
• 2-D discrete Fourier transform (DFT) is given by the equation
• Thus multiplying f(x) by (-1)x shifts the data so that F(0) is at the
center of the interval [0, M - 1], which corresponds to Fig. (b), as
desired
Image Enhancement In The Frequency Domain
• Basics of filtering in frequency domain
• The equations for discrete DFT and IDFT are as below
• Is image blurred??
• But blurring is not uniform
• Vertical edges are not blurred.
• If we apply padding suitably then??.
Image Enhancement In The Frequency Domain
• Various D0 values taken are 10, 30, 60, 160 and 460 pixels
Image Enhancement In The Frequency Domain
• .
Image Enhancement In The Frequency Domain
• These circles enclose α percent of image power for α =87.0, 93.1,
95.7, 97.8 and 99.2 % respectively
• Now let us apply this ILPF to the image of test pattern with the
above mentioned radii