10 Image Processing II

Embed Size (px)

Citation preview

  • 8/6/2019 10 Image Processing II

    1/18

    10/19/20

    1

    ENGG 167

    MEDICAL IMAGING

    Lecture 10: Oct. 13

    Image Processing II

    Frequency Domain & Transform Processing

    References: Chapter 10, The Essential Physics of Medical Imaging, Bushberg

    Radiation Detection and Measurement, Knoll, 2nd ed.

    Intermediate Physics for Medicine and Biology, Hobbie, 3rd ed.

    Principles of Computerized Tomographic Imaging, Kak and Slaney.

    (http://rvl4.ecn.purdue.edu/~malcolm/pct/pct-toc.html)

    2

    Preparation -

    Review Imaging Processing Toolbox Help Manual(on your computer)

    Download NIHImage (Mac) / ImageJ (Windows)Create a Macro which will analyze images and save a

    processed version of the images

    (http://rsbweb.nih.gov/ij/developer/macro/macros.html)

    Complete Image Processing Assignment

  • 8/6/2019 10 Image Processing II

    2/18

    10/19/20

    3

    The Fourier Theorum

    Ref: Gonzalez et al, Text

    All signals can be decomposed into pure sinusoidal signals

    +

    +

    +

    =

    4

    The Fourier transform

    Ref: Gonzalez et al, Text

    Spatial signalCorresponding

    Frequency-domain signal

    All signals can be decomposed into pure sinusoidal signals

    This theorum is especially appropriate for periodic signals, but

    can be used for discrete signals if enough frequencies are used

    to capture the relevant information.

  • 8/6/2019 10 Image Processing II

    3/18

    10/19/20

    5

    1) Basics 1-dimensional sinusoidal representation of signals

    Ref: Rizzoni

    Where magnitude and phase of the coefficients are given by:

    or:

    6

    1) Basics complex numbers

    Sinusoids are related to complex exponential expressions.

    A complex number is one which is of the form:

    z = a + ib, where I is the square root of -1, an imaginary number

    Recall that the magnitude and phase of z can be calculated by:

    magnitude => I = [a2 + b2]

    phase => = tan-1(b/a)

    So that another way to express z is :

    z = I ei

    Now, we can make use of a definition called Eulers formula:

    ei = cos() + i sin()And

    e-i = cos() - i sin()

    Or written for the sinusoid signals:

    cos() = [ei + e-i]/2 and sin() = [ei - e-i]/(2i)

  • 8/6/2019 10 Image Processing II

    4/18

    10/19/20

    7

    1) Basics complex numbers

    So that equivalent expressions for a time domain signal are :

    x(t) = an cos(nt) + bn sin (nt)

    where an and bn are the magnitudes of the signal at each frequency n, and the summationis carried out over all values of n.

    x(t) = In exp(int+n)

    where In and n are the amplitude and phase at each frequency n.

    8

    1) Basics fourier transform of a signal

    X() = x(tn) exp(-itn)

    where the signal X() is now in the frequency domain (recall=2f = 2/T), whereas theoriginal signal x(t) was a time resolved signal with N total data points. Summation is from

    n=1 to n=N.

    Alternatively a spatial data set can be transformed to spatial frequency data set by the same

    approach:

    F(k) = f(xn) exp(-i 2kxn)

    where the signal F(k) is now in spatial frequency, k, and describes the exact discritized

    shape of the original signal f(xn).

    1

    N

    1

    N

  • 8/6/2019 10 Image Processing II

    5/18

    10/19/20

    9

    1) Basics 1-D Fourier Transforms f(x) F(kx)

    Ref: Rizzoni

    Input analytic function Fourier Transformed function

    10

    Fourier Transform Summary

    Ref: Gonzalez et al, Text

  • 8/6/2019 10 Image Processing II

    6/18

    10/19/20

    11

    Fourier Transform Summary

    Ref: Gonzalez et al, Text

    12

    Fourier Transform Summary

    Ref: Gonzalez et al, Text

  • 8/6/2019 10 Image Processing II

    7/18

    10/19/20

    13

    Fourier Transform Summary

    Ref: Gonzalez et al, Text

    14

    2D Fourier Transforms

    Where is the information in (u,v) space?

    Where are the low frequencies?

    Where are the high frequencies?Ref: Gonzalez et al, Text

  • 8/6/2019 10 Image Processing II

    8/18

    10/19/20

    15

    The Fourier space image (k-space)

    Lowest frequency

    Ref: Gonzalez et al, Text

    Highest positive

    kx frequency

    Highest negative

    kx frequency

    Highest positive

    ky frequency

    Highest negative

    ky frequency

    16

    Fourier space filtering

    Spatial frequency changes in the Fourier domain are simply done

    with linear mathematics!

    Ref: Gonzalez et al, Text

  • 8/6/2019 10 Image Processing II

    9/18

    10/19/20

    17

    Fourier space filtering

    Spatial frequency changes in the Fourier domain are simply done

    with linear mathematics!

    Edge enhancement example (what is the shape of this filter)

    Ref: Gonzalez et al, Text

    18

    Fourier space filtering

    Ref: Gonzalez et al, Text

  • 8/6/2019 10 Image Processing II

    10/18

    10/19/20

    19

    Try the online DEMO

    http://micro.magnet.fsu.edu/primer/java/digitalimaging/processing/fouriertransform/

    20

    Fourier space filtering

    Ref: Gonzalez et al, Text

  • 8/6/2019 10 Image Processing II

    11/18

    10/19/20

    21

    Special filters Butterworth & Gaussian

    Ref: Gonzalez et al, Text

    22

    Special filters Butterworth & Gaussian

    Ref: Gonzalez et al, Text

  • 8/6/2019 10 Image Processing II

    12/18

    10/19/20

    23

    Special filters Butterworth & Gaussian

    Ref: Gonzalez et al, Text

    24

    Noise

    Ref: Gonzalez et al, Text

  • 8/6/2019 10 Image Processing II

    13/18

    10/19/20

    25

    Noise

    Ref: Gonzalez et al, Text

    26

    Noise: simple linear filtering can help

    Ref: Gonzalez et al, Text

  • 8/6/2019 10 Image Processing II

    14/18

    10/19/20

    27

    Noise: frequency domain filtering

    Ref: Gonzalez et al, Text

    28

    Noise: frequency domain filtering

    Ref: Gonzalez et al, Text

  • 8/6/2019 10 Image Processing II

    15/18

    10/19/20

    29

    Online resources for more info about image processing

    http://micro.magnet.fsu.edu/primer/digitalimaging/imageprocessingintro.html

    30

    Geometric Linear Transformations

    Ref: Gonzalez et al, Text

    Affine transform

  • 8/6/2019 10 Image Processing II

    16/18

    10/19/20

    31

    Geometric Linear Transformations

    Ref: Gonzalez et al, Text

    Affine transform

    32

    Image compression : changing the binary

    code used to reduce # of bits required

    Ref: Gonzalez et al, Text

    Use fewer bits to encode

    Information that occurs a lot and

    then use more bits to encode

    information that occurs little in

    the image

    p(r) is the probability of

    occurrence

    I2 is a more efficient coding of

    the bits than I1

  • 8/6/2019 10 Image Processing II

    17/18

    10/19/20

    33

    Lossy Image compression :transforms to fewer bits across the entire image

    Ref: Gonzalez et al, Text

    8 bits 4 bits

    2 bits

    34

    Minimum Lossy Image compression :

    bit reduction at the local level, not globally!

    Ref: Gonzalez et al, Text

  • 8/6/2019 10 Image Processing II

    18/18

    10/19/20

    35

    Minimum Lossy Image compression :bit reduction at the local level, not globally!

    Ref: Gonzalez et al, Text

    36

    Minimum Lossy Image compression :

    bit reduction at the local level, 8x8 blocks -JPEG

    Ref: Gonzalez et al, Text

    predicted

    error

    compressed

    image

    close up

    view