SlideShare a Scribd company logo
1 of 14
CChhaapptteerr 1188 
DDiissccrreettee CCoossiinnee TTrraannssffoorrmm
LLeeaarrnniinngg OObbjjeeccttiivveess 
 IInnttrroodduuccttiioonn ttoo tthhee DDCCTT aanndd IIDDCCTT.. 
 DDeeccoommppoossiittiioonn ooff aa 22--DD DDCCTT ttoo ttwwoo 11--DD 
DDCCTTss.. 
 IImmpplleemmeennttaattiioonn ooff aa 22--DD DDCCTT uussiinngg aa 11-- 
DD DDCCTT.. 
Chapter 18, Slide 2 Dr. Naim Dahnoun, Bristol University,
IInnttrroodduuccttiioonn 
8 p i x e l s 
A n 
8 x 8 
b l o c k 
I m a g e 
D C T 
Q u a n t i s e r 
z i g z a g 
E n t r o p y 
E n c o d e r 
C h a n n e l 
o r 
S t o r a g e 
I D C T 
D e q u a n t i s e r 
r e v e r s e 
E n t r o p y 
z i g z a g 
D e c o d e r 
 TToo ppeerrffoorrmm tthhee JJPPEEGG ccooddiinngg,, aann iimmaaggee ((iinn ccoolloouurr oorr ggrreeyy 
ssccaalleess) iiss ffiirrsstt ssuubbddiivviiddeedd iinnttoo bblloocckkss ooff 88xx88 ppiixxeellss.. 
 TThhee DDiissccrreettee CCoossiinnee TTrraannssffoorrmm ((DDCCTT) iiss tthheenn ppeerrffoorrmmeedd oonn 
eeaacchh bblloocckk.. 
 TThhiiss ggeenneerraatteess 6644 ccooeeffffiicciieennttss wwhhiicchh aarree tthheenn qquuaannttiisseedd ttoo 
rreedduuccee tthheeiirr mmaaggnniittuuddee.. 
Chapter 18, Slide 3 Dr. Naim Dahnoun, Bristol University, 8 pixels
IInnttrroodduuccttiioonn 
8 p i x e l s 
A n 
8 x 8 
b l o c k 
I m a g e 
D C T 
Q u a n t i s e r 
z i g z a g 
E n t r o p y 
E n c o d e r 
C h a n n e l 
o r 
S t o r a g e 
I D C T 
D e q u a n t i s e r 
r e v e r s e 
E n t r o p y 
z i g z a g 
D e c o d e r 
 TThhee ccooeeffffiicciieennttss aarree tthheenn rreeoorrddeerreedd iinnttoo aa oonnee--ddiimmeennssiioonnaall aarrrraayy 
iinn aa zziiggzzaagg mmaannnneerr bbeeffoorree ffuurrtthheerr eennttrrooppyy eennccooddiinngg.. 
 TThhee ccoommpprreessssiioonn iiss aacchhiieevveedd iinn ttwwoo ssttaaggeess;; tthhee ffiirrsstt iiss dduurriinngg 
qquuaannttiissaattiioonn aanndd tthhee sseeccoonndd dduurriinngg tthhee eennttrrooppyy ccooddiinngg pprroocceessss.. 
 JJPPEEGG ddeeccooddiinngg iiss tthhee rreevveerrssee pprroocceessss ooff ccooddiinngg.. 
Chapter 18, Slide 4 Dr. Naim Dahnoun, Bristol University, 8 pixels
IImmpplleemmeennttaattiioonn ooff tthhee DDCCTT 
 DDCCTT--bbaasseedd ccooddeeccss uussee aa ttwwoo-- 
ddiimmeennssiioonnaall vveerrssiioonn ooff tthhee ttrraannssffoorrmm.. 
 TThhee 22--DD DDCCTT aanndd iittss iinnvveerrssee ((IIDDCCTT)) ooff 
aann NN xx NN bblloocckk aarree sshhoowwnn bbeellooww:: 
22--DD DDCCTT:: 
N 
- 
1 
N 
- 
1 
 F ( u , v ) = 2 C ( u ) C ( v ) åå f ( x , y ) cos[(2 x + 1) 
u 
p ]cos[(2 y + 
1) 
v 
p 
] 
N 
y 
= 
0 
x = 
0 
2 
N 
2 
N 
 22--DD IIDDCCTT:: 
2 åå N 
- 
1 
N 
- 
1 
f ( x , y ) = C ( u ) C ( v ) F ( u , v ) cos[(2 x + 1) 
u 
p ]cos[(2 y + 
1) 
v 
p 
] 
N 
v 
= 
0 
u = 
0 
2 
N 
2 
N 
 NNoottee:: TThhee DDCCTT iiss ssiimmiillaarr ttoo tthhee DDFFTT 
ssiinnccee iitt ddeeccoommppoosseess aa ssiiggnnaall iinnttoo aa sseerriieess 
ooff hhaarrmmoonniicc ccoossiinnee ffuunnccttiioonnss.. 
Chapter 18, Slide 5 Dr. Naim Dahnoun, Bristol University,
22--DD DDCCTT uussiinngg aa 11--DD DDCCTT PPaaiirr 
 OOnnee ooff tthhee pprrooppeerrttiieess ooff tthhee 22--DD DDCCTT iiss 
tthhaatt iitt iiss sseeppaarraabbllee mmeeaanniinngg tthhaatt iitt ccaann 
bbee sseeppaarraatteedd iinnttoo aa ppaaiirr ooff 11--DD DDCCTTss.. 
 TToo oobbttaaiinn tthhee 22--DD DDCCTT ooff aa bblloocckk aa 11--DD 
DDCCTT iiss ffiirrsstt ppeerrffoorrmmeedd oonn tthhee rroowwss ooff 
tthhee bblloocckk tthheenn aa 11--DD DDCCTT iiss ppeerrffoorrmmeedd 
oonn tthhee ccoolluummnnss ooff tthhee rreessuullttiinngg bblloocckk.. 
 TThhee ssaammee aapppplliieess ttoo tthhee IIDDCCTT.. 
 TThhiiss pprroocceessss iiss iilllluussttrraatteedd oonn tthhee 
ffoolllloowwiinngg sslliiddee.. 
Chapter 18, Slide 6 Dr. Naim Dahnoun, Bristol University,
22--DD DDCCTT uussiinngg aa 11--DD DDCCTT PPaaiirr 
C o l u m n s ( 2 5 6 p i x e l s ) 
R a w B l o c k o f P i x e l s 
1 2 8 
1 2 7 
1 3 0 1 2 8 1 3 4 1 3 0 1 2 8 1 1 2 8 
1 2 7 
1 3 0 1 2 8 1 3 4 1 3 0 1 2 8 1 A n 8 x 8 
b l o c k 
1 2 5 
1 2 6 1 3 0 1 2 7 1 3 0 1 3 1 1 2 8 1 1 2 4 1 2 8 
1 2 7 1 2 6 
1 2 9 1 3 0 
1 2 7 1 1 3 1 
1 3 2 
1 3 0 
1 2 9 
1 3 2 
1 2 8 
1 2 9 
1 p i x e l [ n ] 
1 2 9 1 3 1 1 3 4 
1 3 1 1 3 3 
1 2 9 
1 3 1 
1 1 2 9 1 3 4 1 3 4 1 3 6 1 3 6 1 3 7 1 3 4 1 1 3 3 1 3 5 1 3 6 1 3 8 1 3 7 1 4 0 1 3 5 1 P a r t o f a p i c t u r e 
F i n a l r e s u l t a f t e r D C T b y c o l u m n s R e s u l t a f t e r D C T b y r o w s 
3 6 5 
- 1 
- 4 
1 
1 
- 3 
1 
3 6 5 
- 1 
- 4 
1 
1 
- 3 
1 
3 6 2 
- 3 
- 4 
0 
- 3 
- 1 
2 
3 5 9 
- 3 
- 3 
0 
- 3 
- 3 
0 
3 6 8 
1 
1 
- 1 
1 
- 3 
- 2 
3 7 0 
0 
- 3 
- 3 
- 1 
- 1 
- 1 
3 7 8 
- 3 
- 6 
0 
- 3 
- 2 
- 1 
3 8 3 
- 1 
- 6 
2 
- 3 0 0 
Chapter 18, Slide 7 Dr. Naim Dahnoun, Bristol University, Rows (256 pixels) 
p i x e l 
[ 2 5 6 + n ] 
p i x e l [ n + 1 ] 
1 0 2 4 
- 1 8 
1 1 
0 
0 
- 4 
- 2 
2 
- 4 
0 - 4 - 6 0 1 
2 - 2 2 4 
0 1 
0 
- 3 3 - 2 - 1 
- 2 3 
- 1 1 
- 1 
1 
- 5 
2 2 
1 1 
- 3 - 3 
0 - 1 
0 1 0 
1 0 - 1 - 1 - 2 
- 1 
- 2 
- 3 - 1 0 - 2 
- 1 1 1 0 
0 - 1 - 1 - 1 
- 1 
2 0 
- 1
22--DD DDCCTT uussiinngg aa 11--DD DDCCTT PPaaiirr 
 11--DD DDCCTT:: 
N 
1 
X ( k ) = 2 C ( k ) x ( i ) cos[(2 i + 
1) 
k 
p 
] 
N 
i 2 
N 
 11--DD IIDDCCTT:: 
Chapter 18, Slide 8 Dr. Naim Dahnoun, Bristol University, 0 å- 
= 
x i p 
] 
N 
= + 
( ) 2 ( ) ( ) cos[ (2 1) 
2 
N 
k 1 
0 å- 
= 
C k X k i k 
N 
k = 0, 1, 2, …, N-1. 
and i = 0, 1, 2, …, N-1.
IImmpplleemmeennttaattiioonn IIssssuueess 
 PPrreeccaallccuullaattee tthhee DDCCTT ccooeeffffiicciieennttss aanndd 
ssccaallee tthheemm ((sseeee LLiinnkkssDDCCTT CCooeeffffss..ppddff)).. 
2*coef (i,k) =cos[ (2i+1)kp 
0 . 7 0 7 
0 . 7 0 7 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 4 8 
1 4 1 1 3 7 - 2 0 0 8 3 9 9 
1 7 0 2 - 1 7 0 2 
- 3 9 9 
2 0 0 8 
- 1 1 7 8 3 - 1 8 9 2 1 8 9 2 - 7 8 3 - 7 8 3 1 8 9 2 - 1 8 9 2 7 8 3 9 9 - 1 1 3 7 1 7 0 2 - 2 0 0 8 2 0 0 8 - 1 7 0 2 1 1 3 7 - 3 9 ] 
16 
c o e f ( i , k ) i n Q 1 2 f o r m a t
BBlloocckk--bbaasseedd DDCCTT aanndd IIDDCCTT iinn CC 
 TThhee mmoosstt ssttrraaiigghhttffoorrwwaarrdd wwaayy ooff 
iimmpplleemmeennttiinngg aa DDCCTT aanndd aann IIDDCCTT iiss ttoo 
uussee tthhee 11--DD DDCCTT aanndd IIDDCCTT.. 
 TThhee ffoolllloowwiinngg CC ccooddee sshhoowwss hhooww ttoo 
ttrraannssllaattee tthhee 11--DD eeqquuaattiioonnss ffoorr tthhee DDCCTT 
aanndd IIDDCCTT iinnttoo CC ccooddee.. 
 TThhee pprrooggrraamm aallssoo ttaakkeess iinnttoo aaccccoouunntt tthhee 
nnuummeerriiccaall iissssuueess aassssoocciiaatteedd wwiitthh ffiixxeedd-- 
ppooiinntt pprroocceessssoorrss.. 
Chapter 18, Slide 10 Dr. Naim Dahnoun, Bristol University,
IImmpplleemmeennttaattiioonn IIssssuueess 
((11)) TThhee pprrooggrraamm rruunnss oonn tthhee DDSSKK wwiitthh tthhee CC66771111 aanndd ddooeess 
nnoott uussee aannyy ccoommmmuunniiccaattiioonn wwiitthh tthhee hhoosstt.. 
((22)) TThhee sscceennaarryy..hh ffiillee iiss qquuiittee llaarrggee ((225566xx225566 88--bbiitt ppiixxeellss oorr 
6655553366 bbyytteess)) aanndd tthheerreeffoorree nneeeeddss ttoo bbee llooccaatteedd iinn aa ssppeecciiffiicc 
mmeemmoorryy llooccaattiioonn iinn tthhee DDSSKK.. BByy uussiinngg tthhee ##pprraaggmmaa 
DDAATTAA__SSEECCTTIIOONN ((……)) ddiirreeccttiivvee tthhee ppiiccttuurree ccaann bbee llooccaatteedd 
iinn tthhee DDRRAAMM ((oorriiggiinn aaddddrreessss 00xx00880000 00000000)).. 
((33)) FFoorr eexxaammppllee,, ##pprraaggmmaa DDAATTAA__SSEECCTTIIOONN ((iimmaaggee__iinn,, 
““eexxtt__ssddrraamm””)) aalllloowwss tthhee iimmaaggee__iinn ddaattaa aarrrraayy ttoo bbee 
llooaaddeedd iinnttoo tthhee sseeccttiioonn ccaalllleedd ““eexxtt__ssddrraamm”” wwhhiicchh iiss 
ddeeffiinneedd iinn tthhee ccoommmmaanndd ffiillee.. TThhee ssaammee aapppplliieess ttoo 
iimmaaggee__oouutt.. 
((44)) TThhee ddiirreeccttoorryy:: 
.... CChhaapptteerr 1188 -- DDiissccrreettee CCoossiinnee ttrraannssffoorrmmDDCCTT__CC__FFiixxeedd 
ccoonnttaaiinnss tthhee eennttiirree ssoouurrccee aanndd eexxeeccuuttaabbllee ffiilleess rreeqquuiirreedd.. 
TThhee pprrooggrraamm ccaann bbee llooaaddeedd iinnttoo tthhee DDSSKK aanndd bbyy uussiinngg 
tthhee ddiissppllaayy ffeeaattuurree ooff tthhee CCCCSS aass sshhoowwnn bbeellooww tthhee 
ccoonntteennttss ooff iimmaaggee__iinn aanndd iimmaaggee__oouutt ccaann bbee ddiissppllaayyeedd aanndd 
ccoommppaarreedd.. 
Chapter 18, Slide 11 Dr. Naim Dahnoun, Bristol University,
IImmpplleemmeennttaattiioonn IIssssuueess 
GGrraapphh pprrooppeerrttiieess ffoorr 
iimmaaggee__iinn 
iimmaaggee__iinn 
GGrraapphh pprrooppeerrttiieess ffoorr 
iimmaaggee__oouutt 
iimmaaggee__oouutt 
Chapter 18, Slide 12 Dr. Naim Dahnoun, Bristol University,
DDCCTT CCooddee aanndd LLiinnkkss 
 CCooddee llooccaattiioonn:: 
 ……CChhaapptteerr 1188 -- DDiissccrreettee CCoossiinnee ttrraannssffoorrmmDDCCTT__CC__FFiixxeedd 
 PPrroojjeeccttss:: 
 FFiixxeedd PPooiinntt iinn CC llaanngguuaaggee:: ddcctt__cc__ffiixxeedd..ppjjtt 
 LLiinnkkss:: 
 LLiinnkkssIImmaaggiinngg KKiitt..ppddff 
Chapter 18, Slide 13 Dr. Naim Dahnoun, Bristol University,
CChhaapptteerr 1188 
DDiissccrreettee CCoossiinnee TTrraannssffoorrmm 
-- EEnndd --

More Related Content

What's hot

Definitions
DefinitionsDefinitions
Definitionsstieberk
 
Fluid & electrolytes & acid base
Fluid & electrolytes & acid baseFluid & electrolytes & acid base
Fluid & electrolytes & acid baseMichelle Harris
 
Engineering & Tech Quiz Prelims
Engineering & Tech Quiz PrelimsEngineering & Tech Quiz Prelims
Engineering & Tech Quiz PrelimsSomnath Chanda
 
multivariate data analysis
multivariate data analysismultivariate data analysis
multivariate data analysisDivya Padmanaban
 
CS201- Introduction to Programming- Lecture 10
CS201- Introduction to Programming- Lecture 10CS201- Introduction to Programming- Lecture 10
CS201- Introduction to Programming- Lecture 10Bilal Ahmed
 
Grand Finale of Quizzat-2014
Grand Finale of Quizzat-2014Grand Finale of Quizzat-2014
Grand Finale of Quizzat-2014Somnath Chanda
 
Criminalistics questionnaires
Criminalistics questionnairesCriminalistics questionnaires
Criminalistics questionnairesAlexzur
 
2096 - IMPUGNAÇÃO AO CUMPRIMENTO DE SENTENÇA - Atualizado Novo Cpc
2096 - IMPUGNAÇÃO AO CUMPRIMENTO DE SENTENÇA  - Atualizado Novo Cpc2096 - IMPUGNAÇÃO AO CUMPRIMENTO DE SENTENÇA  - Atualizado Novo Cpc
2096 - IMPUGNAÇÃO AO CUMPRIMENTO DE SENTENÇA - Atualizado Novo CpcConsultor JRSantana
 
Nursing lec 1
Nursing lec 1Nursing lec 1
Nursing lec 1Magdy Aly
 
Introduction to microsoft access ppt
Introduction to microsoft access pptIntroduction to microsoft access ppt
Introduction to microsoft access pptranjitkumar08
 
19 Algorithms and complexity
19 Algorithms and complexity19 Algorithms and complexity
19 Algorithms and complexitymaznabili
 
Cervical spondilosis 05 2010
Cervical spondilosis 05 2010Cervical spondilosis 05 2010
Cervical spondilosis 05 2010Alexander Bardis
 
Tutorial final dic
Tutorial final dicTutorial final dic
Tutorial final dicizhar fatima
 

What's hot (19)

Definitions
DefinitionsDefinitions
Definitions
 
Fluid & electrolytes & acid base
Fluid & electrolytes & acid baseFluid & electrolytes & acid base
Fluid & electrolytes & acid base
 
Engineering & Tech Quiz Prelims
Engineering & Tech Quiz PrelimsEngineering & Tech Quiz Prelims
Engineering & Tech Quiz Prelims
 
Chapter 6 testbench
Chapter 6 testbenchChapter 6 testbench
Chapter 6 testbench
 
Neural network
Neural networkNeural network
Neural network
 
multivariate data analysis
multivariate data analysismultivariate data analysis
multivariate data analysis
 
cardiac arrhythmias
cardiac arrhythmiascardiac arrhythmias
cardiac arrhythmias
 
CS201- Introduction to Programming- Lecture 10
CS201- Introduction to Programming- Lecture 10CS201- Introduction to Programming- Lecture 10
CS201- Introduction to Programming- Lecture 10
 
Grand Finale of Quizzat-2014
Grand Finale of Quizzat-2014Grand Finale of Quizzat-2014
Grand Finale of Quizzat-2014
 
Dess acconier
Dess  acconierDess  acconier
Dess acconier
 
Criminalistics questionnaires
Criminalistics questionnairesCriminalistics questionnaires
Criminalistics questionnaires
 
2096 - IMPUGNAÇÃO AO CUMPRIMENTO DE SENTENÇA - Atualizado Novo Cpc
2096 - IMPUGNAÇÃO AO CUMPRIMENTO DE SENTENÇA  - Atualizado Novo Cpc2096 - IMPUGNAÇÃO AO CUMPRIMENTO DE SENTENÇA  - Atualizado Novo Cpc
2096 - IMPUGNAÇÃO AO CUMPRIMENTO DE SENTENÇA - Atualizado Novo Cpc
 
Nursing lec 1
Nursing lec 1Nursing lec 1
Nursing lec 1
 
Introduction to microsoft access ppt
Introduction to microsoft access pptIntroduction to microsoft access ppt
Introduction to microsoft access ppt
 
19 Algorithms and complexity
19 Algorithms and complexity19 Algorithms and complexity
19 Algorithms and complexity
 
Resumen termoquimica1
Resumen termoquimica1Resumen termoquimica1
Resumen termoquimica1
 
Cervical spondilosis 05 2010
Cervical spondilosis 05 2010Cervical spondilosis 05 2010
Cervical spondilosis 05 2010
 
Cervical Spondilosis
Cervical SpondilosisCervical Spondilosis
Cervical Spondilosis
 
Tutorial final dic
Tutorial final dicTutorial final dic
Tutorial final dic
 

Similar to AKASH

Similar to AKASH (20)

Ciivic education 1
Ciivic education 1Ciivic education 1
Ciivic education 1
 
Gelombang
GelombangGelombang
Gelombang
 
Circular motion2
Circular motion2Circular motion2
Circular motion2
 
Design of the South Doña Ana Dam
Design of the South Doña Ana DamDesign of the South Doña Ana Dam
Design of the South Doña Ana Dam
 
Capital contable
Capital contableCapital contable
Capital contable
 
gurjinder(Resume)
gurjinder(Resume)gurjinder(Resume)
gurjinder(Resume)
 
Prevention of Child Suicide
Prevention of Child SuicidePrevention of Child Suicide
Prevention of Child Suicide
 
Sindrome de embolismo graso
Sindrome de embolismo grasoSindrome de embolismo graso
Sindrome de embolismo graso
 
treatment of neuralgias
 treatment of neuralgias treatment of neuralgias
treatment of neuralgias
 
ram new
ram newram new
ram new
 
Grade 12 U0-L4-GraphicalMethods
Grade 12 U0-L4-GraphicalMethodsGrade 12 U0-L4-GraphicalMethods
Grade 12 U0-L4-GraphicalMethods
 
Shehzad Aslam (Final C V)
Shehzad Aslam (Final C V)Shehzad Aslam (Final C V)
Shehzad Aslam (Final C V)
 
Parecer Técnico-Científicodo perito independente Leví Inimá de Miranda
 Parecer Técnico-Científicodo perito independente Leví Inimá de Miranda Parecer Técnico-Científicodo perito independente Leví Inimá de Miranda
Parecer Técnico-Científicodo perito independente Leví Inimá de Miranda
 
Sample and sample Techniques
Sample and sample TechniquesSample and sample Techniques
Sample and sample Techniques
 
Retardo mental
Retardo mentalRetardo mental
Retardo mental
 
Training methods
Training methodsTraining methods
Training methods
 
Night vision Technology
Night vision TechnologyNight vision Technology
Night vision Technology
 
Grade 12 U0-L3-ErrorEstimation
Grade 12 U0-L3-ErrorEstimationGrade 12 U0-L3-ErrorEstimation
Grade 12 U0-L3-ErrorEstimation
 
CV-Subandi DH 2016
CV-Subandi DH  2016CV-Subandi DH  2016
CV-Subandi DH 2016
 
Lung cancer screening
Lung cancer screeningLung cancer screening
Lung cancer screening
 

AKASH

  • 1. CChhaapptteerr 1188 DDiissccrreettee CCoossiinnee TTrraannssffoorrmm
  • 2. LLeeaarrnniinngg OObbjjeeccttiivveess  IInnttrroodduuccttiioonn ttoo tthhee DDCCTT aanndd IIDDCCTT..  DDeeccoommppoossiittiioonn ooff aa 22--DD DDCCTT ttoo ttwwoo 11--DD DDCCTTss..  IImmpplleemmeennttaattiioonn ooff aa 22--DD DDCCTT uussiinngg aa 11-- DD DDCCTT.. Chapter 18, Slide 2 Dr. Naim Dahnoun, Bristol University,
  • 3. IInnttrroodduuccttiioonn 8 p i x e l s A n 8 x 8 b l o c k I m a g e D C T Q u a n t i s e r z i g z a g E n t r o p y E n c o d e r C h a n n e l o r S t o r a g e I D C T D e q u a n t i s e r r e v e r s e E n t r o p y z i g z a g D e c o d e r  TToo ppeerrffoorrmm tthhee JJPPEEGG ccooddiinngg,, aann iimmaaggee ((iinn ccoolloouurr oorr ggrreeyy ssccaalleess) iiss ffiirrsstt ssuubbddiivviiddeedd iinnttoo bblloocckkss ooff 88xx88 ppiixxeellss..  TThhee DDiissccrreettee CCoossiinnee TTrraannssffoorrmm ((DDCCTT) iiss tthheenn ppeerrffoorrmmeedd oonn eeaacchh bblloocckk..  TThhiiss ggeenneerraatteess 6644 ccooeeffffiicciieennttss wwhhiicchh aarree tthheenn qquuaannttiisseedd ttoo rreedduuccee tthheeiirr mmaaggnniittuuddee.. Chapter 18, Slide 3 Dr. Naim Dahnoun, Bristol University, 8 pixels
  • 4. IInnttrroodduuccttiioonn 8 p i x e l s A n 8 x 8 b l o c k I m a g e D C T Q u a n t i s e r z i g z a g E n t r o p y E n c o d e r C h a n n e l o r S t o r a g e I D C T D e q u a n t i s e r r e v e r s e E n t r o p y z i g z a g D e c o d e r  TThhee ccooeeffffiicciieennttss aarree tthheenn rreeoorrddeerreedd iinnttoo aa oonnee--ddiimmeennssiioonnaall aarrrraayy iinn aa zziiggzzaagg mmaannnneerr bbeeffoorree ffuurrtthheerr eennttrrooppyy eennccooddiinngg..  TThhee ccoommpprreessssiioonn iiss aacchhiieevveedd iinn ttwwoo ssttaaggeess;; tthhee ffiirrsstt iiss dduurriinngg qquuaannttiissaattiioonn aanndd tthhee sseeccoonndd dduurriinngg tthhee eennttrrooppyy ccooddiinngg pprroocceessss..  JJPPEEGG ddeeccooddiinngg iiss tthhee rreevveerrssee pprroocceessss ooff ccooddiinngg.. Chapter 18, Slide 4 Dr. Naim Dahnoun, Bristol University, 8 pixels
  • 5. IImmpplleemmeennttaattiioonn ooff tthhee DDCCTT  DDCCTT--bbaasseedd ccooddeeccss uussee aa ttwwoo-- ddiimmeennssiioonnaall vveerrssiioonn ooff tthhee ttrraannssffoorrmm..  TThhee 22--DD DDCCTT aanndd iittss iinnvveerrssee ((IIDDCCTT)) ooff aann NN xx NN bblloocckk aarree sshhoowwnn bbeellooww:: 22--DD DDCCTT:: N - 1 N - 1  F ( u , v ) = 2 C ( u ) C ( v ) åå f ( x , y ) cos[(2 x + 1) u p ]cos[(2 y + 1) v p ] N y = 0 x = 0 2 N 2 N  22--DD IIDDCCTT:: 2 åå N - 1 N - 1 f ( x , y ) = C ( u ) C ( v ) F ( u , v ) cos[(2 x + 1) u p ]cos[(2 y + 1) v p ] N v = 0 u = 0 2 N 2 N  NNoottee:: TThhee DDCCTT iiss ssiimmiillaarr ttoo tthhee DDFFTT ssiinnccee iitt ddeeccoommppoosseess aa ssiiggnnaall iinnttoo aa sseerriieess ooff hhaarrmmoonniicc ccoossiinnee ffuunnccttiioonnss.. Chapter 18, Slide 5 Dr. Naim Dahnoun, Bristol University,
  • 6. 22--DD DDCCTT uussiinngg aa 11--DD DDCCTT PPaaiirr  OOnnee ooff tthhee pprrooppeerrttiieess ooff tthhee 22--DD DDCCTT iiss tthhaatt iitt iiss sseeppaarraabbllee mmeeaanniinngg tthhaatt iitt ccaann bbee sseeppaarraatteedd iinnttoo aa ppaaiirr ooff 11--DD DDCCTTss..  TToo oobbttaaiinn tthhee 22--DD DDCCTT ooff aa bblloocckk aa 11--DD DDCCTT iiss ffiirrsstt ppeerrffoorrmmeedd oonn tthhee rroowwss ooff tthhee bblloocckk tthheenn aa 11--DD DDCCTT iiss ppeerrffoorrmmeedd oonn tthhee ccoolluummnnss ooff tthhee rreessuullttiinngg bblloocckk..  TThhee ssaammee aapppplliieess ttoo tthhee IIDDCCTT..  TThhiiss pprroocceessss iiss iilllluussttrraatteedd oonn tthhee ffoolllloowwiinngg sslliiddee.. Chapter 18, Slide 6 Dr. Naim Dahnoun, Bristol University,
  • 7. 22--DD DDCCTT uussiinngg aa 11--DD DDCCTT PPaaiirr C o l u m n s ( 2 5 6 p i x e l s ) R a w B l o c k o f P i x e l s 1 2 8 1 2 7 1 3 0 1 2 8 1 3 4 1 3 0 1 2 8 1 1 2 8 1 2 7 1 3 0 1 2 8 1 3 4 1 3 0 1 2 8 1 A n 8 x 8 b l o c k 1 2 5 1 2 6 1 3 0 1 2 7 1 3 0 1 3 1 1 2 8 1 1 2 4 1 2 8 1 2 7 1 2 6 1 2 9 1 3 0 1 2 7 1 1 3 1 1 3 2 1 3 0 1 2 9 1 3 2 1 2 8 1 2 9 1 p i x e l [ n ] 1 2 9 1 3 1 1 3 4 1 3 1 1 3 3 1 2 9 1 3 1 1 1 2 9 1 3 4 1 3 4 1 3 6 1 3 6 1 3 7 1 3 4 1 1 3 3 1 3 5 1 3 6 1 3 8 1 3 7 1 4 0 1 3 5 1 P a r t o f a p i c t u r e F i n a l r e s u l t a f t e r D C T b y c o l u m n s R e s u l t a f t e r D C T b y r o w s 3 6 5 - 1 - 4 1 1 - 3 1 3 6 5 - 1 - 4 1 1 - 3 1 3 6 2 - 3 - 4 0 - 3 - 1 2 3 5 9 - 3 - 3 0 - 3 - 3 0 3 6 8 1 1 - 1 1 - 3 - 2 3 7 0 0 - 3 - 3 - 1 - 1 - 1 3 7 8 - 3 - 6 0 - 3 - 2 - 1 3 8 3 - 1 - 6 2 - 3 0 0 Chapter 18, Slide 7 Dr. Naim Dahnoun, Bristol University, Rows (256 pixels) p i x e l [ 2 5 6 + n ] p i x e l [ n + 1 ] 1 0 2 4 - 1 8 1 1 0 0 - 4 - 2 2 - 4 0 - 4 - 6 0 1 2 - 2 2 4 0 1 0 - 3 3 - 2 - 1 - 2 3 - 1 1 - 1 1 - 5 2 2 1 1 - 3 - 3 0 - 1 0 1 0 1 0 - 1 - 1 - 2 - 1 - 2 - 3 - 1 0 - 2 - 1 1 1 0 0 - 1 - 1 - 1 - 1 2 0 - 1
  • 8. 22--DD DDCCTT uussiinngg aa 11--DD DDCCTT PPaaiirr  11--DD DDCCTT:: N 1 X ( k ) = 2 C ( k ) x ( i ) cos[(2 i + 1) k p ] N i 2 N  11--DD IIDDCCTT:: Chapter 18, Slide 8 Dr. Naim Dahnoun, Bristol University, 0 å- = x i p ] N = + ( ) 2 ( ) ( ) cos[ (2 1) 2 N k 1 0 å- = C k X k i k N k = 0, 1, 2, …, N-1. and i = 0, 1, 2, …, N-1.
  • 9. IImmpplleemmeennttaattiioonn IIssssuueess  PPrreeccaallccuullaattee tthhee DDCCTT ccooeeffffiicciieennttss aanndd ssccaallee tthheemm ((sseeee LLiinnkkssDDCCTT CCooeeffffss..ppddff)).. 2*coef (i,k) =cos[ (2i+1)kp 0 . 7 0 7 0 . 7 0 7 0 . 7 0 7 0 . 7 0 7 0 . 7 0 7 0 . 7 0 7 0 . 7 0 7 0 . 7 0 . 9 8 1 0 . 8 3 1 0 . 5 5 6 0 . 1 9 5 - 0 . 1 9 5 0 . 5 5 6 - 0 . 8 3 1 - . 9 0 . 9 2 4 0 . 3 8 3 - 0 . 3 8 3 - . 0 9 2 4 - 0 . 9 2 4 - 0 . 3 8 3 + 0 . 3 8 3 0 . 9 0 . 8 3 1 - 0 . 1 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inn CC  TThhee mmoosstt ssttrraaiigghhttffoorrwwaarrdd wwaayy ooff iimmpplleemmeennttiinngg aa DDCCTT aanndd aann IIDDCCTT iiss ttoo uussee tthhee 11--DD DDCCTT aanndd IIDDCCTT..  TThhee ffoolllloowwiinngg CC ccooddee sshhoowwss hhooww ttoo ttrraannssllaattee tthhee 11--DD eeqquuaattiioonnss ffoorr tthhee DDCCTT aanndd IIDDCCTT iinnttoo CC ccooddee..  TThhee pprrooggrraamm aallssoo ttaakkeess iinnttoo aaccccoouunntt tthhee nnuummeerriiccaall iissssuueess aassssoocciiaatteedd wwiitthh ffiixxeedd-- ppooiinntt pprroocceessssoorrss.. Chapter 18, Slide 10 Dr. Naim Dahnoun, Bristol University,
  • 11. IImmpplleemmeennttaattiioonn IIssssuueess ((11)) TThhee pprrooggrraamm rruunnss oonn tthhee DDSSKK wwiitthh tthhee CC66771111 aanndd ddooeess nnoott uussee aannyy ccoommmmuunniiccaattiioonn wwiitthh tthhee hhoosstt.. ((22)) TThhee sscceennaarryy..hh ffiillee iiss qquuiittee llaarrggee ((225566xx225566 88--bbiitt ppiixxeellss oorr 6655553366 bbyytteess)) aanndd tthheerreeffoorree nneeeeddss ttoo bbee llooccaatteedd iinn aa ssppeecciiffiicc mmeemmoorryy llooccaattiioonn iinn tthhee DDSSKK.. BByy uussiinngg tthhee ##pprraaggmmaa DDAATTAA__SSEECCTTIIOONN ((……)) ddiirreeccttiivvee tthhee ppiiccttuurree ccaann bbee llooccaatteedd iinn tthhee DDRRAAMM ((oorriiggiinn aaddddrreessss 00xx00880000 00000000)).. ((33)) FFoorr eexxaammppllee,, ##pprraaggmmaa DDAATTAA__SSEECCTTIIOONN ((iimmaaggee__iinn,, ““eexxtt__ssddrraamm””)) aalllloowwss tthhee iimmaaggee__iinn ddaattaa aarrrraayy ttoo bbee llooaaddeedd iinnttoo tthhee sseeccttiioonn ccaalllleedd ““eexxtt__ssddrraamm”” wwhhiicchh iiss ddeeffiinneedd iinn tthhee ccoommmmaanndd ffiillee.. TThhee ssaammee aapppplliieess ttoo iimmaaggee__oouutt.. ((44)) TThhee ddiirreeccttoorryy:: .... CChhaapptteerr 1188 -- DDiissccrreettee CCoossiinnee ttrraannssffoorrmmDDCCTT__CC__FFiixxeedd ccoonnttaaiinnss tthhee eennttiirree ssoouurrccee aanndd eexxeeccuuttaabbllee ffiilleess rreeqquuiirreedd.. TThhee pprrooggrraamm ccaann bbee llooaaddeedd iinnttoo tthhee DDSSKK aanndd bbyy uussiinngg tthhee ddiissppllaayy ffeeaattuurree ooff tthhee CCCCSS aass sshhoowwnn bbeellooww tthhee ccoonntteennttss ooff iimmaaggee__iinn aanndd iimmaaggee__oouutt ccaann bbee ddiissppllaayyeedd aanndd ccoommppaarreedd.. Chapter 18, Slide 11 Dr. Naim Dahnoun, Bristol University,
  • 12. IImmpplleemmeennttaattiioonn IIssssuueess GGrraapphh pprrooppeerrttiieess ffoorr iimmaaggee__iinn iimmaaggee__iinn GGrraapphh pprrooppeerrttiieess ffoorr iimmaaggee__oouutt iimmaaggee__oouutt Chapter 18, Slide 12 Dr. Naim Dahnoun, Bristol University,
  • 13. DDCCTT CCooddee aanndd LLiinnkkss  CCooddee llooccaattiioonn::  ……CChhaapptteerr 1188 -- DDiissccrreettee CCoossiinnee ttrraannssffoorrmmDDCCTT__CC__FFiixxeedd  PPrroojjeeccttss::  FFiixxeedd PPooiinntt iinn CC llaanngguuaaggee:: ddcctt__cc__ffiixxeedd..ppjjtt  LLiinnkkss::  LLiinnkkssIImmaaggiinngg KKiitt..ppddff Chapter 18, Slide 13 Dr. Naim Dahnoun, Bristol University,
  • 14. CChhaapptteerr 1188 DDiissccrreettee CCoossiinnee TTrraannssffoorrmm -- EEnndd --