Home > Documents > Chapter 04c Frequency Filtering (Circulant Matrices) 1spp

# Chapter 04c Frequency Filtering (Circulant Matrices) 1spp

Date post: 19-Dec-2015
Category:
View: 259 times
Description:
Digital Image Processing for students
Embed Size (px)
Popular Tags:

#### hlength of f n

of 48 /48
University of Ioannina - Department of Computer Science Filtering in the Frequency Domain (Circulant Matrices and Convolution) Digital Image Processing Christophoros Nikou
Transcript

University of Ioannina - Department of Computer Science

Filtering in the Frequency Domain (Circulant Matrices and Convolution)

Digital Image Processing

Christophoros [email protected]

2

C. Nikou – Digital Image Processing (E12)

Toeplitz matrices

• Elements with constant value along the main diagonal and sub-diagonals.

• For a NxN matrix, its elements are determined by a (2N-1)-length sequence { }( 1) 1|n N n Nt − − ≤ ≤ −

1

( 1)0 1 2

1 0 1

2 2

1

2 1 0N

N

N N

t t t tt t tt t

tt t t t

− −− −

×

⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

T

( , ) m nm n t −=T

3

C. Nikou – Digital Image Processing (E12)

Toeplitz matrices (cont.)

• Each row (column) is generated by a shift of the previous row (column).− The last element disappears.− A new element appears.

1

( 1)0 1 2

1 0 1

2 2

1

2 1 0N

N

N N

t t t tt t tt t

tt t t t

− −− −

×

⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

T

( , ) m nm n t −=T

4

C. Nikou – Digital Image Processing (E12)

Circulant matrices

• Elements with constant value along the main diagonal and sub-diagonals.

• For a NxN matrix, its elements are determined by a N-length sequence { }0 1|n n Nc ≤ ≤ −

1

1

2

1

0 1 2

0 1

2

1

1 2 0

N

N

N

N N N

c c c cc c cc c

cc c c c

− ×

⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

C

( )mod( , ) m n Nm n c −=C

5

C. Nikou – Digital Image Processing (E12)

Circulant matrices (cont.)

• Special case of a Toeplitz matrix.• Each row (column) is generated by a circular shift

(modulo N) of the previous row (column).

1

1

2

1

0 1 2

0 1

2

1

1 2 0

N

N

N

N N N

c c c cc c cc c

cc c c c

− ×

⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

C

( )mod( , ) m n Nm n c −=C

6

C. Nikou – Digital Image Processing (E12)

Convolution by matrix-vector operations

• 1-D linear convolution between two discrete signals may be expressed as the product of a Toeplitz matrix constructed by the elements of one of the signals and a vector constructed by the elements of the other signal.

• 1-D circular convolution between two discrete signals may be expressed as the product of a circulant matrix constructed by the elements of one of the signals and a vector constructed by the elements of the other signal.

• Extension to 2D signals.

7

C. Nikou – Digital Image Processing (E12)

1D linear convolution using Toeplitz matrices

• The linear convolution g[n]=f [n]*h [n] will be of length N=N1+N2-1=3+2-1=4.

• We create a Toeplitz matrix H from the elements of h [n] (zero-padded if needed) with− N=4 lines (the length of the result).− N1=3 columns (the length of f [n]).− The two signals may be interchanged.

1 2[ ] {1, 2, 2}, [ ] {1, 1}, 3, 2f n h n N N= = − = =

8

C. Nikou – Digital Image Processing (E12)

1D linear convolution using Toeplitz matrices (cont.)

1 2[ ] {1, 2, 2}, [ ] {1, 1}, 3, 2f n h n N N= = − = =

4 3

1 0 01 1 00 1 10 0 1

×

⎡ ⎤⎢ ⎥−⎢ ⎥=⎢ ⎥−⎢ ⎥−⎣ ⎦

H

Length of f [n] = 3

Length of the result =4

Notice that H is not circulant (e.g. a -1 appears in the second line which is not present in the first line.

Zero-padded h[n] in the first column

9

C. Nikou – Digital Image Processing (E12)

1D linear convolution using Toeplitz matrices (cont.)

1 2[ ] {1, 2, 2}, [ ] {1, 1}, 3, 2f n h n N N= = − = =

1 0 0 11

1 1 0 12

0 1 1 02

0 0 1 2

⎡ ⎤ ⎡ ⎤⎡ ⎤⎢ ⎥ ⎢ ⎥− ⎢ ⎥⎢ ⎥ ⎢ ⎥= =⎢ ⎥⎢ ⎥ ⎢ ⎥−⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦− −⎣ ⎦ ⎣ ⎦

g = Hf

[ ] {1, 1, 0, 2}g n = −

10

C. Nikou – Digital Image Processing (E12)

1D circular convolution using circulant matrices

• The circular convolution g[n]=f [n] h [n] will be of length N=max{N1, N2}=3.

• We create a circulant matrix H from the elements of h [n] (zero-padded if needed) of size NxN.− The two signals may be interchanged.

1 2[ ] {1, 2, 2}, [ ] {1, 1}, 3, 2f n h n N N= = − = =

11

C. Nikou – Digital Image Processing (E12)

1D circular convolution using circulant matrices (cont.)

1 2[ ] {1, 2, 2}, [ ] {1, 1}, 3, 2f n h n N N= = − = =

3 3

1 0 11 1 00 1 1

×

−⎡ ⎤⎢ ⎥= −⎢ ⎥⎢ ⎥−⎣ ⎦

H

Zero-padded h[n] in the first column

12

C. Nikou – Digital Image Processing (E12)

1D circular convolution using circulant matrices (cont.)

1 2[ ] {1, 2, 2}, [ ] {1, 1}, 3, 2f n h n N N= = − = =

1 0 1 1 11 1 0 2 10 1 1 2 0

− −⎡ ⎤ ⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥ ⎢ ⎥= − =⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥−⎣ ⎦ ⎣ ⎦ ⎣ ⎦

g = Hf

[ ] { 1, 1, 0}g n == −

13

C. Nikou – Digital Image Processing (E12)

Block matrices

• Aij are matrices.

• If the structure of A, with respect to its sub-matrices, is Toeplitz (circulant) then matrix A is called block-Toeplitz(block-circulant).

• If each individual Aij is also a Toeplitz (circulant) matrix then A is called doubly block-Toeplitz (doubly block-circulant).

11 12 1

21 22 2

1 2

N

N

M M MN

A A AA A A

A

A A A

⎡ ⎤⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎣ ⎦

……

14

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices

m

n

1 4 12 5 3f [m,n]

m

n

1 11 -1h [m,n]

M1=2, N1=3 M2=2, N2=2

The result will be of size (M1+M2-1) x (N1+N2-1) = 3 x 4

15

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

• At first, h[m,n] is zero-padded to 3 x 4 (the size of the result).

• Then, for each row of h[m,n], a Toeplitz matrix with 3 columns (the number of columns of f [m,n]) is constructed.

m

n

1 1 01 -1 0

h[m,n]

00

0 0 0 0

m

n

1 4 12 5 3f [m,n]

m

n

1 11 -1h [m,n]

16

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

• For each row of h[m,n], a Toeplitz matrix with 3 columns (the number of columns of f [m,n]) is constructed.

m

n

1 1 01 -1 0

h[m,n]

00

0 0 0 0

1

1 0 01 1 00 1 10 0 1

⎡ ⎤⎢ ⎥−⎢ ⎥=⎢ ⎥−⎢ ⎥−⎣ ⎦

H 2

1 0 01 1 00 1 10 0 1

⎡ ⎤⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎣ ⎦

H 3

0 0 00 0 00 0 00 0 0

⎡ ⎤⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎣ ⎦

H

17

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

• Using matrices H1, H2and H3 as elements, a doubly block Toeplitzmatrix H is then constructed with 2 columns (the number of rows of f [m,n]).

m

n

1 4 12 5 3f [m,n]

m

n

1 11 -1h [m,n]

1 3

2 1

3 2 12 6×

⎡ ⎤⎢ ⎥= ⎢ ⎥⎢ ⎥⎣ ⎦

H HH H H

H H

18

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

• We now construct a vector from the elements of f [m,n].

m

n

1 4 12 5 3f [m,n]

m

n

1 11 -1h [m,n]

25

(2 5 3)3(1 4 1)1

41

T

T

⎡ ⎤⎢ ⎥⎢ ⎥

⎡ ⎤⎢ ⎥= = ⎢ ⎥⎢ ⎥

⎢ ⎥⎢ ⎥ ⎣ ⎦⎢ ⎥⎢ ⎥⎣ ⎦

f

19

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

m

n

1 4 12 5 3f [m,n]

m

n

1 11 -1h [m,n]

1 3

2 1

3 2

253141

⎡ ⎤⎢ ⎥⎢ ⎥⎡ ⎤⎢ ⎥⎢ ⎥= ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦ ⎢ ⎥⎢ ⎥⎣ ⎦

H Hg = Hf H H

H H

20

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

1 0 0 0 0 0 21 1 0 0 0 0 30 1 1 0 0 0 20 0 1 0 0 0 2 31 0 0 1 0 0 5 3

(1 1 0 1 1 0 3 100 1 1 0 1 1 1 50 0 1 0 0 1 4 20 0 0 1 0 0 1 10 0 0 1 1 0 50 0 0 0 1 1 50 0 0 0 0 1 1

⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥−⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥− −⎢ ⎥ ⎢ ⎥− ⎡ ⎤⎢ ⎥ ⎢ ⎥

⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥−⎢ ⎥ ⎢ ⎥= = =⎢ ⎥⎢ ⎥ ⎢ ⎥− ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥−⎢ ⎥ ⎢ ⎥⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦⎢ ⎥ ⎢ ⎥

⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦

g = Hf2 3 2 3)

(3 10 5 2)(1 5 5 1)

T

T

T

⎡ ⎤−⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

21

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

*

m

n

1 4 12 5 3f [m,n]

m

n

1 11 -1h [m,n]

=32

m

n

3 10 52 3 -2g [m,n]

1 5 5 1 (2 3 2 3)(3 10 5 2)(1 5 5 1)

T

T

T

⎡ ⎤−⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

g =

22

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

m

n

3 41 2f [m,n]

m

n1 -1h [m,n]

M1=2, N1=2 M2=1, N2=2

The result will be of size (M1+M2-1) x (N1+N2-1) = 2 x 3

Another example

23

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

• At first, h[m,n] is zero-padded to 2 x 3 (the size of the result).

• Then, for each line of h[m,n], a Toeplitz matrix with 2 columns (the number of columns of f [m,n]) is constructed.

m

n

0 0 01 -1 0

h[m,n]

m

n

3 41 2f [m,n]

m

n1 -1h [m,n]

24

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

• For each row of h[m,n], a Toeplitzmatrix with 2 columns (the number of columns of f [m,n]) is constructed.

m

n

0 0 01 -1 0

h[m,n]

1

1 01 10 1

⎡ ⎤⎢ ⎥= −⎢ ⎥⎢ ⎥−⎣ ⎦

H 2

0 00 00 0

⎡ ⎤⎢ ⎥= ⎢ ⎥⎢ ⎥⎣ ⎦

H

25

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

• Using matrices H1 and H2 as elements, a doubly block Toeplitzmatrix H is then constructed with 2 columns (the number of rows of f [m,n]).

1 2

2 1 6 4×

⎡ ⎤= ⎢ ⎥⎣ ⎦

H HH

H H

m

n

3 41 2f [m,n]

m

n1 -1h [m,n]

26

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

• We now construct a vector from the elements of f [m,n].

1(1 2)2(3 4)3

4

T

T

⎡ ⎤⎢ ⎥ ⎡ ⎤⎢ ⎥= = ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦⎢ ⎥⎣ ⎦

f

m

n

3 41 2f [m,n]

m

n1 -1h [m,n]

27

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

m

n

3 41 2f [m,n]

m

n1 -1h [m,n]

1 2

2 1

1234

⎡ ⎤⎢ ⎥⎡ ⎤ ⎢ ⎥= ⎢ ⎥ ⎢ ⎥⎣ ⎦⎢ ⎥⎣ ⎦

H Hg = Hf

H H

28

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

1 0 0 0 11 1 0 0 1 1

(1 1 2)0 1 0 0 2 2(3 1 4)0 0 1 0 3 3

0 0 1 1 4 10 0 0 1 4

T

T

⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥− ⎡ ⎤⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎡ ⎤−⎢ ⎥ ⎢ ⎥− −⎢ ⎥= = = ⎢ ⎥⎢ ⎥ ⎢ ⎥ −⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎣ ⎦⎢ ⎥⎢ ⎥ ⎢ ⎥− ⎣ ⎦⎢ ⎥ ⎢ ⎥

− −⎣ ⎦ ⎣ ⎦

g = Hf

29

C. Nikou – Digital Image Processing (E12)

2D linear convolution using doubly block Toeplitz matrices (cont.)

*

=m

n

3 1 41 1 -2g [m,n]

m

n

3 41 2f [m,n]

m

n1 -1h [m,n]

(1 1 2)(3 1 4)

T

T

⎡ ⎤−⎢ ⎥−⎢ ⎥⎣ ⎦

g =

30

C. Nikou – Digital Image Processing (E12)

2D circular convolution using doubly block circulant matrices

where H is a doubly block circulant matrix generated by h [m,n] and f is a vectorized form of f [m,n].

0 1, 0 1,m M n N≤ ≤ − ≤ ≤ −The circular convolution g[m,n]=f [m,n] h [m,n]

may be expressed in matrix-vector form as:

g = Hf

with

31

C. Nikou – Digital Image Processing (E12)

2D circular convolution using doubly block circulant matrices (cont.)

Each Hj, for j=1,..M, is a circulant matrix with N columns (the number of columns of f [m,n]) generated from the elements of the j-th row of h [m,n].

0 1 2 1

1 0 1 2

2 1 0 3

1 2 3 0

M M

M

M M M

− −

− − −

⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

H H H HH H H H

H H H H H

H H H H

……………

32

C. Nikou – Digital Image Processing (E12)

2D circular convolution using doubly block circulant matrices (cont.)

[ ,0] [ , 1] [ ,1][ ,1] [ ,0] [ ,2]

[ , 1] [ , 2] [ ,0]

j

N N

h j h j N h jh j h j h j

h j N h j N h j ×

−⎡ ⎤⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥− −⎣ ⎦

H

……

Each Hj, for j=1,..M, is a NxN circulant matrix generated from the elements of the j-th row of h [m,n].

33

C. Nikou – Digital Image Processing (E12)

2D circular convolution using doubly block circulant matrices (cont.)

m

n

1 3 -11 2 1f [m,n]

m

n

1 01 -1h [m,n]

0 1 0

00

0 0 0

0

1 0 11 1 00 1 1

−⎡ ⎤⎢ ⎥= −⎢ ⎥⎢ ⎥−⎣ ⎦

H 1

1 0 00 1 00 0 1

⎡ ⎤⎢ ⎥= ⎢ ⎥⎢ ⎥⎣ ⎦

H 2

0 0 00 0 00 0 0

⎡ ⎤⎢ ⎥= ⎢ ⎥⎢ ⎥⎣ ⎦

H

34

C. Nikou – Digital Image Processing (E12)

2D circular convolution using doubly block circulant matrices (cont.)

m

n

1 3 -11 2 1f [m,n]

m

n

1 01 -1h [m,n]

0 1 0

00

0 0 0

( )( )( )

0 2 1

1 0 2

2 1 0

1 2 1

1 3 1

0 1 0

T

T

T

⎡ ⎤⎡ ⎤ ⎢ ⎥⎢ ⎥ ⎢ ⎥= −⎢ ⎥ ⎢ ⎥⎢ ⎥⎣ ⎦ ⎢ ⎥⎣ ⎦

H H Hg = Hf H H H

H H H

35

C. Nikou – Digital Image Processing (E12)

2D circular convolution using doubly block circulant matrices (cont.)

1 0 1 0 0 0 1 0 0 1 01 1 1 0 0 0 0 1 0 2 20 1 0 0 0 0 0 0 1 1 11 0 0 1 0 1 0 0 0 1 30 1 0 1 1 1 0 0 0 3 40 0 1 0 1 0 0 0 0 1 30 0 0 0 0 0 1 0 1 0 10 0 0 0 0 0 1 1 1 1 40 0 0 0 0 0 0 1 0 0 2

−⎡ ⎤ ⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥ ⎢ ⎥−⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥− −⎢ ⎥ ⎢ ⎥ ⎢ ⎥−⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥= =−⎢ ⎥ ⎢ ⎥ ⎢ ⎥

− − −⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥−⎢ ⎥ ⎢ ⎥ ⎢ ⎥

−⎢ ⎥ ⎢ ⎥ ⎢⎢ ⎥ ⎢ ⎥ ⎢− −⎣ ⎦ ⎣ ⎦ ⎣ ⎦

g = Hf

⎥⎥

36

C. Nikou – Digital Image Processing (E12)

2D circular convolution using doubly block circulant matrices (cont.)

m

n

1 01 -1h [m,n]

m

n

3 4 -30 2 -1g [m,n]

1 4 -2

00

0 0 0

=

m

n

1 3 -11 2 1f [m,n]

0 1 0

( )( )( )

0 2 1

3 4 3

1 4 2

T

T

T

⎡ ⎤−⎢ ⎥⎢ ⎥−⎢ ⎥

−⎢ ⎥⎣ ⎦

g =

37

C. Nikou – Digital Image Processing (E12)

Diagonalization of circulant matrices

Theorem: The columns of the inverse DFT matrix are eigenvectors of any circulant matrix. The corresponding eigenvalues are the DFT values of the signal generating the circulant matrix.Proof: Let

2 2 nj j knkN Nw e w e

π π− −

Ν Ν= ⇔ =

be the DFT basis elements of length N with:

0 1, 0 1,k N n N≤ ≤ − ≤ ≤ −

38

C. Nikou – Digital Image Processing (E12)

Diagonalization of circulant matrices (cont.)

We know that the DFT F [k] of a 1D signal f [n]

may be expressed in matrix-vector form:

whereF = Af

[ ] [ ][0], [1],..., [ 1] , [0], [1],..., [ 1]T Tf f f N F F F N− −f = F =

( ) ( ) ( ) ( )( ) ( ) ( ) ( )

( ) ( ) ( ) ( )

0 1 2 10 0 0 0

0 1 2 11 1 1 1

0 1 2 11 1 1 1

N

N N N N

N

N N N N

NN N N NN N N N

w w w w

w w w w

w w w w

−− − − −

⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦

A

39

C. Nikou – Digital Image Processing (E12)

Diagonalization of circulant matrices (cont.)

The inverse DFT is then expressed by:

where

-1f = A F

( )

( ) ( ) ( ) ( )( ) ( ) ( ) ( )

( ) ( ) ( ) ( )

*0 1 2 10 0 0 0

0 1 2 11 1 1 11 *

0 1 2 11 1 1 1

1 1

TN

N N N N

NT N N N N

NN N N NN N N N

w w w w

w w w wN N

w w w w

−− − − −

⎛ ⎞⎡ ⎤⎜ ⎟⎢ ⎥⎜ ⎟⎢ ⎥⎜ ⎟⎢ ⎥= = ⎜ ⎟⎢ ⎥⎜ ⎟⎢ ⎥⎜ ⎟⎢ ⎥⎜ ⎟⎣ ⎦⎝ ⎠

A A

The theorem implies that any circulant matrix has eigenvectors the columns of A-1.

40

C. Nikou – Digital Image Processing (E12)

Diagonalization of circulant matrices (cont.)

Let H be a NxN circulant matrix generated by the 1D N-length signal h[n], that is:

[ ]mod( , ) ( ) [ ]N Nm n h m n h m n= − −H

Let also αk be the k-th column of the inverse DFT matrix A-1. We will prove that αk, for any k, is an eigenvector of H.The m-th element of the vector Hαk, denoted by is the result of the circular convolution of the signal h[n] with αk.

[ ]k mHα

41

C. Nikou – Digital Image Processing (E12)

Diagonalization of circulant matrices (cont.)

[ ]1

0[ ] [ ]

N

k N kmn

h m n nα−

=

= −∑Hα1

0

1 [ ]N

k nN N

nh m n w

N

−−

=

= −∑

( 1)( )1 [ ]

m Nl m nk m l

N Nl m

h l wN

− −= −− −

=

= ∑( 1)1 [ ]

m Nk m k l

N N Nl m

w h l wN

− −−

=

= ∑

1

( 1) 0

1 [ ] [ ]m

k m k l k lN N N N N

l m N lw h l w h l w

N

−−

= − − =

⎡ ⎤= +⎢ ⎥

⎣ ⎦∑ ∑

We will break it into two parts

42

C. Nikou – Digital Image Processing (E12)

Diagonalization of circulant matrices (cont.)

1 1 1

( 1) 0 1

1 [ ] [ ] [ ]N N

k m k l k l k lN N N N N N N

l m N l l mw h l w h l w h l w

N

− − −−

= − − = = +

⎡ ⎤= + −⎢ ⎥

⎣ ⎦∑ ∑ ∑

Periodic with respect to N.

1 1 1

( 1) 0 1

1 [ ] [ ] [ ]N N N

k m k l k l k lN N N N N N N

l N m N l l m

w h l w h l w h l wN

− − −−

= + − − = = +

⎡ ⎤= + −⎢ ⎥

⎣ ⎦∑ ∑ ∑

1 1 1

1 0 1

1 [ ] [ ] [ ]N N N

k m k l k l k lN N N N N N N

l m l l m

w h l w h l w h l wN

− − −−

= + = = +

⎡ ⎤= + −⎢ ⎥⎣ ⎦∑ ∑ ∑ ⇔

43

C. Nikou – Digital Image Processing (E12)

Diagonalization of circulant matrices (cont.)

[ ]1

0

1 [ ]N

k m k lk N N Nm

lw h l w

N

−−

=

⎡ ⎤= ⎢ ⎥⎣ ⎦∑Hα [ ][ ] k m

H k= α

DFT of h[n] at k.

This holds for any value of m. Therefore:

[ ]k kH k=Hα α

which means that αk, for any k, is an eigenvector of H with corresponding eigenvalue the k-th element of H[k], the DFT of the signal generating H .

44

C. Nikou – Digital Image Processing (E12)

Diagonalization of circulant matrices (cont.)

The above expression may be written in terms of the inverse DFT matrix:

1 1− −=HA A Λ

Based on this diagonalization, we can prove the property between circular convolution and DFT.

{ }=diag [0], [1],..., [ 1]H H H N −Λ

or equivalently: 1−=Λ ΑHA

45

C. Nikou – Digital Image Processing (E12)

Diagonalization of circulant matrices (cont.)

g = Hf

DFT of g[n]

⇔ -1g = HA Af ⇔ -1Ag = AHA Af ⇔ G = ΛF

DFT of f [n]DFT of h [n]

[0] [0] 0 0 [0][0] 0 [1] 0 [0]

[ 1] 0 0 [ 1] [ 1]

G H FG H F

G N H N F N

⎡ ⎤ ⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥⇔⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥− − −⎣ ⎦ ⎣ ⎦ ⎣ ⎦

=

……

46

C. Nikou – Digital Image Processing (E12)

Diagonalization of doubly block circulant matrices

• These properties may be generalized in 2D.• We need to define the Kronecker product:

11 12 1

21 22 2

1 2

N

N

M M MN MK NL

a a aa a a

a a a×

⎡ ⎤⎢ ⎥⎢ ⎥⊗ =⎢ ⎥⎢ ⎥⎣ ⎦

B B BB B B

A B

B B B

……

,M N K L× ×∈ ∈A B

47

C. Nikou – Digital Image Processing (E12)

Diagonalization of doubly block circulant matrices (cont.)

• The 2D signal f [m,n], may be vectorized in lexicographic ordering (stacking one column after the other) to a vector:

1MN×∈f

0 1, 0 1,m M n N≤ ≤ − ≤ ≤ −

• The DFT of f [m,n], may be obtained in matrix-vector form:

( )F = ⊗A A f

48

C. Nikou – Digital Image Processing (E12)

Diagonalization of doubly block circulant matrices (cont.)

( ) ( ) 1−= ⊗ ⊗Λ A A H A A

Theorem: The columns of the inverse 2D DFT matrix

are eigenvectors of any doubly block circulantmatrix. The corresponding eigenvalues are the 2D DFT values of the 2D signal generating the doubly block circulant matrix:

( ) 1−⊗A A

Doubly block circulantDiagonal, containing the 2D DFT of h[m,n] generating H

Recommended