Discrete Cosine Transform. Take our sampled signal and transform it. How? Why?

Slides:



Advertisements
Similar presentations
JPEG Compresses real images Standard set by the Joint Photographic Experts Group in 1991.
Advertisements

Fourier Transforms and Their Use in Data Compression
Lecture 15 Orthogonal Functions Fourier Series. LGA mean daily temperature time series is there a global warming signal?
Transformations We want to be able to make changes to the image larger/smaller rotate move This can be efficiently achieved through mathematical operations.
Techniques in Signal and Data Processing CSC 508 Frequency Domain Analysis.
DFT/FFT and Wavelets ● Additive Synthesis demonstration (wave addition) ● Standard Definitions ● Computing the DFT and FFT ● Sine and cosine wave multiplication.
Signal Spaces.
Business Statistics for Managerial Decision

Basics of a Polynomial.
School of Computing Science Simon Fraser University
Lecture05 Transform Coding.
SWE 423: Multimedia Systems Chapter 7: Data Compression (3)
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
Department of Computer Engineering University of California at Santa Cruz Data Compression (2) Hai Tao.
SWE 423: Multimedia Systems Chapter 7: Data Compression (5)
5. 1 JPEG “ JPEG ” is Joint Photographic Experts Group. compresses pictures which don't have sharp changes e.g. landscape pictures. May lose some of the.
The Frequency Domain Sinusoidal tidal waves Copy of Katsushika Hokusai The Great Wave off Kanagawa at
Prosjektstyring Expected Present value - project A We will choose one of two projects, A or B. Project A, shown on the.
Solving Equations Containing To solve an equation with a radical expression, you need to isolate the variable on one side of the equation. Factored out.
Lecture 1 Signals in the Time and Frequency Domains
Applied Business Forecasting and Regression Analysis Review lecture 2 Randomness and Probability.
JPEG2000 Image Compression Standard Doni Pentcheva Josh Smokovitz.
Lecture 6 Intro to Fourier Series Introduction to Fourier analysis Today I’m now setting homework 1 for submission 31/10/08.
Compression.  Compression ratio: how much is the size reduced?  Symmetric/asymmetric: time difference to compress, decompress?  Lossless; lossy: any.
Signals CY2G2/SE2A2 Information Theory and Signals Aims: To discuss further concepts in information theory and to introduce signal theory. Outcomes:
Understanding JPEG MIT-CETI Xi’an ‘99 Lecture 10 Ben Walter, Lan Chen, Wei Hu.
The Central Tendency is the center of the distribution of a data set. You can think of this value as where the middle of a distribution lies. Measure.
An introduction to audio/video compression Dr. Malcolm Wilson.
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
Adding a Sequence of numbers (Pairing Method)
Power Series Section 9.1a.
JPEG - JPEG2000 Isabelle Marque JPEGJPEG2000. JPEG Joint Photographic Experts Group Committe created in 1986 by: International Organization for Standardization.
The task of compression consists of two components, an encoding algorithm that takes a file and generates a “compressed” representation (hopefully with.
HOW JEPG WORKS Presented by: Hao Zhong For 6111 Advanced Algorithm Course.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Chapter 8 Lossy Compression Algorithms. Fundamentals of Multimedia, Chapter Introduction Lossless compression algorithms do not deliver compression.
CS 376b Introduction to Computer Vision 03 / 17 / 2008 Instructor: Michael Eckmann.
int [] scores = new int [10];
6.1 Discrete and Continuous Random Variables Objectives SWBAT: COMPUTE probabilities using the probability distribution of a discrete random variable.
CHAPTER 11 Mean and Standard Deviation. BOX AND WHISKER PLOTS  Worksheet on Interpreting and making a box and whisker plot in the calculator.
GRAPHS OF THE TANGENT AND COTANGENT FUNCTIONS
Fourier transform.
Fourier Analysis Patrice Koehl Department of Biological Sciences National University of Singapore
Chapter 8 Lossy Compression Algorithms
INTRODUCTION TO STATISTICS
Linear Algebra Review.
Introduction to Transforms
1.1: Objectives Properties of Real Numbers
Data Compression.
A Simple Image Compression : JPEG
CSI-447: Multimedia Systems
Introduction to Summary Statistics
Introduction to Summary Statistics
CHE 391 T. F. Edgar Spring 2012.
Introduction to Summary Statistics
Solving Equations Containing
Introduction to Summary Statistics
Solving Equations Containing
Chapter 8 The Discrete Fourier Transform
Introduction to Summary Statistics
Solving Equations Containing
Copyright © Cengage Learning. All rights reserved.
Image Coding and Compression
Introduction to Summary Statistics
The Fourier Transform Intro: Marisa, Nava, Compression Scheme project. Relies heavily on Fourier Transform.
Mean & Standard Deviation
Introduction to Summary Statistics
Introduction to Summary Statistics
Solving Equations Containing
Presentation transcript:

Discrete Cosine Transform. Take our sampled signal and transform it. How? Why?

Basis functions. Like an identi-kit. A series of shapes to create the original waveform. Express the waveform as an amount of the given shapes. The amount of the given shapes is called the co- efficient.

The DCT formula. Scary looking formulae: The equation compares the shape of our sequence x n with a series of cosine shapes. The closer our sequence is to the cosine shape, then the higher X(k) will be.

The cosine shapes for a 4 sample block. There are as many cosine patterns as there are samples in the sample block. If we have a four sample block. Then when: –K=0 x=1:4;bar(x,cos(0*pi*(2*(x- 1)+1)/8)) –K=1 x=1:4;bar(x,cos(1*pi*(2*(x- 1)+1)/8))

The cosine shapes for a 4 sample block. –K=2 x=1:4;bar(x,cos(2*pi*(2*(x- 1)+1)/8)) –K=3 x=1:4;bar(x,cos(3*pi*(2*(x- 1)+1)/8))

Making any sequence from the cosine shapes Make an arbitrary sequence –Say A=[5 4 –7 2] Plot a bar graph of it. We can match this sequence by choosing a certain mixture of our cosine shapes. We can then completely describe our sequence by the amounts of the cosine shapes alone.

How does it work? Imagine two shapes defined by a sequence of numbers, such that the numbers defining the shapes each average to zero. If we multiply the values of a selection of points from any two shapes (defined by a sequence of numbers) together and add up all of the results, then the sum will be zero if the shapes do not correspond to each other, but some non-zero value if there is some correspondence.

Try it Create two random number sequences in Matlab which average to zero: –a=rand(1,10) –b=rand(1,10) Plot them on the same graph –plot(a) –hold on –plot(b)

Try it Multiply each element of a by the corresponding element of b. –c=a.*b (don’t forget the dot) Sum the result –sum(c) Now repeat with similar shapes, (make a copy of “a” possibly modify it and plot the new (similar) shape ) multiply “a” by its copy and sum the result. The more similar the shapes are, the higher the result.

Making any sequence from the cosine shapes We can therefore calculate the amount of each cosine shape in our sequence by multiplying each value in our sequence by the corresponding value in each of the cosine sequences and summing the result. –X0=cos(0*pi*(2*(x-1)+1)/8) –X1=cos(1*pi*(2*(x-1)+1)/8) –X2=cos(2*pi*(2*(x-1)+1)/8) –X3=cos(3*pi*(2*(x-1)+1)/8) –K0=sum(X0.*A) –K1=sum(X1.*A) –K2=sum(X2.*A) –K3=sum(X3.*A)

Making any sequence from the cosine shapes Matlab function dct does a discrete cosine transform, that is, it calculates the amount of the cosine shapes that we need to make our sequence. The only difference to our calculation is that the first amount (k=0) is multiplied by the square root of 1/N and the other amounts are multiplied by the square root of 2/N. Try –dctA= dct(A) –dctA=

Getting our original shape back (the inverse DCT) Since we claim that our DCT represents the amount of each cosine shape in our original sequence, then we must be able to reconstruct our original shape by adding the proportions of these shapes together. Let’s do that. Again we have to use the square root of 1/N and 2/N. –testA1= 2*X0(1)*1/ *X1(1)*1/2^ *X2(1)*1/2^ * X3(1)*1/2^0.5

Why bother? We defined our shape with a sequence of numbers originally, why do we want to define it as a new set of numbers representing the amount of similarity to our cosine shapes? The cosine shapes roughly represent the “frequencies” in the shape (waveform).

Why bother? Some of these frequencies do not contribute (or occur as frequently) as much as others to the perception of a sound or picture. If their contribution is low then they can be discarded or coded with fewer bits. (leading to compression). If some frequencies do not usually take on certain (for example high) values then we can use Huffman coding which leads to compression.