It342 Multimedia Data Compression Part II
Post on 28-Feb-2018
227 Views
Preview:
Transcript
7/25/2019 It342 Multimedia Data Compression Part II
1/16
Multimedia Data
CompressionPart II
Chapter 8 Lossy CompressionAlgorithms
Li & Drew1
7/25/2019 It342 Multimedia Data Compression Part II
2/16
Chapter 8
Lossy CompressionAlgorithms
8.1 Introduction8.2 Distortion Measures8.3 The RateDistortion Theory8.! "uanti#ation8.$ Trans%orm Coding
8.& 'a(elet)ased Coding
7/25/2019 It342 Multimedia Data Compression Part II
3/16
Fundamentals of Multimedia, Chapter 7
8.1 Introduction
* Lossless compression algorithms do notdeli(er compression ratiosthat are highenough. +ence, most multimedia
compression algorithms are lossy.* 'hat is lossy compression-
The compressed data is not the same asthe original data, /ut a close appro0imation
o% the original image perceptually. ields a much higher compression ratio
than that o% lossless compression.
Li & Drew3
7/25/2019 It342 Multimedia Data Compression Part II
4/16
Fundamentals of Multimedia, Chapter 7
8.2 Distortion Measures A distortion measure is a mathematical uantity that species
ho4 close an appro0imation is to its original, using somedistortion criteria.
The three most commonly used distortion measures in imagecompression are5
mean square error6M79 2,68.19
4here xn, yn, and Nare the input data seuence, reconstructeddata seuence, and length o% the data seuence respecti(ely.
signal to noise ratio 67:R9, in deci/el units 6d)9,68.29
4here is the a(erage suare (alue o% the original dataseuence and is the M7.
eak si nal to noise ratio ;7:RLi & Drew!
2 2
1
1 ( )N
n n
n
x yN
=
=
2
10 210log x
d
SNR
=
2
10 210log
peak
d
xPSNR
=
2x
2d
7/25/2019 It342 Multimedia Data Compression Part II
5/16
Fundamentals of Multimedia, Chapter 7
8.3 The ate!Distortion
Theory ;ro(ides a %rame4or< %or thestudy o% tradeo=s /et4eenRate and Distortion.
Rate is5 the a(erage num/ero% /its reuired to representeach source sym/ol.
>rom gure5 the minimumpossi/le rate at D?@, no
loss. The distortioncorresponding to a rateR6D9?@ is the ma0imumamount o% distortion incurred4hen nothingB is coded.
Li & Drew$
7/25/2019 It342 Multimedia Data Compression Part II
6/16
Fundamentals of Multimedia, Chapter 7
8." #uanti$ation
* Reduce the num/er o% distinct output(alues to a much smaller set.
* Main source o% the lossB in lossycompression.
* Three di=erent %orms o% uanti#ation. ni%orm5 midrise and midtread uanti#ers.
:onuni%orm5 companded uanti#er.
ector "uanti#ation.Li & Drew&
7/25/2019 It342 Multimedia Data Compression Part II
7/16
Fundamentals of Multimedia, Chapter 7
8.% Trans&orm Coding* The rationale 'ehind trans&orm coding5
I% Y is the result o% a linear trans%orm T o% the input(ector X in such a 4ay that the components o% Yaremuch less correlated, then Y can /e coded moreeEciently than X.
* I% most in%ormation is accurately descri/ed /y the rst%e4 components o% a trans%ormed (ector, then theremaining components can /e coarsely uanti#ed, or
e(en set to #ero, 4ith little signal distortion.
* Trans%ormation to the %reuency domain (ia DiscreteCosine Trans%orm 6DCT9, 'a(elet Trans%orm 6'T9 and>ourier Trans%orm 6>T9.
Li & DrewF
7/25/2019 It342 Multimedia Data Compression Part II
8/16
Fundamentals of Multimedia, Chapter 7
(patial )re*uency and
DCT* Spatial frequency indicates ho4 many timespi0el (alues change across an image /loc
7/25/2019 It342 Multimedia Data Compression Part II
9/16
Fundamentals of Multimedia, Chapter 7
>ig. 8.H5 raphical Illustration o% 8 J 8 2D
DCT /asis. Li & DrewH
7/25/2019 It342 Multimedia Data Compression Part II
10/16
Fundamentals of Multimedia, Chapter 7
8.+ ,a-elet!ased
Coding* The o/Kecti(e o% the 4a(elet trans%orm is todecompose the input signal into components that areeasier to deal 4ith, ha(e special interpretations, orha(e some components that can /e thresholded a4ay,%or compression purposes.
* 'e 4ant to /e a/le to at least appro0imatelyreconstruct the original signal gi(en thesecomponents.
* The /asis %unctions o% the 4a(elet trans%orm arelocali#ed in /oth time and %reuency.
* There are t4o types o% 4a(elet trans%orms5 thecontinuous 4a(elet trans%orm 6C'T9 and the discrete4a(elet trans%orm 6D'T9.
Li & Drew1@
7/25/2019 It342 Multimedia Data Compression Part II
11/16
Fundamentals of Multimedia, Chapter 7
'a(elet Trans%orm 0ample
7uppose 4e are gi(en the %ollo4ing input seuence.
xn,i ? 1@, 13, 2$, 2&, 2H, 21, F, 1$
Consider the trans%orm that replaces the original seuence 4ithits pair4ise aeragexnN1,i and di!erencednN1,idened as %ollo4s5
The a(erages and di=erences are applied only on consecuti(epairs o% input seuences 4hose rst element has an e(en inde0.There%ore, the num/er o% elements in each set xnN1,i anddnN1,i is e0actly hal% o% the num/er o% elements in the originalseuence.
Li & Drew11
,2 ,2 1
1, 2n i n i
n i
x xx
+
+=
,2 ,2 1
1,
2
n i n i
n i
x xd
+
=
7/25/2019 It342 Multimedia Data Compression Part II
12/16
Fundamentals of Multimedia, Chapter 7
* >orm a ne4 seuence ha(ing length eual to that o%the original seuence /y concatenating the t4o
seuences xnN1,i and dnN1,i. The resultingseuence is
xnN1,i, dnN1,i ? 11.$, 2$.$, 2$, 11,N1.$,N@.$, !,N!
* This seuence has e0actly the same num/er o%elements as the input seuence O the trans%ormdid not increase the amount o% data.
* 7ince the rst hal% o% the a/o(e seuence containa(erages %rom the original seuence, 4e can (ie4it as a coarser appro0imation to the original signal.
The second hal% o% this seuence can /e (ie4ed asthe details or appro0imation errors o% the rst hal%.
Li & Drew12
7/25/2019 It342 Multimedia Data Compression Part II
13/16
Fundamentals of Multimedia, Chapter 7
* It is easily (eried that the original seuence can /e reconstructed%rom the trans%ormed seuence using the relations
xn, 2i?xnN1, i P dnN1, i
xn, 2iP1 ?xnN1,iN dnN1, i
* This trans%orm is the discrete +aar 4a(elet trans%orm.
>ig. 8.125 +aar Trans%orm5 6a9 scaling %unction, 6/9 4a(elet %unction.
Li & Drew13
7/25/2019 It342 Multimedia Data Compression Part II
14/16
Fundamentals of Multimedia, Chapter 7
2D ,a-elet Trans&orm* >or an : /y : input image, the t4odimensional D'T proceeds
as %ollo4s5
Con(ol(e each ro4 o% the image 4ith lo4pas and highpasslters, discard the odd num/ered columns o% the resultingarrays, and concatenate them to %orm a trans%ormed ro4.
A%ter all ro4s ha(e /een trans%ormed, con(ol(e each column o%the result 4ith lo4pass and highpass lters. Again discard theodd num/ered ro4s and concatenate the result.
* A%ter the a/o(e t4o steps, one stage o% the D'T is complete.
The trans%ormed image no4 contains %our su//ands LL, +L, L+,and ++, standing %or lo4lo4, highlo4, etc.
* The LL su//and can /e %urther decomposed to yield yetanother le(el o% decomposition. This process can /e continueduntil the desired num/er o% decomposition le(els is reached.
Li & Drew1!
7/25/2019 It342 Multimedia Data Compression Part II
15/16
Fundamentals of Multimedia, Chapter 7
>ig. 8.1H5 The t4odimensional discrete 4a(elettrans%orm
6a9 Qne le(el trans%orm, 6/9 t4o le(el trans%orm.Li & Drew1$
7/25/2019 It342 Multimedia Data Compression Part II
16/16
Fundamentals of Multimedia, Chapter 7
2D ,a-elet Trans&orm
/0ample
Li & Drew1&
top related