11 Gehring

Embed Size (px)

Citation preview

  • 8/13/2019 11 Gehring

    1/19

    Fourier Transformsand Their Use in

    Data Compression

    By Joseph Gehring

  • 8/13/2019 11 Gehring

    2/19

    What is a Fourier Transform?

    From Simple Wikipedia:

    AFourier transformis a math

    function that makes a sometimes lessuseful function into another more

    useful function.

    A Fourier transform really just showsyou what frequencies are in a signal.

  • 8/13/2019 11 Gehring

    3/19

    The Math

    The Fourier Transform is a generalization of

    the Fourier Series

    Any periodic function can be represented as

    an infinite sum of sines and cosines

  • 8/13/2019 11 Gehring

    4/19

    Fourier Series

  • 8/13/2019 11 Gehring

    5/19

    Fourier Transform

    Forward

    Inverse

    Symmetric Linear Transform

    a=0, b=-2*pi for signal processing

  • 8/13/2019 11 Gehring

    6/19

    Fourier Transform

    Every function f(x) has a forward and inverse

    Fourier Transform such that

    Given:

    Integral of f(x) exists Discontinuous at a finite number of points

    Function has a bounded variation

  • 8/13/2019 11 Gehring

    7/19

    Discrete Fourier Transform

    For given input data:

    Reveals periodic elements

    Shows the relative strength of those periodic

    elements

    Input sequence of real numbers results in

    Fourier Transform output of complex numbers

    Efficiently computed using Fast Fourier

    Transform

  • 8/13/2019 11 Gehring

    8/19

    Some Clarification

    Fourier Series uses an infinite sum of sinesand cosines

    Fourier Transform uses an integral over an

    infinite range to develop an approximation Discrete Fourier Transform uses a finite sum of

    sines and cosines over a given range, based on

    sampling rates and sample length In music, the sample rate is usually set to 44,100

    samples/second based on CD quality

  • 8/13/2019 11 Gehring

    9/19

    Approximating a Square Wave

  • 8/13/2019 11 Gehring

    10/19

    Fast Fourier Transform

    Efficient algorithm reducing the number of

    computations required to determine the

    discrete Fourier Transform of a function from

    O(n^2) to O(n*log2(n))

    Has been used in mp3 and JPG compression

    Ultimately, even the FFT could not compete

    with the Discrete Cosine Transform, which is

    the cosine portion of the Fourier Transform,

    and uses only real values

  • 8/13/2019 11 Gehring

    11/19

    Compression

    The compression ratio offered by use of the

    Fourier Transform is dependent on the quality

    required by the application

    The higher quality the result needs to be, the

    lower the compression ratio will be

    To create a more accurate output, more

    coefficients are needed and the data cannot

    be compressed as significantly

  • 8/13/2019 11 Gehring

    12/19

  • 8/13/2019 11 Gehring

    13/19

    MP3

    Input file is sampled, usually at 44.1 kHz, and thefile is split into chunks of 576 samples each(~.013 seconds)

    FFT or DCT is performed to convert time domain

    to frequency domain Frequencies outside range of human hearing are

    removed

    Coefficient data is stored in conjunction with a32-bit header containing sound quality (frame)

    Multiple frames are combined to make a singlemp3 file

    http://www.indiana.edu/~acoustic/s522/fourapdkp.html

    http://www.indiana.edu/~acoustic/s522/fourapdkp.htmlhttp://www.indiana.edu/~acoustic/s522/fourapdkp.html
  • 8/13/2019 11 Gehring

    14/19

    JPGThe original image is broken up into

    64 pixel blocks, each 8x8 pixels.

    The DCT is taken of each 8x8 group

    using a set of 64 basis functions.

    Each numerical value in the group is

    replaced with a new, smaller

    number representing a coefficient

    for a basis function.

    Because these numbers are smaller,

    the number of bits required to

    represent them can be reduced. So,

    each value in the group is truncated

    to a lower number of bits.

    By storing this lower number of bits

    instead, the total amount of

    information is compressed.

  • 8/13/2019 11 Gehring

    15/19

    JPG (contd)

    In this image, we see how many coefficients

    are required to achieve an approximation of

    the original image. Using 15 coefficients for

    the Fourier Transform instead of 64 originalvalues, a good

    approximation

    can be madeof the initial

    image

  • 8/13/2019 11 Gehring

    16/19

    JPG (Contd)

    The last step of JPG compression involves the

    use of Huffman Encoding, which is a form of

    variable bit length encoding that uses fewer

    bits to represent values that occur morefrequently than those that occur more rarely.

    The 64 encoded values are then converted to

    a linear sequence of values rather than anarray

  • 8/13/2019 11 Gehring

    17/19

    In Conclusion

    All these methods have undergone periodic

    updates depending on the complexity of input

    data and the computing power available to

    perform the tasks.

    As storage space becomes cheaper,

    compression ratios can become less strict to

    create closer approximations to originalinformation

  • 8/13/2019 11 Gehring

    18/19

    This cat has some serious periodic components.

  • 8/13/2019 11 Gehring

    19/19

    Works CitedFourier Transform. Simple Wikipedia. Web. 04 April 2011.

    http://simple.wikipedia.org/wiki/Fourier_transform.

    Various Articles.Wolfram MathWorld: The Webs Most Extensive MathematicsResource. Web. 03 April 2011. http://mathworld.wolfram.com.

    MP3. Wikipedia, The Free Encyclopedia. Web. 04 April 2011.http://en.wikipedia.org/wiki/MP3.

    Smith, Steven W. JPEG (Transform Compression). The Scientist and Engineers Guideto Digital Signal Processing. Web. 04 April 2011.http://www.dspguide.com/ch27/6.htm.

    Yoo, Yerin. Tutorial on Fourier Theory. Department of Computer Science. University

    of Otago. Web. 05 April 2011.http://www.cs.otago.ac.nz/cosc453/student_tutorials/fourier_analysis.pdf

    Handley, Mark. 3: Fourier Transforms. Department of Computer Science. ColumbiaUniversity. Web. 05 April 2011.http://www.cs.columbia.edu/~hgs/teaching/ais/slides/03-fourier.pdf

    Munroe, Randall. Fourier. xkcd. Web. 05 April 2011. http://xkcd.com/26.

    http://www.dspguide.com/ch27/6.htmhttp://www.dspguide.com/ch27/6.htmhttp://www.dspguide.com/ch27/6.htmhttp://www.cs.otago.ac.nz/cosc453/student_tutorials/fourier_analysis.pdfhttp://www.cs.otago.ac.nz/cosc453/student_tutorials/fourier_analysis.pdfhttp://www.cs.columbia.edu/~hgs/teaching/ais/slides/03-fourier.pdfhttp://www.cs.columbia.edu/~hgs/teaching/ais/slides/03-fourier.pdfhttp://www.cs.columbia.edu/~hgs/teaching/ais/slides/03-fourier.pdfhttp://www.cs.columbia.edu/~hgs/teaching/ais/slides/03-fourier.pdfhttp://www.cs.otago.ac.nz/cosc453/student_tutorials/fourier_analysis.pdfhttp://www.dspguide.com/ch27/6.htm