redundancy (aka color video: 200mb/sec motivationdial/ece533/notes15.pdf · ece/opti533 digital...

14
ECE/OPTI533 Digital Image Processing class notes 288 Dr. Robert A. Schowengerdt 2003 IMAGE CODING storage versus transmission applications storage versus transmission applications source image source coder source decoder storage retrieved image source image source coder source decoder retrieved image channel coder channel decoder channel Motivation • Large amount of data in images Color video: 200Mb/sec Landsat TM multispectral satellite image: 200MB • High potential for compression Redundancy (aka correlation) in images – spatial, temporal, spectral

Upload: vukhue

Post on 28-Apr-2018

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 288 D

r. Robert A

. Schowengerdt 2003

IM

AGE C

OD

ING

sto

rag

e v

ers

us tra

nsm

issio

n a

pp

lica

tion

s

sto

rag

e v

ers

us tra

nsm

issio

n a

pp

lica

tion

s

sou

rce

ima

ge

sou

rce c

od

er

sou

rce d

ecod

er sto

rag

e

retrie

ved

ima

ge

sou

rce

ima

ge

sou

rce c

od

er

sou

rce d

ecod

er

retrie

ved

ima

ge

ch

an

nel c

od

er

ch

an

nel d

ecod

er

ch

an

nel

Motiv

atio

n

•La

rge a

mou

nt o

f da

ta in

ima

ges

Colo

r vid

eo: 2

00

Mb

/sec

La

nd

sa

t TM m

ultis

pectra

l sa

tellite

ima

ge: 2

00

MB

•H

igh

pote

ntia

l for c

om

pre

ssio

n

Red

un

da

ncy (a

ka

corre

latio

n) in

ima

ges – s

pa

tial, te

mp

ora

l, sp

ectra

l

Page 2: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 289 D

r. Robert A

. Schowengerdt 2003

IM

AGE C

OD

ING

Join

t pro

ba

bility

plo

ts (s

ca

tterg

ram

s) b

etw

een

p

ixels

with

giv

en

horiz

on

tal s

pa

cin

g

∆ =

1 2 3 4 5

6 7 8 9 10

11 12 13 14 15

•H

igh

corre

latio

n fo

r clo

se

neig

hb

ors

•A

s p

ixel s

ep

ara

tion

in

cre

ases, c

orre

latio

n

decre

ases

Page 3: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 290 D

r. Robert A

. Schowengerdt 2003

IM

AGE C

OD

ING

Lossy c

od

ing

•Som

e a

ccep

tab

le lo

ss o

f da

ta, w

ithou

t loss o

f “in

form

atio

n”

•Erro

r mea

su

res

Mea

n S

qu

are

Erro

r

Root M

ea

n S

qu

are

Erro

r

Norm

aliz

ed

Mea

n S

qu

are

Erro

r

Sig

na

l-to-N

ois

e R

atio

Pea

k-to

-pea

k S

NR

•Pro

ble

ms

Erro

r mea

su

res d

on

’t em

ph

asiz

e v

isu

ally

imp

orta

nt fe

atu

res s

uch

as c

on

trast e

dg

es

• C

an

imp

rove c

orre

latio

n o

f an

y o

f these e

rror m

ea

su

res w

ith v

isu

al q

ua

lity b

y re

stric

ting

to

“ed

ge p

ixels

” o

nly

How

to d

efin

e a

nd

qu

an

tify “

ima

ge q

ua

lity?”

MSE

DN

()

Variance

f̂f

–(

)=

RM

SED

N(

)M

SE

=

NM

SE%(

)100

MSE

()

Variance

⁄f()

=

SNR

dB(

)10

100N

MSE

⁄(

)log

=

PSN

RdB

()

10fm

axfm

in–

() 2

MSE

⁄[

]log

=

Page 4: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 291 D

r. Robert A

. Schowengerdt 2003

IM

AGE C

OD

ING

exa

mp

le w

ith JP

EG c

od

ing

1/8

1/1

6

1/3

2

NM

SE =

0.1

6%

NM

SE =

0.4

2%

NM

SE =

1.0

5%

RM

SE =

7.3

7 D

N

RM

SE =

4.6

3 D

N

RM

SE =

2.9

1 D

N

SN

R =

27

.9d

B

SN

R =

23

.8d

B

SN

R =

19

.8d

dB

Page 5: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 292 D

r. Robert A

. Schowengerdt 2003

IM

AGE C

OD

ING

Ru

n-L

en

gth

Cod

ing

•Sim

ple

, ima

ge d

om

ain

, lossy

com

pre

ssio

n a

lgorith

m

•Exp

loits

neig

hb

orin

g p

ixel

corre

latio

n, lin

e-b

y-lin

e

Work

s b

est fo

r sim

ple

, low

-freq

uen

cy

con

ten

t, nea

r-bin

ary

ima

ges, e

.g. fa

xes

•D

N th

resh

old

con

trols

qu

ality

loss

an

d c

om

pre

ssio

n ra

te

•Look fo

r “ru

ns”

con

tigu

ou

s p

ixels

with

sim

ilar v

alu

es (w

ithin

th

resh

old

of s

tartin

g p

ixel v

alu

e)

•Cod

e s

tartin

g p

ixel v

alu

e (Q

bits

) a

nd

len

gth

of lin

e (≤

log

N/lo

g2

b

its)

typ

ica

l beh

avio

r (ima

ge d

ep

en

den

t)

T

compression ratio

T

number of runs

T

average runlength 0 00

“intrinsic” runlength

Page 6: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 293 D

r. Robert A

. Schowengerdt 2003

IM

AGE C

OD

ING

Lossle

ss C

od

ing

•N

o d

ata

loss

•M

inim

al c

om

pre

ssio

n (ty

pic

ally

2:1

)

•Exa

mp

le a

lgorith

ms

Ru

n-L

en

gth

(with

zero

thre

sh

old

)

Lem

pel-Z

iv-W

els

h (L

ZW

)

Hu

ffma

n C

od

ing

Page 7: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 294 D

r. Robert A

. Schowengerdt 2003

IM

AGE C

OD

ING

Com

pon

en

ts o

f sou

rce c

od

er

•D

ata

tran

sfo

rma

tion

wa

vefo

rm c

od

er

tran

sfo

rm c

od

er

ima

ge m

od

el c

od

er

•Q

ua

ntiz

atio

n

bits

, tran

sfo

rm c

oeffic

ien

ts, o

r mod

el p

ara

mete

rs

•Cod

ew

ord

Assig

nm

en

t

un

iqu

e b

it strin

g fo

r ea

ch

qu

an

tized

pa

ram

ete

r

Page 8: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 295 D

r. Robert A

. Schowengerdt 2003

IM

AGE C

OD

ING

Wa

vefo

rm C

od

ing

•Pu

lse C

od

e M

od

ula

tion

(PCM

)

Ima

ge in

ten

sity

qu

an

tized

by u

nifo

rm

qu

an

tizer

At lo

w b

it rate

s (ty

pic

ally

less th

an

4 b

its/

pix

el), q

ua

ntiz

atio

n n

ois

e a

pp

ea

rs a

s

fals

e c

on

tou

rs in

are

as o

f low

inte

nsity

slo

pe

16 levels

8 levels

4 levels

Page 9: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 296 D

r. Robert A

. Schowengerdt 2003

IM

AGE C

OD

ING

Exa

mp

le 2

-bit u

nifo

rm q

ua

ntiz

er

3∆/2

−3

∆/2

∆/2

−∆/2

+∆−∆

bits

00

01

10

11

in

ou

t

=1

MSE =

0.0

62

8

in codew

ordout

error

1.211

1.5-0.3

1.511

1.50

-200

-1.5-0.5

-0.501

-0.50

0.510

0.50

0.610

0.50.1

-0.7501

-0.5-0.25

1.211

1.5-0.3

Alte

rna

te re

pre

sen

tatio

n:

−3

∆/2

−∆/2

∆/2

3∆/2

+∆−∆

bits

00

01

10

11

mid

-rise u

nifo

rm q

ua

ntiz

er

mid

-trea

d u

nifo

rm q

ua

ntiz

er

−∆/2

∆/2

3∆/2

+∆−∆

bits

00

00

10

10

01

01

−3

∆/2

0

00

1

Page 10: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 297 D

r. Robert A

. Schowengerdt 2003

IM

AGE C

OD

ING

•PCM

with

Non

un

iform

Qu

an

tiza

tion

Assig

n q

ua

ntiz

atio

n le

vels

accord

ing

to im

ag

e in

ten

sity

dis

tribu

tion

Sm

all im

pro

vem

en

t for ty

pic

al im

ag

es

• D

ep

en

ds o

n n

on

un

iform

ity o

f ima

ge h

isto

gra

m

For e

xa

mp

le, u

se C

DF a

s n

on

linea

r tran

sfo

rm, i.e

. his

tog

ram

eq

ua

liza

tion

• A

ssig

ns m

ore

levels

wh

ere

there

are

more

pix

els

sou

rce

ima

ge

non

linea

rcod

ed

ima

ge

un

iform

PCM

tran

sfo

rmn

on

linea

rtra

nsfo

rm-1

Page 11: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 298 D

r. Robert A

. Schowengerdt 2003

IM

AGE C

OD

ING

PCM

with

Pseu

do-n

ois

e

•A

dd

ran

dom

nois

e to

ima

ge b

efo

re P

CM

•Su

btra

ct s

am

e ra

nd

om

nois

e a

fter P

CM

•R

em

oves s

pa

tial c

orre

latio

n o

f qu

an

tiza

tion

nois

e

sou

rce

ima

ge

decod

ed

ima

ge

un

iform

PCM

η(m

,n)

Page 12: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 299 D

r. Robert A

. Schowengerdt 2003

IMA

GE C

OD

ING

exa

mp

le w

ith 3

bits

/pix

el a

nd

un

iform

ran

dom

nois

e

un

iform

min

us n

ois

e

ad

d n

ois

ePCM

(3b

its/p

ixel)

PCM

(3b

its/p

ixel)

Page 13: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 300 D

r. Robert A

. Schowengerdt 2003

IMA

GE C

OD

ING

Delta

Mod

ula

tion

•Cod

e d

iffere

nce o

f neig

hb

orin

g

pix

els

with

1 b

it

Assu

me s

om

e “

sca

n” p

atte

rn in

ima

ge

•R

ed

uces s

pa

tial c

orre

latio

n b

efo

re

cod

ing

exa

mp

le ro

w-b

y-ro

w im

ag

e s

ca

n

pa

ttern

Page 14: Redundancy (aka Color video: 200Mb/sec Motivationdial/ece533/notes15.pdf · ECE/OPTI533 Digital Image Processing class notes 288 IMAGE CODING source coder

EC

E/O

PT

I533 Digital Im

age Processing class notes 301 D

r. Robert A

. Schowengerdt 2003

IMA

GE C

OD

ING

Exa

mp

le

ima

ge:

67

88

59

10

8

68

97

79

11

9

diffe

ren

ces:

61

10

-4-1

20

12

1-2

-2-2

22

diffe

ren

ce ≥

0: c

od

ew

ord

= 1

diffe

ren

ce < 0

: cod

ew

ord

= 0

indifference

codeword

outerror

66

11

-0.3

71

17

0

81

18

-0.5

80

19

0

102

10

9-1

00.1

5-4

0-0.25

61

1-0.3

82

1

91

1

7-2

0

92

1

112

1

9-2

0

7-2

0