Documente Academic
Documente Profesional
Documente Cultură
JPEG Overview
Source image data Encoder model descriptors encoder statistical model symbols entropy encoder compressed image data
model tables
88 blocks
DCT-based encoder
FDCT quantizer statistical model table specification entropy encoder compressed image data
table specification
fre q u e n c y
Where
1 / 2 x=0 C( x) = 1 otherwise f(x,y): 2-D sample value F(u,v): 2-D DCT coefficient
(c)
f(x)
S(u)
Amplitude
0 1 2 3 4 5 6 7 8
Amplitude
Amplitude
Amplitude
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8
-1
-1
-1
-1
U=0
1
1
U=1
1
U=2
1
U=3
Amplitude
Amplitude
Amplitude
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8
Amplitude
0 1 2 3 4 5 6 7 8
-1
-1
-1
-1
U=4
U=5
U=6
U=7
The DCT coefficient values can be regarded as the relative amounts of the 2-D spatial frequencies contained in the 88 block the upper-left corner coefficient is called the DC coefficient, which is a measure of the average of the energy of the block Other coefficients are called AC coefficients, coefficients correspond to high frequencies tend to be zero or near zero for most natural images
Why quantization? .
to achieve further compression by representing DCT coefficients with no greater precision than is necessary to achieve the desired image quality
Generally, the high frequency coefficients has larger quantization values Quantization makes most coefficients to be zero, it makes the compression system efficient, but its the main source that make the system lossy
A simple example
O O X X X X O O O X X X X X X O O X X X X X X O X X X X X X X X X X X X X X X X O X X X X X X O O X X X X X X O O O X X X X O O
-10 10 10 10 10 10 10 -10
-10 10 10 10 10 10 10 -10
10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10
-10 10 10 10 10 10 10 -10
-10 10 10 10 10 10 10 -10
40 0 -45 0 -20 0 -3 0
0 -26 0 0 0 -24 0 0 0 0 0 0 0 10 0 0
0 0 0 0 0 8 0 0 0 20 0 0 0 18 0 0
0 -11 0 0 0 -10 0 0 0 0 0 0 0 4 0 0
0 0 0 0 0 0 0 0
Digitized image
A simple example(cont.)
16 12 14 14 18 24 49 72 11 12 13 17 22 35 64 92 10 14 16 22 37 55 78 95 16 19 24 29 56 64 87 98 24 26 40 51 68 81 103 112 40 58 57 87 109 104 121 100 51 60 69 80 103 113 120 103 61 55 56 62 77 92 101 99
40 0 -45 0 -20 0 -3 0
0 -26 0 0 0 -24 0 0 0 0 0 0 0 10 0 0
0 0 0 0 0 8 0 0 0 20 0 0 0 18 0 0
0 -11 0 0 0 -10 0 0 0 0 0 0 0 4 0 0
0 0 0 0 0 0 0 0
3 0 -3 0 -1 0 0 0
0 -3 0 0 0 -2 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 0 0 0 0
0 0 0 0 0 0 0 0
DCT coefficients
Quantized coefficients
quantized DC coefficients
DPCM
DC difference
0 2
1 4 8 11 19 22 34 36
5 7 12 18 23 33 37 49
6 13 17 24 32 38 47 48
14 16 25 31 39 46 50 57
15 26 30 40 45 51 56 58
27 29 41 44 52 55 59 62
28 42 43 53 54 60 61 63
Vertical frequency
3 9 10 20 21 35
3 0 0 -3 0 -3 0 0 0 0 -1 0 -2(EOB)
+3 +6 3 110
EOB 0 0 --
+3 0 0 -63 0
JPEG 2000
Allow efficient lossy and lossless compression within a single unified coding framework Progressive transmission by quality, resolution, component, or spatial locality Compressed domain processing Region of Interest coding JPEG2000 is NOT an extension of JPEG Wavelet Transform An extremely flexible bitstream structure
Experiment
http://www.sfu.ca/~cjenning/toybox/hj peg/index.html