continuous 2-d functionsdial/ece533/notes4.pdfece/opti533 digital image processing class notes 72...
TRANSCRIPT
EC
E/O
PT
I533 Digital Im
age Processing class notes 72 D
r. Robert A
. Schowengerdt 2003
2
-D M
ATH
OPER
ATIO
NS
CO
NTIN
UO
US 2
-D F
UN
CTIO
NS
EC
E/O
PT
I533 Digital Im
age Processing class notes 73 D
r. Robert A
. Schowengerdt 2003
2
-D M
ATH
OPER
ATIO
NS
2-D
CO
NV
OLU
TION
Defin
ition
•Exte
nsio
n o
f 1-D
con
volu
tion
Pro
pertie
s
•g
en
era
lly s
am
e a
s 1
-D c
on
volu
tion
(com
mu
tativ
e, d
istrib
utiv
e,
associa
tive)
Defin
e c
om
mu
tativ
e, d
istrib
utiv
e, a
ssocia
tive o
pera
tion
s
gx
y,(
)f
xy,
() ❉
❉ h
xy,
()
fα
β,(
)hx
αy
β–
,–
()
αβd
d∞– ∞∫
∞– ∞∫=
=
EC
E/O
PT
I533 Digital Im
age Processing class notes 74 D
r. Robert A
. Schowengerdt 2003
2
-D M
ATH
OPER
ATIO
NS
Sim
plifie
s fo
r sep
ara
ble
fun
ctio
ns
• G
en
era
l ca
se
• C
ase I: h
(or f) s
ep
ara
ble
gx
y,(
)f
xy,
() ❉
❉ h
xy,
()
=
gx
y,(
)f
xy,
() ❉
❉
h1
x()h2
y()[
]=
fx
y,(
) ❉ h
1x() ❉
h2
y()=
two 1
-D
con
volu
tion
s
EC
E/O
PT
I533 Digital Im
age Processing class notes 75 D
r. Robert A
. Schowengerdt 2003
2
-D M
ATH
OPER
ATIO
NS
• C
ase II: f a
nd h
sep
ara
ble
gx
y,(
)f
1x() ❉
h1
x()[
]f
2y() ❉
h2
y()[
]=
g1
x()g2
y()=
g(x
,y) is
als
o
sep
ara
ble
EC
E/O
PT
I533 Digital Im
age Processing class notes 76 D
r. Robert A
. Schowengerdt 2003
2
-D M
ATH
OPER
ATIO
NS
Exa
mp
le
•For s
imp
le g
rap
hic
s, le
t f an
d h
be b
ina
ry “
ma
sk” fu
nctio
ns, e
qu
al
to o
ne w
ithin
the b
ou
nd
ary
an
d z
ero
els
ew
here
x
yf(x,y)
x
y
α
β
α
β
α
βα
β
h(x,y)h(−α
,−β)
h(x0 −α
,y0 −β)
f(α,β)h(x
0 −α,y
0 −β)
flip (ro
tate
-18
0°)
m
ultip
ly
inte
gra
te
(x0 ,y
0 )
sh
ift
fα
β,(
)hx
0α
y0
β–
,–
()
αβd
d
∞– ∞∫∞– ∞∫
g(x0 ,y
0 )
(x0 ,y
0 )
(x0 ,y
0 )
EC
E/O
PT
I533 Digital Im
age Processing class notes 77 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
2-D
CO
RR
ELA
TION
Iden
tica
l to 2
-D c
on
volu
tion
, excep
t neith
er
fun
ctio
n is
“flip
ped
”
Imp
orta
nt d
iffere
nce
• n
ot c
om
mu
tativ
e
gx
y,(
)f
xy,
() ★
★ h
xy,
()
fα
β,(
)hα
x–
βy
–,
()
αβd
d∞– ∞∫
∞– ∞∫=
=
f ★★
hh
★★
f≠
EC
E/O
PT
I533 Digital Im
age Processing class notes 78 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
2-D
FO
UR
IER
TRA
NSFO
RM
S
Forw
ard
tran
sfo
rm
Invers
e tra
nsfo
rm
Pro
pertie
s
•1
-D tra
nsfo
rm p
rop
ertie
s g
en
era
lly a
lso a
pp
ly to
2-D
tran
sfo
rm
•U
sefu
l pro
perty
:
Fu
v,(
)f
xy,
()e
j2πxu
yv+
()
–xd
yd∞– ∞∫
∞– ∞∫=
fx
y,(
)F
uv,
()e
j2πxu
yv+
()
udvd
∞– ∞∫∞– ∞∫
=
Fu
v,(
)e
j–
2πyv
fx
y,(
)ej2π
xu–
xd∞– ∞∫
yd
∞– ∞∫=
EC
E/O
PT
I533 Digital Im
age Processing class notes 79 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
2-D
Fou
rier Tra
nsfo
rm o
f Sep
ara
ble
Fu
nctio
ns
•Pro
du
ct o
f two 1
-D tra
nfo
rms
•N
ote
the d
iffere
nce fro
m c
on
volu
tion
theore
m!
fx
y,(
)f
1x()f
2y()
=
F1
u()
f1
x()ej2π
xu–
x , F2
v()f
2y()e
j2πyv
–yd
∞– ∞∫=
d∞– ∞∫
=
Fu
v,(
)e
j–
2πyv
fx
y,(
)ej2π
xu–
xd∞– ∞∫
yd
∞– ∞∫=
f2
y()ej
–2π
yvf
1x()e
j2πxu
–xd
∞– ∞∫
y F
1u(
)f
2y()e
j–
2πyv
yd∞– ∞∫
=d
∞– ∞∫=
F1
u()F
2v()
=
EC
E/O
PT
I533 Digital Im
age Processing class notes 80 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
2-D
Fou
rier Tra
nsfo
rm P
rop
ertie
s
Sh
ow
tha
t the a
ffine p
rop
erty
red
uces to
the s
hiftin
g p
rop
erty
or th
e s
ca
l-in
g p
rop
erty
with
ap
pro
pria
te p
ara
mete
rs
na
me
f(x,y
)F(u
,v)
sep
ara
bility
sca
ling
sh
ifting
linea
rity
(su
perp
ositio
n)
con
volu
tion
affin
e
f1
x()f2
y()F
1u(
)F2
v()
fx
a⁄y
b⁄,
()
ab
Fa
ub
v,
()
fx
a±
yb
±,
()
ej2π
au
bv
+(
)±
Fu
v,(
)
af
1x
y,(
)b
f2
xy,
()
+a
F1
uv,
()
bF
2u
v,(
)+
f1
xy,
()* *
f2
xy,
()
F1
uv,
()
F2
uv,
()
⋅
f1
xy,
()
f2
xy,
()
⋅F
1u
v,(
)* *F
2u
v,(
)
fa
xb
yc
++
dx
eyf
++
,(
)1∆ ------e
j–
2π∆ ------
b
fec
–(
)ud
ca
f–
()v
+[
]Feu
dv
–∆------------------
bu
–a
v+∆
-----------------------,
, where ∆
ae
db
–=
EC
E/O
PT
I533 Digital Im
age Processing class notes 81 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
2-D
Fou
rier Tra
nsfo
rm P
airs
descrip
tive
na
me o
f f(x
,y)
pic
ture
of
f(x,y
)f(x
,y)
F(u
,v)
descrip
tive
na
me o
f F(u
,v)
pic
ture
of
|F(u
,v)|
delta
con
sta
nt
bla
de
bla
de
ripp
led
ou
ble
d
elta
δx
y,(
)1
δx()
δv()
2πa
x(
)cos
12a
---------δδua ---
δ
v()
EC
E/O
PT
I533 Digital Im
age Processing class notes 82 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
ripp
led
ou
ble
d
elta
dou
ble
b
lad
e
box
descrip
tive
na
me o
f f(x
,y)
pic
ture
of
f(x,y
)f(x
,y)
F(u
,v)
descrip
tive
na
me o
f F(u
,v)
pic
ture
of
|F(u
,v)|
2πa
y(
)cos
12a
---------δδva ---
δ
u()
12a
---------δδxa ---
2πa
u(
)δv()
cos
rectx
y,(
)sinc
uv,
()
EC
E/O
PT
I533 Digital Im
age Processing class notes 83 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
grid
or
bed
-of-n
ails
grid
or
bed
-of-n
ails
descrip
tive
na
me o
f f(x
,y)
pic
ture
of
f(x,y
)f(x
,y)
F(u
,v)
descrip
tive
na
me o
f F(u
,v)
pic
ture
of
|F(u
,v)|
trix
y,(
)sinc
2u
v,(
)
ga
us
xy,
()
ga
us
uv,
()
com
bx
y,(
)co
mb
uv,
()
EC
E/O
PT
I533 Digital Im
age Processing class notes 84 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
2-D
FO
UR
IER
TRA
NSFO
RM
S IN
PO
LA
R C
OO
RD
INA
TES
Usefu
l for ra
dia
l fun
ctio
ns
•cyl(r/d
) describ
es th
e tra
nsm
issio
n fu
nctio
n o
f a c
ircu
lar o
ptic
al
ap
ertu
re
y
x
1
tran
sm
issio
n =
0
tran
sm
issio
n =
1
rθ
t(r) = c
yl(r/d
)
ap
ertu
re
EC
E/O
PT
I533 Digital Im
age Processing class notes 85 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
Deriv
e a
sp
ecia
l Fou
rier tra
nsfo
rm fo
r su
ch
fu
nctio
ns
•Su
bstitu
te:
sp
ace d
om
ain
s
pa
tial fre
qu
en
cy d
om
ain
wh
ere
a
nd
Fu
v,(
)f
xy,
()e
j2πxu
yv+
()
–xd
yd∞– ∞∫
∞– ∞∫=
fx
2y
2+
()e
j2πxu
yv+
()
–xd
yd∞– ∞∫
∞– ∞∫=
xr
θcos
=
yr
θsin
=
uρ
φcos
=
vρ
φsin
=
rx
2y
2+
=
ρu
2v
2+
=
θy
x⁄(
)atan
=
φv
u⁄(
)atan
=
EC
E/O
PT
I533 Digital Im
age Processing class notes 86 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
Ha
nkel Tra
nsfo
rm
•2
-D F
ou
rier tra
nsfo
rm in
pola
r coord
ina
tes
wh
ere
J0( ) is
the z
ero
-ord
er B
essel fu
nctio
n o
f the firs
t kin
d.
• S
imp
lifyin
g, w
e h
ave th
e z
ero
-ord
er H
an
kel tra
nsfo
rm,
•If f(r,θ
) = f(r) (c
ircu
larly
sym
metric
), then
F(ρ,φ
) = F
(ρ)
Fρ
φρ
φsin
,cos
()
rr
θf
r()ej2π
ρr
θφ
–(
)cos
–d
0 2π∫d
0 ∞∫=
fr()r
r2π
J0
2πρ
r(
)[
]d
0 ∞∫=
Fρ
φρ
φsin
,cos
()
2πf
r()J0
2πρ
r(
)rrd
0 ∞∫=
EC
E/O
PT
I533 Digital Im
age Processing class notes 87 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
Invers
e H
an
kel tra
nsfo
rm
fr()
2πF
ρ()J
02π
rρ(
)ρρd
0 ∞∫=
EC
E/O
PT
I533 Digital Im
age Processing class notes 88 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
Ha
nkel Tra
nsfo
rm P
rop
ertie
s
na
me
f(r)F(ρ
)
sca
ling
con
volu
tion
frb ---
b2F
bρ(
)
fr() ❉
❉ h
r()F
ρ()H
ρ()
EC
E/O
PT
I533 Digital Im
age Processing class notes 89 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
Ha
nkel Tra
nsfo
rm P
airs
f(r)F( ρ
)
1
1/r1/ ρ
cyl(r)
e-r
gaus(r)gaus(ρ)
δr()
πr
----------
π4 ---som
bρ(
)
2π
4π2ρ
21
+(
) 32⁄
-----------------------------------
EC
E/O
PT
I533 Digital Im
age Processing class notes 90 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
• S
um
ma
ry - c
on
tinu
ou
s 2
-D fu
nctio
ns
ca
se
con
volu
tion
Fou
rier tra
nsfo
rm
gen
era
l
h s
ep
ara
ble
both
sep
ara
ble
rad
ial
fun
ctio
ns
fx
y,(
) ❉ ❉
hx
y,(
)F
uv,
()H
uv,
()
fx
y,(
) ❉ h
1x() ❉
h2
y()F
uv,
()H
1u(
)H2
v()
f1
x() ❉ h
1x()
[]
f2
y() ❉ h
2y()
[]
F1
u()H
1u(
)F2
v()H2
v()
fr() ❉
❉ h
r()F
ρ()H
ρ()
EC
E/O
PT
I533 Digital Im
age Processing class notes 91 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
DIS
CR
ETE
2-D
FU
NCTIO
NS
EC
E/O
PT
I533 Digital Im
age Processing class notes 92 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
2-D
CO
NV
OLU
TION
Defin
ition
•Exte
nsio
n o
f 1-D
con
volu
tion
Pro
pertie
s
•g
en
era
lly s
am
e a
s 1
-D c
on
volu
tion
(com
mu
tativ
e, d
istrib
utiv
e,
associa
tive)
gm
n,(
)f
mn,
() ❉
❉ h
mn,
()
fk
l,(
)hm
kn
l–
,–
()
l∑k ∑
==
EC
E/O
PT
I533 Digital Im
age Processing class notes 93 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
Exa
mp
le
m
f(m,n)
h(m
,n)
h(-k
,-l)
h(3-k,2-l)f(k.l)h(3-k,2-l) flip
(rota
te -1
80
°)
m
ultip
ly
su
m
sh
ift
fk
l,(
)h3
k–
2l
–,
()
l∑k ∑
g(3
,2)
m
nl
k
3
2 4
1
3
24
1
n
3
24
1l
k
l
k1
0l
k
3
24
1
EC
E/O
PT
I533 Digital Im
age Processing class notes 94 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
Fin
al re
su
lt
•If f is
M x
N a
nd
h is
K x
L, th
en
g is
(M +
K - 1
) x (N
+ L
- 1)
•N
ote
ph
ase s
hift in
m in
g(m
,n) d
ue to
linea
r ph
ase in
h(m
,n)
n
m
37
74662
41
01
0
41
01
0
13
3
g(m
,n)
EC
E/O
PT
I533 Digital Im
age Processing class notes 95 D
r. Robert A
. Schowengerdt 2003
2-D
MA
TH O
PER
ATIO
NS
Con
volu
tion
with
sep
ara
ble
h
•in
ner s
um
is 1
-D c
on
volu
tion
betw
een
f an
d h
2
arra
y s
ize —
> M x
(N +
L - 1
)
•ou
ter s
um
is 1
-D c
on
volu
tion
betw
een
resu
lt of in
ner s
um
an
d h
1
arra
y s
ize —
> (M +
K - 1
) x (N
+ L
- 1)
For N
x N
ima
ge a
nd
M x
M filte
r, sh
ow
tha
t com
pu
tatio
na
l a
dva
nta
ge o
f the s
ep
ara
ble
filter is
M/2
gm
n,(
)f
kl,
()h
mk
–n
l–
,(
)l
∑k ∑=
fk
l,(
)h1
mk
–(
)h2
nl
–(
)l
∑k ∑=
h1
mk
–(
)f
kl,
()h
2n
l–
()
l∑
k ∑=