A UNIFIED SIGNAL ALGEBRAAPPROACH TO TWO-DIMENSIONAL PARALLEL DIGITAL SIGNAL PROCESSING Louis A. D’Alotto York College The City University of New York Queens,New York
Charles R. Giardina College of Staten Island
The City University of New Wrk Staten Island, NewYork
Hua Luo York College The City Unlvemityof New Mrk Queens, New York
MARCEL
MARCELDEKKER, INC. DIKKIR
NEWYORK BASEL HONGKONG
Library of Congress Catdoging-in-PublicationData D’Alotto, Louis. A unified signal algebra approachto two-dimensional parallel digital signal processing / Louis D’Alotto, Charles R. Giardina, Hua Luo. cm. p. Includes index. ISBN 0-8247-0025-2 1. Signalprocesshg-Digitaltechniques.2.Algebras,Linear. I. Giardina, Charles R. (Charles Robert). 11. Luo,Hua. 111. Title. TK5102.9.D34 1998 621.382’2’0285575-dc21 ,9746946 CIP
The publisher offers discounts on this book when ordered in bulk qwtities. For more information, write to Special Sales/Professional Marketing at the address below.
This book is printed on acid-free paper. Copyright 0 1998 by MARCEL DEKKER, INC. All Rights Reserved. Neither this book nor any part may be reprodved or transmitted in any form or byany means, electronic or mechanical, including photocopying, microfilming, andrecording,orbyanyinformationstorageandretrievalsystem,without permission in writing from the publisher. MARCEL DEKKER, INC. 270 Madison Avenue, New York, New York 10016
hnp:/hvww.dekker.corn Current printing (last digit): 1 0 9 8 7 6 5 4 3 2 1
PRINTED IN THE UNITED STATES OF AMERICA
To our wives, Zana, Betty and Qing
Contents Preface
V
1 Two Signals Dimensional 1.1 Two Dimensional Digital Signals 1.2 ImportantTwo Dimensional Digital Signals 1.3 Bound Matrix Representation 1.4 Exercises
............ ...... ..............
.........................
2 FundamentalOperations
1 1
5 8
14
on Two DimensionalSig-
nals 2.1 FundamentalRangeInducedOperations 2.2 Terms Involving Fundamental Range Induced Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Additional Important Digital Signals and Macro Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Equational Identities Involving Range Induced Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 Fundamental Domain InducedOperations . . . . . . . 2.6 Terms Involving Fundamental Domain Induced Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7 FurtherEquationalIdentities 2.8 Exercises
........
.............. .........................
3 Convolution of Signals Digital 3.1 TheSupport Region for Convolution 3.2 Convolution for Signals of FiniteSupport 3.3 Bound Matrices for Convolution 3.4 Parallel Convolution Algorithms 3.5 Convolution of Signals of Non-FiniteSupport 3.6 BanachAlgebraProperties of Convolutionin 3.7 Filtering by Convolution 3.8 Correlation
17
17 20 26 29 35 42 50 53 S9
. . . . . . . . . . 59 . . . . . . . 61 . . . . . . . . . . . . 65 . . . . . . . . . . . . 68 . . . . . 73 I1 . . . . 79 . . . . . . . . . . . . . . . . . 83 . . . . . . . . . . . . . . . . . . . . . . . . 92
Preface A Unified Signal Algebra Approach to Two-Dimensional ParallelDigital Signal Processing is a text dedicated to a modern approach in signal processing. A timely concern in the digital signal processing area is parallel processing. While numerous works have appeared on parallel computer architectures,relatively little information has been documented on the underlying principle for creating parallel digital signal processing algorithms to be used inthesecomputers.This book fills the void by providing a unified signal algebra approachfor creating parallel digital signal processing algorithms. Parallel representationsof basic signal processing operations occur naturally in the algebraic setting set forth herein. In the unified signal algebra approach, all operations defined are on digital signals, not on individual numbers that constitute the signals. Indeed, the arguments of all signal processing operations arefunctions representedby matrices - NOT NUMBERS. A matrix type representation, called a bound matrix, is used in describing digital signals. This representation, in the time domain, provides a useful alternative to the 2-transform representationof digital signals. It captures all essential features of digital signals and provides necessary compression. Operations on digitd signals are specified using block diagrams. Together with bound matrices, the block diagram presentation provides a universal language for the description of important parallel digital signal processing algorithms. Throughout, an abundance of examples and execution type traces of block diagram algorithms are given. Many exercises are also presented. The exercises are intended to serve as an aid to understanding the material. In terms of six fundamental operations, all other digital signal processing operations areformed under function composition.This is consistent withreduced instruction set computer philosophy, whereby a “small number of building blocks” can be used to form useful operations. Each of the six fundamental operations is inducedby similar V
vi
Preface
operations in thedomain or range space and itis this technique that provides the unified algebraic methodology. While the methodology contained herein is useful in various signal processing environments, this text is self-contained and always remains at a “how to” level. Two dimensional digital signalprocessing is mainlyconcerned with the extractionof information fromsignals. The stepsinvolved in the information extraction procedure include some or all of the following: 1.) Digitalsignalcreation 2.) Digital signal to digital signal operation 3.) Digital signal to real number operation 4.) Real number to decision operation In this book, we concentrate on step 2 above. Essentially, the primary and only difference between two dimensional and single dimensional signal processing is greater computational complexity when dealing with the higher dimensional signals. Even though various digital signalprocessing techniques are independent of dimension, the representation of such signals is dimensionally dependent. Matrix type notation, called bound matrices, is used to represent two dimensional digital signals. This structure is introduced in the first chapter and employed throughout. All parallel algorithms are specified using block diagrams. This allows easily describable traces and walk-throughs of all algorithms and is consistent with data flow procedural descriptions. Using two dimensional signals allows for a rich processing environment. This environment is exploited by using two dimensional techniques for efficient processing of single dimensional digital signals. Indeed, the last chapter of the text is dedicated to this typeof optimization. Two dimensional wraparound signal processing is also presented in the text.A self-contained chapter describes the algebraic environment necessary for processing these types of signals. Again, bound matrix representation is introduced and block diagram specification of all algorithms is givon. This book is intended to be used as a text in digital signalprocessing courses for graduate students. It also provides a useful reference
Preface
vii
for applied mathematicians, computer scientists, and electricalengineers who are interestedin algebraic techniquesfor providing parallel algorithms.
Louis A. D'Alotto Charles R. Giardina Hua Luo
x
Contents
. . . . . . . . . . . . . . . 103 . . . . . . . . . . . . . . . . . . . . . . . . . 109
3.9 Applications of Correlation 3.10 Exercises 4 2 Transforms
116
. . . . . . . . . 115 . . . . . . . 118 . 125 . . . . . . . . . . . . . . . . . . . 129 . . . . . . . . . . . . . . . . . . . . . . . . . . 143 . . . . . 146 . . . . . . . . . . . . . . . . . . . . 148 . . . . . . . . . . . . . . . . . . . . . . . . . 153
Formal Introduction to 2 Transforms Some Operations Involving 2 Transforms 2 Transforms for Digital Signals of Finite Support . Laurent Expansions 2 Transform for I1 Signals and Signals of Arbitrary Support 4.6 The 2 Transform for Calculating Correlation 4.7 Transfer Functions 4.8 Exercises:
4.1 4.2 4.3 4.4 4.5
S
Difference Equations
....................
159
5.1 Function Equations 159 5.2 Linear Space Invariant Difference Equations . . . . . . 161 5.3 Difference Equations Involving One Unit Translation . 168 5.4 2 Transforms forSolvingDifference Equations . . . . 178 185 5.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 6
Wraparound Processing Signal
187
................... ...........................
6.1 Wraparound Signals 187 6.2 Range Induced Operations and Terms for Wraparound Signals 190 6.3 Domain Induced Operations for Wraparound Signals . 195 6.4 Set Morphology in Zn x Zm . . . . . . . . . . . . . . . 204 6.5 Sequential and Parallel Formulation of Wraparound Convolution 212 6.6 Sequential and Parallel Formulations of Wraparound Correlation . . . . . . . . . . . . . . . . . . . . . . . . 218 6.7 Wraparound 2 Transforms . . . . . . . . . . . . . . .223 6.8 Discrete Fourier Transforms . . . . . . . . . . . . . . . 230 6.9 Wraparound Algebra in Z, x Z, . . . . . . . . . . . . 234 243 6.10 Exercises . . . . . . . . . . . . . . . . . . . . . . . . .
........................
.......
Contents
xi
7 Parallel Multidimensional Algorithms for Single Dimensional Signal Processing 249 7.1 Two Dimensional Processing of One Dimensional Sig.249 nals 7.2 Diagonal TransformfromOne Dimension into Two Dimensions 252 254 7.3 Kronecker Products 7.4 Triple Convolution 259 7.5 Triple Convolution Performed Using Parallel Two Dimensional Convolution 261 7.6 Volterra Convolution and VolterraSeries 265 7.7 ParallelAlgorithmsforVolterraConvolution 269 7.8 Exercises 275
............ ... ......... .. . ..... . . . ... .... .... . . . .. ................... .. .................. ..... ........... .. .... ... . ..... .... .. ...... ........ ....
Appendix
2 70
References
287
1 Two Dimensional Signals 1.1 Two DimensionalDigitalSignals For the most part, in the textwe will be presenting operations involving two dimensional digital signals f . A digital signal is a function which provides the values of some attribute associated with some object, system or physical phenomena. The set of all two dimensional digital signals is denoted by Rzxz,which is the set of all real valued functions defined at every pair of integers. So f E RZXZmeans
In otherwords, a digital signal has domain consisting of all the lattice points (n,m ) where m and n are in 2.Moreover, their codomain is the set of real values, whereasthe range of any specific digital signal is the set of real values which the signal actually attains. Thefollowing demonstrates an example of a two dimensional digital signal.
Example 1.1 Consider the two dimensional digital signal f where
(
4 at (-1,-l)
o
elsewhere
Observe that the range off is the set
6%0,3941 Notice that the two dimensional digital signal f,given in Example 1.1, is illustrated in Figure 1.1. 1
2
1. T w o Dimensional Signals
Figure 1.1 The lattice points 2 x 2 are those points formed by the intersection of a horizontal and vertical line. Atevery lattice point(n,m ) for which f attains a nonzero value, a “flag” is used in prescribing the value f(n,m). At any point for which there is no flag, it is assumed that f is zero valued.
Example 1.2 Suppose that the two dimensional digital signal f is given where f(n,m) = I “1 Then f(-1,l) = 1-1- 1 I = 2 and f(2,-1)
= ( 2 ” 11 =
3
ab0
f ( n , m ) = 0 for n = m A graphical illustration of the signal f given in Example 1.2 is provided in Figure 1.2. A few points at which the function attains
1.l. Two Dimensional Digital Signals
3
nonzero values are given in this figure. An infinite number of flags should be employed in this diagram and the dots are used to indicate that this is the case.
As previously mentioned, signals most often provide values associated with some physical phenomena. Accordingly, signals are frequently obtained from sensor readings. For mapping purposes only, we assume that the Earthis flatand infinite. The sensor, for instance, might be an accelerometer. An accelerometer (held vertically) which is not moving relative to the Earth will measure vertical acceleration. Most importantly, the reading will vary in a known manner depending on whether it is held on a mountain topor valley bottom. Intuitively, in the former case, the accelerometer reading will be less than the reading obtained in the latter case. Accordingly, this instrument can be employed to measure variation in vertical heights. We will now use it for this purpose. Our objective is to find a two dimensional digital signal representative of the mountainregion in Figure 1.3(a). We will assume that a coordinate system is located with itsorigin on top of the mountain. At every integer unit along the east and north directions, a reading
.... .. ..,. ..._,,,,.. ...,_, ,
,
...,.__,...,,,..,,...,... _....,.., .-.. .I ,
,
.. . ,
,
, . ,",
.,.. ~. ,., .
,..,...L.
..., ,.".,,,. I.
4
1. Two Dimensional Signals
shall be taken using the accelerometer and recorded on a flag. This is the sampling procedure. The integer unit may be every 10 feet, it could be 100 feet, or 10 yards. The smaller this quantity is, the
more accurate the terrain map. Figure 1.3(b) provides a two dimensional digital signal representation of the mountain. Note that some readings, in Figure 1.3(b), are taken behind the mountain and are therefore not visible in Figure 1.3(a).
" " L "
East Figure 1.$(a) Side View of Mountain
North
Figure l .9(b) Top View of Mountain, Using a TWODimensional Digital Signal.
1.2. Important Two Dimensional Digital Signals
5
Two dimensional digital signals are defined at every integer pair (n, m). Often, however, due to lack of information, there may be points at which values of a signal are not observed. At these points we define the signal t o have value 0 there. A quitedifferent situation holds in Chapter 6 where two dimensional wraparound signals are defined and operated upon. These signals are defined only in some rectangular subset of the lattice points.
1.2 Important Two Dimensional Digital Signals Several important signals in !Rzxz are given next. In each case, a single real value is assigned to every integer. Several of these functions are illustrated in Figures1.4(a) through 1.4(e). For illustrative purposes we only display a few function value flags. Among the simplest functions in !Rzxz are the ones which are of constant value at every integer. These functionsare denoted by azxz and so azxz(n, m ) = a
For instance, the function 3 ~ x 2is illustrated in figure 1.4(a). Of special interest is the zero function Ozxz,and the unity function lzxz which have values zero and one, respectively at each integer. These two functions are illustrated in Figures 1.4(b) and 1.4(c), respectively. The delta, or impulse function S is a function in !Rzxz which has value 1 at the origin and is zero elsewhere in Z X Z. Thus,
It is illustrated in Figure 1.4(d). The first quadrant unit step function, denoted by U , is also an important digital signal. It attains the value 1 for lattice points consisting of nonnegative integer pairs, and it is of value 0 otherwise, hence 1 nE{O,1,2,
...} a n d m E { 0 , 1 , 2 ,...} otherwise
This function is illustrated in Figure 1.4(e).
6
1. Two Dimensional Signals
Figure l . 4 ( b )
1.2. Important Two Dimensional Digital Signals
7
8
1. Two Dimensional Signals
1.3 Bound Matrix Representation For two dimensional signals, f will be represented using bound matrices. In this representation, a finite or infinite matrix is employed consisting of values in the range of f. Specifically, we write f as
The three dots on the left, right, above and below the elements denote values which exist but are omittedin the representation.A box is placed around thevalue off at theorigin. Other locations of values off are found by their relative position in the lattice grid Z x 2.
1.3. Bound Matrix Representation
9
Example 1.3 Some of the functions illustmted in Figures 1.4(a) through 1.4(e) will be represented as bound matrices. The constant function in Figure 1.4(a) is represented as
/ aZxZ
... ...
=
...
\
. . . . . . . . . a a a
a a a
a a
. . . . . . e
.
... ...
...
.
With a = 3 ,
1
. . . . . . v
3zxz =
... ... a..
3 3 3
.
3 3
.
3 3 3
. . .
a..
a..
.a.
The delta function in Figure 1.4(d) is represented as
10
l., Two Dimensional Signals
Finallg, the ,first quadmat unit step function, illustrated in 1.4(e) is given by
. . . a
U
... ...
=
e..
B
0 0 0
.
.
.
.
1 1 1 0
0
. . . . . . e
\
.
Figure
!
... ... ...
.
I
More often than not, signals in ?Rzxzwill be zero outside the first quadrant. Signals possessing this property are said to have support in the first quadrant set. We will let S denote the subset of RZXZ containing these signals. Signals in this class can be represented in a more simple manner than previously described. We will write
II
.
.'
f=
l
0
The zero in the upper right, outside the right parenthesis, means that at all lattice points not in the first quadrant, f has value 0. A support regionof a function isa subset of ZX Z outside of which f has value zero. A support region off is denoted by supp( f) and must contain all points at which f is not zero. It can also contain points in the domain at which f does equal zero. Accordingly, supp(f) is often not unique. Of particular interest is the set F of all two dimensional digital signals with finite support. A function f is in the class F if and only if the cardinality of some support region is finite, that is card(supp(f))
< ca.
1.3. Bound Matrix Representation
11
Any two dimensionalsignalin F canberepresentedusing the more compact, n rows by m columns, bound matrix representation 0
l
f=
Here, f ( r , t ) = all and all other values of f are either 0 or given by the values aij in the matrix. Corresponding lattice points for these values aij are obtained by situating the matrix on the integral lattice.
Example 1.4 Observe that the signal
('
4 at (-1,-l)
0 elsewhere
illustmted in Figure 1.1 is of finite support, thus not only can we represent it as
. . . .
I
a
;.. ... f = ... ... 4
.
.
. . . . . .
.
a
. . . .
.
.
0 0 4 0
0 0 0 0 0 0 -2 0 0 0 0 0
. . . . .
. . .
0 0 0 0 0 0 0 3 0 0 0
. . . . e
.
t
... ... ...
. . . . . .
.
but we can represent it in the more compressed form
f=
( 00 0 3
4 0
-K)
0
-1 ,l
12
1. Two Dimensional Signals
In the previous example we saw the morecompressed form of representing two dimensional digital signals of finite support. For these signals we displayed a “window”.of values which included all the places and corresponding valueswhere the signal is nonzero. Of course, such a representation is not unique. An infinite number of bound matrices can represent the same signal. However, for any nonzero signal of finite support, aunique minimal representation can be obtained. It is called the minimal bound matrix. This representation always possesses a nonzero value on each “boundary” point of the matrix. That is, it has a nonzero element on the leftmost and rightmost column as well as a nonzero value on the uppermost, and lowermost rows.The second matrix representation for f ,given in the last example, is minimal.
Example 1.5 The only functions of finite support given in Figures 1.4(a) through 1.4(e) are Ozxz and 6. Any support region of 6 must contain the origin, and any bound matrix representation must have a value 1 at the origin. For instance
6=(
0 0 O 00) O 010
and 6=(;
; ) O -1,l
whereas, 6 = (1):p is a minimal bound matrix representation of 6.
We will now give the conversion formula between a given bound matrix representationand function type representation. This is given mainly for computer implementation purposes, Let f be a digital signal with a rectangular support region consisting of n rows and m columns of lattice points, so
1.3. Bound Matrix Representation
13
Thus, we are guaranteed that f ( i , j ) = 0 for all (i, j ) outside supp(f) and f can be represented with the n row by m column bound matrix
Given a,t we can find the corresponding lattice point at which this value is attained, indeed, a,t=f(p+t-1,q-rtl)
For instance, all = f ( P , d a12 = f(P t 1 9 4 Ulna
= f(P t m - 1, q )
a21 = f(P,Q - 1) an1 = f(P,Q - n t 1) anm=f(Ptm-l,q-ntl) Going the other way, if f ( i ,j ) is given for
(a,
j ) in supp(f) then
f ( i , j ) = ai-p+l,q-j+l We have seen that for every function f in F, there exists an equivalence class of bound matricescorresponding to f . The minimal bound matrix corresponding to f (f # Ozxz) may be thought of as the most ideal representation. The minimal bound matrix is also called a coset leader. However, for clarity purposes, nonminimal representation is often helpful. On occasion we will use other bound matrix representations besides the minimal one. This will be seen as we process bound matrices using addition, multiplication, convolution, and other operations.
14
1. Two Dimensional Signals
1.4 Exercises 1. Which of the following functions, are two dimensional digital signals: a ) f ( n , m ) =I nom I n , m E Z
b)
f(n,m)=n.m n,mE
d)
f(n,m)=
Z
@iin , m E Z
Rzxz.Identify those which are, and illustrate each by providing a diagram.
2. Not all of the following functions are in
a )f ( n , m >
b)
=I n
mi
for n , m E
z
f( n , m ) = cos( ). f o r n E Z 1 (x,y) a lattice point in R ! XR 0 (z,y> not a lattice point in R X
R
3. For each of the functions given in Exercise 1, find both the domain and range sets. 4. Find the domain and range sets for the functions given in Exercise 2. 5 . Provide a bound matrix representation for the twodimensional
digital signal f , where f(n,m) =
{
0 n 5 0 and all m 1 n>Oandm>O 0 n>Oandm
Explain why f is not the unit step function chapter. 6. Is thesignal
U,
f of Exercise 5 of finite support?
defined in this
1.4. Exercises
15
7. Let
a) Explain why f is of finite support. b) Is it correct to write
c) Show that one of the support regions of f is given by
d) Are there any smaller (in cardinality) support f? If so find one.
regions for
8. Is there a two dimensional digital signal f,for which any subset of the lattice points is a support region? If so, find one such signal. 9. Is there a two dimensional digital signal for which no subset of the lattice points is a support region? If so, find one such signal.
10. Show that there is a one to one correspondence between the set of all two dimensional signals of finite support, excluding Ozxz, and theset of all minimal bound matrices which represent these signals.
2
Fundamental Operations on Two Dimensioial Signals 2.1 Fundamental Range Induced Operations Throughout the rest of the text, we will write, “digital signals” in place of “two dimensional digital signals”. Several operations can be defined on these signals which are analogous t o operations involving the real number system. This isbecause the range space of any digital signal is a subset of the reds.Accordingly, the operationsdefined herein are called runge induced operations. These operations are defined in a pointwise manner; they are performed coordinatewise at each lattice point using similar operations involving real numbers. Precisely three fundamental range induced operations will be defined. Perhaps the simplest operation on digital signals is the binary addition operation. It will be denoted by ADD. This operation has two signals as input and yields one signal as output. Hence,
ADD : szxzX R z x z + Rzxz and it is defined by using the rule
Thus, to obtain the sum or addition of two bound matrices, f and g , we add their values pointwise. This operation is also illustrated in
a graphical manner using block diagrams, as follows:
18
2. Fundamental Operations on Two Dimensional Signals
When no confusion should result, instead of writing the addition operation using the prefix notation ADD( f,g), we use the more customary infix notation f g. The two symbolisms shall be used interchangeably henceforth.
+
Example 2.1 Suppose that the addition of
and
-;;)
g=(;
0 393
is desired. In this case,it is more useful not to employminimal matrices to represent f and g . Indeed, we write 2 3 0 1 4 0 )
f=(
O
-l
and
0
3,4
(4 -;;) 0 0
g=
0
394
Next, we add pointwise to obtain
ft.=(
2 3 0 3 3 3 )
O
0
3.4
For instance, notice that
(f +g)(4,3) = f ( 4 , 3 ) t g(493) = 4 - 1 = 3 Two other fundamental operations which are structurally similar to addition are the multiplication operation, denoted by M U L T ,
.
.
2.1. Fundamental Range Induced
Operations
19
and the maximum operation, denoted by M A X . Both of these operations are binary, thereby taking two signals as input arguments and yielding a signal as output. Thus,
MULT : Rzxz X Rzxz -+ Rzxz and
M A X : Rzxz X
szxz+ Rzxz
They axe defined using the pointwise definition. Indeed,
M U J w f , d ( n ,4 = f ( n ,4 s ( n ,m) and 4 f ( n ,4 , d n , 4 Again, we will abuse notation by letting
M A X ( f ,g ) ( %
4=m
)
M U L T ( f , g )= f ' g Additionally, we will often write f V g instead of M A X ( f , g ) . The block diagrams used in specifying the multiplication and maximum operations are given respectively as
and
Example 2.2 Consider again, the functions f and g from Example 2.1. Since 0 2 3 0 f = ( 1 4 0) -1 '1 0
3,*
20
2. Fundamental Operations on Two Dimensional Signala
and
0
394
then 0
0
0 0
34
and 2 3 0 m = ( 2 4 3)
0
34
2.2
Terms Involving Fhndamental Range Induced Operations
We will now apply the three fundamental operations, given in the last section, in succession to various signals. Hence, we will use the fundamental range .induced operations along with function composition. The resulting operations are called terns or macro operations. One of the most simple macro operations is the unary square law device, denoted SQ. We will also write f 2 instead of SQ( f ) . The given operation is defined by SQ : gzxz”+ ~ z x z
where
SQ(f)(n,m ) = f2@,
4
The block diagram illustrating this operation is
2.2. Terms Involving FundamentalRangeInduced
Operations
21
The reason why SQ is a term, is that the output of
is also SQ(f). That is, the square law device is nothing more than the multiplication of a signal with itself.
we have
The negation of a signal f is denoted by M I N U S ( f). It will also be denoted by -f . In any case, it is a unary operation which is defined by M I N U S : SzXz+ Rzxz where
M I N U S ( f ) ( n ,m ) = -f (n,m ) Using the fact that the following two block diagrams always provide the same output shows that M I N U S is a term.
22
"
2. FundamentalOperationson
,
Two DimensionalSignals
-f
f
-1zxz The lastblock diagram involved the multiplication of the twoinput signals, f , and the constant function-lzxz of value -1 everywhere in the integral lattice.
Example 2.4 Let
f=
(T ( -; 4 ) :)O
-l
then
3,4
-2 -3
-f =
0
374
As described above, we can find -f using the latterblock diagram. 2 the more compact In this case, it is useful to write - 1 . ~ ~using bound matrix representation
( r: 1:) -1
-1
-1
394
Recall, the -1 outside the right parenthesis means that the function given by this bound matrix is of value -1 for all lattice points outside of {(3,4), (4,4), (3,3), (4,3), (3,2), (4,2)}. Tracing through the block diagram we have
( -:4 j ( Ii 3\O 1
-1 -1
-1
-1
3.4
2.2. Terms Involving FundamentalRangeInduced
Operations
23
Another important term isthe binary minimumoperator, denoted by M I N , which is defined by
M I N : Rzxz x !Rzxz--i where
M W f , s ) ( n ,4 = min(f (n,m ) , g@, 4 ) The minimum operation on f and g is also denoted by f A g. M I N is a term because f A g = 4 - f v -9) Using block diagrams, M I N is a term since both the defining block for M I N ,
f
e
MIN
r
and the following block diagram
f
MINUS MAX
9
MINUS
MINUS
-
e
have the same output, f A g.
Example 2.5 Employing f and g as given in Example 2.1, we have
-; -; 0
f A g = (
0 0
0
3,4
24
2. FundamentalOperationson
Two DimensionalSign&
On the other hand, we can calculate f cordingly, -2 -3 -f = -4 -l and 0 0 -g= -2 1 -1 0
(-;
A g using
0 0) O
( Lq)
V -g)- Ac-
0
3,4 0
3,4
Consequently, -fV-g=
-(-f
0 0 0 (-1 1 o O O
0
) 3,4
Several rectifier-type device operations are also describedusing the three simple fundamental operations t, , and V. The absolute value function, denoted by ABS or I I, is a unary operation, that is
I I:
RZXZ
"t
8ZXZ
where
I f I (n,m>=I
f(n, m> I Using block diagram8,'it too is a term since the defining block
and
2.2. Terms Involving FundamentalRangeInduced
Operations
25
have the same output I f I. Equivalently, I f I= f V (- f). Two related unary operators on a digital signal f is the positive part operator and the negative part operator denoted respectively by (f )+ and (f)-. These are defined by
f (n,m ) whenever f (n,m ) > 0 otherwise and
-f (n,m )
whenever f ( n ,m ) < 0 otherwise
Note that the result of applying either the positive part operation or the negative part operation to an arbitrary function results in a function which is never negative in value. The positive part operation has the block diagram
Similarly, the negative part operation has the block representation:
n Both of these operations are terms since
f + = fVOz whereas
f-
= -(f A OZ)
26
2. FundamentalOperations on Two Dimensional Signala
Example 2.6 Again consideef.
then
Id=
(
2 1 3
O
)O
3,4
and
whereas
0 1 0 g-=(o
0 0)O
394
We have shown that the macro operations: SQ,M I N U S , M I N , ABS, POS and NEG are all terms. Thisfollows sinceeach operation was obtained by using the three range induced fundamental operations along with function composition. It follows that any expression involving the six macro operations above, will equivalently involve the three fundamental range induced operations. In subsequent sections, these macro operations will be used in providing additional terms as well as more advanced algorithms forprocessing digital signals.
2.3 Additional Important Digital Signals and Macro Operators The principal purpose of this section is to show howto use the macro operations previously given in order to shape signals. In the shaping process, several operations are often employed with one of their arguments equal to a constant digital signal. Accordingly, it is useful at this time to define two binary macro operations called SCALAR and OFFSET. Both of these operations are terms including constant signals as one of their arguments. However, unlike previous terms, both of these operations involve inputs of different types.
2.3. Additional Important Digital Signals andMacro
Operators
27
Specifically, they both have arguments consisting of a real number and a digital signal. Hence
SCALAR : RzXz X
R -+ Rzxz
and
O F F S E T : Rzxz X R -+ RzXz These terms are defined by
SCALAR( f, a ) ( n , m ) = U f(n,m) and
+
O F F S E T (f , a ) ( n ,m ) = f ( n , m) a Thus, the SCALAR operation is just like scalar multiplication in a vector space. The OFFSET operation “lifts” or offsets the signal by addingthe value a to every value of f . Theoperations, SCALAR( f, U ) and O F F S E T (f , U ) are more commonly denoted by “a f” and “f + U ” , respectively. Both operations are terms since their defining blocks:
f
c
-
SCALAR
a.f
and
OFFSET a
have equal outputs, respectively, with
f
c
MULT aZXZ
c
-
UZxZ
‘f
2. Fundamental Operations on Two Dimensional Signals
28
and
An additional term of great importance is the clipping circuit, denoted by C L I P . It has the property that any input signal f will come out of the C L I P operation unaltered for all values less than or equal to some threshold value t . For all values greater than this threshold value, the value t comes out, Thus,
The block diagram illustrative of this operation is given by
Observe that the outputof CLIP( f , t ) can be obtained by using the following block diagram:
f”
-
OFFSET-
-t
NEG -t
Example 2.7 Let
f=
-
OFFSET -c M I N U S
-
2.4. Equational Identities InvolvingRangeInduced
then
C L I P (f, 2) =
(: -1
29
=g
;)O
1
Operations
374
Now, we will use the last block diagram above to again obtain g . A tmce follows.
c
OFFSET -2
-
c
2.4 Equational Identities InvolvingRange Induced Operations The very rich algebraic structure in !Rzxz due to the induced operations of pointwise addition, multiplication, and maximum will be further revealed andadditionally illustrated. In the following we will
30
2. Fundamental Operations on Two DimensionalSignals
let f , g and h be digital signals. Moreover, a and b will denote real values. The addition operation has the following properties: G1) Associative Law: f (g t h) = (f t g) t h 6 2 ) Zero Signal Property: 0zxz t f = f t Ozxz = f G3) Minus Signal Property: -f f = f (-f) = Ozxz G4) Commutative Law: f g = g t f These properties show that RzXz is an Abelian group under addition. Property G1) willallow us to use the block diagram for addition as if it is a ternary or higher arty operator. That is, to add three digital signals we will use
+-
+
+
+
Equivalently, in mathematical terms,we could write f + g + h instead (f t g) t h. More generally, for any finite number of digital signals f1, f2, ....,fN,we will write of f t (g t h) or
N
instead of f’ t be
f2
Cfi or A D D ( f i ) i=l t .... t f N . The equivalent block
fl
c
f2
c
ADD fN
diagram would
i
c
Moreover, the order of summation does not matter due to G4).
2.4. Equational Identities InvolvingRangeInducedOperations
31
Observe also, that the SCALAR operation whose arguments are a real number along with a digital signal satisfies the following: V1) Associative Law: (ab)f = a ( b f ) V2) Unity Preservation: If = f VS) Distributive Law: a(f g ) = af ag V4) Distributive Law: ( a b ) f = af bf The first distributive law shows that scalar multiplication by reals is distributivewith respect to digital signal processing addition. The second distributive law shows that scalar multiplication by digital signals is distributive with respect to theaddition of the reals. These two laws can be written in a more informative fashion as
+ +
+ +
S C A L A R ( A D D ( f , g ) a; ) = ADD(SCALAR(f,a ) , SCALAR(g,a)) and
S C A L A R ( f ;a 4-b ) = A D D ( S C A L A R ( f ,a ) , SCALAR( f,b ) ) respectively. In any case, V1)through V4) along with G1)through 6 4 ) shows that SzXzis a vector space over the reals. The multiplication operation in Rzxz satisfies several important properties: R1) Associative Law: ( f g ) h = f ( g h ) R2)Distributive Laws: f ( g t h ) = f g t fh and ( f + g ) h = f h tgh R3) Commutative Law: f g = g f R4) Unity Signal Property: lzxz f = f lzxz= f The multiplicative associative law, being similar to the additive associative law allows us to write, for any number of digital signals
fly f2,
***a,
fN
N fi
= fi
' f2 '
' * fN
= kfULT(fi)
i=l
The corresponding block diagram is
MULT
,
.. . .
,
.,
..
,
. ......
.. . .. . .
.,.... ..
. .. ....
,
.
.
. ...
32
2. FundamentalOperations on T w o Dimensional Signals
The distributive laws given in R2) could be reduced to only one law because of R3). The system 81zxz using the above identities along with the group structure is a commutative ring with unity. However, even further structure is present. The SCALAR operation commutes with digital signal processing multiplication as the following property Al) shows. Al) Commutative Law: a( fg) = af g = f ag Thus, RzXz is a commutative, associative algebra with unity. Further algebraic operations in S z x zinvolve the M A X and M I N operations since the following properties hold: L1) Commutative Laws: a.)fvs=svf b.)fAs=sAf L2) Associative Laws: a.)(fVg)Vh=fV(gVh) b.) (f A 9 ) A h = f A (9 A h ) L3) Idempotent Laws: a.) f v f = f b.)fAf=f L4) Absorption Laws: a.) (f v 9 ) h f = f b.) (f A 9 ) v f = f L6) Distributive Laws: a->f v (9 A h ) = ( f v S) A (f v h ) b.)fA(sVh)=(fAg)V(fAh) Again, because of the associative law, when a maximum of a finite number of digital signals f1, f2, ...., f N is desired we will write
-
v N
fi
= f1 V
fi V
....V f N = M A X ( fi)
i=l
The block diagram illustrating this operation is
2.4. Equational Identities InvolvingRangeInducedOperations
33
An analogous block diagram can be given for the minimum operation. The above properties show that Wzxz, along with V and A, is a distributive lattice. Combining this with the associative algebra structure shows that Wzxz is a distributive lattice commutative associative algebra with identity. Consequently,the following two properties also hold true: M1)Max/Min Additive Law: f g = (f V g) (f A g) M2) Distributive Law: (f V g ) h = (f t h ) V (g t h)
-+
+ -+
Example 2.8 Here we will illustmte properties M1)and M2).First we let 0 0,0
then
and fvg=(
4 0 0 2 1
0
0,l U180
so
2. Fundamental Operations on Two Dimensional Signals
34
which illustrates property M l ) . To illustrate property M2) we first let
h=(
0 3 4 2 0 l )
-l
O
0
0,l
then, using f and g as before we obtain 0
4 3 4 ( f V g ) + h = ( 4 1 2 ) 0,l
and 0 3 4 f t h = ( 4 1 l )
0
0,l U180
4 0 4 g+h= ( 4 1 1 ) O
so, we obtain
0
0,l
.)
4 3 4 (f+h)V(g+h)= ( 4 1
0
0,l
which illustrates property M2).
I f f and g are in F , that is they have finite support, then *f+g€F fVgEF *f.gEF
2.5. Fundamental Domain Induced Operations
35
Moreover, all the properties justgiven for functions in Rzxz hold for functions in F (except R4).Accordingly, the structure is a subdistributive lattice commutative associative algebra. The zero function Ozxzin Rzxz is also in F , but the unity functionlzxzin Rzxz is not in F.
2.5
Fundamental Domain Induced Operations
Digital signals have as their domain the set of lattice points that are pairs of integers. Similar to the way that the algebraic structure of the reals induced operations in Rzxz,group operations in the integers induce operations in Rzxz, Precisely three domain induced operations are defined herein. They are the shift, the 90° rotation and the reflection operations. The first domain induced operation, theshift operation, is denoted to any by S. This operation exists, and therefore can be applied digital signal since every integer has a successor. The operator S is unary, that is S : R Z X Z ”+ R Z X Z It is defined by ( S ( f ) ) ( n , m )= f ( n - 1 9 4
The shift operation, when applied to a digital signal “moves” it one unit to the right. Accordingly, for any digital signal f , given as the bound matrix \
e
f 9
d
m h
c
b
a
... ... a..
I
36
2. Fundamental Operations on Two Dimensional Signals
we have
... =
a..
a..
d C a b h i
Finally, if f has finite support, then f can be written as 0
f = PI9
hence, 0
S(f)= P+L9
Example 2.9 Let 0
2 1
then 2 1
0
2 1 m3
The functions f and S(f) are illustmted in Figurns 2.l(a) and 2.l(b), respectively.
2.5. Fundamental Domain Induced Operations
Figurn 2.1 (b).
37
38
2. FundamentalOperations
on Two Dimensiopal Signals
Example 2.10 If we wish to shift the first quadmnt step function
I
0
.. ... m
a..
then we obtain
. . . . . * . m
S(u)=
0 0
pJ
.
1 1 1 1 1 1
0
1
... .*. ..I
Example 2.11 The shift operation performed on the impulse function 6 = (l)&J results in V ) = (Q,O The shift operation is denoted by the block diagram
The second domain induced operation, N I N E T Y , arises due to the structure of the integral lattice. When the integral lattice is rotated a full 90°, the new lattice which occurs has exactly the same geometric configuration as the original lattice. When applied to a digital signal f , N I N E T Y ( f ) , also symbolized by N ( f ) , has the same values as f each rotated 90° about the origin, Thus,
N I N E T Y ( f ) ( i , j )= f(j,- i )
2.5. Fundamental Domain Induced Operations
39
Example 2.12 Say we want to find N(f) where
f = ( g i)
0
-1 ,l
then we can find N ( f ) “point by point”. For instance, using f (-1, -1) = 4 N ( f ) ( l ,-1) = 4
Using
f(-l, 1) = 2
provides the result
N ( f ) ( - l , -1) = 2 Other values are similarly found, in any Case
Figures 2.2(a) and 2.2(b) illustrate the functions f and N ( f), respectively,
40
2. Fundamental Operations on Two Dimensional Signals
Example 2.13 If the first quadmnt unit step function, 90° we obtain
N ( u )=
... B..
U,
is rotated
1 1 1 1 1
A block diagram illustmtion of the 90° rotation is
The third and final domain induced operation for bound matrices is a type of matrix transpose,denoted by REFLECT, or D.Indeed,
2.5. Fundamental Domain Induced
Operations
41
D applied to any digital signal f makes rows of f become columns in D ( f ) and columns in f become rows in D(f). More precisely, D is defined pointwise using R E F L E C T ( f ) ( i , j )= f(-j,-i) Thus D ( f ) can also be obtained by flipping f around a 1 3 5 O line in the z,y-plane.
Example 2.14 Let
f=
(:
4 1q
o -1,l
Then using the pointwise definition since f(-j,4)= f(0, -1) = 1
we have
D(f)(190) = 1 Similarly, f(-j, 4)= f(-l, 1) = 2 80
D(f)(-L 1) = 2
Observe that D( f) can also befound by placing a mirror dong the 1 3 5 O line and observing f ; the resulting digital signal is D ( f ) . The next example will illustrate how it can also be found by rotating f 180° (out of the page) about this line.
Example 2.15 Let
0
1,3
4
2. Fundamental Operations on Two Dimensional Signals
42
2 1
0 0 0 0 0 0 0 0
- 1 0
=[:::h 0 0 0 0 0 0
Then
0 0 0
0 0
I ooQool 0 0 0 0 0 0 0
0 0
O2 - 1 3 1
=
0
0 0
0 0
0 0
0
0 0
o o o o o /
(;-; -3,-1
Example 2.16 The reflection operation used on the first quadrant unit step function gives 0
A block diagram illustrating the (diagonal) reflection operation is
2.6 TermsInvolving'FundamentalDomain Induced Operations Successive applications of the shift operation produces a translation (to the right) type operation. Indeed, if welet S" denote n successive
2.6. Terms Involving Fundamental Domain Induced Operations
43
function compositions of S,then
Note that n 2 0 and So(f)= f. This amounts to translating the bound vector n places to the right. In terms of block diagrams, we have
and
SHIFT
both possessing identical outputs.
Example 2.17 Suppose that the first quadrant unit step function U is given
U = [
1
h
1 1
... ...
l
then S3(U) =
0 1 1 0 1 1
...
...
. . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . ~
l .
...
2. Fundamental Operations on Two Dimensional Signals
44
Successive applicationsof the ninety degree rotation produces various other rotations. The 180° rotation of f is given by N 2 ( f ) ;the 270° rotation of f is given by N 3 ( f ) . These rotations can also be obtained pointwise using
4 )
N 2 ( f) ( i d = and
N 3 ( f ) ( i , j )= f(-A
a)
Example 2.18 Let
then
N2(f)=
( -1
2
)O
-4,-4
and
The last result follows since f(-j, i) = f ( 3 , 4 ) = 2
hence
N 3 ( f ) ( 4 , - 3 )= 2 Similarly
f(-j,i) = f ( 4 , 4 ) = -1 hence
N3( f ) ( 4 , - 4 ) = -1 Block diagrams illustrating these operationsare
NN2NI(INf N)EETTYY
2.6. TermsInvolvingFundamentalDomainInduced
Operations
45
or
and
f -NINETY
-
NINETY
c
NINETY
-
N3(f)
or
What is of additional consequenceis that a general translationoperation can be formed using theSHIFT and NINETY operations. Indeed, if we define the translation operation, denotedby TRAN or T , where T: X Z X Z
$2"'
T ( f ;n, m ) ( i , j )= f(i - n , j - m ) then we also have
n?O,m?O n < 0,m 2 0 N3S-mNSn(f) nlO,m
NS*N3Sn(f) N S m N P n N 2 (f )
46
2. FundamentalOperationson
Two DimensionalSignals
Thus, T R A N is a term. It is represented using the following block diagram.
Example 2.10 Supposethat
then we have
(i)’
TRAN
34
1 The same result can be found using
T ( f ;2 , l ) = N S N 3 S 2 ( f ) Indeed,
and
SN3S2(f ) =
(2
N S N 3 S 2 ( f )=
3
) 1,-3
( ;) 3J
2.6. Terms Involving FundamentalDomainInduced
Operations
47
The translation operationis soimportant thatadditional notation shall be employed. Instead of writing T(f; n,m), we will write fn,m for the translate o f f by n units to the right and m units up. Thus, the first quadrant unit step function U, and the impulse function 6, when translated n units to the right and m units up are given respectively by u n , m and Sn,m. Thus, we have ) = ~ (-in , j - m )
un,m(i, j
and Jn,m(i,,j)
= ~ (- in, j
- m)
Translations of the digital signals U and S are given in the following example.
Example 2.20 Q
a
.
.
a
.
.
* . . ... ...
1 1 1 1 m 1 1 1 1
and
...
1
. . . .
* . * . . .
S
... W..
...
... ...
0 0 0 0 0 a
.
0 0 0 0 0 1 0 0 0 .
.
0 0 0 0 0
.
a..
... ... ... ...
. . . . . . . m
Various other reflection type operations exist besides the transpose type reflection D . Specifically, there is a horizontal, a vertical, and
2. Fundamental Operations on Two Dimensional Signale
48
a 4 5 O diagonal reflection. These are respectively denoted by HOR, V E R T , and DIFLIP. They are defined by:
)(W = f (4 - j > V E R T U) ( i , j >= f (-4j) and
DIFLIP( f)(i,j) = f(j,i) Thefollowingblockdiagramsillustratetheseoperationsandalso show that they are terms. The output of thefollowingtwoblock diagrams is H O R ( f ) .
f
-
REFLECT
NINETY
-
The outputof each ofthe following two block diagrams V EisR T (f).
REFLECT NINETY
2.6. Terms Involving FundamentalDomainInduced
Operations
49
The output of each of the following two block diagramsis D I F L I P ( f ) .
DIFLIP
- " f
R EN FILNEE ICNTTE YT Y
Example 2.21 If we again let
f=
(;)O 191
us in Example 2.19, then
W >=(3
2
)O-1,-1
and
Also, and
V E R T ( f )= D N ( f ) -
-
Finally,
N 2 ( f >=
(3
(
)O
-1,o
)I,,,
2. Fundamental Operations on Two Dimensional Signals
50
and
DIFLIP = D N 2 (f) =
( 2 3 )'011
The only possible configuration which was not found using combinations of operations N and D on f, thus far, is
In theprevious example,an image f was used in illustratingHOR, V E R T , DIFLIP reflection type operations and the N 3 operations. In doing this,we performed all possible combinations of ninety degree rotations and reflections.
2.7 Further Equational Identities In section 2.4, it was seen that the structure Rzxz with operations +, and V is a distributed lattice, commutative associative algebra with identity. Now, we will present several properties involving the domain induced operations N , S, D, and also T along with the range induced operations. To begin,notice that a doubleapplication of D to any digital signal always results in the original signal. That is, property 11) Involution of D : D D ( f )= f m,
holds true. Accordingly, D is said to be involutory. The same is true for N 2 ,thus we have 12) Involution of N2:
N 2 N 2 ( f) = N4(f ) = f The translation operation also satisfies the obvious property C l ) Commutative Law:
T ( T ( f ;n , m), i,j) = T(T(f; & j ) ,n , m ) = T ( f ;n t i, m t j ) Of most importance is the theorem that domain induced and range induced operations commute. This fact,involving mixed operations,
2.7. Further Equational Identities
51
is proved in Reference [l].In any case, the following properties result from this theorem.
p11 N(f -t9 ) = tN(9) p21 N ( f - 9 ) = N U ) N ( 9 ) pa) N(f v 9 ) = N ( f ) v N ( 9 ) P4) N ( f A 9 ) = W ) A N ( g ) p51 D(f 4- 9 ) = W ) t D ( 9 ) P6) D(f 9 ) = W ) D ( g ) P7) -o(f v 9 ) = W ) v D ( 9 ) P81 W A 9 ) = W ) A W P9)T(f 9 ; n9.2) = T(f; n,m ) t T ( 9 ;n, M > P10)T(f g;n,m ) = T(f; n,m ) . T ( g ;n, m ) P11)T(fV g;n, m) = T(f; n,m ) V T(g;n, m) P12) T(f A g; n,m) = T(f; n,m) A T ( g ;n, m )
-
-
+ a
The block diagrams illustrating properties P1) through P4) are very similar, and thesame is true for the block diagram corresponding t o property P5)through PS),and P9) through P12).Accordingly, a representative block diagram shall be chosen from each of these . Property P2) holds true since the following two block diagrams have the same output.
f-i
I M U L T 4-1
NINETY
-1
52
2. FundamentalOperationson
Two DimensionalSignals
Property P8) holds true since the following two block diagrams always have identical outputs.
f
c
MIN
f
c
8
REFLECT
REFLECT r
8
MIN 9
8
d
REFLECT
4
8
Property P11)holds true since the following two block diagrams have the same output.
f
"
MAX 9
c
m
" .
TRAN
n-
f
c
n
c
m
c
TRAN
c
MAX
c
2.8. Exercises
53
A further consequence of the commutativity between range and domain induced operations is that range induced terms commute with domain induced terms. For instance,
and
T R A N ( C L I P ( f ;t ) ;n, m ) = C L I P ( T R A N ( f ;n, m ) ,t )
2.8 Exercises 1. Suppose that the two digital signals
and
a) Write f and g both as 3 by 3 bound matrices, starting at (070).
b) Show that
m = (
4 4 1 43 20 0 )
0
c)Find f g. d) Show that 3 2 1 fVg=( 4 1 0 ) O
2. Let the digital signals f and g be given as
0
0,o
54
2. FundamentalOperations on Two DimensionalSignals
(G) -3
g=
Find: a> f + g b) f - s c) f v s d) f A s 3. Consider the following block diagram:
c
0,l
OPERATION
0 utput Signal
e
08
a) If OPERATION = A D D find the output signal. b) Show that, if OPERATION = MULT then the output signal is
(6: 2
2 0: ) O
c) If OPERATION = M A X what is the output signal? 4. For each of the signals f = 3 z x z ,S , and U , defined in Section 1.2, find and illustrate the output of each of the following block
diagrams:
2.8. Exercises
55
U MINUS
5 . Give an example of a digital signal f for which f f have finite support? Explain.
U
= U . Can
6. A full wave rectifier is defined as A B S , whereas a half wave rectifier is defined as POS. What class of digital signals, when full
wave rectified, and half wave rectified yield a common output?
7. Are there any digital signals f which yield the same output to the following block diagrams? If so, find them.
56
2. Fundamentd Operations on
Two DimensionalSignale
U 8. Let
0
394
Find C L I P ( f ;2) Do this using the pointwise formulation as well as using the parallel block diagram method. 9. Suppose that the operation BCLIP is given by
Using f of Example 8, find BCLIP( f ; -1). Provide a parallel block diagram formulation of B C L I P .
+
+
10. The distributive law VS) a( f g ) = af ag, holding in the vector space S z X z ,can be described in terms of block diagrams. Indeed, the output of the following two block diagrams are equal.
and
f a
SCALAR
c
c
ADD 9
c
a -
C
SCALAR
e
-
2.8. Exercises
57
Provide a block diagram illustrating the distributive law V4). Note that in V4) a and b are real numbers and therefore a -l-b is the addition of two real numbers. 11. Give a block diagram illustrating the property M1) f t g = ( f V g ) + ( f A g ) which holds true in Rzxz sinceit is adistributive lattice commutative associative algebra with identity. 12. Which of the following are always true for digital signals f ?
13. Notice that a horizontally even digital signal is any functionf in Rzxz such that
That is, f equals H O R ( f ) , or from the more usual pointwise formula f ( n , m ) = f ( n , -m). Give an example of several such signals, also give a block diagram illustratinga horizontal odd digital signal g defined as g(n,m ) = - g ( n , -m). 14. For any digital signal f, let g = $(f is an even horizontal signal. Also, if l
h = -(f 2
+ H O R ( f ) ) ,show that g
- HOR(f))
show that h is horizontally odd; g is called the horizontal even part of f and h is called the horizontal odd part of f
.
15. Define a vertically even digital signal and a vertically odd digital signal similar to what was given for horizontal signals in Exercise 2.13.
58
2. FundamentalOperationson
Two DimensionalSignale
16. Define vertical even and odd parts of f.
17. For which types of digital signals f does the followinghold true?
f
c
0
-f
TRAN
-
1
18. Let
f=
(3”
; ) O
0,o
and
0
2 1 3 9=(3 1 2 )0
1 0
Illustrate, using f and g,the commutativity of the domain and rangeinduced operation P1) through P12) givenin section 2.7. For PQ)through P12) use n = 2, m = 1.
3
Convolution of Digital Signals 3.1 The Support Region for Convolution In this section, we will assume that all digital signals f are of finite support. Accordingly, the subset of Z x Z for which f contains nonzero values is finite. The set of nonzero real values is denoted by f - {0}, and the subset of lattice points in Z x Z for which f takes on these values is given by the inverse function f-l(R - (0)). We define the co-zero set of f, coz(f), to be f - (0)). Thus, coz(f) is the subset of Z X Z for which f does not have value zero. Any subset T of Z x Z for which coz(f) C T is said to be a support region of f. Thus, f i8 zero outside of a support region consistent with the definition of this concept. Additionally, f is of finite support means that card(T) < 00 for some support region T of f. As previously mentioned, an arbitrary support region of f in ?Rzxzcan be denoted by supp(f). Moreover, it follows that coz(f) is the support region of minimal size. The product of two functions f and g in 9?zxzhas a co-zero set equal to the intersection of the corresponding co-zero sets of the individual arguments, that is coz(f g) = coz(f) n coz(g). Another important featureof the co-zero set is seen whenfunctions in g z X zare to be added, only points in the union of their co-zero sets need to be considered. Function values outside these sets are zero. The following example illustrates the use of co-zero sets when multiplying and adding two functions in fzxz
.
Example 3.1 Let
59
3. Convolution of Digital Signals
60
It follows that
(f * g ) ( O , 0 ) = 3 3 = 9 ( f . g ) ( l , O ) = 2(-1) = -2
( f ' g)(l, -1) = 1 ' 1 = 1
so
+
f g can be found b y adding values f ( i , j ) and g ( i , j ) for ( i , j ) E coz(f) Ucoz(g). Doing this we obtain
f+s=
0
(;;) 6 1
0,o
The convolution of two digital signals f and g is formally given at each lattice point (n,m ) by
c 00
( f * m ,m ) =
f ( W g ( n - h, m - j)
k,j=-,
If f and g are both of finite support, f * g will also be of finite support. That is, the result will be zero except on some finite set, a support region of f * g . Co-zero sets can beemployed for the purpose of finding the support region for the convolution of the two signals. Suppose that f and g are of finite support, then a support region for f * g is found by
3.2. Convolution for Signals of Finite Support
61
forming the dilation of coz(f) and coz(g). The dilation operation will be discussed in more detail in the Appendix. The dilation of the co-zero set of f and g is found by forming the union of all the sets obtained from adding all points, a single point at a time, from coz(g) to every point in coz(f). That is,
Clearly, coz(f
* g) C D(coz(f), coz(g)).
Example 3.2 Suppose
as in Example3.1. Thencoz(f) = { ( O , O ) , ( l , O ) , ( l , - l ) , ( O , - 2 ) } and coz(g) = {(0,0),(1,0),(1,-1)}. Wefirst add to everypoint incoz(f) the point (O,O), then (1,O) and finally (1,-1). Then union them together to obtain D(coz(f 1, coz(s)) =
m o > ,(19017 (1, -11, (0, -21,
(2,0), (2,-11, (1, -21, (2, -21, (1, -3))
So the convolution, which will be found in the next section, will surely be zero outside D(coz(f), coz(g)). It may also bezero for some points in this set. Thus, the computation just given provides a support region for the convolution.
3.2 Convolution for Signals of Finite Support As mentioned in the previous section, the convolution of two signals of finite support will also be of finite support. Thus f * g will be zero outside a finite support region of f * g. Consider the subset F of !Rz x z , being the set of all functions of finite support. The convolution f * g of two functions f and g in this space is defined using the pointwise definition:
62
3. Convolution of Digital Signals
(f * d ( n , m) =
c
f(
W d n-
m
-8
(k,j)Ecoz(f) (n-k,m-j)Ecoz(g)
This formulagives the same answer as theconvolution formula given in the last section. However, the above formula involves a minimal number of computations. Since the dilation of coz(f) with coz(g) is a support region for f * g , the convolution should be found by first determining D(coz(f ) , coz(g)) and then using
These functionsare illustrated in Figures 3.l(a) and ( b ) , respectively.
3.2. Convolution for Signals of Finite Support
4
63
4
0
Figure S.1.(b) In order to find f * g , we first find the co-zero sets off and g coz(f = {(1,2), (1,1), (2,1)> coz(g) = ((3,413 (4,4), (493)) Nest, we find the dilution of coz( f ) und coz(g), D(coz(f1, coz(s))= ((4,619 (4,519 (5351, (5,619 (6,5)(5,4), (694)) The convolution f * g is zero outside of this set. We will now determine f * g for points in this set. To do this we choose points ( n ,m ) in D(coz(f),coz(g))oneut a time. Foreach point, so chosen, we then choose points (IC, j ) in coz( f ) . If the point ( n- IC, m - j ) is also in coz(g) we form the product f(IC, j ) g ( n - IC, m - j ) . For instance, choose ( n ,m) = (4,6), and tuke
(
W =( WE4 f )
then we see if
(n,m>- ( U ) = (374) is in coz(g). Sure it is, then we form f(1,2) *g(3,4)= 3(-2) = -6
64
3. Convolution of Digital Signals
Next, we take (1,l)E coz(f). This time
(n,m) - ( kj ) = (375) is not in coz(g) and the product is not formed. Also, for ( 2 , l ) E coz(f), (n,m) - (2,l) = (2,s) 4 coz(g). Hence
(f * g)(4,6) = f(1, Similarly, we have
2)g(3,4)= -6.
3.3. Bound Matrices for Convolution
65
An equivalent way of writing the convolution is
(f * d ( 6 , 4) =
c
f ( W g ( 6 - k,4 - j )
(k,j)€coz(f)n(-coz(g)+(6,4))
This expression holds true by referring to the Appendix, where it is seen that
- coz(g) = U - 3 , -4),(-4, -4)? (-4? -3)) Hence
3.3 BoundMatrices for Convolution The convolution of two functionsf and g, of finite support in ?Rzxz, can be found more simply by making greater use of operations involving bound matrices. A nonzero function in the aforementioned class is represented uniquely by its minimal bound matrix. This gives a compact notation as well as geometric insight. Suppose that the signal f is given using its minimal m x n bound matrix representation
3. Convolution of Digital Signals
66
That is, at least one aij is nonzero for i = 1, i = m , j = 1 and j = n. The objective is to form the convolution of f and g, where g is also given as a minimal bound matrix. Thus,
where, as in the bound matrix for f, at least one bij is nonzero on "the boundary". The convolution f * g will be represented by a bound matrix with (T m - l)(s n - 1) entries, the support region of f * g will be rectangular with upper left corner ( p u,q t v). Several steps are needed in obtaining f * g. First, we form the 180° rotation of g , thereby obtaining g', such that g ' ( k , j ) = g ( - k , - j ) . Using minimal bound matrix representation, notice that
+
+-
+
g,= [ b v T bTS
bls
bv-: bT,S-l
h,s-1
j
0
'* '" *
b"1b T l
..
bll
*
-u-s+l,-v+r-l
The second step is to pad the minimal representation of f with theleft and to the right, andT - 1 rows of zeros above and below. The next several steps are used in obtaining a total number of (n t S - l)(m t r - 1) translates of g'. The minimal bound matrix S
- 1 columns of zeros to
3.3. Bound Matrices for Convolution
67
g’ should be translated such that it is wholly contained inside the padded bound matrix of f . For each translation index such that this is true, a dot or inner product of the aij’s and the bkl’s located at he same point in the integral lattice arefound, and the sum of all such products taken. The resulting value defines the convolution f * g at the index of translation. An example should make this clearer.
Example 3.4 Using
as given in Example 3.3, we will use the method stated above to find f * g . Since g is a two by two bound matrix, we pad the minimal bound matrix representation for f withone rowabove, below, left and right. That is, we write f as
I -H I)
0 0 f = [
0 0
0
093
Next we form the 180° rotation of g, i.e., we input g into the block diagram
g
-!
NINETY2
and get g’=
(; -;)
-t
g’
0
4 - 3
Finally, we translate g’ such that it is located at any possible place withinthe ((padded” bound matrixrepresentation f. To begin the translation procedure we form
68
3. Convolution of Digital Signals
and (f * g ) ( 4 , 6 ) is found by forming the dot product of
This yields a value of -6. Next, form the eight additional translates of 9
an (f * g ) ( 4 , 5 ) is found by taking the dot product of
( : -: therebyyielding have
(
with
-4. Continuetouse -6
0 3 0 2
)O 0,2
the samemethod,finally 3
we
0
48
3.4 Parallel ConvolutionAlgorithms The convolution of two dimensional signals f and g can also be found using a convolution machine. Unlike the methodsused in sections 3.2 and 3.3, this algorithm does not utilize pointwise operations. The parallel convolution algorithm presented herein is specified in terms of several range and domain induced operations previously defined. Notice that
f*g=
c
[ f n , m*
s ( n , 7-41
(n,4Ecoz(g)
and the formula can be equivalently written as
f * 9 = ADD(n,,),,oz(,)ISCALAR(TRAN(f; It, m ) , s ( n ,77-41 The block diagram illustrating thisimplementation of convolution is given in Figure 3.3.
3.4. Parallel Convolution Algorithms
TRANS
f
,-
TRANS
l " l COB
69
-,. SCALAR
SCALAR
-l
RANGE
Figure 9.9 Parallel Convolut:ion Machine
.. . .."...
. .
. . _ , . . . , . . , . . . . , . , . .. . . , . , . . _ _ , , . . . 1
...
..
...
.,.,..
I.
*.. ../.._
70
3. Convolution of Digital Signals
In this diagram we see the T R A N , S C A L A Rand ADD blocks as described in chapter 2. Moreover, two new blocks appear. They are the co-zero set block, denoted by
g-4
cog
and the range of the co-zero set block, denoted by
The CO2 block determines the set coz(g), and sends each point in this set to a distinct T R A N block. Thus, each T R A N block is assigned a unique point from coz(g), This two dimensional point is used in determininghow much f should be translated.A constructive procedure for implementing this is to place the points in coz(g) into a stack and pop the stack one at a time intoeach T R A N block. Concomitantly, another stack implementing theRANGE block extracts the corresponding value of g for each point in coz(g), the g(n,m) in the stack is popped into the SCALAR block. For each point ( n ,nz) in coz(g), the value g(n, m ) is put into thesame SCALAR block for which T R A N ( f ;n, m ) is the other input. The output of all the SCALAR blocks are then added together t o give the result f * g. The order in which the points and the corresponding values of g are input into the stack does not matter, what is of consequence is that when both stacks are popped simultaneously the functiong arises. Throughout the text, the points and values are input using column domination. Example 3.5 As in Ezarnple 8.4, let
3.4. Parallel Convolution Algorithms
71
we will find the convolution off and g using the parallel algorithm. Accordingly, let the output of the CO Z block be the elements in coz(g) arranged in a stack. Also, let the output of the R A N G E block be the values of g arranged in a stack in the same order as the corresponding elements of coz(g). -6
0 0
0 3
0
0 0
496
( -; -6
=
3
1;
Is) 0
4 16
Consult Figure 3.4 for an execution trace in the solution. In the Figure 3.4, notice that we write
instead of the previously defined notation given for T R A N . Both notations result in the same output, f3,4. Additionally, anticipating the final addition, we should always write all the outputs of the T R A N - S C A L A R arrangements using a common size, common location bound matrix. For instance, we write
instead of
The same representation should be used for the output of all other T R A N - S C A L A R arrangements.
. . __... . . . . . . . . .
,..
. . . .
...........
., .
....................
3.5. Convolution of Signals of Non-Finite Support
73
3.5 Convolution of Signals of Non-Finite Support Consider the convolution of the digitalsignals, f and gwhich are not necessarily of finite support. Since these signals might have infinite extents we must worry whether or not the convolution exists. That is, it is not certain whether or not the series
k,j=-m
converges. The convolution always exist if one of f or g is of finite support. For instance, f is an arbitrarily two dimensional signal and g is of finite support.Inthis case,card(coz(g)) < 00 and for anypoint ( n ,m), the equation
c a 3
(f * s ) ( n ,m> =
f (k,j)g(n - k
m -j )
k,j=-cc
is always a finite sum involving no more than card(coz(g)) additions. Accordingly, each of the methods given in sections 3.2, 3.3 and 3.4 for determining f * g can be slightly modified for this situation. As a matter of fact, the parallel method is most easily describable. It involves precisely the same figure, namely Figure 3.3. In thiscase, f is given as an infinite bound matrix and allsubsequent calculations are fully applicable. For instance, all the operations, T R A N , S C A L A R and A D D , when used a finite number of times can involve arbitrary signals in RZ xz. Thus, Figure 3.3 is applicable as given. Wewill provide an illustration of the use of this algorithm, for f and g, when f is not of finite support and card(coz(g)) <
00.
Example 3.6 Suppose that f is the first quadrant step function
1 1
a . .
0
.
.
l
U,
74
3. Convolution of Digital Signals
and
0
Inputting g through the COZ block, we obtain
and through the R A N G E block
Referring to Figure 3.5, we have S C A L A R ( T R A N ( f ;0,l); 2 ) = 2
~
0
S C A L A R ( T R A N ( f ;0,O);-1) = -U 0
0
~
3.5. Convolution of Signals of Non-Finite Support
75
and
S C A L A R ( T R A N ( f ;1,O); 3) = 3'Ul,o
.
a
0
.
0 3 3 0 3 3
' * * *"
Therefore
* . * . . . 1 1
4 4 4 4
0
e . '
'
S
'
There are numerus sufficient conditions for the existence of f * g when both f and g are not of finite support. Among the simplest, and yet one of the most important convergence criteria occurs when f and g both belong to thespace 11. That is, the sum of the absolute value of f ( n ,m ) and g( n, m ) are convergent. By definition, f and g belong to the space 11 if:
m,n=-cc
and M
The order of summation is irrelevant for functions in 3.7 will illustrate this fact.
kl.
Example
3.5. Convolution of Signals of Non-Finite Support
77
Example 3.7 The function
\
...
1/27 ... 1/24 1/28 1/22 1/23 1/29 m * .
...
4s in 11. Indeed, we have the sum
If f and g are in 11 then so are f
-+
g and af . Hence, the space is itself a vector space under addition and scalar multiplication. Accordingly, 11 is a subspace of B2 xz,Moreover, every digital signal of finite support is in I1, and so the vector space of digital signals of finite support is a subspace of l1. When f and g are in kl then the convolution exists, it is given for each lattice point ( n ,m ) by l1
c 00
f *g =
f(Wg(n- 0 - j )
k,j=-m
Example 3.8 Suppose f ana! g are given as follows:
3. Convolution of Digital Signals
78
then
..
112 1/22 1/23 1/24 1/2 1/22 1/23
-
m .
This follows since f ( k , j ) = 0 for all j
# 0 or IC < 0
and g(n-k,m-j)=O forabln-k#O orm-j
For j = 0 and k 2 0 we have
Forn-k=Oandm-j>O,
so
for n,m
2 0.
A very important property of the convolution i s that the function
f * g is also in I1. That is,
which implies
* : 11 x l 1
11
3.6. Banach Algebra Properties of Convolutionin
l1
79
Example 3.9 Referring to Example 9.8, we have
(f * g ) ( n ,m ) = l/Ptm for n,m 2 0 . Therefore
n,m=--oo
The convolution operation for signals in 11 (which includes signals of finite support) will be denoted by the following block diagram
3.6 Banach Algebra Properties of Convolution in l1
Every digital signal of finite support is in I1. Consequently, we will describe the properties of convolution in I1, these properties necessarily hold for signals of finite support. If f , g and h all arein 11 and a is anyrealnumber,thenthe following hold:
Bl) Associative Law: f B2) Distributive Laws:
* (g * h ) = (f * g ) * h
a) f * ( g + h ) = f * g t f * h b) ( f t g ) * h = f * h t g * h B3) Commutative Law: f * g = g * f B4) Identity (Unity) Law: f * S = S * f = f B5) Scalar Commutativity: a ( f * g ) = ( uf ) * g = f
* (as)
The following block digrams demonstrate how the above laws can be applied. Because of the associative law, given by property Bl), we can use the block diagram
80
3. Convolution of Digital Signals
f g
h
-
c
-
CONV
instead of ~
f
c
g
c
CONV c
h
CONV
r
CONV
+
r
or
f
c
9
CONV
h
r
+
Block diagrams illustrating the first distributive law, given in property B2),are provided below. The output of
f 9
CONV c
ADD h and
-
r
c
3.6. Banach Algebra Properties of Convolutionin I I
f
81
c
CONV 9
c
I
ADD
f
c
-
CONV
h
c
are equal. Property B5) requires that the output of the following three block diagrams are all equal:
f
c
CONV g
c
c
SCALAR a
f
c
a
c
c
SCALAR c
9
9
CONV
r
CONV
r
c
c
SCALAR a
c r
f
D
82
3. Convolution of Digital Signals
The strength of signals in II.II1 where
11
is often measured using the one norm
and
n,rn=--oo
Example 3.10 Consider the digital signals f and g,
and
Computing the convolution yields 6 1 0 - 1
Notice that
Ilf * 9111 = 14
and
Ilf * 9111 5 llflll ' IlSlll
3.7. Filtering by Convolution
83
Properties N l ) , N2) and N3) togetherwith the vectorspace structure shows that 11 is a normed vector space. If N4) along with B1) through B5) are employed, bl has all the algebraic structure of a commutative Banach algebra with identity.
3.7 Filtering by Convolution Convolution is mainly performed for the purpose of shaping or filtering a given signal. Here, one of the signals, say f , is obtained empirically by collecting data or utilizing sensors. The signal f , consequently, iscalled an observed digital signal.The othersignal, which we shall denote by h, is obtained in a heuristic fashion. It must be known, a priori, that the application of h to f resultsin a new digital signal with more desirable characteristics than f originally possessed. The latter signal h is called an impulse response or more suggestively, a structured signal. One reason for performing the convolution of f with h might be for restoration purposes. Here, f is obtained through the use of sensors and h acts like an inverse model for the sensor in question. The convolution produces a function with less sensor distortion than f. Another reason for convolving f with h might be for signal enhancement. In this case, we purposely distort f by convolving it with h in order to simplify certain characteristics in f and to attenuate other characteristics. In all thesecases, h is most often subjectivelychosen. Moving average filters provide a simple, yet useful way of performing certain typesof signal restoration and enhancement. The output signal at a given point is equal to a finite weighted average of values of the input signal. By an average we mean the weights are nonnegative and sum to one. The values used in the averaging procedure, more often than not, are close in proximity to the point at which the calculation is to be performed. Thus, a moving average is often classified as a local or neighborhood procedure. A neighborhood of lattice points is a set consisting of the point itself along with the eight vertically, horizontally, and diagonally adjacent neighbors. See Figure 3.6(a).The strong neighborhood of lattice points is the point itself along with just the two horizontal and two vertical adjacent neighbors. See Figure 3.6(b).
84
3. Convolution of Digital Signals
Figure S. 6(a)
I
I
Figure S.6(b)
A moving average filter yields a value for the output signal at a point ( p , ~ )This . value often involves values of the input signal at points in the neighborhood of ( p , Q). Such a filter also smooths out the values in a signal. It makes the outputmore uniform and thereby less varying. Accordingly, it is a type of low-pass filter. When applied to a constant signal the output will equal the input, andif the input is “almost” constant, the output will be even more constant.
3.7. Filtering by Convolution
85
Example 3.11 Suppose that the following moving average filter is defined by the input/output relationship: f(n,m-1)tf(n-1,m-l) s b , m ) = 4 f ( n , m ) t 3 f ( n - 1 , m ) t 2 10
In this problem, for some reason, some points in the neighborhood of ( n ,m ) are weighted more heavily than other points. The reason might be that in the past this weighting gave some type of suboptimal performance. In any case, from a parallel signal processing point of view, we have g= f * h where
0
2/10 1/10
h=
( 14/101
3/10)
Indeed, using the parallel formulation g = ADD(,,,),,,,(h)[scALAR(TRAN(f;n,m);h(n,7~)~
illustrated in block diagram form in Figure 3.7, gives
2T R A N S f
( W
e-
4/10
2
- -
TRANS
1/10
2T R A N S
(1 4
-
ADD
SCALAR
(111)
l
SCALAR
c SCALAR 3/10
Figure 9.7 Moving Average Parallel Convolver
h
86
3. Convolution of Digital Signals
To validate the parallel formulation, notice that
f ( r ,4 p q = f - P,5 - q ) (f
Hence
which is the pointwise description. A n instance of movingaverage parallel convolution is given in the formula provided in Figure 3.8 using
TRANS (091)
SCALAR
-
2/10
2 SCALAR -
4/10
fTRANS (191)
1 /l0
S C A L A R - h(:
”)
: : :)
O O O I
3/10
S C A L A R - g(:
O g G
Figure 5.8 The solution is
(
1
g = 10
4
8 3 12 24 11) l4 G
0
0,l
0
0,l
0
0,l
3.7. Filtering by Convolution
Note that we can check the solution obtained using the pointwise formula. For instance,
87
in a parallel fashion
which is the correct value. Additional points can be checked in this laborious fashion. A s a nintuitive check, however, notice that the sum of all the values in the signal f is 9. Since g is another signal whose values are obtained by using an average of the values o f f , the sum of its values must also be 9. An important commonly used moving average filter is defined pointwise by s ( n ,m ) =
f(n,m)tf(n-1,m)tf(nt1,m)tf(n,m-1)tf(n,mt1) 5
Here we average all the strong neighbors formed using an equal weighting. The parallel formulation for this filter is g= f *h
with 0 h=?( 1 0
1
1
0 l ) 0
0
Thus we have
1
11 1 1 9 = gf t , f L O t , f - l , O
+ gfo,1 t
,fO,-l
Figure 3.9 provides a block diagram illustration of this filtering
..,. ., ".. __._
,
. ,
,.......~... .... .. ..."_ I
~
. , ,~ .
,.
. I
..... ....
.. . .. . . . .
. ..
... ........,. .....,,. ./
3. Convolution of Digital Signals
88
' T R A N S
2T R A N S -
-
115
2 SCALAR
(0,- 1 )
ADD
-
h
-
115 l
cT R A N S (190)
-
< SCALAR -
TRANS
cT R A N S
~
SCALAR 115
(091)
(0,O)
-
115
(-190)
f
SCALAR
2 SCALAR -
115
Figure 8.9
Example 3.12 Apply the moving average filter given in to the following signal, f .
Figure 3.9
The result of applying this filter to f is
We can checkourwork several ways. Perhaps the simplest partial check is to notice that the sum of all values in f and g is 9.
3.7. Filtering by Convolution
89
Not only can moving average low-pass filtering be implemented in a parallel manner, so also can high-pass filtering. These types of filters enhance rapid variations in signals and attenuate thoseplaces of little variation.Again results aredescribed in a pointwise manner, but can be formulatedusing the unified signal algebra operation presented herein. Additionally, the principle of locality isalso frequently used for high-pass filters. Output values are therefore given as a function of input values lying in a neighborhood of the specified output value. Parallel descriptionsof such signals have a support region with a neighborhood centered about the origin. For instance, variation in the horizontal direction is often found by using any of the structuring signals:
h = ( m -1)’
1
h=
0
-1
(F ;;)
Similarly, variation in the vertical direction can be found using any of the following structuring signals:
h=
(9)”
m h = ( - 1 yl) h=
-1 -1
0
-1
Variation in the 135O direction is often found using 0
m 1 h= (-1 0 )
3. Convolution of Digital Signals
90
and in the 4 5 O direction we can employ
to find the variation. For instance, an illustration of the 4 5 O parallel variation detection formulationis given in Figure 3.10.
2 SCALAR
TRANS f
-
1
- (091) TRANS (1sJ)
-
SCALAR
ADD
-c
-
-1 Figure 8.10 Parallel Highpass Filter Convolver
-
Example 3.13 Suppose that the digital signal f is given where
f=[
50 otherwise n2m
Accordingly, we can represent f using bound matrices as
0 0 0 0
0 0
0 5 5 5
o o m 5 5 0 5 5 5
5 5
5 5 5 5
a
..
h
3.7. Filtering by Convolution
91
Iff is utilized in the parallel algorithm given in Figure 3.10 for determining 45O variation we obtain output g where 9 = f0,l
- f1,o
W e have,
0
*
-h0
=
0 0 0 0 0 -5
0
*. 0
-5 -5
0 - 5 -5 -5 -5 -5 -5 -5
. . a
and
\
f0,l
=
0 0 0 0
0 5
5 5 5 5
" ' 0 5 p g 5 5 5 5 5 5 5
...
/ Thus, we combine the two signals and obtain
f*h=
".
0 0 0 5
0 0 5 5
0 5 0
5 5 0 0
5 0 0 0
'.*
92
3. Convolution of Digital Signals
The result given in the previous example shows how a high-pass filter can be used in emphasizing regions where variations exist. In general, high-pass filters look for changes in signals and provide responses where these occur. In practice, judicious choices of structuring signals h are made using heuristic rules of thumb, a well as past experience.
3.8 Correlation An operation somewhat similar to convolution is correlation. This operation is denotedby COR and formally, it is defined at any lattice point ( n ,m) by 00
C O W ,g>(n,m ) =
C k,j=-co
f ( k ,j ) s ( k - n, j - m )
The block diagram illustrating this relationshipis
T
Assuming that the summation converges, and letting i = k = j - m, yields an equivalent from of correlation
cf
- n,
00
C W f ,g ) ( % m ) =
(i t 1 2, t m ) s ( i ,f ) f
T,i"
This implies that
COR(f , g ) = NINETY2[COR(g,f ) ] and so the operation of correlation is not commutative, in general. However, if f = g great symmetries arise due to the above identity. We will now provide conditions under which the correlation exists.
3.8. Correlation
93
A sufficient condition for the existence of the correlation function is that f and g are in 11. Additionally, the correlation function exists if f and g are digital signals where g is of finite support. In this case, COR is given by a finite sum. Of special importance is when both f and g are of finite support. When this is the case we have the minimal computational form for correlation, similar to what was given for convolution. Indeed,
otherwise
0
Thus, before finding COR(f , g ) it is advisable to determine the dilation of coz(f ) with coz(N2(g)). Thisdilation set will be a support region of COR(f, g).
and
W e will find the correlation off with g. First, we must determine a support region for the result using dilation. Thus, we first find
( ; -;)
0
g'= N2(g) =
-1,l
.
._-, ,.
,,. . _.." ,.,.
,
../
,
.,,,. .,," ..,.,.,,. ~
,..,,
~
,.....__., . . ... . ..,..
*I
.,....",,.,
.
. . , , ,.. .
...
- ."..".,,...,,_.
94
3. Convolution of Digital Signals
So CO R(f?g ) = 0 outside of this set. The value for points inside this set must be found, one at a time, using the minimal computational formula given above. For instance, we start with ( n , m ) = (0, - 1). Specifically,
C O R ( f , g ) ( - 1 , O ) = -1
COR(f , g ) ( - l , -1) = -1
Therefore COR(f,g)=
(
:l
-1
1 11 3
Ioj )
0
-1,l
Bound matrices prove useful in calculating the correlation of two digital signals of finite support. The procedure, which is similar to
3.8. Correlation
95
convolution, is quite simple to implement. However, unlike convolution there is no need to rotate the signal g. The other details are identical. All that need be done is to pad the minimal bound matrix representation off with zero to theleft, right, above andbelow. The number of rows of zeros above and below is one less than the number of rows in g , and the number of columns to the left and right is one less than the number columns in g . Thus, a new but equivalent bound matrix is used to represent f . Next, the signal g is translated such that it is located “inside” f, These two signals are multiplied and the sum of all entries are found. This provides the value of COR at the location of the translation of g. The bound matrix g is translated over and over again, the product is formed and the sum taken, providing other values of COR(f , g ) . An example should make this procedure clearer. Example 3.15 Let us again find COR( f , g) where
f=(
1)O
-l
0,o
and
First we pad the minimal bound matrix o f f with one row and one column of zeros on each side. W e obtain 0 0 0 f=[;
-1
0
3 0)
O O O
-1,l
Next we form all translates of g which “f;t inside” this representation o f f . There are nine such. To begin with, we have
So
COR(f , g ) ( -1,l) is found by forming the dot product of
with -1,l
g-1,1
96
3. Convolution of Digital Signals
thereby obtaining 6 . S-l,O
=
( -;;)
0
-l,o
COR(f , g ) ( -1,0) is found by forming the dot product of g - l , o with
(:
- ? ) O -l,o
thereby obtaining - 1 . Similarly, we get C O R ( f , s ) ( O1) , =
C O R ( f , g ) ( - l ,- 1 )
1
= -1
Therefore, we again obtain COR(f,g)=
(
6 1 -1 11 -1 3
0
1:) -1,l
As in the case of convolution, a parallel representation exists for determining the correlation.Indeed, for f and g in ?Rzxz,with y of finite support, we have
ADD(,,,),,,,(N,(,),IsCALAR(TRAN(f;
%5
4 ; NINETI’2(g)(n,7741
Figure 3.11 illustrates the block diagramcorresponding to this implementation of correlation. The blocks are identical to those used in the convolution expression except that the N I N E T Y 2 block is also needed for correlation.
98
3. Convolution of Digital Signals
Example 3.16 Now we will use the parallel algorithm for finding the correlation of f = (
1)O
-l
0,o
and
The first operation to be performed is 180° rotation
Next, the co-zero set is found for g' along with the corresponding real values for each point in the set. These values are stored in the stacks
and
The values in the CO2 stackand RANGE stack are sent to the translation block and the scalar block respectively. See Figure 3.12.
100
3. Convolution of Digital Signals
The output of the scalar blocks are added to give the final result
COR(f,g)=
(
0
6 1 -1 11 -1 3
1:) -1,l
At the beginning of the section we saw that
COR(f , g ) = N I N E T Y 2 ( C O R ( f , g ) ) In terms of block diagrams - the output of
is the same as the output of
NINETY2
Example 3.17 Let us find C O R ( g , f) where
and g = (
O "l
' ) O
0,o
3.8. Correlation
101
as in Example 3.16. This time we find f' = N I N E T Y 2 ( f )=
(; )
0 -1,l
and then find
and
These values are utilized in the translation and scaling of g . A c c o d -
( -;;) = ( ; 1;) (
0
9-l,o =
-l,o
-90,1
%O,O
=
0
0,1
O 2)O
-2
0,o
Adding these bound matrices gives
C O R ( g ,f ) =
(
0 3 -3 11 -1 1
1:
)
0
-1,l
102
3. Convolution of Digital Signals
The implementationof correlation using the parallel algorithm isleft to the reader. Notice that if we find the 180° rotation of COR(g,f)
This is the same answer as found in Example 3.17. The following two identities precisely relate the convolution and the correlation operations. Indeed,
COR(f,g) = C O N V ( j ,NINETY2(g)) = NINETY2(CONV(NINETY2(f),g))) COR(f,g) The second relation holds since
COR(g,f) = NINETY2(C0R(f,g)) That is, the output of
are always identical.
3.9. Applications of Correlation
103
3.9 Applications of Correlation When forming the correlation of two distinct signals f and g it is customary to call C O R ( f , g ) the cross correlation function. If the two functions f and g are equal, the resulting correlation function, C O R ( f , f ) , is called the auto-correlation function. In communications, radar, image processing and other disciplines where pattern recognition plays a major role, the receiving signal is compared using the correlation technique,described in section 3.8, with a structuring signal g. Intuitively, if the auto-correlation function of g is obtained, then the receiving signal f is recognized to be equal to g. If the correlation function obtained is not an auto-correlation function, a different structuring element is used and the correlation operation is performed again. A more in-depth and accurate description of the recognition process using correlation is given next. The essence of the ensuing discussion is that there are simple ways of deternlining if a correlation is auto-correlation or not. In orderto fully appreciate the application of correlation, the space E2 will be introduced. We note that both spaces contain all the functions with finite support. The digital signal
f=
is in
12
if
Signals in 12 are also called finite energy signals. It follows that the sum of two finite energy signal, as well as the scalar multiplication of a finite energy signal is also of finite energy. The value
3. Convolution of Digital Signals
104
is called the two norm of the finite energy signal f and is denoted by Ilf 112 * The digitalsignal
0
0
0 0 0
0 112 113
is in
12
.... ..] ...
...
since
Notice that f isnotin 11. As was the case for the l-norm of I 1 functions, the2-norm for finite energy signals is always a real scalar, that is 11.112
: 12
-+
9?
Moreover it satisfies the three characteristicsof a norm. El) Positive Definite: 11f [l2 2 0 and 11f = 0 iff f = Ozxz E2) Homogeneous: l l a f l l 2 = la1 l l f l l 2 E3) Triangle Inequality: llf t 9112 5 l l f l l 2 t l l s l l 2 Properties El) and E2) can be used in showing an important inequalityregarding the correlation. The resultis known as the Cauchy-Buniakovski-Schwarzinequality, or CBS inequality. Let < f, g > represent the summation
5
f (n,m>s(n,M>
n,rn=-m
where g is given in a manner similar to f .
3.9. Applications of Correlation
105
CBS Inequality: Suppose that f and g are in 12, then
I< f7s >I
Illf112 * llsllz Moreover, the equality sign holds iff f and g are scalar multiples of each other. The result follows by forming
c 00
1l.f t bsll; =
[af(n, m) t bg(n7 m)I2
n,m=-m
where a and b are some real numbers. By El)
c 00
b2
g2(n,m)
n,m=-co
Choose
and 00
n,m=-co
then we obtain
3. Convolution of Digital Signals
106
that is
llf (if
llfl12
112
#0
= 0, then f ( n , m ) = 0 for all ( n , m ) and both sides in the
CBS inequality equal zero.) Dividing by
2
f 2 b ?m )
n,m=-ca
gives
thus
l< f?s>I 5 llfll2 ' llsll2 The only time equality holds is for
for some real numbers a and b if af t bg = 0
Which means that the two functions f and g are scalar multiples of each other. The relation between CBS inequality and correlation will be explained next. First, notice that f,Sk,j
>= C W f , g ) ( W
Next, since the norm is found by summing over squares of all values o f f , t h a t is
3.9. Applications of Correlation
llfllz
=
107
c
n,m=-co
it follows that any translates of f have the same norm as f , that is
Ilfvnllz
= llfllz
By CBS inequality,
I C O R ( f , g ) ( W l 5 llfllz Ilsll2 for all lattice points ( k , j ) . Moreover, we know that equality holds if and only if f is a multiple of g k , j . Assuming that f or g are not identically zero, we have a
The “closer” f and g are, the closer the left side, of the a,bove inequality, is to 1. Herein lies the basis of the correlation technique for the pattern matchingof signals.
Example 3.18 Suppose we are given a database consisting of three signals g , h and r to be used in the recognition process. Let
and
The observed signal is
f=(-;
;)
0
-3,O
108
3. Convolution of Digitai Signals
Correlation techniques will be employed to detect which signal f is “shaped like”’. More precisely, assume f is ascalarmultiple of a translate of one of the signals h, g , or r. W e will determine the one f is Q scalar multiple of, alongwiththe amount of translation. To solve this problem we form the correlation of f with each of g , h, T and then perform the normalization process. W e have
and the norms llfll2
=3
ll9ll2 = 3 llhll2 = 3 llTll2
The normalization gives
=4
3.10. Exercises
109
Notice that the only time the normalized correlation function is of absolute value one is for
This means that h is a scalar multiple of f3,o. Moreover, we known that in this case the scalar multiple is one. Notice that if an auto-correlationis performed then the correlation function will be largest at the origin, that is
C O W ,f
0)
will be maximum. Moreover,
3.10 Exercises 1. Let
Show that
Must supp( f) = coz( f)? Explain. 2. Find coz(g) where
3. Refer to f and g given in the previous two exercises. Find D(coz(f 1, c o 4 s > ) *
,.,. .. ,
. ,.,
. .",. ,,~,. . .. .. I
.. ...
..,
,
,
,
.
,
.., .
.., ..
. ... .
.
.
110
3. Convolution of Digital Signals
4. For
f and g given in Exercises 1 and 2 respectively, show that
Do this using the definition of convolution. 5. Give an example showing that coz(f*g)need not -. ".equal .... .
D(coz(f1, coz(s>)*
6. Use the bound matrix method given in section 3.4 to obtain f * g given in Exercise 4.
7. Use the parallel convolution algorithm given in section 3.4 to obtain f * g given in Exercise 4. 8. Find all digital signalsg which have the property that f * g = f for all f .
9. Refer to the parallel convolution block diagram given earlier and let g = 61,o = (l)!,o, then it is obvious that the output of
and
-I
TRAN 0
3.10. Exercises
311
are identical. Generalize the above observation for arbitrary translations.
10. Can we form f * g for any digital signals f and g? Explain 11. What happens if we try to perform
U
* U?
12. Provide a block diagram illustrating the Banach algebra property B2) of the convolution given in section 3.6. 13. Use the parallel convolution algorithmto verify Banach algebra property B5) for scalar a = -1 and
14. For the signal given in Exercises 1 and 2,illustrate the normed vectorspaceproperties N l ) , N2) and N3) given in section 3.6. 15. For f
* g given in
Exercise 4 illustrate the Banachalgebra
inequality
Ilf * g111 I llflll
IlSlll
16. Show how to perform the weighted moving average
by employing the parallel convolution algorithm. Do this for
I=
1 1 1 1 1 1 1 1 (2 2 2 2 3 3 3 3
0
)o,o
112
3. Convolution of Digital Signals
17. Implement the high-pass filter h=
( -l
0
lo,,
on the signal f given in Exercise 16.
18. Several important structuring signals h are used in finite impulse response filtering (FIR), that isin convolving a signal f with a finite support signal h. These aredefined in the horizontal direction. For each structuring h (or windowing signal as they are oftencalled) set up the parallel convolution algorithm to perform the FIR filtering of the first quadrant step signal U . Do this for N = 7. In each case, find the range and co-zero stack values, and describe what these FIR filters do in the horizontal as well as in the vertical direction. How can we make a FIR which acts in the vertical as well as in the horizontal direction, similar to the filter given here? (a) Rectangular window
(b) Triangular window
(c) Raised-Cosine window
(d) Hamming window
0
otherwise
3.10. Exercises
113
(e) Blackman window
h ( W=
0.42t 0.5 * COS & + 0.08 * cos
(IC1
5
v,
j=O, N > 2 0
otherwise
Find COR( f,g) using (a) the pointwise method. (b) the bound matrix procedure. (c) the parallel algorithm of Figure 3.12.
20. For f and g given in exercise 19 illustrate the equational identity given in terms of the block diagram: the output of
is the same as the output of
NINETY2
21. Use the signals
114
3. Convolution of Digital Signals
to find C O R ( f , g ) . What did you observe in doing this? Hint: here N 2 ( g ) = g . 22. Consider the following three signals
g=
and
h=
( (
0
0 O1 -01 ) 050
-”)” O
O
0,o
Find the auto-correlation and cross-correlation functions volving these signals.
in-
23. Illustrate the CBS inequality for the correlation function involving each of the signals given in Exercise 22. 24. Explain how the properties of the normalized correlation func-
tion are used in the pattern recognition application of section 3.9. 25. Which of the digital signals f below are in 12?
1/n 12 # 0, all m 0 n=O, a l l m
26. Which of the signals in Exercise 25 are in I I ? 27. Show that if
f
E
11,
then f E
/2.
Is the converse true?
4
2 Transforms 4.1 Formal Introduction t o 2 Transforms One of the most important, and perhaps the best known transform technique, involving digital signals f , in R2, is the 2 transform. A similar transform exists in two dimensions and is also called the 2 transform. It is defined, in a formal manner, by associating the two dimensional infinite series
with the two dimensional digital signal
...
... ...
a-1,1
ao,1
a-1,o a-1,-1
ao,-1
Q1,l
''
a1,o
'' '
a1,-l
"'
This correspondence is also often denoted by F(I,W ) , m
n,m=--oo
or
m
n,m=--oo
115
116
4.
2 Transforms
The ordering of this series is unimportant since it is only a formal sum. In thissection, z and W are indeterminate; this means thatz and W are just symbols and should not be treated as numbers.Accordingly, no mention of convergence is given to the infinite series. Moreover, zo will be identified with the "symbol" number 1, and the same is true for W O , If the coefficient of zkwJ' is zero, then this term can be left out.
Example 4.1 If
... f=(
"' a
*
'
1
1 4 -3 0 0
1 1 2 -1 0 0
1 2 22 23 24 1 2! 3! 4! 0 1 2 3 4
then n=-w
n=O
J
Example 4.2 Suppose that 0
(: :
then
c 00
2(f)=
+ c ( m + 1)w-m 00
2-25-
...
.'. '..
4.1. Formal Introduction to 2 Transforms
117
Example 4.3 If 0
*
f=
0 0
1/3!
0 1/2! 1/1 0 0 0
then 2(f) =
c
0 0 0
*
a
*
e . .
‘ a ’
* ’ *
- 1
“Jnw-n
n=O
The set of all infinite series involving integer powers of z and W with real coefficients willbe denoted by R[., W]. Notice that for every signal f in Rzxz,there will be one and only one infinite series in %[z,w] corresponding to it, which of course is the 2 transform. In the opposite direction, for every infinite series in R[z, W] there will be a digital signal (in Rzxz) which is its correspondent. Thus, the mapping:
2 : 8 Z X Z + a[., W]
is one to one and onto. Accordingly we can define the inverse mapping 2-l where
2-1: R[%,W] ”+ RZXZ and
/ e . .
... . ..
=
\
a . .
. . I
...
l16
4. Z Transforms
In general, notice that
z-l(z(f)> =f If
f then
-
F ( z ,4
2(2'1(F(z,w))) = F ( z , W).
Example 4.4 Notice that the first quadrant step function U has the unique Z transform 00
Several additional special Z transforms should be noted, similar to the one given in Example 4.4. Indeed, we have
ozxz
-
0
4.2 Some Operations Involving 2 Transforms In this section, we define four simple operations for manipulating infinite series in % [ z ,W],These operations are then one by one related to operations involving digital signals. The firstoperation given hereisaddition. Two infinite series, F ( z , W ) and G ( z ,W ) in % [ z ,W ] are added together to yield another series in S[., W].The result is denoted as
(FtW
,4
or by "The sloppy, but more common, notation"
. ..
4.2. Some Operations Involving
2 Transforms
It is formed by adding the coefficients of equal powers of z and That is, if
5
~ ( zW ,) =
119 W.
an,mz-nW-m
n,m=-oo
and
then
The second operation involving series in %[z, W] is scalar multiplication. Here, any infinite series F ( z , W ) can be multiplied by a real number U which again results in an infinite series in 8 [ z , W], denoted by (U F ) ( z ,W ) , or just by u F ( z ,W ) . We define M
n.m=--oo
The third operation
defined on infinite series ismultiplication.
It, however, involves the multiplication of two elements of R[z, W]. One of them is just z k w j with k and j integers. The other series is arbitrary, say F ( z , w ) . The result is denoted by ( z k w j , F ) ( z ) , or just zkwjF(z)
and is defined as z k w j ~ ( z ,W= )
2
an,m zk-nWj-m
n,m=--oo
In particular, notice that
zOwOF(z, W ) = F(z,W ) and n,m=--oo
The fourth, and final operation on series in %[z, W] is an inversion type operation, denoted by Z, where we replace both z by 1/z and
4.
120
W
2 Transforms
by l / w . So
n,m=-co
which we will often write as
c 00
a-n,-m
z-nw-m
n,m=--oo
Clearly,
4
W ( F ( z ,W > > = >
Henceforth, we will often denote Z ( F ( z ,W)) by the equivalent formulation F ( l / z , l/w).
Example 4.6 Let 00
00
and m=l
0
n=l
m
m
n=-w
then 00
00
F(%,W )t G(z,W ) = c(3t n 2n)z-n t m=l
2w-mz1
2 2n+1%-n+ c 2w-m%' m
2F(z,w) = m=l
m
n=-w w
m=l
c
n=l
00
n=-cc
and
c 00
F(l/z, l/w) =
n=-
03
c 00
2-"z-" t
m=l
W-mz-l
4.2. Some OperationsInvolving 2 Transforms
121
Each of the four operations just defined in R[%,W] have analogous operations existing iniflzxz. Corresponding operations can be found using the mapping 2 (or 2 - l ) since the 2 transform is a one to one correspondence between signals in Rzxz and series in R[z,w]. Additionally, if
and g
-
G(%, W)
then the following properties hold true: 21) Additive Property: 2(f g) = F ( z , W ) G(%,W ) 2 2 ) Homogeneous Property: 2 ( a f ) = a F ( z , W ) 23) Shifting Property: 2 ( T ( f ;n, m ) )= z"%rrnF(z, W ) 24) Rotation Property: 2 ( N 2 ( f ) )= Z ( F ( z ,W))= F(l/z,l/w) Theseproperties show that Rzxz and R[z, W ] are isomorphic. Properties Zl)and Z2) are often combined as the following to denote the linearity of the 2 transform
+
+
Of special interest about 23) is with n = 1, m = 0. Here, the 2 transform of a shift off to the right by one unit isz"F(z, W).A shift ) . symbolism of f one unit up has a 2 transform ~ - ~ F ( z , wSpecial is often employed using block diagrams. Indeed, instead of using the block diagram
to obtain TRAN(f;n, m), the following block diagram can be employed to specify the same operation.
Finally, 24) says that the 2 transform of the 180” rotation of f is found by taking the 2 transform of f itself and then replacing z by l f z , W by l / w .
Example 4.6 Suppose that F ( z , W ) and G(z,W ) from Example 4.5 are given, then we have
and where
I
0
a
.
.
a
.
.
. . .
... ...
f=
0 0
1 1
0 0
0 0
0 0
‘.*
...
and
0
g=
... , ...
0
-2-2
1 -2-1
Moreover,
. . f t g =
0
. . . . 2 2 0
0 0
0 0 0 0 2 t 3 22t32
... ... ...
-
F ( z , W )t G(z,W )
4.2. Some Operations Involving 2 Transforms
. . . . . . . . . . . . . . . a . .
...
...
... ... ... -
0
.
a . .
0 0 2-1
2 2 1
0 0
0 0
0 0
22
23
0 0
0 0
0 0
1 1
2-4
2-3
2-2
2-1
0 0
0
0 0
0 0
123
0
0"
... 0"
0 0 1 0 0
!
t4
2F(x, W )
0
a * '
...
t+
".
z-3w-2 F( x , W )
'.'
Because of the isomorphism previously mentioned, there is no need to specify numerous equational constraints existing in R[z, W]. Indeed, for every identity involving ADD, SCALAR, TRAN, and N I N E T Y 2 in RzXz there is an identical identity involving +, z-nW-m and Z respectively in R[%,W].For instance the additionoperation in R[%,W ]is associative, commutative, there isa zero infinite series and so on. Additionally, because range and domain inducedoperations always commute in !Xzxz we have the "obvious" properties in %[z,W]. m,
P1) 2-nw-m (F(%4t W ,4 ) = z-nw-mqz,
W)
+ Z-nw-"
G(%,W )
Pa)z-nw-m (a(F(x,W)))= a ( ~ - ~ w - ~ ( FW))) (x, PS)Z ( F ( z ,W )t G(z,W)) = F ( l / z , l / wt) G ( l / z ,l / w ) P4)Z ( a F ( z ,W)) = a F ( l / z , l / w )
124
4.
2 Transforms
Example 4.7 If
G(%, W ) = 2 ( g ) = 3zw-l+ 2w-'+ 5 + W
+ z'lw-l
Next observe that N 2 ( f )t 3g1,o =
(
2 4 0
9 1
6 3 17 0 ) 3 0
0
This can be seen from the following block diagram walk through.
f
-
0 0
2
0
0
1 0 0
NINETY2
0 0
--I
3
2 1 5 o)o
0
1 0
(0
-
-
g1 0-
L
TRAN
SCALAR 3-
1
cl
ADD
0
9
- ( 00
0
l-
6 3 15 0 ) 3 0
h
0
4.3.
2 Transforms for Digital Signals of Finite Support
where 2 h = ( 4 0
9 1
6 3 17 0 ) 3 0
125
0
The same result can be found using 2 transforms. Indeed,
h = 2"[F(l/z, l/w)
+ 3 ~ ' ~ G ( zW)] ,
Letting F ( l / z , l / w )4-3z"G(%, W)= H ( z , W )
gives
Taking the inverse 2 transform again gives h.
4.3 Z Transforms for Digital Signals of Finite Support Each of the operationspreviously defined for Z transforms in general surely hold for 2 transforms involving digital signals of finite support. As was seen in Example 4.7 of the last section, infinite sums is replaced by finite sums whenever digital signals are of finite support. Moreover, each of the four fundamental operations when applied to finite sums also result in this type of structure. It follows that the set of digital signals of finite support and the set of a finite series in R[z, W] are isomorphic structures.
Example 4.8 Suppose that
f=(;
and g = (
-2 -1
0 3)
3" ; ;
g
0
"l,]
o-3,l
126
4. Z Transforms
then the corresponding Z transforms are
F(%,W ) = 2z - 1
3z-1
- 2w“
and
G(%,tu) = 3z3 t 4z2 t z t 1t 3%-1 t zw-’ t 2w-l The 2 transform of the sum of f and g , in the previous example, is a finite sum. The same is true for the 2 transform of the scalar multiplication of f , the translation of f, and the 180° rotation of f. Specifically,
A D D ( f , g ) t”-+ 3z3 t 4z2 t 32 t 6%“ t zw-’
S C A L A R ( f ;2) = 2f T R A N ( f ;2,O) = f2,o and
C--)
- 2 t 6%” - 4w-l - 2-l -+ 3 ~ --~ z~- ~ w - ’
42
22-l
N I N E T P ( f ) = N 2 ( f) CS 3%- 1 22-1
- 2w
One of the most important consequences of the isomorphism between the space of all digital signals of finite support and all finite Z transforms is the convolution theorem.
-
Theorem 4.1 (ConvolutionTheorem) Suppose that f and g have finite support and
f and 9
then
-
F(%,4
G(z,4
f *g = 2-l(Z(f)Z(g>> Additionally, greater insight into convolution is achieved using this transform technique. The multiplication of the finite series in the Convolution Theorem should be carriedout using the rules of “High school algebra” in conjunction with the operations given in the previous section. In other words, “multinomial multiplication” should be performed and like powers of z and W combined. Alternately, multiplication of these finite series can be found by the following simple, but forbidden looking procedure, if
. . ...
4.3. 2 Transformsfor Digital Signals of Finite Support
127
and
where
Example 4.9 Suppose that
and
-;;) 0
g=(
394
I n Example 3.3 as well as subsequent examples, we saw that
( -; -6
f*g=
3 1;
:S)
0
4 96
W e will find f * g utilizing the 2 transform convolution theorem. To do this we first find the 2 transform of f and g. Thus, 2(f) = F ( % ,W ) = 3z-1w-2
+ 2%-lw-l
- z-220-1
128
4.
2 Transforms
Next, we multiply these two finite sums, making sure that common terms are combined after the multiplication is concluded.
+ -z-~w-~)(-~x-~w-~+ 3-420-4 + 32-4w-3)
F(%,w)G(.z, W) = ( 3 2 - l ~ ~2 z~- l ~ "
Finally,
f * g = Z-l(F(z, w)G(z,W ) ) and so
( -; -6
f*g=
3
1 ;
Io) 0
496
as was previously noted. A few observations with respect to the previous example are in order. One should compare the "High school" method of computing the product with the parallel algorithm for computing the convolution given in Figure 3.3. Indeed, the isomorphism becomes more apparent when the comparison is made. Additionally, the formula used at the end of Example 4.9 illustrates that the same results can be obtained in a tedious non-intuitive fashion. To show that the convolution theorem holds, one need only utilize the isomorphism existing between finite duration signals and finite series in %[z,W]. Accordingly, we have
2(f * 9 ) = Z(ADD(,,,),c,(g)[f,,, =
c c c
W n , m
' s(n,
41)
-g(n,m))
(n,m)Ecoz(g)
=
g(n, m )z-"w-"Z(j)
(n,m)Ecoz(L7)
=Z(j)
(W4Ecoz(g)
g(n,m ) %-"W-" = 2 ( f )* 2 ( g )
4.4. Laurent Expansions
129
The first equality above utilizes the parallel representation for convolution. The next equality makes use of property 21)in section 4.2. The next equality involves property 22) and 23) also in section 4.2. The next equality holds since 2(f)dose not depend on the index of summation, and so it can be taken out of summation. The last equality holds using the definition of 2 ( g ) .
4.4 Laurent Expansions As observed in the previous sections, a lot can be done with formal 2 transforms and associated algebraic manipulations. However, it is often desirable to replace the indeterminates z and W by real, or more frequently by complex numbers. When this is done we must be cognizant on whether or not the series converges. The resulting series, in this case, we shall again denote by
c 00
F ( z ,W )=
n,m="m
This series is called a Laurent expansion or Laurent series. In one dimension, the Laurent series converges for complex values of z located in an annulus. That is,a ring shaped region of the form
r
or a degenerate annulus, that is a disk I J I< R or outside of a disk I z I> T . Additionally, it may converge everywhere in the complex plane or nowhere. Thus, if any complex number in the region of convergence is substituted into the series, and the series is summed, a complex value is attained. Moreover, the convergence of the series is absolute anduniform on every compact subset within the annulus. Accordingly, the function F ( z ) is analyticin the annulus type region. In the two dimensional case, the series, when represented by an analytic function, will converge in a generalization of an annulus, called a Reinhart domain. Indeed, for F ( z , W ) analytic in TI
R1 and
TZ
where
O < r 1 < R 1 5 c a and O < r z < R ~ < c s
130
4. Z Transforms
F(%,W ) can be represented by the absolutely convergent series
The coefficients of the series are uniquely determined by F. Moreover, the series converges uniformly in any compact subset within the region given above. Recall that, because of the absolute convergence of the Laurent expansion within the Reinhart domain, the series can be summed, (that is arranged) in arbitrary order. The domain of convergence mentioned above is often illustrated as a rectangular region, see Figure 4.1.
R1 Notice that theone dimensional case reduces to a degenerate rectangle, namely the straight line
Indeed, when we plot this inequality as a function of the real and imaginary parts of z it is an annulus. However, in terms of 1 z I it is the degenerate rectangle mentioned above. Observe that if the analytic function F(z,W ) has a Laurent expansion convergent for
and all W, then we obtain a region of convergence consisting of the semi-infinite strip region given in Figure 4.2.
4.4. Laurent Expansions
131
For nonzero digital signals of finite support, their Laurent expansion will converge absolutely everywhere, except possibly for z = 0 or W = 0. Several possibilities arise: 1. The Laurent expansion may be valid everywhere. This is true for signals with support in the third quadrant. 2. The Laurent expansion may be valid everywhere except possibly z = 0. This is true for signals f, such that coz( f ) contains points only from the second and third quadrant.
3. The Laurent expansion may be valid everywhere except possibly W = 0. This is true for signals f such that coz(f ) contains points only from the third and fourth quadrants.
4. The Laurent expansion may be valid everywhere except possibly z = 0 and W = 0. This is true for signals f such that coz( f) contains points from the second, third and fourth quadrant. Example 4.10 Severaldigitalsignals along with their Laureat expansions.
of finitesupport
1.
F ( % ,W ) is valid everywhere except z = 0 or
W
= 0.
are given
132
4.
2 Transforms
G(%, W ) is valid everywhere except
W
= 0.
9.
H ( z , W ) is valid everywhere.
4.
K ( z ,W ) is valid everywhere except at z = 0 . The Reinhart domain associated with signals with support in a single quadrant can be described in a simpler manner than arbitrary digital signals. Perhaps, the simplest Reinhart domain results from signals f with support in the third quadrant. Here we can write: "' * '
f(-l,O>
pKq
f(-l, -1)
f(0,-1)
f= Accordingly,
c 0
2(f)= F ( z , W ) =
j,k=--dO
l
c 00
f(k,j) % - k W - j =
f(-k, -j)
%kWj
j,k=O
Hence, these types of signals are represented by two dimensional power series. This is the simplest type of possibly non-finite Laurent expansion.
4.4. Laurent Expansions
133
It is known that if some arrangement of the series converges for some values z=zo#O and w = w o # O then this series converges absolutely for all a and W such that
I I<
zo, I W I< WO Moreover, the function F(%,W ) will be analytic in this region. This region is illustrated in Figure 4.3.The 2 transform, in this case, is the Taylor series and the series for F(%,W ) converges uniformly to F ( z , W ) in any compact set within this Reinhart domain.
I zo I Figure 4.8 A consequence of the above result is that the region of absolute convergence for the 2 transform of a third quadrant signal must always contain the interiorof rectangles. Example 4.11 Consider the third quadmnt digital signal
f"
m \ 00
0 0 0 0 0 0
~ " 0 0 0 0 1 ' ~ ' 0 0 1 0 0 00 1 0 0 0 0 0 0
f=
.
.
.
.
S
. . . . . \
.
.
.
.
.
*
.
I
a
0
CO
++
C z 2 * w " = F(z,w) n=O
.
.
Then the power series convergesabsolutely for z = 0 and call W ; it converges absolutely for W = 0 andall z , and it also converges absolutely for 1 Iz2w1<1 or IwI<
m
where z # 0 and W # 0 . This region is plotted in Figure 4.4. Observe that for any point within this region, the rectangular box with sides parallel to the coordinate axes is also in the region.
134
4. Z Transforms
Figure
4.4
4.4. Laurent Expansions
135
Example 4.12 Suppose that
f=[
... ... I . .
1 1 1 6 4
2
The test for absolute convergence entails M
j,k=O
When utilizing points within the region of absolute convergence, the odering of terms will not a$ect the outcome. Thus, we can write the absolutely convergent series as n=O
t ( b I 3 t 6 1212 1201 t 12 121 1 u f t 8 Iwl3>t ... Accordingly, the series converges when
["I t 2 IWI
1
This triangular region is plotted in Figure 4.5. The Reinhartregion,illustrated in Figure 4.5, canalso be described using logarithms. In this case, for each point
1.(
7
I4>, z f
0, 'U)
z0
in the Reinhart domain we let
t = I n IzI and S = lnlzol What is of consequence is that the logarithmic image determined above will always be convex. That is, for any two points in this image, the straight line segment connecting these two points will always be in the set. The corresponding logarithm domain for Example 4.12 above is depicted in Figure 4.6.
136
0.6
4. Z Transforms
IZI + 21w( < l I
I
I
Figure 4.5
I
l
1
4.4. Laurent Expansions
t
Figure 4.6
137
138
4. Z Transforms
For signals f with support in the first quadrant
The 2 transform F(%,W) consists of the constant f (0,O)term plus a principal part of the Laurent expansion. Indeed, 00
C
~ ( zW) , =
f ( n ,~
) Z - ~ W - ~
m,n=0
Similar to thepower series situation, if this series converges at (ZO,WO), it will converge absolutely for all points ( 2 , W ) such that
l 4 2 lzol
and l 4 2 lWol The resulting function will be analytic in this region, and again logarithms can be utilized in describing the region of absolute convergence. Here we again let t = In1.1 and S = In and the logarithmic region thereby obtained will again be convex.
Example 4.13 Let
. *
. . . . . e
.
. . . .
f=
*
0
0 0 0 16 0 0 0 0 0 0 0 4 0 0 0
J
.
0 0 0 0 0 0
0 0
e
'
*
'
c CO
*
S
* ' * '
'
(2z"w")
2n
= F(2,W )
n=O
m
*..
,
This series converges absolutely for n
The Reinhart domain is illustrated in Figure 4.7 and the corresponding convex logarithmic domain is illustrated in Figure 4.8.
4.4. Laurent Expansions
139
20 18 16 14 .l2
6 -10
a 6 4 2
0
0.5
l
1.5
I4
Figure 4.7
2
2.5
3
2 Transforms
140 4.
15
i
10
I
5 v)
C
-5
Figure 4.8
4.4. Laurent Expansions
141
Similar descriptions can be given for regions of absolute convergence for signals with support in the second and fourth quadrant. The Laurent expansion arising from the 2 transform of an arbitrary digital signal can converge nowhere, everywhere or somewhere. In the lattercase, the region of convergence can be found by writing the original signal as a sum of four single quadrant signals. Then, find the Reinhart domain associated with each simple quadrant signal. Finally, by forming the intersection of these domains we obtain the region for which the original signal converges. Example 4.14 Suppose that we are given the "diagonal valued digital signal f n where
f ( n , m )=
then f
-
{
c
1/2" n = m > 0 1 n=m
c 00
00
F(%+) =
znwm t
n,m=l
2-nZ-"w-m
n,m=l
the first series above converges absolutely for
I
# 0, W # 0 and
The second series converges absolutely for
Thus, F ( %W, ) converges in the region
Before we conclude this section, it should mentioned that an arbitrary analytic function F ( z , W ) might have many or even an infinite number of Laurent expansions associated with it. Each will be valid in some Reinhart domain. Moreover, there will be a unique digital signal for which the corresponding 2 transform will be the Laurent expansion valid in that Reinhart domain.
142
4. i? Transforms
Example 4.15 If then for we have
F ( z ,W ) = 1/(1- %W) [%W1<
1 or
IWI
< l/ IzI
F ( z , W ) = 1 + zw 4- k2W2 t
and here
f
-
*
'.
F ( w )
Additionally,
On the other hand,
-1
1
= -Z(Wl + " & + -
1
22W2
t
*
This is va2id where
where
. . . f=
*
. .
0
0 1
0
. . .
& ; : ::: '"
1
-)
4.5. 2 Transformfor
4.5
11
Signals and Signals of Arbitrary Support
143
Z Transform for 11 Signals and Signals of Arbitrary Support
In section 3.5 we saw that any twosignals in I1 can be convolved and the result is also in 11. Not all I1 signals, however, have 2 transforms representing analytic functions.
Example 4.16 Suppose that the 11 signal
then formally, the Z transform off is F(%,W ) where
This series converges for IzI = 1 and all W . However, this expansion does not converye in any domain. Accordingly, we can only manipulate the series in a formal matter, or use it for complex values z such that IzI = 1 and arbitrary W . The results presented in the previous example typify I1 signals they always have 2 transforms which converges (absolutely) at least for Iz( = 1201 = 1. For signals with support in the first quadrant 0
0 0 0 0 0 0
m ao,1
0
have 2 transforms which represent analytic functionsfor all1.1 , / W (2 1. It may converges in even larger regions and therefore represent an analytic function in the larger region.
144
4. 2 Transforms
Example 4.17 Consider the first quadmnt signal
. .
0
. . f= 0
1
a0
0 0
0
0
... ...
The 2 transform off is
F ( z ,W ) =
c
O01
2%-nw-n
n=l
The series converges (absolutely)for all IzwI 2 1. The convolution theorem also holds for signals in
11.
Theorem 4.2 (Convolution Theorem) Let f and g be in 11 with
As a consequence, convolution can be found by taking 2 transforms o f f and g , multiplying these quantities and takingthe inverse 2 transform of the result, that is
f *9 = 2-1[2(f)2(g)3 The multiplication of two Z transforms of functions in 11 is well defined. It converges absolutely, at least in the intersection of the regions of absolute convergence of 2 (f ) and 2(g), which is at least 1.1 = lWl = 1. If
~ ( f=)
5
mln=--03
anlmZ-nW-m
4.5.
2 Transform for I1 Signals and Signals of ArbitrarySupport
c
145
m
Z(g) =
bnlmZ-"w-m
m,n=--oo
then the multiplication results in
F
Z(f)Z(g) =
CnlmZ-nW-m
where 00
cn,m =
C
ai,jbn--;,rn-j
i,j=--00
Using the isomorphism in section 4.2 gives the association 00
cn,m
C
= (f * g)(n, m> = . . f(i,j)g(n - i , m - j ) I,j=-m
which proves the convolution theorem in this case. We will conclude this section with another important case in which the convolution theorem holds.
Theorem 4.3 (Convolution Theorem) Iff is in RzXz and g is of finite support then we can formally find the Z transform F ( z , W ) of f . If G ( z ,W ) is the 2 transform of g, then
f *g
-
q z ,w)G(z,W )
Example 4.18 Let us illustrate the convolution theorem using
f = lzxz and
Since
00
4.
146
2 Transforms
and g
t".+
G ( z ,W ) = 2
+
3Z-l
+
20-l
we have
c 00
F ( z , w)G(z, W )= (
z ' ~ w - ~ )t( 32-l ~
t 20-l)
m,n=-m M
m+=--oo m,n="Oo
M
M
m,n=-co M
m,n=-oo
therefore,
4.6 The 2 Transform for Calculating Correlation Since convolution and correlation differ only by a 180° rotation, we should expect that the 2 transform can be used to obtain the correlation of signals. Indeed, this isthe case for various classes of signals in 9lzXz.Again, the isomorphism presented earlier provides the key to proving the result.
Theorem 4.4 (Correlation Theorem) Suppose that f and g are in 11, or that f is any digital signal and g is offinite support. If
f
then
-
4
4.6. The 2 Transform for Calculating Correlation
147
z
z -l Figure 4.9 Thus, to find the correlation of f and g , the 2 transform of each signal is found. The inversion operation is applied to the 2 transform of g. The product is formed and an inverse transform is taken.
Example 4.19 I n Example 3.16, we used the signals f = (
1)O
-l
*
g=(
0,o
1)O
-l
and found COR(f,g)=
(
0,o 0
6 1 -1 11 -1 3
1:) -1,l
Let us again find this result, this time using cornlation theorem. W e have f t-f F ( z , W ) = 2 -t 1-1 - W 3r-lw
+
and g
f”--+
G ( z , w )= 2 - l -
W
+~Z”W
First forming G ( l / z , l / w=) z - 20-l f 3zw” ) then multiplying F(%,W ) with G ( l / z , l / wgives
148
4.
2 Transforms
Taking the inverse 2 transform gives
COR(f,g)=
(
l: -1
1 11 3
)
0
-1,l
4.7 Transfer Functions In section 3.7 it was seen how convolution is used in shaping signals by filtering. In this applicationeven though convolution involves two arguments, f and h, one of these is thought to be the input signal. Here we use f as the input signal. The other signal, h is the structuring signal. It is found using heuristics. When h is applied to f (via convolution), the response (output signal) g usually preserves or magnifies “good” characteristics of f and attenuates “bad” characteristics of f . If welet F ( z , W ) be the2 transform of the inputsignal and G(z,W ) be the 2 transform of the output signal, then the transfer function is denoted by H ( % ,W ) and is defined to be
In this discussion, F ( z , W ) is often the excitation transform,G(z,W ) is called the response transform, and H ( z , W) is also called the system function. The process described above is depicted by he block diagram
Example 4.20 Among the most simple, yet important examples of a transfer function is the one which produces a delay or shift to the right b y one unit. It has input
4.7. Transfer Functions
f=
... ...
...
a-1,1
a-1,o a-1,-1
a . .
... ...
and has output
.. . ... ...
a-2,1
a-2,o a-2,-1
Since
and
the transfer function is
This is illustrated by the familiar block diagram
... ... e . .
149
150
4. Z Transforms
A similar argument can be made for a shift in the upward direction. Indeed, the resulting transfer function in this case is 1/w and the block diagram is given by
Example 4.21 Let us assume that the input signal U 0
0,2
and the output signal is
g =
[
0
0 115 215 315 0 115 1 1 1 315 215 315 1 115 1 1 3751 0 115 215 315 0 -1,3
The objective is to find the transfer function H ( z , W ) . Since
F(%,W) = w - ~ + 2 z - ~ w - ~ + 3 % - ~ w - ~ ~ 2 w - ~ - Z - ~ w - ~ ~ l ~ 2 ~ - ~ ~ ~ % G(z,W ) =
2 3 -+ -z-'w-~ -+ -z-~w-~ 5 5
1
" 2 0 ' ~
5 1 3 t "2w-2 W-2 + 2-1w-2 -+ 2-220-2 + -&"3w-2 5 5 +-%W" 2 -+ -20-1 3 -+ z-1w-1 -+ z-220-1 5 5 1 3 t , z -+ 1 2-l r 2 + "2-3 5
-+
+
-+
4.7. Transfer Functions
1 5
+-W
2 -z-lW 5
151
3 + "&-2w, 5
Consequently,
This is the 2 transform of the 5 point moving average filter involving values at lattice point and its strong neighbors. Hence, the structuring signal or impulse response is
0 1/5 "=( 0
115
0
1/5
1/5 0
(1/5)
0
)
This process is depicted using a block diagram as
The transfer function here was found by dividing F ( z , W) into
G(%,W ) using long division. The result can be verified by multiplication. In general, the transfer function need not be expressible as a finite sum. Example 4.22 Suppose that the input signal is
and the output signal is
we will find the transfer function H(%, W ) for this process. Here
F(%,W ) = 1 - 2-l
152
4. Z Transforms
Hence
It is instructive to determine the Laurent series associated with H ( % ,W). This enables us to determine the structuring signal(impulse response)
h = 2 - 1 ( H ( z , W)). Since for Izl
> 1,
- 1+z-'+z-2+...
"
1 - 2-1
we have
H(%, W ) = (1- z-lw-l)(lt %-l
- 1- %'lw-1
+ + r
*
a)
- 2-3w-1 f . . .
- z-2w-1 +
+
2
Hence, the structuring signal is
h = Z'l(H(2,W))
=
h -: 0
0
0 -1 1
On the other hand, manipulating the transfer function into the form
and noticing that -1 = 1 + z + z 2 + * . * z
+ + +
H ( % ,W) = (W-l - %)(l z
%2
''
*)
4.8. Exercises:
= W-1
-
J
+ aw-1 - z2 + &-l
- 23 + . .
153
I
accordingly, another impulse response is given by 0
h = 2"(H(a, W))=
."
0
0
0
0
. . . . . .
1
Thus, there need not be a unique solution. One could verify the result above by actually convolving the input signal f with structuring signal h to obtain g.
4.8 Exercises: 1. Due to the one to one correspondence between ?Rzxzand the set of all 2 transforms, every bound matrix f in $lzxz has a unique 2 transform F ( % W). , Conversely, every 2 transform G(%,W )has a unique digital signalg in ?RZXZfor which G(z,W ) is its 2 transform.
( 4 If
f=(;
;8 ;
g
o-1,-l
find F(%,W). (b) If
G(%,W ) = a3 - a-2 t wa
find g. 2. For the digital signals f and g given Exercise 4.1 determine the 2 transform for the output of the following blocks
a)
154
4.
2 Transforms
3. For what class of digital signals f is it true that
4. For what class of digital signals f is it true that
W 1 = - W ( f )> 5. For f and g given in Exercise 1, find f * g and verify the result by finding 2 - 1 ( F ( 2 ,w)G(a,W)).
6. Answer the same question as in Exercise 5 using f=(:
;
-1 O
”)”
0 O 2
61
and
7. Consider analytic function F ( z , W ) = 1/(1+zw). We can write
F@, W ) = 1 - nw
+
- (243+* ’*
4.8. Exercises:
for lzwl
155
< 1 and therefore a . .
... .
f=
I
.
* * '
o m 0 0 - 1 0
0
0 0
0 0
0 1 -1 0
0 0
has 2 transform F(%,W). On the other hand, we can write
F(%,W ) = for lzwl
1
1
"
%W
1t l / % W
= (zW)-"(%W)-2+(zW)-3-(%W)-4+***
> 1 and
. . . . . . . . 0 0 0
g=
0
. . Q
0 0 0 -1 1 0 0 0
.
1 0 0 0
*.* '
S
.
'.. ".
also has 2 transform F(%,W).Explain why the results arenot a contradiction to the one-to-one correspondence between !Rzxz and all 2 transforms.
8. Find two distinct Laurent expansions for analytic function 1 F ( a ,4= 1 - 3xW
9. Find the Laurent expansion for ellzw. Where does the series converge?
10. Find Laurent expansion for COS(ZW).
11. Can a two dimensional analytic function have isolated singularities?
.......,. .
.
,
~...,.
.... .
. . _ . . . . _._
."
."
. . ..
156 4.
2 Transforms
12. How many different Laurent expansion are therefor ( zt W)-'? 13. Find COR(f,g) using 2 transforms where
14. Find C O R ( f , g )using 2 transforms where
15. Using 2 transforms to find transfer function if the input signal f and output g are f=(2
0
1)O 090
0 0 1 g= ( 0 0 0)
O O 16. In Example 4.22 the input signal
was given and the impulse function
0
0,o
4.8. Exercises:
was found. Convolve f with h to show that
1 -:l!
17. Repeat Exercise 16 using
e . .
e . .
h=
..m
1 -1 0
. . . . . .
0
157
5
Difference Equations 5.1 FunctionEquations In this chapterwe will study avery small, but important class of difference equations. Difference equations are a special type of function equation. A function equation involves one or more unknown digital signals (in RzxZ)connected by the fundamental operations: t,-,V, N,S, D, or macro operations. The objective of a function equation is to find, if it exists, a solution. Several casesarise. There may be no solutions, a single solution, or many solutions. Even when solutions exist, they are not easy to find.. Example 6.1 Let
f * f= -12x2 then there are no solutions in Rzx2, Example 5.2 Consider the function equation
f * f = 12x2 This equation, although very simple, has an infinite number of solutions. Indeed, at any point ( n ,m ) in 2 X 2,f ( n , m) can equal 1 or -1. Two solutions are
. .. f=
... ...
. . . . . .
-1 -1 -1
-1 -1 -1
-1 -1 -1
h; 1
1
. . . . . .
...
... ... j
160
5 . Difference Equations
and
... f=
B . .
. m .
-1 -1 -1
-1
Example 5.3 The function equation
also has an infinite number of solutions. At any point ( n , m) f ( n , m ) V f ( n - 1,m) = 0 must hold, Thus, any signal in $lzxz which is zevo for at least one out of every pair of consecutive horizontal points and negative valued elsewhere is a solution. Two typical solutions are
f=
.. . a . .
h
-1 -1
-1 -1
-1
il
-1 -1
-2
-3 -3
-1
... ...
and
f=
* ..
...
-2
..*
...
5.2. LinearSpaceInvariantDifference
Equations
161
Example 5.4 Suppose that the function equation
f++ f -
= ozxz is given. In this case, there is a unique solution:
f = ozxz A difference equation is a function equation involving two or more translates of the unknown function. Accordingly, the function equation in Example5.3 is a difference equation. It is a function equation involving f0,o and fi,~. However, the difference equations which we will investigate herein will only involve the additional operationsof SCALAR, ADD, and M I N U S . Example 5.5 Several types of diflerence equations involving just the SCALAR, ADD, and M I N U S are: f3,2
+
?f1,4
= 5ZxZ
- 4f1,o + 3 f = 5 f - 3fL3 = ozxz
7f2,l
Systematic way of solving some difference equations similar to the ones given in the last example will be investigated in forthcoming sections.
5.2 Linear Space Invariant
Difference Equations
As mentioned in the previous section, we will mainly be interested in difference equations involving only the operations of SCALAR, A D D , and M I N U S . Such difference equations are often classified as linear space invariant. A typical equation, considered herein, of this form can be written as a finite sum involving lattice points from some designated set A.
where h ( i , j ) are real numbers called the coefficients of the difference equation. The function f is a known digital signal, often called the driving or excitation function and the digital signalg is to be found. It is called the response signal.
162
5. Difference Equations
Example 5.6 The following diference equations 9
- 92,2 = 2 z x z
9
- g1,o = ozxz
g
-$71~ = ~ Z X Z
involve the index set of translations
A = {(O,O>, ( L O ) ) and
A = {(O,O>, (L1)) respectively. Moreover, in the first diference equation h(0,O) = 1 h(1,O) = - 1 and
f = ozxz As seen in the previous section, the solution, if one exists, to a difference equation need not be unique. When additional constraints are imposed the desired signal, sometimes a uniquesolution will result. Typical types of constraints involve support in some region, usually a quadrant or some finite set. Consider the next example where no constraints are given.
5.2. Linear Space Invariant Difference
Equations
163
Example 5.8 Suppose that an arbitrary solution is to be found for the equation g - g1,o = 6
Pointwise, this difference equation corresponds to g(n,m) - g(n - 1, m ) = 0 f o r all m # 0
The function equation canbe written as f
... . . I
.
a .
-
g(-l, 1) g ( - 2 , l ) g(-1,O) - 9(-2,0) g(-l, -1) g(-2, -1) '
-
/
'
d o , 1) - d - 1 ,
1)
izwz=q g ( 0 , -1)
- !7(-1,
-1)
In any case, we see that for m # 0
4 = S(. - 1, m ) is alwaystrue. So thedigitalsignalas given by the bound matrix must haveevery row (exceptthe m = 0 row) equal to a constant.
164
5. Difference Equations
Additionally, for the row m = 0 , there are'several cases to consider. The first case is when n < 0 , then we always have g(n,O) - g(.
- 1,O) = 0
So in this case,
g(-l,O)= g(-2,0)=g(-3,0)=
m * *
holds true.This implies that for n < 0 , and m = 0, g is also a constant. The second case is for n = 0 , and m = 0, here, g@, 0) - g(-l,O) = 1
Thus, if we use from case 1 g(-1,O) = a
then g(0,O) = a t 1
The third and final case is for n > 0 and m = 0. Now g(n,o) = g ( n - 1,O) = 0
and so we obtain g(0,O) = g( 1,O) = g(2,O) =
-
''
which must equal a t 1. Two typical solutions are
. . I
a - '
*..
2 1 0
2 11 0
2 1
pJ
and g=(1
1 1
2 1
.**);,,
2 1 1
9 "
..'
5.2. Linear Space Invariant Difference
Equations
165
We will "redo" the previous example. This time using first quadrant signals.
Example 5.9 Suppose we want to find the solution of 9
- 91,o = 6
This time we will first assume that g is a first quadmnt signal. Accordinglg, g can be written
l
Referringto the in-depth discussion given in Example 5.8, we see that a unique solution exists in this case. It is g=
(l
1 1 -,;,
If instead we assume that g is a second quadmnt signal then
Here the solution is given by
Notice that if g is restricted to be a fourth quadrant signal then a similar solution to the one given by the first quadrant signal arises. Additionally, if g is restricted to be a third quadrant signal then the solution is similar to the second quadrant signal above. All solutions can be checked by direct substitution into the defining equations. Indeed, equational identities must result from this substitution.
166
5. Difference Equations
Example 5.10 Assume that a first quadrant signal g i s to be found which satisfies the diflerence equation:
He re
0
and so
0
91,l =
9-2g1,1 =
*
. .
0 0 1
0 0 0 0 0 0
0
=in:: W
'
.
e ' .
1
So every entry in the bottom row of this bound matrix for g is zero except for d o , 0) = 1
5.2. Linear Space Invariant Difference
Equations
167
The same is true for the left most column of g; every entrgl there is zero except for g(0,O). Entries along the 4 5 O major diagonal in the bound matrix for g - 291,1 gives g(0,O) = 1 g(1,l) - 29(0,0) = 0 which implies g ( 1 , l ) = 2 g(2,2) - 2g(l, 1) = 0 which implies g(2,2) = 22
g(n, n ) - 2g(n - 1, n - 1) = 0 which implies g(n, n) = 2n
Similarly, entries along 4 5 O lines not on the major diagonal provide pointwise recursive equations which when solvedgivevalue 0. The solution is 0
. . .
. . . . . . g=
Notice that
g1,1 =
and
-291,1 =
0
0
0
-21
Thus, g - %l,l = 6 holds true, thereby verifying that g is the solution to this diflerence equation.
168
5. Difference Equations
5.3 Difference Equations Involving One Unit Translation In this section we will present systematic proceduresfor solving difference equations of the form g - agn,m = f
Here, a is a nonzero real number and both m and n equal 0 or 1, with both n and m not equal to zero. Moreover, f is known and the objective isto find a first quadrant signal which results inan identity when substituted into this equation. While only the first quadrant signals are considered herein, the same procedures can be employed for signals with support on the other regions. To begin, we will consider the simple difference equation 9 -W,o= 02x2 Using bound matrices this is equivalent to
. . . .
0
-! 1 *
-
0 0
.
0 0 0 0
a0 0
... ...
...
The entries in thefirst column in matrix 5.1 above must be all zero. Since g only has support in the first quadrant, it follows that g(0, IC) = 0
for IC = 0,1,2,...
5.3. Difference Equations Involving One Unit Translation
169
Substituting these values in the second column of matrix 5.1 above gives entries of the form g( 1,k) = ag(0, k) = 0
Accordingly, all entries d l , k) = 0 Similarly, all entries g(2, k) = 0
and so the solution is 9 = 02x2 An analogous situation arises if we want to find the first quadrant signal g such that g - ago,1 = ozxz Indeed, the unique solution again is g = ozxz
In fact,using TZ and m as given above, the only first quadrant solution to g= OZXZ is g = ozxz When we have a difference equation, as above, with
f = ozxz it is called homogeneous.Otherwise, it is called non-homogeneous,In all cases, f must have support in the first quadrant since the desired solution has support in this quadrant. Consider 9-w , o=f In bound matrix form we have:
170
5. Difference Equations
The entries in the left most column of both bound matrices are equal. Accordingly, g(0,k) = f ( 0 , k ) k = 0,1,2,
...
Similarly, the entriesin the second column in both matrices are equal. This gives g(1,lc) - ag(0,k) = f(1,IC)
k = 0,1,2, ...
which is equivalent to
Equating entries in the third column gives g(2, k) - ag(1, IC) = f(2, IC) k = 0,1,2,
...
which is equivalent to
and so on. In general, we obtain n
g(n,b) = c a i f ( n - i , k ) for all k = 0,1,2, ... i=O
Observe that this solution can be expressed as a convolution involving the signals h=
(
a a2
and f. Thus, we have g= f * h
):,,
5.3. Difference Equations Involving One Unit Translation
Example 5.11 Find the first quadrant signal g such that
( ; ;) 3 0
g-2g1,o =
0
092
W e will form the convolution of
Next, form the scalar translation connections
( ( (
0
12 63
3h1),2=
2 h o ~=
ho,o =
0 0
0
* * * )
0 0
0
* * '
0
0 0 0 24 0 0 0 0
0 0 0 0 0 0 21 4
4h1,l = ( 00 40 80 0 0 0
072
1::) * * '
.*' a
-
,
02 0
)
e ' '
092
:::)' .*'
092
Next, adding all the above terms involving h gives the solution: 12 24 63 2 8 16 32 4 8 21
Notice that
S
*
*
. m *
".
171
172
5. Difference Equations
and so 3 0 0 0 2 4 0 0
y-2g1,0=
0 "'
'..
( 1 0 0 0 ..*)o,2=f
If we now consider the equation 9-Wl,1=f
where a is a nonzero real number and f is a known first quadrant signal, and g is a first quadrant signal to be found, then the solution is again given by the convolution formula:
I
O O a2
Example 5.12 Soloe
( ; -p) -3
9+291,1=
0
=f 0-2
The solution will be given by the convolution formula g= f*h
where
f '
e
.
. .
. .
h=
0 0
0 0
0 4 0 0 0
-2
5.3. Difference Equations Involving One Unit Translation
and forming the scalar translation connections involving h gives f
(
. .
. .
I
a
.
0
.
0 0 -12 0 6 0 -3 0 0 0 0 0 0 0
0 0 0 0 0
"' *..
-
S
S
*
*
* " ,
0
. . . 2h0,l =
0 0 8 0 -4 0 2 0 0 0 0
0 0 0 0
'.. m
'
*
S . .
"'
* . * . . . . . m
.
S
0 0 0 0 0 -2 0 1 0 0 0 0 0 0
0
.
4 0 0 0 0
'
'
S
' e '
a ' .
'
V
.
'"
. . . .
0
. .
0 0 0 0 0 0 -4 0 0 2 0 -1 0 0 0 0 0
0 0
Adding these terms gives the solution
"' *
'
S
' * '
'.' * ' *
173
174
5. Difference Equations
i ' - 12
0 0 0 6 -3 -3
g=
2
6 0
2
0 -1
(m
0
Notice that, from Example 5.12, we have
12 -6 -6 4 0 0 -2
0
2g1,1 =
and
. . .
. . . . . .
0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0
0
'.'
.*' *. "'
..' )
We can extend our method for n and m = -1, 0 and 1 (again both n, m # 0). This time, consider the difference equation g
- w-1,-1 = f
where a is a nonzero real value. We know that the solution of
5.3. Difference EquationsInvolvingOneUnitTranslation
is
175
0
($2
0 0
...
... ...
!
Therefore, taking the translationof both sides of the equation below one unit up and one unit to the right g - W-ll-l = f gives &,l - ag = f1,l Then, dividing by - a (since a # 0) gives the equation
The first quadrant solution of this equation is 9=
(-;)
and is given by the block diagram
- l / a 4 - d ZS C' ARLAA RN
f1,l *
h
176
5. Difference Equations
where
O
h=
0
1/a2 0 0
0
... ... .
.
B
1
Example 5.13 Find a first quadrant solution g to
Notice that a = 2 here and
( ; ; -9)
0
0 2
f1,l
=
092
In this case.
The eo-zero set for f 1 , l is c o z ( f ) = W J ) , (1,1), (29% (2,1)) Next, we form the scalar translation connection involving h. So: f .
. . .
0
*
. . . . . 2h1,2 =
0 0 0 0
(m
0 0 2 0 0
0 112 0 1 0 0 0 0 0 0 0 0 0 0 0
*
'
S
e . .
'
0
S
.
'
'
..'(
5.3. Difference Equations Involving One Unit Translation
. *
e
.
.
e
.
.
. .
0 0 0 1/2 0 0 1 0 0 2 0 0
0
0 0
. .
a
.
.
a
.
.
0 0 0 1/2 0 0 1 0 0 2 0 0
.
.
f
\
"' * * '
."
. .
0 0
0
'*. **. " *
0
. . . .
0 0 0 0 0 0 -1 0 0 0 0 -2 0 0 0 0 0 0 -4 0 0 0 0 0
{m
* * *
*"
." "'
".
Adding the last four terms together and multiplying by solution:
. . .
g=
0 0 0 0 ,
-
g
0 0 1/2 1 1 2 -1 0 4 -2 0 2 0 0 4 -4 0 0 0 0
-3 0
I
* .
(-i)
177
'.. ." "'
*.. * * '
gives the
178
5 . Difference Equations
If we f o m
-1/4 1 -1 0 0
then
I
g
- %-l,-l =
.
.
.
0 0 0 0
"'
-4 0 0 0
".
Other difference equations involving one unit translation can be solved in exactly similar ways to the ones given above.
5.4 2 Transforms for Solving Difference Equations In the previous section we solved several difference equations of the form g - agm,n = f where m and n = -1, 0 or 1. Observe that this equation can be illustrated using block diagrams as g
ADD c
g-
mn-
r
TRAN
SCALAR -a
e
-
5.4. 2 Transforms for Solving DifferenceEquations
179
We immediately see that thisis a convolution type representation. It involves the unknown signal g and a signal q called the coefficient signal.
Example 5.14 The digerence equation
can be written as the convolution
The above observation canbe generalized to arbitrarylinear space invariant difference equations.
Example 5.15 Notice that the diference equation
can be written as the convolution
This observation provides the key to the 2 transform method for solving difference equations of the above type. We will let the 2 transform of the coefficient signal be Q ( z , W). Thus, for instance, in Example 5.15 notice that
Also let 2(f)= F ( z , W )
and
2 ( g ) = G(z,W )
Since the 2 transform of the convolution of two signals is the product of their 2 transforms, we obtain the all important equation
180
5. Difference Equations
Further manipulations in the transformed minates z and W gives
world involving indeter-
Accordingly, ifwe divide the 2 transform of the input signal by Q ( z , W )we willobtain the2 transformof theresponse signal. Finally,
if we take an inverse 2 transform of this quantity then the output signal will be found. Symbolically, we have
Notice that the transfer function, as described in Section 4.7 is given by
Example 5.16 Suppose that we wish to use 2 transforms to solve the diference equation 9 ” 2g1,1 =
( -I -p)
0
=f OJ
As previously noted, this is equivalent to the convolution
Consequently, taking 2 transforms gives
+
G ( z , w ) ( l + ~z”zo-’) = - 3 ~ ’ ~2w-l -/- z - ’ w - ~- 1z-l
So the 2 transform of the solution is G(z,W ) =
-3w-2 + 2w-l + z-1w-2 1 22-1w-1
+
Expanding 1 1t 2z-lw-1
. ... ..
- 1z-1
5.4. Z Transformsfor Solving Difference Equations
181
into a Laurent expansion valid for
1 2,Z-lw-l I< 1 gives
1 - 2x-lw-1
+ 4z-2w-2 - fjZ"3w-3 +
I . .
Multiplying this expansion by 2(f ) gives
G(%,W ) = - - 3 ~ -+~2w-l
-2z-1w-1(-3w-2
+ z-~w-' -
+ 2w-1 + %-lw-2
- z - l ) + . ..
Simplifying by combining terms and taking the inverse Z transform gives 0 /
g=
m
0 6 -3 -3 0 -1
0 -4 0 0
(6
... ... ... ...
We should mention that the solution obtained in the previous example is notunique. That solution has support inthe first quadrant. There may besolutions with supporton other regions. The reason for the non unique solution is related to the Laurent expansion. When it is found, there may be several expansions for a given region of convergence and each resulting in a different signal.
Example 5.17 As in Example 5.16, again consider the difference eauation
This time write G(%, W ) in the equivalent, but different form
G(%, W )=
+
+
( 1 / 2 ) ~ ~ [ - 3 ~ 2w-l -~ z - ~ w --~ 1t ( 4 2 )
182
5. Difference Equations
Now expand
1
in a Laurent expansion valid for
gives
+
1 - ( ~ ~ 1 2 ( )~ ' ~ ~ 14)
Multiplying gives
G(%,W ) =
(f)
-
-
(f)
["322u-l
+ 22 + 2u-I
[ - 3 2 4- 2z2w
- W]
+ z - ZW23
(L) [-3z4w2 + 2z4w3 + z3w2- z3w4]+ 16
Taking the inverse 2 transform gives the other sokution
.. . g = !
.. . a . .
0
0 -312 0 314 314 -318 -318 0 -112
0
Notice that
... ... 2glJ =
0 0 -314 -3/4
Substituting in the equation yields
0 -3 312 312
1 0 -1
0
5.4.
2 Transforms for Solving Difference Equations
/
* ' *
*'.
g t %l,l =
0 0 -3 1) 0 0 2 0 0 0 -1 0 0 0 0
* . . . * .
183
0
=f
More general difference equations can be solved using 2 transforms than those illustrated above. Indeed, linear difference equations with constant coefficients involving numerous translations of one unit or more can be solved. Again, we find the output transform
All that need be done is to divide the denominator transform Q into the numerator transform F and then take an inverse 2 transform of the quotient. An additional example should make the technique more clear. Again,the region of convergence may govern the number and nature of the solution.
Example 5.18 Find the signal g such that: g
- g1,o - g0,1 t 91,l = 6
In terms of convolution we have
Taking the 2 transform gives
writing
184
5. Difference Equations
We can actually divide Zong hand." However, due to the simplicity of this problem, we can write G(z,W ) =
1
1 1 z-l
1 - W-1
0
...
.. ... *
This can be verijled by forming
1
9 - g1,o - gall t g1,1 and noting that the result is S . Indeed, observe that
. * . . . . . a
9 t 91,l =
.
1 2 2
"'
; ; :::
and
. . . * .
0
a
- (g1,o t g0,1) = 1 1
a ' .
1
Thus, adding these last two expressions together gives S.
5.5. Exercises
185
5.5 Exercises 1. Find all digital solutions to the function equation
Is this equation a difference equation? 2. Find all solutions to the functional equation which is given
below using block diagrams. Specifically, find all digital signals f , such that the outputof the following blockdiagram is0 ~ ~ 2 .
n
Is this a difference equation? 3. Find all solutions f to the following difference equation
f - f1,O = 0 2 x 2 4. Which of the following difference equations have at least one
solution? Find the solution to each of the difference equations which have solutions.
5. Find a first quadrant response signal g to the first order differ-
ence equation given by the block diagram whose output is the
5. Difference Equations
186
impulse signal 6.
MINUS
'TRAN (091)
e
- ADD
-m
g
6. Find the first quadrant digital signal g such that
g - 4g1,l = 61,1
7. Check the solution found in Exercise 6. Can convolution be employed for this purpose? 8. Solve for the third quadrant solution g to the difference equation g - b1,o = 6
9. Find g as in Exercise 8 where g - 4g0,l = 6
10. Find the first quadrant signal g where
11. Find the first quadrant signal g where
12. Use 2 transforms to solve the difference equation in Exercise 10. 13. Use 2 transforms to solve the difference equation in Exercise 11. 14. Use 2 transform techniques to solve for g g
- ag1,1= 6
How many solutions can be found using this technique?
Wraparound Signal Processing 6.1 Wraparound Signals Up t o now, we dealt primarily with two dimensional digital signals. These signals are defined at all pairs of integers. This is true for signals of finite support aswell, since they are zero everywhere except at some finite set of lattice points. We now introduce a new type of signal called the two dimensional wraparound signal, or wraparound signal for short. Wraparound signals are real valued and are defined on rectangular subsets of lattice points. Throughout, we will use square regions of lattice points. Specifically, wraparound signals have as their domain the Cartesian product of the first n natural numbers. The domain is the Cartesian productof {0,1,2, ...,n - 1) with itself and is denoted by Z,X 2,. Accordingly, wraparound signals are signals in !Rznxzn. Any signal in sznXznmust have a (real number) value at each point ( i ,j ) in {0,1,2,...,n - 1) x (0,1,2, ...,n - l} and undefined elsewhere.
Example 6.1 Two signals f and g will be given in ? 2 z 7 x z 7 . Here, both signals must be defined at each of the given points in the set Z7 X 2 7
= {0,1,2,3,4,5,6}X {0,1,2,3,4,5,6}.
Suppose that
o
otherwise 187
.. , , . .,, _."
..
,
. ... , .. ,
. .,.,,, ,
,.,.
..
~
,
..
,
. ... .". . ...
. , , ..
, ,"
,,
"., .. . ... . . .. . . . , .
188
6.
and
Wraparound Signal Processing
= (1,1), ( 2 J ) 2 - 1 (i, j ) = ( 2 , l ) 0 otherwise
Note that both f and g are not defined outside of 2 7
X
Z7.
Several special signals existing in Rznxzn will now be given. The constant wraparound signals, which have the same value a E R, at each lattice point (i,j) E Zn X Zn. These signals are denoted by aznxzn and az*xz,(i,j) = a The wraparound delta, or impulse signal Gznxzn,has value 1 at the origin and is zero valued for the other integers in Z, X 2,. Thus,
Since each of these functions are defined on some contiguous rectangular subset of lattice points, itdoes not make sense to define a unit step type function like the one given in Section 1.2. A unit step in the new environment, @'nXzn, is nothing more than lznxzn. As might be expected, bound matricescan be utilized in representing wraparound signals. Indeed, if f E SznXzn then we will write
f ( 0 , n - 1 ) f ( 1 , n - 1)
f ( 1 A
f ( n 1- , n -
1)
' * '
or
f=
l
The exponent, w n , on the right parenthesis stands for wraparound with n2 entries. It indicates that the signal is to be understood as
6.1. Wraparound Signals
189
a wraparound signal and as such f ( i , j ) is undefined for all lattice points (i,j) with i < 0, j < 0 , i 2 n or j 2 n. Further,more convenient bound matrix representations of wraparound signals will be given subsequently.
Example 6.2 Refer to the wraparound signals f and g given in Example 6.1. Notice that
f =
0 0 0 0 0 2 2
0 0 0 0 0 3 2
0 0 0 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
and ‘ 0 0 0 0 0 0 g=
0 0 0 0 i
0 0 0 0 0 , 0 0 0 0 0 0 0 0 0 0
0 0 0 2 2 - 1 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
W7
0
Example 6.3 Bound matrix representations will now be given for the special wraparound signals previously discussed. We have 3 3 3 3 3 3 3 3 3 3 3 ) 3mz4 = ( 3 0 0 0
W4
0,3
W3
190
6.
Wraparound Signal Processing
dz3xzg =
(
0 0 0 0 0 0)
O O
W3
0,2
Similar to thedigital signal situation,we define the co-zero set for
f in ?Rznxzn to be that part of Z,xZ, for which f does not take on the value zero. Accordingly, if we denote this set by c o z ( f ) then c o z ( f ) = p(% - {O,O})
Additionally, s u p p ( f ) is used in denoting a support set of f, that is s u p p ( f ) is any set in Z,xZ, which contains c o z ( f ) . Example 6.4 Again refer to the wraparound signals f and g given in Example 6.1. Here,
The co-zero set will be instrumental when wraparound convolution and correlation are described in the sequential as well as, parallel environments. Additionally, compressed versions of bound matrices will be given for various wraparound signals.
6.2 Range Induced Operations and Terms for Wraparound Signals Signals in 9lznXzn have the reds as their codomain, consequently the rangeinducedoperationsexisting in iRznxzn are, in essence, identical to those existing in ?Rzxz.Accordingly, we will employ the same notation asin Section 2.1 to denote wraparound range induced operations and their terms.
..
, ,
.
6.2. RangeInduced Operations and Terms for Wraparound Signals
191
As in Rzxz, there is an addition, multiplication, and maximum operation. These are denotedby: A D D , M U L T , and M A X , or they are equivalently denoted by +, -,and V, respectively. Each operator takes two wraparoundsignals and returnsa third wraparound signal. The operations are defined pointwise:
M A X ( f ,s > b )= (fv d ( i , j > = f(i,8 v g@,j > As before,
.
C O Z ( ~ g)
(6j ) E z n x z n
= C O Z ( ~n ) coz(g)
and SUPP(f 4- 9) c coz(f) U Block diagrams illustrating these operations are identical to those previously given in the non-wraparound situation.
Example 6.5 Consider f and g given below.
I : l:] W4
2 0
I=(
0 3 -1
0
0
0
o,3
0 0
W4
0,3
W e have, using block diagrams:
.
,
. .
...
.._..I,......, ,.,......
._(_.,. ......-,_.
....., . ._,...",... , *."......
I'_..I
,
.
.~, ..
_,. "
.,. .
,...
L
192
6. Wraparound Signa Processing
(n
0
1 2 0,3
Wraparound signals can be thought to exist on a donut, or genus one type surface. Consequently, more compressed representations often can be given for these types of signals. For instance, in the last example notice that f can be written as W4
-1
1,3
which can also be written as
All the range induced operations defined in Sections 2.1 and 2.2 have analogs in Rznxzn. Again, the same notation shall beemployed. To begin, the square law “device”, denoted by SQ or ()’ and the negation operation, denoted by M I N U S or by “-”, are unary operations defined pointwise by
6.2. RangeInduced Operations and Terms for Wraparound Signals
193
The minimum operation is a binary operation denoted by M I N or A, and is defined by
MIN(f,g)(i*j)= f(i,j)A g ( i , j )
(iyj) E Zn X
Zn
There are three rectifier type unary devices: the absolute value, the positive part, and thenegative part operation, denoted by A B S , POS and N E G , respectively. Alternate notationfor the ABS, POS and N E G operations are I f I, (f)+ and (f)' ,respectively. They are defined by
I f I (4j)=I
[ {
f(i9.i) I
f(i,.i) > 0
(f>+( i , j ) = f(i,j)
(f)- ( i , j ) =
(i9.i) E Zn
f ( i , j ) I0
-f(i,j) f(i,j)
0
f(i,j)2 0
X
Zn
( WE zn x zn (4j)E z, x z, (4j)E z, x z n ( i v j ) E Zn
X
Zn
Scalar multiplication and offset operations also exist in Rznxzn andare denoted by SCALAR andOFFSET. When applied to a wraparound signal f and a real number a , the alternate notationaf and f t a are often employed. These operations are defined by
S C A L A R ( f ;a ) ( i , j )= af(i,j) OFFSET(f;a)(i,j) = f ( i , j ) 4-
(i,j) E Z, X Z, a ( i , j ) E z, x z,
All of the operationsabove are terms. Theproof of these facts are identical to the digital signal situation. Moreover, block diagrams illustrating these operations are the same as the ones given earlier in Sections 2.2 and 2.3.
Example 6.6 Again let 0 3
2 0
and
0
0
0 0
W4
0,3
194
Wraparound Signal Processing
6.
Then
M =
g
. . .
.
..
[
0 0 0 0
0 1 0 2
0 2 1 1
0 3 2 0
W4
6.3. Domain Induced Operations for Wraparound Signals
2g =
0 -2
195
:l
0 4 -22 O4
0,3
All the range induced algebraic properties holding in Rzxz also hold in R z n x Z n , Accordingly, !RznXzn is a distributive lattice, commutative, associative algebra with identity (see Section 2.4).
6.3 Domain Induced Operations for Wraparound Signals Wraparound signals have as their domainthe set Z, x 2,. Similar to the set of lattice points Z x 2,group operations can be defined in 2, xZ,. The group operations in the Z,xZ, domain induce similar operations in RznXZn,which result in the wraparound phenomena. In order to fully understand these domain induced operations, we must define a form of addition and a negation operation in 2,. Before this isdone, however, it is useful to introduce the successor function in Z,, which is really addition with one argument equal to one. Moreover, it induces the shift operation on signals which clearly illustrates the cyclic or wraparound methodology. In Z, we will define a wraparound typeof successor function S. The successor of any number inZ,, except for n - 1 is the usual successor - the number which is greater by one. For n - 1 the successor is zero. so s(k)={ 'Zn-l k=n-l
it'
One could imagine the numbers 0 , 1 , ...,n-l lying ona circle, equidis-
196
6.
Wraparound Signal Processing
tant apart; thesuccessor of any integer isfound using the integer one unit clockwise. It is useful t o view the successor operation as a type of addition. Indeed, s ( k ) is the least nonnegative remainder obtained by dividing n into the sum of k plus 1. The reason for this interpretation of the successor function will become evident below. It relates thesuccessor operation with a simple instance of a more general addition type operation in Z n . Addition involving integers h and k in Z n is denoted by h [t] k and is often called addition modulo n. It is found by taking the remainder of the division by n of the usual sum of h and IC. More precisely, h [+l IC = T , where 0 5 T < n and r is found by setting
r = h t IC
- nq,
using q = 0 or 1, whichever “works”
i.e. whichever gives r in the desired range {0,1,2,3, ...,n - l}.
Example 6.7 Suppose that we are given
then 3 [t] 2=5
because 5=3+2-7*0
and 4 [t] 6=3
note that 4 t 6 - 7 . 0 ~10
but 4+6-7*1=3
Additionally, 5 [t]6 = 4
Notice that the sum h [+l k can be obtained using the successor function repeatedly. Indeed,
6.3. Domain Induced Operations forWraparound
Signals
197
h [t]k = s(s( ...( ~ ( h ) )=) )s k ( h ) also
h [t] k = s(s(
...(s(k)))) = s*(k)
As a consequence, the addition operation laws. Furthermore, we see
satisfies the associative
0 [t]k = k Example 6.8 In ZQ 7 [+] 3 = 1
additionally, we also have
s3(7) = s(s(s(7)))
= s(s(8)) = s(0) = 1.
Another operation in 2, is the minus function Z,
[-]k =
{
[-l.
For every k in
ifk=O n - k otherwise
The minus operation can also be found similar to theaddition function previously given. Indeed,
[-l k = r where r is found by setting
r=0-k-nq and using q = 0 or -1, whichever gives a value for r in 2,. As a consequence, ([-l k) [+l k = 0 We also write h [-l k instead of h [+l [-l k.
Example 6.g In Z g notice that [-l3 = 6, and that [-l8 = 1
whereas [-]l = 8
198
Wraparound Signal Processing
6.
The set Zn with the aforementioned operationsandproperties form a cyclic group. This structure induces operations in Z, X Z,, which then domain induces operations inRznxzn. The first operation t o be considered herein is the shift operation denoted by S and S : RZnXZn
"--+
RZnXZn
It is defined using the successor operation
S.
Indeed,
(S(f))(s(i),j)= f ( i , j ) where ( i y j ) E Zn X Zn In particular,
(S(f))(L = f(0, That is, the height of S(f)at the point (1,h) equals the height of f at the point (0, k). Also, W ) ) ( % = f(L W (S(f))(3,k) = f(2, IC)
(S(f))(n - 1, = f b - 2, R ) (S(f>>(O, h ) = f(n - 1,k) Thus, we see that this operation translates the signal f to the right. That is, it moves the heights of f point by point, one unit to the right except for the values in the last column, that is, points ( n - 1, h ) . These values get wrapped around to become the values of S(f)in the first column, that is the points (0,k). The operatorS can be applied in succession. Accordingly, we write
S"f) = S(S(f)) and
S 3 ( f >= S(S(S(f>)> and so on: S"!)
= S S...(S(f))
Clearly,
=f
6.3. Domain Induced Operations for Wraparound Signals
199
Example 6.10 Consider the signal 1 0 2
4 0 0 in
!Rz4
xzd.
W4
0,3
The shift operation applied to f gives
[
3 1 0 2 1 0 0 0 0 0 1 0 -1 4 0 0
]
W4
o,3
Applying the shift again yields 3 1 0
W4
0 0 1 0,3
and
S3(f)=
[ ; ; E) 0 2
W4
0 0 -1 4
o,3
Moreover,
S"f> = f The block diagram illustrating the shift operation is
As in the case of digital signals, there exists a 2 type transform for wraparound signals. This isdiscussed in Section 6.7. The symbol 1/z illustrates a shift to the right.
200
6.
Wraparound Signal Processing
Example 6.11 Suppose that
U given in
%z6xz6.
Then
Notice that the last bound matrix for S ( f ) is minimal. the 90° rotation, denoted
The next domain induced operation is by N or by N I N E T Y where
N : @nXZn
-
sznxzn
It is defined by
N ( f ) ( i , j )= f
[-l
i)
Example 6.12 Consider the wrapamund signal
f=(: given in Example 6.11. In
26
; ) w 492 6
we have
Thus,
Notice that if N(f) is shifted one timewe obtain
6.3. Domain InducedOperations
for Wraparound Signals
The following block diagram illustrates the operation wraparound signal f.
201
N on the
NINETY
Example 6.13 Let
f-{Gb [ : ::lw4
as in Example 6.10. Then we have
- 1 3 1 0
N(f)=
O O
0,3
The final fundamental domaininduced operation to be introduced herein is the diagonal reflection operation, denoted by R E F L E C T or by D.It too is a unary operation:
where
W) ( i , j )= f ( [ - ] A H i ) As in the digital signal case, this operation is similar to a matrix transpose operation, however, due to the wraparound phenomena, certain rows or columns will be shifted (wrapped around). This operation is illustrated by the block diagram
REFLECT
202
6. Wraparound Signal Processing
Example 6.14 Again, let
then
and so
Example 6.1s As in Example 6.13, let 1 0 2
4 0 0
then O(f)=
[
W4
0,3
0 0 0 1 0 2 0 0 -1 3 1 0 )
W4
0,3
The macro wraparound operation of translation is denoted by T R A N S or by T . It is a shifting type operation which can move the signal f to the right, left, up, or down by an arbitrary number of units. Thus, T : Wzxz X Z x Z -Rzxz where W
; P,q ) ( i , j ) = f(i [-l P , j[-l q )
The fact that T ( f ;p , q ) is a term follows from the expression
N SqN3Sp( f ) N 3 S - q N 3 S - p N 2 ( f ) p < 0,
Q
50
6.3. Domain Induced Operations for Wraparound Signals
203
The quantities -p, -Q, p , and q should be evaluated modulo n . We also denote T (f ; p , q ) by f p , q .
Example 6.16 Suppose that the wraparound signal f in R z 7 x z 7 given b y
f=(
2 0 0 0 0 4 0 - 1 0 0 0 0 2 0
);:=
( 2 0
is
-;)w7 4 0 571
then fi,0=
(8
W7
4 0 2 0 0 0 0 4 -1 0 0 0 0 2 ) 0 , 1 = ( 2 0
-;)
W7
691
and
f - L O = S6(f>=
(
0 0 0 0 4 0 2),:= 0 0 0 0 2 0 - 1
( 4 0 2)w7 2 0 -1
491
and
The translation operation is denoted using a block diagram by
or by
Wraparound Signal Processing
204
6.
6.4
Set Morphology in Z, x Z,
Several set andarithmeticoperations will be described in Z, X Zm. These operations are needed for a full understanding of more advanced wraparound signal processing operations. Some of which are presented in the next several sections. These operations employ wraparound set morphology in some form. Four fundamental operationsinvolving subsets of Z, X Zm provide the setting to all binary wraparound morphology. The four operations are: set theoretic union, set theoretic intersection, translation, and 180° rotation. If A and B are subsets of Z, x Z,, then the union and intersection are defined respectively by
A U B = {(P,Q)I (P,Q)E A
Or
A n B = { ( P , Q ) I ( P , Q ) E A and
(P,Q)E B } (P94
E
B1
The translation operationinvolving the set A and point ( T , S) E Z, X Zm is denoted by A ( T , S). Equivalent notations areT R A N ( A ;T , S) and T ( A ;T , s ) . It is defined by
+
A
+
(T,s)
= {(T
+
P,S
t q ) where ( p , ~E) A }
The integer T + p must lie in Z,. Accordingly, the additionof r+p and S Q are performed modulo n and modulo m,respectively. Throughout this section, no special notation is used for modulo addition and subtraction. The setsA and A + ( T , S) are identical in structure with the exception that the latter set is A moved T units to the right and S units up. Due to the cyclic properties of Z, and 2 , the translation operation occurs using wraparound, thus a set and its translates may not appear to be identical. This phenomena is illustrated inthe example below, and is similar to what we have seen earlier for signals. The 180° rotation of the set A is denoted by - A and is defined by
+
- A = {(-T,
-S)
where
(T,s)
E A}
The negation operations -T and -S are constructed using modulo n and modulo m arithmetic respectively. As, in the translation operation, wraparound occurs and the appearance of - A may not be what is intuitively expected.
6.4. Set Morphology in
Zn X Zm
205
Example 8.17 Suppose we are given the set
A = ((0, 21, (1,219 in z6x Zg. The translate
21,
(2,319
(2,417
(3,4),
(4,419
(4,519
(5,519
A t (4901 = ((4,219 (5921, (5931, (6,219 However, since 6 in Z6 is 0 and 7 is 1, we obtain
(69319 (79(6,419 511
(7,419
A t (4901 = ((4,219 (5721, (5931, Example 8.18 Again consider the set
(0,319 (1,419(1,511 (0,417
A t (291)= ((2931, The translate
(1,319
(3,319
(2,
(4931,
(0,219
(3741,
A = m 2 1 ,(1,219 (1,319 (2921, (2,319 (2,419 (3,419 in z6 x Zg . This time we will find - A . So negating each element in A using the modulo minus operation gives -(O, 2) = (0,6) since
(39511 (59611
(3,511
-0=0
and
-2=8-2=6 inZg -(1,2) = (5,6) since - 1 = 6 - 1 = 5 in and so on, then
z6
- A = {(0,7),
(5, 61, (5,519 (4,619 (4,519 (4,419 All morphological operations inZ, x Zm are formed under function composition using union, intersection,translation, and180° rotation. To begin, the dilation of two subsets A and B in Z,xZ, is denoted D ( A , B ) or by A @ B . It is also called Minkowski addition and is defined as the union of all translates of A using points from B , that is
W
,B ) =
U
( At ( P , d )
(P,q)€B
Note that the translation operation must be performed using modulo arithmetic and furthermore
A t ( P , !l1 = U P ,Q111 These concepts are illustrated in the following examples.
(3,417
(3,311
206
6.
Wraparound Signal Processing
Example 6.19 In Z S X Z Slet
and
B = {(O,O>, (1,o>, (1,1)1. For each point in B we find the translate of A by that point
A t (0,O)= A next
and then
Finally we form the union of all these translates to obtain
The next morphological operation using sets A and B in Z, X Z, is erosion, and is denoted by C ( A ,B ) . It is defined by forming the set of all points in Z, x Z, for which translates of B by these points are subsets of A , i.e.
6.4. Set Morphology in
Zn x Zm
207
An operation related to erosion is Minkowski subtraction, denoted by A 8 B and defined as
n
A ~ B =
(P,9)€B
The erosion of A by B , can be found using Minkowski of A by - B . That is,
& ( A , B )= A 8 - B =
n
subtraction
A t (p,q)
(P,q)€-B
Here -B is the 180° rotation of B.
Example 6.21 Use A and B in z g x z g given in Example 6.20. Suppose that &(A,B ) is to be found first by employing the definition. Notice that
B B B B
cA t W ) = {(1,2),(2,2),(2,3)) c A t (193) = {(1,3), (2,3), (294)) c A i- (274) = {(274),(3,4),(3,5)) c A t (092) = {(0,2),(1,2),(1,3))
N o other translates of B , other than the four just given are subsets of A. Forming the set consisting of the translation values gives
W , B ) = {(0,2),
(1921, (1,3), (2,411
The same result can be found using Minkowski subtraction. Indeed, here we first obtain -B
-B = {(0,0),(-1,0),(-1, The value -1 in Ze is 5, and
-W
- 1 in Z8 is 7, hence
-B = {(070),(5,0),(5,7)). Next, translate A by elements in -B. So
208
6.
Wraparound Signal
Processing
Similarly, using modulo 6 arithmetic in the first tuple and modulo 8 in the second gives
A
+ (577) = ((5,119
(0,1), (1,1), (0,2),(11 21,(1,31,
31, (2,(2,411.
Forming the intersection of A with A t (5,O) and A t (5,7) gives
&(A,B ) = {(0,2),(
W(1,3),(274)).
The opening operation U ( A ,B ) involving sets A and B from Z, X Z, is defined by the union of all translates of B which are subsets of A
W , W =
U
B+(P,!Z)
Bt(p,q)CA
Thetranslationoperation is found using moduloarithmetic. An equivalent way of obtaining the opening is by first employing the erosion and then the dilation operation, that is,
B ) = W ( A ,B ) , B ) Example 6.22 Consider
O ( A , B ) = A. The same result can be obtained by first eroding A by B . Again see Example 6.21, where it was shown that
6.4. Set Morphology in
Zn X Zm
209
Next, we dilate &(A,B ) by B. Thus, we form
&(A,B ) t (0,O)= C(A,B )
O(A,B ) = D(&(A,B ) , B=) A The final morphological operation t o be introduced is the closing of A by B , and is denoted by C(A,B ) . It is found by forming the sets of all points( p , q ) for which all translates of B simultaneously contain ( p , q ) and have nonempty intersection withA. Thus, ( p , q ) E C(A,B ) if and only if ( B -l-(T,S)) n A # 0
+
for every B ( r ,S) containing ( p , Q). Notice by definition, any point (p,q) in A must also be in C(A,B ) and so
A c C(A,B). Fortunately, closing can also be found in a more algorithmic fashion. Indeed, it can be found using the 180° rotation along with dilation and erosion. Specifically,
Example 6.23 Using A and B in ZS x ZS provided in the previous example, this time C(A,B ) will be found. First observe that B contains three points. Thus, there will be precisely three translates of B to consider in investigating if a point ( p , q) belongs to C(A,B ) . If any one of the three translates of B simultaneously contain ( p , q) but does not contain a point from A then ( p , q ) is not in C(A,B ) . The point (2,5)4 C(A,B ) since
and
( B t (1,5))n A = 0.
210
6.
Wraparound Signal Processing
Similarly, no point ( p , q ) in 2 6 x Z g is in C(A,B ) except if ( p , q ) E A . Hence, C(A,B ) = A . This result can also be obtained by using
Forming the union of the eight translation values used above again gives C ( A , B )= A . Thus far the only rotation considered in Z, x Z, was the 180° rotation. Moreover, the 180° rotation is involutory, that is
- ( - A ) = A. Now, we will consider other 180° type rotations which are found by using 90" type rotations in succession.
6.4. Set Morphology in
Zn X Zm
211
The positive (counter-clockwise) 90° rotation operation N maps , into other sets in Z, X Z, using the rule sets A in Z, x Z
N ( A ) = {(-j,i) for (i,j) E A }
Example 6.24 If
is given and N ( A ) i s to be found, then
The two tuple in this set must be written using elements in Z6 x Zg. Accordingly, using modulo arithmetic, we obtain
If N is applied to N ( A ) the set A is said t o undergo a 180° positive rotation and is denoted by N 2 ( A ) .What is of principal interest is that N 2 ( A ) need not equal - A (see Exercise 14). A third application of N to A gives the 270° positive rotation and is denoted by N 3 ( A ) . Four consecutive applications of N to A gives N4(A),this result could differ from A itself. The lastobservation accountsfor the seemingly strange results involving N 2 ( A )in relationship to -A. The final operation, which we will mention, is the reflection operation 'D, which can also be applied to a subset A of Z, x Z ,. The set D(A), which geometrically speaking results as a mirror image of A , is found by rotating the set A 180° about a 45O line through the origin and then performing wraparound. More precisely,
D ( A ) = {(-j,-i)
where (i,j) E A }
Like the rotation operation N ,V also behaves in a strange manner. For instance, V 2 ( A )need not equal A . Moreover, it is not 1-1 or onto. When 'D and N are applied to Zn x Z,, for A = { ( i , j ) } , we have N ( A ) = { ( n- j , i)} and N 2 ( A ) = { ( n- i , n - j ) } = - A . Accordingly, N 4 ( A )= A and V 2 ( A )= A. Thus, the environment of Z, x Zn will be used throughout this chapter with the exception of the last section.
212
6.
Wraparound Signal Processing
6.5 Sequential and Parallel Formulation of Wraparound Convolution Similar to digital convolution, wraparound convolution is defined for wraparound signals in a pointwise fashion. If f and g are in 3??nXzn then the convolution of f and g is denoted by COlVV(f,g) or by f * 9,and
for IC, m = 0,1,2, .,.,n- 1. Here IC [-3 i should beused instead of IC-i, and m [-] j instead of m - j to denote arithmetic operations inZn. Whenever the co-zero set for f or g is not empty, a more compact formula for convolution is
l o
otherwise
In terms of block diagrams, the convolution of f and g is illustrated by
Example 6.25 Let
0 0 0
W4
0,3
6.5. Sequential and ParallelFormulation
of WraparoundConvolution
213
The co-zero sets are
'D(coz(f), coz(g))= {(392), (3,119 (0,2)9(0,1), (1,2),(1,1>, (09 O h (190))
and so f * g will be zero outside this set. We will find f * g for each point within the dilated set. Beginning with the point (3,2) we have
c
f * g(3,2) =
f(i,j)g(3 - i , 2 - j ) = 2
(i,j)€cW) (3,i92-j)ECoZ(g)
Similarly, for the other points:
f * g(3,1) = f(l,O)g(2,1) = -1
f * g(0, 2) = f(Ll)g(3,1) -l- f(2,")
=5
f * g(0,l) = f(l,l)g(3,0) -l-f (1,O)g(3,0>+ f (2, O)g(29 1) = -1
f * g(
1,2)= f (29l)g(3,1) = 2
f * g( L1) = f (2, M 3 9 0) -l- f (2,0)9(3, 1) = 5 f *g@, 0) = f(l,0)9(3,0) = 1 f * g(1, 0) = f ( 2 , Old37 0) = -3 Thus,
(-; 5
f*g=
2 0 -35 0
4) 2
W4
092
=
W4
(-;-; -;) 2
5
2
32
Similar to thecase of digital signals as described in Section 3.3, geometric and bound matrix methodscan play a greater role in finding wraparound convolutions of f and g. Minimal bound matrix representation shall be employed depending on the size of the co-zero sets of f and g.
214
6. Wraparound Signal Processing
If the cardinality of these two sets are small, then we can imitate the method presented in Section 3.3, while taking into account wraparound. If the cardinality of either of these two sets is not small we might want to work with a full n x n bound matrix. In any case, the first step is to form the 180° rotation of g, thereby obtaining ij. The next several steps areto form the inner or dot product of f with the translatesof g. For each translation indexof i we form the inner product of f with the translateof 3, That is, we form the sum of the product of the values of f and pointwise; the result is
Example 6.26 Again consider
f=(
-;
; ) w 41 , l
and
The objective will be to find f g. Notice that 2 1 0 0 0 0
W4
0,3
All possible translates of i j will be found such that each translate has some nonzero element in common with 0 0 0
W4
'2 1 0 Only translation indices need be employed contained in the dilated set. At each index of translation of i j we multiply the nonzero entries off and ? pointwise j and add the result. Using the indexof translation (0,O)we obtain (f * g)(O,O) = 1
.
6.5. Sequential and ParallelFormulation of Wraparound Convolution
215
This follows by observing the following bound matrices:
Where () denotes the position(s) where the value off and the translations of g both are not zero, these are the values which determine the inner product. 0 0
2 1
0
0
0 0
W4
0 0 (-1) 0
gives (f * g)(l, 0) = -3.
giwes (f * g)(O, 1) = -1.
[ -; ] 0
33,l
=
0 0 0
W4
f=
0 0 0
(l)
0,3
gives (f * g)(3,1) = -1. 0
0 0 0
0 0 0
W4
0 0 0 0 0 0
0,3
gives (f * g)(3,2) = 2. 0
0
0 0
0
0
0 0
W4
216
so
6.
Wraparound Signal Processing
(f * g)(O, 2) = 5 .
[# # 4
0 0
0 0
&l2=
W4
[;_i 0
j =
0 0
( 9
W4
#)
013
gives (f * g ) ( l , 2 ) = 2.
0 0 &,l
=
0
0 0
0 0
0 0 (-1) 0
0 0
(2)
1
gives (f * g ) ( 1 , l ) = 5. The result is therefore,
-; -i) 0
f*g=(
0 0
0
W4
-352 0
093
A parallel algorithm very similar to the one given in Section 3.4 can be employed in finding wraparound convolution. Indeed, the exact same block diagram (Figure 3.1) can be utilized. Of course, when using this diagram in wraparound situations the translation operation must be performed modulo n. All other operations are identical.
Example 6.27 W e will find f * g using the parallel convolution operation of Figure 3.1 with
and
Notice that the output of the .co-zero block is given os the values in the stack
..
. .
6.5. SequentialandParallelFormulation
of Wraparound Convolution
217
The values in the stack areusedas inputs in the transformation blocks. Also, the output of the RANGE block is given by values in the stack
The values in this stack areused QS input in the SCALAR blocks. Notice that the three translation scalar block connections provide the following:
These three signals are used as inputs to the add blocks. So,
f * g = f i l l -k 2f3,l - f3,O 0 0 0
0 0 0 0
0 0 0
0 0 0 0 W4
-; -;) 0
=(
W4
0 0
0
-352 0
0,3
0
0 0 0
W4
218
6.
Wraparound Signal Processing
Banach algebra propertiesof convolution holding for functions also hold for wraparound signals. Thus, we have for any two dimensional wraparound signals f, g , and h, and any real number a B l ) Associative Law: f * ( g * h ) = (f * g ) * h B2) Distributive Laws: f*(gth)=f*gtf*h (ftg)*h=f*htg*h B3) Commutative Law: f * g = g * f B4) Identity (Unity) Law: f * 6 = 6 * f = f BS) Scalar Commutativity: a ( f * g ) = (af)* g = f * ( a s )
6.6 Sequential and Parallel Formulations of Wraparound Correlation Wraparound correlation is defined for f and g in
RznXzn
by
for m,k = 0,1,2,...,n - 1. As in the digital convolution operation, we have the equivalent, possibly more compressed representation
C W f , s ) ( k , m= )
l 0
otherwise
The following block diagram illustrates the correlation operation
The first step in forming the correlation function COR(f , g ) is to find the co-zero sets of f and g , as well as c o z ( N 2 ( g ) )The . dilated set D ( c o z ( f ) ,c o z ( N 2 ( g ) )must ) then be formed.
6.6. SequentialandParallelFormulations
of Wraparound Correlation
Example 6.28 Suppose that COR(f , g) is desired, where
and
219
220
6.
Wraparound Signal Processing
Thus,
As in the case of wraparound convolution, wraparound correlation can also be performed with greater geometric insight, andusing bound matrices. No 180° rotation need be performed on the signal g when finding COR(f , g ) using this method. All that need be done is to find translates of g and form the dot product of these translates with f . The result is the correlation evaluated at the index of translation.
Example 6.29 A s an example, we will find COR(f , g) with
and
Then, using go,o, forming the dot product of the matrices f and g gives COR(f,g)(O,O)= -2 Next, we form the dot product of jive other translates of g with f . Thus forming
[; 0
=
0 2 0
W5
0 (3) 0 0 0 o)4,2 0 0 0
( ‘4 -;i ) 0
and f =
0
0 0
W5
4 J
6.6. Sequential and ParallelFormulations of WraparoundCorrelation
0 2 w 5
0 0 gill=
0 0 (3) ;0) 4 , 2
and f =
W5
( # I #) 0 0
[;; ;
221
0 0
(-1;
4J
gives COR(f,g)(I, 1)= -3.
gives C O R ( f , g ) ( 1 , 0 )= 3. 0 0
0 0
W5
0 0 0 0
492
gives C O R ( f ,g ) ( O , 4 ) = 2 . 0
0 0 0
0
0 0 0
0 0
W5
42
gives C O R ( f ,g ) ( 4 , 0 )= 4 . Thus, 2
0 0 0 0 0 0 0 0
W5
- 3 0 0 0 0,4
Parallel implementation of correlation can be given just like in the digital signal situation. Of course, translation and the 180° rotation must be performed in a wraparound mode for signals in !3?z~xzn. The procedure is analogous to wraparound convolution with the exception of the NINETY2 operation performed on g prior to its input into the co-zero and range blocks.
222
6.
Wraparound Signal Processing
Example 8.30 W e will find the correelation of
and
using the parallel algorithm. The procedum is shown in Figure 6.1. Here, N I N E T Y 2 ( g )= 5 is first foundand this is input into the co-zero and range blocks, thus
and
The computation proceeds in the following figure: W5
SCALAR TRAN
),,, c
B (474)
W5
L o
6.7. Wraparound 2 Transforms
and 2f4,4
=
( ; -;)
223
W6
4 , ~
Adding gives the desired result: 2
0 0 0 0 0 0 0 0
w6
- 3 0 0 0 0,4
All the properties of correlation given in Sections 3.8 and 3.9 hold true for wraparound correlation. Specifically, we have
COR(f,g) = N I N E T Y 2 ( C O R ( g f, ) ) Also
COR(f,g) = C O W (f,N I N E T Y 2 ( g ) ) and
COR(f,g ) = N I N E T Y 2 ( C O N V ( N I N E T Y 2 ( f), g ) ) Wraparound correlation is used exactly for the same applications as digital correlation. Additionally, the results given in Section 3.9 for digital correlation also hold for wraparound correlation.
6.7 Wraparound 2 Transforms The 2 transform for wraparound signals f in easy to describe. Here
RznxZn
are especially
224
6.
Wraparound Signal Processing
has a 2 transform denoted by Z(f), or by F ( z , W) where
c
n-l
F ( z ,W ) =
f(k,j) z-"-j
k,j=O
This relationship is also denoted by
Similar to the usual 2 transforms defined in Section 4.1,four basic operations can be defined. These are: addition, scalar multiplication, multiplication by zkwj, and inversion, Each of these operations will now be defined in order. Suppose that
l
g=
then
0,n-l
n- 1 k,j=O
To find the addition of two 2 transforms, we just add the coefficients of similar powers of z together:
c
n-l
F ( z , w ) t G(z,w) =
(f(k,j)t g(k,j))z'kw-j
k,j=O
To multiply the Z transforms F ( z , W ) by a real number, a, we multiply each coefficient of F ( z , W ) by a, thus
a F ( z ,W ) =
'2a f ( k , j )z-lCw-j -
k,j=O
We form z%qF(z), for integers p and
c
Q
by first writing
n-l
zPWgF(z,W ) =
k,j=O
f(rc,j) z%"wq-j
6.7. Wraparound 2 Transforms
Next, we replace each exponent i = p - IC of x by the number in the set (0, -1, -2, ...,1 - n }
T,
225
lying
obtained by writing
i = ns + T where S is an integer. In other words, we used modulo n arithmetic. We do the same for the exponent Q - j of W . The end result is that zhuqF(z,W ) is itself a 2 transform of some signal in gZznxzn. Thus, for instance, if n = 9 and the exponent of x is i = 23, then we replace i by T = -4 since 23 = ( 9 ) ( 3 ) - 4
The last operationto be defined at this timeis inversion. For Z(f) it can be found by first writing
c
n-l
F(z-1,w-l) =
f(h,j)%kWj
k,j=O
and thenuse the modulo n algorithm justdescribed on the exponents of z and W . If this is done then the exponent 0 is left, however, the exponent 1 is replaced by 1 - n because
Similarly, 2 is replaced by 2 - n . In general we have k by n - IC since 2 = n.1+(2-n)
n-2 n-l
= =
> 0 replaced
n.1+(-2) n.l+(-l)
and so the solution is
F
( r " , W-1)
= f (0,O)t f ( 0 , l ) wl-n
+ f (190)
226 6.
Wraparound Signal Processing
Of consequence, is that the following four structure preserving Properties hold true: 21) Additive Property: 2 ( f g) = 2(f)t Z ( g ) Z2) Homogeneous Property: a 2 (f) = Z ( a f ) 23) Time Shifting Property: 2 ( T ( f ;n,m ) ) = Z ” ” W ’ ~ F e , W ) 24) Time Reversal Property: 2 ( N 2 ( f ) )= F(l/z, l / W )
+
Example 6.31 Let 0 0 0 -1
W4
3 0 0,3
and
then 0 1 0 0 1 1
W4
0,3
and
and / 3
0 0 -l\w4
6.7. Wraparound 2 Transforms
and finally,
[ i) 0 0 3 - 1 0 0 2
N2(f)=
0 0 0 0 0 0
227
W4
093
Next,
f
t-+
F(%,W)
+ 22-2w-2 + 3%-220-1
= -%-lW-l
and g
M
G(%,W ) = z - ~ w - '
- z'2w'2 + 2-3w-2 + 22-2w-1
and so
F ( z , w)+G(z, W ) = - z - ~ w " + z - ~ w - ~ + x - ~ w - ~ + ~ ~ - ~ w - ~ + ~ - ~ w - ~
A lso, 2F(z, W ) = -22"
2v-l
+
+~ z - ~ w - ~
and z-2w-2~(z,
= --g-3w-3
= -2-320-3
+ ~ 4 ~ +-~ + 2 + 3w-3
and finally
F(l/%, l / w ) = -%W t 2%2W2 t 3%2w
W e have, as properties Z1)- 24) state,
2f
c"f
T ( f ;2,2)
2F(%, W) % - v ( % W) ,
44
~
-
3
228
6. Wraparound Signal Processing
Property ZS)provides the justification for the block diagram given earlier where 1/z denotes a one unit shift to the right and l / w denotes a one shift up.
Thus, to shift a signal by k units to the right,we can multiply the 2 transform of the given signal by z - ~and form the inverse 2 transform to obtain theresult. A similar discussion can be given for translation in the vertical direction. A most important consequence of the isomorphism given by properties Zl)- 24).is that, the convolution of wraparound signals has a 2 transform equal to the product of the 2 transforms of the individual arguments.
-m -
Theorem 6.1 (Wraparound Convolution Theorem) Iff and g are in Rznxzn and
f and 9
then
f *9
-
W)
G(%?4
F ( z , w)G(z, 4
The product in the above theorem is found using simple algebra along with properties Zl)- 24).
Example 6.32 As in Example 6.27, if
6.7. Wraparound
2 Transforms
229
and
then f
* F ( 2 , w ) = 22-lw-l t 2-2w-1 - 2-1 t 3 r 2
+ 52-lw" +
20
- 32-1
and so 0
0 0 2 0 -3
0
0
W4
2
5
W4
33
as before. As might be expected, there isa wraparound correlation theorem.
Theorem 6.2 (Wraparound Correlation Theorem) If f and g are in RznXzn and f F ( v ) and 9 G(%,W ) then Cows) F ( % w)G(l/t, , l/w)
-
230
6. Wraparound Signal Processing
and
Then
F(2, W) = 2w-1
f and g
and so N2(g)
-
c+
+ %-l
- 2-120-1
+3
G(%, W) = 2a"w"
G(l/x,l/w) = 2sw t 3 =
-t3
Now, F ( z , w)G( l/%, l/w) will be found. In doing this, we use the last expression f o r G( l/%, l / ~ ) Thus, .
F ( z , w)G(l/z, l/w) = 4~'~- 2 t ! 20 0 0 6 \-2
- ~ z - ~ w "t 32-l
4- 6w-l 0 0 0 3 3
0 0 0 0 0
0 0 0 0 0
W5
0 0 0 4
074
as was previously obtained in Example 6.28.
6.8 DiscreteFourierTransforms For any wraparound signal f in SznXzn we can find the discrete Fourier transform, abbreviated D F T . It is defined by
DFT(~)(T S), =
5' f ( k , i ) e - 2 r W + s i ) / n, where
k,i=O
O
6.8. Discrete Fourier Transforms
231
The DFT provides a measure of the frequency content, or spectral content of a signal. The frequency possessed by a signal is indicative of the amountof variation within thesignal. While theDFT is useful in filtering signals directly inthe "frequency domain" it also provides insight into spatial domain filtering using convolution.
Example 6.34 Suppose that h is in R z n x z n where wn
0
115
0
n-1.1
with n > 2, in this case. The structuring signal h provides a moving average filter similar to the one given in Section 3.7. Here, h can also be written as 115
0
0
h=
11/51
0 0 115 0
*
*
e
'*. 0
.
.
0
wn
0
0 0 115
0
The DFT of h is the complex valued function DFT( h)where [l + e(-anjr)/n + e(-pnjdn-ll)/n + e ( - z n j s ) / n + e(-2~js[n-ll)/n
DFT(h)(r,S) =
1
In general, i f f E R z n x z n then DFT( f ) E C z n x z n , where C is the set of all complex numbers. The DFT will be a wraparound signal, however its values are always complex valued. It is most helpful to use the amplitude and phase signals associated with the DFT, for they arereal. In order to define these quantities ina rigorous fashion, we should introduce a whole new set of range induced operations. This time, the codomain is the set of complex numbers. If this were done we would arrive at many similar operations to those previously found, this time valid for wraparound signals in C z n x z n . Define the amplitude spectrum, denoted by 1 f I, by
232
6.
Wraparound Signal
Processing
Additionally, we also define the real part, imaginary part, and argument typesignals for f i n C Z n X Z n , denoted by R E A L ( ! ) , I M A G ( f ) , and A R G ( f ) respectively. These are defined in turn by
REAL( f)(k, i ) = Re( f(k, i ) ) where Re(f(k, i)) is the real part of the complex number f ( k , i ) ,
I M A G ( f ) ( k ,i ) = I m ( f ( k ,i)) where I m ( f ( k ,i ) ) is the imaginary part of the complex number
Example 6.35 Again refer to the wraparound signal h=
(
wn
0 115 11; 11%)
v;
n-1,l
in SznXzn given in Example 6.34. In this example, we can simplify the DFT by using trigonometric identities to obtain DFT(h)(r,s) =
[l -t 2cos
where 0 5 r ,
S
(F)i-2cos (F)] 5 n-1
Example 6.36 Consider the impulse function
l
0,n-l
6.8. Discrete Fourier Transforms
233
where
- sin(2s(n - l ) ) / n
-
S
- sin(2?r(2n - 2 ) ) / n
m
- sin(2n(n - l))/.
1
l
0,n-l
There exists a straight forward relationship between the wraparound
2 transform and the D F T . Indeed, if
then
DFT( f )(T , 8 ) = F( e-2njrln e-2?rjs/n ) Several properties possessed by the DFT follow from this. In particular, for f and g in RznXzn and a real, we have
D F T ( f t g ) = D F T ( f ) t DFT(g) DFT(af ) = aDFT( f )
DFT(CONV( f , g ) ) = D F T ( f ) D F T ( g ) Analogous results hold for f and g in C z n x z n . We can define an inverse discreteFourier transform denotedby ID FT which is defined by
.l
I D F T ( g ) ( p Q) , =-
n-l
2 g(i,k)e
2ajip/ne2njkq/n
n2 k,i=O
..I.
.....^. ,....,,.
.* ./..,_
..,. _..., ~
._,.._,".".. .. .....
,
~
.
1.
"I
.. .
. . , . . ..
I
,
.,
,
. , . .. ,
, ,
.
,
234
6.
Wraparound Signal Processing
for O
Of particular interest is the fact that for f , g E CznXzn we have
I D F T ( D F T ( f ) )= f and
D F T ( I D F T ( 9 ) )= g
6.9 Wraparound Algebra in Z, x Z, In the previous sections we studied wraparound signals in %znxzn. Several operations on signals in this space alsohold for wraparound signals in ?RZnXZm, where n need not equal m. To begin, all range induced operations: +, and V, along with range induced macros are defined precisely the same way as those given in Section 6.2. For the domain induced operations and corresponding macro operations we only use the shift, translation operation, and 180° rotation. In particular, the last two operations are denoted by T R A N and N I N E T Y 2 , or by T and N 2 . These are defined by: S,
and
N I N E T Y 2 ( f ) ( i , j= ) f(-i, - j ) where i - p is evaluated modulo n and j - q is evaluated modulo m. Similarly, -i is evaluated modulo n, and - j is evaluated modulo m. The ninety degree rotation N and reflection D operations will not be defined in this space since these operations are not 1-1 or onto mappings.
6.9. Wraparound Algebra in
2, x Zm
235
Example 6.37 Consider the wraparound signals f and g in Rz3xz4, where 2
(070)
3 4
(191) (091) 0 elsewhere
and
9=
{
-1
(090)
2 (190) 1 (091) 0 elsewhere
Bound matrices can also be used to represent f and g , as wasthe case for wraparound signals defined in a square domain. Here we use bound matrices with 4 rows and 3 columns and notation quite similar to before. w3x4 0 0 0 4 3 0 0,3
0 0 0
w3x4 w3x4
0,1 0,3
f o
0
o\
0 0 0 0 0 0
w3x4
w3x4
236
6.
Wraparound Signal Processing
-( i ;Bi,
W ; % 1) -
w3x4
=(
3 0 4
w3x4
3 0 4 0 0 2)0,1
w3x4
=(: :)
091
In the last expression of Example 6.37, notice that we set
f ( 4 , -j) = f(1,l)= 3 Then we use modulo 3 arithmetic for -i = 1 or i = -1 to obtain i = 2. Then we use modulo 4 arithmetic for - j = 1 or j = -1 to obtain j = 3. This gives N(f)(2,3) = 3 All the macro operations which involve the addition, multiplication, maximum, translation, and 180° rotation operations also exist in !RznxZm, In particular, we mention the convolution and correlation operation. Both of these operations can be defined in a pointwise manner. Moreover, they can be implemented using the geometric bound matrix app,roach as well as using parallel algorithms. For convolution of f and g, which is again denoted by C O N V ( f , g ) or by f * g, we have m - l n-1
j=O
k=O
As before, the value of the convolution product will be zero except for possibly in the dilation of the co-zero sets of f and g. Thus, we
6.9. Wraparound Algebra in 2, x Z,
23'7
obtain:
( 0
otherwise
The parallel convolution algorithm is illustrated in Figure 3.1 and is given by f *9 = fp,9 * g ( P , Q )
c
(9J,q)Ec4ff)
Similarly, the pointwise correlation is given by:
The parallel correlation algorithm is illustrated in Figure 3.2 and is given by
and
Theparallelalgorithmisutilized(see Figure 6.2). A s before, the wraparound signal g is input into the co-zero and range blocks.
238
6. Wraparound Signal Processing
The output of the co-zero and range blocks are sent to the translation and scalar blocks respectively. Finally, the addition is taken of all the translation scalar connections, thereby giving: 4 3 0 f * g = (-2 5 6 ) -2
w3x4
0,3
The parallel correlation algorithmis performed in exactlythe same fashion,withtheexception that is found first. See the following example and Figure 6.3.
Example 0.39 Using f and g of Example 6.38,
[ : :]
w3x4
c = N I N E T Y 2 ( g )=
0 0 0
=
(
-:)
w3x4
2,0
0,3
This signal is input into the co-zero and range blocks, and the output of these two blocksareused in the translation scalar connections. Finally, the addition block is utilized and
6.9. Wraparound Algebra in
Znx Z,
241
Two dimensional wraparound 2 transformscanbe defined for wraparound signals in R z n x z ~This . is done just like in R z n x z n . Basic operations involving these series are similar to those given earlier,except that exponents of W are reduced modulo m while exponents of z are reduced modulo n . The principal results involving these transforms are summarized in thefollowing theorem.
Example 6.40 Suppose that
then
f and
g
F(%,W ) = 2 t 4w-1
c-t
G(%, W >= -1
+ 3%-'W-'
-+ W-1
t 22-1
To begin,
and so b y taking the inverse 2 transform we obtain 0 0 0 4 3 0
w3x4
242
6.
Wraparound Signal Processing
Now, forming G(l/z, I / w ) = -1
+ W + 22
and reducing powers of z modulo 3 and powers of
G ( l / z ,l / ~= )-1
+ w - ~+ 2
W
modulo 4 gives
~ - ~
Multiplying
F ( z , w)G( l/z, l / w ) = 2 - 2w-1
- 3z-lw-l + 2
~
-
~
Taking the inverse 2 transform gives
The D F T is also defined for signals in Z Z n X Z m . Indeed,
whereO5p5n-landO5q5m-l
Example 6.41 Consider the signal 61,1 in 8 z 3 x z 2 , then
=
(
0 1 0 0 0 0
)
~ 3 x 2
0,1
Various properties involving the D F T hold as before and the same is true for the inverse discrete Fourier transform.
6.10. Exercises
6.10
243
Exercises
1. Provide an illustrationof each of the wraparoundsignals given below.
2. Show that the signals in Exercise 1 can be represented using
bound matrices as
[::l
W5
2 2 2 2 2
,xz5 =
2
2
2
2
2
2 2 2 2 2
0 0 0 0
W4
0,3
Also, find the co-zero set for each of the wraparound signals given in 2a, 2b, and 2c. 3. Which of the following identities are true:
(a) S C A L A R ( A B S ( f ) ;-2) = A B S ( S C A L A R ( f ;-2)) (b) O F F S E T ( A B S ( f ) -2) ; = A B S ( O F F S E T ( f ;-2)) ( c ) M U L T ( A B S ( f ) ,A B S ( g ) ) = A B S ( M U L T ( f ,g))
244
6.
Wraparound Signal Processing
4. For each of the wraparound signals f given in Exercise 1, find the output of the block diagram
5 . Repeat Exercise 4 for the signal f where
6. For the wraparound signals f given in Exercise 1 determine the output of the block diagram
7. Repeat Exercise 6 using
2 1 0 f = ( O
W3
0 1)
O O O
0,2
8. Show that
2 0 3 2 0 1 4 )
W4
0,3
can be written as
2 0 3 2 f = ( l 0 1 4)w4 0 93
as well as f =
(
3 2 2 2,3
What is the most compressed way of writing f ?
6.10. Exercises
9. Write
3 0 0
8:
f =4 ( 0 : 0
245
-;] W4
073
in the most compressed fashion. 10. Consider the set A = ((O,O), (1, l), (1,O)) in Z g x B = u1,1>,(2,2), (1, O)), find W ,B ) .
Zg
and let
11. Find &(A,B ) using A and B given in Exercise 10. Do this using the definition as well as using A 8 - B . 12. Find O ( A ,B ) using A and B as given in Exercise 10. 13. Find C ( A , B ) using A and B as given in Exercise 10. 14. Show by example, using wraparound set morphology, that N 2 ( A ) need not equal -A. 15. Let 2 1 0
f = ( oO 1 0O )
W3
0,2
and
2 g=(
0 -l
0 1 0 0)
O O
Find the output of the block diagram
by using (a) The definition of convolution. (b) The bound matrix technique.
W3
0,2
246
6. Wraparound Signal Processing
(c) The parallel convolution algorithm.
16. Use f and g in Exercise 15 and find the output of
17. Give an example in 8?z3xz3 equal .D(coz(f),coz(9)).
showing that coz(f
* g) need not
18. For the wraparound signals f and g given in Exercise 15, find the output of
do this by (a) The definition. (b) The bound vector technique. (c) The parallel correlation algorithm. 19. Let
f=
(
21 0 3
0 0
- 9 w 3 092
find the Z transform for the output of each of the following block diagrams: (4
6.10. Exercises
247
NINETY2
- " f 20. Find f
* g using 2 transforms where 2 3 4 f=(O 0 l )
O O O and
W3
0,2 W3
21. Use the wraparound signals f and g in Exercise 20 and find COR(f , g) using the 2 transform technique. 22. Find the D F T for
(a) (b) (c)
& , l ,do
this in
P3XZ1 @'lXz3
RZ2XZ4
23. Find the minimal bound matrix for 2 1 0 1 f=[::
w3x4
: :]
O O
24. Let
0,3
w2 x3
f = ( 2 3) 4 2 0
0,1
248
6.
Wraparound Signal Processing
and
~ 2 x 3
Find f * g by the definition, using bound matrices, and using the parallel algorithms. 25. Find CO R ( f ,g) for f and g given in Exercise 24 by the definition, using bound matrices, and using parallel algorithms. 26. In Rznxzm with n
# m, show that N
is not 1-1and ontowhere
Is VERT and HOR 1-1and onto? Recall V E R T ( f ) ( i , j= ) f(-i,j)
27. Define an inverse DFT operator IDFT in
and show properties similar to those described in Section 6.8 hold true in this signal algebra environment. XZnXZm,
Parallel Multidimensional Algorit hms for Single Dimensional Signal Processing 7.1 Two Dimensional Processing of One Dimensional Signals In this section we will describe a simple application of using two dimensional convolution for performing several one dimensional convolutions simultaneously. To do this,we must map one dimensional signals into two dimensionalsignals. Subsequent sectionsof this chapter also address thebenefits of r ,apping signals in a given dimension into signals of another dimensiol:\ Suppose that we are given m, one dimensional, time limited signals 0
1
g ,g ? ...,gm-l
each of which is t o be convolved with a given signal f. We could form a two dimensional signal g, which is represented by a bound matrix with m rows. It has as its bottomrow go. The next to bottom row will be g1 and so on, up to its top row which is gm-1. Also, to precisely locate the vectors gi in g we let gj(k)
j = 0,1,...,m - 1
otherwise Next, we convolve g with f where f is represented as a two dimensional signal with values on the abscissa. A two dimensional signal h is obtained which we write as a bound matrix with m rows. The bottom row is ho, the next to bottom row is hl, and so on up to the top row, which is Specifically,
hj(k) j = 0,1,...,m - 1 otherwise 249
250
7. ParallelMultidimensionalAlgorithms for SingleDimensionalSignalProcessing
It will be true that = 0,1, ...,m - 1.
f * g i = h', i
Example 7.1 Say we wish to convolve go=
(1
2 2 ) O0
=
( -1
2 2 )O
and g1
1
and g % ( 3 2 1 1 1 ) O0
with f = ( 2
2 -1);
Form the two dimensional signal g=
(;
2 1 1 1 -1 2 2 0 )
O O
0
0,2
which will be convolved with
See Figure 7.1, where we obtain 6 1 0 3 2 3 h = ( 0 -2 2 9 2 2 6 7 2 - 2
-:
0
1 -
Thus, f * g O = ( 2 6 7 2 -2); f * g 1 = ( 0 -2
2 9 2 -2
);
f * g 2 = ( 6 10 3 2 3 1 - 1 ) ;
252
7. Parallel Multidimensional Algorithms
7.2 Diagonal Transform from One Dimension into Two Dimensions There are many transformations similar to the one given in the last section, used in taking one dimensional digital signals into several dimensions. Perhaps the simplest is the diagonal transformation, denoted by DIAG. Intuitively, it maps a one dimensional digital signal along the 4 5 O line in 91zxz. Specifically, for the one dimensional digital signal f given by the bound vector
('
'*
a-2
pg
a-1
a1
a2
- ) ''
we can form the associated diagonal (two dimensional) digital signal DIAG( f) where
\ 0 0 0 0 a- 2
Thus,
DIAG :
0 0 0
0 0 a0
a-l 0
0 0
0
a2
a1
0 0 0 0
0 0 0
... ... ... ... ...
$ 2 RzXz '
where
+
{
f(n) n = m 0 otherwise The following block diagram illustrates this operation.
D I A G ( f ) ( n ,m)=
7.2. DiagonalTransformfromOneDimension
into Two Dimensions
253
Iff is time limited then D I A G ( f )will have finite support. Moreover, if
f=
0 )p
( a 0 an-1 a1
then 0
D I A G ( f )=
P9Ptn-l
Example 7.2 Let f = ( 2
0 3 1-1):
then 0 0 0 0 - 1
Applications involving this transformation will be given shortly. Notice that if D I A G ( f ) is given we can always recover the one dimensional signal f. This is done using the inverse diagonal transform and itis denoted by IDIAG. We have, for any two dimensional digital signal g , IDIAG : S z X z-+'R where for n E Z
IDIAG(g)(n)= g @ ,
4
In terms of block diagrams
IDIAG Accordingly, the following property holds true.
Dl) Inversion I D I A G ( D I A G ( f ) )= f
254
'7. Parallel Multidimensional Algorithms
7.3 Kronecker Products Another transformation utilized in mapping a one dimensional digital signal into two dimensions is the Kronecker operation, also called Kronecker product. Unlike the diagonal transformation, the Kronecker operation, denoted by K R O N , or by is a binary operation. Indeed, KRON : 9tz X !Rz+ ?Rzxz For any two one dimensional digital signals f and g , the Kronecker g and it is defined product is denoted by K R O N ( f , g ) or by f by the following
m,
The block diagram illustrating this operation is given by
If f and g are both time limited, then support. Moreover, if
and then
f
g will be of finite
7.3. Kronecker Products
Example 7.3 Suppose that
f=( 2
-1
then
Also, note that
See Figures 7.2 a and b
3);
and
g=
(2
3
),0
255
7. Parallel Multidimensional Algorithms
256
1
"'
1
2
5
4
3
"'
Figure 7.2b
As the above example illustrates, we usually have More specifically, the following property always holds true for the Kronecker product of two signals:
K1) Diagonally Commutative:D I F L I P ( K R O N ( f , g ) )= K R O N ( g ,f) Property K1) means that
-1
and in terms of block diagrams we have the output of
9
KRON
and the output of
f
c
KRON g
c
.It.
- DIFLIP
7.3. Kronecker Products
257
are equal. The Kronecker product provides a useful way of developing two dimensional structuring signals with properties similar to those in the onedimensional case. Suppose a one dimensional structuring signal (impulse response) is h. The product h h, will be a two dimensional structuring signal, which when used as an argument in convolution, filters in a manner similar to the way that h filters in one dimension.
Example 7.4 Consider the triangular structuring signal h illustrated in Figurn 7.3. This function is used in one dimension as a low pass filter. h
-3 0
1 9
0 I
I
I
I
-2
-1
0
I
l
l
I
1
2
3
l
I
Figure 7.9
Since h = 9i ( l
2 3 2 1)'
-2
we have in two dimensions
1 2 3 2 1
0
h m h = 81 L [ 3 2 4 6 6 9 46 32 1
1 2 3 2 1
2 4 6 4 2 -24
This signal is also a low pass filter. Notice that there cannot be an inverse mapping for the Kronecker g there is no way, in general, product. In other words, given f of uniquely determining both f and g.
I#I
Example 7.5 Let f = ( 1 2);
258
7. Parallel Multidimensional Algorithms
and 9=(3
4);
then
However, if we use and
( -1 = ( -3
-f =
-2);
-g
-4
lo 0
then
The previous example illustrates flIr=-fIKI-g
and thisequalityalwaysholdstrue. Moregenerally,wehave property that for any reds a and b, and any f and g in illz:
K2) Scaling: uf
IK(bg = ab(f
the
g)
In terms of block diagrams, the output of the following two block diagrams are always equal:
f
c
SCALAR U
*
c
KRON c
9
SCALAR b and of
e
r
7.4. Triple Convolution
259
gl SCALAR
7.4 Triple Convolution Triple convolution of three one dimensional digital signals f, g and h is formally given by the infinite series
E
f ( M n - W ( m- IC)
k=-m
The resultingfunction, provided that the series converges for all n and m, will be a two dimensional digital signal whichwe shall denote by T C O N V ( f ,g, h). It has been seen that DIAG is a unary operator from R' into Rzxz.TCONV is a ternary operation. The only trouble is that
T C O N V :' 9
X
'R
X
R'
"--+
92'xz
is not true, because the series does not converge for arbitrary functions in This is just like the situationwhich arises in convolution. Let S be the subset of SZ consisting of time limited signals, then it is true that
92.'
TCONV:SXSXS"+R~~~ It is this situation which will be described herein. Specifically, the triple convolution will be zero everywhere, except possibly for lattice points ( n ,m ) for which ( n ,m ) E
W ,B)
where D is the set dilation operation and where
A = coz(DIAG(f))
260
7. Parallel Multidimensional
Algorithms
and
B = coz(KRON(g,h ) ) The triple convolution is defined by
i
c
k€coz(f)
f (k)!dn -
(n, m ) E IC) Z)(A,B )
TCONV(f,s,~)(n,m) = n-kEcoz(g)
m-k€coz(h)
0
otherwise
Example 7.0 The triple convolution off, g and h is to be found, where f = ( 1 2)O 0 g = ( 1 0 2);
and Since
and
we have A = coz(DIAG(f)) = {(O,O),(l,l)}
and
7.5. Triple Convolution Performed Using Parallel Two Dimensional Convolution 261
Thus,
TCONV(f , g , h ) =
-1 4
-2 O
Triple convolution can be illustrated using the following block diagram:
TCONV
7.5 TripleConvolutionPerformedUsingParallel Two Dimensional Convolution In this section, we will show how to perform triple convolution using two dimensional convolution. A good indication how this can be done was hinted from the previous section. Indeed, there we saw that a support region for T C O N V ( f ,g , h ) is D(coz(DIAG(f)), coz(KRON(g, h ) )
7. Parallel Multidimensional Algorithms
262
Now we will see that the following identity holds true.
T C O N V ( f , g ,h ) = C O N V ( D I A G ( f ) , K R O N (hg), ) To see this, notice that TCONV can be written at3
T C O N V ( f , g ,h)(n,m ) =
g F(k,
k)g(n
- k)h(m - IC)
where
Thus, we have
F = DIAG(f) Next write
where
H(%- k,m - k) = g(n - k)h(m - IC)
Comparing this expansion with the definition of the Kronecker product shows that H = g m h It therefore follows that
T C O N V ( f , g , h )= D I A G ( f )t K R O N ( g , h ) Because of this relation we can perform the triple convolution using the parallel two dimensional convolution algorithm. Indeed, the entire procedure for performing TCONV is illustrated in Figure 7.4. Additionally, since the usual convolution algorithm is commutative, it follows that
T C O N V ( f , g ,h ) = K R O N ( g , h )* D I A G ( f ) This identity is illustrated in Figure 7.5 and may be simpler t o implement then the previous identity.
7.6. Volterra Convolution and Volterra Series
265
7.6 Volterra Convolution and Volterra Series Volterra typeconvolution is an operationinvolving a one dimensional signal f as input and a one dimensional signal g as output. The output is defined whenever the series below converges: g(n) =
2
hk((il,i 2 , ...,ik)f(n - i l ) f ( n - iz) ' ' 'f(n - ik)
il,i2 ,..*ik=-Oo
Here hk is a k dimensional real valued structuring signal also defined as the kernel. In a single dimension
mensions we have M
k,j=-w
In three dimensions, the Volterra convolution is given by g(n) =
5
h 3 ( k , j ,W ( . -
k,j,i=-w
-
M.-
i)
We will denote the Volterra convolution of f, using a k dimensional kernel, by V O L T K ( f ) .This is symbolized by the block diagram:
As in previous sections, co-zero sets can be utilized in obtaining more efficient calculations.This will be done for signals of finite support. Indeed, in two dimensions, it is true that h 2 ( k , M . - W f ( n- j >
Ec
n-kEcoz( f)
0
otherwise
266
7. Parallel Multidimensional Algorithms
where C = { n I ( n , n E) D ( A , B)}. Here, as usual, D is the dilation operation and
A = C O Z ( ~ )B , = coz(KRON(f, f)) Example 7.7 Suppose that
We will find the Volterra convolution. Note that
and coz(f) = (0, l}. Now
and g =
(8
-10 -1
),
0
The Volterra convolution in dimensions higher than two can be found in an analogous manner. Of course, concepts such as co-zero sets, dilation operation, and Kronecker products are easily extended to the n dimensional case. This is done in a straightforward manner; an example will illustrate the procedure.
7.6. Volterra Convolution andVolterraSeries
267
Example 7.8 Let
f = ( 2 -1);
0 otherwise We will find the Volterra convolution. Note that coz(h) =
01, (1, O,O), (1,1,1))
and coz( f) = (0, l}. Also note that we use h for simplicity in place of h3. A support region for g consists of the projections of points along the diagonal of the dilated set obtained from the co-zero set for h and the co-zem set of the Kronecker product of the input signal f. It is (0,1,2}. so g(0) = h(O,O,O)f 3 ( 0 )= 8 g(1) = h(0,0,0)f3(1) t h(1,O,0)f(0)f2(1)t h(l,l,1)f3(O) = -5 g(2) = h ( l , l , 1) = f 3 ( l )= 1
Accordingly, g =
(8
-5
1
),.0
The Volterra series with input signal f and output signal g is 03
k
03
Noting that this is an infinite sum of Volterra convolutions implies that
9 ( 4=
gV O L W f
k=l
Example 7.9 Referring to the previous examples where
f = ( 2 -1); and the Volterra series g of f is to be computed where we assume that
7. Parallel Multidimensional Algorithms
268
0 otherwise
and hm = O Z ~ Z ~ , .for . ~ m~ 2 4 Then it U true that g can be found from the block diagram
VOLT2 c
f c
1
VOLT3
Since
V O L T 2 ( f )=
(8
and
V O L T 3 ( f )= then
g=
c
-5
1
G 9
),0
-10 -1
(8
( 16
ADD
):
-15 ),0
A sufficient condition for the convergence of the Volterraseries is if each structuring signal hk is in 11, and the inputsignal f is bounded in absolute value by a constant less than one, and if
c 00
ah =
Ihfi(i*,iz, ...,ik)(
< 00
il,ia,*..,;k=-oo
This follows since for some real number a, la1
I f ( m ) l ' sla1
forall m
and
IVOLTK(f)l 5 and so
lakl lalk
< 1,
7.7. Parallel Algorithms for Volterra Convolution
269
where since (akl 5 M
ak -+ 0,
for dl k
Needless to say, a Volterra series consisting of only a finite number of terms involving signals of finite support, always converges.
7.7 Parallel Algorithms for Volterra Convolution Volterra convolution can be found using the parallel algorithm illustrated in Figure 7.7. This diagram holds true in two dimensions as well as three, four, and so on. We will provide a more in-depth description in the two dimensional case. Since,
V O L T 2 ( f ) ( n )=
5 h2(k,j)f(n- k)f(n -
j)
k,j=-ca
we see that if we let
then we can write
VOLT2(f)(n= )
5 h2(k,j)F(n~~
T,n
-8)
k,j=-oo
Moreover, if we let q(n,m) =
2
h2(k,j)F(n- ?-,m- 9)
k,j=-eo
then Q can be found using the two dimensional parallel algorithm given in Figure 7.7.Additionally,
VOLTfL(f)(n)= 4%n ) That is,
V O L T 2 ( f )= IDIAG(q) This validates the block diagram given in Figure 7.6. A change of variables also shows that the Volterra convolution is commutative and so the parallel algorithm given in Figure 7.7 can also be employed.
272
7. Parallel Multidimensional Algorithms
An example will make the algorithm clearer. Example 7.10 We will find the Volterm convolution
using
and
f = , ( 2 -l
0
)o
We shall now use the two dimensional parallel algorithm given in Figure 7.6. Forming
flrrlf inputting the resulting signal into the co-zero and range blocks provides parameters by which h is translated and scalar multiplied. This gives 0 -2 2 0 -2h0,l =
( -:-:8
hl,l =
2ho,o =
: -9)” -: (:
090
(8
0 0
090
:)O
l2
0,Q
-2h1,o = 0 -4
-6
These signals are added to give 3 -1
0
0.0
7.7. Parallel Algorithms for Volterra Convolution
273
and finally, the inverse diagonal transform of t is obtained to give the desired result: g = IDIAG(t)=
(8
-10
-1
0
),
As mentioned earlier, the parallel algorithm can also be employed in higherdimensions. The next example willmake this more convincing. Example 7.11 We will find the Volterm convolution d n )=
E
W ,j9 i ) f( n- W ( n - d f ( n - 4
k,j,i=--oo
using
f=(
0
2
- q 0
and
0 otherwise
We will employ the parallel algorithm illustrated in Fi ure 7.7. In f f. order to do this we must form the Kronecker product f
Accordingly, three dimensional bound matrices can be employed in denoting three dimensional functions. We will leave it to the reader to construct such structupes. As in the two dimensional case, the signal h is input into the co-zero and range blocks to obtain:
274
7. Parallel Multidimensional Algorithms
."I -t c02
and
These values are used respectivelg in translating and scalar multiplying KRON( f,f,f). We will let t denote KRON( f,f,f). The output of the translation scalar connections are
and
7.8. Exercises
Letting 8
=t
+ 2tllO,0- tl,l,l
then g = IDIAG(s) =
7.8
(8
-5
1
275
):
Exercises
1. Convolve each of the signals: go, gl, and g2 where g o = ( -1 g l = ( -1
1 2)
0 2
0 2 1 ) O1
and g2=(
1 1 2 3 ) O2
with
f = ( 2 -1 1 ) O1 Do this by making go, g l , and g2 into a single two dimensional signal g, and then use the parallel two dimensional algorithm. 2. Show how the two dimensional parallel correlation algorithm can be employed to correlate go, gl, and g 2 with f.
3. Is it true that
DIAG(IDIAG(g))= g ? 4. Give an example of two digital signals and for which it is true that
flKls=slKlf 5 . Suppose that
f=(2
q o0
g = ( 1 1 2)O
2
f and g where f # g
276
7. Parallel Multidimensional
Algorithms
and
h = ( 1 -1 2 ) O2 are given. Find the triple convolution for f, g , and h. Do this using the pointwise definition.
6. Perform the triple convolution for f, g , and h, as given in Exercise 5 , using the parallel algorithm. 7. Find the triple convolution using a parallel algorithm if
f=(2
1 -1):
and
g=h=
1 at the even integer points
-1
at the oddintegerpoints
8. Find the Volterra convolution VOLT2(f) where
f = ( 2
-1
1);
and
Do this using the pointwise formula. 9. Find the Volterra convolution VOLTS(f)using the pointwise formulation where
f = ( 2 -1 2 ) O0 and h3( i , j , IC)
=
10. Perform V O L T 2 ( f ) given in Exercise 8 using the parallel al-
gorit hm.
7.8. Exercises
277
11. Repeat the operation V O L T 3 ( f ) given in Exercise 9 using the parallel algorithm.
12. Find the Volterra series g of
f = ( 2 -1
0
l),
with kernels
hl=(l
1 1)'3
h3 given in Exercise 9 and h* = 0 for n > 3.
Appendix Set Operations and Morphology for Two Dimensional Digital Signal Processing Set theoretic morphology consists of a mixture of some simple set theoretic operations and arithmetic type operations. The set operations are those of union and intersection of two sets along with subsets of a given set. The arithmetic type operations involve only addition and multiplication. Each of these operations will be described using sets consisting of lattice points. A lattice point is a pair of integers. We will be interested in the set A , which contains only a finite number of lattice points. The set of all lattice points is denoted by 2 X 2.The number of elements in a set A in this case is called the cardinality of A and is denoted by card(A). For instance, the set A where A = ((0, 01, (0,317(4,019 (797)) has card(A) = 4. We u.se the symbol E to represent membership in a set and the symbol 4 to represent its negation. Thus (0,3) E A while the point (1,l)# A. Whenever every element of a set B also belongs to another set A we say that l3 is a subset of A. Intuitively, B is a piece of A. This relation is denoted by B c A Thus, whenever x E B implies that x E A it follows that B C A. When x E B does not imply that x E A , then B is not a subset of A. Moreover, two sets are said to be equal when each is a subset of the other. Throughout the Appendix, we are dealing with subsets A of 2 x 2,thus A C 2 :<2.In general, it is always true that A C A and 0 C A, where 0 denotes the empty set.It is the set consisting of no lattice points and is also denoted by {}
.
279
280
Appendix
The operationof union of two setsinvolves combining the elements of the sets. More formally, the union of sets A and B is denoted by A U B and is defined by
AUB={a:]zEAorsEB} An arithmetic type operation,called translation involves the addition of a set with a lattice point. Translation is denotedby A + ( n , m ) where ( n , mE) 2 X Z and it is defined by
A+(n,m)={(p+n,q+m)with(p,q)EA) The resultingset A + ( n , mis)also called the shifting of A by ( n ,m). This operation entails moving the set A . The final operation, called the 180° rotation, is the multiplication of a set A by - 1, denoted by - A and is defined by
The resulting set is a rotation of A 180° “about the origin.’’ In set morphology there are twobasic operations. The first is called dilation, or sometimes called Minkowski addition. Given two finite subsets of integers A and B , the dilation of A by B is denoted by D ( A , B ) . It is defined by translating A by each element of B and forming the union of all the resulting translates.
D(A, B ) =
U
+
( A (n,m))
(n,m)EB
If we let
A =m
o > ,(0,2), (3,019 (595))
and
B = {(-L l),(2,1)) To find the dilation of A by B we first find all translates of A by elements in B:
Appendix
281
Next, form the union which provides the desired result
In general, the order in which the union is performed is irrelevant. This follows since the union operation satisfies the commutative and associative laws, i.e. WO respectively have
(AuB)uC=AU(BUC) As a consequence, the dilation operation also satisfies the commutative and associative laws, i.e. respectively we have
D ( A ,B ) = D(B,A ) 2) ( W , B ) ,C)= D ( A ,W
, C))
The second basic operation in morphology is erosion, it too is a binary operation. Thus, given two subsets of lattice points A and B , the erosion of A by B will produce a subset of lattice points. The resulting set, denoted by &(A,B ) is found by first determining all translates of B which are a subset of A. Once this is done, the second and final step is to form the set consisting of the translation values. It is & ( A , B ) .Thus,
When performing the erosion of A by B , the second argument is called the structuring element. The second argument when performing dilation is also called the structuring element. For a given structuring element, these operations are somewhat opposites. While the dilation of a set A by a structuring element B expands the set A in some sense, the erosion operation performed on A , using the structuring element B , shrinks the set A. As an example, suppose that A = {(0,2), (1,2), (2,217 (5,317 (6,3), (8,4)) (7,319 and
B = {(-L 11, (091))
..
,
..
". ..
_.
,
...._.. ..
,.L
.,.... . . ..,.
.... .
..
, .
.. . ... . .
".I..
_.....
.
282
Appendix
In order tofind € ( A , B ) we first determine all translates of B which are a subset of A . So
B
+ (1,1) = {(0,2),(1,2)1 c A
B t ( 2 , l ) = {(l,2),(2,2)} C A
B t (191) = ((6,319 (7,311 c A are the only translates of B which are subsets of A. Next we form a set consisting of the translationvalues (1, l), (6,2), and (7,2) applied to B. Thus,
Unlike the dilation operation,erosion in general does not satisfy the commutative or associative laws. The following identity holds true:
The erosion operation can also be found using Minkowski subtraction. The operation is denoted by A 8 B and is defined as
A t ( An 8, m B =) (n,m)EB
Thus, A 8 B is similar to A @ B , except that an intersection is employed in place of the union operation. We also have
€ ( A ,B ) = A 8 -B The third morphological operation we shall encounter is the opening operation. The openingof A by B , denoted by O ( A ,B ) is found by forming the union of all translates of B which are subsets of A . Thus, W , B )= ( Bt h m ) )
U
B+(n,m)CA
As in the discussion of erosion, B is said to be the structuringelement when forming O ( A ,B ) . Also, as in the erosion operation, the result
Appendix
283
cannot increase in cardinality when it is opened by the structure element B. For example, suppose that
A = {(-l,
01, (2,019
(4,119 (5,113(7,2),
(892))
B = {(-1,2),(0,2)1 and O ( A ,B ) is to be found. First, we find all translates of B which are subsets of A.
B t (5,
-1) = ((4, M 5 7 1)) c A
B t (890)= {(7,2),(8,2)) c A This step is similar to thefirst step in finding &(A,B ) , however the final step is different. We must union those translates of B which are subsets of A . Thus,
The opening operationsatisfies various equational constraints. Among them we mention that the opening is antiextensive, increasing, and idempotent. Respectively the following holds true:
O ( A , B )c A AcD
+ O ( A , B ) c O(D,B)
and
O(O(A,B ) , B=) O ( A ,B ) The first expression above shows that the opening operation produces a subset of A. The second property intuitively says that the opening of a larger set. is larger than the opening of a smaller set within the original set. The final relation says that successive openings by the same structuring element results in the same set. The final morphological operation is the closing of A by B . This operation is denoted hy C ( A , B ) , and again B is often called the structuring element. The lattice point ( n ,m ) is in C ( A , B ) if and only if ( B (P,a ) ) n A # 0 for any B ( p , q ) containing (n,m). Thus, in order to find C(A,B ) we find only those lattice pointswhich have the property that every
+
+
284
Appendix
translate of B containing them also has nonempty intersection with A. It follows that if ( n , m ) E A then ( n , m ) E C(A,B). That is the closing operation is extensive, i.e. A C C(A, B). Additionally, like the opening operation, the closing operation is increasing and idempotent. Respectively it is true that if
ACD
then C(A, B ) C C ( D ,B )
and
W A , B ) , B=) W , B ) Looking at a simple example, suppose that
and
B = {(0,2), (1,2)) To find the closing of A by B we must find all lattice points (n,m) having the property thatevery translate of B containing ( n , m ) also contains a point from the set A. We know that (0,2) E C(A,B ) (432) E C ( A ,B ) and
(692) E C@, B ) since these points are in A . Now every lattice point is located in just two translates of B since B has cardinality two. The point (n,m) = (5,2) is located in
B t (490) = {(4,2),(5,2)) and ( n , m ) = (5,2) is located in
Appendix
285
and so (5,2) E C(A,B ) . Thus, we have
Both the opening andclosing operations can be obtained from the basic operations of dilation and erosion. Specifically, we have
and
C ( A ,B ) = €'(D(A,- B ) , - B )
References [l] Giardina, C. R., “A Many Sorted Algebra Based Signal Processing Data Flow Language,” Fifth International Conference on Mathematical Modeling, September 1985.
S. P., Signal Processing, Image Processing and Pattern Recognition, Prentice Hall, NJ, 1990.
[2] Banks,
[3] Bochner, S. andMartin, W. T.,Several Complex Variables, Fifth Printing, Princeton University Press, NJ, 1967. [4] Castleman, K. R., Digital Image Processing, Prentice Hall, NJ, 1979. International, UK, 1991. [5] Dougherty, E. R. and Giardina,
C.R., Matrix Structured Image
Processing, Prentice Hall, NJ, 1987. [6] Dougherty, E. R. and Giardina, C. R., “Bound Matrix Structured Image Processing,” 1986 Conference on Intelligent Systems and Machines, Published in Conference Proceedings, Oakland Univ., Rochester, Michigan. [7] Giardina, C.R. and Dougherty, E.R., Morphological Methods in Image and Signal Processing, Prentice Hall, NJ, 1988.
[8]Grove, A.C., A n Introductionto Trunsform, Prentice Hall
the Laplaceand
The 2-
[g] Hochschild, G., The Structure of Lie Groups, Holden-Day, San Francisco, 19G5. [lo] Jacobson, N., Lie Algebras, Dover Publications, NY, 1979.
[l11 Jury, E.I., Theory and Application of The 2-TransformMethod, Krieger Publishing Co., FL, 1986. 287
288
References
[l21 Kolmogorov, A. N. and Fomin, S.V., Elements of The Theory of Functions and Functional Analysis, Vol. 1, Metric and Normed Spaces, Graylock Press, Rochester, NY, 1957.
[l31 Lim, Jae S., Two-Dimensional Signal and Image Processing, P T R Prentice Hall, NJ, 1990.
[l41 Rudin, W., Functional Analysis, McGraw-Hill, NY, 1973.
,
Index A
DIFLIP (diagonal reflection) operation, 48 digital signal, 1 dilation, 61 discrete Fourier transform (DFT),
ABS operation, 24 ADD operation, 17 annulus, 129
B
230
bound matrix, 8
domain induced operations, 35
C
F
Cauchy-Buniakovski-Schwarzinequality, 104 CLIP operation, 28 co-zero set, 59 convolution, 60 convolution theorem finite support, 126 summable functions, 144 Banach algebra properties, 79 bound matrix for, 65 finite support, 61 non-finite support, 73 parallel algorithm, 68 correlation, 103 correlation theorem, 146 cyclic group, 198
filtering, 83
D
H high-pass filter, 89 HOR (horizontal) operation,48
I inverse discrete Fourier transform (IDFT), 233 inverse Z transform, 117
K Kronecker Product (KRON), 254
L lattice points, 1 Laurent series, 129 low-pass filter, 84
M
DIAG transformation, 252 difference equation homogeneous, 169 non-homogeneous, 169 Z transform method, 179 difference equations, 159
macro, 20 MAX operation, 19 MIN operation, 23 minimal bound matrix, 12 Minkowski addition (dilation),
205 289
290
Index
MINUS operation, 21 modulo addition, 196 morphological operations closing, 209 dilation, 205 erosion, 206 opening, 208 moving average filter, 84 MULT operation, 18
N NINETY operation, 38
0
W wraparound convolution, 212 wraparound convolution theorem, 228 parallel algorithm, 216 wraparound correlation, 218 wraparoundcorrelationtheorem, 229 parallel algorithm, 221 wraparound set morphology, 204 wraparound signals, 187 co-zero set, 190 domain induced operations,
195
OFFSET operation, 26
range induced operations,
P
190
pattern matching, 107
R range induced operations, 17 REFLECT operation, 40 Reinhart domain, 129 S SCALAR operation, 26 shift operation, 35, 198 S Q operation, 20 support region, 10
T terms, 20 TRAN (translation) operation,
45 transfer function, 148 triple convolution (TCONV),
259
V VERT (vertical) operai,ion,48 Volterra convolution, 265
successor function, 195 wraparound Z transforms, 223
Z
Z transform, 115 finite support, 125