Professional Documents
Culture Documents
Chapter 04c Frequency Filtering (Circulant Matrices) 2spp
Chapter 04c Frequency Filtering (Circulant Matrices) 2spp
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 {tn | ( N 1) n N 1}
T(m, n) = tm n
t0 t 1 T = t2 t
N 1
t1 t2 t( N 1) t0 t1 t2 t1 t2 t1 t0 N N
3/14/2011
T(m, n) = tm n
t0 t 1 T = t2 t
N 1
t1 t2 t( N 1) t0 t1 t2 t1 t2 t1 t0 N N
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 {cn | 0 n N 1}
c1 c2 c0 c C(m, n) = c( m n ) mod N N 1 c0 c1 C = cN 2 c2 cN 1 c1
C. Nikou Digital Image Processing (E12)
cN 1 c2 c1 c0 N N
3/14/2011
C(m, n) = c( m n ) mod N
c1 c2 c0 c N 1 c0 c1 C = cN 2 c2 cN 1 c1
cN 1 c2 c1 c0 N N
3/14/2011
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.
C. Nikou Digital Image Processing (E12)
1 0 0 1 1 0 H= 0 1 1 0 0 1 43
Length of f [n] = 3
Zero-padded h[n] in the first column
3/14/2011
1 0 0 1 1 1 1 0 1 g = Hf = 2 = 0 1 1 0 2 0 0 1 2
g[n] = {1, 1, 0, 2}
C. Nikou Digital Image Processing (E12)
10
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 f size i NxN.
The two signals may be interchanged.
3/14/2011
11
1 0 1 1 1 0 H= 0 1 1 33
Zero-padded h[n] in the first column
C. Nikou Digital Image Processing (E12)
12
1 0 1 1 1 2 = 1 1 1 0 g = Hf = 0 1 1 2 0
g[n] == { 1, 1, 0}
3/14/2011
13
Block matrices
A11 A A = 21 AM 1 A12 A22 AM 2 A1N A2 N AMN
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).
C. Nikou Digital Image Processing (E12)
14
3/14/2011
15
At first, h[m,n] is zero-padded m to 3 x 4 (the size of the 0 0 0 0 result). 1 1 0 0 Then, for each row of h[m,n], 1 -1 0 0 a Toeplitz matrix with 3 columns (the number of h[m,n] columns of f [m,n]) is constructed. C. Nikou Digital Image Processing (E12)
16
For each row of h[m,n], a Toeplitz matrix with 3 columns (the number of columns of f [m,n]) is constructed.
1 1 H2 = 0 0
0 0 1 0 1 1 0 1
0 0 H3 = 0 0
0 0 0 0 0 0 0 0
3/14/2011
17
Using matrices H1, H2 and H3 as elements, a doubly block Toeplitz matrix H is then constructed with 2 columns (the number of rows of f [m,n]).
18
3/14/2011
19
m 1 1 1 -1 h [m,n]
20
1 0 0 0 0 0 2 1 1 0 0 0 0 3 0 1 1 0 0 0 2 0 0 1 0 0 0 2 3 1 0 0 1 0 0 5 3 T (2 3 2 3) 1 1 0 1 1 0 3 10 T g = Hf = 0 1 1 0 1 1 1 = 5 = (3 10 5 2) (1 5 5 1)T 0 0 1 0 0 1 4 2 0 0 0 1 0 0 1 1 0 0 0 1 1 0 5 0 0 0 0 1 1 5 0 0 0 0 0 1 1
C. Nikou Digital Image Processing (E12)
10
3/14/2011
21
1 1 1 -1 h [m,n]
1 5 5 1 3 10 5 2 2 3 -2 3 g [m,n]
22
Another example
11
3/14/2011
23
At first, h[m,n] is zero-padded m to 2 x 3 (the size of the result). 0 0 0 Then, for each line of h[m,n], 1 -1 0 a Toeplitz matrix with 2 columns (the number of h[m,n] columns of f [m,n]) is constructed. C. Nikou Digital Image Processing (E12)
24
For each row of h[m,n], a Toeplitz matrix with 2 columns (the number of columns of f [m,n]) is constructed. n
0 0 H2 = 0 0 0 0
12
3/14/2011
25
Using matrices H1 and H2 as elements, a doubly block Toeplitz matrix H is then constructed with 2 columns (the number of rows of f [m,n]).
26
13
3/14/2011
27
H g = Hf = 1 H 2
1 H 2 2 H1 3 4
28
1 0 0 0 1 1 1 0 0 1 1 0 1 0 0 2 2 (1 1 2)T g = Hf = = = T (3 1 4) 0 0 1 0 3 3 0 0 1 1 4 1 0 0 0 1 4
14
3/14/2011
29
*
n
1 -1 h [m,n]
3 1 4 1 1 -2 g [m,n]
(1 1 2)T g= T (3 1 4)
30
The circular convolution g[m,n]=f [m,n] h [m,n] with 0 m M 1, 1 0 n N 1, 1 may be expressed in matrix-vector form as:
g = Hf
where H is a doubly block circulant matrix generated by h [m,n] and f is a vectorized form of f [m,n].
C. Nikou Digital Image Processing (E12)
15
3/14/2011
31
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].
C. Nikou Digital Image Processing (E12)
32
Each Hj, for j=1,..M, is a NxN circulant matrix generated from the elements of the j-th row of h [m,n].
C. Nikou Digital Image Processing (E12)
16
3/14/2011
33