View
10
Download
0
Category
Preview:
Citation preview
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Imag
e C
ompr
essi
on
•O
utlin
e–
Fund
amen
tals
•R
edun
danc
ies
–Im
age
com
pres
sion
mod
els
–In
form
atio
n th
eory
impa
ct•
Entro
py•
Cod
ing
theo
rem
s–
Loss
-less
com
pres
sion
•V
aria
ble-
leng
th c
odin
g•
Bit-
plac
e co
ding
•Pr
edic
tive
codi
ng–
Loss
yco
mpr
essi
on•
Pred
ictiv
e co
ding
•Tr
ansf
orm
cod
ing
–C
ompr
essi
on st
anda
rds
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Fundam
enta
lsFu
ndam
enta
ls
•Dat
a co
mpr
essi
on: p
roce
ss o
f red
ucin
g th
e am
ount
of d
ata
requ
ired
to re
pres
ent a
giv
en q
uant
ity o
f in
form
atio
n.
•Dat
a an
d in
form
atio
n
•Dat
a co
nvey
s inf
orm
atio
n
•Dat
a re
dund
ancy
•Giv
en tw
o da
ta se
ts w
ith n
umbe
rs o
f inf
orm
atio
n-ca
rryi
ng u
nits
n1
and
n 2, c
orre
spon
ding
ly.
•Com
pres
sion
ratio
: CR=
n 1/n
2
•Rel
ativ
e da
ta re
dund
ancy
: RD=1
–1/
CR
•Thr
ee ty
pes o
f dat
a re
dund
ancy
•Cod
ing
redu
ndan
cy
•Int
erpi
xelr
edun
dand
ancy
•Psy
chov
isua
lred
unda
ncy
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Fundam
enta
ls:
Codin
g R
edundan
cyFu
ndam
enta
ls:
Codin
g R
edundan
cy
•His
togr
am a
naly
sis o
f gre
y-sc
ale
imag
es
•Giv
en d
iscr
ete
rand
om v
aria
ble
r k∈
[0,1
] rep
rese
ntin
g L
grey
leve
ls; k
=0,1
,2,…
L–
1;
each
r koc
curs
with
pro
babi
lity
p r(r
k), i.
e. p
r(rk)=
nk
/n, w
here
nk
is th
e nu
mbe
r of t
imes
th
at k
-thgr
ey le
vel a
ppea
rs a
nd n
is th
e to
tal n
umbe
r of p
ixel
s.
•Giv
en l(
r k) is
the
num
ber o
f bits
to re
pres
ent e
ach
valu
e of
r k. A
vera
ge n
umbe
r of b
its
requ
ired
to re
pres
ent e
ach
pixe
l is
•Tot
al n
umbe
r of b
its to
cod
e an
M×
Nim
age
is M
NL av
g
•Exa
mpl
e: 8
-leve
l im
age
code
d by
3-b
it bi
nary
cod
e an
d a
varia
ble-
leng
th c
ode
∑= =
=1 0
)(
)(
L kk
rk
avg
rp
rl
L
099
.011.1/1
111.1
7.2/3
7.2)
()
(
3)
(3
7
02
7
01
=−
==
=
==
==
∑∑==
DR
kk
rk
kk
r
RC
rp
rl
L
rp
L
avg
avg
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Fundam
enta
ls:
Codin
g R
edundan
cyFu
ndam
enta
ls:
Codin
g R
edundan
cy
•The
fund
amen
tal b
asis
of d
ata
com
pres
sion
thro
ugh
vari
able
-leng
th c
odin
g: fu
nctio
ns
p r(r
k) an
d l(
r k) ar
e in
vers
ely
prop
ortio
nal.
•Cod
e re
dund
ancy
occu
rs w
hen
the
code
doe
s not
min
imis
e th
e av
erag
e le
ngth
(not
full
adva
ntag
e of
pro
babi
litie
s is t
aken
)
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Fundam
enta
ls:
Inte
rpix
elRed
undan
cyFu
ndam
enta
ls:
Inte
rpix
elRed
undan
cy
•Rel
ated
to th
e in
terp
ixel
corr
elat
ions
w
ithin
an
imag
e
•spa
tial r
edun
danc
y, g
eom
etric
re
dund
ancy
, int
erfr
ame
redu
ndan
cy
•Mea
sure
d th
roug
h au
toco
rrel
atio
n co
effic
ient
s
•Tra
nsfo
rmat
ions
that
rem
ove
inte
rpix
elre
dund
ancy
are
cal
led
map
ping
s
∑∆
−−
=
∆+
∆−
=∆
∆=
∆
nN
yn
yx
fy
xf
nN
nAw
here
An
An
1
0)
,(
),
(1
)(
)0(/)
()
(γ
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Fundam
enta
ls:
Inte
rpix
elRed
undan
cyFu
ndam
enta
ls:
Inte
rpix
elRed
undan
cy
Exam
ple
of a
non
-vis
ual m
appi
ng:
•102
4x34
3 gr
ey-s
cale
imag
e tra
nsfo
rmed
to a
bi
nary
imag
e
•Eac
h lin
e is
repr
esen
ted
by a
sequ
ence
of p
airs
(g
i, w
i), w
here
gii
s the
i-th
leve
l and
wii
s the
nu
mbe
r of s
ucce
ssiv
e sa
mpl
e of
this
leve
l (ru
n le
ngth
).
•For
line
100
onl
y 88
bits
are
nee
ded
to re
pres
ent
the
1024
bits
of b
inar
y da
ta
•For
the
who
le im
age
1216
6 ru
ns
are
suff
icie
nt
•11
bits
repr
esen
t eac
h ru
n-le
ngth
pa
ir
62.063.2
11
63.211.
1216
61.
343
.10
24
=−
=
==
DR
RC
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Fundam
enta
ls:
Psy
cho-v
isual
Red
undan
cyFu
ndam
enta
ls:
Psy
cho-v
isual
Red
undan
cy
•Eye
doe
s not
resp
ond
with
equ
al se
nsiti
vity
to a
ll vi
sual
info
rmat
ion.
Cer
tain
info
rmat
ion
sim
ply
has l
ess r
elat
ive
impo
rtanc
e. T
his i
nfor
mat
ion
is sa
id to
be p
sych
o-vi
sual
ly
redu
ndan
t. It
can
be
elim
inat
ed w
ithou
t sig
nific
antly
impa
ring
the
qual
ity o
f im
age
perc
eptio
n.
•Som
e kn
owle
dge
abou
t how
the
brai
n re
cogn
izes
pic
ture
s is n
eede
d
•Psy
cho-
visu
al re
dund
ancy
diff
ers f
rom
the
prev
ious
two.
It is
ass
ocia
ted
with
real
vis
ual
info
rmat
ion.
Its e
limin
atio
n re
sults
in a
loss
of q
uant
itativ
e in
form
atio
n an
d it
is re
ferr
ed to
as
qua
ntiz
atio
n. It
is a
n irr
ever
sibl
e op
erat
ion
and
lead
s to
loss
yda
ta c
ompr
essi
on.
•Exa
mpl
e: im
prov
ed g
rey-
scal
e (I
GS)
qua
ntiz
atio
n.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Fundam
enta
ls:
Psy
cho-v
isual
Red
undan
cyFu
ndam
enta
ls:
Psy
cho-v
isual
Red
undan
cy
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Fundam
enta
ls:
Fidel
ity
Crite
ria
Fundam
enta
ls:
Fidel
ity
Crite
ria
•Obj
ectiv
ean
d su
bjec
tive
fidel
ity c
riter
ia to
ass
ess t
he in
form
atio
n lo
ss
•Roo
t-mea
n-sq
uare
err
or
or
M
ean-
squa
re si
gnal
-to-n
oise
ratio
• •Rat
ing
scal
es(s
ee T
able
8.3
) or
Sid
e-by
-sid
e co
mpa
rison
s
{-3,
-2, -
1, 0
, 1, 2
, 3}≡
{muc
h w
orse
, wor
se, s
light
ly w
orse
, the
sam
e, sl
ight
ly b
ette
r, be
tter,
muc
h be
tter}
∑∑∑
∑∑
∑− =
− =− =
− =− =
− =−
=
−
=1 0
1 02
1 0
1 02
2/11 0
1 02
)],
(ˆ)
,(
[
)],
([
)],
(ˆ)
,(
[1
M x
N y
M x
N ym
sM x
N yrm
sy
xf
yx
f
yx
fSN
Ry
xf
yx
fM
Ne
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Imag
e Com
pre
ssio
n M
odel
sIm
age
Com
pre
ssio
n M
odel
s
•A g
ener
al c
ompr
essi
on sy
stem
con
sist
s of a
n en
code
r and
a d
ecod
er.
•Sou
rce
enco
der (
and
deco
der)
: res
pons
ible
for r
educ
ing
or e
limin
atin
g re
dund
anci
es.
•Cha
nnel
enc
oder
(and
dec
oder
): re
duce
s the
impa
ct o
f cha
nnel
noi
se b
y ‘c
ontro
lled
redu
ndan
cy’.
Exam
ple:
Ham
min
g(7
,4) c
ode
Inter
pixel
rdnd
cy→
Psyc
ho-v
isual
rdnd
cy→
←co
ding
rdnd
cy
16
01
24
25
01
32
33
02
31
01
23
nu
mbe
r bi
t -4 a
give
n
bh
bb
bh
bh
bb
bh
bh
bb
bh
bb
bb
=⊕
⊕=
=⊕
⊕=
=⊕
⊕=
76
53
76
54
1
76
33
2
75
31
1
12
4
w
ord
code
co
rrec
ted
th
e
w
ord
nonz
ero
aby
ch
eck
parit
y
hh
hh
hh
hh
ch
hh
hc
hh
hh
cc
cc
⊕⊕
⊕=
⊕⊕
⊕=
⊕⊕
⊕=
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Ele
men
ts o
f In
form
atio
n T
heo
ryEle
men
ts o
f In
form
atio
n T
heo
ry
Mea
surin
g in
form
atio
n
The
gene
ratio
n of
info
rmat
ion
is m
odel
ed a
s a p
roba
bilis
tic p
roce
ss. R
ando
m e
vent
Eoc
curs
with
pro
babi
lity
P(E)
The
base
of t
he lo
garit
hm d
eter
min
es th
e un
its u
sed
to m
easu
re th
e in
form
atio
n. If
the
base
2
is se
lect
ed th
e re
sulti
ng in
form
atio
n un
it is
cal
led
bit.
If P
(E)=
0.5
(two
poss
ible
equ
ally
lik
ely
even
ts) t
he in
form
atio
n is
one
bit.
)(
log
)(1
log
)(
EP
EP
EI
−=
=
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Ele
men
ts o
f In
form
atio
n T
heo
ryEle
men
ts o
f In
form
atio
n T
heo
ry
•The
info
rmat
ion
chan
nel:
the
phys
ical
med
ium
that
link
s the
sour
ce to
the
user
(tel
. lin
e,
wire
, ele
ctro
mag
netic
wav
es, e
tc.)
•The
sour
ce•M
odel
ed a
s a d
iscr
ete
rand
om v
aria
ble
•Sou
rce
alph
abet
A={
a j}
•Sym
bols
(let
ters
) ajw
ith p
roba
bilit
iesP
(aj)
•The
ave
rage
self-
info
rmat
ion
obta
ined
from
kou
tput
s is
•The
ave
rage
info
rmat
ion
per s
ourc
e ou
tput
is
•(un
cert
aint
yor
ent
ropy
)
∑=
−=
=−
−−
−J j
jj
JJ
aP
aP
k
aP
akP
aP
akP
aP
akP
1
22
11
)(
log
)(
)(
log
)(
...)
(lo
g)
()
(lo
g)
(
∑=
−=
J jj
ja
Pa
PH
1)
(lo
g)
()
(z
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Ele
men
ts o
f In
form
atio
n T
heo
ryEle
men
ts o
f In
form
atio
n T
heo
ry
•The
cha
nnel
•The
info
rmat
ion
in th
e ou
tput
of t
he c
hann
el is
a d
iscr
ete
rand
om v
aria
ble
•Cha
nnel
alp
habe
t B={
b k}
with
lette
rs b
kw
ith p
roba
bilit
iesP
(bk)
•The
pro
babi
litie
s are
rela
ted
to th
e so
urce
z b
y co
nditi
onal
pro
babi
litie
s
•Cha
nnel
(tra
nsiti
on) m
atrix
∑
==
J jj
jk
ka
Pa
bP
bP
1)
(lo
g)
|(
)( [
])
|(
w
here
,)
|(
...)
|(
)|
(......
)|
()
|(
...)
|(
)|
(
211
2
12
11
1
jk
kjkj
JK
KK
J
ab
Pq
qa
bP
ab
Pa
bP
ab
Pa
bP
ab
Pa
bP
==
⋅⋅
⋅⋅
⋅=
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Ele
men
ts o
f In
form
atio
n T
heo
ryEle
men
ts o
f In
form
atio
n T
heo
ry
•The
cap
acity
of t
he c
hann
el•T
he c
ondi
tiona
l ent
ropy
func
tion
for e
ach
b k
•The
ave
rage
d va
lue
over
all
b k(e
quiv
ocat
ion)
•The
mut
ual i
nfor
mat
ion
of z
and
v
•The
cap
acity
∑=
−=
J jk
jk
jk
ba
Pb
aP
bH
1)
|(
log
)|
()
|(z
∑∑
∑=
==
−=
=J j
K kk
jk
jK k
kk
ba
Pb
aP
bP
bH
H1
11
)|
(lo
g)
,(
)(
)|
()
|(
zv
z
∑∑
∑∑
∑=
=
=
==
==
−=
J j
K kJ j
kjj
kjkj
jJ j
K kk
j
kj
kj
qa
Pqq
aP
bP
aP
ba
Pb
aP
HH
I1
11
11
)(
log
)(
)(
)(
),
(lo
g)
,(
)|
()
()
,(
vz
zv
z
[])
,(
max
vz
zI
C=
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Fundam
enta
l Codin
g T
heo
rem
sFu
ndam
enta
l Codin
g T
heo
rem
s
•The
nois
eles
s cod
ing
theo
rem
: how
to c
ompa
ct in
form
atio
n as
muc
h as
pos
sibl
e•C
onsi
der a
sour
ce o
f inf
orm
atio
n w
ith fi
nite
ens
embl
e (A
,z) a
nd st
atis
tical
ly in
depe
nden
t so
urce
sym
bols
: so-
calle
d ze
ro-m
emor
y so
urce
•Non
-ext
ende
d so
urce
pro
duce
s one
sym
bol a
nd th
e n-
thex
tens
ion
prod
uces
blo
ck ra
ndom
va
riabl
e of
nsy
mbo
ls. I
ts e
ntro
py is
ntim
es th
e en
tropy
of t
he si
ngle
sym
bol s
ourc
e
•The
sour
ce o
utpu
t is a
n n-
tupl
eof
sym
bols
•The
fina
l res
ult i
s
w
here
L` a
vgis
the
aver
age
wor
d le
ngth
of t
he
code
cor
resp
ondi
ng to
the
nth
exte
nsio
n
•The
eff
icie
ncy
of a
ny e
ncod
ing
stra
tegy
is n
HnL
Hav
g1
)(
')
(+
<≤
zz
avg
LHn
')
(z=
η
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Fundam
enta
l Codin
g T
heo
rem
sFu
ndam
enta
l Codin
g T
heo
rem
s
•The
nois
y co
ding
theo
rem
: how
to e
nsur
e a
relia
ble
com
mun
icat
ion
•The
sim
ples
t way
: by
a re
petit
ive
mes
sagi
ng
•Cod
e of
size
ϕan
d bl
ock
leng
th r
has r
ate
R=
log
(ϕ/r
)
•For
any
rate
R <
C, t
he c
apac
ity o
f the
cha
nnel
, the
re e
xist
an
inte
ger r
and
code
of b
lock
le
ngth
ran
d ra
te R
such
that
the
prob
abili
ty o
f blo
ck d
ecod
ing
erro
r is l
ess t
han
(any
) ε >
0.
•The
sour
ce c
odin
g th
eore
m: t
he c
hann
el is
err
or-f
ree
but t
he e
ncod
ing
proc
ess i
s los
sy,
henc
e a
rate
-dis
torti
on c
ompr
omis
e
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Err
or-
free
Com
pre
ssio
nErr
or-
free
Com
pre
ssio
n
•Var
iabl
e-le
ngth
cod
ing
redu
ces o
nly
codi
ng re
dund
ancy
by
assi
gnin
g th
e sh
orte
st p
ossi
ble
code
wor
ds to
the
mos
t pro
babl
e (g
rey)
leve
ls.
•Huf
fman
cod
ing
(cod
es o
ne sy
mbo
l at a
tim
e)
•Ord
er th
e pr
obab
ilitie
s of t
he sy
mbo
ls
and
com
bine
the
low
est p
roba
bilit
y sy
mbo
ls in
to a
sing
le sy
mbo
l
•Cod
e ea
ch re
duce
d so
urce
wor
king
bac
k to
the
orig
inal
sour
ce.
0.97
3ef
f.
code
lbi
ts/s
ymbo
14.2
lbi
ts/s
ymbo
2.2
==
=
EL avg
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Err
or-
free
Com
pre
ssio
nErr
or-
free
Com
pre
ssio
n
•For
a la
rge
num
ber o
f sym
bols
to b
e co
ded
Huf
fman
cod
ing
is c
ompu
tatio
nally
com
plex
. O
ther
cod
es p
rovi
de a
trad
e-of
f bet
wee
n co
ding
eff
icie
ncy
and
sim
plic
ity.
•Tru
ncat
ed H
uffm
an c
odin
g: c
odes
with
Huf
fman
cod
e on
ly th
e m
ost p
roba
ble
sym
bols
. All
othe
rs a
re c
oded
by
pref
ix a
nd fi
xed-
leng
th c
ode
•B-c
ode:
mad
e by
con
tinua
tion
bits
and
info
rmat
ion
bits
•Shi
ft co
des:
•Arr
angi
ng th
e sy
mbo
ls b
y th
eir (
mon
oliti
caly
dec
reas
ing)
pro
babi
litie
s
•div
idin
g th
e to
tal n
umbe
r of s
ymbo
ls in
to e
qual
ly si
zed
bloc
ks
•cod
ing
the
indi
vidu
al e
lem
ents
with
in a
ll bl
ocks
iden
tical
ly
•add
ing
shift
-up
and/
or sh
ift-d
own
sym
bols
to id
entif
y ea
ch b
lock
.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Err
or-
free
Com
pre
ssio
nErr
or-
free
Com
pre
ssio
n
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Err
or-
free
Com
pre
ssio
nErr
or-
free
Com
pre
ssio
n
•Arit
hmet
ic c
odin
g
•An
entir
e se
quen
ce o
f sou
rce
sym
bols
(a m
essa
ge) i
s ass
igne
d a
sing
le a
rithm
etic
co
de w
ord
•The
cod
e w
ord
defin
es a
n in
terv
al o
f rea
l num
bers
bet
wee
n 0
and
1
•Eac
h sy
mbo
l red
uces
the
size
of t
he in
terv
al in
acc
orda
nce
with
its p
roba
bilit
y.
•Exa
mpl
e: fi
ve-s
ymbo
l mes
sage
from
a fo
ur-s
ymbo
l sou
rce
is b
eing
cod
ed
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Err
or-
free
Com
pre
ssio
n:
Bit-p
lane
Codin
gErr
or-
free
Com
pre
ssio
n:
Bit-p
lane
Codin
g
•Bit-
plan
e de
com
posi
tion:
•Dire
ct se
para
tion
into
m1-
bit p
lane
s
•Gra
y co
de (s
ucce
ssiv
e co
de w
ords
diff
er in
onl
y on
e bi
t pos
ition
)
00
11
22
11
22
22
aa
aa
mm
mm
++⋅⋅⋅
++
−−
−−
11
12
0
−−
+
=−
≤≤
⊕=
mm
ii
i
ag
mi
aa
g
Exam
ple:
two
1024
×102
4 im
ages
: one
mon
ochr
ome
a on
e bi
nary
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Err
or-
free
Com
pre
ssio
n:
Bit-p
lane
Codin
gErr
or-
free
Com
pre
ssio
n:
Bit-p
lane
Codin
g
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Err
or-
free
Com
pre
ssio
n:
Bit-p
lane
Codin
gErr
or-
free
Com
pre
ssio
n:
Bit-p
lane
Codin
g
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Err
or-
free
Com
pre
ssio
n:
Bit-p
lane
Codin
gErr
or-
free
Com
pre
ssio
n:
Bit-p
lane
Codin
g
•Con
stan
t Are
a C
odin
g (C
AS)
•The
imag
e is
div
ided
into
blo
cks o
f siz
e p×
q, c
lass
ified
as w
hite
, bla
ck o
r mix
ed; t
he m
ost
prob
able
is a
ssig
ned
0, th
e ot
her t
wo
cate
gorie
s are
ass
igne
d 10
and
11.
•Whi
te b
lock
skip
ping
(WB
S): w
hite
blo
cks a
re c
oded
by
0 an
d al
loth
ers b
y a
1 fo
llow
ed b
y th
e bi
t pat
tern
of t
he b
lock
•O
ne-d
imen
sion
al ru
n-le
ngth
cod
ing
•Rep
rese
nt (r
ow-w
ise)
sucs
essi
veru
ns o
f bla
ck o
r whi
te p
ixel
s•T
he ru
n-le
ngth
s can
be
code
d ad
ditio
nally
by
a va
riabl
e-le
ngth
cod
e•T
wo-
dim
ensi
onal
run-
leng
th c
odin
g
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Loss
less
Pre
dic
tive
Codin
gLo
ssle
ss P
redic
tive
Codin
g
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Loss
less
Pre
dic
tive
Codin
gLo
ssle
ss P
redic
tive
Codin
g
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Loss
yCom
pre
ssio
nLo
ssy
Com
pre
ssio
n
•Los
syen
codi
ng is
bas
ed o
n th
e co
ncep
t of c
ompr
omis
ing
the
accu
racy
of t
he re
cons
truct
ed
imag
e in
exc
hang
e fo
r inc
reas
ed c
ompr
essi
on
•Qua
ntiz
atio
n bl
ock
is a
n es
sent
ial p
art o
f the
enc
oder
•Los
sypr
edic
tive
codi
ng
•The
qua
ntiz
erm
aps t
he p
redi
ctio
n er
ror i
nto
a lim
ited
rang
e of
out
puts
•The
pre
dict
or is
pla
ced
in th
e fe
edba
ck lo
op, t
hus a
chie
ving
the
sam
e pr
edic
tion
bloc
k in
the
deco
der
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Loss
yCom
pre
ssio
nLo
ssy
Com
pre
ssio
n
•Del
ta m
odul
atio
n: a
n on
e-bi
t per
pix
el re
pres
enta
tion
•Exa
mpl
e fo
r α =
1,
ζ =
6.5
•Eff
ects
such
as g
ranu
lar n
oise
(αto
o hi
gh)
or sl
ope
over
load
(αto
o sm
all)
othe
rwis
e0
for
ˆ
1
>
−+=
=−
nn
nn
ee
ff
ζζα
&&
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Loss
yCom
pre
ssio
nLo
ssy
Com
pre
ssio
n
•Diff
eren
tial p
ulse
cod
e m
odul
atio
n:
an o
ptim
al in
mea
n-sq
uare
sens
e pr
edic
tor.
•Con
stra
ints
:
•qua
ntiz
atio
n er
ror a
ssum
ed to
be
negl
igib
le
•the
pre
dict
ion
is a
line
ar c
ombi
natio
n of
m p
revi
ous p
ixel
s.
•Com
puta
tion
of th
e au
toco
rrel
atio
n m
atrix
is d
iffic
ult i
n pr
actic
e. In
stea
d, a
m
odel
(e.g
. 2-D
Mar
kov
sour
ce) i
s us
ed
•The
sum
of t
he p
redi
ctio
n co
effic
ient
s sh
ould
be
smal
ler t
han
1 to
ens
ure
the
sam
e ou
tput
gre
y le
vels
{}
[]
{}
[]
[]
{}
{}
{}
{}
{}
{}
{}
{}
{}
{}
=
=
⋅⋅
⋅⋅
⋅=
=
−
=−
=
=
=+
≈+
=
−−−
−−
−−
−−
−−
−−
−−
−−
×
−
=−
=−
∑∑
mm
nn
nn
nn
mn
mn
nm
nn
mn
nn
mn
nn
nn
n
mm
m ii
ni
nn
nn
m ii
ni
n
nn
nn
nn
ff
E
ff
Ef
fE
ff
Ef
fE
ff
E
ff
Ef
fE
ff
Ef
fE
ff
Ef
fE
eE
ff
ff
ef
ef
ααα
α
α
α
α
:
;
:
.........
w
here
ˆ
ˆ
ˆˆ
221
211
2
12
11
1
1
2
1
22
1
1
r
RrR&
&
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Loss
yCom
pre
ssio
nLo
ssy
Com
pre
ssio
n
•Opt
imal
qua
ntiz
atio
n: g
iven
a
stai
rcas
e fu
nctio
n t =
q(s
), th
e de
sign
pr
oble
m is
to se
lect
the
best
s iand
t ifor
an
inpu
t den
sity
func
tion
p(s)
•The
reco
nstru
ctio
n le
vels
t iare
th
e ce
ntro
idso
f the
are
as u
nder
p(
s)
•The
dec
isio
n le
vels
s iare
ha
lfway
bet
wee
n th
e re
cons
truct
ion
leve
ls
•The
obt
aine
d qu
antiz
eris
cal
led
(L-le
vel)
Lloy
d-M
ax q
uant
izer
•
2/1
2/,..
.2,1
0
20
2/,..
.,2,1
0)
()
(
1
1
Li
Li
it
ts
Li
sp
ts
ii
is si
i i
=−
==
∞+=
==
−
+
−∫
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g
•Gen
eral
sche
me
•The
tran
sfor
m h
as to
dec
orre
late
the
pixe
ls o
r to
com
pact
as m
uch
info
rmat
ion
as
poss
ible
into
the
smal
lest
num
ber o
f tra
nsfo
rm c
oeff
icie
nts
•The
qua
ntiz
atio
n se
lect
ivel
y el
imin
ates
or m
ore
coar
sely
qua
ntiz
es th
e le
ss
info
rmat
ive
coef
ficie
nts
•Var
iabl
e-le
ngth
cod
ing
elim
inat
es th
e re
mai
ned
codi
ng re
dund
ancy
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g
•Tra
nsfo
rm se
lect
ion
•Def
ined
by
forw
ard
and
inve
rse
trans
form
atio
n ke
rnel
s (ba
sis
func
tions
, bas
is im
ages
)
•Sep
arab
le k
erne
ls
•Sym
met
ric k
erne
ls)
,(
),
()
,,
,(
),
()
,(
),
,,
(
1,..
.2,1,0
,fo
r x
),
,,
()
,(
),
(
1,..
.2,1,0
,fo
r )
,,
,(
),
()
,(
11
211 0
1 0
1 0
1 0
vy
gu
xg
vu
yx
gv
yg
ux
gv
uy
xg
Ny
vu
yx
hv
uT
yx
f
Nv
uv
uy
xg
yx
fv
uT
N u
N v
N x
N y
==
−=
=
−=
=
∑∑
∑∑
− =
− =
− =
− =
•Fou
rier t
rans
form
•Wal
sh-H
adam
ard
trans
form
Nyv
uxj
Nyv
uxj
ev
uy
xh
eN
vu
yx
g
/)(
2
/)(
22
),
,,
(
1)
,,
,(
+
+−
==
π
π
)(
)(
)(
:)
()
()
()
()
()
()
()
(
2
whe
re)1
(1
),
,,
()
,,
,(
01
1
32
2
21
1
10
)(
)(
)(
)(
0
ub
ub
up
ub
ub
up
ub
ub
up
ub
up
NN
vu
yx
hv
uy
xg m
mm
mmm
mv
py
bu
px
bm i
ii
ii
+=
+=
+==
=∑
−=
=
−
−−
−−−
+=
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g
•Wal
sh-H
adam
ard
trans
form
ker
nel c
onsi
sts o
f alte
rnat
ing
plus
and
min
us 1
’s a
rran
ged
in
a ch
ecke
rboa
rd p
atte
rn
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g 1,..
.2,1
for
0fo
r
21
)(
2)1
2(co
s2
)12(
cos
)(
)(
),
,,
()
,,
,(
−==
=
+
+
==
Nuu
NNu
Nv
yN
ux
vu
vu
yx
hv
uy
xg α
ππ
αα
•Dis
cret
e C
osin
e Tr
ansf
orm
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g
50%
of t
rans
form
coe
ffic
ient
s dis
rega
rded
Res
idua
l im
ages
are
not
zer
o bu
t som
e m
ean-
squa
re e
rror
rms Fo
urie
r=1.
28
rms W
alsh
=0.8
6
rms D
CT=
0.68
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g
[]
∑∑
∑∑
∑∑∑
∑
− =
− =
− =
− =
− =
− =− =
− =
−=
−==
=
−−
−−
⋅⋅
⋅⋅
⋅−
=
=
=
1 0
1 02
),
(
2
1 0
1 0
1 0
1 01 0
1 0
),
(1
ˆ
),
()
,(
ˆt
sign
ifica
n is )
,(
if
tsi
gnifi
can
-no
n is )
,(
if 10
),
(
),
,1,1
(...
),
,1,1(
),
,0,1(
......)
,,0,1(
),
,1,0(
...)
,,1,0(
),
,0,0(
),
(
),
,,
()
,(
),
(
n u
n vv
uT
ms
n u
n vuv
uv
n u
n vuv
n u
n v
vu
Ee
vu
Tv
u
vu
Tv
uT
vu
vu
nn
hv
un
hv
un
h
vu
hv
un
hv
uh
vu
h
vu
T
vu
yx
hv
uT
yx
f
γσ
γ
γ
FF
HFH
HF
•Bas
is im
ages
and
ene
rgy
com
pact
ion
•The
mat
rix F
is d
efin
ed a
s a li
near
co
mbi
natio
n of
n2
mat
rices
of s
ize
n×n
(bas
is m
atric
es)
•mas
king
func
tion
to g
et tr
unca
ted
expa
nsio
n
•The
mea
n-sq
uare
app
roxi
mat
ion
erro
r is t
he su
m o
f the
var
ianc
es o
f th
e di
scar
ded
coef
ficie
nts
•The
Opt
imal
Kar
hune
n-Lo
eve
Tran
sfor
m a
nd it
s app
roxi
mat
ions
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g
•Bou
ndar
y (G
ibbs
-like
) eff
ects
: mor
e vi
sibl
e fo
r the
Fou
rier t
rans
form
and
less
vis
ible
for
the
DC
T
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g
•Sub
imag
esi
ze se
lect
ion:
com
puta
tiona
l com
plex
ity v
ersu
s cod
ing
effic
ienc
y
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
codin
gTra
nsf
orm
codin
g
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g
•Bit
allo
catio
n: z
onal
cod
ing
(bas
ed o
n m
axim
um v
aria
nce)
or
thre
shol
d co
ding
(bas
ed o
n m
axim
um a
mpl
itude
)
•Zon
al c
odin
gim
plem
enta
tion:
info
rmat
ion
is v
iew
ed a
s un
certa
inty
. Tra
nsfo
rm c
oeff
icie
nts w
ith m
axim
um v
aria
nce
carr
y te
mos
t of i
mag
e in
form
atio
n an
d ha
ve to
be
reta
ined
.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g
•Zon
al c
odin
gim
plem
enta
tion:
info
rmat
ion
is v
iew
ed a
s unc
erta
inty
. Tra
nsfo
rmco
effic
ient
s with
max
imum
var
ianc
e ca
rry
tem
ost o
f im
age
info
rmat
ion
and
have
to b
e re
tain
ed.
•Zon
al m
asks
are
show
ing
the
num
ber o
f bits
use
d to
cod
e ea
ch c
oeff
icie
nt
•Fix
ed n
umbe
r of b
its fo
r eac
h co
eff.
•Bit
budg
et d
istri
bute
d un
equa
lly
•Llo
yd-M
ax q
uant
izer
•Ray
leig
hpd
fmod
el fo
r the
dc
•Lap
laci
anfo
r the
rem
aini
ng c
oeff
.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g
•Thr
esho
ld c
odin
gim
plem
enta
tion:
Tra
nsfo
rm c
oeff
icie
nts o
f lar
gest
mag
nitu
de m
ake
to
mos
t sig
nific
ant c
ontri
butio
n to
reco
nstru
cted
subi
mag
equ
ality
. •T
he re
tain
ed c
oeff
icie
nts a
re re
orde
red
in 1
-D m
anne
r (zi
g-za
gsc
anni
ng) a
nd th
en ru
n-le
ngth
cod
ed
•Thr
esho
ldin
g •S
ingl
e gl
obal
thre
shol
d to
all
coef
f.
•lev
el o
f com
pres
sion
var
ies
•Diff
eren
t for
diff
eren
t sub
imag
es
•con
stan
t cod
ing
rate
•Var
ying
(with
the
loca
tion)
thre
shol
d
•com
bine
s thr
esho
ldin
g w
ith
qu
antiz
atio
n
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g
),
()
,(ˆ
),
(
),
()
,(
),
(ˆ
)1,1
(...
)1,1(
)0,1(
......)0,1(
)1,0(
...)1,0(
)0,0(
vu
Zv
uT
vu
T
vu
Zv
uT
roun
dv
uT
nn
Zn
Zn
Z
Zn
ZZ
Z =
=
−−
−−
⋅⋅
⋅⋅
⋅−
=
&ZZ
is a
tran
sfor
m n
orm
aliz
atio
n ar
ray
Bef
ore
rest
orat
ion,
the
norm
aliz
ed (t
hres
hold
ed a
nd
quan
tized
) im
age
mus
t be
deno
rmal
ized
.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Tra
nsf
orm
Codin
gTra
nsf
orm
Codin
g Cr1
=34
Cr2
=67
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
Dig
ital I
mag
e Pro
cess
ing,
2nd
ed.
www.imageprocessingbook.com
© 2
002
R. C
. Gon
zale
z &
R. E
. Woo
ds
Imag
e Com
pre
ssio
nIm
age
Com
pre
ssio
n
End o
f Par
t 1
End o
f Par
t 1
Recommended