+ All Categories
Home > Documents > Chap4 Frequency Domain

Chap4 Frequency Domain

Date post: 04-Apr-2018
Category:
Upload: umerahmed300
View: 236 times
Download: 0 times
Share this document with a friend

of 47

Transcript
  • 7/30/2019 Chap4 Frequency Domain

    1/47

    Chapter 4:

    Frequency Domain Processing

    Image Transformations

    1

  • 7/30/2019 Chap4 Frequency Domain

    2/47

  • 7/30/2019 Chap4 Frequency Domain

    3/47

    Introduction

    Although we discuss other transforms in some

    detail in this chapter, we emphasize the Fourier

    transform because of its wide range of

    applications in image processing problems.

    3

  • 7/30/2019 Chap4 Frequency Domain

    4/47

    Fourier Transform (1-D)

    uXuXsin

    AXuF

    euXsinu

    Adxux2jexpxfuF uXj

    4

  • 7/30/2019 Chap4 Frequency Domain

    5/47

    Fourier Transform (2-D)

    vYvYsin

    uX

    uXsinAXYv,uFdydxvyux2jexpy,xf)v,u(F

    5

  • 7/30/2019 Chap4 Frequency Domain

    6/47

    Discrete Fourier Transform

    In the two-variable case the discrete Fourier transform pair is

    6

  • 7/30/2019 Chap4 Frequency Domain

    7/47

    Discrete Fourier Transform

    When images are sampled in a squared array, i.e. M=N,

    we can write

    7

  • 7/30/2019 Chap4 Frequency Domain

    8/47

    Discrete

    Fourier

    Transform

    Examples

    At all of theseexamples, the Fourier

    spectrum is shifted

    from top left corner to

    the center of the

    frequency square.

    8

  • 7/30/2019 Chap4 Frequency Domain

    9/47

    Discrete

    Fourier

    Transform

    Examples

    At all of theseexamples, the Fourier

    spectrum is shifted

    from top left corner to

    the center of the

    frequency square.

    9

  • 7/30/2019 Chap4 Frequency Domain

    10/47

    Discrete

    Fourier

    Transform

    Display

    At all of theseexamples, the Fourier

    spectrum is shifted

    from top left corner to

    the center of the

    frequency square.

    10

  • 7/30/2019 Chap4 Frequency Domain

    11/47

    Discrete Fourier Transform

    Example

    Main Image (Gray Level) DFT of Main image

    (Fourier spectrum)

    Logarithmic scaled

    of the Fourier spectrum

    11

  • 7/30/2019 Chap4 Frequency Domain

    12/47

    Discrete Fourier Transform

    (Properties)

    Separability

    1N

    0v

    1N

    0u

    1N

    0y

    1N

    0x

    N/vy2jexpv,uFN/ux2jexpN

    1y,xf

    N/vy2jexpy,xfN/ux2jexpN

    1v,uF

    The discrete Fourier transform pair can be expressed in the seperable forms:

    12

  • 7/30/2019 Chap4 Frequency Domain

    13/47

    Discrete Fourier Transform

    (Properties)

    Translation

    N/vyux2jexpv,uFyy,xxfand

    vv,uuFN/yvxu2jexpy,xf

    0000

    0000

    The translation properties of the

    Fourier transform pair are :

    13

  • 7/30/2019 Chap4 Frequency Domain

    14/47

    Discrete Fourier Transform

    (Properties)

    Periodicity

    The discrete Fourier transform and its

    inverse areperiodic with period N; that is,

    F(u,v)=F(u+N,v)=F(u,v+N)=F(u+N,v+N)

    If f(x,y) is real, the Fourier transform also

    exhibits conjugate symmetry:

    F(u,v)=F*(-u,-v)

    Or, more interestingly:

    |F(u,v)|=|F(-u,-v)|

    14

  • 7/30/2019 Chap4 Frequency Domain

    15/47

    Discrete Fourier Transform

    (Properties)

    Rotation

    sinvcosu

    sinrycosrx

    If we introduce the polar coordinates

    Then we can write:

    00 ,F,rf

    In other words, rotating F(u,v)

    rotates f(x,y) by the same angle.

    15

  • 7/30/2019 Chap4 Frequency Domain

    16/47

    Discrete Fourier Transform

    (Properties)

    Convolution

    v,uG*v,uFy,xgy,xfand

    v,uGv,uF)y,x(g*y,xf

    The convolution theorem in

    two dimensions is expressed

    by the relations :

    Note :

    ddy,xg,fy,xg*y,xf

    16

  • 7/30/2019 Chap4 Frequency Domain

    17/47

    Discrete Fourier Transform

    (Properties)

    Correlation

    dxgfxgxf

    *

    The correlation of two continuous

    functions f(x) and g(x) is defined

    by the relation

    So we can write:

    v,uGv,uFy,xgy,xf

    and

    v,uGv,uFy,xgy,xf

    *

    *

    17

  • 7/30/2019 Chap4 Frequency Domain

    18/47

    Discrete

    Fourier

    Transform

    Sampling

    (Properties)

    1-D

    f(x) : a given function

    F(u): Fourier Transform of f(x)

    which is band-limited

    s(x) : sampling function

    S(u): Fourier Transform of s(x)

    G(u): window for recovery of the

    main function F(u) and f(x).

    Recovered f(x) from sampled data

    18

  • 7/30/2019 Chap4 Frequency Domain

    19/47

    Discrete

    Fourier

    Transform

    Sampling

    0000 y,xfdydxyy,xxy,xf

    (Properties)

    2-D

    The sampling process for 2-Dfunctions can be formulated

    mathematically by making use

    of the 2-D impulse function

    (x,y), which is defined as

    A 2-D sampling function is

    consisted of a train of impulses

    separated x units in the x

    direction and y units in the y

    direction as shown in the figure.

    19

  • 7/30/2019 Chap4 Frequency Domain

    20/47

    Discrete

    Fourier

    Transform

    Sampling

    0

    1

    v,uG

    (Properties)

    2-D

    If f(x,y) is band limited (that is, its

    Fourier transform vanishes outsidesome finite region R) the result of

    covolving S(u,v) and F(u,v) might

    look like the case in the case shown

    in the figure. The function shown is

    periodic in two dimensions.

    (u,v) inside one of the rectangles

    enclosing R

    elsewhere

    The inverse Fourier transform of

    G(u,v)[S(u,v)*F(u,v)] yields f(x,y).

    20

  • 7/30/2019 Chap4 Frequency Domain

    21/47

    The Fast Fourier Transform (FFT) Algorithm21

  • 7/30/2019 Chap4 Frequency Domain

    22/47

    Other Seperable Image Transforms

    AFAT

    BTBF

    AB

    BAFABBTB

    1

    1N

    0x

    1N

    0y

    v,u,y,xgy,xfv,uT

    Where F is the NN image matrix,

    A is an NN symmetric transformation matrix

    T is the resulting N

    N transform.

    If the kernel g(x,y,u,v) is seperable and symmetric,

    also may be expressed in matrix form:

    And for inverse transform we have:

    22

  • 7/30/2019 Chap4 Frequency Domain

    23/47

    Discrete Cosine Transform23

  • 7/30/2019 Chap4 Frequency Domain

    24/47

    Discrete Cosine Transform (DCT)

    Each block consists

    of 44 elements,

    corresponding to x

    and y varying from 0to 3. The highest

    value is shown in

    white. Other values

    are shown in grays,

    with darker meaning

    smaller.

    24

  • 7/30/2019 Chap4 Frequency Domain

    25/47

    Discrete Cosine Transform

    Example

    Main Image (Gray Level) DCT of Main image

    (Cosine spectrum)

    Logarithmic scaled

    of the Cosine spectrum

    25

  • 7/30/2019 Chap4 Frequency Domain

    26/47

    DCT and Fourier Transform26

  • 7/30/2019 Chap4 Frequency Domain

    27/47

    DCT Example27

  • 7/30/2019 Chap4 Frequency Domain

    28/47

    Blockwise DCT Example28

  • 7/30/2019 Chap4 Frequency Domain

    29/47

    Comparison Of Various Transforms29

  • 7/30/2019 Chap4 Frequency Domain

    30/47

    Comparison Of Various Transforms30

  • 7/30/2019 Chap4 Frequency Domain

    31/47

    The DFT and Image Processing

    To filter an image in the frequency domain:1. Compute F(u,v) the DFT of the image

    2. Multiply F(u,v) by a filter functionH(u,v)

    3. Compute the inverse DFT of the result

    ImagestakenfromGonzalez&Woods,DigitalImageProcessing(2002)

    32

  • 7/30/2019 Chap4 Frequency Domain

    32/47

    Some Basic Frequency Domain Filters

    ImagestakenfromGonzalez&Woods,DigitalImageProcessing(2002) Low Pass Filter

    High Pass Filter

  • 7/30/2019 Chap4 Frequency Domain

    33/47

    Smoothing Frequency Domain Filters

    Smoothing is achieved in the frequency domain by

    dropping out the high frequency components

    The basic model for filtering is:

    G(u,v) = H(u,v)F(u,v)where F(u,v) is the Fourier transform of the imagebeing filtered andH(u,v) is the filter transformfunction

    Low pass filters only pass the low frequencies,drop the high ones

  • 7/30/2019 Chap4 Frequency Domain

    34/47

    Ideal Low Pass Filter

    Simply cut off all high frequency components thatare a specified distance D0 from the origin of the

    transform

    changing the distance changes the behaviour of

    the filter

    ImagestakenfromGonzalez&Woods,DigitalImageProcessing(2002)

  • 7/30/2019 Chap4 Frequency Domain

    35/47

    Ideal Low Pass Filter (cont)

    The transfer function for the ideal low pass filter

    can be given as:

    whereD(u,v) is given as:

    0

    0

    ),(if0

    ),(if1

    ),( DvuD

    DvuD

    vuH

    2/122 ])2/()2/[(),( NvMuvuD

  • 7/30/2019 Chap4 Frequency Domain

    36/47

    Ideal Low Pass Filter (cont)

    Above we show an image, its Fourier spectrum

    and a series of ideal low pass filters of radius 5,

    15, 30, 80 and 230 superimposed on top of it

    ImagestakenfromGonzalez&Woods,DigitalImageProcessing(2002)

  • 7/30/2019 Chap4 Frequency Domain

    37/47

    Ideal Low Pass Filter (cont)

    ImagestakenfromGonzalez&Woods,DigitalImageProcessing(2002)

    Original

    image

    Result of filtering

    with ideal low pass

    filter of radius 5

    Result of filtering

    with ideal low pass

    filter of radius 30

    Result of filtering

    with ideal low pass

    filter of radius 230

    Result of filtering

    with ideal low pass

    filter of radius 80

    Result of filtering

    with ideal low pass

    filter of radius 15

  • 7/30/2019 Chap4 Frequency Domain

    38/47

    Gaussian Lowpass Filters

    The transfer function of a Gaussian lowpass

    filter is defined as:

    ImagestakenfromGonzalez&Woods,DigitalImageProcessing(2002)

    20

    2 2/),(

    ),(

    DvuDevuH

  • 7/30/2019 Chap4 Frequency Domain

    39/47

    Gaussian Lowpass Filters (cont)

    ImagestakenfromGonzalez&Woods,DigitalImageProcessing(2002)

    Original

    image

    Result of filtering

    with Gaussian

    filter with cutoff

    radius 5

    Result of filtering

    with Gaussian filter

    with cutoff radius 30

    Result of filtering

    with Gaussian

    filter with cutoff

    radius 230

    Result of

    filtering with

    Gaussian filter

    with cutoff

    radius 85

    Result of filtering

    with Gaussian

    filter with cutoff

    radius 15

  • 7/30/2019 Chap4 Frequency Domain

    40/47

    Lowpass Filtering Examples

    A low pass Gaussian filter is used to connect

    broken text

    ImagestakenfromGonzalez&Woods,Digital

    ImageProcessing(2002)

  • 7/30/2019 Chap4 Frequency Domain

    41/47

    Sharpening in the Frequency Domain

    Edges and fine detail in images are associated

    with high frequency components

    High pass filters only pass the high

    frequencies, drop the low ones

    High pass frequencies are precisely the reverse

    of low pass filters, so:

    Hhp(u, v) = 1Hlp(u, v)

  • 7/30/2019 Chap4 Frequency Domain

    42/47

    Ideal High Pass Filters

    The ideal high pass filter is given as:

    where D0 is the cut off distance as before

    0

    0

    ),(if1

    ),(if0),(

    DvuD

    DvuDvuH

    ImagestakenfromGonzalez&Woods,Digital

    ImageProcessing(2002)

  • 7/30/2019 Chap4 Frequency Domain

    43/47

    Ideal High Pass Filters (cont)

    Results of ideal

    high pass filtering

    withD0 = 15

    Results of ideal

    high pass filtering

    withD0 = 30

    Results of ideal

    high pass filtering

    withD0 = 80

    ImagestakenfromGonzalez&Woods,Digital

    ImageProcessing(2002)

  • 7/30/2019 Chap4 Frequency Domain

    44/47

    Gaussian High Pass Filters

    The Gaussian high pass filter is given as:

    whereD0 is the cut off distance as before

    20

    2 2/),(1),(

    DvuDevuH

    ImagestakenfromGonzalez&Woods,Digital

    ImageProcessing(2002)

  • 7/30/2019 Chap4 Frequency Domain

    45/47

    Fast Fourier Transform

    The reason that Fourier based techniques have

    become so popular is the development of the

    Fast Fourier Transform (FFT) algorithm

    Allows the Fourier transform to be carried out in

    a reasonable amount of time

    Reduces the amount of time required to

    perform a Fourier transform by a factor of 100

    600 times!

  • 7/30/2019 Chap4 Frequency Domain

    46/47

    Frequency Domain Filtering & Spatial Domain

    Filtering

    Similar jobs can be done in the spatial and

    frequency domains

    Filtering in the spatial domain can be easier to

    understand

    Filtering in the frequency domain can be much

    faster especially for large images

  • 7/30/2019 Chap4 Frequency Domain

    47/47

    References

    Digital image processing by Rafael C.

    Gonzalez and Richard E. Woods

    Digital image processing by Jain

    Image communication I by Bernd Girod

    Lecture 3, DCS339/AMCM053 by Pengwei

    Hao, University of London

    47


Recommended