You are on page 1of 6

Two-Dimensional Linear Shift-Invariant Systems

Lecture and notes by Prof. Brian L. Evans (UT Austin)


Scribe: Mr. Yue Chen (UT Austin)
Based on notes by Prof. Russell M. Mersereau (Georgia Tech)
Review of Linearity
A system is linear if it is homogeneous and additive.
1. Homogeneity: scaling the input results in scaling the output by the same amount for all
possible scaling values
T[ a x(n1, n2) ] = a T[ x(n1, n2) ] for all a
2. Additivity: the response of two signals added together at the input is equal to the sum of
the individual responses.
T[ x1(n1, n2) + x2(n1, n2) ] = T[ x1(n1, n2) ] + T[ x2(n1, n2) ]
Shortcut for testing whether or not a system is linear:
1. input a signal that is identically zero for all coordinates (n1, n2), and
2. if the output signal is not identically zero for all coordinates (n1, n2), then it is not linear
What about the following systems? Input is x(n1, n2), and output is y(n1, n2).
1. y(n1, n2) = x(n1, n2) identity
2. y(n1, n2) = x(n1, n2) + 1 add DC offset
3. y(n1, n2) = x
2
(n1, n2) squarer
4. y(n1, n2) = c(n1, n2) x(n1, n2) spatially-dependent gain c(n1, n2)
Review of Shift Invariance
A system is shift-invariant if a shift in the spatial index results in the same shift on the output, for
all possible shifts. For a discrete-time signal, the index is integer-valued.
Shift Invariance: T[ x(n1 m1, n2 m2) ] = T[ x(n1, n2) ] |
n1= n1 m1, n2 = n2 m2
1. y(n1, n2) = x(n1, n2)
2. y(n1, n2) = x(n1, n2) + 1
3. y(n1, n2) = x
2
(n1, n2)
4. y(n1, n2) = c(n1, n2) x(n1, n2)
2-D Linear Shift-Invariant (LSI) Sequences
Advantages
1. Mathematics are tractable and rich.
2. LSI systems are uniquely represented by their 2-D impulse response.
T [ ]
) , (
2 1
n n x ) , (
2 1
n n y
Figure 1
3. Linear transforms. Complex exponentials are eigenfunctions LSI systems, and
Laplace and z transforms are based on complex exponential kernels.
4. Additive decompositions are useful.
But:
Superpositions are not quite as useful for images, e.g. occlusion of objects in a scene.
2-D Convolution
An arbitrary 2-D sequence can be decomposed into a linear combination of shifted
impulses.



1 2
) , ( ) , ( ) , (
2 2 1 1 2 1 2 1
k k
k n k n k k x n n x
Applying a linear shift-invariant system T that operates on spatial indices (n1, n2) to
the input signal x(n1, n2)
1
]
1


1 2
) , ( ) , ( ) , (
2 2 1 1 2 1 2 1
k k
k n k n k k x T n n y
Applying addivity,
[ ]



1 2
) , ( ) , ( ) , (
2 2 1 1 2 1 2 1
k k
k n k n k k x T n n y
Applying homogeneity with respect to (n1, n2),
[ ]



1 2
) , ( ) , ( ) , (
2 2 1 1 2 1 2 1
k k
k n k n T k k x n n y
The term h(n1, n2) = T[(n1, n2) ] is the impulse response of the system.
A linear shift-invariant system is uniquely characterized by its impulse response.
Substituting h(n1, n2), we obtain the two-dimensional linear convolution formula:



1 2
) , ( ) , ( ) , (
2 2 1 1 2 1 2 1
k k
k n k n h k k x n n y
Two-dimensional linear convolution denoted with two asterisks:
h x y
Conceptually: same as 1-D
Mechanically: a lot more work
Example 2-D linear convolution:
) ( ) ( ) , ( ) , (
2 1 2 1 2 1
n u n u n n u n n h
n
2
n
1
x(n
1
, n
2
)
n
2
n
1
h(n
1
, n
2
)
N
1
-1
N
2
-1
Figure 2:
h(n
1
,n
2
) fills quadrant
N
1
N
2
Samples

'

otherwise 0
1 0 and 1 0 if 1
) , (
2 2 1 1
2 1
N n N n
n n x


1 2
) , ( ) , ( ) , (
2 2 1 1 2 1 2 1
k k
k n k n h k k x n n y
) , ( of version shifted and rotated a is ) , (
2 1 2 2 1 1
k k h k n k n h
Shape of output sequence can assume one of five different forms depending on value of (n1,n2).
Case #1
0 ) , (
, , 0 ) , ( ) , (
0 or 0
2 1
2 1 2 2 1 1 2 1
2 1


< <
n n y
k k k n k n h k k x
n n
k
2
k
1
h(n
1
-k
1
, n
2
-k
2
)
n
1
n
2
k
2
k
1
x(k
1
, k
2
)
N
2
-1
N
1
-1
Figure 3
Case #2

+ +

) 1 )( 1 ( ) , ( )) , ( of samples nonzero ( ) , (
1 0 and 1 0
2 1 2 2 1 1 2 1 2 1
2 2 1 1
n n k n k n h k k x n n y
N n N n
Case #3
) 1 ( ) , (
1 0 and 1
2 1 2 1
2 2 1 1
+

n N n n y
N n N n
Case #4
) 1 ( ) , (
1 0 and 1
1 2 2 1
1 1 2 2
+

n N n n y
N n N n
Case #5
2 1 1
2 2 1 1
) , (
1 and 1
N N n n y
N n N n


k
2
k
1
N
1
-1
N
2
-1
n
1
n
21
Figure 4
k
2
k
1
N
1
-1
N
2
-1
n
21
Figure 5
n
1
k
2
k
1
N
1
-1
N
2
-1
Figure 6
n
1
k
2
k
1
N
1
-1
N
2
-1
Figure 7
n
2
g h g**h
h g

'


+
+
+ +
< <

1 and 1 for
1 and 1 0 for ) 1 (
1 0 and 1 for ) 1 (
1 0 and 1 0 for ) 1 )( 1 (
0 or 0 for 0
) , (
2 2 1 1 2 1
2 2 1 1 1 2
2 2 1 1 2 1
2 2 1 1 2 1
2 1
2 1
N n N n N N
N n N n n N
N n N n n N
N n N n n n
n n
n n y
Validate your answer by checking the value of ) , (
2 1
n n y at the endpoints of each interval
Note that ) , (
2 1
n n y is separable.
Theorem:

pulses. r rectangula D - 1 two of product a is - separable is ) , (
) ( ) ( ) (
) ( ) ( ) ( where
) ( ) ( ) , ( then
) ( ) ( ) , ( and ) ( ) ( ) , ( if
2 1
2 2 2 2 2 2
1 1 1 1 1 1
2 2 1 1 2 1
2 2 1 1 2 1 2 2 1 1 2 1
x n n x
n h n x n y
n h n x n y
n y n y n n y
n h n h n n h n x n x n n x


Additional Theorems:
1. x h h x
2.
3.
What is the implicit assumption for these theorems to hold?
Separable Systems:
A system is separable if its impulse response is separable sequence.
) ( ) ( ) , (
2 2 1 1 2 1
n h n h n n h
g
h
g+h
Separable systems can be implemented faster than non-separable ones by using more
memory to store intermediate computations.

) ( ) ( ) , ( ) , (
2 2 1 1 2 2 1 1 2 1
k h k h k n k n x n n y
1
]
1


1 2
) , ( ) ( ) ( ) , (
2 2 1 1 2 2 1 1 2 1
k k
k n k n x k h k h n n y



1
) ( ) , ( ) , (
) ( ) , ( ) , (
Then
1 1 2 1 1 2 1
2 2 2 2 1 2 1
k
k h n k n g n n y
k h k n n x n n g
1 2 1
2 2 1
with of row each convolve ), , ( compute To b.
. with of column each convolve ), , ( compute To a.
h g n n y
h x n n g
Computational Savings:
N M M N M MN h x
N M N M MN N M MN M h x
N M h x
N M h x
N N h M M x
>> + +
>> + +


if ) 1 ( 2 : separable with separable D - 2 . 4
if 2 ) 1 ( ) ( : separable with separable - non D - 2 3.
multiplies : separable - non with separable - non D - 2 2.
multiplies : D - 1 with D - 1 . 1
is , is
2 2
2
2 2
2MN to compute the separable convolution in the two dimensions
(M+N-1)
2
to multiply out the separable result