cs654: digital image analysis lecture 14: properties of dft

17
CS654: Digital Image Analysis Lecture 14: Properties of DFT

Upload: robert-eaton

Post on 21-Jan-2016

238 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CS654: Digital Image Analysis Lecture 14: Properties of DFT

CS654: Digital Image Analysis

Lecture 14: Properties of DFT

Page 2: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Recap of Lecture 13

• Introduction to DFT

• 1D and 2D DFT - Unitary

• Separability of DFT

• Computational complexity

• Improvement in computational complexity

Page 3: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Outline of Lecture 14

• Properties of DFT

• Translation

• Periodicity

• Conjugate symmetry

• Distributivity

• Scaling

• Average value

• Convolution

Page 4: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Numerical example

A DFT transformation matrix can be written as

𝐴=12 [1 1 1 11 − 𝑗 −1 𝑗1 −1 1 −11 𝑗 −1 − 𝑗

] 𝑢=[0 0 1 00 0 1 00 0 1 00 0 1 0

]𝑣=[ 1 −1 1 −1

0 0 0 00 0 0 00 0 0 0

]𝑽=𝑨𝑼𝑨

Page 5: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Translation property of DFT

• Let, the input image is translated to a location

𝑣𝑡 (𝑘 , 𝑙 )=1𝑁 ∑𝑚=0

𝑁−1

∑𝑛= 0

𝑁− 1

𝑢 (𝑚 ,𝑛) exp [− 𝑗 2𝜋 (𝑘(𝑚−𝑚0)+ 𝑙(𝑛−𝑛0))𝑁 ]

¿ 1𝑁 ∑𝑚=0

𝑁− 1

∑𝑛=0

𝑁 −1

𝑢 (𝑚 ,𝑛) exp [− 𝑗2𝜋 (𝑘𝑚+𝑙𝑛)𝑁 ]exp [ 𝑗 2𝜋 (𝑘𝑚0+𝑛0 𝑙)

𝑁 ]𝑣𝑡 (𝑘 , 𝑙 )=𝑣 (𝑘 ,𝑙)exp [ 𝑗 2𝜋 (𝑘𝑚0+𝑛0𝑙)

𝑁 ]

Page 6: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Translation property

𝑣𝑡 (𝑘 , 𝑙 )=𝑣 (𝑘 ,𝑙)exp [ 𝑗 2𝜋 (𝑘𝑚0+𝑛0𝑙)𝑁 ]DFT of translated image

Inverse DFT 𝑣 (𝑘−𝑘0 , 𝑙− 𝑙0 )=𝑢 (𝑚 ,𝑛)exp [ 𝑗 2𝜋 (𝑘0𝑚+𝑙0𝑛)𝑁 ]

𝑢(𝑚 ,𝑛)exp [ 𝑗2𝜋 (𝑘0𝑚+ 𝑙0𝑛)𝑁 ]↔𝑣 (𝑘−𝑘0 ,𝑙− 𝑙0)

𝑢(𝑚−𝑚0 ,𝑛−𝑛0)↔𝑣 (𝑘 , 𝑙)exp [ 𝑗 2𝜋 (𝑘𝑚0+𝑛0𝑙)𝑁 ]

Page 7: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Periodicity

𝑣 (𝑘 , 𝑙 )=𝑣 (𝑚+𝑁 ,𝑛)=𝑣 (𝑚 ,𝑛+𝑁 )=𝑣 (𝑚+𝑛 ,𝑛+𝑁 )

𝑣 (𝑘 , 𝑙 )= 1𝑁 ∑𝑚=0

𝑁− 1

∑𝑛=0

𝑁 −1

𝑢 (𝑚 ,𝑛 ) exp [ − 𝑗2𝜋 (𝑘𝑚+𝑛𝑙)𝑁 ]

𝑣 (𝑘+𝑁 , 𝑙+𝑁 )= 1𝑁 ∑𝑚=0

𝑁 −1

∑𝑛=0

𝑁−1

𝑢 (𝑚 ,𝑛) exp [− 𝑗 2𝜋𝑁 {(𝑘+𝑁 )𝑚+(𝑙+𝑁 )𝑛}]¿ 1𝑁 ∑𝑚=0

𝑁− 1

∑𝑛=0

𝑁 −1

𝑢 (𝑚 ,𝑛) exp [− 𝑗2𝜋 (𝑘𝑚+𝑛𝑙)𝑁 ]𝑒𝑥𝑝 [− 𝑗2𝜋 (𝑥+𝑦 )]

∀𝑘 ,𝑙

Page 8: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Conjugate symmetry

𝑣 (𝑁2 ±𝑘 , 𝑁2 ± 𝑙)=𝑣∗(𝑁2 ∓𝑘 ,𝑁2 ∓𝑙) 0≤𝑘 , 𝑙≤𝑁2−1

𝑘=0 𝑁𝑁2

1-D Example

(𝑁2 ,𝑁2 )

2-D Example

When is real

Page 9: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Conjugate symmetry

𝑣 (𝑘 , 𝑙 )= 1𝑁 ∑𝑚=0

𝑁− 1

∑𝑛=0

𝑁 −1

𝑢 (𝑚 ,𝑛 ) exp [ − 𝑗2𝜋 (𝑘𝑚+𝑛𝑙)𝑁 ]𝑘=𝑁2±𝑘 , 𝑙=

𝑁2± 𝑙

𝑣 (𝑘 , 𝑙 )= 1𝑁 ∑𝑚=0

𝑁− 1

∑𝑛=0

𝑁 −1

𝑢 (𝑚 ,𝑛 ) exp [ − 𝑗2𝜋 ((𝑁2 +𝑘)𝑚+(𝑁2 +𝑙  )𝑛)𝑁 ]

Page 10: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Distributivity

• DFT of sum of two signals is equal to the sum of their individual summations

𝐷𝐹𝑇 {𝑢1 (𝑚 ,𝑛)+𝑢2(𝑚 ,𝑛) }=𝐷𝐹𝑇 {𝑢1(𝑚 ,𝑛)}+𝐷𝐹𝑇 {𝑢2(𝑚 ,𝑛) }

Scaling𝑢(𝑎𝑚 ,𝑏𝑛)↔

1

¿ 𝑎𝑏∨¿𝑣 (𝑘𝑎 , 𝑙𝑏 )¿

are scaling parameters

Page 11: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Average value

𝑢 (𝑚 ,𝑛)= 1𝑁 2 ∑

𝑚=0

𝑁 −1

∑𝑛=0

𝑁−1

𝑢(𝑚 ,𝑛)Average value of image

𝑣 (𝑘 , 𝑙 )= 1𝑁 ∑𝑚=0

𝑁− 1

∑𝑛=0

𝑁 −1

𝑢 (𝑚 ,𝑛 ) exp [ − 𝑗2𝜋 (𝑘𝑚+𝑛𝑙)𝑁 ]

For

𝑣 (0,0 )= 1𝑁 ∑𝑚=0

𝑁−1

∑𝑛=0

𝑁− 1

𝑢 (𝑚 ,𝑛 )=𝑁𝑢 (𝑚 ,𝑛)

DC Component of an image

Page 12: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Rotation

𝑚=𝑟𝑐𝑜𝑠θ

𝑛=𝑟𝑠𝑖𝑛θPolar coordinate in source domain

𝑘=𝜔𝑐𝑜𝑠𝜙

𝑛=𝜔𝑠𝑖𝑛𝜙

Polar coordinate in target domain

Instead of working in the Cartesian coordinate, we are working in the polar coordinate

𝑢 (𝑟 ,𝜃 )↔𝑣 (𝜔 ,𝜙)If we have

𝑢 (𝑟 , 𝜃+𝜃0 )↔𝑣 (𝜔 ,𝜙+𝜃0)Then,

Page 13: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Convolution

• Let there be two images of different size

(0,0) (𝑁−1)

(𝑁−1)

≠𝟎(𝑀−1)

(𝑀−1)

𝑢1(𝑚 ,𝑛)

h (𝑚 ,𝑛)

𝑚

𝑛

(𝒉 ,𝒎 )=𝟎

h (𝑚 ,𝑛)𝑐=h(𝑚𝑚𝑜𝑑𝑁 ,𝑛𝑚𝑜𝑑𝑁 )

Page 14: CS654: Digital Image Analysis Lecture 14: Properties of DFT

𝑚 ′

𝑛 ′

Circular Symmetry

(0,0) (𝑁−1)

(𝑁−1)

≠𝟎(𝑀−1)

(𝑀−1)

𝑢1(𝑚 ,𝑛)

h (𝑚 ,𝑛)𝑚

𝑛

(𝒉 ,𝒎 )=𝟎

𝑢1(𝑚 ′ ,𝑛 ′)

𝒉 (𝒎−𝒎′ ,𝒏−𝒏′ )𝒄

Computational complexity??

Page 15: CS654: Digital Image Analysis Lecture 14: Properties of DFT

2D DFT for h in frequency domain

𝐷𝐹𝑇 {h (𝑚−𝑚′ ,𝑛−𝑛′ )𝑐 }=¿

∑𝑚=0

𝑁−1

∑𝑛=0

𝑁− 1

h (𝑚−𝑚′ ,𝑛−𝑛′ )𝑐𝑊 𝑁𝑚𝑘+𝑛𝑙

¿𝑊 𝑁𝑚′ 𝑘+𝑛′ 𝑙∑

𝑚= 0

𝑁−1

∑𝑛=0

𝑁−1

h (𝑚−𝑚′ ,𝑛−𝑛′ )𝑐𝑊 𝑁(𝑚−𝑚 ′)𝑘+(𝑛−𝑛′ )𝑙

Let, and

¿𝑊 𝑁𝑚′ 𝑘+𝑛′ 𝑙 ∑

𝑝=−𝑚 ′

𝑁−1−𝑚 ′

∑𝑞=−𝑛 ′

𝑁−1−𝑛 ′

h (𝑝 ,𝑞 )𝑐𝑊 𝑁𝑝𝑘+𝑞𝑙

¿𝑊 𝑁𝑚′ 𝑘+𝑛′ 𝑙∑

𝑝=0

𝑁−1

∑𝑞=0

𝑁−1

h (𝑝 ,𝑞)𝑐𝑊 𝑁𝑝𝑘+𝑞𝑙

Page 16: CS654: Digital Image Analysis Lecture 14: Properties of DFT

DFT of Convolution Function

𝐷𝐹𝑇 {𝑢2 (𝑚 ,𝑛) }𝑁=𝐷𝐹𝑇 {h (𝑚 ,𝑛) }𝑁𝐷𝐹𝑇 {𝑢1(𝑚 ,𝑛)}

DFT of a two dimensional circular convolution of two arrays is the product of their DFTs

Page 17: CS654: Digital Image Analysis Lecture 14: Properties of DFT

Thank youNext Lecture: Hadamard Transform