You are on page 1of 10

JPEG Compression in Matlab

Michael Christensen

Outline
Motivation
General

Method
Still to do

Motivation
Instruction
Provide

a simple example

Method
Step 1

Shift by 27

Method, Cont.
Step 2

2D
Discrete
Cosine
Transform

Method, Cont.
./

Step 3
Quantization

Method, Cont.

(
=

26, 3, 0, 3, 3, 6, 2, 4, 1, 4,
1, 1, 5, 1, 2, 1, 1, 1, 2, 0, 0, 0, 0,
0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

Method, Cont.
Shorten
=

26, 3, 0, 3, 3, 6, 2, 4, 1, 4,
1, 1, 5, 1, 2, 1, 1, 1, 2, 0, 0, 0, 0,
0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

26, 3, 0, 3, 3, 6, 2, 4, 1, 4, 1, 1, 5,
1, 2, 1, 1, 1, 2, 0, 0, 0, 0, 0, 1, 1, EOB
101001110011101111110111010110101011101
00001100110111010111010101010110101101
110101101111011011101000110111000110111
101101100011010101011101110100110111101
011101100011001111011101010110011010110
1110101010011110101110101010

Method, Final
File
Headers, +
etc.

101001110011101111110111010110101011101
00001100110111010111010101010110101101
110101101111011011101000110111000110111
101101100011010101011101110100110111101
011101100011001111011101010110011010110
1110101010011110101110101010

= Output File

Still To Do

Input multiple file types


Modifiable quantization matrix for variable
compression rates
JPEG file conversion back to uncompressed
format

You might also like