Sunteți pe pagina 1din 400

IMAGE ALGEBRA

G.X. Ritter

CENTER FOR COMPUTER VISION AND VISUALIZATION Department of Computer and Information Science and Engineering University of Florida Gainesville, FL 32611

copyright 1993, 1999, G.X. Ritter

PREFACE This document is an initial draft of the developing theory of image algebra. The primary objective of this treatise is to provide the reader with an introduction to the theory and foundations of image algebra. For readers interested in applications and image algebra specication of a wide variety of image processing transforms we recommend the Handbook of Computer Vision Algorithms in Image Algebra [46]. Since the discipline of image algebra is in its infancy and a state of ux, this document will undergo various changes before its completion in book format. The book will consist of eight chapters and will be largely self contained. The rst chapter will contain all the introductory material; e.g., what is image algebra all about, the history of image algebra, the people involved, organization of the book, etc. Chapters 2 and 3 contain basic background material dealing with point set theory, topology, and abstract algebra. Lack of this background is often a fatal stumbling block to understanding the underlying concepts of image algebra and the mathematics of computer vision in general. As to this initial draft, we recommend reading the introduction and then proceed to a quick overview of the basic concepts that dene image algebra, we suggest to start with Section 3.13 (Chapter 3) and then proceed directly to Chapter 4, referring to preceding sections for notation and theorems as the need arises.

iii

TABLE OF CONTENTS PREFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii 1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 ELEMENTS OF POINT SET TOPOLOGY . . . . . . . . . . . . . . . . . . . 5 2.1 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 The Algebra of Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 Cartesian Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 Families of Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.5 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.6 Induced Set Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.7 Finite, Countable, and Uncountable Sets . . . . . . . . . . . . . . . . . . . 15 2.8 Algebra of Real-Valued Functions . . . . . . . . . . . . . . . . . . . . . . . 17 2.9 Distance Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.10 Point Sets in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.11 Continuity and Compactness in . . . . . . . . . . . . . . . . . . . . . . 25 2.12 Topological Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.13 Basis for a Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.14 Point Sets in Topological Spaces . . . . . . . . . . . . . . . . . . . . . . . 33 2.15 Continuity and Compactness in Topological Spaces . . . . . . . . . . . . 35 2.16 Connected Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.17 Path-Connected Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 2.18 Digital Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.19 Digital Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 2.20 Path-Connected Sets in Digital Spaces . . . . . . . . . . . . . . . . . . . . 51 2.21 Digital Arcs and Curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 2.22 Weakly Connected Sets and -Connectivity . . . . . . . . . . . . . . . . 60 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 3 ELEMENTS OF ABSTRACT ALGEBRA . . . . . . . . . . . . . . . . . . . 69 3.1 Relations and Operations on Sets . . . . . . . . . . . . . . . . . . . . . . . 69 3.2 Groups and Semigroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 3.3 Permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 3.4 Isomorphisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 3.5 Rings and Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 3.6 Polynomial Rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 3.7 Vector Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 3.8 Linear Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 3.9 Linear Algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 3.10 Group Algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 3.11 Lattice Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
v

3.12 Minimax Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.13 Heterogeneous Algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.14 Generalized Matrix Products . . . . . . . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 IMAGE ALGEBRA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Images and Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Functional Specication of Image Processing Techniques . . . . . . . 4.3 Induced Operations on Images . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Properties of . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 Spatial Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6 Set-theoretic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Operations Between Different Valued Images . . . . . . . . . . . . . . . 4.8 Image-Template Products . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.9 The Algebra of Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.10 Template Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.11 Spatial Transformations of Templates . . . . . . . . . . . . . . . . . . . . 4.12 Multivalued Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.13 Multivalued Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.14 The Algebra of Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 TECHNIQUES FOR THE COMPUTATION OF GENERAL LINEAR TRANSFORMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Image Algebra and Linear Algebra . . . . . . . . . . . . . . . . . . . . . 5.2 Fundamentals of Template Decomposition . . . . . . . . . . . . . . . . . 5.3 LU Decomposition of Templates . . . . . . . . . . . . . . . . . . . . . . . 5.4 Polynomial Factorization of Templates . . . . . . . . . . . . . . . . . . . 5.5 The Manseur-Wilson Theorem . . . . . . . . . . . . . . . . . . . . . . . . 5.6 Polynomial Decomposition of Special Types of Templates . . . . . . . 5.7 Decomposition of Variant Templates . . . . . . . . . . . . . . . . . . . . 5.8 Local Decomposition of Templates . . . . . . . . . . . . . . . . . . . . . 5.9 Necessary and Sufcient Conditions for the Existence of Local Decompositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 TECHNIQUES FOR THE COMPUTATION OF THE DISCRETE FOURIER TRANSFORM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Linear Separability and the Discrete Fourier Transform . . . . . . . . . 6.2 Block Structured Matrices and the Fourier Matrix . . . . . . . . . . . . 6.3 Shufe Permutations and the Radix Splitting of Fourier Matrices . . . 6.4 Radix-2 Factorization, Perfect Shufes, and Bit Reversals . . . . . . . 6.5 The Fast Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . .

127 133 135 142 143 143 147 150 155 161 170 175 177 186 190 198 202 208 210 217 219 219 221 227 234 237 240 259 265 267 280 283 283 291 295 301 306

vi

6.6 Radix-4 Factorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.7 Radix-4 FFT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 TRANSLATION INVARIANT TEMPLATES ON FINITE DOMAINS . . 7.1 Translation Invariant Templates and Toeplitz Matrices . . . . . . . . . 7.2 Circulant Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 Circulant Templates and Polynomials . . . . . . . . . . . . . . . . . . . . 7.4 G-Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5 Group Algebras and G-Templates . . . . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 INVERSION OF TRANSLATION INVARIANT TEMPLATES . . . . . . 8.1 The Radon Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Invertibility of the Radon Transform and G-Templates. . . . . . . . . . 8.3 Determinants and Inversion . . . . . . . . . . . . . . . . . . . . . . . . . . 8.4 A Class of Easily Invertible Templates . . . . . . . . . . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 DECOMPOSITION AND INVERSION OF TEMPLATES OVER HEXAGONALLY SAMPLED IMAGES . . . . . . . . . . . . . . . . . . . . 9.1 Generalized Balanced Ternary . . . . . . . . . . . . . . . . . . . . . . . . 9.2 GBT2 Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.3 Images on Hexagonal Arrays and Polynomial Rings . . . . . . . . . . Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

313 317 322 323 323 327 333 340 343 349 351 351 358 367 373 381 383 383 387 390 392 393

vii

CHAPTER 1 INTRODUCTION Since the eld of image algebra is a recent development it will be instructive to provide some background information. In the broad sense, image algebra is a mathematical theory concerned with the transformation and analysis of images. Although much emphasis is focused on the analysis and transformation of digital images, the main goal is the establishment of a comprehensive and unifying theory of image transformations, image analysis, and image understanding in the discrete as well as the continuous domain [45]. The idea of establishing a unifying theory for the various concepts and operations encountered in image and signal processing is not new. Over thirty years ago, Unger proposed that many algorithms for image processing and image analysis could be implemented in parallel usingcellular arrayCellular array computer computers [61]. These cellular array computers were inspired by the work of von Neumann in the 1950s [63, 64]. Realization of von Neumanns cellular array machines was made possible with the advent of VLSI technology. NASAs massively parallel processor or MPP and the CLIP series of computers developed by Duff and his colleagues represent the classic embodiment of von Neumanns original automaton [2, 18, 16, 17, 20]. A more general class of cellular array computers are pyramids and Thinking Machines Corporations Connection Machines [59, 60, 25]. In an abstract sense, the various versions of Connection Machines are universal cellular automatons with an additional mechanism added for non-local communication. Many operations performed by these cellular array machines can be expressed in terms of simple elementary operations. These elementary operations create a mathematical basis for the theoretical formalism capable of expressing a large number of algorithms for image processing and analysis. In fact, a common thread among designers of parallel image processing architectures is the belief that large classes of image transformations can be described by a small set of standard rules that induce these architectures. This belief led to the creation of mathematical formalisms that were used to aid in the design of special-purpose parallel architectures. Matheron and Serras Texture Analyzer [28], ERIMs (Environmental Research Institute of Michigan) Cytocomputer [32, 57, 31], and Martin Mariettas GAPP [7, 5, 6] are examples of this approach. The formalism associated with these cellular architectures is that of pixel neighborhood arithmetic and mathematical morphology. Mathematical morphologyMathematical morphologyMorphology is the part of image processing concerned with image ltering and analysis by structuring elements. It grew out of the early work of Minkowski and Hadwiger [39, 40, 22], and entered the modern era through the work of Matheron and Serra of the Ecole des Mines in Fontainebleau, France [37, 52, 53, 54]. Matheron and Serra not only formulated the modern concepts of morphological image transformations, but also designed and built the Texture Analyzer System. Since those early days, morphological operations have been applied from low-level, to intermediate, to high-level vision problems. Among some recent research papers on morphological image processing are Crimmins and Brown [8], Haralick et al. [24, 23], Maragos and Schafer [34, 36, 35], Davidson [14, 13], Dougherty [15], Goutsias [51, 21], and Koskinen and Astola [30]. Serra and Sternberg were the rst to unify morphological concepts and methods into a coherent algebraic theory specically designed for image processing and image analysis. Sternberg was also the rst to use the term image algebra [56, 58]. In the mid 1980s, Maragos introduced a new theory unifying a large class of linear and nonlinear systems under the theory of mathematical morphology [33]. More recently, Davidson completed the mathematical foundation of mathematical morphology by formulating
1

its embedding into the lattice algebra known as Mini-Max algebra [11, 12]. However, despite these profound accomplishments, morphological methods have some well-known limitations. For example, such fairly common image processing techniques as feature extraction based on convolution, Fourier-like transformations, chain coding, histogram equalization transforms, image rotation, and image registration and rectication are with the exception of a few simple cases either extremely difcult or impossible to express in terms of morphological operations. The failure of a morphologically based image algebra to express a fairly straightforward U.S. government-furnished FLIR (forward-looking infrared) algorithm was demonstrated by Miller of Perkin-Elmer [38]. The failure of an image algebra based solely on morphological operations to provide a universal image processing algebra is due to its set-theoretic formulation, which rests on the Minkowski addition and subtraction of sets [22]. These operations ignore the linear domain, transformations between different domains (spaces of different sizes and dimensionality), and transformations between different value sets (algebraic structures), e.g., sets consisting of real, complex, or vector valued numbers. The image algebra discussed in this text includes these concepts and extends the morphological operations [45]. The development of image algebra grew out of a need, by the U.S. Air Force Systems Command, for a common image-processing language. Defense contractors do not use a standardized, mathematically rigorous and efcient structure that is specically designed for image manipulation. Documentation by contractors of algorithms for image processing and rationale underlying algorithm design is often accomplished via word description or analogies that are extremely cumbersome and often ambiguous. The result of these ad hoc approaches has been a proliferation of nonstandard notation and increased research and development cost. In response to this chaotic situation, the Air Force Armament Laboratory (AFATL now known as Wright Laboratory MNGA) of the Air Force Systems Command, in conjunction with the Defense Advanced Research Project Agency (DARPA now known as the Advanced Research Project Agency or ARPA), supported the early development of image algebra with the intent that the fully developed structure would subsequently form the basis of a common image-processing language. The goal of AFATL was the development of a complete, unied algebraic structure that provides a common mathematical environment for image-processing algorithm development, optimization, comparison, coding, and performance evaluation. The development of this structure proved highly successful, capable of fullling the tasks set forth by the government, and is now commonly known as image algebra. Because of the goals set by the government, the theory of image algebra provides for a language which, if properly implemented as a standard image processing environment, can greatly reduce research and development costs. Since the foundation of this language is purely mathematical and independent of any future computer architecture or language, the longevity of an image algebra standard is assured. Furthermore, savings due to commonality of language and increased productivity could dwarf any reasonable initial investment for adapting image algebra as a standard environment for image processing. Although commonality of language and cost savings are two major reasons for considering image algebra as a standard language for image processing, there exists a multitude of other reasons for desiring the broad acceptance of image algebra as a component of all image processing development systems. Premier among these is the predictable inuence of an image algebra standard on future image processing technology. In this, it can be compared to the inuence on scientic reasoning and the advancement of science due to the replacement of the myriad of different number systems (e.g., Roman, Syrian, Hebrew, Egyptian, Chinese, etc.) by the now common Indo-Arabic notation. Additional benets provided by the use of image algebra are
2

The elemental image algebra operations are small in number, translucent, simple, and provide a method of transforming images that is easily learned and used; Image algebra operations and operands provide the capability of expressing all image-to-image transformations; Theorems governing image algebra make computer programs based on image algebra notation amenable to both machine dependent and machine independent optimization techniques; The algebraic notation provides a deeper understanding of image manipulation operations due to conciseness and brevity of code and is capable of suggesting new techniques; The notational adaptability to programming languages allows the substitution of extremely short and concise image algebra expressions for equivalent blocks of code, and therefore increases programmer productivity; Image algebra provides a rich mathematical structure that can be exploited to relate image processing problems to other mathematical areas; Without image algebra, a programmer will never benet from the bridge that exists between an image algebra programming language and the multitude of mathematical structures, theorems, and identities that are related to image algebra; There is no competing notation that adequately provides all these benets.

The role of image algebra in computer vision and image processing tasks and theory should not be confused with the governments Ada programming language effort. The goal of the development of the Ada programming language was to provide a single high-order language in which to implement embedded systems. The special architectures being developed nowadays for image processing applications are not often capable of directly executing Ada language programs, often due to support of parallel processing models not accommodated by Adas tasking mechanism. Hence, most applications designed for such processors are still written in special assembly or microcode languages. Image algebra, on the other hand, provides a level of specication, directly derived from the underlying mathematics on which image processing is based and that is compatible with both sequential and parallel architectures. Enthusiasm for image algebra must be tempered by the knowledge that image algebra, like any other eld of mathematics, will never be a nished product but remain a continuously evolving mathematical theory concerned with the unication of image processing and computer vision tasks. Much of the mathematics associated with image algebra and its implication to computer vision remains largely unchartered territory which awaits discovery. For example, very little work has been done in relating image algebra to computer vision techniques which employ tools from such diverse areas as knowledge representation, graph theory, and surface representation. Several image algebra programming languages have been developed. These include image algebra Fortran (IAF) [68], an image algebra Ada (IAA) translator [65], image algebra Connection Machine *Lisp [67, 19], an image algebra language (IAL) implementation on transputers [9, 10], and an image algebra C++ class library (iac++) [66, 62]. Unfortunately, there is often a tendency among engineers to confuse or equate these languages with image algebra. An image algebra programming language is not image algebra, which is a mathematical theory. An image algebra-based programming language typically implements a particular subalgebra of the full image algebra. In addition, simplistic implementations can result in poor computational performance. Restrictions and limitations in implementation are usually due to a combination of factors, the most pertinent being development costs and hardware and software environment constraints. They are not limitations of image algebra, and they should not be confused with the capability of image algebra as a mathematical tool for image manipulation.
3

Image algebra is a heterogeneous or many-valued algebraHeterogeneous algebra in the sense of Birkhoff and Lipson [3, 45], with multiple sets of operands and operators. Manipulation of images for purposes of image enhancement, analysis, and understanding involves operations not only on images, but also on different types of values and quantities associated with these images. Thus, the basic operands of image algebra are images and the values and quantities associated with these images. Roughly speaking, an image consists of two things, a collection of points and a set of values associated with these points. Images are therefore endowed with two types of information, namely the spatial relationship of the points, and also some type of numeric or other descriptive information associated with these points. Consequently, the eld of image algebra bridges two broad mathematical areas, the theory of point sets and the algebra of value sets, and investigates their interrelationship. In the sections that follow we discuss point and value sets as well as images, templates, and neighborhoods that characterize some of their interrelationships.

CHAPTER 2 ELEMENTS OF POINT SET TOPOLOGY In order to read anything about our subject, the reader will have to learn the language that is used in it. We shall try to keep the number of technical terms as small as possible, but there is a certain minimum vocabulary that is essential. Much of the standard language is taken from point set topology and the theory of algebraic systems, subjects with which we are not concerned for their own sake. Both subjects are, indeed, independent branches of mathematics. Point set topology and set theory have their own basic undened concepts, subject to various axioms; one of these undened concepts is the notion of a set itself. It is not our intention to formally dene the required axioms that govern the use of sets but deal with sets on an intuitive basis.

2.1 Sets Intuitively, we think of a set as something made up by all the objects that satisfy some given condition, such as the set of integers, the set of pages in this book, or the set of objects named in a list. The objects making up the set are called the elements, or members, of the set and may themselves be sets, as in the case of all subsets of a given set. We adopt the convention of denoting sets by capital letters and the elements of sets by small letters. The following is a brief summary of some of the things we shall simply assume about sets.

Throughout this book, the notation of symbolic logic will be used to shorten statements. If p and q are propositions, then the statement means that p implies q or, equivalently, if p is true, then q is true. The statement is read: p if and only if q, and means that p and q are logically equivalent; i.e. and . An expression that becomes a proposition whenever values from a specied domain of discourse are substituted for is called a propositional function or, equivalently, a condition on ; and p is called a property, or predicate. The assertion has property p means that is true. Thus, if is the propositional function is an integer, then p denotes the property is an integer, and is true, whereas is false. The quantier there exists is denoted by , and the quantier for each is denoted by . The assertion reads for each x there exists a y such that for each z, is true. A set may be described either by giving a characterizing property or by listing the elements. The standard way to describe a set by listing elements is to enclose the designations of the elements, separated by commas, in braces, e.g. {1,2,3,4,5}. In terms of a characterizing property this set could be written
5

2PTcYdFcYbX3 ) C

2.1.2

There is exactly one set with no elements. It is the empty set, and is denoted by the symbol

2 5) 760 2 ) 040

2 ) 310

2.1.1

A set X is comprised of elements, and if is one of the elements, we shall denote this fact by . The notation shall denote the fact that is an object which is not an element of X.

! 

  

('  %$#  "

2 TY FY )  U T I I G F B ASaS`X3WVDC SRQPH7EDC

231)0  &

2 5@8) AA93

  

, read X is a subset of Y, signies that each element of X is an element of Y, that is, . Equality is not excluded we call X a proper subset of Y whenever and . The set whose elements are all the subsets of a given set X is called the power set of X and is denoted by . The following statements are evident:

Of these, 2.1.5 is very important: the equality of two sets is usually proven by showing that each of the two inclusions is valid. Throughout this text, various familiar sets of numbers will occur naturally. For convenience, we shall now reserve:

to denote the set of integers,

the set of rational numbers,

the set of real numbers,

The notation , and will refer to the set of all positive integers, the set of all negative integers, the set of all positive real numbers, and the set of all negative real numbers, respectively. Observe that the number 0 is not an element of any of these four sets. The set whose elements are the number 0 and the positive integers will be denoted by . Thus, .

Three nite subsets of

that will occur throughout much of this text are

where

.
6

~ e w t w t e ~e gw vv v  vv Suuv Pu q v v db$aAv S0uv  q  vv 0q u v cuv

x {s

q g}| ~e w v v b1v v

u sv x q v u zcyawbq

u q

and

the set of complex numbers.

t f pW3ge

v $(pf

x v pd$hox

2.1.8

2.1.7

v m

2.1.6

for every set X. and . , and .

v ex

x kjv

x w ihv

2.1.5

if and only if both

and

g hv

g fx

x edv

2.1.4

If

2.1.3

for every set X. and , then (i.e. is transitive). .

x v

x yw

x w v s$1r1f x f s v fr h x v sxHf4r sv1f fr h v

If

and Y are sets, then .

will mean that

s fr 3X3p

as , which reads the set of all integer less than 6.

such that

, where p denotes the property is a positive and Y have the same elements; that is,

ts fr p h f u310qige

2.2 The Algebra of Sets Intuitively, an algebra is simply a collection of nonempty sets together with a nite number of operations (rules) for transforming one or more elements of the sets into another element of one of the sets. The formal denition of an algebra will be given in Chapter 3. In this section we dene the elementary set-theoretic operations and present a list of standard formulae which are convenient in symbolic work. When dening operations on and between sets it is customary to view the sets under consideration as subsets of some larger set U, called a universal set or the universe of discourse. For instance, in plane geometry, the universal set consists of all the points in the plane.

2.2.1

Example: Consider the equation

Two sets X and Y are called disjoint if they have no elements in common, that is, if . are disjoint. Obviously, If , then the complement of X (with respect to U) is denoted by and is dened as . The difference of two sets is denoted by and dened as . Note that . For future reference we list below (2.2.1) some of the more important laws governing operations with sets. Here X, Y, and Z are subsets of some given universal set U. Because of associativity, we can designate simply by . Similarly, a union , can be written as because, by (or intersection) of four sets, say associativity, the distribution of parentheses is irrelevant, and by commutativity, the order of terms plays no role. By induction, the same remarks apply to the union (or intersection) of any nite number of sets. The union of n sets, , is written , and the intersection is .

W`

, (iii)

, (iv)

, and (v)

2.2.3

The statements (i) , (ii) are all equivalent.

The relation between

, and

is given by:

&

V H

' V

iy

$ $ H m

$ A

The intersection of X and Y, written to both X and Y. Thus, .

, is dened as the set of all elements that belong For example, and

2.2.2

Denition. Let X and Y be given sets. The union of X and Y, written set whose elements are either in X or in Y (or in both X and Y). Thus,

, is dened as the

whose solution set is the set , where universal set. However, if is the universal set, then

gPm f {$

&aXgP'$19Ap4 $ P 4uS gd $A E
, provided that . is the

g c#f

cPX

'  Hgm V # H paVb

Identity Laws

Idempotent Laws Complement Laws

Associative Laws Commutative Laws Distributive Laws DeMorgans Laws

Figure 2.2.1 Laws of Operations with Sets

2.3 Cartesian Products Let and

. The set of distinct ordered pairs

in which the rst component of each ordered pair is an element of X while the second component is an element of Y is called the Cartesian product of X and Y. Ordered pairs are subject to the one condition: ; in particular, . Since the Cartesian product is one of the most important constructions of set theory enabling us to express many concepts in terms of sets we dene it formally.

Scm

2.3.2

as the coordinates of points on the x-axis and Example: View the elements of the elements of as the coordinates of points on the y-axis. Then the elements of are the rectangular coordinates of the twelve points shown (Figure 2.3.1).

$cV9

2.3.1

Denition. Let X, Y be two sets. The Cartesian product of X and Y, denoted by set of all ordered pairs .

En mp&Hb

0qqnD

&o

nm pW $m p $ Em b$m yE m o!$dcd c uPcd c7cd Scd Sc cc c9 &


, is the

7u%

H bm H m

EH pb$m

1dcgy

$ p

0o!$c c

$p$m

n $m pa6

pHm nW p$m ci

If in the above example we would have let instead, then the elements of the set are all the points in the rst quadrant having integral coordinates. Similarly, when , the set consists of all pairs of real numbers and , and represents -coordinate plane. the usual
A 4 F#9EDCB@9 ' A G e fd v 0 i i i 0 s uQuRQYtrq d T Tc G G e fd e fd 45537RQphg6' T ( 0 i i i 0 G ( d d Tc Tc T 4 G X T I I I G ' W&ba`YW9SQRPV#9U&SRQPH# T I I I G

The Cartesian product of three sets X, Y, and Z is dened by of n sets by induction: also denoted by
d 

, and that . The Cartesian product of n sets is


d (

; an element of

is written

and

is called the ith coordinate. -coordinate plane, also


4 2 0 ( `7w'

If

for

, then we dene

. In particular, the
x 1y

The notion of Cartesian product extends the set of elementary set-theoretic operations. In comparison and , however, the Cartesian product is neither commutative nor associative: in general, and . Also, (or both). The relation between the Cartesian product and the operations of union and intersection can be summarized as follows:
4 A HDb#9H& ' 4 ' 4 A '

2.3.3

. .

2.4 Families of Sets If for each element of some nonempty set there corresponds a set , then the collection is called a family of sets, and is called an indexing set for the family. We also write for . If the indexing set , then the indexed family is called a sequence (of sets) and may also be denoted by .
9
q hm d j d e d G e rd fsj d e  p@ j o g W&9 f d e j g kih n m j d Qhd l# f %d e e

YtU

4 A H9UH& ' 4 ' 4 A '

4 A @" '

A 4 b#9'

&

to

x F!

known as two dimensional Euclidean space, is denoted by consisting of all points having integral coordinates.
x !

, while

denotes the discrete subset of

 

4 2 0 ( 531)'

Figure 2.3.1 The Cartesian product

(1,1)

(2,1)

(3,1)

(1,2)

(2,2)

(3,2)

(1,3)

(2,3)

(3,3)

(1,4)

(2,4)

(3,4)

viewed as a subset of the plane.

! ! &%"$#

   4 2 0 ( 8716' ! " 

The notion of union and intersection can be generalized to any arbitrary indexed family of subsets of some universal set U.
y x w v u Qav SQt w u 1fQDUQt y x hhv u w v #u

2.4.1

For a sequence

of sets we also use the notation


QR u F u 1 u gh 3QR u u 1

to denote union and intersection, respectively.

. Then
v u

It follows from the denition that the union and intersection of a family of sets does not depend on how the family is indexed. That is, union and intersection are unrestrictive commutative and associative. The complement laws, distributive laws, and DeMorgans laws also hold for these generalized operations. In particular, we have
~ t y x |av y x |av v u ) x Qav y x hhv v#u z z yhxhv y x hhv v u pYv u z ) y x hhv y x hhv z |v u z ) y x |av yhxhv v u h y x hhv w v Qt u

2.4.3

If

is any family of subsets of some universal set U and


v u

10

u

Wu

hx z

7u F

y x hhv z

b kQh

shv

u iW%{ u }

y x |av

v u

gh

ga

uSuu

y|xav

Uu

let

, then

u } 9{

Example 2.4.2 can be generalized to the following useful fact: let X be any set and, for each be a subset of X such that . Then .

w SQt

y x hhv

w hC

w hb|t 

 W&}

2.4.2

Example:
}  &b|t

Let

For each

w &}

#upYRl

v u } {  #9&|t ~ } {

y x hhv

The intersection is denoted by

and is the set

w &}

5YFQfFabYv

u } {  9&|t ~ } {

W

y x hhv z

Denition. Let is denoted by

be a family of subsets of a universal set U. The union of this family and is the set

, let

2.5 Functions The notion of a function (or map) is basic in all mathematics. Intuitively, a function f from a set X into a set Y, written , is a rule which assigns to each some element of Y, where the assignment of to by the rule f is denoted by or . However, we shall dene the notion of a function formally in terms of the primitive concept set by identifying functions with their graphs.
r

2.5.1

is Denition. Let X and Y be two sets. A function f from X to Y, denoted by a subset with the property: for each , there is one, and only one, such that . The set of all functions from X into Y will be denoted by . Thus .
P #u@huY3ggbWb| t C87r

Throughout much of this book we shall specify functions by assignment rules (as in (iii)) and call the set , where , the graph of the assignment rule or, simply, the graph of f. Note that under this denition the statement the graph of f is synonymous with the statement the function f. We will also periodically refer to certain special properties and types of functions. In particular, it will be important to distinguish between the following types of functions:
S

2.5.2

is called the projection onto the jth coordinate.


11

H C E C IGFD

6 B

6 3 212 6 121 ' 6 5 ))) ))) 3 ))) ' 4 210 (

2.5.6

7u

Given sets
6

, the function

, where

, dened by

% & % #

" $#

 

@V)w

' 6 9 3 A@8 9 75

"

!

5%

2.5.5

The function with the property on X and will be denoted by . If , the function called the inclusion of A into X.

is called the identity function given by is

2.5.4

A function constant function.

assigning all

to the same single element

F)wh U g6

is called a

   

i&

 

i&

)w

2.5.3

A function is said to be onto (or f is a function from X onto Y) if every corresponds to an evaluation for some ; i.e. if .

8 w)w

8 w

)w

A function evaluations; i.e.

is said to be one-to-one (or 11) if distinct elements in X have distinct or, equivalently, .

V6w

WY

C#Yt

99

aw)w"WS 8w6Y

3u

CWYtk6w

(iii)

is a function

9bhBY716Yt

(ii)

Y&9bYBY"WYb`w6h

(i)

. Observe that this function is completely specied by the rule or .

or, equivalently, by either

We write for and say that is the value f assumes at , or that , then the set dened by evaluation of f at . For instance, dening
E CB 9`71 )w

Bt

#)w



is the

induce new functions

that are dened by

, respectively. The functions functions of f and g, respectively.

are called the ith-coordinate

dened by

The difference between 2.5.9 and 2.5.10 is in the denition of an extension and the extension of the function f. Observe also that in 2.5.10, . The following examples should help in clarifying the important concepts of one-to-one and onto functions. The function dened by is not onto since, for example, for any . However, f is one-to-one since . On the other hand, the dened by is onto since for every (namely function ) such that . But is not one-to-one since and . Given two functions and , then the composition is dened by . The following theorem indicates a simple method for establishing that a given function f (respectively ) is one-to-one (respectively onto).

2.5.11 Theorem. Let

12

PvG } Pr Q v Pr ot

As a simple illustration of Theorem 2.5.11 we show that for any function , where and is one-to-one. Let

f e ff e f f p e ekaUaiYpaai fmpe X r P r |o e f f p e ff e f e f f p e f p e f iuiYkpaifmYipamUY~iaip

f e p 0d P v Xr g `p X v Pr P r b ff e f f p sd4mYkpamil Pr Fv`p v Xr Fh` p X v Pr e s kafgd f e ef mkd Dt e st( r ef wmka r ( v r e fBt~ e f r tr4Waip ef f e f 4agaip v r ~p p f v e v e x R wpGx u

and

satisfy

. Then f is one-to-one and g is onto.

Proof: Since that f is one-to-one. The function such that

is onto since for any .

, we have , namely , Q.E.D.

p v

is called the extension of f to g over X relative to Y. We will use the symbol extension.

to denote this

, the function be the

X v Pr FG

2.5.10 Let

. Given functions

and

, then the function

X v Pr I

2.5.9

and , then any function In the reverse direction, if property , is called an extension of f over X relative to Y.

p P r c f ptma pspctmp m r f e f Xhr v Xvp pr p e P p e v x u X p ovhrp P~tp q f } z p e v X~p|{yx wp x wp v uptsfmik r r f pS X v Pr odn p

P q Gp

2.5.8

Given a function (i.e. the function . Thus,

and a subset , then the function f considered only on A ) is called the restriction of f to A and is denoted by . with the

e f haka rw yx hSTTTS i211gf

q d`w q p yx ff STTTSf mk V i211im Q l q P Q q v P y xw ff V VpSTTTSfQ Q e f V STTTSQ d`jUggig2i211i2d2`ip hgei1121dp V q X Q q v q P Q q p r hSTTTSf e c iU112r q a121Dr q p y xw hSTTTSf e c V qV uP v G `FaX Iuts1q p P r q yxw q v q P r e db c V XSTTTSQ S V PSTTTSQ aU112`YX W(U1212RP ff S e f mkmiYiymp } P e &X

2.5.7

Suppose there exist functions

, and X are nonempty sets, and . Then the families

X v Pr aup

The fact that the composite of one-to-one and onto functions is again a one-to-one and onto function follows from the next theorem.

(i) If f and g are onto, then

(ii) If f and g are one-to-one, then

(ii) Suppose one-to-one. But then

2.6 Induced Set Functions

In addition, f also induces a function

The set

It is common practice to let f(A) and denote the evaluation and , respectively. Since in most cases the context of discussion avoids possible misinterpretation, this economizes notational overhead. Although we shall follow this convention to some extent, we point out that in machine implementation and algorithm description the maps , and must be distinguished as they do represent different processes.

2.6.1

Example: Let Then

be dened by and

, and

The induced set-valued functions and are called set functions since they are functions of sets into sets. Induced set functions possess various properties. In particular we state:

13

i

uk u iY u Gsai(`sWuk D`Y Y ssumuiY g| ` i`e` |D me`oan stRaiY`& i`e` ik` saiY1~Yk`e` Yi`ee` Yilg` `

If f, denoted by

, then the set X is called the domain of f and is denoted by , is dened as . It follows that , and that is onto. , f induces a function

Since for each

is called the inverse image of B.

 t eDm UekaumYka gi4aiil ( mYkam4l aiY | e s

Proof: (i) Let such that

. Since . But then

Wei 1 1 tWui Y  tW F d i W0 & dai

o( saWR s

2.5.12 Theorem.

Suppose

and

. is one-to-one.

is onto.

is onto,

such that . Since f is onto, . Therefore, is onto.

, i.e. . Then since is since f is one-to-one. Accordingly, is one-to-one. Q.E.D.

dened by

D Y

projection onto the rst coordinate. Then one-to-one (and is onto).

is

. Hence, by Theorem 2.5.11, f is

. The range of ,

dened by

  %

   4    ` ( ' 4 2 ` 2   "  P ` %% ( ' %% `  # ( #H !  ` XP"  `   !  ` i ` 0 n


,

` s !  ` st ` yHxw4Bs%tvtTiWi ` s Y rpiD Y h s Y ( F C 5 C A 5 u( q (  h q ( h b b d b ` gfecaY XWIGUT@GRGHB@Q80P5H V C 8 C S7F C 5 C A 7  F C 8 C A7F C 5 C A 7  GIGHB@GED4B@98654 (


Let , and ,

  i %% ' %%   2 2 3" 1&i0 %% )%& %%  ( '  # ! k #    $"


,

 

2.6.4

2.6.2

Of the two induced set functions, is the more important one as it is much more well-behaved in the sense that it preserves the elementary set operations.

2.6.3

The following important relationship between the two set functions is also simple to verify: The following example shows that the inclusion (iii) cannot, in general, be replaced by equality. (i) Proof: We only prove (iv); the proofs of (i) through (iii) are just as simple. Observe that (iv) (iii) (ii) Theorem. Let (iii) (ii) Theorem. Let (i.e. the x-axis). Since Example: (i) , and , and , the projection onto the rst coordinate . any family of subsets of Y. Then: be any family of subsets of X. Then: Q.E.D.

    i g ` E5 X w e  6 ` j5 X  i ge      w f fTd5 0 X  Td5  X %%U ` tE5     ` E5 X w e  6 ` j5 X i g i g e        w hf fTd5 0 X  Td5  Xp %%U` tE5

14

2.6.5

Theorem. (i) (ii)

Let

, and

The inclusions (i) and (ii) cannot, in general, be replaced by equality.

2.6.6

Example:

Let A and

be as in Example 2.6.3. Then

is onto, then equality holds in 2.6.5 (ii). In particular, f is onto . Similarly, f is one-to-one the set consists of a single there is associated a function element. Thus, with each one-to-one function , called the inverse of f, which is dened by , where ; that is, . For example, if is given by , then and, hence, . Similarly, and, in general, . If is both one-to-one and onto, then the inverse of f is a function since . This differs from even though, as pointed out earlier, it is standard practice to use the same functional notation. There are several useful observations concerning one-to-one and onto functions. Suppose that is one-to-one and onto. Then is one-to-one and onto, and . In addition, equality holds in 2.6.5 (i) and (ii). If we also have a one-to-one and onto function , and are one-to-one and onto functions. This follows from Theorem 2.5.12 and then both the fact that .

2.7 Finite, Countable, and Uncountable Sets Two sets are said to be equivalent if there exists a one-to-one and onto function . Hence the idea that the two sets X and Y are equivalent means that they are identical except for the names of the elements. That is, we can view Y as being obtained from X by renaming an element in X with the name of a certain unique element in Y, namely . If two sets X and Y are nite, then they are equivalent if and only if they contain the same number of elements. Indeed, the idea of a nite set X is the same as saying that X is equivalent to a subset of the natural numbers for some . To make this and related ideas more precise, we list the following denitions involving a set X and .

2.7.1

o l y G%ax k p 3Pm0k ~ } m o pl yx Ua0k p o ml )y%k ~ 60} k za 6a0k ~ }yx @0k yx 1Pak ~ }yx ~ } y ~ } y x @ 1%9a0x k !P%a0k d 0k gx4k ~ } o l ~ ~ y ~ y 3Pm0} k uzi@ 9} ax k @ } @x k ~ % y }9 ax k  @6} ax k ~ y m 3Pm0} k o ~ l yax k p o U)k ml ~ }y @@0x k ~ m} k vz X p v qs zv y p o ml 3k 6~!v } @x k k X l ~ } ~ l y ~ y TGiD4B@GED4B@96 &GRGE} axy 9~Pr} y } axy pr

If

Denition.

A set X is or

nite if and only if either innite if it is not nite,

such that X is equivalent to

denumerable if and only if it is equivalent to uncountable if it is not countable.


15

countable if and only if it is nite or denumerable, and

% o pl y y k a ~x ax k }

09@Q1

p o ml y)Rk

0QQ1 ~ } 60k

p s u)v

m o p y 1l ax k

0f$c

v s ~ y k{ !v } ax Hk  ~ }k { yxk s 16r0||z0wgr m s p o ml utr qnk r m y

. Then:

yadB{ax0k x y y ~k{ ax 0H} k{ y ~ k { ax f} |

p o ml 13k

Some properties of countable sets are listed in the next example.

2.7.2
(i) (ii) (iii) (iv) (v) (vi) (vii)

Example: X is countable If If If If

If X is equivalent to Y and Y is countable, then X is countable.

and Y is countable, then X is countable. is onto and X is countable, then Y is countable. is one-to-one and Y is countable, then X is countable. is a collection of countable sets, then

is countable and

i.e. the countable union of countable sets is countable.

and the set of Assuming Example 2.7.2 as a fact, it is not difcult to show that the set rational numbers are countable sets. First, note that the function dened by and , where is one-to-one and onto. Thus, is equivalent to and hence countable. Now for each dene . Then, since is countable, it follows from 2.7.2 (vii) that is countable. To show that

is countable, dene

by

Then f is obviously onto. Hence by 2.7.2 (v), is countable. We wish to attach a label card(X) to each set X, called the cardinality of X, which will provide us with a measure of the size of X. In particular, the label should distinguish in some way if one or two given sets has more members than the other. Assigning to a set X equivalent to will satisfy this requirement for nite sets (using the convention if and only if ), for if Y is equivalent to X, then it follows from Theorem 2.5.12 that Y is also equivalent to . Therefore, and hence, . As can be seen from the nite case, counting is not needed for the purpose of determining whether or not two sets have the same cardinality. We need only to pair off each member of one set with a member of the other set and see if any elements are left over. Thus the notion of two sets having the same size can be formalized as follows: two sets X and Y have the same cardinality if and only if they are equivalent.

2.7.3
(i)

Examples: and be dened by . It is easy to verify Let that f is one-to-one and onto. Thus X and have the same cardinality even though X is a proper subset of . This is not possible for nite sets. No nite set can be equivalent to one of its proper subsets. Any open interval since the function and onto. Furthermore, by dening dened by is equivalent to the open interval , is one-to-one by it can be seen that (1,1)

(ii)

16

U060

9

x @%1

I %

6 d 9EQ nP fQ dd3 @ d  9@ GRGIHtEE%tn  0 %r

f!UP RuQ T@60 I0 t T06u U @9Q%ve tw&4%GI  t

rf060

wX @%c

@%c& @%1

g3

u  &w@ i 4 @%1

g$v q G q D u

is countable. such that X is equivalent to Y.

is countable;

09Q1 0QQc

is equivalent to . Thus, has just as many points as

In order to compare the size of two sets, we make the following denition:

2.7.4

Denition. For two sets, X and Y, we write function from X to Y.

Note that we use the symbol rather than the word smaller. Obviously, if , then . However, the existence of a one-to-one function from X to Y does not exclude the possibility that there exists also a one-to-one and onto function from X to Y, as Example 2.7.3 (i) and (ii) show. Example 2.7.2 (iv) shows that, roughly speaking, countable innite sets represent the smallest innity: No uncountable set can be a subset of a countable set. In fact, it can be shown that and [27]. Since , . Thus, is or , which are of the same innite size. in a sense much larger than

2.8 Algebra of Real-Valued Functions If (i.e., ), then f is called a real valued function on X. Many of the common arithmetic operations of are inherited by . We provide a quick review of these inherited operations as they are of fundamental importance in image algebra. Specically, let , and |k| denote the absolute of k. Then we dene:

2.8.1

Observe that is dened by . Note also that

is not the composition and by , but

dened previously. For example, if , then , while .

It is also convenient to identify the real number with the constant function dened by . In particular, if , then we dene scalar addition of f by k as the function , where . Thus, . The set , together with the above operations, possesses various important properties, some of which are included in the next theorem. Theorem. The set together with the operations dened in 2.8.1 satises the following properties: 1. The operation of addition of functions f and g satises:

% y  y e ' y%s y gsut`d(be x%3w

2.8.2

17

C GF 6

h ye 'u y tE}8Ee u y% e '% %u y IbTb4E1e p 6i %u y B48be f u ge p 6i 6 f u '%  r)34 p 6i ln0~ f pu e s s X' s s u~e 0f}&te e s ' s w| ' % %ss 4B}d3bQ3e zy ' % % {#g3isp1e y ' %  #g1s xds vxWe p i w ' %  eue p i ss Yte p f4isfbe 6i%

f u f " atv" h atbs4e

%  9 % S  F S 2b0BAd2cTbR0BA a8TR

%  9 %  EDC0BA)@8760

% s %  e ' % %  p 6 i % % 1r&(3W!bbrqsfbenrqT!4isp1e Ho3w h3We n3bm%QeAhl kTj%Qxeihg%ww3w %  h ' % h  p 6i h  %3W3efed3W$u W!eHu %w3w %   u ' % % e  p 6 i % % s y% e ' % %s y  p 6i %s y 1I3W3Q3er!E3e x%3w

%  ' % "  210)(%&$#!


itself.

U TR S %    X' % S    210`Y2W1R0

p 6i rq4ae

. It therefore follows that any open interval

%  ' % S  V7U0)(2T7R0

%  9 %  QHC0P!IH60

h f cgae

%" &543

if there exists a one-to-one

 $$$00 b)f0 &$$& 3t

W1Ti$&$1WW3 G &$$&4 bT1 tx3W e QGeIrpx3 a b1i$ &$0{ 3 W W1W& $$1Wi0iTbDbi$&A130 7 W1 ! WbW&$$bTW3 }W1 W4$$TB p W )W f a 3 3T 3W3 rbTb bT 3 x1b
.

bW

tW b bb g3T cbb bTb 11rTbTm r134Q3 3H14Q3 bb

1r t

Tap rqt })E Bg


of a function f by the real number k satises: , such that

2. The operation of scalar multiplication

T B )(W p a  E )2T p Q3 p l} v }  vW {B p

3 x3 3 3 x3

tagf tarkH3 I8rd3 )d 3

then

It follows from properties 1 through 3 of Theorem 2.8.2 that together with operations dened in 2.8.1 forms a real linear vector space as dened in Chapter 3. If X is a nite set consisting of n elements,

2.8.3

and let be dened by , then and, hence, . Therefore, and is one-to-one. Furthermore, if , and is the function dened by , then and, therefore, is also onto. It follows that any function can be uniquely identied with the ordered n-tuple . In addition, if f and g correspond to the n-tuples

Proof: We only prove part 3 of the theorem. The remaining parts are just as simple to prove and are left as an exercise.

Example:

for all

for all and

3.

may be viewed as the well-known vector space

The operations of addition and scalar multiplication satisfy:

, i.e. a zero function , such that , i.e., a function the zero function.

; hence, . Observe that we use the fact that k, are real numbers and satisfy the distributive law.

; so

Let

. If

18

Q.E.D. ,

then and for any

Example 2.8.3 shows that and are, from an algebraic point of view, essentially the same vector space. This fundamental fact provides a key component in the study of the image algebra and its relationship to other algebraic structures. The precise denition of algebraic equivalence of two vector spaces is given in the next chapter.

2.9 Distance Functions A type of real valued function of particular importance in image processing and pattern recognition is the distance function. Distance functions induce geometric structures on sets through the notion of nearness of one element to another. The general denition of a distance or metric on a set X is as follows.

(1) (2) (3)

When speaking of sets on which metrics are dened, we refer to the elements of the set as points as the distance between the points and . Property (1) of the function d characterizes and to it as strictly nonnegative, and (2) as a symmetric function of and . Property (3) is known as the triangle inequality. Excellent examples of distance functions are three metrics commonly used in image processing. These are the Euclidean distance, the city block or diamond distance, and the chessboard distance on . For arbitrary points , and of we dene the Euclidean distance between x and y by

the city block distance by

and the chessboard distance by

19

{&i$&$003l

( d 

iWrx 43 W3 T1 Wr41 W1 PQtT1 Wr}Tl ! b

2.9.1

Denition.

Let X be a nonempty set. A distance function or metric on X is a function that satises the following three conditions:

{&vi$$00g2{00243)fQ  $$$ )t i & i  b {$$$041l u

W1

Given a set X, a distance d on X, and a number , then for any point , we can dene the set of points that are within distance r of . In order to simplify notation we let denote the set if it is clear from the discussion as to which metric d is being used. We may think of as a sphere with center x and radius r. Geometrically, however, these sets need not look like spheres. Figure 2.9.1 provides examples of spheres in of radius about the point 0=(0,0) determined by the Euclidean, city block, and chessboard distances.

-1 (a)
Figure 2.9.1 The spheres

-1 (b)

A large portion of the material introduced in the previous sections dealt with abstract sets, that is, sets of arbitrary objects whose nature is immaterial. In this section we briey review properties of special sets in . A nonempty subset of will be referred to as a point set. Elements of a point set X, called the points of X, will be denoted by small bold letters. In particular, the origin of , which is the n-tuple consisting only of zeros, will be denoted by 0.

It follows from this denition that the norm of the difference of two points is the same as the Euclidean distance between the points; i.e., if and , then

It is now easy to establish the essential properties of the norm.


20

s t kjj ~ kjj e %t f &vXut e vt c

s 9 o q fn n e rqqope ljj kjj m g ett f ec ihIe %%8Dd

2.10.1 Denition. Let

. Then the length or norm of x is dened as

f} n e | v | Dc "| zVxwp&C ~ e {y e tt c x "t f DX et ec

2.10 Point Sets in

e3&s%q Sh D(G3Drq Syh w%Du"(Drq "igCDc c p f ec d te sc px f evc te sc ph f e d b `

-1

-1

UVT ' ! 3D$ # "  ' ! (S$ # R  Q H ' )E $ B 1   ) 6 4 ' $ !  1 2PIG"FDC2A@98753&%# " 2      
1 1 1 -1 -1 (c)
.

' 3D$ # 

  0)

et""CDc t t

' $! (&%# " 

W 4 X

With the notion of distance, we can now proceed to dene what is meant by a neighborhood of a point in .

l 7 lr7l Rk lu l k l " l l l l ( (" 8 u u lh


If , then let in order to obtain , which is the desired inequality. If , the proof becomes trivial. Statement (iv), known as the triangle inequality, follows directly from the Cauchy-Schwartz inequality:

X (" (" (" Pu 8 ("

" ( (

2.10.2 Theorem.

Proof: Statements (i) and (ii) are immediate from the denition. Statement (iii) is known as the Cauchy-Schwartz inequality which can be rewritten as

l ll l k CD Rl Rk l D Rlh Vlh k D (8(G3l lFGul l D


Let x and y be points in . Then we have

Thus

l lrl k" lh

By taking the square root we obtain (iv).

where

for every real number r. This inequality can be written in the form

Since a sum of squares can never be negative, we have

21

Q.E.D.

is called an open sphere of radius r and center

is called the closed sphere of radius r and center . Any open sphere with center is called a neighborhood of and is denoted by . An open sphere with its center removed is called a deleted neighborhood of and is denoted by .

Observe that on the line , a neighborhood of a point is a symmetric open interval centered it is a disc centered at with its boundary, which is the set of all points at , while in the plane x satisfying the equation , removed. With respect to a set , each point has one of three relations, and for each we use a familiar word in a precise way: 1. is an interior point of X if there exists a neighborhood such that , 2. is an exterior point of X if there exists a neighborhood such that , and 3. is a boundary point of X if is neither an exterior nor interior point of X. The set of all interior points of X is called the interior of X and is denoted by intX. The set of all boundary points of X is called the boundary of X and is denoted by . Note that a boundary point may and , then or may not belong to X: If we let and, hence, while . Beginning students of multidimensional calculus often confuse the two distinct notions of limit point and boundary point. Limit points of sets in are dened as follows:

2.10.4 Denition. A point y is a limit point of X if for every neighborhood

It follows from the denition that every interior point of X is a limit point of X. Thus, limit points need not be boundary points. The next example shows that the converse is also true.

A subset X of is called an open set in if and closed if every limit point of X is a point of X. Thus, open sets are the unions of neighborhoods, and closed sets are sets that contain all their

22

2.10.5 Example: Let

. The boundary of X consists of three separate pieces: The circumference, where , and the two points and . The interior of X is the set of points x with , and the set of all limit points of X is the set . In particular, is a boundary point which is not a limit point. A boundary point of X which is not a limit point is also called an isolated point of X. The reason for this denition is that for isolated points one can always nd neighborhoods which intersect no other points of X.

GFw" h

of y,

7 h I%F

7 &

8F F  GF F " i F5h7pF  V 2F
. The set

2.10.3 Denition.

Let

and

. The set

9 G7X hh8 D i l k gl l gg 9g7d %

8F % u

u %F r

7 9Gh

limit points. We wish to stress the difference between having a limit point and containing one. The set has a limit point (namely, ) but no point of X is a limit point of X. In every day usage, open and closed are antonyms; this is not true for the technical meaning. The set X just described is neither open nor closed in . The reader should also be cautioned that an open interval in is no longer an open set when considered as a subset of the plane. In fact, no nonempty subset of can be open in , because such a set can contain no two-dimensional neighborhoods. It is important to note that we dened the concept of open for sets in . This concept can be extended to open in X. Suppose . Then Y is said to be open in X if there exists an open set W in such that . Similarly, Y is closed in X if there is a closed set W in such that . Thus the set is open in the closed set since and is open in .

The following list summarizes some important facts about openness and closedness. is an open set and every closed neighborhood

2.10.6 Every neighborhood

2.10.7 The union of any collection of open sets is open and the intersection of any nite collection
of open sets is open. The intersection of an innite collection of open sets need not be open:

is closed.

2.10.8 The intersection of any collection of closed sets is closed and the union of any nite collection
of closed sets is closed. The union of an innite number of closed sets need not be closed: is open even though is closed for each k.

2.10.9 A set is open if and only if its complement is closed. 2.10.10 A point x belongs to the boundary of X if and only if every neighborhood of x contains a point
that belongs to X and a point that does not belong to X.

2.10.11

is a closed set.

It follows from 2.10.4 that the set , called the closure of X, is a closed set. In particular, X is closed if and only if . The relation between and the closed set in 2.10.11 is given by the equality . Also, from the denition of boundary, a point x belongs to the boundary of X if and only if every neighborhood of x contains a point that belongs to X and a point that does not belong to X. In fact, this observation forms the usual denition of boundary points of regions in digital images. This is in contrast to limit points: Neighborhoods of limit points need not contain points which do not belong to X. Another distinguishing feature concerning limit points and boundary points is provided by the next theorem and its corollary.

2.10.12 Theorem.
points of X.

If p is a limit point of X, then every neighborhood of X contains innitely many

23

@ 1 3 9B B g  6  g B

@ D3

F G)

V % e ` e  ` uats g rqpCiV 6  hgf B) @ w6 1 3 W 6  gf S yxw6 1 3 Gv 6 1 3 @ V % A2ea`dcP)TaYXW 6 1 3 b 1 ` V Q S U H F) Q TS R H F) ) F P' I' H

e d 7Tx2w % vhsrConrhmhhsCjiI  TPgf d u tq n hqp h l k h

1 2 0

B g  6  g B g B W @  6  3 g

@ D3

E C)

B 6 B g B W y %1

) ' % #!    (&$" e d 7 B D) B @ 6 C) A987543

is a closed set.

Proof: Suppose there is a neighborhood of X. Let denote the points of

The minimum of a nite set of positive numbers is clearly positive, so that . But then the neighborhood contains no point x of X such that . Hence, according to Denition 2.10.4, p is not a limit point of X. This contradiction establishes the theorem. Q.E.D.

2.10.13 Corollary.

A nite subset of

has no limit points.

According to the corollary, nite sets are always closed sets. In ordinary usage, the words nite and bounded are sometimes synonymous. In mathematics they are used to describe quite different aspects for every . of a set. A set X is said to be bounded if there exists a number r such that . Geometrically, this says that no point of X is farther than a distance r from the origin; that is, For example, every neighborhood in is bounded and innite. Of course, every nite set is bounded. If X is a bounded set of real numbers then, obviously, there exist numbers r and s such that . In this case, the numbers r and s are also called an upper bound and lower bound for X, respectively. Any set of real numbers that has an upper bound is said to be bounded from above. Similarly, any set of real numbers that has a lower bound is said to be bounded from below. Obviously, a bounded set of real numbers is just a set that is bounded from above and below. One of the most basic properties that characterizes the real numbers is the least upper bound property; namely, any nonempty set that is bounded from above has a smallest upper bound, and any nonempty set that is bounded from below has a greatest lower bound. To be more precise, suppose X is a bounded set of real numbers. Then is the least upper bound of X, denoted by lub or by supX, if and only if r is an with , t is not an upper bound for X. The greatest lower bound upper bound of X and for any of X, denoted by glb or infX, is the number s with the property that s is a lower bound for X and if with , then t is not a lower bound. For example, the set has lub = 2, but . As our next theorem shows, closed bounded sets have the and glb = 1. Here important property that they contain their least upper bound and greatest lower bound.

2.10.14 Theorem. If
Proof:

is closed and bounded with lub = r and glb = s, then

Suppose . For every such that , for otherwise would be an upper bound less than the lub of X. Thus every neighborhood of r contains a point x of X with , since . It follows that r is a limit point of X which is not in X. But this contradicts the fact that X is closed. Q.E.D.

The notion of bounded sets can be extended to sets other than subsets of . Suppose X is an arbitrary nonempty set with metric d and with . Then we say that A is bounded if and
24

}5z d y T~

and

v

" T u 9 z

dr

2 ~

}D|hz"yTC$~ h r"| h"7 rta ~ } z $D5|{y  G9~WqAv~ } z D5|{y | ~ x a p I g G z   d Tv } z D5|AXy

which contains only a nite number of points , which are distinct from p and let

z 

f  a

only if the set

and

and the distance between two nonempty subsets A and B of X by It is of interest to note that , but that the converse implication need not be true, even if both sets are closed sets in . As an example, consider the sets and . Here , while .

2.11 Continuity and Compactness in

Closely associated with the notion of bounded sets is the concept of compactness. Compactness is of usually dened in terms of open covers. By an open cover of a set X we mean a collection . open sets such that

2.11.1 Denition. A subset X of

is compact if every open cover contains a nite subcover.

More explicitly, the requirement is that if indices such that

is an open cover of X, then there exists nitely many

It is clear that every nite set is compact. Recall that every nite set is also closed and bounded. The next theorem, known as the Heine-Borel Theorem, shows that this property is shared by all compact sets.

2.11.2 Theorem. (Heine-Borel)

is compact if and only if X is closed and bounded.

We omit the proof of this theorem which can be found in [49]. The notion of compactness is of great importance in connection with continuity. We recall the and denition of continuity. and . Then f is said to be continuous at a point if, given an arbitrary number , then there exists a number (usually depending on ) such that for every we have that . The function f is said to be continuous on X if it is continuous at every point of X.

Another way of saying that f is continuous at that for

is that given

, then there exists

such

25

"r

2.11.3 Denition. Let

"

if A is not bounded. The greatest lower bound can be used to dene the distance between sets. In particular, for we dene the distance between x and A by

sa5 IY &$Tu 2ruia cvi75$rCca Tvx5$r5

$vD  dr

    G  C  a  

vT(vyi5qrAD

$ t 

A h

XTCv9$5 f

is bounded. If A is bounded then we dene the diameter of A by

T& I(f

vWqAq

This is the usual denition of continuity taught at the beginning calculus level. Continuous functions have a very useful characterization in terms of open sets:

Proof: Suppose f is continuous on X and Y is open in . We have to show that there exists an open set W in such that . Let . Then and since Y is open, there exists such that . Since f is continuous, there exists a number such that for every we have that . By the denition of , we have that . This shows that for every , we can nd a neighborhood such that . So let

where each neighborhood satises the property . Then . But clearly . Thus, . Conversely, suppose is open in X for every open set Y in . Fix and . Let . Then by 2.10.6, Y is open. Hence is open in X. Thus, there exists an open set W in such that . Since W is open in , there exists such that . Therefore,

This shows that for every . Hence, f is continuous at and since x was an arbitrarily chosen element of X f is continuous on X. Q.E.D.

Continuous functions have the important property of preserving compactness:

Proof: Let be an open cover of . Since f is continuous, Theorem 2.11.4 shows that each of the sets is open. Since X is compact, there exists nitely many indices, say such that

Since

for every

, (i) implies that

26

9 5 z8B#

6U 8B "h 3  3 E6~ 875 41 # 

) & $ XQ{"T#

9 5 z8B#

9 ~ V74B# 531

!  2 

2.11.5 Theorem. Suppose

is compact. If

is continuous, then

is compact.

9 531 @87642#

l S zR 99 5 d G 9 53 1 w # S 9 5 # d  P 9 d S g"8RBx# e5 (zxy8764B8#xhvC8pBTvX8R5 q jp u9 3 # G  P H   P9 4E75 41 I'tfWs"VR5 q d q 9 rX"VR5 q d ! ! bca i  P H G9 3 ipE75 41 # 9 531 8764B# f9"VRUx#ocj7 9 5 5e d G bnm` a l S YkR ) X 9 531 E74B#  P H G9 3 ij875 41 #  P H  9 3 ihg875 41 # 9 3 F7V5 C1 # fH  P 9 3   P9 5 875 41 # fe4XERd "8% d9 5 CX8Rd G H 9 3 #   P9 5 875 41 XERd 9 5 "VRd 9875 341 #ShR 9 3 #   P 9 5q FV75 41 "VRd 9 3 @875 41 # 7  99 5 e d S 9 5 yXg"8RBx#f5wvVpU#  P9 5q d S ut"8RsrYFp b a i 7  99 5 e h0g"VRUf#f5d b a c` 7 S9 5 YXX8RB# 9 531 # S WV764UTR  P H G 9 531 QIFE7DCB# ! A ) f 8642Ep ~7 }| d }6d 3

) )  & $ 0('%#

!  " 

2.11.4 Theorem. Suppose

and is open in X for every open set Y in

. Then f is continuous on X if and only if

This completes the proof. Q.E.D.

This follows from 2.11.5 and the Heine-Borel Theorem. The result is particularly important when f is a real valued function.

then there exist points p and q in X such that

Proof: By Theorem 2.11.6 f(X) is a closed and bounded set of real numbers; hence f(X) contains its lub M and its glb m (Theorem 2.10.14). Q.E.D.

The conclusion of Theorem 2.11.7 may also be stated as follows: There exist points p and q in X for all . That is, f attains its maximum and minimum values at such that p and q, respectively. We conclude this section with another important fact concerning continuous functions on compact , then since X is bounded there exists an nsets. First we note that if X is a compact subset of dimensional rectangular box such that

The integral of f over X is then dened as

X. Furthermore, since X is compact and f is continuous on X, it follows from Theorem 2.11.7 and the denition of F that F is a bounded function on B. It now follows from the theory of integration (see [1] or [43]) that exists and, hence, so does . The evaluation of the integral of the multivariable function f over X can be accomplished by evaluating n successive single variable integrals. This follows from Fubinis theorem [43], and [50]. We state these observations as a theorem:
27

v4"VB

vCX8B

it is easy to see that

does not depend upon the choice of the n-dimensional box containing

vCXfm

By considering the usual Riemann sums of advanced calculus which approximate the integral

WCCXxm v4"VB }wv "VU hW"fm Qt f'%T

v4"8m

if

. Now given a continuous function

"2xB cXxB TYk"8BUEc tTzXX8B%}c c vz

2.11.7 Theorem. Suppose

is compact. If

is continuous and .

and

. Figure 2.11.1 illustrates this situation be the extension of f dened by

we let

z8B

"iBh ji A

U {

2h

2.11.6 Theorem.

Suppose is compact. If and bounded. In particular, f is bounded.

is continuous, then

"VU
is closed ,

is said to be bounded if there exists a real number M such that A function for all . We now deduce some consequences of Theorem 2.11.5.

"fBhu"VBne2fB

"f'T

b2

a2

a1

b1

Furthermore, if

and

denotes the extension of f dened above, then


3 1 0 ( 42)&'

Theorems 2.11.7 and 2.11.8 are essential in the denition of image algebra operations on continuous images.

2.12 Topological Spaces In the previous section we discussed such notions as continuity, compactness, limit point, and boundary point. These notions are all topological concepts and a careful look at these concepts reveals that the basic ingredient of all them is the idea of an open set. Continuity of functions can be dened purely in terms of inverse images of open sets (Theorem 2.11.4); closed sets are merely complements of open sets (2.10.9); the concept of compactness requires little more than the idea of open sets. However, open sets in are really just an elementary example of open sets in more general spaces known as topological spaces.
Q PHF I G

2.12.1 Denition.

Let X be a set. A set following axioms:

8 975 6

where

is a topology on X if and only if T satises the

28

v4"E2

$ " %#

 !

  

    

"8m

   

v4"VB

f U f f

2.11.8 Theorem. If

is continuous and

fh 2hf "

Figure 2.11.1 A compact set in

contained in a rectangle. is compact, then exists.

D 1 0 3 @ @ CCB@ A3


0 1 E

x2

x1

The union of any number of elements of T is an element of T. The intersection of any nite number of elements of T is an element of T. A pair (X,T) consisting of a set X and a topology T on X is called a topological space.

Whenever it is not necessary to specify T explicitly, we simply let X denote the topological space (X,T). Elements of topological spaces are called points. The members of T are called open sets of the topological space X. There is no preconceived idea of what open means, other than that sets called open in any discussion satisfy the axioms , , and . Exactly what sets qualify as open sets depends entirely on the topology T on X a set open with respect to one topology on X may be closed with respect to another topology dened on X.
a Y b`X

2.12.2 Denition. Let (X,T) be a topological space and

. By a neighborhood of x, denoted by N(x), we mean any open set (that is, any member of T) containing x.

The points of N(x) are neighboring points of x, sometimes called N-close to x. Thus, a topology T organizes X into chunks of nearby or neighboring points. In this way, topology provides us with a rigorous and general working denition of the concept of nearness: The topology of a space tells us when two points or two objects in the space are close to each other.

2.12.3 Examples:
T p a g T e d qihf7c

(i) (ii)

Let X be any set and let . This topology, in which no set other than open, is called the indiscrete topology on X. There are no small neighborhoods.
u trc s d

. This topology, in which every subset of X is an open set, is Let X be any set and let called the discrete topology on X, and X together with this topology is called a discrete space. Comparing this with example (i) above indicates the sense in which different topologies on a set X give different organizations of the points of X. Recall from Section 2.10 that a set in is an open set in if and only if it is the union of neighborhoods; that is, a set is open if and only if for each there is some such that . It is not difcult to verify that the collection of all sets satisfying this denition of open in determines a topology T on . Axiom is trivial. Axiom is also obvious, for if each member of is open in , then so is , since
U R qy i g h f Y )q S R w v w xv w xv p d Y y We`!qe w xv v w ) y w xv 

(iii)

We leave it to the reader to convince himself that Axiom holds. The topology T dened in this way is called the Euclidean topology on , and together with T is called Euclidean n-space.
29
w v w v

igh k

y | v| zAA~}o

V R

m n l

m l y Y v x u v u s q o d Y {qzyiwtrpe` n

V R

U R

S R

i g k Y 7j

S R U R V WR

X and

are elements of T.

and X is

2.13 Basis for a Topology The introduction of a basis in an abstract mathematical system allows us to reduce the number of objects we deal with in order to describe more easily typical elements of the system. The reader is already familiar with the utility of basis from his study of linear algebra: In an n-dimensional vector space the primitive objects we deal with are vectors and any vector can be expressed as the linear sum of a few (at most n) basis vectors. Similarly, the primitive objects we deal with in a topological space are open sets. Since the union of open sets is open, it makes sense to ask if there are classes of subsets B of a topology T such that any element of T can be expressed as the union of elements of B. Such classes do, in fact, exist and they are called bases for the topology T.

a basis for the topology T if and only if (i) every nonempty set
9

is a union of elements of B.

Equivalently, (ii) for any point

is a basis for T if and only if such that .

If B is a basis for a topology T, then we say that B generates T.

2.13.2 Examples:
(i) (ii) (iii) (iv) T is a basis for T.
je`zt#

Let T be the discrete topology on a set X. Then The set

is a basis for T. .

Dene . Then is a countable basis for the Euclidean topology on . For if , where T denotes the Euclidean topology, then such that . Now if and , pick such that and choose a point such that . Then . Figure 2.13 illustrates this situation. A slight modication of this argument will verify the case where , but . The case where and is trivial. Thus is a basis for T with . The fact that is countable follows from 2.7.2(vii).
30
W4 z}Wq jz  `y 2q` btqj `p `qzz j P p

is a basis for the Euclidean topology on

belonging to an open set U, there exists

2.13.1 Denition. Let (X,T) be a topological space. A class B of open subsets of X, i.e.

, is

z`Ct`qzz W

y
r

Then is a basis for a topology on X. This topology is called the metric topology induced by the metric d. The topological space is called a metric . space, and it is customary to use the simpler notation (X,d) for the space In view of these examples we see that a given topology may have many different bases that will generate it. This is analogous to the concept of a basis for a vector space: Different bases can generate the same vector space. Any linearly independent set of n vectors in can be used as a basis for the . vector space We now ask the following question: Given , when will B be a basis for some topology on X? Clearly, is necessary since X is open in every topology on X. The next example shows that other conditions are also needed.
x ) x 9 } } z`y`trt

2.13.3 Example: Let X={1,2,3}. The set B={{1,2},{2,3}} cannot be a basis for any topology on X.
For otherwise the sets {1,2} and {2,3} would themselves be open and therefore their intersection would also be open; but {2} is not the union of elements of B.
!t!C`B

The next theorem gives both necessary and sufcient conditions for a class of sets to be a basis for some topology.

2.13.4 Theorem.

Let B be a collection of subsets of X. Then B is a basis for some topology on X if and only if it possesses the following properties: . (i)
) `` 

(ii) If for any , then is the union of elements of B.


je` r

, such that

, or equivalently,

31

(v)

Let X be a nonempty set and d a metric on X. Dene the open sphere of radius a point by
#2Cwr t

z z)P

Figure 2.13.1

r/

. about

Proof: Suppose B is a basis for a topology T on X. Since X is open, X is the union of elements of B. Hence X is the union of all elements of B. This satises property (i). Now, if , then, in particular, U and V are open sets. Hence the intersection is also open; that is, . Since B is a basis for T, . Thus, if , then Conversely, suppose that B is a collection of subsets of X which satises properties (i) and (ii). , i.e., is the collection of Let all possible subsets of X which can be formed from unions of elements of B. Then, obviously, contains both X and . Therefore, Axiom holds. If is a collection of elements of , then each is the union of elements of B; hence the union is also the union of elements of B. Therefore . This shows that Axiom is also satised. Lastly, suppose that , and law, we have . We need to show that . By denition of , where each and is an element of B. By the distributive

If X is a set and B a collection of subsets of X satisfying (i) and (ii) of Theorem 2.13.4, then we is the topology on X generated by B. If and are two bases for some topologies on say that X, then it is possible that even though . The two bases dened in Example 2.13.2 (iii) and (iv) illustrate this case. If , then we say that the two bases and are equivalent. A necessary and sufcient condition that two bases and are equivalent is that both of the following two conditions hold:

2.13.5 Example:

denote the Euclidean, city block, and chessboard distance, Let , , and respectively. Then the following three bases are all equivalent:

32

} ~ } | { x q vu s r q po n h tltvP(zy0lpo n i wtU0plkmjiRy

The equivalence follows from the fact that possible inclusions are illustrated in Figure 2.13.2.

jq

q6 6 a q0p 2$    igy gy efdE 6 a q0p 2$ 7    iy y    iy y E6 a qp G$U

qn

sAx w

(2) For each

and each

, there exists

such that

Wq a q

a W 9x 9x aUq W q

(1) For each

and each

, there exists

such that

. .

. The four

a 

W U

a U

s tV

W 

a   W  QUrU)pUU aUPv u W a  W  QUrU4IU a W

  U

elements of B and so belongs to

. This veries Axiom

But by (ii), each

is the union of elements of B. Therefore

b

X   b X b b X r rU  U 9{) rU B  a UV rUqeXY X  X ` X ` 9Y X  TX W UV !   rU rU  T " ) 7 H F C 7 % 7 1) " ! PCDS'GRQ3PI3@G3ED"BA"@98563420('%&#$r !   j
X B b Di X

q r b

X B

i b pX

fb b

d ec

g f hX

d ec

for some

. This satises property (ii).

is the union of



Q.E.D.

  rU

Figure 2.13.2 Equivalence of three geometrically distinct bases.

The specication of a topology by giving a basis is generally accomplished by specifying for each a family of neighborhoods , called a neighborhood basis at x, and verifying satises the conditions of Theorem 2.13.4. If the that the family conditions of the theorem are met, then each member is called a basic neighborhood of x. For example, the set is a neighborhood basis for the Euclidean topology on and each open disc is a basic neighborhood of x. Similarly, if X is any set, then is a neighborhood basis for the discrete topology on X.

2.14 Point Sets in Topological Spaces In this section we will emphasize topological concepts in terms of basic neighborhoods in order to retain as much of the geometric avor of Section 2.10 as possible. We begin by giving some denitions which will have a familiar meaning when specialized to .

2.14.1 Denition. Let X be a topological space,

, and . Then (i) x is an interior point of Y if there exists a neighborhood (i.e. an open set containing x) such that ; (ii) x is an exterior point of Y if there exists a neighborhood such that ; (iii) x is a boundary point of Y if x is neither an exterior nor interior point of Y; and (iv) x is a limit point of Y if for every neighborhood of x, , where denotes the deleted neighborhood .

The closure of Y, denoted by , is dened as . The set of all interior points of Y is called the interior of Y and is denoted by intY. The set of all boundary . In contrast to Euclidean spaces, an interior points of Y is called the boundary of Y and is denoted by point of Y need not be a limit point of Y. For example, if X is a discrete space and , then is an open neighborhood of an x in X with but . Thus x is an interior point which is not a limit point.

2.14.2 Denition.

Let X be a topological space and every limit point of Y is a point of Y.


33

. Then Y is closed in X if and only if

t h j h we 4 D 9( 0@Bjt0(B $Y v 

 vR E E p y690 E  tvE 9B vvyE

(a)

(b)

(c)

(d)

r/2

r/2

r/2

r/2 r

Thus a set is closed in a topological space if and only if it contains all its limit points. This is in agreement with Euclidean spaces, where Y is closed if and only if . The next theorem characterizes closed sets in terms of open sets.

is open.

Proof: Suppose Y is closed. Then Y contains all its limit points and so for any or, equivalently, , there exists some neighborhood such that or, equivalently, . Thus, for each point we can nd a neighborhood . But then can be written as the union of such neighborhoods, that is, . Since

For the converse, suppose that is open. Now, if Y were not closed, then there would have to be at least one limit point of Y with . Thus, and, since is open, is a neighborhood of x. But clearly, , which contradicts our assumption that x is a limit point of Y.

This also proves statement 2.10.9 as it is a special case of this theorem. The next theorem is obvious and we dispense with its proof.

Let be a topological space and . Then T induces a topology on Y, called the induced (or relative or subspace) topology on Y. Its importance lies in this: To determine what any concept dened on X becomes when the discussion is restricted to Y. We simply regard Y as a space with the induced topology and carry over the discussion verbatim.

To verify that is actually a topology on Y is trivial. In fact, it is also straightforward to show that if B is a basis for T, then the set is a basis for .

2.14.6 Examples:
(i) , where has the Euclidean topology and . The induced topology on Y is generated by all sets of form {2}, all open intervals contained in , and all intervals of form with . These are exactly the sets one can obtain from , where and . Note that the proper subset of the space Y is both open and closed in Y while it is neither open or closed in the space . Let
34

QQAG

P rQQA

  I

U 6

Ph I$  9$p$U

tw

2.14.5 Denition.

be a topological space and Let topology on Y is dened as subspace of X.

2.14.4 Theorem. Let X be a topological space and

. Then Y is open if and only if Y=intY.

. Then the induced or relative . The space is called a

y$ l

each

is an open set,

is open.

`  E2 v0

pr
Q.E.D.

2.14.3 Theorem. Let X be a topological space and

. Then Y is closed if and only if

hE2

y N r( x )

-1

-1

2.15 Continuity and Compactness in Topological Spaces The generalization of the notions of compactness and continuity retain the geometric avor of Section 2.11. Given a topological space X and , then an open cover of Y is any collection of open sets with the property .

It follows from this denition that an indiscrete space and any nite space (i.e. the underlying set X is nite) is always compact.

continuous at a point if given any neighborhood such that for every , continuous on X if it is continuous at every point of X.

i D g f)i5ompf & g ifjof i l kDrhf & 5 g e dX d

2.15.2 Denition. Suppose X and Y are topological spaces and

35

2.15.1 Denition.

, then Y is compact if and only if every If X is a topological space and open cover of Y contains a nite subcover. A space X is a compact topological space if and only if X is compact as a subset of X.

. Then f is said to be a neighborhood . The function f is said to be

i

y Hx

Figure 2.14.1 The intersection of

with an open disk

% f 2 0 G dqRhpedF

G dF



GF % f 2 qRr"0 G F % f 2 0 G iRhg3eHF   a YW 8 T RT S   ' RP 8 G cb`XVV7U3BQIHF w i g j3hf )

(iii)

Let open arcs of form nonempty, then

. Then the relative topology on is generated by small as shown in Figure 2.14.1. Again note that if is is open in but not in .

E % # !  @ 8 % # ! 46 2 0  $&DC BA9&7" 531)

  ' % #! &(&$" 



 

 

(ii)

The subspace of is a discrete space: If Thus, each singleton set {(m,n)} is open in .

, then

nm g if5

`

The condition for each simply means that . Note the similarity between this denition and 2.11.3. Also, as before, continuous functions can be characterized in terms of open sets:

, and since

To prove the converse, assume f is continuous and U is open in Y. We must show that is open in X. Let . Then . Thus U is a neighborhood of and, since f is continuous, there exists a neighborhood such that . But then . This shows that is an interior point of . Since was arbitrary, this means that every point of is an interior point. Therefore, and, hence, by Theorem 2.14.4, is open.

One of the most important concepts encountered in topology is that of a homeomorphism. Homeomorphisms tell us when two objects are topologically the same.

2.15.4 Denition. Suppose X and Y are topological spaces. A homeomorphism from X to Y is a


continuous one-to-one and onto function such that is continuous. If is a homeomorphism, then we say that X and Y are homeomorphic.

A property P of sets is called a topological property or a topological invariant if whenever a topological space X has property P, then every space homeomorphic to X also has property P. As seen in the previous example, the real line is homeomorphic to the open interval . Hence length is not a topological property since has nite length while is of innite length. Similarly, boundedness is not a topological invariant since X is bounded but is not.

2.16 Connected Sets Much of topology concerns the investigation of consequences of certain topological properties such
36

u r 7c~

Dene by Furthermore, the inverse function are homeomorphic.

u hr7r

u 7r &q &Br` pt &q gq t u r ~ | u r { u r w t | u r $hg$pt hg)`c}otw ~

2.15.5 Example:

Let X be the interval

and let B be the set B = Then B is a basis for a topology on X. . Then f is continuous, one-to-one, and onto. is also continuous. Hence and the open interval

uuy r r $hzt)qw

u7h&q r { u r r utw&q

u r r w { r r $u y t &iq5uu y t 5w &q u$Bht &iq5w  At uy r r q v uy r Bht &q y zt

~ A| q

u r it5w

urh)q u $r q t

v u r Cpt &q

~| 5q

iI7h)qzi7h&q u r u r t u7h&mDtiwh&Amit5w r q { uu r r q { u r u r pt &q u r q v 7h&Qt u r 7h&q

u hr7r

yt yt iDu y t)iq5 w u y it5w u r r q r uu$Bht &iqwr q uy r r uuy r r $Bht &iqw u 7r q

Proof: Suppose point of X and let is open in Y,

u r I7h&q

if and only if

is open in X for every open set U in Y.

is open in X for every open set U in Y. Let be an arbitrary neighborhood of . Then, is open in X. Obviously, , we then have . Therefore, f was arbitrary, f is continuous at every point of X.

~| }q

2.15.3 Theorem. Suppose X and Y are topological spaces and

. Then f is continuous on X

uuy r r w { uy r r $Bht &iq5QmuBht 5w &q

uy r w v Bztjot

uuy r r w v u r $Bht &iqxg&itsq

be an arbitrary since . Thus, letting is continuous at

Q.E.D.

~| `q

as compactness, connectedness, and Euler characteristic. In fact, formally, topology is the study of topological invariants. Several of these invariants play an important role in image analysis. Intuitively, a space or a subset of space is connected if it does not consist of two or more separate pieces. This simple idea is somewhat problematic in the analysis of computer images. Digital images are discrete objects from a signal processing point of view. They are discrete spaces when viewed as subspaces of Euclidean space. Thus, any object in a digital image consists of nitely many disjoint (disconnected) points. Yet the isolation and analysis of connected regions in digital images is a typical activity in computer vision. The reason that one is able to talk about connectivity in digital images in a rigorous sense stems from the fact that connectivity is a topological concept. Connectivity of a subset of a digital image depends on the topology dened on the image space.

2.16.1 Denition. A topological space X is connected if it is not the union of two nonempty disjoint
is connected if it is connected as a subspace of X. A space or subset open sets. A subset of a space is called disconnected if and only if it is not connected. Observe that if Y is a subset of a topological space X then Y is disconnected if there exists open subsets U and V of X such that , with and . Note also that . The two sets and are called a decomposition of Y.

2.16.2 Examples:

2.16.3 Denition.

If A and B are two nonempty separated sets in a topological space X, then and are open in X. Furthermore, and are nonempty sets whose union is . Thus, we have a decomposition of . This shows that if A and B are two nonempty separated sets, then is disconnected. The basic relationship between connectedness and separation is given by the next theorem.

2.16.4 Theorem. A set A is connected if and only if it is not the union of two nonempty separated sets.
Proof: We show, equivalently, that A is disconnected if and only if A is the union of two nonempty separated sets. We already know that the union of two nonempty separated sets is disconnected. In order to show the converse, assume that A is disconnected. Then A is the union of some decomposition and . We claim that and are separated sets. Since and are disjoint, we need only show that each set contains no limit point of the other. Let p be a limit point of and assume that . Then V is an open set
37

jk

Xp" j

p bb

" " j

(ii)

The rationals

are not connected since the sets provide a decomposition.

Two subsets A and B of a topological space X are said to be separated if .

33 )3gH gh7)i` )3g g$& 

dk)

(i)

is disconnected. The sets The set form a decomposition of .

UX o UXXUo 3
and

bUx"Uj$Q X1Uc3s7 I 5

and

containing p and so V contains a point of distinct from p; i.e. by idempotency and associativity of set intersection we have the contradiction:

Q.E.D.

Theorem 2.16.4 can be used to show that the only connected subsets of containing more than one point are and the intervals (open, closed, or half-open). On the other hand, there exists a myriad of different connected sets in . For example, consider the set shown in Figure 2.16.1, where

Each point of A is a limit point of B; hence A and B are not separated sets.

1 A 0

-1
Figure 2.16.1 The connected set .

A useful notion of connectivity in digital image processing is that of weak connectivity.

2.16.5 Denition. A subset A of a topological space is weakly connected if and only if for each pair
of open sets U and V satisfying
E % 6  9 A 9 " 6 FD7CB!@87  3 54 1 ) ' %  " 20(&$#!   

A 9 % 6 G(8!"

it follows that

.
38

Thus and

. Similarly, if p is a limit point of are separated sets.

, then

bs7
. Therefore

. But

o X o Ic3)Io b)Ib
   

c}oB7 ih h7) X BcUoh$z c d

bx

k X

Proof: Suppose X is connected and U and V are two open subsets satisfying conditions (1) and (2) of Denition 2.16.5. Now if , then since , we have that . Thus and is a decomposition of X. But this contradicts the hypothesis that X is connected. Therefore . Now suppose that X is weakly connected. If X is not connected, then according to Theorem 2.16.4, X is the union of two separated sets A and B. Let
Y R S b U Y R aP R U S R a h$#u`htqDsr8BqP j U H kihqP U yqP yCe gfe!@Y c I p I Y R i&dS Y R hva U dQ`qP STBa R p I Y R #ihgS p I U Y R aP R U S R a y`hxwsrTvqP U H yVyxP yCe T#S c I

Suppose . Since A and B are separated sets, p is not a limit point of B. Thus there exists such that . Therefore and . Hence a number . Similarly, and thus neither U nor V are empty. The two sets U and V are also disjoint because
y zxl p o n v U u l dwFyeqP U u ~yxP yhyP U m U u q~yqP }iqP o U H p I u R U lPs #@Dtk4r Y b | pqwn o m ggl S b B{H

Also,
U m 2VxP o U u 72P U u xP o U u ftP

But (1) and (2) imply that . Therefore and, since y was arbitrary, . It follows that x is an interior point of U and, since x was arbitrarily chosen, every point of U is an interior point of U. Thus, according to Theorem 2.14.4, U is open. The proof that V is open is identical. This shows that there exist two disjoint open sets U and V with
j Y R a I I p I H I S R dhtFidB#iC#8Ba y f U u exP Y W S b {&$#a U m hqP y b U ByP 4Q r

But this means that X is not weakly connected which contradicts our hypothesis. Hence our assumption that X is not connected is false. Q.E.D. The rst part of the proof actually shows that connectivity implies weak connectivity in any topological space; no use of special properties of was made. The converse, however, does not hold in general topological spaces. As mentioned earlier, connectedness is a topological property. In fact, even more is true, namely:
39

U P qQwgf

j U m wft}iqP

j U u dqP

U m }ixP ~xP U u

o U m 7VyP

U m kVxP

e fc

I 

y #g

cannot hold simultaneously. Let triangle inequality

U 54P

U P

e c b fda

2.16.6 Theorem. Suppose

. Then X is connected if and only if X is weakly connected.

U Y R HP W U S R HP I `&7QXVT7Q#H

Observe that condition (1) implies that sets are almost connected since a set is weakly connected if and of two nonempty disjoint open sets each intersecting it. This is the open sets replacing the separated sets. In fact, in Euclidean weakly connected are equivalent.

. Thus, in a sense, weakly connected only if it is not the subset of a union very much like Theorem 2.16.4 with spaces, the notions of connected and

, and

. Then by the

is not connected, then X Proof: We proceed contrapositively by proving that if is not connected. If is not connected, then there exists a decomposition , where U and V are disjoint nonempty open sets in Y. But then, since f is continuous, and are open sets in X. Also, since U and V are disjoint, and are also disjoint. We now have
7gq q`4 d &tQgqq d Cqr d htQgq4 d gqq d CG f `4d Q d r d r2 D2gq4gyVTsgq4 ft

and, therefore, the decomposition


qQ D74V d &B

As an application of Theorem 2.16.7 we obtain the following generalization of the intermediate value theorem of standard calculus:

2.16.8 Theorem.

Every continuous real valued function on a connected space X takes on all values between any two it assumes.

is continuous, is connected according to Theorem 2.16.7. Proof: Since is either a point, an interval, or equal to By our observation following Theorem 2.16.4, . If is a point, then there is nothing to prove. But if and , with say b greater than a, then we have . Now if c is any number with then we have that . for any Q.E.D. A component of topological space X is a maximal connected subset of X; that is, if C is a component of X, then C is connected and C is not a proper subset of any connected subset of X. Thus, if X is connected, then X has exactly one component, namely X itself. On the other hand, in a discrete space, every point is a component. If x is a point in a topological space, then the largest connected subset of X containing x is called the component of and is denoted by . It is intuitively clear and not difcult to prove that each point belongs to a unique component . Components are closed sets. This follows from the fact that if Y is a set in a topological space and p is a limit point of Y, then the sets Y and {p} are not separated sets. In particular, if Y is connected, then so is . Thus, if C is a component, then since C is a maximal connected subset. It also follows that if A and B are two distinct components, then . If this were not the case, then A and B is a connected set containing A (and B). But this contradicts the are not separated sets and, thus, maximality of A. We summarize these comments as a theorem:
@x zQt #u4 ft Fygq B54 ft@wi 8 Q d f

2.16.9 Theorem. Every connected subset of a topological space X is contained in some component of
X and the components form a partition of X.
40

gxf

@v&

2.16.7 Theorem. If X is connected and

is continuous, then

is connected.

Q.E.D.

77

According to this theorem, a topological space can be decomposed uniquely into connected pieces, namely its components, and the number of components provides a rough indication of how disconnected a space is. A space X is called totally disconnected if the only components are points; i.e. if . Obviously, is totally disconnected when viewed as a subspace, and so is any discrete space. On the other hand, the subspace of rational numbers is a space that is not discrete but is totally disconnected.
C {#d z@sg7

2.17 Path-Connected Sets For most purposes of analysis, the natural notion of connectedness is that two points can be joined by a path.
 0Q 0Q weeh   f

2.17.1 Denition.

Let X be a topological space and continuous. Then the image is called a path in X. The points and are called the initial and terminal points of the path Y, respectively, and Y is a path from to . The initial and terminal points are also called the end points of the path. A point is a multiple point if the set contains more than one point. The image Y is an arc (or simple curve or simple path) if it contains no multiple points.
x @ 42

It follows from the denition that if Y is an arc, then to , then it is clear that the function Y is a path from
ygwy  0Qt

2.17.2 Denition.

A topological space is path-connected if for each pair of points p and q in the space there exists a path from p to q. A subset of a space is path-connected if and only if it is path-connected as a subspace.

2.17.3 Examples:
df f B f

(i) (ii) (iii)

is path-connected and if path-connected. If

, then for every countable set

A discrete space having more than one point is never path-connected. Every indiscrete space is path-connected. A trivial but useful reformulation of 2.17.2 is provided by the next theorem.

for every

2.17.4 Theorem.

Let X be a topological space and , there is a path from p to x.


41

is an arc and

, then

is path-connected.

. Then X is path-connected if and only if

54

denes a path from

to

is a homeomorphism. Also, if

is also

Proof: If X is path-connected, then the condition holds automatically. Conversely, assume that the condition is satised and that . Let dene a path from x to p and a path from p to y. Let be dened by

The next theorem establishes the general relation of connectedness and path-connectedness.

2.17.5 Theorem.

Each path-connected space X is connected.

Proof: If X is not connected, then X is the union of two nonempty disjoint open sets U and V. and , and let be a path from u to v. Then Now let is a decomposition of Y. But this contradicts Theorem 2.16.7 according to which is connected. Q.E.D.

In view of Theorem 2.17.4, the union of any family of path-connected spaces having a point in common is again path-connected. Because of the property of unions, we can dene a path component of a space as a maximal path-connected subset of the space. As before, the path components partition the space; indeed, from 2.17.5, the path components partition the components. However, in contrast to components, path components need not be closed subsets of the space: in Example 2.17.6, B is a path component of .

2.17.7 Theorem.

The following properties of a space X are equivalent:

Proof: If each path component is open, then given , the path component containing x is a path-connected neighborhood of x. Thus, . To show that , let P be any path component and . By hypothesis, x has a path-connected neighborhood U. However, P is a maximal path-connected set containing x and,
42

(iVb$ )bW$ he ( 7 f ( e$ 5 0 ( $ 0 VQgF@bYV2'd84V 0

Qd ( ( V$ '3$ (3 ( dW$ V$ p R r i f 5 ed w o m eeVr @} o in l l ! {Vr v Vr n ! m l dW r r t tdd m D l o 5 (3 R GVVgrw VEVGVz&r! yv! Vt VGuGG4tv~W%d4lfsGi4!t )yyEdv|@)bqWId! pid@kk V$$ ( w t m x & r Vt ! o w d $ d n r '#vGuVin s r m o id ( x l t& 5 odtdr ln !ml

7 7 D ( $ V`4V0

2.17.6 Example:

A connected space need not be path-connected. Consider the example , where and (Figure 2.16.1). The space X is connected but not path connected: there is no path from to . However, it is obvious that each of the sets A and B are path-connected. Also, as mentioned earlier, . Hence the closure of a path-connected set need not be path-connected.

(2t  $ 0 ( t u $ w( t u i 4ryxv89b$

g(fe!  $ U VCA TS

Then h is continuous since h is the continuous function f on the interval function g on the interval , and at , . Thus, from x to y.

( 0 ( $ 0 ( $ AC 0 dW$  `cb2a`)4&Y! X8&

R Q@F@PIHGFE)'3$  7 & 7 AC 5 ( D & AC 7 & 7 B@986'5 ))432 1 #)'&%! (& $ 0 ( $   #"!    D g("b2QBt  $ 0

UA GXCWS

r sq

0 Qj

i pgh

    w

, the continuous is a path Q.E.D.

therefore, . Thus every point of p is an interior point and therefore U is open (2.14.4). Noting that is the union of the remaining (open) path components, we have that is also open. Hence, by 2.14.3, P is closed. Q.E.D. This theorem provides a tool for determining when path-connectedness and connectedness are equivalent.

Proof: Since path-connectedness implies connectedness and X is a path-connected neighborhood of every point, only the converse requires proof. For this, we know from 2.17.7 that each path component is both open and closed in X; since X is connected, this path component must therefore be X. Q.E.D. This theorem has the following important consequence:

Proof: Again, since path-connectedness implies connectedness, we only need to prove the is open, then each point x of the space has a neighborhood converse. If . But is path-connected. Hence it follows from Theorem 2.17.8 that U is path-connected.

Simple paths have a particular useful and unique property that can be expressed in terms of cut points. A point x of a topological space X is a cut point of X provided that , where A and B are nonempty separated sets; otherwise x is a non-cut point of X.

2.17.10 Examples:

In view of Example 2.17.10(i) and the fact that arcs are homeomorphic images of the unit interval, the next theorem becomes intuitively obvious. However, its proof, which is given in [26], is far from trivial and is beyond the scope of this book.
43

6F

(ii)

Every point of

, where

F8

f~p@

(i)

Every point points of [0,1].

with

is a cut point of [0,1], and 0 and 1 are the only non-cut .

, is a non-cut point of

q9@exV

Of course, as Example 2.17.6 shows, non-open connected subsets of

}u#

2.17.9 Corollary. An open set in

is connected if and only if it is path-connected.

need not be path-connected.

2.17.8 Theorem.

A space X is path-connected if and only if it is connected and each path-connected neighborhood.

has a

Q.E.D.

Y4 XeW @ X

xp9ey Q

A path in a space X is a closed path if . A simple closed path, also called a simple closed curve or Jordan curve, is a closed path with exactly one multiple point such that . An equivalent and more common way of dening a simple closed curve is as the homeomorphic image of the unit circle . It is clear that the omission of any two distinct points from separates into two open arcs (objects homeomorphic to the interval (0,1)). It turns out that this property characterizes simple closed curves in .

As in the case of Theorem 2.17.11, the statement of this theorem (as well as that of the next theorem) is intuitively obvious, but its proof is nontrivial [26].

components.

There are various ways of proving the Jordan curve theorem; a geometric proof is given in [41] while [55] provides an algebraic version. According to this theorem, every simple closed curve in the plane separates into two components, each of which must be necessarily path-connected (2.17.9). In the next section we show that Theorems 2.17.11, 2.17.12, and 2.17.13 all have analogues in the discrete domain.

2.18 Digital Images We now take a closer look at the set . For , and 3, this set plays an important role in discrete signal and image processing. Viewed as a subspace of , is a discrete space. The components are points; thus there are no interesting connected subsets of and no point is a limit point . However, as mentioned previously, the isolation and analysis of connected of any given subset of regions in is a common activity in image analysis. Obviously, when talking about connected regions, there must be topologies on the set which provide for the connectivity of sets that contain more than one point. Before discussing different topologies on , we provide an alternate geometric representation of and discuss the role of in image representation. With each by

we associate an n-dimensional cell,

, with center p dened

The set of all n-dimensional cells is denoted by ; that is, the sets and are the same: The function and onto. Figure 2.18.1 illustrates this relationship for dual representation of .

dened by . The set

. Set theoretically, is one-to-one is also referred to as the

44

e  'GPv HY8  s#WGB F eV ey y # biG% 4Q B'x WG YH# 'G~ I

e e 

2.17.13 The Jordan Curve Theorem.

p sW

2.17.12 Theorem. If
,

is compact and connected and has the property that for any two points is not connected, then X is a simple closed curve.

If

is a simple closed curve, then

zy"%g

Vb2Q42

dade##db24dB

2.17.11 Theorem. If

is compact and connected with just two non-cut points, then X is an arc.

 Gyx#yWGi% zfy Y Y e

has two

One reason for using the representation of has to do with sampling of continuous images and the display of sampled images. In order to process a picture (continuous image) or any other signal by computer, we must convert it into a nite set of numbers. Sampling is the selection of a set of discrete points from a compact time and/or spatial domain. Only the values of the signal at those points will usually be used in further processing. In the one-dimensional case the fundamental mathematical result is Shannons sampling theorem [42]. It shows that any continuous signal over any duration T but bandlimited in frequency to cycles per second can be completely specied (i.e. reconstructed) if we sample its amplitude at intervals less than seconds. It follows that all we need to do is to sample the signal equidistant points during the duration T in order to encompass the total signal. at k greater than Shannons theorem does not suggest a way for reconstructing the continuous signal from its discrete samples; it only says that it is possible. In fact, it is necessary to use fairly sophisticated techniques to reconstruct a signal when it is sampled at the minimum frequency. In addition, the choice of algorithms for reconstruction is usually severely limited in image processing. Pictorial data must usually be sampled at a much higher rate, about 160 times as often, than what one might expect from the trivial extension of Shannons theorem to two dimensions. To illustrate the problem, consider the high resolution image (512 512) shown in Figure 2.18.2(a), which to the human eye is indistinguishable from a continuous image such as a photograph. The two images in Figures 2.18.2(b) and 2.18.2(c) have been obtained from the former by skipping samples, so that Figure 2.18.2(b) consists of 64 64 samples and Figure 2.18.2(c) of 32 32. They are displayed on a larger grid by repeating the values of each sample 8 and 16 times. The quality of their appearance is not due to undersampling alone. Their quality improves when squinting ones eyes or looking at them from a distance; this is due to the fact that most of the information is still there. It is our method of piecewise constant reconstruction, i.e. the simple replication of values, that introduces the distortions. Even a simple linear interpolation between samples, instead of replication, would have greatly improved the quality of the images.
45

Figure 2.18.1 The set

and its dual

Y GVV #G

c( p)

Figure 2.18.2 Effects of reducing sampling grid size. In the case of two-dimensional images, such as shown in Figure 2.18.2, the image is usually viewed as being derived from a continuous image function by taking a nite number of represents the intensity, photographic density, or some desired parameter of samples. The value the physical image at the point . In a perfect image sampling system, spatial samples of the ideal image f would, in effect, be obtained by multiplying f by a spatial sampling function s composed of an innite array of Dirac delta functions arranged in a grid of spacing . The sampled image is then given by ; that is

A continuous image function may be obtained from the sampled image by linear interpolation or by linear spatial ltering. If r represents the impulse response of an interpolating lter, then a continuous image function is obtained by convolving with r; i.e. where denotes the convolution product. However, substituting from equation 2.18.1 and performing the convolution yields

This shows that the impulse response function r acts as a two-dimensional interpolation waveform for the sampled image . Of course, Equation 2.18.1 represents an idealized description of . It is physically impossible to obtain measurements at a point. The evaluation of at a point x represents the measured intensity over a small convex area centered at x. The dimension of the sampling areas are approximately equal to their spacing (Figure 2.18.3). Another physical restriction is that f can only be sampled at a nite number of places. Thus, the union of all convex sampling areas forms a compact subset . These comments can be formally expressed and are the rationale for the next denition.
46

b a &1q Y

In this equation, vector subtraction and multiplication are dened componentwise; e.g. if and , then

 ('&$"  ! %#!  jhf i g i

a t s w q u a t s q i h g f ce b a Y X 5 U S R P H F CE 5    ) Y Gyr xY vs Y IW1r4pQIGd`WVT1 0QIGDBA4@219&

a t s w q d a t s i h g f ce b a Y IWr TY vs Y erq p98Gd@2Y q i &i d 22&i b Ii &i 0i s s b s a '& q Y Wr &Ba I w '&I w 1q b r Y w

#

 75    ) 2180614 321$&

  s

 

a ' q b r

) 0

(2.18.1)

(2.18.2)

Figure 2.18.3 illustrates the idea behind this denition. In general, the spatially sampled or spatially quantized image consists of an array of equally distributed samples and can therefore be viewed as points in the discrete plane arranged in rectangular form. We also need to point out that the sampling cells can be disjoint, although in most sampling devices they overlap as illustrated.

Figure 2.18.3 Sampling grid with sampling cells; the different shadings represent different values of the image function f.

The most common grid used in image processing is the rectangular grid. Hexagonal and triangular grids (Figure 2.18.4) are often discussed in the literature but are rarely implemented.
47

x 2r w v k

o 2n

xx y z2r w v k r w

n qemk p on l

2.18.1

is continuous. A sampling cell associated with a point Denition. Suppose is a compact and convex subset of with barycenter p over which the value of a sample of f is calculated. The union of all the centers of the sampling cells is called the sampling grid. The pair is called a picture element or pixel and is called the pixel value.

} | ey{

o D~

x wv r 0k

u s n tr

(a) Hexagonal grid

(b) Triangular grid

Figure 2.18.4 (a) The hexagonal grid and (b) the triangular grid. can be represented as points, it is often intuitively more satisfying Although the spatial samples and closer to the sensing process to use the dual representation of and view the samples as cells. In addition, this view corresponds to the actual display of sensed images on a variety of display devices. Television frames, for example, might be quantized into 450 lines of 560 cells each.

In order for the sampled image to be processed by a digital computer, the function f must also be sampled in amplitude; i.e., each real number must be assigned a binary code. This process is called amplitude quantization and can be considered as a mapping from the real numbers into either the integers or into as each binary code is of nite length. The corresponding integers are called the gray levels or gray values of the image. It is common practice in image processing to have the discrete gray levels equally spaced between 0 and some maximum number L of form . These comments form the basis of the following denition:

2.18.3

Denition: A digital image is a spatially-quantized and amplitude-quantized image and the full range of amplitude quantization levels available for a particular image is called a gray scale. The process of obtaining a digital image from a continuous image is called digitization.

48

2IIA1Q    

In case one desires a larger display or a more dense set of display cells than provided for by we could dene the display function in terms of an interpolating function by setting

m0

&

Az21I I&''1Q   29&2 I0& 9&Q  &z400621IQ29& 24

2.18.2

Denition. The set is called the display grid of f and the dened by is called the display image. The pair function is called a display pixel or simply a pixel. , .

 &

Digital images constitute a special class of computer images, a topic discussed in Chapter 4. Here we are only interested in exploring some useful topologies on digital images. The rst problem to consider is that of connectedness. Consider the digitization of the continuous curves shown in Figure 2.18.5 (a) and (b) using the gray scale {0,1}.

Figure 2.18.5 Continuous curves with sampling grid; the dots indicate the centers of the sampling cells.

(a)

The continuous curve in 2.18.5(a) is connected, while the object in 2.18.5(b) consists of two separate continuous curves that are spatially close to each other. Due to the limitations of the spatial sampling grid, the resulting digital images obtained from (a) and (b) are identical (Figure 2.18.6). The digital representation in Figure 2.18.6 of either set of curves as subsets of appears totally disconnected while the dual representation appears connected and seems a good representative of either 2.18.5(a) of 2.18.5(b). Thus, the question arises as to which curve 2.18.6(b) represents; i.e. does it represent a continuous gure eight curve or two separate simple closed curves that are spatially close? The answer to this question depends, of course, on the choice of the topology. Keeping the subspace topology for is useless in the analysis of connectivity since the digitized curves are then totally disconnected. However, we may choose topologies that provide for the desired connectivity of the curve shown in 2.18.6(b). In the next sections we shall take a closer look at these topologies.

49

2j`

(b)

Figure 2.18.6 Illustration of the dual representation of digitized curves.

2.19 Digital Topology Any topology on or is called a digital topology. Topologies on are also referred to as cellular topologies. The set or together with a topology is called a digital space or cellular space. Topologies other than the discrete topology can be dened in terms of the coordinates of points of . One of the most popular digital topologies uses the concept of even and odd points. In particular, a point is called even if and only if , is even. If p is not even, then p is said to of p by be odd. Let , and dene a basic neighborhood

It is easy to verify that the collection satises the conditions of Theorem 2.13.4. Therefore B is a basis for a topology on and the topology thus derived is called the von Neumann topology. This topology was rst described by A. Rosenfeld for the case [48]. Rosenfelds pioneering work in digital topology has provided a variety of useful tools and a rigorous foundation for many image processing operations [29]. Dening basic neighborhoods for points for an equivalent topology on . In particular, neighborhoods

2.19.1

1Q z z jjW 1zII 1  1 1 QQ 1I IQ 1 z  1I1 z 1 I I1 Q 1Q

by

provides

if p is odd and if p is even. If n=2 or 3, then the possible of p are shown in Figure 2.19.1(a) and (b), respectively.

As an easy consequence of the neighborhood denition we have

Theorem. The basic neighborhoods for the von Neumann topology are path-connected.
50

D DG0G6 jm AzI  1zI 0 2qj2Q 1 1zI 1 ( Iz 0 0 A'IG&1&t

(a)

)b(

c(p) odd

c(p) even

c(p) odd
, and (b) if

is a point. If p is even, let q and r Proof: The proof is trivial if p is odd, for then be two distinct points in . Then at least one of q or r must be odd, say q. Now either r is even or odd. If r is even, then . In this case, we dene a path with initial point q and end point r by

Since , we have and . This shows that the inverse images of open sets are open in [0,1]. Hence f is continuous. If the point r is odd, then we dene by

In this case we have , , and Thus, again, inverse images of open sets are open and, therefore, f is continuous.

2.20 Path-Connected Sets in Digital Spaces

metric

and the chessboard metric

and . Given a point , then its von Neumann neighborhood is the set . In the case , is also known as the 4neighborhood of p since it consists of the point p and its directly adjacent horizontal and vertical neighbors. Furthermore, if p is even, then . The Moore neighborhood of p is denoted by and dened as . For n=2, is also known as the 8neighborhood of p.

Eh I h `kji gf B  t fd6 e $ $

2.20.1

Denition. A sequence of points is called a -path if for , and a -path if for . A set is said to be -connected ( -connected) if for each pair of points exists a -path ( -path) from p to q such that for
51

z m" 2 f ' r sr @ $ $  pv t 8 x w Sc p `yb4 I h `f g

There are many metrics that can be dened on

. Two commonly used metrics are the city block , where

e $ m SS$ l lc  Pz E #p

21   

E  E E  ed EI zvGV FD RQ z21V FD EI RQ z@G FD Y ` 0 1( & $  7cb$ S&  #"a6 2  X  V U 5"!6   W 21V TRQAS  B @ 2 C3V "A98 RQ 32V FDP EI H Wz@G F  E ED 0 1() & $  76$  $  5"463 2  ' % #"! 

@ $ 4 I h 6@21 8 

i l  o p nh d I E h E 1P1 I E t $ Ih @ #p E  h ef$hbgg fBU  I E Q8 21

2V

Figure 2.19.1 The von Neumann basis (a) if

c(p) even
.

2V

Q.E.D.

2 21V q @ 8  v 4 E h 9@2z g b$ E v "  g s E s V  r up s PE #qp 4 d E h p v t r gi

there .

We call a -path ( or ) a digital path if it is clear from the discussion which type of path is meant. Unless otherwise specied, in the von Neumann space a digital path shall always mean a -path and a digital path-connected set a -connected set. Also, in the case n=2, -paths and connectivity are usually referred to as 4paths and 4connectivity, while -paths and -connectivity are called 8paths and 8connectivity. It follows from the denition that every -path is a -path and every -connected set is also is -connected connected. The converse is obviously false; for n=2, the set but not -connected. The relationship between connectivity, -connectivity, and path-connectivity is given by

(1) S is connected. (2) S is digital path-connected. (3) S is path-connected. Proof: The equivalence of connected and path-connected follows from theorems 2.17.5, 2.17.8, and 2.19.1. To show the equivalence of connectivity and digital path-connectivity, assume rst that S is and set . If connected. Let , there is nothing to prove. If , let . Then and . Now if , then . This shows that is open in S. Similarly, if , then ; for otherwise there exists a path from p to q, a condition that violates the denition of . Thus S is the union of two relatively open disjoint sets, namely and . But this contradicts the assumption that S is connected. Therefore . If, on the other hand, S is digital path-connected but not connected, then S is the union of two separated sets A and B. In this case let , , and be a -path in S. Then for some j, and . One of or must be even. If is even, then and, hence, . Thus, is a limit point of B; i.e. . But this contradicts the assumption that A and B are separated sets. A similar argument holds if is even. Q.E.D.

According to the theorem, the connected sets in are exactly the path-connected sets. Comparing this with Corollary 2.17.9, we see that with the von Neumann topology enjoys some of the properties of . Subsequent theorems will show further similarities between and . For the remainder of this section we shall assume, unless otherwise specied, that is the von Neumann space. The next lemma is a main ingredient in proving several interesting properties of digital curves.

1| 1| `bk{

Lemma. Suppose then each and

and

. If S is connected and are connected sets.


52

fT{ t |

2.20.3

x n t f t }y 3o clCx } t } ' x ' x xp t  t bcd y  x b ll { t 6h h } fk{ G } t { AG kk { 4t % { { t { t 9t ) { x p { | t y#g'41nUnFTnloX {

`f{

2.20.2

Theorem. Let be the digital space with the von Neumann topology and the following are equivalent:

. Then

a separation,

x p yp

xp  }   }| t y p n1ukhrukU~RPG~rb{ xp yp

y p

x p

y zp

xp

x p

u t vhs

q rp

xp

x p

Now if p is odd, then and, therefore, . By the above argument, is open in S. If, on the other hand, p is even, let . Then if we must have either with , or , or . If with , then z is odd and {z} is open. Hence is an interior point of U. If , then

'G 9z 1 ' b 9'ly Ua yy9yG'k1y b y V1yybnG F


and ,

ybTnGG F yuo3 bfVuG 'j kS b o 9ya'`Tb3 1 9' G

Thus, is the union of two relatively open sets This shows that is open in S as long as . Next suppose that . In this case,

We shall show that f is continuous. The result then follows from Theorem 2.16.7. Let , , and a basic open neighborhood of y in . We show that is open in S. Since is a basic open neighborhood in , is of form

which is open in S. However, is also open in S. This can be ascertained from the fact that and, therefore, that since p is odd, we have for each

There are two cases to consider, namely and . Suppose . In this case and . Since A and B are separated, y cannot be a limit point of B. Thus . If, in addition, , then and . Therefore, is a relatively open set in S containing x. If , then p is odd and

f! n F Gl

nuP Pfj l

l 54 1y'T#4 GP

Proof: that Dene

1j y6 j! 9o
We show that is connected. by

Since

is connected. By interchanging A with B, this also proves

and

9l6

SVS y%d9yaVGb XVyGbk o% )CRlg 6 Gfb % bl yGly fg V1VGbk 9 1l!nG F 9bTG d9Vuc33G F  3T3dRP 3G1FP 1'GG
is an interior point of U.

which is open in S. Therefore

53

which is open in S. Thus, in each case z is an interior point of U. Since z was arbitrary, this shows that . This completes the proof that is open in S. and . Then . This Let shows that given a point and a basic open neighborhood , then there exists an open set V containing x, namely , such that for each , . Therefore, f is continuous at x, and since x was arbitrary, f is continuous on S. Q.E.D.

Lemma 2.20.3 is needed to prove the following surprising theorem:

Proof: Let N be the set of all non-cut points of S and suppose to the contrary that . . Then , where A and B are separated sets with N contained Let . For each point , let in one of A or B. Suppose without loss of generality that , where and are separated sets with . Since and by is connected, we must have . Lemma 2.20.3 Partially order the collection by subset inclusion. Since S is compact, S is nite. Therefore must be nite. Thus we can select a maximal simply ordered subcollection

form a separation of , . Let . Then since , q must be an element of A and therefore a cut point of S. Now consider the set . Since is a connected subset of , it must either be a subset of or of . Since , and hence . Thus the collection is a strict subset of the simply ordered collection . This contradicts the maximality of and proves that N must contain more than one point. Q.E.D. The reason that 2.20.4 is a surprising theorem is that it is true for Euclidean space but not for general topological spaces. In particular, 2.20.4 holds for a class of spaces known as -spaces but not for a class known as -spaces. A topological space X is a -space if given any two points of X, then at least one of them is contained in an open set not containing the other. Obviously, both and are -spaces. However, Euclidean spaces also satisfy several stronger conditions. One of these is the -hypothesis. A space X is called a -space if given any two points of X, then each of them lies in an open set not containing the other. For example, if and , then and , . Thus, is a -space. On the other hand, if is even and with then . It follows that q is in every open set containing p and . Hence is
54

y x

p i&Ha |c7CH ha &Ae |7CH

y x

pyxi"2l"2%i y x y x y x y x { y iqx p R"c

y x

s C

"ic

iyxq{Tpi yx ixs y y " p y x y x r { fp " C x y x y y

the sets

y %x

 ~

} y x { z y i|x

of

such that

whenever

. Consider

ix y

lP GR

z%yx vwr tus

j!

e # P   feRadg  a !  e 

t y 4fcr "x

k i lj # ibhg g 

  g # !  4$%Ct

v u e w43t

2.20.4

Theorem. Suppose at least two non-cut points.

and

Q P d 5 @ 8 5 rX&I A A 6 qpD # ! $ihg4efX$d H @ 5 cI @ba`XCI H 8G6 WVFTSH RH 5 B Y B @ 5U 5 D 5 P B @ 8 6 AC A 975

. If S is compact and connected, then S has

. Since

' 

o&%$" # ! e

P % P

VGG  G ' a d Q  P

j l

#PiTg   g # P  fqR%Ct

ACI H G6 FED B @ 8 5  0 ) 4321(

d 5 r&I A

l
1

Finally, if

, then

and

v t rs p o g  wu"qj"n m

@ s RHPP5 t 9Cb!

$Ha  

a -space but not a -space. The reason that 2.20.4 holds for , even though it is not a -space, is due to the von Neumann topology which was heavily employed in the proof of the theorem.

2.21 Digital Arcs and Curves There are many other properties shared by and , and one of these is the similarity between digital arcs in and arcs in . In the denition of digital arcs given below, the set denotes the deleted neighborhood .

, and

A digital arc satisfying the additional condition

is called a digital Jordan arc. A digital Jordan curve is a digital simple closed curve satisfying condition

Note that a digital arc is a digital path which, because of condition (1), cannot double back on itself or cross itself. Condition (2) implies that a digital arc does touch itself; a point with or must be a (Euclidean) distance greater than one from the point . For Jordan arcs, condition (3) means that the path cannot even double back within the distance of another point of the path. In higher dimensions it allows arcs to double back to within the Moore neighborhood of a previous point , but at a distance greater than . The requirement for digital simple closed curves rules out one point (degenerate) closed curves, two point closed curves, and four point closed curves that form a 2 2 block of cells. In fact, it is not hard to see that these are the only -paths with that satisfy and . Hence a digital simple closed curve must contain at least eight points. Figure 2.21.1 provides examples of digital arcs and digital simple closed curves.
55

|73

  d

iT e

fai

4f Xe He

pTwAeRI7e

i Xl " i|A

If the arc consists of one point closed curve is a -path

, then it is also called a degenerate arc. A digital simple such that and for all ,

q f

qi Xli "

c S

Gih

2.21.1

Denition. A digital arc is a

-path

such that, for all

$H

$"%X$Xe

TA 7

Tb H q H

1i Xe H

G wXe7H

Te

Tf7

(a)

Figure 2.21.1 (a) A digital arc (left) and a digital Jordan arc (right). (b) A digital simple closed curve (left) and a digital Jordan curve (right). Digital arcs and digital simple closed curves as dened in 2.21.1 are -connected sets. Obviously, by using instead of one can just as well dene the concepts of a digital arc and digital simple closed curve in terms of -connectivity. are all distinct, and and are called the end points of The points of a digital arc the arc. It is also obvious from the denition that the end points are non-cut points of the arc and that any other point is a cut point. This is one property digital arcs share with topological arcs (Example 2.17.10(i)). Before discussing further common properties we need to establish the following result:

If , then , for otherwise is shorter than P. Similarly, we cannot have for , for otherwise the path is shorter than P. It follows that P is a digital arc from p to q. Q.E.D. We are now able to prove the digital version of Theorem 2.17.11.

2.21.3

Theorem. digital arc.

If

is compact and connected with just two non-cut points, then S is a

56

7  q Xl i

Proof: By Theorem 2.20.2, there exists a digital path from p to q in S. Let be a digital path from p to q in S of minimal length with and . Then if ; otherwise, would be a shorter path than P.

Xl 7 r i

 

Xl Xl

# (  %  0)'& i$Ae 7 "  e   Xl w 7 Xl "

2.21.2

Lemma. If is connected, then for any two given points arc from p to q in S.

2l

j $He

(b)

#!"     

$H

there exists a digital

Proof: Let be the two non-cut points of S. By Lemma 2.21.2 there exists a digital arc P from p to q in S. If , then there exists a point . Since x is a cut point of S, , where A and B are separated sets. Since P is connected, P must be contained in one of A or B, say A. By Lemma 2.20.3, is connected. Since , . Hence, by Theorem 2.20.4, has at least two non-cut points, one of which, call it y, is not the point x. We now have two connected sets, namely and , and these sets have the point x in common. Thus

is connected. But this means that y is a non-cut point of S that is not in P, a contradiction. Q.E.D. are called von Neumann neighbors or simply neighboring points if A pair of points . If p and q are not von Neumann neighbors, then they are referred to as non-neighboring points.

2.21.4

Theorem. If neighboring points

is compact and connected with the property that for any pair of non, is not connected, then S is a digital simple closed curve.

Proof: We divide the proof into ve parts. (1) We rst prove that S contains no cut points. Suppose to the contrary that p is a cut point of S. Then , where A and B are separated sets. By Lemma 2.20.3, and are both compact connected sets. According to Theorem 2.20.4, there exist points and such that x does not separate and y does not separate . Since A and B are separated sets, x and y are not neighboring points. But then

is the union of two connected sets that have the point p in common. Thus is connected, contrary to the theorems hypothesis. (2) Next, suppose that , where A and B are separated sets. Then and are both connected sets. For suppose to the contrary that , where U and V are separated sets. If U contains both x and y, let . Since , and B are separated sets. Thus is a separation, contrary to part (1) of the proof. If U contains only one of the points x and y, say x, then is a separation. Thus again we have a contradiction to part (1). (3) At least one of or is a digital arc. For if not, then it follows from Theorems 2.20.4 and 2.21.3 that each of the sets contains a non-cut point, say and , distinct from x and y. But then

is a connected set since it is the union of two connected sets having the points x and y in common. In addition, p and q are non-neighboring points since and . This contradicts the hypothesis.
57

I vtF gD sT c uG hI G R V C9 A T Ig1 GT R I G R g1 sP 6 4

I G h 2 G y I G h G y Y4 F nI u 3D 0R c fR g1 tF I u 2 D 0R c A I u 2 D F B G I u 3D wT 4 2 G R 6 I 2 u 3D 0P '1 G R 6 I u 2 D feT I u 2 D fxP G R G R h R c R &D tF c A gD F B hI G l I G m h e R hI dg G F I dg G I GF dg jf 6 T c R tkf c A F B Pihf f g I u 2 D dT f 23R D A I 2 D G R e G R I 0P u "sP u G R T R P EA I u 2 D F B G I u 3D t3B 2 GF

6 f'1

uG hI G y I G hI G y YI F tg1 0R c fR gD F tg1 sR c A I u 3D F B 2 G

I gD I G R G R &D T rET 8 &B ED F 6 I G R g1 P

uG hI G R y hI G R YI YF &D feT c wR &D fxP c A I Yt3B uGF

I 2 u 3D t3B B 6 u 2 D GF B

B 9A C@8

6 6 u g1 D I wT G R T R P I GF xA g1 t3B

6 4 $2 1

I G R &D wSP p i hI G R cb`X qHgD feT dHaYW TUSQA &D HF B R P I G 7 6 42 531

h 6 4 c 1

(4) Both and are digital arcs. By (3), at least one of these two sets is a digital arc. Let be the digital arc guaranteed by (3). If is not a digital arc, then it must contain a non-cut point . Since is a digital arc and x and y are not neighboring points, there exists a point which separates x from y; that is, is a separation with , and each U and V is a connected set. But then

is a connected set, with p and q non-neighboring points. This again contradicts the hypothesis. and of . If neither x nor y is (5) The points x and y are end points of an end point of , let denote the end points of . Then

is the union of two connected sets having the points x and y in common. Thus is , they are non-neighboring connected. Since p and q are end points and points. This contradicts the hypothesis. Thus contains at least one end point of A and, . for analogous reasons, of Suppose y is the end point of but x is not. If denotes the other end point, . For then p and y cannot be neighbors. Also, both x and y must be end points of if not, let denote the other endpoint. Then

is the union of two connected sets having the points x and y in common. Thus is connected, where p and q are non-neighboring points. But this contradicts the hypothesis. We now have that x and y are the end points of and p and y are end points . Then and are connected sets having the point x in of common. Therefore,

is connected. This again contradicts the hypothesis. Thus S is the union of two digital arcs having only their end points in common. Furthermore, since A and B are separated sets, we have that and . It now follows that S has at least eight points and satises conditions and of Denition 2.21.1. Q.E.D. If , then a -component of A is a maximal -connected subset of A. In particular, if , then an 8component is a maximal 8connected subset of A. In [47] and [48], Rosenfeld proved the following digital version of the Jordan Curve Theorem (2.17.13):

2.21.5

Theorem. If

is a digital simple closed curve, then

has two 8components.

It can be seen from Figure 2.21.1(b) that the 8components of need not be connected sets in the von Neumann topology. However, the exact analogue of the Jordan Curve theorem follows as an easy corollary of Rosenfelds theorem.
58

v } yq )s Ht

v } yq )s Ht

v ts rq p x3few

t { s { } r v t rq p ~ &xs f|w { &x3q Ey v t s r z{ v ts rq p gx3YEo ~ { } v t rq p xs 'w

v ts rq tx3fp p v } y q v t s r q p v } y q ~ f)s Htugx3Ys)s Ht vt r p gs YqfEo o s y xs fEo } v t rq p v t rq p &xs Yfw v ts rq p &x3fxo {

v }q v t rq p v yqv t rq p v } yq txts sp ~ wagxs fxC)s Ht

"pspvvgyxtvxs3qfpx|x3t q t r v ts rq p v }q v t rq p w EHugs Yu r vgq0p ~ spavgytxvgqfpxCgs t q r v t yq v yqv rq p o gxgsu n v { $} Ey y z{ { y vt r gs q v t rq p gts soda v rq p gw a vgts sEo rq p v ts rq p x3w ~ { } a

v ts rq p x3Cw v ts rq p x3ww &u3wSo v ts rq p

v t rq p s So

$qo

, . Suppose to the contrary that . Then there is a point and, since C is 8connected, and 8path from p to q in C. Since , there exists an n with such that and . Let . Then , for otherwise is a connected subset of C larger than . Thus, must be one of the four diagonally adjacent points . Suppose, without loss of generality, that . Now consider the points and . Since S is a Jordan curve, it follows from 2.21.1 , that at least one of the points, say x, is not an element of S. But then is a connected subset of C larger than . Therefore .

The following digital version of Example 2.17.3(ii) was also proven by Rosenfeld [47].

In view of Figure 2.21.1(a), it is obvious that need not be connected. The following digital analogue of 2.17.3(ii) follows as an easy corollary to 2.21.7:

The proof of this corollary is identical to that of Corollary 2.21.6.

where m(S) denotes the number of components of S and n(S) the number of bounded components of . The bounded components of are also called the holes of S. If one of the numbers m(S) or n(S) is known, then the Euler number provides a means for obtaining the other. This observation has direct practical applications. For example, there are various hole lling algorithms whose output are connected objects without holes. The Euler number can then be applied to nd the number of objects present. Conversely, if we know that we are dealing with one connected object, then the Euler number provides us with the number of holes in the object.
59

3 )

2.21.9

Denition. If

is compact, then the Euler number of S, E(S), is dened as

A topological invariant that provides a method for counting objects in the digital plane Euler number.

2.21.8

Corollary.

If

is a digital Jordan arc, then

2.21.7

Theorem.

u ' a  $ $H  E

Since

Q.E.D.

If

is a digital arc, then

is 8connected.

is connected.

is the

 $ $H n t $u $H H k ' H"$) f n$Hi |s



Proof: Let C be one of the 8components of guaranteed by 2.21.5 and denote the component of C containing p. We shall show that .

t)

2.21.6

Corollary.

If

is a digital Jordan curve, then

has two components. . Let

In the preceding two sections we formulated most denitions and theorems in terms of -connectivity and observed that most of the theorems have analogous interpretations for -connectivity. This holds for the Euler number as well. For 8connectivity we dene

where denotes the number of 8components of S and the number of bounded 8components of . Obviously, in most cases . One reason we preferred using -connectivity is Theorem 2.20.2. It is well known that there does not exist a topology on for which connectivity is equivalent to -connectivity [4]. However, there exist topologies on in which every -connected set is weakly connected. Note that if is an even point in the von Neumann space and q is any one of the diagonally adjacent neighboring points , then the set is weakly connected but not connected. This is in contrast to , where weak connectivity and connectivity are equivalent notions (Theorem 2.16.6). It does not mean, however, that 8connected sets are weakly connected; the set is not weakly connected. In the von Neumann topology on a basic open set is of form if is odd and if p is even. The Cartesian product of these basic neighborhoods will be used which is different from the von Neumann topology. Specically, to dene a basis for a topology on with each we associate a basic neighborhood dened by

where each is a basic neighborhood of of the von Neumann space . It is not difcult is a basis for a topology on . Since there are to show that the collection possible neighborhood congurations, this topology is appropriately called the -topology on . The set together with this topology is also referred to as the product space of the von Neumann space . For illustrative purposes we again consider the dual space obtained by substituting for p and for . The four different neighborhood congurations for the product space are shown in Figure 2.22.1. The shaded cell represents the cell Here the left-most neighborhood results when i and j are both even. Proceeding from left to right, the next neighborhood pictured represents the case i even and j odd followed by i even and j odd, and i and j both odd, respectively.

Product spaces and von Neumann spaces share several topological properties. In particular, we have the following analogues of Theorems 2.19.1 and 2.20.2:
60

0 1)

Figure 2.22.1 The four possible basic neighborhoods in the product space

d

t
%

$  $ utYxn

' (

xa

xjij x d x3S& u

 

axu 5 3 $ $ 5 C n tqk 3$

&



! "

a a

2.22 Weakly Connected Sets and

-Connectivity


 

x
%

q

The proof of 2.22.1 is analogous to that of 2.19.1. Given a neighborhood and , we dene the path , where , , and , and dene a continuous path from q to r according to the types of coordinates of the points p, q, and r.
3 y 3 2 3 y

2.22.2

be the digital space with the Theorem. Let is path-connected.


-topology and

. Then S is connected

As in the case of 2.20.2, the equivalence follows from Theorems 2.17.5, 2.17.8, and 2.22.1. In contrast to Theorem 2.20.2, connectivity in the -topology is not equivalent to digital path-connectivity for either -paths or -paths. It is true that every -path is connected in the product space . However, connected sets need not be -path connected. For example, if with i and j both even integers, is connected but not -connected. Although is then is connected, it does not mean that all -connected sets are connected; the set -connected but not connected. However, is weakly connected, and so is every connected set in the product space . These observations are relevant in connection with the topological notion of weak path-connectivity.
3 EnWX`WTP y C a m 7 @ l l l @ S 7 3 y

2.22.3

As a consequence of this denition we have the following:

2.22.4

Theorem.

If P is a weak path in a digital space, then P is weakly connected.

is not Proof: Suppose to the contrary that some weak path weakly connected. Then there exist open sets U and V such that , , and . Assume without loss of generality that . Let . Since we have by denition of j that , while . Thus is not weakly connected, contrary to the hypothesis that P is a weak path.
H sG gDS p `7 G C EsQC G 3 y TX(W@ S a m 7 @ l l l DzG m 7 7 P R~G H t Qg r s a S p URRP 7 @ 7 H EQ a eEgC G }i7 G C o 7 i I H G

It is not difcult to verify that connectivity implies weak path-connectivity in the von Neumann topology as well as the -topology. Also, every -path is a topological path and, hence, a weak path in these topologies. However, as we noted earlier, diagonally adjacent points in the von Neumann space need not be weakly path-connected. Hence -paths in von Neumann spaces need not be weakly path-connected. On the other hand, -paths are weak paths in the -topology. This follows from the fact that if , then for the basic neighborhoods in the -topology.
61
3 2 3 2 S V H 9 o p 7 5 8FnWS o 4 9 V 7 5 F4 3 f2 9 o p 7 5 C eS o 7 V y

y EEUA7 C B @

}|{ceTUdTUTcFRzsG a B H m 7 @ l l l @ V 7 @ S 7 H 7 P H

3 y `x

A set path

is weakly path-connected if for each pair of points , there exists a weak . The set P is called a weak path from p to q.

s gwubsns v t r r

a S qdUjWP p o 7 @ o 7

Denition. Let weak path if

be a digital space. A sequence of points is weakly connected for

is called a

Q.E.D.

7 5 8FED(A7 4 C B @

a 9 s cihg(jhP @ 5 @ 9 @ s 5

a 9 s ihg`g8P @ s 5 @ 9 @ 5

3 y

7 5 864

f ged7 H Y

y C 9 @ 85

a 9 s gbXkh`8P @ 5 @ 9 @ s 5

7 cbT7 H V

3 2

2.22.1

Theorem.

The basic neighborhoods for the

-topology are path-connected.

B cbT7 H S 3 2

3 y

a Y 7 @ V 7 @ S 7 P `XWUTRQIG H S V

a 9 s fecdUP @ s 5 @ 9 @ 5

P Ru H

7 5 FxWvt@ 4 w u s S

qp i rbDh V

In analogy to path connectivity, we also have that weak path-connectivity implies weak connectivity in digital spaces. For suppose that is weakly path-connected but not weakly connected. Then there exist open sets U and V such that , , and . Let , , and P a weak path from p to q in S. Then , , and . Thus P is not weakly connected, contrary to Theorem 2.22.4. The next theorem shows that the converse also holds in the von Neumann as well as the -topology.

2.22.5

be the digital space with either the von Neumann or the Theorem. Let , then S is weakly connected S is weakly path-connected.
Wzc

-topology. If

Proof: We already know that weak path-connectivity implies weak connectivity in digital spaces. To prove the converse, suppose that S is weakly connected. Let and = . If , then there is nothing to prove. . Let , So suppose that
z "TF`hh s"f(T A  h8f(Re(je

and denote basic neighborhoods. , then for every . For if for some , let P be a weak path from p to q in S. Then is a weak path from p to x in S and, therefore, , contrary to the fact that . It follows that , , , and . but this contradicts the hypothesis that S is weakly connected. Therefore .
Qs TjFF Q Q g n bg e Q E {8F{ F cbE D F TF Ex D D

where If

Although -connectivity implies weak path-connectivity and, hence, weak connectivity, the converse does not hold in either the von Neumann topology or the -topology. For example, if with i and j both even integers, then is weakly connected and hence weakly pathconnected but not -connected in the -topology. Note, however, that if we shift the set one unit in the diagonal direction, then the shifted set is not weakly path-connected or weakly connected. This is due to the fact that shifts are not continuous transformations in this topology. As we shall show, -paths are the only weak paths that are shift invariant weak paths in the -topology.
Q

If

and

are points in

, and

, then we dene (2.22.1)


2.22.6

Theorem. Let be the digital space with the -topology and . Then S is connected for each pair of points there exists a translation invariant weak path P from p to q in S. In particular, P is a -path P is a translation invariant weak path.
62

E FD

7 C4B@A9 64 2 "531

7 8

A weak path , where


X

is a translation invariant or shift invariant weak path if for , is a weak path for every .

8

g z Q

AEE

}D

D  b

`X

H IG FD E 9T3RSQ1 2 P H IG 7 4 $ !  0 (& ')'% ! " #  #          

} ekh

U8

F`"

WsQ f

Q.E.D.

Proof: Suppose S is -connected. Let , a -path from p to q in S, and . Since , is a -path in . Since -paths are weak paths, P is a translation invariant weak path. To prove the converse, suppose that for each pair , there exists a translation invariant weak path from p to q in S. If S is not -connected, then for some pair of points , there does not exist a -path from p to q in S. Let be a translation invariant weak path from p to q in S. Since P is not a -path, we have that for some , where . Let and dene by

where

. Then the coordinates of the point . But then

are all odd and, therefore,

since invariant weak path.

. This contradicts the hypothesis that P is a translation Q.E.D.

A shift by a vector is a function dened by . The fundamental problem with both the von Neumann and the -topology is that they are not shift invariant; a shift is not necessarily continuous. Shifts are important operations in image processing, while continuous functions preserve such important features as connectedness. Therefore it would be desirable to have shifts represented as continuous functions. There are topologies on that provide for continuity of shifts. The discrete and indiscrete topologies are two such examples. However, these topologies do not provide the useful properties we associate with such as the classication of arcs, . Digital images are the Jordan Curve Theorem, and the various properties of surfaces embedded in usually viewed as discrete representations of regions in . Thus we would like properties of to carry over into the discrete domain. As we have seen, the von Neumann and -topologies preserve many of these useful properties. In addition, even though shifts are not continuous functions in these topologies, shifts do preserve connectivity in the von Neumann topology and weak connectivity of -connected sets in the -topology. There are many other topics in digital topology that provide for a theoretical foundation of many important image processing operations. We refer the reader interested in this subject to [29] and [44] for further references.

63

w ` W v W c 53rW

v a

v c v v y rW y Wh` ny W cv y W ~ ny ~u y WCu ny rW Q y rW C ny W t v We c v v v v t v yWe c v y ~Q3W v ny W k k Afj X h~{y t o nzy j uFq ct } ~|{y t o nzxxv y w x T`s x ppXX rq'Tv w q iii c opXX no$c ny W iQij iii j ml kf k y W5hiy Wgf ` V eU tr WX iii We c upX ''b VU a3`3pQW YX V FU a ` YX dpQW V FU v v y c v y ` v y b W"WW xw ` C5Tv V tr WXiiiXg We c a ` X FU usqphQfdb 33SYQW V FU x V FU x Cw VU x x x x x w x 5$ w x w ` "gTv x u

Bibliography
[1] T.M. Apostol. Mathematical Analysis. Addison-Wesley, Reading, MA, 1964. [2] K.E. Batcher. Design of a massively parallel processor. IEEE Transactions on Computers, 29(9):836 840, 1980. [3] G. Birkhoff and J. Lipson. Heterogeneous algebras. Journal of Combinatorial Theory, 8:115133, 1970. [4] J. Chassery. Connectivity and consecutivity in digital pictures. Computer Vision, Graphics, and Image Processing, 9(3):294300, 1979. [5] E.L. Cloud. The geometric arithmetic parallel processor. In Proceedings Frontiers of Massively Parallel Processing. George Mason University, October 1988. [6] E.L. Cloud. Geometric arithmetic parallel processor: Architecture and implementation. In V.K. Prasanna, editor, Parallel Architectures and Algorithms for Image Understanding, Boston, MA., 1991. Academic Press, Inc. [7] E.L. Cloud and W. Holsztynski. Higher efciency for parallel processors. In Proceedings IEEE Southcon 84, pages 416422, Orlando, FL, March 1984. [8] T.R. Crimmins and W.M. Brown. Image algebra and automatic shape recognition. IEEE Transactions on Aerospace and Electronic Systems, AES-21(1):6069, January 1985. [9] D. Crookes, P.J. Morrow, and P.J. McParland. An algebra-based language for image processing on transputers. IEE Third Annual Conference on Image Processing and its Applications, 307:457461, July 1989. [10] D. Crookes, P.J. Morrow, and P.J. McParland. An implementation of image algebra on transputers. Technical report, Department of Computer Science, Queens University of Belfast, Northern Ireland, 1990. [11] J.L. Davidson. Lattice Structures in the Image Algebra and Applications to Image Processing. PhD thesis, University of Florida, Gainesville, FL, 1989. [12] J.L. Davidson. Classication of lattice transformations in image processing. Computer Vision, Graphics, and Image Processing: Image Understanding, 57(3):283306, May 1993. [13] J.L. Davidson and F. Hummer. Morphology neural networks: An introduction with applications. IEEE Systems Signal Processing, 12(2):177210, 1993. [14] J.L. Davidson and A. Talukder. Template identication using simulated annealing in morphology neural networks. In Second Annual Midwest Electro-Technology Conference, pages 6467, Ames, IA, April 1993. IEEE Central Iowa Section. [15] E.R. Dougherty. Unication of nonlinear ltering in the context of binary logical calculus, part ii: Gray-scale lters. Journal of Mathematical Imaging and Vision, 2(2/3):185192, November 1992. [16] M. J. B. Duff. Review of CLIP image processing system. In Proceedings of the National Computing Conference, pages 10551060. AFIPS, 1978. [17] M.J.B. Duff. Clip4. In K.S. Fu and T. Ichikawa, editors, Special Computer Architectures for Pattern Processing, chapter 4, pages 6586. CRC Press, Boca Raton, FL, 1982.
64

[18] M.J.B. Duff, D.M. Watson, T.J. Fountain, and G.K. Shaw. A cellular logic array for image processing. Pattern Recognition, 5(3):229247, June 1973. [19] G.R. Fischer and M.R. Rowlee. Computation of disparity in stereo images on the Connection Machine. In Image Algebra and Morphological Image Processing, volume 1350 of Proceedings of SPIE, pages 328334, 1990. [20] T.J. Fountain, K.N. Matthews, and M.J.B. Duff. The CLIP7A image processor. IEEE Pattern Analysis and Machine Intelligence, 10(3):310319, 1988. [21] J. Goutsias. On the morphological analysis of discrete random shapes. Journal of Mathematical Imaging and Vision, 2(2/3):193216, November 1992. [22] H. Hadwiger. Vorlesungen Uber Inhalt, Oberche und Isoperimetrie. Springer-Verlag, Berlin, 1957. [23] R.M. Haralick, L. Shapiro, and J. Lee. Morphological edge detection. IEEE Journal of Robotics and Automation, RA-3(1):142157, April 1987. [24] R.M. Haralick, S.R. Sternberg, and X. Zhuang. Image analysis using mathematical morphology: Part I. IEEE Transactions on Pattern Analysis and Machine Intelligence, 9(4):532550, July 1987. [25] W.D. Hillis. The Connection Machine. The MIT Press, Cambridge, MA, 1985. [26] J.G. Hocking and G.S. Young. Topology. Addison-Wesley, Reading, MA, 1961. [27] E. Kamke. Theory of Sets. Dover Publications, Inc., New York, 1950. [28] J.C. Klein and J. Serra. The texture analyzer. Journal of Microscopy, 95, 1972. [29] T.Y. Kong and A. Rosenfeld. Digital topology: Introduction and survey. Computer Vision, Graphics, and Image Processing, 48(3):357393, 1989. [30] L. Koskinen and Jaako Astola. Asymptotic behaviour of morphological lters. Journal of Mathematical Imaging and Vision, 2(2/3):117136, November 1992. [31] R.M. Lougheed. A high speed recirculating neighborhood processing architecture. In Architectures and Algorithms for Digital Image Processing II, volume 534 of Proceedings of SPIE, pages 2233, 1985. [32] R.M. Lougheed and D.L. McCubbrey. The cytocomputer: A practical pipelined image processor. In Proceedings of the Seventh International Symposium on Computer Architecture, pages 411418, 1980. [33] P. Maragos. A Unied Theory of Translation-Invariant Systems with Applications to Morphological Analysis and Coding of Images. Ph.D. dissertation, Georgia Institute of Technology, Atlanta, 1985. [34] P. Maragos and R.W. Schafer. Morphological skeleton representation and coding of binary images. IEEE Transactions on Acoustics, Speech, and Signal Processing, ASSP-34(5):12281244, October 1986. [35] P. Maragos and R.W. Schafer. Morphological lters Part I: Their set-theoretic analysis and relations to linear shift-invariant lters. IEEE Transactions on Acoustics, Speech, and Signal Processing, ASSP-35:11531169, August 1987. [36] P. Maragos and R.W. Schafer. Morphological lters Part II : Their relations to median, order-statistic, and stack lters. IEEE Transactions on Acoustics, Speech, and Signal Processing, ASSP-35:1170 1184, August 1987. [37] G. Matheron. Random Sets and Integral Geometry. Wiley, New York, 1975. [38] P.E. Miller. Development of a mathematical structure for image processing. Optical division tech. report, Perkin-Elmer, 1983. [39] H. Minkowski. Volumen und oberache. Mathematische Annalen, 57:447495, 1903.
65

[40] H. Minkowski. Gesammelte Abhandlungen. Teubner Verlag, Leipzig-Berlin, 1911. [41] M.H. Newman. Elements of the Topology of Plane Point Sets. Cambridge University Press, Cambridge, England, 1961. [42] A.V. Oppenheim and R.W. Schafer. Discrete-Time Signal Processing. Prentice-Hall, Englewood Cliffs, NJ, 1989. [43] E.R. Phillips. An Introduction to Analysis and Integration Theory. Intext Educational Publishers, Scanton, PA, 1971. [44] G.X. Ritter. Topology of computer vision. In Topology Proceedings, volume 12, pages 117158, Auburn University Press, 1987. [45] G.X. Ritter. Image algebra with applications. Unpublished manuscript, available via anonymous ftp from ftp://ftp.cise.ufl.edu/pub/src/ia/documents, 1994. [46] G.X. Ritter and J.N. Wilson. Handbook of Computer Vision Algorithms in Image Algebra. CRC Press, Boca Raton, 1996. [47] A. Rosenfeld. Arcs and curves in digital pictures. Journal of the ACM, 20, 1976. [48] A. Rosenfeld. Digital topology. American Math Monthly, 86, 1979. [49] W. Rudin. Principles of Mathematical Analysis. McGraw-Hill, New York, NY, 1964. [50] W. Rudin. Real and Complex Analysis. McGraw-Hill, New York, NY, 1974. [51] D. Schonfeld and J. Goutsias. Optimal morphological pattern restoration from noisy binary images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 13(1):1429, January 1991. [52] J. Serra. Introduction a la morphologie mathematique. Booklet no. 3, Cahiers du Centre de Morphologie Mathematique, Fontainebleau, France, 1969. [53] J. Serra. Morphologie pour les fonctions a peu pres en tout ou rien. Technical report, Cahiers du Centre de Morphologie Mathematique, Fontainebleau, France, 1975. [54] J. Serra. Image Analysis and Mathematical Morphology. Academic Press, London, 1982. [55] E. Spanier. Algebraic Topology. McGraw-Hill, New York, 1966. [56] S. R. Sternberg. Language and architecture for parallel image processing. In Proceedings of the Conference on Pattern Recognition in Practice, Amsterdam, May 1980. [57] S.R. Sternberg. Biomedical image processing. Computer, 16(1), January 1983. [58] S.R. Sternberg. Overview of image algebra and related issues. In S. Levialdi, editor, Integrated Technology for Parallel Image Processing. Academic Press, London, 1985. [59] L. Uhr. Pyramid multi-computer structures, and augmented pyramids. In M.J.B. Duff, editor, Computing Structures for Image Processing, pages 95112. Academic Press, London, 1983. [60] L. Uhr. Algorithm-Structured Computer Arrays and Networks. Academic Press, New York, NY, 1984. [61] S.H. Unger. A computer oriented toward spatial problems. Proceedings of the IRE, 46:11441750, 1958. [62] University of Florida Center for Computer Vision and Visualization. Software User Manual for the iac++ Class Library, version 1.0 edition, 1994. Avialable via anonymous ftp from ftp.cise.ufl.edu in /pub/ia/documents. [63] J. von Neumann. The general logical theory of automata. In Cerebral Mechanism in Behavior: The Hixon Symposium. John Wiley & Sons, New York, NY, 1951. [64] J. von Neumann. Theory of Self-Reproducing Automata. University of Illinois Press, Urbana, IL, 1966.
66

[65] J.N. Wilson. An introduction to image algebra Ada. In Image Algebra and Morphological Image Processing II, volume 1568 of Proceedings of SPIE, pages 101112, San Diego, CA, July 1991. [66] J.N. Wilson. Supporting image algebra in the C++ language. In Image Algebra and Morphological Image Processing IV, volume 2030 of Proceedings of SPIE, pages 315326, San Diego, CA, July 1993. [67] J.N. Wilson, G.R. Fischer, and G.X. Ritter. Implementation and use of an image processing algebra for programming massively parallel computers. In Frontiers 88: The Second Symposium on the Frontiers of Massively Parallel Computation, pages 587594, Fairfax, VA, 1988. [68] J.N. Wilson, D.C. Wilson, G.X. Ritter, and D. Langhorne. Image algebra FORTRAN language, version 3.0. Technical Report TR-8903, University of Florida CIS Department, Gainesville, 1989.

67

CHAPTER 3 ELEMENTS OF ABSTRACT ALGEBRA If one surveys the subjects of arithmetic, elementary algebra, or matrix theory, certain features stand out. One notes that these subjects deal with some given or derived set of objects, usually numbers or symbolic expressions, and with rules for combining these objects. Examples of these are the set of real numbers, the set of real valued functions on a set , and the set of complex valued square matrices with the usual rules of addition, subtraction, and multiplication. Moreover, one nds that there are some properties which these combining operations have in common: e.g. adding zero to any real number, adding the zero function to a function, or adding the zero matrix to a matrix does not change the value of the real number, the function, or the matrix, respectively. Other properties, such as commutativity, do not always hold. Multiplication of square matrices is, in general, not a commutative operation. Abstract algebra aims at providing a fuller understanding of these subjects through a systematic study of typical mathematical structures. Such a study has the advantage of economy in that many supercially distinct structures are found to be basically the same, and hence open to a unied treatment. Image algebra has an analogous goal in that it aims at providing a deeper understanding of image processing through a systematic study of image processing operations. Various structures in the image algebra are equivalent to those studied in abstract algebra. Familiarity with some of these structures is, therefore, essential to the understanding of image algebra.

3.1 Relations and Operations on Sets A binary relation on a set is, intuitively, a proposition such that for each ordered pair of elements of , one can determine whether is or is not true. Here, means that is related (by the relation ) to . For example, if is the set of all lines in a plane, then is parallel to or is perpendicular to are binary relations on . The notion of a binary relation on a set can be rigorously dened by stating it formally in terms of the set concept.

3.1.1

Denition:

A binary relation

on a set

is a subset

Thus, any subset of is a binary relation on a relation on , then it is customary to write for

and if such a subset is being used to dene .

3.1.2
(i)

Examples:

Set inclusion is a relation on any power set. In particular, let

be any set and

Then (ii) (iii)

is a binary relation on

The relation of less or equal, For any set

, between real numbers is the set

, the diagonal

is the relation of equality.

69

S"r

3gphf 3ugph 5dp'sprhA

ii

5B

3xp"

The inverse relation of , denoted by , is the relation Thus, the inverse relation of in (ii) above is the relation of greater or equal

Note that in binary relations, each pair of elements need not be related. For instance, in (iii) above, if and , then neither nor are in . to be a binary relation An obvious generalization of Denition 3.1.1 is to dene any subset of between the elements of and those of ; thus, a function is a special type of a binary relation between and . Operations between images and templates as dened in Chapter 4 provide examples of binary relations between elements of different sets that are pertinent to image processing. Certain relations on a set allow elements of that set to be arranged in some order. For example, when a child arranges a set of sticks in order, from longest to shortest, he has an intuitive grasp of the relation is longer than. From this example we can see that there are at least two properties which a relation must have if it is to order a set. Specically: must be antisymmetric. That is, given two sticks, one of them must be longer than the other. Otherwise, they could not be given relative positions in the order. must be transitive. That is, given three sticks , , and , with longer than and longer than , then must be longer than . We collect these ideas in a denition.

3.1.3

Denition. (i) (ii) (iii)

on a set is called a partial order on A relation the following three conditions are satised:

The relations dened in Example 3.1.2 are all partial order relations. The relation of less or equal given in Example 3.1.2 (ii) is also called the natural order on . A set together with the partial order , i.e. the pair , is called a partially ordered set. If in a partially ordered set, then we say that precedes or that is smaller than and that follows or is larger than . If = is a partial order on , then it is easy to see that the inverse relation , denoted by , is also a partial order on . The inverse partial order relation is also called the dual of and gives rise to the following denition:

3.1.4

is that partially ordered set Denition. The dual of a partially ordered set inverse partial order relation on the same elements.

dened by the

Since

, this terminology is legitimate.

Note that Denition 3.1.3 does not imply that given , then either or ; that is, in a partially ordered set not every pair of elements need to be related. A partially ordered set in which every pair of elements is related under the order relation is called a totally (or linearly) ordered set. The set together with the natural order of is an example of a totally ordered set. On the other hand, the

70

5FpriCpg
.

if and only if for every

h|rqS 3d SIeeurT5 uh|Fq B' 5pp

pr

pr

(iv)

relation of set inclusion (Example 3.1.2(i)) is a partial order which is not a total order. An extremely useful special case of a linear order is provided by the next example.

3.1.5

and Example: Let ordered as follows:

This order is called the lexicographical order on as it is similar to the way words are arranged in a dictionary. For example, suppose that , where and (see also Example 2.3.1). If the integers in and are considered ordered by the natural order of less or equal, then is totally ordered by the order relation dened above. Thus, if we rename the elements of by , , then and if and only if . where of as the usual th row and th column location of a matrix If we view the elements array, then this order is also known as the common scanning order of the matrix array . This corresponds to the usual way a computer reads (scans) the entries of a matrix; namely, row by row from left to right, starting with the top rst row then the second, and so on, until the last or bottom row is read. , then . Thus, if is a binary relation on , then is a If binary relation on . We call the relation the relation induced by on . In particular, a binary relation on induces a denite binary relation on every subset of . For example, the natural order relation on induces the natural order on the set of integers . One of the most fundamental relations between elements of a set is that of equivalence. Equivalence relations are used in practically all elds of mathematics; they arise whenever one desires to regard all those members of set that have some preassigned characteristic as a single entity.

3.1.6

Denition. A relation three conditions: (1) (2) (3)

If

an equivalence relation and Examples:

3.1.7
(i)

Consider the relation of set inclusion (Example 3.1.2(i)). For each , and if and , then . Hence, the relation is both reexive and transitive. On the other hand, and . Accordingly, is not symmetric and hence not an equivalence relation. The diagonal relation of Example 3.1.2(iii) is an equivalence relation.
71

(ii)

Q Q  f d T fd f V 1 Q vwuh fpdx t8 sq Q 6q h r q a Q q q q 8 Q C1d fypdc 8Ux i gfed r h a c"` "X#5Vb8 T SR 8 Q PI a V 3`YX#WTU8 G    D A 8 & 2  &   H#19FECB@97(6543 10)('%$#"! 
be totally ordered. Then the product set on a set , then we say that and are equivalent.

can be totally

is called an equivalence relation if it satises the following

k 8  fe pe d @ vX x

8 m 1dt 8 1

g i j8 h8 g  fe pe d t I w m D w 5otuY&u~&EBvsA4g~ 0 d vBA z p&e4~o}F3{pz 0  yx || n m w vo5ut3srEqpog4 0 m l &o n v 1

(iii)

Let relation on

be a function and

. Then

If

by

is an equivalence relation on , is the set

, then the equivalence class of any element

The collection of equivalence classes of . Thus,

, denoted by

/ , is called the quotient set of

The quotient set

possesses the following properties:

3.1.8

Theorem. Let (1) For every (2) (3)

Proof: (1) Since is reexive, we have and, hence, . (2) Suppose . By part (1), . Thus, . To prove the converse, let . Then . By symmetry, . We now have and, by hypothesis, . Hence, by transitivity, . Again, by symmetry, and, therefore, , which shows that . Arguing in a similar fashion, we can show that and, hence, . (3) Suppose the conclusion is false, i.e. . Then with . and . By symmetry, . Since and , we have by transitivity Hence, that . It now follows from part (2) that which contradicts the hypothesis. The converse argument is just as easy. Q.E.D. A collection satised:

The following fundamental theorem of equivalence relations is a consequence of Theorem 3.1.8:

3.1.9

Theorem: If Proof: Hence,

Each element of an equivalence class that if is a representative of , then

5U6 0 #H 0# 0 # x# 0 0 5   0# 5 # #  #S  1 0 # @#  5Ri dyl

be an equivalence relation on

. Then

of subsets of

is called a partition of

if the following conditions are

is an equivalence relation on . If

, then

is a partition of

Obviously,

, then by Theorem 3.1.8(1)

. The remainder of the proof follows immediately from Theorem 3.1.8(3). Q.E.D. . Note

(i.e., each .
72

) is called a representative of

 v '#lP

P ' v y1Pq5 EF' 3p EChy Cvs

!WP)3q5y P9

W3t 9H0#9   #

is an equivalence

, denoted

by

3.1.10

Examples: (i) Two integers are said to have the same parity if either both are even or both are odd. The relation has the same parity as on is an equivalence relation and partitions into two equivalence classes. In particular, if , then

Clearly, . (ii) Each equivalence class resulting from the relation of Example 3.1.2(iii) contains exactly one element. (iii) In Example 3.1.7(iii), the equivalence classes are the sets .
    

3.1.11

, is an It is easily veried that congruence modulo , i.e. the set equivalence relation on . For the relation of congruence modulo is obviously reexive and symmetric. The transitivity also follows easily: If and for some integers and , then , so that . If denotes the relation on dened by is congruent to , then the quotient is called the set of integers mod n.
D     GF#" @E  D 5 B

3.1.12

In Example 3.1.10(i), there are exactly two equivalent classes, the set of even integers and the set of odd integers, and and are representatives of these classes. Although and are also representatives of these classes, it is customary to let and represent these classes; i.e., to identify the set with the set by identifying with and with . In general, it is customary to let denote the set as these two sets are in one-to-one correspondence under the function . It is easy to show that for any given , the set is in one-to-one correspondence
y x t s v u t s r p sRg3wFgWgqo

with the set

(we leave it to the reader to convince himself of this fact). Thus, the elements

73

 U W#

4 X

m 3h

l k j uS

C A

h C iA

I

# y 1 s U v g gq #

C A

f g

% tRST  P P P

d e

% 

  U  W#

and

is the remainder. Clearly,

and

whenever

D  'U

 7

D !

eH

Observe that each integer


XH

is uniquely expressible in the form

, where

Y Y Y SSa

Y Y Y SSg

Y Y Y SSg

Y Y Y SSg

Y Y Y SSg

U R

p S

d V

D X%

p X%

d F%

U S

q u%

b X%

i X%

f X%

D C G A

be the relation on Example: Let exactly ve distinct equivalence classes in

# q19 5 H# HC 5 Hss 5 HC HC v H q 5 H H H 5 H5 HC q Hv 5 Hv v v Hv H s # # #

dened by :

. Then there are

   #3 2 

 % &

and , we say that is congruent to Denition. For arbitrary integers is congruent to ), and write , if the difference multiple of ; that is, if for some integer .
 1 0)(   

modulo (or is an integral

F i s 9 EC Uq@ EvU@} 6gS@F HC@q5i'E yy


   #

F t0 5 
6 ! $ 4 5 

   #"

Y Y Y SR`

 !

Y Y Y RS`

Y Y Y RS`

Y Y Y RS`

Y Y Y RS`

 !

i i i i i

9 #
P P P  p  i  p SRTWS Wts P P P  RTS P P P RTS A

P P P  U  D  U  D %  U RTSWR W)XSWV

 '

P P P  d  b  d  SRTV Wt8yx

   6 # @9 

 f   d %  b %  P P P W3 8eSWcRTSRQ

 q Q)

i i

 p %  i %  P P P cSWcRTSRQ

   

%  q %  P P P S5RTSRQ

%  f %  P P P SwRTSRQ

%  P P P RTSRQ

h XH

I FH

r FH

v FH

6 ! 87 4

#
C A j n B $ C A 

. This corresponds to the usual representation of digital image values in digital image processing by computers (Section 2.18).
{ z

3.1.13

A binary operation is a relation between sets which provides a rule for combining two arbitrary elements of one or two sets. The precise denition is as follows:

3.1.14

Denition. Let , , and be three (not necessarily distinct) sets. A binary operation between X and with resultant in is a function . If , then is simply called a binary operation on .
c

The evaluation is commonly denoted by and is called the resultant of the operation. , then . Binary operations between sets play an important role in Thus, if image processing. In this chapter, however, we will deal mostly with binary operations on a set. Addition, multiplication, and division are examples of binary operations on . Addition and multiplication are also binary operations on . Due to the fact that for any pair of numbers of form , is undened, division is not a binary operation on . However, it is a binary operation on . Some binary operations may satisfy special properties. Commutativity and associativity are the most on a set is called commutative whenever important of these special properties. A binary operation , and associative whenever .

3.1.15

Example: Addition and multiplication are commutative and associative binary operations on . Division is not commutative on . Dening on by
@

then and Thus, the operation


w w @

74

A set is said to have an identity element with respect to a binary operation exists an element with the property
 e @

on

if there

is not associative. Furthermore, .


is not commutative since

S{ z a

RSW#1RSW#1RS

&

{ z

SS0 S0S S0 S# VSSQ

g

5#

| { }$z

of

can be uniquely identied with the elements of

The set of integers mod 8 consists of eight equivalence classes; namely . Identifying [0] with (0,0,0), [1] with (0,0,1), [2] with (0,1,0), [3] with (0,1,1), [4] with (1,0,0), [5] with (1,0,1), [6] with (1,1,0), [7] with (1,1,1) provides for a unique one-to-one correspondence between and .

Example:

#VW8gq ~ 

; i.e. with binary numbers of xed length

The identity element of with respect to addition is 0 since ; the identity element of with respect to multiplication is 1 since . Observe that has no identity element with respect to addition. The next theorem shows that identity elements are unique.

3.1.16

Theorem. An identity element, if one exists, of a set on is unique.


R S

with respect to a binary operation

Proof: Assume the contrary; that is, assume and are two distinct identity elements of . Then since is an identity element. Similarly, . Therefore, , which contradicts the fact that and are distinct. Q.E.D.
g ` g g

If a set has an identity element e with respect to a binary operation , then an element is provided that . The inverse with respect to addition (also called an inverse of called additive inverse) of is since . The inverse with respect to multiplication is since . Note that the set of all (also called multiplicative inverse) of square matrices under matrix multiplication has a multiplicative identity, namely the identity matrix. However, not every matrix has a multiplicative inverse. The proof of the next theorem is similar to the proof of Theorem 3.1.16 and is left as an exercise for the reader.

3.1.17

be a binary operation on set Theorem. Let if it exists, is unique.

. The inverse with respect to

of

Although not every binary operation on a set provides for inverse elements, many operations provide for elements that behave almost like inverses. Obviously, if is the inverse of with respect to the operation , then and . Any element satisfying the two conditions
' ` ` ! ` #w w

is called a pseudo inverse of . Thus, every inverse is a pseudo inverse. However, in Section 4.4 we shall see that the converse does not necessarily hold. Suppose is a set with two binary operations and . The operation is said to be left if distributive with respect to
& 8t$ w 0 

and right distributive if


& 8t$ w"

When both 3.1.1 and 3.1.2 hold, we simply say that is distributive with respect to . Note that the right members of 3.1.1 and 3.1.2 are equal whenever is commutative. Obviously, on , multiplication is distributive with respect to addition. However, division on is not left distributive over addition. That is, but .
75
$#1 x # '#g#T u

"

7!u"F!" 57

7aXR1 

$ 5#ww wXt w





(3.1.0)

(3.1.1)

(3.1.2)

3.2 Groups and Semigroups We begin our short survey of algebraic structures by listing characteristic features of special abstract algebraic systems that are important in the study of image algebra.

3.2.1

Denition. A groupoid is any set together with a binary operation on whose binary operation is associative is called a semigroup.

. A groupoid

To be completely precise in denoting a semigroup, we should use some symbolism such as , which species the set of elements, the binary relation, and the equality relation used to specify the equality . However, it is customary to use either the pair of elements, e.g., or simply the letter designation of the set of elements, in this case , as a designation of the groupoid or semigroup, provided there is no danger of confusion as to the notation being used for binary composition. Also, algebraists as a rule do not use a special symbol to denote a binary operation different from the usual addition and multiplication. They stick with the conventional additive or multiplicative notation and even call these operations addition or multiplication, depending on the symbol used. The symbol for , we shall be addition is of course +, and for multiplication . Thus, in place of the notation using either or . There is also a sort of gentlemens agreement that the symbol 0 is used to denote an additive identity and the symbol 1 to denote a multiplicative identity, even though they may not be actually denoting the integers 0 and 1. Of course, if a person is also talking about numbers at the same time, other symbols are used to denote these identities in order to avoid confusion. To the uninitiated, semigroups may seem too poor in properties to be of much interest. However, the set of all square matrices under matrix multiplication forms a semigroup. Anyone who has had experience with matrix theory is well aware that this system, far from being too poor in properties to be of interest, is, indeed, extremely rich in properties. Research into the fascinating ramications of matrix theory has provided the stimulus to a great deal of mathematical development and is an active and growing branch of mathematics. The set of square matrices under matrix multiplication has the additional property of having a multiplicative identity. This leads us to the next denition:
( V 1! 1 g@3`e5 T 

3.2.2 3.2.3
(i) (ii) (iii)

Denition. A monoid is a semigroup with identity. Examples: be a set and . Then together with the operation of union is a monoid. By Let the laws of set operations (2.2.1), union is an associative operation with identity . The set of positive integers together with the operation + is not a monoid. There is no identity for + in . However, is a semigroup.
S

The system

is a monoid with identity the integer 1.

Of the various possible algebraic systems having a single associative operation, the type known as a group has been by far the most extensively studied. Also, the theory of groups is one of the oldest parts of abstract algebra, as well as one particularly rich in applications.
76

eV

3.2.4

Denition. A group is a monoid with the property that each element has an inverse.

It is customary to denote the inverse of an element in a group by if multiplicative notation is used, and by if additive notation is used. Recalling the denition of a monoid, we may dene a group alternatively as a set together with a binary operation, say , such that :

3.2.5
(i) (ii) (iii)

Examples: The set with the operation + is not a group. There is an identity element 0, but no inverses for integers greater than 0. On we dene a binary operation (which we shall again write as +, although it is certainly not ordinary addition) by . Here and are any elements of the respective and of , and the sum is the ordinary sum of and . In order to show that sets we actually have dened an operation, i.e., that the function (operation) is is uniquely determined well-dened, we must show that the image element of the pair by and alone, and does not depend in any way upon the representative elements of and of which we happen to choose. So, suppose that and h are also arbitrary elements of the sets and , respectively. We then have that

by virtue of the associativity and commutativity of addition, and the distributivity of multiplication over addition for the integers. Thus, we have that , and our operation is well-dened, independent of the choice of representatives of the respective equivalence classes. That this operation of addition modulo is associative follows from the associativity of ordinary integer addition. The identity element is [0] and the inverse of is (we leave the verication of these two facts to the reader). Thus, with this operation of addition forms a group. It also follows from the commutativity of addition of ordinary integers that the group is abelian. This group is known as the group of integers modulo .

An important property inherent to all groups is the cancellation law provided by the following theorem:
77

v Uy et Xzyt v

vy w t wv w |u @|}t

F|w!xw&ywHu!xwT&g|wyy!w&|wvHu!xws| & w

for some integers

and . But then

u &Xy By#u ! vt vt v t wv t v t v t Xdy|u T&Xdy#u !

w y w IC w u w iPf`~

s r

y w 7u vy w t wv t wv |vu {zyxu t

v }yt

v u t

The set of integers

with the operation + is a group. This group is abelian.

If in addition to these three properties the operation is commutative, then the group an abelian group.

c(   QpwF% f iw f BuT0f2YoYfeRnsq f Q4rH4m49I`l3tsshf yj!  %  EC E 2W   E I 4 RA4a G IC k #  q  & cviB%7hw 9%uTtsghbE`f))@edqv4u44EVGES`R)531 y!  w  ( (  # q  f C 2E 2W R  ( E I I4 G IC G 4A4 2 & c p & i% w & p% !%   q i#  f c G # E GW RR C G 7F%By!xTXBvi0uT#tsrVp#@Dghg#e9d4cbU49'aG`SCYX6V)UTRSQ%PI9H6GFDB@97531 0)! ECA4 86 4 2 &( '&%$"! #   s v ~r }yt v Xzyt v Xzyt q y vu t s r v u t

 

is called

v u t

s ~r

Proof: Suppose

. Then, multiplying by

, the inverse of , we obtain

By the associative law,

By denition of an inverse,

and, hence,

Similarly, from

one can deduce that

Note that we had to use the denition of a group in order to prove this theorem. A common activity among scientists and engineers is to solve problems. Often these problems lead to equations involving some unknown number or quantity which is to be determined. The simplest equations are the linear ones of the forms for the operation of addition, and for are in general not solvable in the monoid . For instance, multiplication. Equations of form has a solution , which is not an integer. However, equations of form are always solvable in the structure . The reason for this is that the structure is a group. As the next theorem shows, the properties necessary to solve linear equations within a system are precisely the properties of a group.

Proof:

Note that

78

It is important to note that

and

need not be the same unless is commutative.

F pBu

{sF

To show that is unique, suppose that Theorem 3.2.6, . The uniqueness of

f )~

) f i

Pg 5s 9 f

Thus, of

is a solution of

. In a similar fashion,

is a solution

and . Then follows similarly.

f 97Pt P9 D`0l)@9Yf 0n f `9HXf 0B7 39'`SY5)90B7 f B B

pg0

3.2.7

is a group with binary operation , and if and are elements of Theorem. If and have unique solutions in . linear equations

sfh u

}B y P9r }BQ 9u

t 0uP9r 7xVS0uUe5fuF5F7F7 0 f 7@ f rB7@B

XBuF f iBoy` f f BBu BxB ir BuirBr i

3.2.6

is a group with binary operation , then the left and right cancellation law Theorem. If holds in , that is, implies , and implies ,

}B y X i

Q.E.D.

P0

, then the

, and by Q.E.D.

Following common mathematical convention, to indicate the composite of an element of a group with itself times, where is a positive integer, we shall write (n factors of ) whenever we use multiplicative notation, or, when using additive notation, (n summands of ). Similarly, if is any positive integer, and , where is, of course, the inverse of in the additive notation. Still following customary notation, and , where 1 and 0 represent the identity element in the multiplicative and additive notations, respectively. The usual rules of power follow at once:

In particular, it follows that

. is of the form

Clearly, every cyclic group is abelian.

3.2.9
(i)

Examples:

Thus, is the set of solutions of the equation , where . Each is called a sixth together with the operation of complex multiplication is a cyclic group with root of unity. generators and . For example, and . (ii) is cyclic with generator 1, since in the additive notation we have for every . Note that is also a generator for this group since any integer can be expressed as , where . is cyclic with generator [1], since for any , .

(iii)

The group of integers modulo

3.3 Permutations

79

 nBF BF u DF)B U

Suppose is a nite set of elements, say signicance is to be given to the fact that consists of the rst of notational convenience. It is customary to use the notation

, and a permutation of . No natural numbers, it is only a matter

3.3.1

Denition. and onto.

h 0)5d s gut  ub b u b i~xf`xD)FB9F5i ye0Y Bi g 9"FB|  U0i FgVDFBB V n

Let

, where

A permutation of a set

is a function from

to

which is both one-to-one

3.2.8

Denition. A group is called cyclic if for some , every , where . The element is called a generator of .

i)3 5 @ Dgpg oFBQoQig HBFQHTi

hysg vygysu v x  l i5B

@" 

}Bt f f y

Figure 3.3.1 Products of permutations. to describe the permutation , where for . consists of three elements, say Consider, for example, the case where we have the following six possible permutations:

. In this case

The inverse of a permutation is simply the reverse mapping. For example,

Thus,

, and so forth. Similarly,

etc. A product of two permutations is simply the composition of the two permutation functions. Since the composition of two one-to-one and onto functions is again a one-to-one and onto function (Theorem 2.5.12), the product of two permutations is again a permutation. For example,

The product denes how two elements permute or interchange by repeated application of permutations. For instance, , while . The set of all possible products is given by the multiplication table in Figure 3.3.1. It follows from the multiplication table that the set of all permutations on together with the operation of permutation multiplication is a group with identity . Note that this group is not abelian
80

% 0 H t0  c  q' '  

      A

" !" !  

I H4 F4 2 C % 1G1EDBA

U R 2  % H

    ! "       F F R 4 SHF 4 R 2H U VR H H

H s% 0 2 '   % 80 2 '  p'   % 0 2 r0  ig  q' 0  '  

R SF U   % H

H R F 2 P % H

!              2 F H F F F 4  % R 2 H  4 " % R HF  9455542 @86763% ( F % 2 P !  H P 2 T%  2 P  2 T% " 2 F F H

H P R XH 2 Q% 2

2 R F 2 P  H

 "     !    F H F H  R 4 SHH 4 R 2H 4 R F F P W 2 T%  a 2 W 2 P %  a A 0(' % $ 1) &# H H F 2 F 2 F F F H F

2 P W F T%  

H   g   d    2 P % "ihfe"cb"

H % 2 P   F P  2 Q%  2 P  2 Q% 

       !    % 0 2 80  c  p' '    

F `% 0 H ' W  EY% 0 F ' W  42  

2 3% 0 F v" % r0 H 6"u6" ' 0 ' '

        !  

       !  

. It is the smallest possible example of a nonabelian group as any group with fewer than six elements must be abelian [16].

Figure 3.3.2 Symmetries of an equilateral triangle. There is a natural correspondence between the elements of this group and the symmetries of the equilateral triangle shown in Figure 3.3.2. The permutations for , represent the rotations of the triangle onto itself about its barycenter, with representing the no move rotation. The permutations , for , represent the mirror images across the bisectors of the angles. These symmetries are also nicely reected in the four quadrants of the multiplication table (Fig. 3.3.1). We now show that the collection of all permutations of any nonempty set forms a group under permutation multiplication.

Proof: We have three axioms to check. Since permutations are functions, in order to show for permutations , and that

Thus, and map each into the same element in . This satises the associativity axiom for groups. Obviously, the identity function acts as the multiplicative identity. This satises the second group axiom. As we remarked earlier, the inverse of a permutation is simply dened to be the permutation which reverses the direction of the function . More precisely, since is one-to-one and
81

t }t p r r G~x p~cwo frnx a6wo tt t pr

q tq

ttt vi8t~x p o vi8~x p S7s q i~x "6u6 q tt t or t } pr t or

k y x

q q q

q q

t pr r a6wo

We have

k y x  t }t p r r w{wnx qa6wo s i~x "6u6s t } pr t or

k y {zx

we have to show that each composite function maps each That is, we must show that

onto the same image in

t pr r pr t or ha6wo v6u6s

m hl

q|

o n

3.3.2

Theorem. Let be a nonempty set, and let be the collection of all permutations of Then is a group under permutation multiplication.

d 88X

e "

y x x x x x y x 6"7e"""6&qw pr t or XS6 q| m l j i g 88hDf

"

group axiom.

Groups of permutations play an important role in geometry. For example, consider the set of all translations of the coordinate plane , that is, mappings , dened by

Here and are some xed real numbers and is arbitrary. The reader should verify that such a mapping is a permutation of . It is also easy to verify that the set of all translations of this type forms a group under the operation of permutation multiplication. The reader will no doubt think of many other groups of permutations of the plane, or , which are of geometric interest. Indeed, one of the most famous approaches to geometry, known as the Erlanger Programm, is by means of the determination of the geometric properties which remain invariant under a particular group of transformations [15]. There is nothing in our denition of a permutation that requires the set to be nite. Our last is a case in point. However, most of our examples of permutation groups will be example with and both have the same number of elements, concerned with permutations of nite sets. Clearly, if then the group of all permutations of has the same structure as the group of all permutations of ; i.e., one group can be obtained from the other by just renaming the elements. This is the concept of isomorphic structures of which more will be said in Section 3.4.

Note that has elements, where . There is another standard notation for a permutation which is often used. The permutation

of the set can be written in cyclic notation as , where the is interpreted to mean: 1 is replaced by 2, 2 is replaced by 3, and 3 is replaced by 1. The permutation

can be written as (1,3), where the cycle (1,3) is interpreted as: 1 is replaced by 3, 3 by 1, and the missing symbol 2 remains unchanged. Not every permutation can be written as a cycle. Consider the permutation

on the set . There is no consistent way of writing as a cycle. However, we can write as (2,3)(4,5). The interpretation is clear: 1 is unchanged; 2 is replaced by 3 and 3 is replaced
82

Ec"c

vG@

v@t")r"qr66nEwq8vftSS

@66cG1E

&"

EhpGE3

3.3.3

Denition. If is the nite set , then the group of all permutations of called the symmetric group on letters, and is denoted by .

Ga

DhEiEGe8cXE@GqXGqa

X&fe

")

~)a

@EshahhE Vq7n 3 v@" B X

onto, each ,

is the image of some unique and we simply dene, for each such that . It follows from this denition of that . This proves the existence of inverses, which satises the third Q.E.D.

is

by 2; 4 is replaced by 5 and 5 by 4. Note that corresponds to the product of the two permutations and on . For this reason we call (2,3)(4,5) the product of cycles. These two cycles are also disjoint, i.e., they have no symbol in common. Thus, in cyclic notation we shall expect a permutation on symbols to consist of a single cycle or the product of two or more mutually disjoint cycles. This fact is expressed by the next theorem.

Proof: We assume, without loss of generality, that

Since is nite, these elements cannot all be distinct. Let be the rst term in the sequence which has appeared previously. Then , for if , with , we would have , with , contradicting our choice of . Let It is easy to see that has the same effect as on all elements of appearing in this cyclic notation for . Let be the rst element of not appearing in this cyclic notation for . Repeating the above argument with the sequence

we arrive at a cycle . Now and are disjoint, for if they had any element of in common, they would be identical, since each cycle could be constructed by repeated application of the permutation starting at m. Continuing, we pick the rst element in not appearing in the cyclic notations of either or and construct , etc. Since is nite, this process must terminate with some . The product then clearly has the same effect on each element of as does. Therefore,

Q.E.D.

The reader can easily convince himself that the representation of a permutation as a product of disjoint cycles, none of which is the identity permutation, is unique up to the orders of the factors. A cycle of length 2 is called a transposition. Thus, a transposition leaves all but two elements xed, and maps each of these onto the other. A computation shows that

and, in general,

Therefore, any cycle is a product of transpositions. We have the following corollary of Theorem 3.3.4.
83

v@ v

"@ 3f v@ v@  7668v@  @v@ @v8  n n66n@D

c 8678 8v@ 8v8  h

hE q 67 ) tDXav7866 )

EE "8E E@ E@DX"qa8G8

" 76  76

7668 8 8

3.3.4

Theorem.

Every permutation

on a nite set

8hq3

3fV

8)

is a product of disjoint cycles. . Consider the elements

3.3.5

Corollary. Any permutation of a nite set of at least two elements is a product of transpositions.

The cycle (1,3,5) can be written as the following product of transpositions:

that is, as the product of two different transpositions. Similarly, in the previous two examples, the cycles (1,2,3,4,5) and were written as products of four and transpositions, respectively. This illustrates the fact that a cycle of length can always be written as a product of transpositions. Thus, if is even, then the number of transpositions is odd, and if is odd, then the number of transpositions is even. For a permutation which is not necessarily a cycle, the following theorem holds.
) $ (

3.3.6

Theorem. If is a permutation on symbols expressed as the product of transpositions and also as a product of transpositions, then and are either both even or both odd.
0 ) 0

This is quite an important fact, the usual proof of which may seem a bit articial and can be found in [17]. A permutation will be called even or odd according to whether it can be expressed as the product of an even or odd number of transpositions, respectively. Permutation of data is one important reason for studying permutations and permutation groups in signal processing and computer science. Matrix versions of the Fast Fourier Transform (FFT) involve sophisticated shufing of data which is accomplished with the use of permutation matrices. Let denote the group of permutations on and the transpose of the matrix .
g hf H IG $ D FE$ 1 A CB@

3.3.7

Denition.

Let

and dene the

matrix

by
w ` tf V a ` xvusbSX @ 0 i p

is called a permutation matrix.


H G 8H 'G  yH G

. Using this It is well known that permutation matrices are invertible and that fact, it is easy to see the set of all permutation matrices forms a group under matrix multiplication which has the same structure (i.e. is isomorphic to) as . Note that if is an matrix, permutes the rows of by and multiplication on the right by then multiplication on the left by permutes the columns of by . Hence, we can write .
$ D E$ vT H QR H  p TR 

3.4 Isomorphisms Throughout this book, we deal with various kinds of abstract mathematical systems. The name abstract mathematical system is used to describe any well-dened collection of mathematical objects consisting, for example, of a set together with relations and operations on the set, and a collection of postulates, denitions, and theorems describing various properties of the structure. It is a fundamentally important fact that even when systems have very little structure, such as semigroup or groups, it is often possible to classify them according to whether or not they are mathematically similar or equivalent. These notions are made mathematically precise by the morphism relationship between abstract systems.
84

% '$

G 7 H 8 H 'IG

8 97

% &$

G)7@DE8v@D@@
 r q y @ 6 "

% 5$

d TR P ` ` X V TR P ecUSba SYW"USQ

 c 7

3 42

y @

$ D $

H IG

H G

!  #"          

v 6

H IG

8H G

H " IG

Thus, a homomorphism is required to preserve the operations of the systems; i.e., performing the operation in and then applying the function to the result is the same as rst applying to each and and then applying the operation in . If such a function exists, then the two systems are said to be homomorphic. By denition, a homomorphism need not be a one-to-one correspondence between the elements of and . One-to-one and onto functions that preserve the mathematical structures of systems lead to the extremely important concept of an isomorphism.
jk i g k s k e j i g e {hs

3.4.2

If such a homomorphism exists, then we say that the two systems are isomorphic. Hence the idea that the two systems and are isomorphic means that they are identical except for the names of the from by renaming an element in with the elements and operations. That is, we can obtain name of a certain element in , namely , and by renaming the operation as . Then will be . The next theorem we prove is very obvious if we consider an the counterpart of isomorphism to be a renaming of one system so that it is just like another.
k ldBq u r k l

3.4.3

Similarly, Thus, for every


j e #9q k {9q ~9u9~u9 k x x j e j x e q j xe q j xe q

and Thus,
q

.
85

m x

j xe ucq m~htmo"9q x q x x q j e

q ~u9 m x j xe q x

q j e "9q

j x e q m ~9

z fx

j e 9q

Therefore, Moreover, for

is the identity of we have

k I9ucq I9~Y9~u9 k x x j e q j xe j e q j x e q j xe q

we have
j e q "9 k { k { k I9q x x x j e

k x j x e S~9q

z x p"

k z k lfcSx

k z k lFSx

Proof:

Let

. Since

is onto,

such that

z Cx

j x e q x E ~u9l~muq

j e "9q

Theorem. Let and an isomorphism, then

be two groups and suppose e is the identity of is the identity of . Moreover,

. If

. Then

j xe q uc k x

k Yfq u r

Denition. Let into is a homomorphism


k

and

denote two systems. An isomorphism of which is both one-to-one and onto.

z y g p{Wx

j y e cq k

i j xe q j y ~u9f~}|u9q i xe

j y e ~9q k

jk i gk e k Qpolnml q i j xe ~u9q

k lwvtsq u r k y k i k x k

j i g e Bhfd k

3.4.1

Denition. Let to is a function


k l

and

denote two systems. A homomorphism from such that for each ,

k x

m x

y tx i

y x i y

k l

is

Q.E.D.

The essence of the theorem is that isomorphisms map identities onto identities and inverses onto inverses. It is immediate from our discussion that every system is isomorphic to itself; we simply let be the identity function. To show whether or not two different systems are isomorphic can be a difcult task. Proceeding from the denition, the following algorithm can be used to show that two systems and are isomorphic: STEP 1. Dene the function

from

to

STEP 2. Show that STEP 3. Show that

is a one-to-one function. is an onto function.


~u ~}|u

STEP 4. Show that

Step 4 is usually just a question of computation. One computes both sides of the equation and checks out whether or not they are the same. We illustrate this procedure with an example.

3.4.4

Example:

We want to show that


p e

is isomorphic to .

STEP 4. For

, we have
I # f

Another example of two isomorphic groups was mentioned in the previous section. There we noted that the symmetric group is isomorphic to the group of permutation matrices. This fact signies plays an even more the importance of the symmetric group in applications. In the theory of groups, central role; it can be shown that any nite group is isomorphic to some subgroup of for some [17]. However, nding the right candidates for isomorphisms in order to establish this fact is a nontrivial task. To show that two systems are not isomorphic means that there cannot exist a one-to-one correspondence which preserves the algebraic structure of the systems. This is a trivial problem whenever the two systems have a different number of elements. For example, and are not isomorphic as there cannot exist a one-to-one correspondence between their elements. Similarly, since is countable and is uncountable, they can never be isomorphic as algebraic structures.
86
m

STEP 3. If that

, then . Therefore,

. Thus, for every is onto.

, namely

, such

STEP 2. If is one-to-one.

, then

, and taking the natural log we obtain that


5css

~h

STEP 1. Dene the function


l

by

s

{'~

t

~

F

hxutp}Yl

{h}

which is proposed as a candidate for isomorphism.

. Thus,

3.5 Rings and Fields The systems we have considered thus far have been concerned with sets on which a single binary operation has been dened. Our earliest experience with arithmetic, however, has taught us the use of two distinct binary operations on sets of numbers, namely addition and multiplication. This early and important experience should indicate that a study of sets on which two binary operations have been dened is of great importance. Modeling our denition on properties common to these number systems, matrices with elements in one of the number systems, as well as such structures as the set of all or the set of all polynomials with coefcients in, say, the set of all integers, we now dene a type of algebraic structure known as a ring.
U

3.5.1
t

Denition. A ring is a set together with two binary operations + and of addition and multiplication dened on such that the following axioms are satised: is an abelian group. is a semigroup. is weakened to
4spB4 t" 5W  B Yx" t

is a commutative semigroup is called a semiring.

In subsequent chapters it will become apparent that the theory of rings and semirings plays an important role in the analysis and application of image algebra. Of the many examples of rings which come readily to mind from experience with common systems of elementary mathematics, the most natural is, perhaps, the ring of integers with the usual addition and multiplication. However, if we examine the properties of the ring of integers, we note that it has properties not enjoyed by rings in general. Among these properties are: (i) (ii) (iii) The existence of a multiplicative identity element, which must be unique, called the unit element, and which is usually designated by the number 1. The commutativity of multiplication.
e

The nonexistence of an element such that for some positive integer , (where is dened to be the sum of s). For every nonzero , i.e.,

On the other hand, the integers themselves fail to possess a most useful property, namely that:
S

there is an element in is a group.


, denoted by

, such that

These properties lead us to some further denitions.


87

(v)

For every nonzero


S m"}

there is an element in , denoted by , such that ; i.e., every nonzero element has a pseudo inverse.

p

When it does exist in a particular ring, the element also fails to have the slightly weaker property:

is called the inverse of a. In fact,

U p

(iv)

then

If axiom
t '

F" 

U 

t '

3.5.2

Denition: If a ring satises (i), it is called a ring with unity. If a ring satises (ii), it is called commutative or abelian. If a ring satises (iii) it is said to have characteristic zero. If it satises (iv) it is called a division ring or a quasi-eld. A eld is a commutative division ring. A ring which satises (v) is called a von Neumann ring.
| U

As we noted, is a commutative ring but not a division ring. On the other hand, is an example of a commutative division ring and, hence, a eld. It is also an example of a ring with unity and characteristic zero. Other well known examples of commutative rings are and . In order to give some indication of the generality of the concept of a ring, we turn to some less familiar examples of rings.

3.5.3
(i)

Examples: The set of real valued functions on a set together with the operation of function addition is a commutative ring with unity. We know from Theorem 2.8.2 and multiplication that is an abelian group. That is a commutative semigroup follows from Denition 2.8.1 (iv) of multiplication of real valued functions. For example,

Thus, Commutativity and distributivity of multiplication over addition can be demonstrated in a similar fashion. The multiplicative identity is, of course, the constant function . For any function f with the property we may dene a multiplicative inverse by . However, since there are functions with but for some , in contrast to is not a division ring.

An important observation concerning example (i) is the fact that the operations on are induced by the operations on . That is, the addition of two functions is dened in terms of addition of real numbers, e.g. , and multiplication of two functions is dened in terms of multiplication of real numbers. In view of this observation, it should be clear that the set can be replaced with any eld in these two examples and that the result would be a commutative ring with unity , where the addition on is dened in terms of the addition on , e.g., , and likewise for multiplication. In addition, due to the fact that the operations on are induced by the operations on , the ring behaves very much like the ring . The only missing ingredient is the lack of multiplicative inverses for . Hopefully the reader is beginning to realize that in the study of any sort of mathematical structure, an idea of basic importance is the concept of two systems being structurally alike or identical, i.e., one being similar to the other or one being exactly like the other except for its name and the names of its
88
s

q 

c 4

` Y

W&

` Y X 6 Va` Y

(ii)

Consider the cyclic group . For we dene the product to be the remainder of the usual product of the integers and when divided by . For example, in we have . This operation on is multiplication modulo . We leave it to the reader to check satises the ring axioms. that the system

@ 8 !W

6  3 1   7542"1

t

U 6 VT

h

'(&%" $~b~# I!"~ I!                 ~~~# m      


~ I U p

'  &%"!0&m)

6  3 @ 8  DCBA9~W

u q V

W&

X lmVp 6 7  Q 1  G E  SR2PII

     WIpi~ph

X g

l

X V

q ~ ~tIsg~#rh     q

@   !~II G E HFW

f  e !9 d

elements. In algebra, the concept of being identical is always called isomorphism. The concept of two rings being just alike except for names of elements leads us, just as it did for systems with one operation, to the following denition.

If such a function exists, then we say that the two rings are isomorphic.

We leave it to the reader to convince himself that Suppose that is a nite set with elements, say be the function dened by

An analogous argument shows that . This proves that the rings and are isomorphic. Of course, by arguing in an analogous fashion, we can prove that for any eld the corresponding rings and are isomorphic. Thus far, all our examples have dealt with commutative rings. However, noncommutative rings play an important role in the structure of the image algebra which is the central theme of this treatise. We present the most pertinent example of such a ring.

89

l il

where the

s are all in . The set

of all

matrices over

is similarly dened.

g PgI gf I

fI n g ff I

 i i

3.5.6

Example: Let matrices of form

be any eld, say

, or

, and consider the set

of all 2 2

&|{

z

 {g g

~ &9{ }  &9d   ~ &9d } s p p x p x s u hhh u x p l x w F&&& x x h h h u l Fx I l & F&& yx  u u x  vF F u l x I&& xI x 4u l I& hhh h h & h p y4u vI x Rw p u I  RI F wu u 4u p v4 u w

We know from Example 2.8.3 that

hhh p l I&& 4u u 4u v4 4 u qrp o4d&I& lhhh l k mn k t s &9d h i j e F&h& g j (e f j f(e i j Fh&h& g j f j He I&& Pe (e i h h g i hhh g f

is a commutative ring with unity. . Let

is one-to-one and onto. Furthermore,

and Hadamard multiplication

i j e I&& g j Pe f j (e i hhh g f

hhh i j && g j f j

&9d

3.5.5

, where addition corresponds to vector addition and Example: Consider the ring multiplication is dened by multiplying the corresponding vector components, i.e.,

v  v x yw

v &y v v v

 w R sWIR5 v

3.5.4

Denition. An isomorphism onto such that

of a ring

with a ring

is a one-to-one function mapping

e & (e Pe i hhh g f

x 5w

that is, by adding corresponding entries using addition in . After a few moments of thought, it is clear from the axioms of a eld that is an abelian group with additive identity

If equals or , then this multiplication corresponds of course to the regular matrix product over these elds and can best be remembered by

Of course, the analogous denition holds for matrix multiplication in which the sum goes from to . In short, everything we said about the system is also valid for the system .

where is the entry in the th row and th column of property is proved in a similar fashion. The last example proves the following theorem:
90

. The distributive

I 

  I

To show that tributive laws. tion in

is a ring, it remains to prove the associative and disUsing the eld properties of and the denition of matrix multiplica, then if denotes the entry in the th row and th column of , we have

9)  &

where

I I I

I I I I I I I &W

Matrix multiplication on

I " z9d z  I 9)  9d z( W

and with additive inverse

is dened by

HI I d

I I I C ) R&W (I Id F" d

(I Id" IC dD

Matrix addition on

is dened by

I I

The rings of matrices over a eld are an important tool in the theory and practice of image transformations. In this context, they can be viewed as corresponding to certain functions called templates, and matrix multiplication, when viewed in this light, can be shown to correspond to template convolutions (Chapter 4). This provides an elegant demonstration of the associative law for template convolutions. On the down side, we need to point out that the ring lacks some important algebraic properties. Since matrix multiplication is not commutative, is not a commutative ring. Also, one of the most important properties of the real number system is that the product of two numbers can only be zero if at least one of the factors is zero. The working engineer or scientist uses this fact constantly, perhaps without realizing it. Suppose for example, one needs to solve the equation

The rst thing to do is to factor the left side:

One then concludes that the only possible values for are and 5. Why? Because the resulting product is zero if and only if one of the factors or is zero. The property that if a product equals zero then at least one of the product factors must also equal zero, does not hold for rings in general. For instance, the denition of matrix product in shows that

An important consequence of the concept of zero divisors is provided by Theorem 3.5.10 below. Let be a ring and let . We say that the cancellation laws hold in if , with , implies and , implies . These are multiplicative cancellation laws. Additive cancellation laws hold since is a group.

3.5.9 3.5.10

Denition. An integral domain is a commutative ring with unity containing no zero divisors. Theorem. The cancellation laws hold in integral domains.

91

!  H

Proof: Suppose that

is an integral domain and that

with

. Then

 S

T s

id9 C 9 R

3.5.8

, then and Denition. If and are two nonzero elements of a ring such that are divisors of zero or zero divisors. In particular, is a left zero divisor and is a right zero divisor of the product .

Similarly, the Hadamard product of the two nonzero vectors (1,0,0,...,0) and (0,0,...,0,1) in zero vector (0,0,...,0). These ideas are of such importance that we formalize them in a denition.

is the

&i

Wr

 y g9dFz y 

!rt P

Pyh

3.5.7

Theorem. If is a eld, then the set of all forms a ring under matrix addition and matrix multiplication.

matrices with entries from

a !

Since , and since has no right divisor of zero, we must have A similar argument shows that , with , implies that

. Thus,

Q.E.D.

Similarly, if , then multiplication on the right by leads to the conclusion that must be zero. This demonstrates that a division ring contains no divisors of zero. Thus a division ring lacks only commutativity of being an integral domain. However, since commutativity was not used in proving Theorem 3.5.10, we see that the theorem also holds for division rings.

3.6 Polynomial Rings An important consequence of Theorem 3.5.10 is that we can solve polynomial equations in which the polynomials can be factored into linear factors in the usual fashion by setting each factor equal to zero, as long as we are dealing with polynomials with coefcients from an integral domain or division ring. This leads us directly into the topic of polynomials with coefcients in a ring.

where are called the coefcients of , and for all but a nite number of , then the largest such value of is the degree of . If values . If for some no such exists, then is of degree zero. We also use the notation

whenever for all . Any element of is a constant polynomial. The most important constant polynomials are the zero polynomial and, if has unity, the unit polynomial 1. Addition and multiplication of polynomials with coefcients in a ring are dened in a way formally familiar to the reader. If

then for polynomial addition, we have

92

' "&&

' D&&

% # % C # 

% # % C # 

&

&

# !

# !

  B

  B

and

 

' (&

 % # % & # 

&

% 

# % % 

&

&

 

&

# $!

# !

 5

@ # A

3.6.1

Denition. A polynomial informal sum

with coefcients in a ring

in the indeterminate

 

 

dy&

&y

 

 

! "



 9

2 31

 5

7 2 861

p i

2 41

) 0

Suppose that

is a division ring and

with

. Then

d d

7
1

is an

where

commutative ring, then


   "

need not be equal to


F"HG$    A   B#2   F % 6

. However, associativity of polynomial


   

multiplication follows directly from the fact that are as above,


6 7 & 86 C   D5 E 

is a semigroup. In particular, suppose


   C P"      $

Therefore,
 3 t  6 R DR  #b @ x6 @ b  6 b R w R DR  xHb ' b % @ R w DR C   v    "    F FF#!F u

The fact that multiplication distributes over addition can also be proven in the same straightforward but cumbersome fashion. Thus, our discussion shows that the three ring axioms hold for polynomials with coefcients in a ring. We state this observation as a theorem. Theorem. The set of all polynomials in an indeterminate with coefcients in a ring is a ring under polynomial addition and multiplication. If is commutative, then is also has unity 1, then 1 is also the unity for . commutative, and if
A v u A v h u A v du A e A A v du 

3.6.2

Thus, is the ring of polynomials with integral coefcients, is the ring of polynomials with real coefcients, and is the ring of polynomials with complex coefcients. The elements of these rings are the polynomials one encounters in elementary algebra. A less common ring of polynomials in one variable is the ring . Here we have and The most important polynomial domains arise when the coefcient ring is a eld . The ring of polynomials over a eld has a number of properties which parallel those of the ring of integers . For example, we know from elementary number theory that if is a positive integer and any other integer, then there exists unique integers and such that This is also known as the division algorithm for the integers. A similar result holds for elements of
93
m v  u o m g n n r sqC p qi f e YHc C C " " n o m v  u m g l g  h h k  h  (h  g    h   h $$    g  h   i i j1    (h  i h  h  (h    h  $  h v du   g v du f

g FF C v  

!$" u Q   

7 t 6 & 7

i 

g t @ i t 

t @ i t 

& 7 t

& 7 t

Also,
R i I S C S r p sq2 i I i  & 7 i DR   $ I

g h6 @ b  6

7 & 86

b %

f e c YHdb '9 b % @

, and

. Then

where

. Although polynomial addition is obviously commutative we note that if


6 6  @ & 786 5 6 '  6 @ 7 & 86 5

2 3##

 1 0# % 7 & 86 & 7 i DR 7 & ab R

7 y & ab 4& 7

 '(' $#!    "    ) % & % 6 4  6 S X ` X V T aYWU2 7 & 86 DR w   S & 7 v  u t @ i t  D R 7 & ab   F & 7 t & 7 C i Q %   R 6 '9 6 @ i ' @

  7 & 86 5 4% R

. For multiplication, we have

is not a

and

& 7 i & 7

DR

{ z Gv 0kav z y y

z Yv

{v Pv 0 z z y y z v z v kav 0 z y y y z !v { v !v Qv z z z y y y y y z v 1v #!v  z z y y y { z v y z v y z v y  z v y z #!v { z v

z v y z v $v z z v { z qv y y x y y v z 9 z !v { z v y y y z v y

v z 9 } 9 y  90

z Yv y

}

v z

H y

z !v y

{ z qv y

z v

z Yv 1v #!v  z z { z Pv y y y y x z v #Pv z y y z v z v 0v z y y y w u t z (qv Uv a!v z z z Qv { y x y y y z v y y y { 0H' z #!v y { z Pv z v

z Yv y

 z 1v z v

y x

w vu t

v   v  } { z 91a0#q1qUv y

v |   v |  } | { z h'a0#jaq~Uv w vu hB(t

3.6.3

be two elements of , with and Then there exist unique polynomials

y x

and

Theorem.

(Division Algorithm for

both nonzero elements of and and in such that

y 9

Proof: Consider the set any other , degree for some . Adding

w vu (t

with the degree of

less than

) Let

. Let such that for . Then is of form to both sides of this equation we have that

z Pv

Gzv { z Wv y x y z v

Next we show that the degree of

is less than

. Suppose that

with

{ z Pv

Now let the left side of Equation I be represented by

which is of degree strictly less than . Furthermore, setting and substituting into the right side of Equation I we obtain is an element of of degree less than , contradicting the fact that to have minimal degree. Therefore must be less than . We have left to show that and are unique. Suppose that

v z 9

9 y

Since the degree of is less than the degree of or . But then we must have that
y x y x z v y z v y z v y  0#0  vz9 v }  y y v { z Pv y v z $s v z k9 9 y H y y y z v { z qv z v { z qv y  v $z H y z !v y z v wduv t z y z sv # y z v

Then subtracting the second equation from the rst, we have

and

if

. If

!zv Qv z y y x { {

and let

 ##

y a

{ z v

and

, then

. Then

, we must have that or

z v y

{ z v 0 y

94
z v 0v { z y y

. Thus, was selected

(I)

Q.E.D. The polynomial in Theorem 3.6.3 is called a divisor of whenever is the zero polynomial. The polynomials and can be computed by the same long division as used in high school for dividing real polynomials. If is a eld or a commutative ring and , then the function dened by
F hd((WG  q38 Y q3 k   QF'

for each is a homomorphism. We leave it to the reader to check that preserves the eld operations of addition and multiplication. It is common practice to let the symbol denote the evaluation . This notation provides for the following denition.
0$ d($

3.6.4

Denition. Let be a commutative ring or eld, . then is a zero of


F

, and

. If

In terms of this denition, the problem of solving a polynomial equation is identical to that of nding all the zeros of the corresponding polynomial. Of course, the zeros of a polynomial are found in terms factoring the polynomial into products of lower degree polynomials.
d $ d 4d(F

3.6.5

Corollary. An element Proof: Suppose that such that

is a zero of
0$

is a factor of

in

Factorization of polynomials plays an important role in the optimization of certain image transforms (Chapter 5). Similar to the factorization of numbers into prime numbers, polynomials can only be factored into prime components that cannot be factored any further. More precisely, a nonconstant polynomial is an irreducible or prime polynomial in if cannot be expressed as a product of two polynomials in , both of lower degree than the degree of .
95
  d d( F 

$



4$

0 

Hence, and Conversely, if is a factor of , we obtain


  04 F 

. Thus, is a factor of . , then applying the homomorphism .

to

Q.E.D.

0$

0

0 F F

Applying the homomorphism


, we obtain



$

04$

F

F

where the degree of

is less than 1. It follows that

for some

dF9F

and

. Then by Theorem 3.6.3


. Thus

0F

Y$

F

0F

F0#



~ dl

U

0#

hl(~

d$

In addition to factorization into prime components, the ring of polynomials over a eld has many other properties which parallel those of the ring of integers. For example, the set may be partitioned by any polynomial of degree into a ring
d( hBW

Then since the zero element of is also an element of , and if and only if is a divisor of . In analogy with arithmetic modulo , we denote this last condition by . We now dene addition and multiplication on these equivalence classes by
F F

and

respectively, and leave it to the reader to convince himself of the following facts: . (1) Addition and multiplication are well dened operations on (2) has [0] as zero element and [1] as unity, where 0 and 1 are the zero and unity of respectively. (3) is a commutative ring with unity.
$HH d $

, we let the polynomial represent the equivalence class , As for the elements of keeping in mind that polynomial arithmetic is performed mod . For instance, if denotes the quotient ring of polynomials mod , and and are viewed as elements of , then . In general, if denotes the ring , then we consider the elements of this ring to be polynomials on which of polynomials mod multiplication is performed by replacing with 1 wherever it appears rather than using the equivalence class notation [ ]. One reason for our emphasis of polynomial rings is the immediate connection between convolution of sequences of numbers and polynomial products. Convolutions of sequences are used in digital signal processing as the primary means of ltering. In image processing, convolutions can be used for such methods as edge detection, image enhancement, and template matching. A commonly used lter is the non-recursive nite impulse response lter. A nite impulse response lter is simply a tapped delay line in which the outputs at each stage are multiplied by xed constants and then summed. In precise mathematical terms, let and be two sequences of numbers. We assume that whenever or for some xed positive integer . Similarly, whenever or for some . If the sequence s represents the sampled input signal and f the sequence of lter tap weights, then both input and lter sequences can be represented by the polynomials
F

96

C`Y c b( a )9 X

d

BA ) (

Cqra g C

u

$' (

@ u u ehiu 8 vSeu u er u 8 gfd

d(

d$

 G '



$

Cd fe

 5 5 W A6 ( 2 UA V (

$

A 1 D2 ( ) UA T ( 1

Q

 F l F

F  ' 

a 

y  W%wu !u S

r Cr sa Cd C qe Q p 5 c iC e Y d C`

$

h

6 H y u  Wxwu 9!vtp 8

$H

F



&

A C D# (

of equivalence classes just as

was partitioned into the ring

. For any

@89! 37 5 3 1  8 6 42 %(0) ( &' $% # "!      


F3~ # YG 9Y$' d( d(k

we dene

s F $

F

RP A E SQIH GF (
  d  d

$ 

Y c C ` )h X

9 9



d(

$H

H u

The integer indicates the number of stages in the lter and is assumed to be much smaller than which is assumed to be very large. The linear convolution of the two sequences is simply the polynomial product and the coefcients of are called the output sequence of the convolution. Another form of convolution is the cyclic convolution, which is closely related to the linear convolution. Here the input sequence and lter sequence are assumed to have the same length. The cyclic convolution, of the two sequences is dened as the polynomial product ; that is, in

where the coefcients of form the output sequence. Linear convolutions can be computed from cyclic convolutions by separating the input sequence into short sections. Each section is then individually processed as a cyclic convolution and properly merged is our input with the other sections to produce a linear convolution. For example, assume sequence and the desired lter sequence. Suppose that we wish to compute the linear in terms of a cyclic convolution on sections of length , where and is convolution much larger than . One method for achieving this is as follows. For and we rst construct polynomials , having coefcients

Note that there is an overlap of coefcients in the sequences and . To illustrate the construction of these polynomials, consider the case where and

and

. Then

Now suppose that

represents the linear convolution

and that

represents the th cyclic convolution segment. Then, except for can be found among the coefcients of the polynomials the rst coefcients, all the coefcients of , where . A quick check shows that these coefcients are as follows:

where . As can be ascertained from the next example, each cyclic convolution produces coefcients of the linear convolution, the remaining coefcients are simply discarded.

3.6.6

Example: Suppose denotes the input signal with degree is of length three with tap weights is given by linear convolution

very large. If the lter , then . The

Thus, for convolution in terms of cyclic convolutions of length we obtain

. Computing the linear by using the formulation

97

q n| q q o k p  ) Q {t n j #op 2mInm s r o q q p o n SQvn| 6{2Inm e2nm l p j v o q z Iqp l | m q o | p l q~ p op m ~ l z y {y m o |m m y no q Iq  n{q q Ino q 2In 6~m {qs 2sWnmIno q 2vilmInmo ~q 2nvl o r q p n po m | i2In6s i2Inp Wm q s Si p s p ~ s k p o q j j vj z l z l z l l b Vw Dp w l  b w p w l i w Dp | w l w Dp %~ w l  o 2nm l o m 2Invl j  9nSQ)2In6#2Inm i2nm l jo m sr o q p o ~ po m o msr o mq p o m vn6{2InWt2In2l n l e} 2In2l |qu | qu qu beb Sxq q Sp q xq q Sp | q x q q ~p %~ q g x j p p j | q q q e z Viw ip w q   b b z x w p w q b z w p | w q wp %~ w q q q q o o 2Inm q v 2 2Inm | q 2Inm %~ q o kD k vj m o ~ u6sr m e}y 2Insox vns Sq p ~ qu p e}yw wx pq

Ve}z~| y xv0s su p

o m 2Invl } y i%Viw | } |z p m jo m r o mq p o m b nswq y o y InSQ2In6s2InW#2nvl m o qy In{h

){}z~| yw 9xwSvtq qu p o m vnvl

o2Inm6srV2nIWqpvnvl o m o m j

Therefore,

, the rst two coefcients of the cyclic convolution are discarded and the remaining , which in this case is , matches all the coefcients of the linear convolution except for the rst coefcients, namely and .

Since

Figure 3.6.1 provides a pictorial representation of the computation of a linear convolution as a convolution by sections. Here the lter is superimposed over part of the input sequence. After the necessary arithmetic computation is performed the lter is moved one step to the right and the computational process is repeated. The reason for computing linear convolutions in terms of cyclic convolutions is the existence of a multitude of fast algorithms for computing short cyclic convolutions [5, 22]. The concept of a ring of polynomials in one variable can be generalized to rings of polynomials in several variables.

3.6.7

Denition.

If is a ring with unity 1, then for any , we have that . But by denition of polynomial multiplication, . Thus, , which means that commutes in with any element of R. Similarly if has unity, then so does and, hence, in we have

98

But then, clearly, see that in forming be observed, however, that if

or . By repeated applications of this argument we , the order in which the s are adjoined is immaterial. It should does not have unity, then it is meaningless to consider the product

 '1$

a v 4 I FQ I v D  I v ) I ) #2I  ba9SQ9)e%e  v "i2v


s s0 s1 s2 s3 s4

and, hence,

......

multiplication

-1

f2

f1

f0

addition

s 0 - s2

s1 - s3

s2 - s4

......

Figure 3.6.1 Linear convolution by sections.

For any ring

5 ! 5 ED CA @8 ' 5 B9! 5

342'10)%'%&%$#"   (  ! 
, we dene recursively

i p   d   1     ! R hf1R$eg&a1 'f1R$e"2QRd'  !   3 R c#! E D bR C aB`! E D Y C X'WVUR RF F A @8 RF F A R@8 !

5 HPA 5 7IH' 5 "GB8 ! E D C 6 8 5 ! E D C F A @ @

2RPQT2S"Q  !  R  '

in terms of the denitions of multiplication which we are using since, and this is the crux of the matter, cannot be an element of . We shall not be too concerned with this subtlety as all rings we will use in our applications will be rings with unity. As we have noted earlier, rings of polynomials in one variable provide a useful theoretical foundation for studying convolutions used in one-dimensional signal processing. A similar situation exists for studying convolutions for higher dimensional signal processing. For the analysis of 2dimensional convolutions, which are a basic tool in digital image processing, the rings and , where , play a key role. Here denotes the quotient ring of polynomials mod and mod ; i.e., the elements of this ring are polynomials in two variables on which multiplication is performed by replacing and with 1 wherever they appear, rather than using sets of equivalence classes. As before, multiplication of elements in corresponds to linear convolutions, while multiplications of elements in corresponds to cyclic convolutions.

3.7 Vector Spaces The theory of solutions of systems of linear equations is part of a more inclusive theory of an algebraic structure known as a vector space. As we assume the readers acquaintance with this topic, our treatment of vector spaces will be brief, designed only as a recall of basic concepts and theorems. Although vector space theory as covered in elementary linear algebra courses is usually concerned with the Euclidean vector spaces , the operations of vector addition and scalar multiplication are used in many diverse contexts in mathematics and engineering. Regardless of the context, however, these operations obey the same set of arithmetic rules. In the general case, the scalars are elements of some eld, which may be different than the real numbers.

3.7.2

Examples:
99

rz &m

u k

If the eld symbol instead multiplication for element from

of scalars is clear from the context of discussion, then it is customary to use the of ( ). We also note that in comparison to the algebraic systems discussed thus far, a vector space is not a binary operation on one set, but a rule which associates an and an element from with the element of .

The elements of

are called vectors and the elements of

are called scalars.

k ty qvusr

u oy m qpSGnl

tz m rz )qo

3.7.1

Denition. A vector space over the eld , denoted by , is an additive abelian group together with an operation called scalar multiplication of each element of by each element of on the left, such that and the following ve conditions are satised:

q y s & Sy #d 0t wu

y s s y q wu y & d 0t t iwvu

u k

y s t "xwvu

q h  y g2ft ewu q y s

k r | Uz r  rm IY qr pm z | t  z  zm I| r2z 7m r o  rz o r z am }|Y 2zo m kqpr4m z u

t s q r

h d q d y cvu

yw w ~ w {yw x yw

One of the most important concepts in the theory of vector spaces is the notion of linear independence.

then the vectors in are said to be linearly independent over . In this denition, 0 denotes the zero vector in and 0 denotes the zero of . If the vectors are not linearly independent over , then they are linearly dependent over . Note that if the vectors are linearly dependent over , then for some combination of scalars for at least one such that

That is, can be expressed as a linear combination of the remaining vectors; i.e., remaining s.

3.7.4
(i)

Examples: The vectors

(ii)

The vectors (-3,6), (3,-4), and (-1,0) are linearly dependent since

 &c B  g y c  "G "US'

q ## y&#  p ' "  S G    S

are linearly independent (over

) since

100

iy)y a" } fVy

In this case we can solve for

ySf'2s20#Xa

depends on the

2gSf"S&g`

b#v#XX)sg

# g#GX)sgGX)sg

f c

"S&g&g

3.7.3

Denition. Let ( ) be a vector space and combination of scalars

a subset of

sg 2

then axioms

through

sgp& h"WyqVQ gd1Ud&

will hold. Thus,

Gu% hp

(ii)

It follows from Example 3.5.6 that for any eld , is an additive abelian group. It is also easy to see that if one denes scalar multiplication by

is a vector space over

. If for every

)bg

bg

(i)

. It follows directly from Theorem 2.8.2 that Consider the set which satises axioms through for all pairs of real numbers is a vector space over .

is an abelian group and . Thus

ba V fg&g

(iii)

The vectors

are not linearly independent since

is a vector space, then certain subsets of themselves form vector spaces under the vector If addition and scalar multiplication dened on . These vector spaces are called subspaces of . For example, the set is a subspace of . Obviously, if , then dening , we see that for any real number . Thus, and axiom is satised. The remaining four vector space axioms are just as easily veried. However, in order to show that a subset is a subspace of a vector space , it is not necessary to verify axioms through . The following theorem, which we state without is closed under vector addition. proof, shows that in addition to axiom , all we need to show is that

3.7.5

Let be a subset of a vector space That is, combinations of the vectors

Then if

and by 3.7.5, is a subspace of . The subspace of is said to be spanned by and the vectors of are called the generators of the vector space . If , then we say that is a span for . In particular, if is a span for , then every vector is a linear combination of the vectors in . For example, if , then Thus any vector in can be written as a linear combination of vectors from . Therefore, . Similarly, if and , then and, therefore, . It follows that spans are not unique. Closely related to the notion of a span are the concepts of basis and dimension. To students of science, the concept of dimension is a natural one. They usually think of a line as one-dimensional, a plane as two-dimensional, and the space around them as three-dimensional. The following denition makes these concepts more precise.

3.7.6

" #un s " fe1 q  A1r1 dv " un s   6#r1 h9P210) Y  g      e " q  e c A 1  A@Y  r  r     Y     2G2 61 " 1  s s   s  s GD c Y  s Y! a5 ! Y 5 55 7 D D x i Syx D   x x x 5 x  s  x x  a5 H 5 x x i Syx x D x i Syx x x i Syx c 5 Syxw vGu s $ t x x i c i @ggh D fff  s qi fff e rpUEhg0 D B c d b&   H b5 a  5  ` GWV  T SRP Y X U  IQ H D AC "C F GC D EC % 4  4 B%&71575B1(5  9       8 4 pA7)5 p@ (676 8   5 5 5 76 5 76 4 " ( &  $ "    ' $%!#!

is a non-empty subset of a vector space Theorem. If the following conditions hold: (i) (ii)

over

, then

and let

denote the set of all linear

, with

and

we have for and

, and

with

Therefore,

are elements of

Denition. A basis for a vector space is a linearly independent set of vectors of which spans . If a basis for contains only a nite number of vectors, then is nite dimensional.
101

5    3210)

y& h %v

is a subspace of

, where

3.7.7
(i)

Example:

(ii)

If

as a linear combination of the basis vectors

as an n-tuple vector since the scalars express uniquely in terms of a linear combination with respect to the basis . We remind the reader that a basis for a vector space is merely one of many kinds of bases encountered in studying various mathematical systems. A basis for a vector space portrays the algebraic properties of the vector space and is intimately connected with the linear algebraic properties of the space. Once a basis for a mathematical system has been established, we may proceed to describe the properties of the system under investigation relative to that basis. The particular form in which these properties manifest themselves may well depend upon what basis we chose to study them. The topological space has different topological properties than the von Neumann space . The most important facts about a vector space basis can be summarized as follows. Let be a vector space and . 1. If is a basis for , then every vector of can be expressed uniquely as a linear combination of the elements of . 2. If every vector of can be uniquely expressed as a linear combination of the elements of , then is a basis for . 3. If is a basis for and with , then is not linearly independent. Statement 2. follows immediately from the observation that the zero vector has a unique representation in terms of the s. Thus, the s must be linearly independent. Statement 3. implies that the number of elements in a basis of a vector space must be unique; that is, every basis of a vector space has the same number of elements. With this in mind, we dene the dimension of a vector space as the cardinality of any basis for .

3.8 Linear Transformations In the study of vector spaces the most important types of mappings are linear transformations. It should, therefore, come as no surprise that linear transformations from one vector space into another play an important role in image algebra which is concerned with the transformation of digital and continuous images.
102

p rrrp p z AghEv hj  u prrr p p m Gz @gg0v j k j z S k Gz Ghg0r hv j  prr p p u mvv hgh v j k G A u mvv )h|h 0 p v hj d p p  k 7q q k 0#q 0 q k Ao q #q o q q dk 0 Gp q q k 0 p o q wv p q o lj } z iz v iv j ij k 0%A@gh6T0h@T0h@ z z uzprrr p j m k b@G@gh0p@ z i p rrr p j i k AAAgh0p0r~} |gtpghgqx{@yAghp21qtghr1qrgqxw'1pr1qtghzr sqd1onlpi u o p q rz r r p m k z i p r r r u p r r p p o p m k v i u p r r p p m k j
Let is a basis for Let Then is a basis for . Any vector written as Note that is of dimension four. is a vector space with basis , then any vector

, then since any vector can be uniquely expressed as is called the standard basis for , The dimension of is n, the number of basis vectors.

can be uniquely

can be uniquely expressed

It follows that v has a unique representation

f z Ghg0p v p j prrr  k z z

u # b um 3)m

Denition. A linear transformation or linear operator of a vector space space is a function which satises

for all

and for all scalars

If in addition L is both one-to-one and onto, the L is called a vector space isomorphism. If is a vector space isomorphism, then and are said to be isomorphic vector spaces.

An equivalent denition of a linear transformation that can be found in many text books is given by the following theorem. Theorem. (i) (ii) is a linear transformation for every

and

Proof: Suppose that L is a linear transformation. Then by setting either in Denition 3.8.1, we obtain that . By setting .

Conversely, suppose that conditions (i) and (ii) hold. Let condition (ii) we have that

and from condition (i) we obtain

Equations (1) and (2) imply

Thus

is a linear transformation.

If

(i) (ii) If

is a linear transformation mapping a vector space into a vector space , where and are the zero vectors in and respectively. are elements of and are scalars from , then

Statement (i) follows from the condition . Statement (ii) can be easily proven by mathematical induction.
103

rPB

and

b u h#pdut) G2(y|gh6|pg7 Th 6#(yhghy7yTp y  1hgg 7tghy l

u7

~

BP

)T77T70(#)6 

1 T 60#) (0

7776#0#2)

777(

67)9# 7t7(( bd# )()wd

3.8.2

T)w

3.8.1

into a vector

 gh7g(y!g! ~

67d{#h{

)w#

()w

and for all

, we obtain

. Then by

Q.E.D.

, then

with

and

3 A 3 ' 3 A ' P76up876b5X63 %x 2 c 2 @ 1  1 7v 2 @ 1 V 2 @ 1 P6c08VG3 C ) C ) C C ) ) A 3 ' 2 2 2 2  2 C 2 )7H 1  1 7)v 2 X 2 @) 1 X 1 D)G C C C 3 2 W C C 7 2 @ 1 7u0 2 $ 1 0T#PI763 ) ) R 3 A ' % 8 2 ) 1 ) ' 2 @ V 863 2 2 %x3 h rq % A s 3 F ' s 3 E P75Y55! 0 ! { # ! ! h ' E h A F h ' E d hXA FI d I7 9 d xPH 7 d xUH 0y h A F ' E A F ' E d xPH Y w D9 P@ X H 0 s 3 h ' ' s d vu 8V83

'

t s P983

h rq h ' ' d iQ5763 f g  B f e

(i)

% A 3 F ' 3 E `P76YE8VG9# 2 c 1 & 1 & 2 0Y0 2 c 1 & 1 & 2 7!Q C C C C F ) ) ) ) E 2 "b 1 U 1 " 2 "7aE 2 UX 1 U& 1 U` 2 U09 C F C F C F C F ) E ) E ) E ) E 2 "I 2 UX 1 "I 1 U 1 UI 1 U& 2 "Y 2 U09 C F ) E C F ) E C F ) E C F ) E 2 "X 2 U@ 1 UX 1 U06QA7 2 " 1 "V 2 U$ 1 U0TSQ#P!I'HDG3 C F ) E C F ) E 3 W C F C F ) E ) E R 3 A F ' E BFE 2 9 2 @C 1 DCBnA % & 2  1 @ 1 @ 2 09#8763 ) ) ) ) ' 4 5 2 f3 2 ) 1 ) 2 fe!&0(' % & #g #g~ tgh1#y $Gtght2tt#g~ " 21hgt  0)@ghtG11~ !t Agg0) tt 0)h9 Aghg%11y) t p)gGGhg01t 0)gtt A1g ) g Ggh1s g tt g9 vws g# #)@ 01A 7tghydB Tx#hP
is a vector space isomorphism, and and dene and and by are isomorphic vector spaces.

(ii)

3.8.3

for each . In general, if a is any a linear operator by

p 8

'

d
Note that if we dene the matrix a by

for each

then

Then for

Thus,

Recall that the function whenever

Examples:

Let

. The operator

s 3

Thus, we can think of each

dened in Example 2.8.3 is one-to-one and onto . Now suppose that and . Then

real valued matrix a as a linear operator from

t P

(iii)

Consider the mapping

Thus, while

and

is linear since

dened by

104

is not a linear operator.

real valued matrix, then we can always dene

Now

to

and

From Example 3.8.3(iv) one can infer that any linear transformation of a vector space into itself can be described completely by exhibiting its effect on the basis of the space. Suppose is a linear transformation. Then the set is called the kernel of and is denoted by . Since , Also, if , then , and . Hence and are elements of . According to 3.7.5, is a subspace of . In a similar fashion one can show that is a subspace of . We state these observations as a theorem.

The dimension of is called the rank of , and the dimension of the kernel of is called the nullity of . The important relationship between rank and nullity is given by the following theorem known as the Dimension Theorem.

, then

The next theorem establishes the relationships of the notions of nonsingular, dimension, nullity, and rank.
105

g u

rg &`& | Q

A linear transformation if there exists a linear transformation identity transformation on

is nonsingular if and only if it is invertible; i.e., if and only such that , where denotes the

x g

q o sscv



| | aQ

3.8.5

Theorem. If a vector space

is a linear transformation from an n-dimensional vector space

x y|

&`

(b) the range of

is a subspace of

(a) the kernel of

| }a(

3.8.4

| `` `  v Xyf Qg Qg Qg  g v QwXQg Iv f ug Xyf v X8f ~ q o x G~w Bg g g  q o q o #Qg UyX ~ | }aG{ q o q o q o q o q o o q 0o q o q o

Theorem.

If

is a linear transformation, then , and

is a subspace of

uv

zg

v Xyf

Equations (1) and (2) imply that and according to Theorem 3.8.2, is a linear transformation.

xoVe q e f

i n me

e Ve f

vefVe o

i k me k

i k me

e "se

"o e q e

q i k je k

v &e q

i k me o r

g I

g v f XIwu

q p @o

q t 7o

Now extend

by dening

. Hence,

e e

n i ` me

g 9

e e

k i l je

g f

extension of the original function dened as follows. Let

and

  f f f d&"" h

e f SB e &"

(iv)

is a basis for and is a function Suppose that dened by for some elements of . Then denes a linear transformation, again denoted by , of into itself. The linear transformation is simply a linear .

to

Proof: The equivalence of (a) and (b) follows immediately from Theorem 2.5.12. (b) (c). Suppose that and . Then and, hence, , which is a contradiction. Therefore, . Moreover, being invertible implies that is onto. Thus, . (c) (b). If , then . Thus, when , we must have that , which means that . Therefore is one-to-one. Also, if , is onto. then (c) (a). This is obvious since we already have shown that (c) T is a one-to-one correspondence. (c) (d). This follows immediately from the denition of nullity and rank. Q.E.D.

This theorem implies the following corollary:

Nonsingular linear transformations have the important property of mapping basis into basis.

Then

106

8D & u

8 7

8 V &

57  " V

Clearly, such that

is a span of

. Now suppose there exist constants

Q87`&78`

5l

yI m

" @H 

Proof: Let

be a basis for

. Then

y &

3.8.8

is a nonsingular transformation from Theorem. If into a basis for .

#V

d&b

3.8.7

Corollary. Let

. Then

is one-to-one

, then

maps any basis for

w#0&

G7&`

#987 PV

xVYU0

`&

SSX

u

(7l# (7&`

X a

IxV

3.8.6

be a linear transformation from an n-dimensional vector space Theorem. Let to an n-dimensional vector space . Then the following are equivalent: (a) is nonsingular is one-to-one (b) (c) and (d) and

Plu8xV!&

B7`D& V

9UV

But this is a contradiction since it means that the vectors are linearly dependent. Hence are linearly independent and form a basis for . Q.E.D.

Composition of linear transformations provides the fundamental operation for the algebra of linear transformations. Of particular importance is the subalgebra of nonsingular transformations. Composition of nonsingular transformations is closed in the following sense:

As an easy consequence of this theorem we have

107

"

76 8 

and some xed angle. Then rotates every point origin as shown (Figure 3.8.1).

"    $ " ( 2  " (  $ "   #!5&40) 3 1G0)'&%#!

  

  

3.8.11 Example: Let

be dened by

, where

through an angle

is nonsingular, then

is nonsingular and

about the

 z



d

3.8.10 Corollary. If

7

which means that

. Hence,

is invertible. Q.E.D.

 V

xS

and, hence,

. Thus,

is invertible. Therefore,

xw x

x

PDu

Conversely, suppose that

is nonsingular. Then

xw$

x

Thus,

has an inverse, namely

and is, therefore, invertible. exists and

xx

PG"

x$

Proof: If

and

are nonsingular, then clearly

dx

G 7``u

 x

3.8.9

Theorem. Suppose if and only if and

and are nonsingular. Moreover, if

. Then is nonsingular is nonsingular, then

U$@"

$  VH

"

matrix corresponds to a linear transforIn Example 3.8.3, we observed that any real valued mation . This observation also holds for matrices with entries from any eld and linear transformations , where and are vector spaces over , respectively. Suppose, for example, that has basis , has basis and that is , can be expressed as a linear combination a linear transformation. Then for each

  !u ~

u 7Yp vcc c c #c c  c h7j c P E ~  x w }|v P w rxv


. Thus is nonsingular.

Figure 3.8.1 Planar rotation through an angle

bgaU5X ` C

9 B

Since

u u u p g t p u d hs5r qn W hC l C cn W C l pp n o W %C c VC W hC l mp c phC xC i C C W hC d hC C W W 4C p PYX IHE T ` ` `U U!rR gbaU X gbaU VC !R C I c UT W UC T R %!r'X d C`0b 5X C gba5X hC !rI p d U W UTR R `U `U `U I C W %C VQ !rCP !5X p gbc ahI hp c 0b!P u gbgpX c V'Ef c C U Td S U T R E a5 U T R u Hd 0b!P !5X 0bI E !rP 0batX !rED `U U TR `U U TR `U UTR I u d P I P !rkv X gbahv I !v X !4E Sv X Iv E eSX HE E YX 6IP UTR `U ji U T R vI P P P E E c 4C W 4C p VC d C p UV5v X 0bahv I X TR `U c gba'v X p c!rv I I `U UTR e u P I P VX E #v X Iv E u u c W c p c W c p C W C dc VC W C W C W hC dc eVC W hC p I W I vI i C W hC d W C WhC d c P C X HE hC P x X x E W C P v X Iv E 4C P x v X x E p W P !ReX gbaUi` QyI gbaeX W%C Vey6IE W P !eVXcx C gbaeqWx I hC`0bW eX !QyHE p UT ` UW UTR U T R `U Ux U TW R x I C d P VRX 0bqI E P !QxX gb`aQxyI E P gbae UT `U UTR U `U UT U T R xc WX c VqE P i 0baeX W !ey6IED u WR I u p ` U x c UTR !!PX xE gba!PqI q6IE X `U x gbaSX 6XE !rqI y6IED `U P x UTRP x P c x x p Pc P x x I X u X p yI c q6IE 'i X yuI E X yHwED W 4C p P I WG P v I E d c P I E W QiC SX HE hC #v X qG e#C VX HqFGD 4C UTRP X G !!Y#E gbaVf#6GE `U P I 0ba!YSHE VSQ#HFED `U P X G UTRP I G c C W hC dc sVC P !tX 0bI UTR `U U TR IE !rqG
is a linear transformation. by , where and, hence, . Furthermore,
x

This shows that Dening

Therefore,

and using the above method of proof, it is easy to show that To nd the composition , we compute

we have that

(x,y )

108

c  ~ ~  x P E E

z { s y

(x,y )

is also a linear transformation.

be an arbitrary vector of

is nothing more than the matrix product

. . .

. . .

. . .

(3.8.1)

where

for

, and multiplication and addition are the appropriate eld

operations in . It follows that the transformation can be represented by the matrix . Of course, the as the vectors v and w are represented representation of will be different for different bases of and in terms of linear combinations of the basis vectors. If we changed one of the basis, then the question is What is the matrix representing relative to the new basis? The answer to this question is closely linked to the notion of equivalent and similar transformations. When two vector spaces are isomorphic, they are algebraically the same, and we are free to choose the simplest one in which to perform algebraic operations or solve algebraic problems. This observation applies just as well to all the other algebraic systems used in this treatise. It is particularly pertinent when solving linear image transform problems. It is therefore natural to inquire as to when two linear transformations on vector spaces are essentially the same. Consider two linear transformations

denote the respective isomorphisms. Since

Symbolically, this provides for the following diagram:

109

'66 '66 %

Suppose that

and

are isomorphic and that

and

are also isomorphic. Let

and

are one-to-one and onto functions, they have inverses

Therefore

. But this suggests that the transformation

rYh

a6 7#7 a0 Q  7V7 HH H  7V HH H  !wa ye6g a0 Q w6g ' 6g }p{ 6g e Q Q Q Q F Q t 6 0 e}'a h5t6 5Y& h rFa a}06}Ht6s6 3 y 3y 3 3gg3

of the basis of let

, where and let

for each . Then

. Now

Obviously the functions are linear transformations. Here we follow the convention of writing the composition of two transforms in juxtaposition so that . If , then and are algebraically the same; i.e., , which means that the result of computing is exactly the same as the result obtained when computing . A similar observation holds for the computation of . If , then we say that the diagram commutes. We formulate the notion of algebraically similar as follows.

3.8.12 Denition. Two linear transformations

are isomorphically equivalent if and only if there exists isomorphisms

such that Two linear transformations

are similar if and only if there exists an isomorphism

such that

. Note that the notion of similar is simply a special case of isomorphically equivalent. Whenever , and and are isomorphically equivalent, then they are similar.

Now let

We leave it to the reader to convince himself that both satisfy the axioms of a vector space. Continuous functions on with nite norm are of special importance in signal processing
110

 q  b)a`qGgXtVQ8SQIG  C A WP Y P W R U TRP H   F D y 4E1 5  5   CB  A

'@ ' (  ( 98e 6

5 5

  1 2#'

'

such that

% &$

" #! 

3 4(

, then

3.8.13 Example: Let

hpy t q  y atH' #y y!syh


denote the set of all complex valued continuous functions on is said to vanish at innity if there exists a compact set . The norm of is dened as

y y Y

 y y y g s q V

3 hy ! Vq3  !
  

( 0) 

h1y h

{

 y a g  

. If

since the convolution product of such functions is again a continuous function with nite norm. In particular, the convolution product is dened by

The vector space together with this product forms an interesting algebraic structure known as a Banach algebra [20]. Dene the transforms by

and

dened by

is called the Fourier transform of . It is well known that the Fourier transform is one-to-one, onto, and preserves the vector space operations [20]. The inverse Fourier transform is given by , where

By dening

we see that

i i y tsq ` r d r d s yq d s qfs q m Qw j w j u X)0 i Xgp9)x d q v

s fq x)e

Thus,

computes the convolution

111

y s y rq is yq `))0)8xf u

u w i d s rq y Q` m 8Q8f u  X0)f js yq  v q

f u w v i r` d s yq m j s r q w 898f u tf  v

yf r r yf t

ighBpt u f d s fq u w w i d y nm l js yq #` Qw 9w 8xf i v

i Bh09i d s rq wj

| d s fq }{xhx ~

zGyx

respectively. The function

v wy t r d s yqfs cq usq tQgp9p s yq 9c d u w i y nm l js yq ` oQw 9w k8xf i h0)gxe d s rqfs fq d v

y s y rq is yq G)e898Q8xf u u
, where . Furthermore,

xCx

i g f d phBec v w

d s rq t99c 9f w x  d #f

A similar argument shows that

Since linear transforms can be expressed in terms of matrices, the use of terminology from matrix algebra is natural. Nonsingular transforms correspond to nonsingular matrices while similar transforms correspond to similar matrices. Recall that two n-square matrices and with entries from a eld are similar over provided that there exists a nonsingular matrix with entries from such that . Eigenvalues and eigenvectors also have their analogous interpretation in linear transform theory. In particular, if is a linear transform, then any vector with the property that

is called an eigenvector of . The scalar is called the eigenvalue of associated with the eigenvector . Suppose that is represented by the matrix , is an eigenvector of represented by a , relative to a xed basis, and is the associated eigenvalue. Then row vector

and

where I denotes the n-square identity matrix and 0 the zero vector. This is the matrix form of a system of n linear homogeneous equations, and a nonzero solution exists is singular. This occurs . From our knowledge of determinants we see that

is a polynomial equation of degree n in , say

where the s are sums of products of the s. The polynomial is called the characteristic polynomial of matrix and also of the transform . The equation is called the characteristic equation of and the roots of the characteristic equation are called the eigenvalues of the matrix . Our discussion has established the following result:

represented by

in any coordinate system.


112

3.8.14 Theorem. The eigenvalues of a matrix

&8` 8` V 

are the eigenvalues of the linear transformation

V V

. . .

. . .

. . .

4 e! )e4 IC C QE C X) 9 w 9g p VV ) Q VV 94z VVV ) So8spQXtp w VV ) V V  Q4Xe B)o`


. Thus, and are similar.

Therefore, theorem

is simply the product (see [20]) that

h9p

. It now follows from the convolution

z8G

V Vo )

4

We present two different proofs of this theorem, one formulated in the language of matrix theory and the other in the language of transformations.

(Second method) If and are similar, then they represent the same transformation relative to different bases. The eigenvalues of depend only on and are independent of the coordinate system (Theorem 3.8.14). Hence and have the same eigenvalues. Therefore, their characteristic polynomials are alike except possibly for a multiplicative constant. Thus, for all . For we have , so that , since similar matrices have the same determinant. Q.E.D.

We conclude this section with the well-known fact that the diagonal elements of a triangular matrix are its eigenvalues. The proof is straight forward and we leave it as an exercise to the reader.

3.8.16 Theorem. The eigenvalues of a triangular matrix are the diagonal elements. In particular, the
eigenvalues of a diagonal matrix are the diagonal elements.

3.9 Linear Algebras One way of viewing linear transformations is as operators that transform vectors of one space into vectors of the same space or a different space. New insight into the behavior of linear transformations can be gained by viewing them as operands instead of operators. If denotes the set of all linear transformations of a vector space into itself, then we dene an addition and multiplication on by

and

for all . These two operations endow with a rich algebraic structure. First note that is an abelian group. The additive zero is the transform dened by , where denotes the zero vector in . If , then its additive inverse is the transform dened by . Also, for we have

113

4 5%

eGRHPE$t GEHPa $ w AS tsrY6

 %  328  '01) !

"##)  !   #8    h 8     8) !{ !!{4y

Proof: (First method) If

, then

$ A B $ A B B A $ B A GRH#PW3hGRHtWfGEHG&GRHGGRHPFhGEH#dCE$

GY87XVWHUTGRHGBAQG9HP$FXGHI3GBAF$E D C$ S B A @987

7 V H S B $ B ` GR8hgWgfeGEHd#PFhGRH#cb9$ D a$ B`

$ b w xXd9Hu

) 0

6 V Xvu

%  (8'& ) 

 

3.8.15 Theorem. If

and are similar, then hence the same eigenvalues.

and

have the same characteristic polynomial and

65pi V $SBS 6 V xy$ 7

6 V $S qp3iB

{l |sl g

{ hd

e t t z xw WvW h 0RuW h yp h X h ctWX3 h


and

e t t t r t GResvF h 0c3GEPRuWed9PR h deGRPE3c h &iGRbRc h q h hq


and

GE3s h X h 0GR#P h Ffd9eG h 0deGRPR h QeGEG3 h Erd9PQGEG q h Erd9ePWX# q h GERrPW3 o &m GongmWled9PR h G93P h kj h i g
, we obtain

and

e fGE3PcFCY#0cd9PQeGR#dCY#0cd9PQ#GEdC'G9Y eGRPQGEG3GRdGE3PXeFfG9xcGR33tX3

These observations provide us with the next theorem.

This shows that

g p m

for all

This proves commutativity and associativity. Dening scalar multiplication on by

Theorem.

3.9.2

Restricting our attention to non-singular transformations, we can make an even stronger case for the operation of multiplication. Let .

x x m |Iw!xYi'I~i g &yP

e fGEE9r@{9da{9 q GE#@9FfGR#cbRueGRePQeGRG3tF { { eG9WQGEG3PC'9rGE3Xe q CG9EErX3a q { { { { ~RGbRpd}WX3a


Proof: We already know that is an abelian group. Multiplication is clearly associative (but in general not commutative). To complete the proof that is a ring we prove the left distributive law and leave the right distributivity to the reader. We have

3.9.1

In our observations we have not taken the multiplication into account. As remarked in the previous section, multiplication, which is dened as composition, is a fundamental operation in the algebra of linear transformations. The importance of this multiplication is established by the following fact.

Theorem.

is a vector space over

is a ring.

114

Q.E.D.

tl g

Proof: It follows from Theorem 3.8.9 that is closed under multiplication. The associative law holds in since it holds in . Let be the identity map . Evidently is non-singular and, hence, a member of . It is the multiplicative identity since

Since each is a one-to-one mapping, it has an inverse dened by . Obviously, Also, the inverse of a one-to-one function is one-to-one and, hence, . Therefore is a multiplicative group. Q.E.D.

Vector spaces, linear transformations, and matrix operations are so vital in applications that they are usually studied under one parasol commonly known as linear algebra. In the previous section we observed that linear transformations and matrices are algebraically equivalent entities, while Theorem 3.9.1 shows that the set of linear transformations on a vector space is itself a vector space. These observations actually provide the basis for a formal denition of the somehow fuzzy concept of linear algebra. Specically, having addition and multiplication, together with a linear algebra over a eld is dened as a set scalar multiplication by elements of such that the following axioms are satised:

Multiplication is associative has a multiplicative identity element

Multiplication is both left and right distributive over addition

In axiom the symbol corresponds to scalar multiplication and to the multiplication dened on . It follows that a linear algebra over consists of two sets together with ve distinct operations

where is a vector space. Here and denote the eld operations of addition and multiplication on , denotes vector addition in , and denotes multiplication of a vector by a scalar. Of course, we follow the conventional abuse of notation and let + denote vector as well as scalar addition and denote both multiplication on as well as scalar multiplication of a vector. Indeed, in many cases in order to denote . This we shall even dispense with the symbol entirely and simply write abuse of notation causes very little confusion as the type of operation an author has in mind is usually apparent from the context in which it is used.

3.9.5

Examples:
115

|U

GYa

X|3~1G9G5 GePF b}uGY

v dyy3h#e0u@Ya

Under addition and scalar multiplication,

P fG9yPdPRGRPFUFded9PE|PFcGE|G~PE FdeGRP9ft P g fGR3fdRueGE'RPFcGRPCueG9PEFcGR3tdsE


is a vector space over

&bGE'

3.9.3

Theorem.

is a group.

yh~h

d c c d

W W X d #b' 0 v q P x W   W@ ! ~  c d  e Wd W  d  0 Ye g
, multiplication in , then

G |X h   s X x ysu '|X' d  ' ! @ ! Y   0G ~ W W ~ e 0 ~ Y r ~ d

ff & 0|X f 0 X Rf 0 | ff 0 |X R f 0 s v f 0 b 9 ey h P cyWaI Wy R

(i)

The eld numbers.

of complex numbers is a linear algebra of dimension 2 over the eld of real is a vector space of dimension 2 that satises axioms through .

GY

(ii)

is a linear algebra. This follows from Theorems 3.9.1 and 3.9.2. If is the set of all linear transformations of a vector space of dimension , then is of dimension . Hence the algebra of all matrices over is also a linear algebra.

Ge

Geh

GR'U

@Y

(iii)

The 4tuple is a basis element and for . Let denote the set all quaternions. As an additive group we may view as , where addition is dened component-wise. In particular, renaming the components of the basis elements by

An important example of a linear algebra of dimension four was given a century ago by Hamilton. The elements of this algebra are called quaternions, and the scalars are real numbers. Historically, the algebra of quaternions can be considered as the forerunner of matrix algebra. A quaternion is an expression of form

Obviously, since

To insure that the distributive law holds, we dene

turns into a vector space over . Multiplication on is dened in terms of the components of the basis elements:

Dening scalar multiplication by

Thus,

then it follows from our denition that

and agreeing to let

116

is not commutative. However, if

Therefore, every nonzero element of has a multiplicative inverse. From this we may conclude that is a non-commutative division ring that satises axioms through . In 1878, Froboenius proved that is the only non-commutative linear division algebra over .

The linear algebra of Example 3.9.5(ii) plays as important a role in the theory of linear algebra as the symmetric group does in group theory. In Section 3.4 we remarked that every group of order n is isomorphic to some subgroup of . Analogously, any linear algebra of dimension n is isomorphic to a subalgebra of (or ). This fact provides a concrete representation of any such abstract linear algebra and a striking illustration of the generality of linear transformations and their importance in linear algebra.

3.10 Group Algebras Cyclic convolutions, which amount to polynomial multiplication (3.6), are a special case of multiplication in a group algebra. Paul D. Gader [12] and D. Wenzel [22] were the rst to note the connection between group algebras, image algebra, and group algebra applications to image processing. In this section we briey discuss some of the background of group algebras. Let be any multiplicative group and be any commutative ring with unity. Let denote the set of all formal sums of form

It is clear that except for a nite number of indices , so . The additive identity is given by . Since is a commutative ring, we have as an immediate consequence that is an abelian group. Multiplication of two elements of is dened by

Observe that the product of two elements is some element . Thus, naively, we formally distribute the sum over the sum and rename the term by , where in . Since and are 0 for all but a nite number of s, the sum

117

&$d

E $d $

0  u2 $ h & $ $

& df r $ efd

  8 2 a g 1vut)7V

  8 2 19bHa

C A fE  bx'& CA DD& E CA DD& `BB& d &$ &$ WB& pV a @ @ @ @

0 CA E DD& pihV a g r $ & & q Bd g & @

& $ & d x'& Y CA

, then the we dene addition by

& $ feDD& `ca &d CA Y   8 2 19W!V 0

fE

 g2 $ G $

  198

T U &

fE d E & $ & DD& Y CA

E E & & $ & DDE& `XV CA Y  8 R QI SBPG H2 & $ G H2 &

where

for all but a nite number of indices . If s are called the coefcients of . If with

G & $ &

EFCDAB& @

     

6 4 2 0 ( &$" 7531)'%#!

& BT x'& !wT $ CA Y E T H9& d s& g

  

$ $ W &$

   8 yg G 1v

  198

with , then

The multiplication is called group convolution and the distributive laws of multiplication over addition follow at once from the denition of addition and multiplication. For the associativity of multiplication we have

Thus, we have proven the following theorem.

Rings have the two primitive operations necessary for dening the elements of . Any more specialized structure having these ring operations, such as a eld, can of course be used as well.

3.10.3 Examples:

The polynomials are a subset of this group algebra due to the constraint for . The multiplication of this group algebra corresponds to linear convolutions when restricted to polynomials. Also note that is isomorphic to and, therefore, . Let with multiplication dened by convolution corresponds to multiplication in the group algebra
118

m u7 y}

(ii)

. Then cyclic .

m uD

i i D ium DeBH n i ~ }| 1 m u5 } i }

Let and

be a cyclic group with generator . Then

dened by the operation and

~ }| P  S ~ | ~ }| P1

qf

(i)

~ }| 

then

, where

~ }| 1vo

3.10.2 Denition. The ring

dened above is called the group ring of is called the group algebra of over .

over

~ }| 9o

and only if

~ z ~ }| o De19|

3.10.1 Theorem. If

is any multiplicative group, then is a commutative group.

is a ring which is commutative if

~ }| o m { z 19phhy o
. If

DD DD DD H k i    x w s er iDD r r DD jk D BBi  x w v r s er bx' r r jk l Bi xr wvrs ur px' x' x' x' f' B el j k !D% i py'B Dx k #BB i    

xr w rs l k j i tqv utr o m lkj pn%Dfi

contains only a nite number of nonzero summands again at most a nite number of such sums

and, hence, is an element of are nonzero. Therefore,

. Clearly, .

is a eld,

More generally, let and suppose we have denoted the elements of by . Then if and , where for , we dene . Again, multiplication is dened component-wise in terms of the usual exclusive or of binary numbers. The group convolution of the group algebra is called the Walsh convolution.

It is easily shown that this scalar multiplication satises axioms through (Section 3.7). Thus, together with scalar multiplication is a vector space over . From our previous discussion we also know that satises axioms , and . Suppose 1 and represent the multiplicative identities of and , respectively. Consider now the element dened by

This shows that also satises axiom . Axiom is a trivial consequence of the denitions of scalar multiplication and group convolution. This establishes the following

3.10.4 Theorem. A group algebra together with scalar multiplication is a linear algebra.

3.11 Lattice Algebra The concept of lattices was formed with a view to generalize and unify certain relationships between subsets of a set, between substructures of an algebraic structure such as groups, and between geometric structures such as topological spaces. The development of the theory of lattices started about 1930 and was inuenced by the work of Garrett Birkhoff [3].
119

1

X a

H q H H srQppF d

t ua

F d iH

where

for all but one , say

, and

while

. It then follows that

H I

a b

X 6W

c h T g

I T C

U #DT

1

V #T T

U e'T

g T

U 'T

R I H SQpPI

1

For each group element

and each

we dene the scalar product

by

5 "  #!

pD DD bBfeS'teet

' 2 E& D 0    0 Bff #4%$ 3 0 3  e 

 

btSt
' 2

$!S& $C 5@ 3 A 3 B@! ) '2 0    #S& 1 H# 0 )

 G

9 e

BfeSttSeDStF
I

% 8 7  #9!S6 ' ( !& % $    $  W

1

Bf)tBfBf
F

(iii)

Let and let multiplication of elements of G be dened in terms of the exclusive or (xor); e.g., , etc. Renaming the elements of G by , we obtain the group algebra

Y y`t1
T c

Let be a partially ordered set with partial order . An upper bound (if it exists) of a subset of is an element such that . The least upper bound of , denoted by or , is an upper bound of such that for every upper bound of . By the anti-symmetry property of partially ordered sets, is unique if it exists. The notions of lower bound and greatest lower bound, denoted by or , are dened dually as in 2.10. Again by anti-symmetry, is unique if it exists.
y j `k i

, we see that any non-empty complete lattice contains a least element and a Setting greatest element . These elements are commonly called the universal bounds of . It is also obvious that the dual of any lattice is a lattice, and that the dual of any complete lattice is a complete lattice with and interchanged.

3.11.2 Examples:
s v u w`t v l j n j s &6Ct s y j } y j | f !k6kekge x p y l { l i!#{n }~y!ke j | y n i z x {yp s

(i)

is a totally ordered In 3.1 we observed that together with the relation of less or equal set. If and , then together with the operations of is a lattice. However, is not a complete lattice as there is no largest and smallest number. Let , the set of real numbers with the symbols and adjoined. and . Then is Dene a complete lattice with largest element and smallest element . The dual of this lattice is obtained by replacing with the relation of greater or equal . Obviously, is a . sublattice of
p x # vul&j4njm%t s   } j | P@Q u u  s6 } j | PQ@s p  4s

(ii)

(iii)

vCku%6  t h v t v t v t C v t u v t h v t %64&pkh p

l h

and

by

120

n h

v%6u&4D % t v t h v t v t C v t h u v t v t Ck46Ckh p

v t u v t w6{%pCkh

u h

us

(v)

We partially order

by

and dene

v l j n j s 4{t

l4j g j n s u

} j | es

(iv)

The set element and .


v l j n j s 46Ct

with the relation the largest element.

is a complete lattice. Here 0 is the smallest is a sublattice of but not of by

} m{mw&|

##

p # p

The power set largest element ,


h f !ge x

together with the order relation of set inclusion is a complete lattice with and smallest element . For any family of subsets of and .

3.11.1 Denition. A lattice is a partially ordered set


x y j !& ! y l m i

any two of whose elements have a denoted by , and a , denoted by . A sublattice of a lattice is a subset , such that for each pair we have that and . A lattice complete whenever for each of its subsets , and exists.
x i y l hm h f ge x E x x y n mo x y n m p x

v l j n j s &6Ct

y w hy

h f 6ge

x y w 9 x d

v #y

vu&4{t l j n j s u

v y

h f ge

!d

x E

x !

, of is

The binary operations and on lattices have several important properties, some of them being analogous to those of ordinary multiplication and addition. The following properties are easily veried [3].


3.11.3 Theorem. If

is a partially ordered set, then the operations of equations (whenever the expressions referred to exist): (1) (2)
mS~o%(Cmh~{b(Co E~!#C bo%

Observe that in the above theorem we do not require that the partially ordered set be a lattice. In fact, Dedekind [11] used properties (1) through (4) to dene lattices, and Birkhoff [3] proved that these properties completely characterize lattices. For lattices, we have the following additional algebraic relationships.
u4P2

3.11.4 Theorem. If


is a lattice with partial ordering


m

Proof: We shall only prove property (2). The remaining properties are just as easy or follow directly from Theorem 3.11.3. and
#~{bCp % (b 9 e CS 9 S 9

(2) Obviously,
S

and, by hypothesis, . Thus,

 

law

121

  

3.11.5 Denition. A semilattice is a commutative semigroup

which satises the idempotent

It is often convenient and much simpler to deal with only one of the operations of or equivalent relations for the other through duality. For this, the following notion is helpful.

!1~1

~E~1

C~oCu %

%Sb

(3) (4)

#~d

Co%

bs

omo

(1) (2)

w6b9b

(7) If

has a largest element , then

w6Bhm9@

has a least element

, then

!Pg!C

im

&imo

(5) (6) If

, then

. Hence, and, hence,

#E~e

(3) (4)

w64Ck 44kS

Then is a lattice which is not complete. However, lattice with smallest element the constant function dened by element the constant function dened by .
bb6 % &%

is a complete and largest

##`~oE

PPEPd

mbmkmo

&{

and

satisfy the following

. Also, . Q.E.D.

and obtain

As mentioned earlier, the operations of and in a lattice are analogous to the arithmetic operations of + and . This analogy is most striking in distributive lattices.
T X "  " Y#U$P

3.11.7 Denition. A lattice

is a distributive lattice if and only if the following equality .

holds in
T P

This equation expresses the similarity with the distributive law of ordinary arithmetic. All lattices in Example 3.11.2 are distributive lattices. Note also that by duality we have that
 f C76$eqihgy  5 T f P T   P X T id3u#HdxkadV   P 5 T X P  T jjP

Any lattice satisfying condition is called a modular lattice. Although every distributive lattice is modular, not every modular lattice is a distributive lattice.
" r ( B ( SkkvuSktso o " r ( p ( I r " q " B " p " o D $xFxFCqFnp 5

3.11.8 Example: Let


r vwe1o ( q (

have partial order dened by

. Then

122

H

r 5   )&dH

o 5  X 7&dH

that

%  eAH~

% wu

Suppose

is a lattice with smallest element O and largest element I, and and , then is called the complement of . Now if

Therefore,

is a modular lattice.

. If such is a distributive lattice

T VjVP

m r X T B  p P 5 r X r 5 r 5 B  p 5 T r X B P  8d#xdgk6d)qt8d7YCqax!gp

| (

Thus is not a distributive lattice. However, whenever example, and


r }zp (

in

, then

T xjVP

 d3

in any distributive lattice. Now if , then . Thus, substituting z for that any distributive lattice satises the following law:
m X T Rd#Hd3kYiux!   P 5 T X P    5 dqpq l 1t! ( ( )' T jVjP

in

we have

and

holds. For

T X E"

I f r D c Q 5 tSsqpi$UQ ` h

Q ` xP

T  " ` h Q YEu$UxP

m T q X p P  T B X p P 5 SEux!#xdgk{dz7p!pqdg7axuaxup o  o 5 o y5 p 5 r X p 5 T q  B P X

Q % 5  T f r P 5 T f r P  ` $h '6ptS

I f D c Q 5 )ged7baQ `

T X " ` Q vw&YP

T X " Q Y#WVP

T X  P  T dxaHdqVeHdxu X  P 5 T  P X

T jVjP

f yr

T  " Q USRP

3.11.6 Example:

is a semilattice with dual then is a semilattice with dual since monoid with zero element is a monoid with zero element .
T  " ` h Q vEu$UP

. If , and . Note that the semilattice . Similarly,

I HHGFECA764 "  D B @ 9 5 2

any semilattice with binary operation

becomes a partially ordered set in which

! 

It follows from Theorem 3.11.3 that every partially ordered set for which the operation dened for each pair is a semilattice. Conversely, under the relation dened by
 " 87643 5 2 0 1)& (  % '&$# "

is

, is a

We say that a lattice is complemented if and only if all its elements have a complement. Modular and complemented lattices are of special interest for applications to probability theory, including ergodic theory and multiplicative processes, to linear algebra, computer science, and engineering. is a complemented modular lattice. Here the orthogonal For example, the set of all subspaces of complement of any subspace satises and . Also, by denition, a Boolean lattice is a complemented distributive lattice. The uses of Boolean algebras in computer science and engineering are manifold and range from the design of electrical networks to the theory of computing. For Boolean lattices we have the following:
| etY

3.11.9 Theorem. In any Boolean lattice, each element x has a unique complement
complementation satises the following equations
|s&

and

For a proof we refer the reader to [3]. Complementation should not be confused with conjugation or duality. For instance, if for every we dene its dual or conjugate by , where , then
q

Since complements in a Boolean lattice are unique, we can view complementation as a function that maps . From this point of view, complementation is a unary operation. If is a Boolean lattice, then the algebra determined by the two binary operations and , and the unary operation of complement on is called a Boolean algebra.

3.11.10 Examples:
(ii)
w#U#aCFV

(i)

It follows from the laws of operations on sets (2.2.1), that


u}t y7

is a Boolean algebra.

Let

and dene

by
SxG)vySu1yG

123

yG)SVS'

SVSvyGyG

SVS

nyxC

!z

and

by

yVSwyGh

yVS

iu

nvyxS

#UUSx

Hw

Equations
&g

and and

have the appearance of statements (2) and (3) of Theorem 3.11.9. However, if and only if or .

and

83F

gCsi Hd6V

and

k6uH!q

complements of so that and that . That is, complements are unique in distributive lattices.
k6su aH

sd3Yd6V}suUVuiGdU| s z

taHuaxtydUdHd6VuRHdU Saw d g!$H su |Hu 4 q x x !g g|

'|

'|

and if

and

, then

. Therefore,

. Thus, if and are two , then by our analysis we have

. Furthermore,

The least element is the zero function dened as and the largest element is the constant function dened by . It is now easy to show that is a Boolean algebra. This algebra provides a rigorous mathematical basis for the description of a wide range of Boolean image transformations.
US S

(iii)

of Example 3.11.2 (v) is a distributive lattice with minimal and The lattice maximal elements. Only the functions and have complements, namely and .
C i

In addition to being a distributive lattice, the set of real numbers is also a ring, and our early experience in elementary algebra has taught us the useful properties
k6}kq t}

where . These properties exhibit the interplay between the lattice and ring operations. The question naturally arises as to whether or not these properties hold in any ring (or semigroup, group, etc.) which is also a lattice. For the remainder of this section we will be mainly concerned with this question and examine properties of semigroup, groups, rings, and other algebraic structures which at the same time are lattices. While many properties can be couched in terms of lattice-related concepts, the main purpose of approaching these structures from a general algebraic viewpoint is to develop an anology to linear operator theory. Suppose is a set with binary operation and partial order , and suppose that the system satises the following property: .
u &u w! G

124

4. If group.

is a semilattice and

a group, then

is called a semilattice ordered group or sl-

3. If is a semilattice and or sl-semigroup.


2. If

1.

is called a partially ordered semigroup or po-semigroup. is a group, then is called a partially ordered group or po-group. a semigroup, then is called a semilattice ordered semigroup

If

is a semigroup, then

Seny

eyV

#1CaC 7ay YSx #

#1Se

nH

G)

uYy

xi$

a#USSj

|)C

Dene complementation of

as the function

, where

gnH

v)

xi'

$F

|k

Obviously, is an l-group since . On the other hand, is not an l-semigroup since does not hold for multiplication. However, is an l-group. An sl-semigroup has an identity element under if there exists an element in such that for all It has a null element if and for all If the sl-semigroup is also an sl-semigroup under a semilattice operation and a semigroup operation and satises

then we say that is an sl-semigroup with duality. If the operations and coincide, then the operation is called self-dual. An sl-semigroup with duality and self-dual multiplication is simply a has the identity element 0 but no null element, as lattice-ordered semigroup. The l-group there is no smallest element in As another example, the l-semigroup where denotes the extended real addition , has the null element but has no identity element, as has no inverse under extended real addition. It has been shown (Birkhoff [3]) that except in the trivial case where a partially ordered group cannot have universal bounds. Thus an l-group cannot be a complete lattice (unless it is {0}), that is, each subset of cannot have a lub and a glb in In particular, the l-group cannot be a complete lattice. Our particular interests focus on the extension of an l-group in a well-dened manner to include the universal bounds and and hence the resulting structure will not be as strong as an l-group. Note that if we adjoin the element (or ) to the l-group the structure (or ) degenerates to an l-semigroup since the element (or ) cannot have a inverse under Here, and . This does not turn out to be as much of a disadvantage as one might think, as an arbitrary l-group can be extended to include the elements and in a well-dened manner under both operations and in the following way. Let be an l-group, and let where The group operation is extended in the following manner. If then is already dened. Let be the self-dual multiplication on elements of that is,

Otherwise, we have

125

a X

@UE V

a Y

Hence, the element

acts as a null element in the system

and the element

acts as a

4 2 !3&

V D@aEUw GU

@Uwa R a TY

a TY

' B

!aSUW

V U TaEU W

TUwa R

5907805 ' 5 & ' & %

u sq ' vtr7

4 2 & !uiI

# $aSaSR"

a X

V 2 & WU pihI

V VWU V V WU

R

2 H& 2 !6& !26& 2 3&

a Y

E 3& aiY & a

2 E & I & ' & E & ' & E SR$QP7GHa"u)GFU!g&

B CAU Rx & ' & 76y5 5

4 2 E & I E & ' !!0CF()$E B (&

a Y ' & a Y ' a Y bQgfebdcb`pX& 4

agb B hPha B cb` ' a Y a ' a Y a bYi'jb`hgfpcb` a Y a ' a a Y a ' P6& B egda B (& a ' ab(& B dbidbY B (& Y ' a Y ' a a ' & a ' a ihgfp(& a Y ' & a Y ' a Y b6ebd(&

u a q x cXy7' V

    

4 !

a X

R2C& E u a a q x pX@' V

TUwa R

a Y

W a Y a Y

V u a Yq x 1y7' WU

B D @a W 4 2 $!3&

  aSaGR

4 0 D@UEaE V

& ' % & ' & )10)(!$%

U#RV

6. If

is a lattice and

a group, then

is called a lattice ordered group or l-group.

Rx

SaS

5. If l-semigroup.

is a lattice and

a semigroup, then

is called a lattice ordered semigroup or

a X

null element in the system However, as shown by the last two equations, the multiplications and introduce an asymmetry between and The resultant structure is called a bounded l-group, and, in fact, is a distributive lattice. Note that this extension is valid for any arbitrary l-group. Two familiar examples of bounded l-groups are and Here, Note that is isomorphic to both as a group and as a lattice, and hence their extensions to l-groups will be isomorphic as well. These extensions play a key role in lattice spaces (Section 3.12) and have important consequences in the decomposition of templates and structuring elements (Chapter 7).

As another example consider , the set of all a totally ordered eld with order , then by dening with , it is easy to see that

If is a po-ring, then is a po-group with respect to its additive operation. Suppose and . Since is a po-group, and is true and . Applying to the latter statement, we obtain and, hence, or equivalently . Conversely, , then and hence . Thus, if our original hypothesis and if implies that , then it follows that and implies . We have just proven the following:

Since

and

, Theorem 3.11.14 has the following consequence:

3.11.15 Corollary. In any l-ring

y y k 3@is 6" @

Proof: Since

is totally ordered, either and, therefore,

or

. If . The case

126

y ( y

y y k 3@ s " y y

3.11.16 Corollary. Property

in

This is the best we can achieve for general l-rings. However, in totally ordered rings the inequalities can be replaced by equalities. holds in any totally ordered ring . , then and the

u p k Rs ( vg F3 6Ss " p y y k

3.11.14 Theorem. In any po-ring property

is equivalent to property

s l Dk v R`o i oi T rj o o l l 0q$ z  

vv b s k c

Hv

7v P v s k 6pv g

s l k i  o sDkWp l s qo xo po yo D@!z k

3.11.13 Example: Since

satises

and

set under a relation which satises properties is a po-ring which is a lattice dened by .

and

is an l-ring.

satises

3.11.12 Denition. A partially ordered ring or po-ring is a ring

s qo po y z @Do | k n |m  q o q o p o y n |m s0xopD!z k o yo u wo w 7Tv D jX z  7v | z rbz wo w u r @S@D~o b}z { s r ghz k xo xo po yo n m


We now return to our original question concerning rings that are partially ordered.

which is also a partially ordered . A lattice ordered ring or l-ring

matrices with entries from . If and .

qo qo po y n l rs @0@DRo bm k

u w )Xx

w 0v

p o 67

u sr q o p o n m l Rt@DR1bk

pjv v s k

WAd c

o y )

1

r q

is ,

remainder of the proof are just as simple. Q.E.D.

3.12 Minimax Algebra In recent years lattice based matrix operations have found widespread applications in the engineering sciences. In these applications, the usual matrix operations of addition and multiplication are replaced by and , corresponding lattice operations. For example, given the bounded l-group two matrices with entries in , then the pointwise maximum, , of and , matrix dened by is the

Observe that this product is analogous to the usual matrix product

3.12.1 Example:
(i) Consider the bounded l-group

. Then

which provides an illustration of the pointwise maximum of two from (ii) For an illustration of the max product we use a and a

matrices with entries

127

matrix with entries from

X  X

0 

X $ T



0 X 0  b

with the symbol replaced by . Since be thought of as matrix addition.

replaces

in our denition, the pointwise maximum can

gi

"

b

@ S

X 0 

T S

If

is

and

is

, then the max product of

and

is the matrix

, where

 @D

}R

)0

`1

 RX R H

In order for

to hold, total order, although sufcient, is not a necessary condition; the l-ring satises but is not totally ordered.

Lattice induced matrix operations lead to an entirely different perspective of a class of nonlinear transformations. These ideas were applied by Shimbel [21] to communications networks, and to machine scheduling by Cuninghame-Green [7, 8] and Gifer [13]. Others have discussed their usefulness in applications to shortest path problems in graphs [18, 2, 6, 1]. Additional examples are given in [9], primarily in the eld of operations research. Another useful application to image processing was developed by Ritter and Davidson, [19] and [10]. While lattice theory and lattice-ordered groups have only marginal connections to the computational aspects of linear algebra, Cuninghame-Green developed a novel nonlinear matrix calculus based on the min and max product, called minimax algebra, which is very reminiscent of linear algebra [9]. Problems notated using the minimax products take on the avor of problems in linear algebra. By allowing for the minimax matrix products to take on the character of the familiar matrix products, concepts analogous to those in linear algebra such as solutions to systems of equations, linear dependence and independence, rank, seminorms, eigenvalues and eigenvectors, spectral inequalities, and invertible and equivalent matrices, can be formulated. Originally, many of these concepts were developed primarily to help solve operations research types of problems. Our interest in these notions is due to their applicability to image processing problems. satisfying the axioms An sl-semigroup
 0e!`5 W 0 U e! S S Wa0 `5 UY0   S S 0 % 5% 1)RQ!  

is called a belt. Viewing as multiplication and as addition provides with a ring like appearance, hence the name belt. If, in addition, is a lattice with another semigroup operation satisfying
5   0 W 2 eqi' S W 2 0 i' 0 S   0 U 2 p S U 2 0 S

then

is called a belt with duality.

If the multiplication and the dual multiplication coincide, then we call the multiplication selfdual. Obviously, any l-semigroup is a belt with self-duality. If the l-semigroup is actually an l-group,
128
2 0 0

'

G I G E D PHF4%

'

'

Similarly, the pointwise minimum


6

of two matrices of the same size is dened as

If

 C B

2 0

93 A

0 % 5 % $ " 1)43#

is the dual of , where

, then the dual or min product of

     

 

SR
 S   S 2 0 0

Here

W4'c! 2 0 U 

2 90 7 6 2 0 % ' % $ " #1)(&#! W 5 U XV!T0  W 5 U dV! W ' U dV! hY% g W % U S S

S 2 2 7 2 90 7 b c7 b 7 8

and

is the matrix

then is called a belt homomorphism. A belt (or semilattice) isomorphism or automorphism is given the usual meaning.

3.12.4 Example:
z y g r y z | r y !r#3hn! v i~s s  }

by . Then and Dene It is trivial to show that is a belt isomorphism. Furthermore, belts, that is, the multiplication commutes.
z y r y z r y !X3{#d g y w r y x)! v s 9utY s

A right semilattice space is also called a right s-lattice space or simply a space over . If and are known, then shall simply say that is a space. A subspace is a subset of a space which itself is a space over . Semilattice spaces play the role of vector spaces in the minimax theory. For example, if and , and we dene
s 9 u u | Pd1n)i31hPdHF`9xVag u s u

then it is easily veried that satises the above four axioms. Here, is a semilattice under coordinate-wise maximum. Thus we can regard as a right semilattice space over Similarly, we can dene a left semilattice space over using the left versions of the above four conditions. A two-sided space is a triple satisfying the following three axioms:
129
s s 3#!y s Qu g u cQ!y

g r y g r y y g 4rq3Yrq9XPY4r

g z y g r y g z r p43`4X)X!y

g y g r g g r r4PYxY)4!y

r g ar

u s

#cqy

We call
s z hr

a (right) semilattice space over and for all :

u s o  } s r a4kiVro

if the following four conditions are satised for all

V!y

be an l-group with identity and let Let right multiplication of elements of by elements of :
u s g rYrr g u 19C9Ry

be a semilattice. Suppose we have a

u #lk9Xj u

u s o y g y g y QrqpYPd!Yhnmap

g u i9R#y

g u h1)fe9y

for all in . If homomorphism that satises


w u

and

are two belts and

u c9 u

w v x3r

then each element has a unique multiplicative inverse call such a belt a division belt. Let and be two semilattices. A function homomorphism if
y y y d!4h)dV! u #R)qy u s Ttr u #R1!y

; by analogy with division rings, we is called a semilattice

is a semilattice

. are commutative

Let be a belt. An important class of spaces over is the class of function spaces. Here the s-lattice is replaced by the lattice . Such spaces are naturally two-sided. We shall only be interested in the case were . Thus we can view as the space of n-tuples . When discussing conjugacy in linear operator theory, two approaches are commonly used. One denes the conjugate of a given space as a special set of linear scalar-valued functions dened on . The other involves dening an involution (a one-to-one function) taking to that satises certain properties. The situation is slightly more complicated in the case of lattice transforms. and be two belts. We say that is conjugate to if there is Let a one-to-one correspondence satisfying the following two conditions:
Q 9R    x 9 ) )q q pka  ) ) d q 4q  x x h # 9  Q ) !  q

In lattice theory, is called a dual isomorphism. Note that conjugacy is a symmetric relation. If is an s-lattice with duality and satisfying
!  ) q R9 ) 9R  # d q x

, and , then the


V

If is a belt with duality, then we say that the space over has a duality if a dual addition is dened such that is an s-lattice with duality and is a space over . We now return to the nonlinear matrix algebra induced by belts. Let denote the set of all matrices with values in the belt . The following are some basic denitions and properties:
)

(1)

Scalar multiplication of a matrix

by an element
) Y f1

is dened by

for all

;
130

)R !

9

Here, is the inverse of under the group operation following relation for all in
4 d 3 P R) 9 ) !

Therefore,

Ht

f1

if if if

(3.12.1) . This gives the

then we say that is self-conjugate. If is a belt with duality, we say that conjugate whenever is conjugate to . In particular, every division belt is self-conjugate under the one-to-one correspondence every bounded l-group is self-conjugate under the one-to-one correspondence and if is nite. Thus, if is a multiplicative bounded l-group and dened by additive conjugate of is the unique element
3#t V r V F # 9 )R !

Fi

x 

f1

9

)

YQrt!q#r!t

is a belt and

is a right space over

is a belt and

is a left space over

Q )R 

)R !

&Y

x x 

is self-

The proofs of these properties are straight forward and can be found in [9]. Since the s-lattice is isomorphic to the s-lattice , we have that is a function space over as well as a space over . This mimics the classical role of matrices as linear transformation of spaces of -tuples. As in real or complex valued matrix theory, two matrices of prime importance in minimax theory are the identity matrix and the null matrix. Suppose that the belt has identity and null elements , respectively. We dene the identity matrix by

131

D EC

V 5#3 A A 5 #3

5@BA 3 A A

V 5 @3

5@3 A 9 A 5 @3 8

78

 6

T S UR

In the bounded l-group

we have

" G

 G  G

9 H

Thus we have

"

D D D D EC

5@IHA 3 A A A HA A A HA A A HA 5 3 A @IHA

A A A 5#3 A

5@3 A A A 5 @3

78

and the null matrix

by

5 3 1 ) 420( '

" # X

D EC

4e

' 5#3 A A 5 #3

5 3 @BA A A

!  Y

9

 9qi

 

A A A ' 5 @3

q H

5@3 A A 5@3 '

&x91i

(5)

For all

h9C9q

78

9

 6

$ % 

&

C ! iH

(4)

h9C9 H

(3)

is a belt; ;

is a left space over the belt

h)RQ!

#(91!

(2)

is an s-lattice and a function space over

Conjugacy extends to matrices if the underlying value set is itself a self-conjugate belt. This is stated in the next theorem.

Here the conjugate of a matrix with entries in or is the matrix where and is the additive conjugate of dened earlier. The notions of pointwise minimum and dual product could have been dened in terms of conjugation since

and

for appropriately sized matrices. While semilattice spaces over l-groups play the role of vector spaces in minimax theory, linear homomorphisms of semilattice spaces take on the role of linear transformations.

In linear algebra, we characterize linear transformations of vector spaces entirely in terms of matrices. A natural question to ask is whether or not a similar classication holds in minimax algebra. The following results give necessary and sufcient conditions for this to be the case.

132

w y

w kv 0QU2k2 z y v z v

The belt operations of belt dened by

on

are the naturally induced operations from the

w y

w v 0Q

wv k#y

vzq0k2x v v z v v z x2xv b w y xv 0 w

y QQ

element

, then for all integers

3.12.9 Theorem. (Cunninghame-Greene [9]) If


i @h

is a belt which has an identity element is isomorphic to

and a null

w y uv y0Q

We denote the set of all right linear homomorphisms from

to

over

w y u  v U}vQtQxk2z

phism

y y w vmyxv

v 2Q2z

y w xE#kv

Ey@wkv Eyk}|z ~ y uv { y u Evv

3.12.8 Denition. Let

and

be given spaces over a belt is called right linear (over ) if

. An s-lattice homomor-

by

y gf j hkv

i d

` 2Y w

y y y y w !!xv

3.12.7 Theorem.

(Cunninghame-Greene [9]) If is a self-conjugate belt.

u t

s s s s Er
is a self-conjugate belt, then

g i@h p p i @h w

d r i i Q i v

r d i i  i xv

i@qp h p p

p p p p p

p fg me b b

p p p g i #h

r td

r sqd

gf e hxv

i@h p p i @h g b e e e f

de d b ca E!v y y y y w v nfg i px0e l nfg i oxme l b w gf j

` XY UW

and in

we have

We call a matrix a lattice transform. Since is isomorphic to , we shall usually refer to as a lattice transform instead of a right linear homomorphism. In particular, lattice transforms are to minimax algebra what linear transforms are to linear algebra. Much of what has been established in this section can be expressed in the context of dual latticeordered semigroups. However, we wish to study these structures from a different perspective. The extension of the belt operations to matrices allows us to view matrices as operators on spaces of n-tuples in a way similar to vector-space transformations even though these operators are non-linear due to the lattice structure of the underlying set . This point of view will be especially useful when one is interested in optimizing non-linear image transforms that correspond to lattice transforms (Chapter 7). The minimax algebra that we will be mostly concerned with is based on the two isomorphic bounded l-groups and The substructure of , which is a 3element bounded l-group, is of particular interest in Boolean image of the 3element bounded l-group is a Boolean algebra processing. The sublattice with complementation . By setting , we obtain the Boolean algebra commonly used in computer science.

3.13 Heterogeneous Algebras In the previous sections we considered several algebraic systems, or algebras, such as groups, rings, linear algebras, lattice algebras, and minimax algebras. These algebras are all special cases of a more general concept known as a heterogeneous algebra. Image algebra is a particularly applicable example of a heterogeneous algebra. Our basic denition of a heterogeneous algebra is due to Birkhoff and Lipson [4].

133

5E 0

4E0 %

3 ' % )$x ' $" 2 1 0 ( ( ( & %# !

  

  

In this denition the notation . In particular,

E0 x

and each

, and

means that the indexing depends on the operation

E0

x 0

3.13.1 Denition. An algebra


hm !

is a pair , where (1) is a family of non-empty sets of different types of elements and the subscripts are members of some indexing set , and (2) is a set of nitary operations (for some indexing set ), where each is a mapping of the Cartesian product of some of the s to another; that is,

xE!E

k0Q

@%

0Q

E 

m E

k #

@  @

EE!E 2x EE U

!x#

that element

x0Q Q

Q

3.12.10 Corollary: Suppose

with . If is a belt, then a necessary and sufcient condition is isomorphic to for all integers is that has an identity with respect to and a null element with respect to .

0 m

 @

The operation is unary if , binary if , ternary if , etc. The elements of are called the sets of operands of , and the elements are called the operators of (or operations on) . An algebra is called a homogeneous or single valued algebra if contains only one element i.e., otherwise is called a heterogeneous or many valued algebra. If is single valued, we simply write instead of and if the operations are tacitly understood, we write in place of . If and are two algebras with and , then is called a subalgebra of if and only if and for each there exists a such that

3.13.2 Examples:
W A XVQ

(i)

, where consists of a set of vectors and a set of A linear algebra scalars, and (see Section 3.9). The scalars form a eld under the operations and the set forms a ring under the operations . In addition, there is a fth operation of scalar multiplication, , satisfying the vector space through (3.7) and the linear algebra axiom . Since , is a axioms heterogeneous algebra. Note that the ring is a homogeneous subalgebra of . A nite state machine is a heterogeneous algebra. Here = set of states, = set of input symbols, = set of output symbols, is the state transition function, and is the state output function.
I  I H e y W c A r e"U a gY I y W c A iXr e "U a Y I | W y W 'ic y i { a Y I H z d y { z e e H H c c x C n pp we Qcvu'txrsq l W gkA U Y f W A U Y g ha Y g sa f a W Y } oa a Y { a z ghi@ia Y d `ea U m W A U

(ii)

Another consequence of the denition of subalgebras of an algebra is that the subalgebras of an algebra form a complete lattice [3]. The notion of a homomorphism between algebraic systems as dened in the previous sections has its natural generalization to heterogeneous algebras.
e U ~ 7 6 i 'I H e y i ~ I I H I y W c A er e hU W c A R

3.13.4 Denition. Let


r i R D~

and

is a set of functions

be two algebras. A homomorphism (one for each ) such that for any operation
I H s)4

134

5s'

 s

o$ d

in

there exists an

, with

a gY I

3.13.3 Theorem. Any intersection of subalgebras of

is a subalgebra of

xy

If and , then the intersection


e "U W c A ikR

is a family of subalgebras with for every index . Higgins proved the following theorem [14]. .

I H

Q S I H y W A q'XBu

G A 7 FB@9

U S T7 Q

Y I xwH

W A XVQ

E A 7 FB@9 Y H pa

u S y

e hU

C A 7 DB@9 a Y gfH U

n om i j d sH U U qU A Qc c e "U 3tA e a H

a gY I H

W c

v uc A tsr v 3a

e "U

7 86 R

a dH

R Qc A eqU XVR a W ic e "U a Y gpH c

ip~ y } y ~ P|

a Y b`H

W A XVQ

I PH

holds.

As usual, homomorphisms that are one-to-one and onto meaning is one-to-one and onto for each are called isomorphisms. For instance, if is a nite set with , then and are isomorphic. Here and denote the set of vector space operations for and , respectively. The isomorphism consists of the map given in Example 2.8.3 and the identity map .
 3v'gs s p s P s 4 P s P

3.14 Generalized Matrix Products The common matrix product, the tensor or Kronecker product, the outer and inner vector product, and the minimax matrix product discussed in Section 3.12, are all special cases of a more general matrix product associated with heterogeneous algebras. induces, for any pair of positive Following the ideas of Section 3.12 we note that a semigroup integers and , a semigroup of matrices . The induced operation on the matrix semigroup are elements of is dened componentwise. More precisely, if , then
h

dened by
( siv 'siv P&%   h $#"

The componentwise product dened by Eqs. 3.14.2 and 3.14.3 is called the generalized Hadamard product. In the special case where , the algebraic structure induces a matrix structure that behaves very much like the structure . For example, if distributes over in , then distributes over in . Similar comments can be made for commutativity and associativity. In the subsequent discussion we follow the convention of letting and view as the set of m-dimensional row vectors with entries from . Similarly, if , then denotes the set of n-dimensional column vectors with entries from . Our goal is to dene a
135

h i ) 1

) 0

i d d

We can take this concept a step further. If a binary operation


 h

is any binary operation, then

w

3sb

 s   v  h   h

o' )s b id

h  i xo

i'

such that the composition


 s) 8 i h h

(3.14.1)

! 

induces

(3.14.2)

(3.14.3)

q i Pe d hiP4 9X g gf9X $F u B u Hye v n | V } | { | V 8

B @8 7 53 2 Q 8 V 1Ail4!B | f(

ec U e S ` sdU7 S
using the

e s07 ec 7} | e c { e } s07 {
. . .

where the double arrow denotes the appropriate one-to-one correspondence. Observe that the last factor in the 3fold Cartesian product of the rst correspondence is , which is also the rst factor in the 3fold Cartesian product of the second correspondence. This common factor is the key ingredient in the denition of the general matrix product of order p. We dene the rst correspondence in terms of the row scanning map

u %UE S ` UC S

class of matrix products that allow us to multiply matrices from with matrices from , where m is not necessarily equal to n. Suppose which divides both m and n. Note that such an integer p always exists, namely . We shall establish the following two one-to-one correspondences:

B G8E 5 C IHFD42

The one-to-one correspondence allows us to re-index the entries of a matrix terms of a triple index by using the convention

hB 8 e B u u 8 B u H"w e v u H8  ec S w U7 S ` U3 S U e S ` sdU7 S ` U3 y&e q i V h k pg k r k pn k u k HB u H8 j


We dene the one-to-one correspondence

k u k H e v dB u A8 e v n k u k sdB u f8 c U e S ` es0U7 S ~ ec } | s07 {


. . . is given by

ec } | s07 {
. . .

} ec U A |z fde 7 c { z e $z } fd7 { } {
. . .

y x x x x x x x x x x x x x x x x wx

} e e | {
. . .

U } e | { } z l{
. . .

~ } | {
. . .

} U A |z { z e z l{ }
. . .

~ } e e| ~ { } e gz { |e

~ } | U e{ } z { |

~ ~ } ~ | U e{ ~ } z { |~

~ }A |z U e { z } | $z z { z

ec U e S ` sdU7 S ` U3 S

q i k V e v k j vg ut sq0pomk u lfpe v dB u Hye v r k j n B k8 j 8 q i P h e iPgfd19X g 9X u pXH8B $u fre " PB V 8 v S w U7 S U e S ` esc0U7 yxe v U7 S ` U3 S a

Ue 'S

ec ec ` a tUE S ` srUC S ` U e S phU e S ` fdU7 S 4U3 S q i g

` a bU7 S 4U3 S

B @8 7 53 1A9642

or, equivalently, by

It follows that the row-scanning order on

Since , row scanning order (see also Example 3.1.5) as shown:

136

linearizes the array

(3.14.5) (3.14.4) in

} | { |

U S Q 'TRP

X V YWP

Hf S T"f R 1f
% 5 #

(v A ft

The induced operation in Eq. 3.14.2 is a componentwise operation dened only for matrices of the same dimension. The p-product is dened for matrices of possibly different dimensionality and extends the common notions of vector and matrix products. In general, we start with a heterogeneous algebra , where is a binary operation and is a commutative semigroup. For each quadruple l, m, n, and q of positive integers and each xed that divides both m and n, we construct an induced heterogeneous matrix algebra , where is the induced matrix semigroup dened by Eq. 3.14.1 and

i g

$ g $ 'A  $

g g A

f g f  A $ 

$ gf
3.14.1 Example: Suppose
. Hence for

. Then , we have

1iv"fif"f

dfp4iA Af !dF

The factor of the Cartesian product row-scanning map is given by

is a binary operation induced by . The operation is called the general matrix product of order p or simply the p-product and is dened as follows: Suppose and . Re-index A and B using the rule

 1
9   D1C

)0

"() #

0 () # ) 8 BA

A dH %5 #  9@786 2  # !  45i3If 1 ) 01 )(#'Fg1f %& $" (   0

 f  f

g A g A

 f  A

(3.14.7)

%!spWi $#" 1FHH 


This allows us to re-index the entries of a matrix by using the convention

If I  Ht %9'g%!i 'gspRHA $" p 9 i ' '

A  A

3.14.2 Example: Suppose

. Then , we have

4v"R"f

H &s A#f fpsd

. Hence for

137

I # sU E lHA sF G E
% I Q # P

A & A H

 Ap

is decomposed in a similar fashion. Here the

in terms of a triple index

(3.14.8) (3.14.6)

    y00p

$ $ A

  $ g

'

mB 3

& P

mB

Q

x`

`}Bdi

`}&'ix C&

 qsh{Cg{  qh {  qh@ {

  

hmg { { {

P {{Cg{ P { {

 

g{mg Pg{ h Pg{@ { g{{PgH Pg{@ 

C {Cg{ C  {

 

g{Cg{ g{ l{ g{@ { Pg{g{ g{@  Pg{C  Pg{CgC y tw v qCxwy

{ {@ { { h{Pg{ { {@  { h{z  h{Pg

P {@ {  P {{Pg  P {@   P {{z B P {{PgB

C @ {  C {Pg  C @   C {z B C {PgB t W

 psh{Pg  B qsh{{ @    psh{z B  psh{PgB

 

  y u

g{{z { g{{Pg{ v y t u "r

 

y t v t ~}{y | y fd Ce

f md V

We now dene the matrix

y x w v u t rs p h f e c BDs 86qig@db a Y W T`XV

by

j c kb c r n sC mB hg

a o o o qp$a C l n

kb j

hg

f Cd

W C ml H n i

j kb i hg

u zr h H W H

where

. . .

. . .

. . .

. . .

. . .

is the entry in the (s,j)-row and (i,t)-column of . Here we use the lexicographical order or if . Thus, the matrix has the following form:

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

 q{ { 

{ h{@ {

z { { 

Pg{hp@ {

z B{ { 

3.14.3 Example: Suppose

g3 {

The entry

in the (s,j)-row and (i,t)-column is underlined for emphasis.

and

denotes addition (+), while denotes multiplication , then for , one obtains . Now let

"F Xxqd"qXw ``'` h Hq

in the above description. If

Then the (2,1)-row and (2,3)-column element

T81B ze Bg q

 

 

 

 &

 &

&

&

is given by

and

138
 @ l l  3

of the matrix
. . . . . . . . . . . .

t Bw u Pr

(3.14.10) (3.14.9)

0 F5 n

s o  2Ye PG c

y @

t r q i usdwg

The notation is complete in that it involves all the building blocks of the p-product; the subscript p provides us with the common divisor of m and n, reminds us of the binary operation , and the operation inscribed by the circle denes the global reduce operation of Eq. 3.14.10 of elements is viewed as a of . We make the convention of using a circle, , if the binary operation multiplicative operation and a square, , if it is viewed as an additive operation. Thus if and denotes addition (+), while denotes multiplication, then Eqs. 3.14.9 and 3.14.10 have form

t r q i g e usdphf0

X !"

S S UTS S S UTS SUSTS 5 S S UTS 5

$!" $ ! $ $ 

`a9 ! X X  8 X 8 7 Y

 Q! C 5  9  Q! C 5   Q! C  8 8  7  Q! C

 C 5   C 5   C   C 

respectively. On the other hand, if denotes the maximum, , of two numbers and then Eqs. 3.14.9 and 3.14.10 have form

respectively. As mentioned earlier, the p-product includes the commonly used matrix and vector products. These products are obtained when substituting certain specic values for p. We conclude this section by considering these specic cases.
5 5 5 s o  2Ye ! c ( j  c CB  d p p t TUp t o  Pe G  ( j  d ! CB  @ Qe  o  h ( j I iv h c Iy  u c tx  @ b t n F5 n 5 j S d m c fR l  ( p p p rTUq( o  Ye G j S  d m fR l   @ Ye P! o  h F d c ( 0 j k i gh c S d m C l  h @ fe R C  d Iy  @ x 0 b v 0 b 0 b c d0 S S TUS S S TUS S S5 TUS S S5 TUS "  ! ! "  34 13 @ 5 % 5 ! 13 I     FEP 9  FEP        FEP U 8    8 7  FEP S S TUS S S TUS S S TUS S S TUS   ! P C   ! P C   ! P CW   ! P C  CBA    CBA  S S UTS S S UTS S S UTS S S UTS ! CB   ! CB    % CG A   % CG A   % CG A  B    B    G A C   G A C 34 13 @    P R   % CG AUVG A CU   G AC 5  G AC 5 34  5 G AC  P5  C  5 5 " 5  5 ! !  !" 5 9 ! 5    8 8  7    (H& G FEB  0 5 G FEB    5 " 5 5  634 % %  DB     DB    B    BA   @ 13 2 ()'  & $ 0 $   #%  # !  "  "        !  !  !  !       

Thus, in order to compute two underlined elements of

, the two underlined elements of as illustrated:

and

and

139

are combined with the

denotes addition,

(3.14.14) (3.14.13) (3.14.12) (3.14.11)

 RB  d h

@ e fR R  d 

I

{ {

IG f

G h

UT UT 

{ 6

6

q x

TT

TT

m

UT

m

which corresponds to the tensor product of a column vector and a matrix. If instead of , , then we obtain the heterogeneous version of the tensor product of a row vector and a matrix:

y x z

G B

3.14.4 The case

y fsw x

If , then column of the matrix

. Therefore, the entry in the (s,j)-row and (i,t)is given by . Since . Hence,

G

This is the Kronecker or tensor product for heterogeneous algebras. For this reason, whenever are understood, we let be denoted by . If both and , then is a column vector of length l and

a W

P 

TU TU

q % {

 x  { P

{p TT {  x p TT {  { ! fR U x  Phy x T y  x  kf R CW G RBuf E U x x u kkh f y x qprd~zu| x w }  | x w } y x {zw

where

. . .

is of form

. . .

. . .

. . .

. . .

y x | y x ww

If both

and

, then we obtain the tensor product of a row vector and a column vector:

. . .

. . .

. . .

UT

x x

p y x ) y x

Observe that if vectors. If and

, then this general tensor product corresponds to the outer product of two row

, then

. . .

. . .

TU TU

. . .

. . .

. . .

TU

140
x y x z y x q| x z

and . . . . . . and

x ~|

@ 0

10 )( 9& )( 10 0 '))( & G ' ' ' @ ' ' ' 0 ' ' ' 8 ' ' ' 7 0 ' ' ' & ' ' ' 60 65 ')4 10 3  )( 2 1 0 )( & % &

# H$

!  "  

  

  

  

  

Q'

%GFU

!!YUU

  

Y Tw d

I w

 w 'Y p

It follows from the last two cases that if is commutative, then where are the transpose of respectively. If and , then , , where . Thus,

' 

ush

and

3.14.5 The case

In this case

. Since . Therefore,

A3B E

 0 F E

I 0 f

0 P A B DG

E F

ADB

A B DC

that

Equations 3.14.15, 3.14.16, and 3.14.17 play a central role in image algebra and correspond to the general template product, the general backward transform (or backward image-template product), and the general forward transform (or forward image-template product), respectively. Another important product occurs whenever . In this case . Thus, is a scalar value in . Since , we set and note that

s $ i dFt x XlX { e } ~

s w X  w y v u Ft i b q d { e i ~ i D} q 2$i Vd $yq { z } ~ ~ ~ } | { z x n n m k j o(lDi hg f qt p s i Q d Ft

since . We also dene Here we set whenever . Replacing with , we see that 3.14.15 has the form of the usual matrix product. For this reason we refer to as the generalized matrix product. , then and is dened by If

I P

e %V

e 9%G ac

`  ! aW Y X  W

G f

An analogous case occurs when q = 1. In this case is dened by

f e

i v f t k v k t k e r r

i v f u e t wr v t sr

i 3e f dw y w v xau s t q i rph

c d

c Yd

 

A   V 9b

VT U

SR

 

I E Y'h

I !h

since in this case

Again, replacing with , we see that 3.14.18 has the form of the usual inner or dot product of two vectors. For this reason we call . the generalized dot product and set

s Q d Ft

n p Yt v f twu r e i e rv t s s y w v x(u t w k k e

i v k t k v k t k r e i v f Vu 9br e r t wr v t s q i i Hrph

n p Yt

k j n m lDi hg s i

is dened by

and

141

s d t

n m k j o(lDi hg

and

, we have , where

(3.14.18) (3.14.17) (3.14.16) (3.14.15) , and . , ,

i e s $ i d Ft

s e

0 PQ # E H

Bibliography
[1] R.C. Backhouse and B. Carr . Regular algebra applied to path-nding problems. J. Inst. Math. Appl., e 15:161186, 1975. [2] C. Benzaken. Structures algbra des cheminements. In G. Biorci, editor, Network and Switching e Theory, pages 4057. Academic Press, 1968. [3] G. Birkhoff. Lattice Theory. American Mathematical Society, Providence, RI, 1984. [4] G. Birkhoff and J. Lipson. Heterogeneous algebras. Journal of Combinatorial Theory, 8:115133, 1970. [5] R. Blahut. Fast Algorithms for Digital Signal Processing. Addison-Wesley, Reading, MA, 1985. [6] B. Carr . An algebra for network routing problems. J. Inst. Math. Appl., 7:273294, 1971. e [7] R. Cuninghame-Green. Process synchronisation in steelworksa problem of feasibility. In Banbury and Maitland, editors, Procceedings of the 2nd International Conference on Operations Research, pages 323328. English University Press, 1960. [8] R. Cuninghame-Green. Describing industrial processes with interference and approximating their steady-state behaviour. Oper. Research Quart., 13:95100, 1962. [9] R. Cuninghame-Green. Minimax Algebra: Lecture Notes in Economics and Mathematical Systems 166. Springer-Verlag, New York, 1979. [10] J.L. Davidson. Lattice Structures in the Image Algebra and Applications to Image Processing. PhD thesis, University of Florida, Gainesville, FL, 1989. [11] R. Dedekind. Gesammelte Mathematische Werke. Math. Annalen, Braunschweig, 1927. [12] P.D. Gader. Image Algebra Techniques for Parallel Computation of Discrete Fourier Transforms and General Linear Transforms. PhD thesis, University of Florida, Gainesville, FL, 1986. [13] B. Gifer. Mathematical solution of production planning and scheduling problems. Tech. rep., IBM ASDD, 1960. [14] P.J. Higgins. Algebras with a scheme of operators. Mathematische Nachrichten, 27:115132, 1963. [15] F. Klein. Gesammelte mathematische Abhandlungen, volume 1. Julius Springer, Goettingen-Berlin, 1921. [16] S. Lang. Algebra. Addison-Wesley, Reading, MA, 1965. [17] Jr M. Hall. The Theory of Groups. Macmillan Co., New York, 1966. [18] V. Peteanu. An algebra of the optimal path in networks. Mathematica, 9:335342, 1967. [19] G.X. Ritter and J.L. Davidson. The image algebra and lattice theory. Technical Report TR 8709, University of Florida CIS Department, 1987. [20] W. Rudin. Real and Complex Analysis. McGraw-Hill, New York, NY, 1974. [21] A. Shimbel. Structure in communication nets. In Proceedings of the Symposium on Information Networks, pages 119203. Polytechnic Institute of Brooklyn, 1954. [22] D. Wenzel. Adaption of group algebras to image processing. Masters thesis, University of Texas at San Antonio, Dept. of Computer Science, December 1988.

142

CHAPTER 4 IMAGE ALGEBRA The goal of this chapter is to familiarize the reader with the basic concepts that dene image algebra. Since the primary operands of image algebra are images and templates, we begin our discussion with their characterization.

4.1 Images and Templates In the design and analysis of computer vision algorithms it is not only convenient, but also necessary to mathematically characterize the images to be manipulated. In Section 2.18 we discussed the notion of a digital image. According to Denition 2.18.3, digital images are quantized versions of continuous intensity functions over some spatial domain X. Specically, digital images were dened as functions with domain a rectangular subset of and range some subset . Although most digital images assume this type of format, the denition does not cover various of types of images manipulated by current digital and optical devices. For instance, digital computers have two major forms of numeric representations: integer and real. Integer numbers range from 0 to some maximum value . In a 32bit computer, for example, the maximum positive integer is . If an integer arithmetic operation results in a fractional part, the remainder is simply truncated. Thus, for example, the ratio is represented as the integer 5 without a trailing decimal point. With real number computation, the fractional part of an operation is retained up to the numerical accuracy of the computer. The ratio of the real numbers is represented as . Most image processing techniques involve real or oating point arithmetic, thus necessitating real-valued image representation. Furthermore, various image transformations, such as edge detection transforms and the Fourier transform, introduce negative and complex values. Also, when modeling images and image transforms in the continuous domain, a continuum of values is usually required for the range of an image function. Thus, the set does not sufce to characterize image values and image processing transforms. , are often generated (computed) Three-dimensional images, i.e., images with domain in from multiple camera views, motion, millimeter wave radar (MMWR), X-ray tomography, or laser-range data. Therefore, the need for domains other than rectangular subsets of is also obvious. In order to provide a mathematically rigorous denition of an image that covers this plethora of different images, it becomes evident that an image must be dened in general terms, with minimum specication.
F ( x 9)6 39 Fp 9 V

4.1.1

Denition. Let be a homogeneous algebra and X a topological space. An valued image on X is any element of . Given an valued image , then is called the set of possible range values of a and X the spatial domain of a.
x

It is often convenient to let the graph of an image represent a. The graph of an image is also referred to as the data structure representation of the image. Given the data structure representation , then an element of the data structure is called a picture element or pixel. The rst coordinate x of a pixel is called the pixel location or image point, and the second coordinate a(x) is called the pixel value of a at location x.
143

9(VX

CpVXH

Obviously, Denition 4.1.1 covers all mathematical images on topological spaces with range in an algebraic system. Requiring X to be a topological space provides us with the notion of nearness of pixels. Since X is not directly specied we may substitute any space required for the analysis of an image or imposed by a particular sensor and scene. For example, X could be a subset of with of form , where the rst coordinates denote spatial location and t a time variable. Similarly, replacing the unspecied value set with or provides us with digital integer-valued and digital vector-valued images, respectively. An implication of these observations is that 4.1.1 also characterizes any type of discrete or continuous physical image. The common model of a physical image is in terms of a continuous energy function E(x, ), where is a variable associated with energy at space/time location x. In the context of visual images refers to wavelength and x may be of form , , or , where and represent spatial coordinates and t the time variable. Physical imaging systems impose a restriction on the maximum brightness of an image and since light intensity is a real positive quantity, it is assumed that
xH 3  3 a(dF DDd oDd 9( 2 D(9 VdDd Q 9VDd D(X 39a3(X

where B denotes the maximum brightness. In addition, the spatial domain is limited in extent by the imaging system and the system operates only over a nite time interval so that . Thus, E is a bounded function on , where X is compact, , and . In many imaging systems the image does not change with time so that X represents only the set of spatial domain variables. The observed image eld is modeled as a spectrally weighted interval
4p lVl9V  D

where s( ) denotes the spectral response of the sensor used. In a multispectral imaging system the observed image eld is given by
49X ))(DX 4 

and system, where

denotes the response of the ith sensor. For example, in an arbitrary red-green-blue coordinate
49XaVxDd

144

lDl92

lDl9V

4VlXDX 4Vlo29a

where
X X Xx  

and are spectral tristimulus values for the set of red, green, and blue primaries, respectively. Although these examples are presented in the context of visual images, other multidimensional time varying signals have similar representations and can always be viewed as bounded functions from a compact set X to an appropriate value set . The sampled (quantized) versions of these functions remain, of course, bounded functions on compact sets as nite discrete sets are always compact. Therefore, both continuous and quantized image representations of physical images are included in Denition 4.1.1. Even though Denition 4.1.1 provides a general framework for specifying images with particular point and value sets, the denition does not provide for more insight into understanding image content; the functional form of the image a is almost never known. The inability to relate changes in x to those in a(x) presents one of the greatest difculties in image understanding. In addition, 4.1.1 provides only for a deterministic image representation; it denes a mathematical image function with point properties. It is often convenient to regard an image as a sample of a stochastic process. The image function (or ) is assumed to be a member of a continuous four-dimensional stochastic process with space variable and time variable t. A discrete (quantized) image array can be completely characterized statistically by its joint probability density. The extension of image algebra to include stochastic models is given in Section ?. A more abstract class of images is provided by templates. Templates are images whose values are images. In terms of image processing applications, templates reign supreme; template operations play a dominant role in most algorithms and provide for brevity of code. They are the essence of image algebra. The notion of a template, as used in image algebra, unies and generalizes the usual concepts of templates, masks, windows, and neighborhood functions into one general mathematical entity. In addition, templates generalize the notion of structuring elements as used in mathematical morphology [5, 4].

4.1.2

Denition. A template is an image whose pixel values are images (functions). In particular, . Thus, and t is an an valued template from Y to X is a function valued image on Y. For notational convenience we dene . The image has representation
c a S & W U db`YXVF e sF y x v HwU S & TRQ8HF P I G I HU ( G i q  i rpY   ( D0Y e F F f e hgF  ( t 2Bu1 e F & S &

From a set theoretic point of view the set of all valued templates from Y to X and the set are equivalent. Dening for each a corresponding function by , and vice versa, provides for the necessary one-to-one correspondence. Conceptually, however, there is a great distinction between the elements of and those of . For the former we obtain for each point an valued image on X while for the latter we obtain for each point a value . It is this concept of associating with each point an image that provides templates with their great utility. If t is a real or complex-valued template from Y to X, then the support of is denoted by and is dened as
 e F c S F & U I wU i c rT& S e F y x c a S & dTW & 1  ( C c a S & W e F G drwU v c a T& W S e F U wF ( t 1 uC e sF & U & Ti7pY  ( I HU F i F e dF  ( C c 1  i  ( C2 S & I v wU  i  ( TpY e sF

e dF

The pixel values

98654 3  @  6  3 D8ED '

of this image are called the weights of the template at point y.

&

 ( C

 $ " %#!     1  ( 2CB '

 @  9  6  3 A%8754 '

 

  

1  ( 20) '

145

For extended real-valued templates we also dene the following supports at innity:
u s r ph g j f e o vtuqC!drwmkupsd n l j i h g f e

and
s r ph g j f e o qCs|w{kzC!sy! n l j i h g f e

If X is a space with an operation + such that is a group, then a template is said to be translation invariant (with respect to the operation +) if and only if for each triple we have that . Templates that are not translation invariant are called translation variant or, simply, variant templates. A large class of translation invariant templates with nite support have the nice property that they can be dened pictorially. For example, let and y = (x,y) be an arbitrary point . Dene by dening of X. Set the weights whenever x is not an element of . Note that it follows from the denition of t that . is as shown in Figure Thus, at any arbitrary point y, the conguration of the support and weights of 4.1.1. The shaded cell in the pictorial representation of indicates the location of the point y.
s j EAu j u j u i h g f e AE8sYp n l u u wgD2j B l e hg0jY f 88g Y f qxg e u h j e u h f se g } u h j u g u vtyY5!qv4h h Ehn f e j e u h g j e u h g f xv f qvqpY f e j u g } u h tE4rTj s j sEAu g j f e h g j f %HY8s2CYse j u j u ETsi

3 4

1 2

x +1

Figure 4.1.1 Pictorial representation of a translation invariant template There are certain collections of templates that can be dened explicitly in terms of parameters. These parameterized templates are of great practical importance.

4.1.3

Denition. A parameterized valued template from Y to X with parameters in P is a function of form The set P is called the set of parameters and each is called a parameter of t.
{ {sT H

146

Thus, a parameterized valued template from Y to X gives rise to a family of regular . templates from Y to X, namely
HwH B08

y -1

l TYe

u s r } ph g j f e o |~qCs|w{kzC!syx5 n l j i h g f e w g u n |D

valued

Figure 4.2.1 An example of an explicitly specied coordinate restriction. 4.2 Functional Specication of Image Processing Techniques The basic concepts of elementary function theory discussed in Sections 2.5 and 2.6 provide the underlying foundation of a functional specication of image processing techniques. This is a direct consequence of viewing images as functions; since images are functions, the notation and concepts discussed in 2.5, 2.6, and subsequent sections can be used to furnish the functional notation for specifying image processing algorithms. In order to emphasize the fact that even the most elementary concepts of function theory have important applications in image processing, we begin the development of a functional notation by focusing our attention on the notions of domain, range, restriction, and extension of a function. Image restrictions and extensions are used to restrict images to regions of particular interest and to embed images into larger images, respectively. Following the notation used in Section 2.5, the restriction of to a subset Z of X is denoted by , and dened by . Thus, . In practice, the user may specify Z explicitly by providing bounds for the coordinates of the points of Z. For example, the image a on the left of Figure 4.2.1 represents a digital image on the set , while the image on the right represents the restriction . There is nothing magical about restricting a to a subset Z of its domain X. We can just as well dene restrictions of images to subsets of the range values. Specically, if and , then the restriction of a to S is denoted by and dened as
pduX 0 `ww { !C 0 Hdt 8kxtgm%kxt2rdEwxYD4 0 0 D% 7 Tm  d w 0 0

In terms of the pixel representation of we have . The double-bar notation is used to focus attention on the fact that the restriction is applied to the second coordinate of . Image restrictions in terms of subsets of the value set is an extremely useful concept in computer vision as many image processing tasks are restricted to image domains over which the image values
147
p00BE|y05pYv 0 0 t

Figure 4.2.2 Example of a range restriction. satisfy certain properties. Of course, one can always write this type of restriction in terms of a rst coordinate restriction by setting so that . However, writing a program statement such as is of little value since Z is implicitly specied in terms of S; i.e., . Thus, Z would have to be precomputed, Z must be determined in terms of the property adding to the computational overhead as well as increased code. In contrast, direct restriction of the second coordinate values to an explicitly specied set S avoids these problems and provides for easier implementation. As mentioned, restrictions to the range set provide a useful tool for expressing various algorithmic procedures. For instance, if and S is the interval , where k denotes some given threshold value, then denotes the image a restricted to all those points of X where a(x) exceeds the value k. In order to reduce notation, we dene . Similarly,

Figure 4.2.2 provides an example of such a restriction. In this example, the input a is shown on the left (it is identical to the explicitly restricted image shown on the right of Figure 4.2.1), while the implicitly specied image is shown on the right. A more general form of range restriction is given when S corresponds to a set-valued image ; i.e., . In this case we dene

For example, given an image . Then baggage, we dene

Combining the concepts of rst and second coordinate (domain and range) restrictions provides the general denition of an image restriction.
148

%kyy%%~y&%py2yt)p o l `g | x | x l } | | x l z x w m z | x | x l } | x lz w m z | x | x l } || x lz x w m %y2%#~yQ|k{y&2yxtp o A%lr%2y%#yy&r~y~ytp o %l z%yx%)|%~y&Q|%pyyytw)p o Vzyyx%%%~y{y&k2yt)p o Rl | x l } | x lz x m l |  | x l } || x lz x w vm usrm l p o nm Atk%qAl  " ji %Y%#gBQk&3Yt Ag%  " g d ( d r%Y%#hSfe w%Y`i& x w i ( 0 "  3  s r%B%B&%YgXtR% 7 #%B v 0 yxw

 i h fd c a  GD F  W G D U T s tqrB DSF`Xp@ P B R%)`ge3 bB b% P B %3 RB S`YX@ % P B %V3 F RB A% P B A% G D  P I SF RCB@ % QB A G D @ HF ECBA ( 7 43 9865&21 0( )

, we may dene a function by . Again, in order to reduce notational . Similarly, we dene

!   

 '%B&  %$ #"   2Yk

u  `I %

to and dened by

In actual practice, the user will have to specify the function b. Figure 4.2.3 provides an example of such an extension. Here we extended the image (displayed on the right of Fig. 4.2.2) with domain to the image shown on the right. In this example, , and b is the image displayed on the left of Fig. 4.2.3.

Figure 4.2.3 An example of an image extension. Two of the most important concepts associated with a function are its domain and range (Section 2.6). In the eld of image understanding, it is convenient to view these concepts as functions that map images to sets associated with certain image properties. Specically, we view the concept of range as a function

dened by

. Similarly, the concept of domain is viewed as the function

dened by , then

, where Y is a subspace of some larger space X. In particular, if

149

%# t C %

gV%2% Y ~ w%2 g g ' '' %# t % ~`gwQr%~&k~t t C %

It follows that The extension of space, is denoted by

, , and . on Y, where X and Y are subsets of the same topological

`e#  # ! %

H t2 tt

)tSg

A#HR'#S&~kw 6%~&A

## fe

4.2.1

Denition. If

, and

, then the restriction of a to Z and S is dened as

h2y g E`& V2y g

e&yg`g

These mappings can be used to extract point sets and value sets from regions of images of particular interest. For example, the statement

yields the set of all points (pixel locations) where a(x) exceeds k, namely Replacing Eqs. 4.2.1 by

results in a subset of instead of X. Restriction, extension, domain, and range are some of the elementary concepts used in the functional specication of image processing techniques. In subsequent sections we shall encounter many others.

4.3 Induced Operations on Images Manipulating image data using the concepts of restriction, extension, domain, and range does not does not involve the algebraic structure of the underlying value set; the statement reference the arithmetic operations of addition and multiplication associated with . However, it is the operations associated with the value set that are generally used in processing valued images. In this section we describe how the operations on induce corresponding operations on valued images. Operations on and between valued images are the natural induced operations of the algebraic system . For example, if is a binary operation on , then induces a binary operation again denoted by on dened as follows: Let . Then

Induced unary operations are dened in a likewise fashion; any unary operation dened by a unary operation

Note that in this denition we view the composition as a unary operation on with operand a. This subtle distinction has the important consequence that f is viewed as a unary operation namely a function from to and a as an argument of f. The operations dened by Eqs. 4.3.1 and 4.3.2 are called induced pixel level operations. They are also referred to as grey level based operations as they operate principally on the pixel or grey values of an image. In addition to the binary operation dened by Eq. 4.3.1, also induces the following scalar operations on images: For ,

G 9 7 5 e 0 !# 0 !p 0 ! e !3 y8CE c C5 BFC$5rItw0C5 gp5 E c #

and

150

G E D 0 ! # 9 7 53 HFCC5 BA@8642 b b b b Y ( % !USQ 0 T& XW#T)aP` db

G 9 7 5 0 ! 0 !# 0 !p 0 ! e !3 y`x"weX$5Cf c C5 vuCC$5rIts0C$5rqpiW5`f c #

d d "b b # 5 G97xegs00C$5!v$#! X0X5WpIt00X5 !rpe5$34XBW#! ! ! 0 db db

e G9785we0X5 !v# c ERX0X5WpIt00X5 !rpe5$34# c E ! ! d b # 'b 4E 7 7

0(&% !   1)'"$#"  ( % !USQ 0 T& XW#VTRPI c b b

(4.2.1) .

(4.2.2)

d Xb

db e 7hc gfB#

(4.3.1) induces (4.3.2)

(4.3.3) (4.3.4)

4.3.1
(i)

Examples: Choosing the l-ring as our value set and applying Eq. 4.3.1, we obtain the following basic binary operations on real-valued images: If

, then

and

Obviously, all four operations are commutative and associative. (ii) For

, we obtain the following scalar multiplication and addition of real-valued images:

and

It follows from the commutativity of real numbers that,

Following Eq. 4.3.2, we note that any function For example, using the sine function we obtain

induces a function

As another example, consider the characteristic function

Then for any , is the boolean (two-valued) image on X with value 1 at location x if and value 0 if . This type of operation is referred to as thresholding and k is called the threshold value or threshold level. Figure 4.3.1 shows an example of a threshold operation. The image a shown on the left is a integer-valued image; i.e., . The image on the right is the thresholded image .
151

te tez "T

v 6

} | r x o d u o dy z o d g dv uo x"jgwoCx BWpd $' iXWxIsoXx ry$x1v$pd W

' t

2wmVw IX1fd 6 u o

e ez FH8

(iii)

g} | r x o d q io dp uo dy z o d g dv u q i y`xwgC$xCBXx vuC$xrItwoCx gy$xwxtp g} | r x o d qn o d p u o dy z o d g dv u qn 8wgC$xCXx vuC$xrItwoCx gy$xwx6p g} | r x o d q lo dp uo dy z o d g dv u q l ~wgC$xC{BXx vuC$xrItwoC$xrwyi$xwx8tp } | r x o d q ko dp uo dy z o d g dv u q k y`xwgC$xCBXx vuC$xrItwoCx gy$xwxtp } | r x o dp l u o dy z o d g dv u p l xggCx v8RiXWxIsoXx ry$x1~8 } | r x o d n u o dy z o d g dv u pn y`xwgXWxBjptRC$xtwoCx gyiWxy6m l p u p l n p u pn 8tuxm'Ry6m o d C$xvp o e r vp d m t p

Pom6i6jihfed n g lg kg g

u 2wwv wB| Cx vp o d

te r qg "sT"p e r ~

(4.3.5)

(4.3.6)

(4.3.7)

(4.3.8)

i)  ` j@i t Yye )  ` @F t ye )  ` @F t ye )  ` @i t Yye )  ` @F t ye )  ` @F t ye E)F PB%DCBH  ' I# !  H@9 4   

  R bxwubs@2 Y g  X e c   vt qp  ' hY8hgf@i ` # 0iY `2 F  YX feU %Q   x0Vu0sr@2 F PI iY8ifdF ` # bY b`2   @8YX U TdR Q vt qp  '  X e c     x0Vu0sr@2 F ' iY8ifdF ` # bY b`2   @8YXWU TR Q vt qp   X e c     U bxwubs@2 Y   X e c   vt qp  ' @Y8hgf@i ` # 0iY `2 F  YX bR Q   x0Vu0sr@2 F  X e c   vt qp  ' iY8ifdF ` # bY b`2   @8YX U TR Q   U R 0xwu0sqr@2 F P& iY8hgfdF ` # bF a`2   YXWVTS%Q vt p  '  X e c   GF 7 E)     A 4 0) (%%$"   ' &# !  2 7 3 8 23 6 3 5 ' 3 %1 DCB 2 4 2 # !  x

is a constant function, i.e., S returns the same set S(x) for each , Obviously, if then represents the usual characteristic function. Also note that returns a boolean-valued image regardless of the type of value set used.

The function given in the above example is a typical characteristic function on the real numbers. In general, given some universal set U and , then the function dened by

I I i qw6V h 4 C$r X CC$v XWIsX r $ XBW  C r$ r "s  qw6Ts 6Vw i 4{ $I  m 4X v $'6um 4Cv
for then c(x) = a(x) whenever and c(x) = 0 whenever .

4.3.2

is called the characteristic function on S. In the above example, and There is a useful generalization of the concept of a characteristic function. Suppose ; i.e., . We dene

Example: Pixel level image comparison provides a simple application example of the generalized characteristic function. Given the image , we dene . The functions are dened analogously. and . SubstiThus, for example, tuting these set functions for S in Eq. 4.3.9 yields

In some threshold operations it is desired to retain the original values that pass the threshold. This operation is accomplished by setting

Figure 4.3.1 Application of the characteristic function.

152

(4.3.10) (4.3.9) . and

Here, of course,

The characteristic function dened by Eq. 4.3.9 is not a naturally induced operation; it is not an operation on , but an operation from to . However, as will be shown in the next section, generalized characteristic functions can nevertheless be derived from the elementary naturally induced operations. Another operation that maps images to a different domain is given by the global reduce operation. If is an associative and commutative binary operation on (i.e., is a commutative semigroup) and X is nite, say , then induces a unary operation

called the global reduce operation induced by , which is dened as

Thus, for example, if In all, the lattice and .

and

is the operation of addition (

), then

and

provides for four basic global reduce operations, namely

4.3.3
(i)

Examples: , where X denotes some rectangular subset of , then Area. If a is a boolean image, counts the number of pixels having value a(x) = 1. This count corresponds to a rough estimate of the area occupied by the black objects in the image a. Here black objects are dened as the connected components (see Section 2.20) of X with the property that x is a member of a component .

(ii)

Image maximum. If value of the image

and .

, then

and

denotes the maximum

(iii)

Suppose X is a rectangular for some xed integer K, and a parameterized template

Image histogram.

array (subset of

by dening for each

the template t with parameter a, i.e.,

153

H h k 

hE bw0H Y G C D i  Pm d H iY Y

),

. Dene

, by

t8k s r { w%p tk r p 5Hk s r} Gp k rVBp 8k s r| %p 8k rBp v s yt ~ v t sr} yt w v t sr| yW8k s r {E%p { tk Hr%p k s z %p k srVBp t8k s Vq xp uk rBp t w v s yt r w v t rz y r w v t srq on l mmk t y 8ah s y o Hwu fwu o "

. In order to reduce and simplify notation, we dene (4.3.11)

uhu5Bu C n t k t k t k t Wu8 s urfFw s uf s Ph8 s k r { ii s k 0b k t o y y y uu0ufbH

B i

(4.3.12) . ,

The image

is the histogram of a. This follows from the observation that since

the number of pixels having value j.

. The left image represents the Figure 4.3.2 provides an example of the process input image a and the right image the graph of the histogram image h, resulting from reducing the parameterized template t. If one is interested in the histogram of only one particular value j, then it would be more efcient to use the statement

since

represents the number of pixels having value j ; i.e., since and .

30000 "histogram1"

25000

20000

15000

10000

5000

0 0 50 100 150 200 250 300

Figure 4.3.2 An image and its histogram. Note that in the rst two examples, the global reduce operation resulted in reducing an image to a single numerical value. In the histogram example, however, we have , where . Thus, by denition is an integer-valued image on Y. Although in image processing by computer the spatial domain X is always nite, the global reduce operation need not be restricted to nite sets. Natural extensions to innite sets are usually inherent for different binary operations, value sets, and point sets. For example, if X is a compact subset of and , then the formulas for area and maximum given in Example 4.3.3 have the form

respectively. That these are well dened follows from Theorems 2.11.7 and 2.11.8.
154

e 6d

1 0 

     " VU S WTP

R R I i H F G S H F v y S G t s q i H F S Qg669i@iG xwCv urp69iG QG

RP IH F !QGE

'&

320 ( 1 )

"D%694 BC& @64 98120 7654 320 %  A 1   1 0 

V U S P I FE Wba`WH GYX

 $#"   %  $#"!


h h c

obtained from the code

d I R gfG

4.4 Properties of

The algebra together with the induced algebra is called an image algebra. It follows from the denition of the induced operations (Eqs. 4.3.1 and 4.3.2) that the algebra inherits most, if not all, of the algebraic properties of the value set . As an example, consider the set of realvalued images on X. The commutative group induces a commutative group . The zero of the group is the zero image, denoted by 0 and dened as . Clearly,

. Also, each Obviously,

There is nothing special about the group in this argument. The same argument can be made for any group . This establishes the following theorem: Theorem. If is a (commutative) group, then

If, instead of a group,

is a ring then we also have

The proof is straightforward; we already know from Theorem 4.4.1 that is an additive group and it is an elementary exercise to verify that multiplication is associative and distributes over addition. Thus, is a ring. The unit image of is dened as , where 1 denotes the multiplicative identity of . Obviously,

. Thus, if is a ring with unity, then so is . In Section 3.7 (Example 3.7.2) we noted that is a vector space over . Again, there is nothing special about the eld ; the same argument can be made for any eld . By Theorem 4.4.1, is a group, and using the induced scalar multiplication (Eq. 4.3.3), it is easy to see that the vector space axioms through are satised. This establishes the following Theorem. If , then is a eld, then is isomorphic to is a vector space over .

The second part of the theorem follows from Example 3.8.3(i) by dening by , where , and then using the exact same argument as in 3.8.3(i). It follows from Theorem 4.4.2 that the ring of real-valued images behaves very much like the ring of real numbers. In view of the fact that the operations between real-valued images

155

l e g 3e k y $!!x se e se sq o

7ii s z ue9s z 3e9s z i z h e i i o

4.4.3

. Furthermore, if card(X) = n

y x w s u ie q o |g2'sp

o z o z D~% z

Theorem. If Furthermore, if

is a (commutative) ring, then is a ring with unity, then so is .

le k e g

4.4.2

lg e k

iheef@ g

i ge vf@

4.4.1

n g o o z ui z 3Di z 3g z }w z y|xQwTs2ui9s z e's9%qYo z i z gn o n z o z ~}|{g z y x w s u i e q o Qgv7tsrpn lg me k i ge jhfd


has an additive inverse dened by is a (commutative) group.

is a (commutative) ring.

3if@ e ge

i w Qd

w z  w z 

are induced by the operations between real numbers, this should come as no great surprise. Therefore, manipulating real-valued images is analogous to manipulating real numbers, and our familiarity with the . More generally, if real number system provides us with instant familiarity of the induced system we know the system , then we know the induced system . In image algebra it is always assumed that the algebraic system is known and that the algebraic properties of are then derived from this knowledge. It is important to note, however, that even though the algebraic properties of are derived from those of , the overall mathematical structure of is quite distinct from that of ; elements of carry spatial information while those of generally do not. Furthermore, the induced algebra is structurally not identical to the algebra ; the induced algebraic structure is usually weaker than the original structure. The succeeding discussion demonstrates this for the l-ring of real-valued images. The operations dened by Eqs. 4.3.5 and 4.3.6 in Example 4.3.1 are the basic or elementary binary operations on real-valued images. Analogous to the development to the algebra of real numbers, other binary (and unary) operations on real-valued images can be derived either directly or in terms of series expansions from these basic pixel level operations. However, instead of reinventing the wheel, we let again be induced by the corresponding operations on . Two of these the remaining operations on operations commonly used in image processing are exponentiation and the computation of logarithms. In particular, if a and b are real-valued images on X, then

Since we are dealing with real-valued images, we follow the rules of arithmetic and restrict this binary operation to those pairs of real-valued images for which . This avoids creation of complex, undened, and indeterminate pixel values such as , respectively. If we consider such subsets as , then exponentiation is dened for all . The inverse of exponentiation is dened in the usual way by taking logarithms. Specically, (4.4.2)

As for real numbers, is dened only for positive images ; i.e., . If is a constant function, then k is called a constant image. We have already encountered two important real-valued constant images, namely the zero image 0 and the unit image 1. It follows from Eqs. 4.3.1 and 4.3.3 that

More generally, if

is the constant image

, then

Thus, for

we have that

The observation that scalar operations on images can be expressed in terms of binary operations between images may be used to dene the following unary operations:

156

@ 9

!T` ` 9 pQg 9 9 @ j~@ 9 bw @ % d  !  u` %{23  9 $ !gQT % 9 @ j~@ 7 ~

w u w w w

{m b ! { }w w u aw |Q }|

9 w u v uW

7 d

(4.4.1)

(4.4.3)

These operations are already inherent in Eq. 4.3.2. For example, using the function provides for exponentiation by and yields the inverse . In contrast, Eq. 4.4.1 does not follow from Eq. 4.3.2. Many other unary operations could have been dened directly in terms of elementary binary operations without the use of Eq. 4.3.2. For instance, the absolute value function induces the function dened by

However, we could just as easily have dened

As alluded to earlier, the generalized characteristic function could have also been dened in terms of elementary binary operations. In order to demonstrate this, we need to take a closer look at the induced structure . Recall that the operation of exponentiation (Eq. 4.4.1) is not dened for all real-valued but for some a(x) = 0, then does not exist. Thus, in contrast images. In particular, if to , the ring is not a division ring. However, every has a multiplicative dened by pseudo inverse

Clearly,

Thus, the characteristic function can be readily expressed in terms of elementary binary operations. The function can be dened in a similar manner and the remaining characteristic functions are then derived from and by use of Boolean complementation and multiplication. Dening (4.4.5)

we obtain

This veries our earlier claim. Suppose but for some a(x) = 0. Setting , we have while neither nor . Therefore a and b are divisors of zero, which says that is not an integral domain. Of course, we have already noted that is not a division ring. The obvious question then is as to how closely the induced structure resembles the base structure . In particular, if is a division ring or eld, how close is to being a division ring or eld? From our above discussion, it is easily inferred that the following theorem is the best we can hope for.
157

F U

Thus is a von Neumann ring. Although, in general, need not equal the unit image 1, these observations in mind, it is easy to see that if satises the equation

is always a boolean image. Keeping , then the boolean image

f!

} ~u q

 F e d fwU j1'I E E 3 F U  AV @ T 6 FU U F PGEG T H F C 3 F y F R F U wU FwU Iw8x5w 3 5)v'(%&" uD6 U fsrqpighbe5cTba" Y`G6" 66" U 7@6WR VS|U t X f d  X   % SR P$DEI T F C H GED F C A 9 @

% Q

$32 1j)0'(%&$#" !76% 8  8 {`zyrtqunxwvS2trqph kwI j 9 g s o u s o n lm y  F  d i9 E S  d i 9 E 1 9 E h j h g T  sq&Su q 83 w752 6 4 ' % (B (@

jC

} ~| u } |u ~&q

(4.4.4)

} |u ~@q

Theorem. If von Neumann ring.

is a (commutative) division ring, then

is a ring and if is a commutative ring, The proof is elementary. According to Theorem 4.4.2, then so is . Pseudo inverses are dened in the exact same way as pseudo inverses for elements of (Eq. 4.4.4) by replacing the number 0 with the additive identity of . with the property that for some a(x) = 0, we are unable to obtain Since for any image an inverse, cannot be a division ring. Hence, and can structurally never be the same except in the trivial case card(X) = 1. However, since is a von Neumann ring, it is almost a division ring in that every non-zero element has almost a multiplicative inverse, namely a pseudo inverse. If instead of using group, ring, or vector space operations, we consider lattice operations we encounter similar observations. The lattice behaves very much like the lattice . For example, the equality

holds in both lattices. Inequalities for images can be dened in terms of the semigroup operation (or ) by

However, if X contains more than one point, then it is possible to have two real-valued images a and b with and . Thus we have images a and b such that neither statement nor is true. Hence the lattice is only partially ordered and can, therefore, structurally not be identical to the lattice . This corroborates our earlier claim that the induced structure is somewhat weaker than the base structure . We now address the question of functionality of the induced operations for expressing image processing algorithms. The procedure of combining a nite number of images using a nite number of elementary induced image operations results in some new image or other value, such as a scalar. The result of writing down such a procedure is called an image algebra expression. A transform dened in terms of an image algebra expression is called an image algebra transform. Thus is an image algebra expression for each . For example, the transforms dened by and are both image algebra transforms. In the second transform we assume that b is some xed given image, and a the variable. We conclude this section by showing that any algorithm or, in fact, any transformation that transforms a digital image into a digital, oating point, or any other type of real-valued image, can be realized by an image algebra expression with operations consisting only of the induced elementary operations of addition and multiplication. The main ingredient in proving this claim is the following interpolation theorem.

~ 

4.4.5

Theorem. (Lagrange Interpolation). For each integer such that

there exists a polynomial

158

&

Bsb Dk TT

wDG

$DEk2

D E Q(v55 E Q(

h#5# ~

vB

f 7

fDV

xvh tI Q

DE @

4.4.4

is a (commutative)

(x

vx tk

Proof: Let

Then

For the remainder of this section we suppose that X is a nite point set, say . Now if is a polynomial in variables, then p gives rise to a transformation dened by

& ) 1D 0 ' ' E  ) (t   D % " $# ! s  1I (h    h   t  t 2 $  D IhD 1x bwx x t  hD 5 "t khD 5T5"t 5t t"t T T1 IhD $(v

where addition and multiplication in are now interpreted as the induced addition and multiplication in . Thus, is an expression in the image algebra . , we obtain the following interpretation of Dening for each integer j the constant image Theorem 4.4.5:

4.4.6

Corollary. (Image Interpolation). For each constant image image algebra expression in such that

, there exists an

Proof: Dening that

, we note that the image exists for

has the property . It is also

. Thus

obvious that whenever has the desired properties.

. Thus, the expression

Q.E.D.

We conclude by proving that the algebra real-valued image transformations.

is sufcient for expressing all digital image to

For each

sX q E q E Uq pnmk E E r o A d l E y E jhg i W E tHV E i V E W V fH yeWd y W $7 q pxvtr 8 i gT w u s

Proof: Since

, where

, let

, we may assume without loss of generality that . be dened as follows:

159

87 q i gT d V b 7 VT Y W 7 VT 6phfeUc$a`XUC

RP E G E SQIHF8 A $D 8 B@6& A 9 87 5 4 3 2

Theorem. Suppose in the image algebra

4.4.7

is any transformation. Then there exists an expression such that .

khD

 k V ~p 1ss BwsbhuQ&uE&kh@xw~2s @ `# k` f


; i.e., if , and whenever . Now dene

Q.E.D.

g 8 7 q i &T

The corollary is useful when considering transformations of images to images dened on different spatial domains.

} z 1av z x{

~ ~

~ I~ ~ } v {

The theorem is primarily of theoretical interest as it provides no practical method for determining from . Of course, the hypothesis of the theorem is general enough to cover all image-toimage transformations that occur in practice as only nitely many grey values can be represented.

6 } {dxwx${a}px{ } v } z 1a} z { x{ v x t U t U } x p{ } x ${ a } x{ p p{ v } x } z 1av z x{ ~ ~ ~ v fUt hc tv c v j0} { z x tv y| v } w$ { c hv }$p|1{ z xyv }$1{ x | t v } ${ z x z xyv x v } 0w U { } { 6U u U v } { } H~ ~ u { z ~ v } u { z 1{ z 0} z { z | x v x } } { z fH~ | x~ } | x 1{ z ~
is the polynomial in Theorem 4.4.5. , where . Thus, , let . Then and, hence, and dene and, therefore, and , therefore, . by

~ ~ ~ HHev

t ev

Let

} |{ z x v t ~ ~ } |{ z x v t ~ } u |{ z x v u wpHya$Hya1ywt

and set

, where

. Now dene

~ } &{ 6z

} { z &} u &{ 6z 0} U~ ~ u &{ z v ~

} Q&{ tz U

4.4.8

where Obviously,

For each

Corollary. Suppose X and Y are two nite point sets. If then there exists an expression in the image algebra .

Now consider one point Therefore,

It now follows from Eq. (I) that

is any transformation, such that

v } x np{

{ x } x{ &jn$a

Proof: Let

be polynomials such that

hc tv c t v

v 0} { z x

Again, let

, where

is now an image on Y. Finally, dene

pjp } x $1{
by

1& v H1ajmj0FH} z x{ z H 1B} z ${ x v } x p{ $ } x p${

Then

160

and, therefore,

for at least

Q.E.D.

. Q.E.D. (I)

4.5 Spatial Operations Examples of spatial based image transformations are afne and perspective transforms. These type of transforms are commonly used in image registration and rectication. The need for registration and rectication arises in digital image processing when the positions of some or all image pixel locations are signicantly displaced from their true locations on a uniformly scaled grid. For example, objects in magnetic resonance imagery (MRI) are displaced because of the warping effects of the magnetic eld and raster-scanned satellite images of the earth exhibit the phenomenon that adjacent scan lines are offset slightly with respect to one another because the earth rotates as successive lines of an image are recorded. Since the induced image operations represented by Eqs. 4.3.1 through 4.3.4 are grey level based, the induced algebraic structure does not provide for either intuitive or simple expressions of these types of transforms. The purpose of this section is to resolve this difculty by providing a seamless extension of the image algebra dened in the previous sections. Viewing an image as a function from X to , we note that the induced unary operation of the image function a with the function f from to as 4.3.2 is actually the composition shown in Fig. 4.5.1. Taking the same viewpoint, but using a function f between spatial domains instead,

f a

provides a scheme for realizing naturally induced operations for spatial manipulation of image data. In particular, if and , then we dene the induced image by

Thus, the operation dened by Eq. 4.5.1 transforms an valued image dened over the space X into an valued image dened over the space Y. Figure 4.5.2 provides a visual interpretation of this composition operation.

161

 Xm

ppefX

Figure 4.5.1 The induced grey level transform

(4.5.1)

!    " apfhI

$p

0y

a f

F
Figure 4.5.2 The spatial transform

In Section 4.8, it will become evident that the induced image can just as easily be obtained by use of an imagetemplate operation. However, in various cases Eq. 4.5.1 provides for a more translucent expression and computationally more efcient method than an image-template product.

4.5.1
(i)

Examples: One sided reection. Suppose , where and is dened as is a rectangular

then is a one sided reection of a across the line image across the line . reection on a

. Figure 4.5.3 illustrates such a

Figure 4.5.3 One sided reection across a line.


162

B @ CA9

b i D i D @ b D F &$ xw# F yT T e `V V uvtsfradXWT ` p dXV F iR b ` V R TF EhF gfe aqSTR c 2aYXWUTS& 3 A2& 7 IG(D Q 3P H E F E 75 864 3 1) ' 20(#

&$ %#

f Y

array. If

(ii)

, let denote the smallest integer greater or equal to Magnication by replication. For r; i.e., , where . For a given pair of real numbers , let . Now let a and X be as in the previous example, and let Y be a array, where k is some positive integer. Dene by ; i.e., , where . Then represents the magnication of a by a factor of k. Figure 4.5.4 represents an example of a magnication by a factor of . Here each pixel was replicated four times, two times in the x direction and two times in the y direction.

Figure 4.5.4 Magnication by replication. Note that in both, image reection and image magnication, the function f can be viewed as a function on into ; that is, as a function preserving integral coordinates. The general denition for geometric operations in the plane is in terms of a function with

resulting in the expression

where a denotes the input image, b the output image, , and . In digital image processing, the grey level values of the input image are dened only at integral values of and . However, restricting f to some rectangular subset Y of , it is obvious that for most functions f, . This situation is illustrated in Figure 4.5.5, where an output location is mapped to a position between four input pixels. For example, if f denotes the rotation about the origin, then the coordinates (4.5.4) do not, in general, correspond to integral coordinates but will lie between an adjacent integer pair. Thus, the formulation given by Eq. 4.5.1 can usually not be used directly in digital image processing. One way of solving this problem is by simply redening f as . That is,

163

l  lx n k r kS yxwvuptsqpomk rn l

w dW j dSUyj YdSU dYa{SSCsd}"C2a{SU

d d|dWS C z(2adS }dSUS("adW yy2dSU j 8yj|dW j

AG

dY|dW du}dSyU|dWS 22 2

x yp r S} xdtU2yxvdptrUpS l v rn l n x t n l } S ~{vgp}|{rpzAjgkI} ijh gfyd% e S W

(4.5.2)

(4.5.3)

W}~y

where denotes the rounding of r to the nearest integer. Then the image is said to be obtained from a by using the nearest neighbor, or zero-order interpolation. In this case, the grey level of the output pixel is taken to be that of the input pixel nearest to the position to which it maps. This is computationally efcient and, in many cases, produces acceptable results. On the negative side, this simple interpolation scheme can introduce artifacts in images whose grey levels change signicantly over one unit of pixel spacing. Figure 4.5.6 shows an example of rotating an image using nearest neighbor interpolation. The results show a sawtooth effect at the edges.

(x ,y )

(x,y)

Figure 4.5.5 Mapping of integral to non-integral coordinates. As mentioned previously, the output pixels map to non-integral positions of the input image array, generally falling between four pixels, and simple nearest neighbor computation can produce undesirable artifacts. Thus, higher order interpolation schemes are often necessary to determine the pixel values of the output image. The method of choice is rst-order or bilinear interpolation. First-order interpolation produces more desirable results with only a modest increase in computational complexity.

Figure 4.5.6 Rotation using nearest neighbor interpolation. Suppose and

Given , we extend a to a function and First set both

 Ydsj y {U d Cdsj }d {  {  d {  uzC U d  u  d U v d U  d U  d G C a % dad }Cj aCxG }Ct u}u aW8t z %dUGCxCGuU

as follows: whenever

164

. For

, set (4.5.5)

and denotes the largest integer with the property . Note that , and whenever and . Thus, is a continuous extension of a to with the four corner values of a agreeing with those of (Fig. 4.5.7).

a ( x1 , x 2 )

a ( x 1 +1 , x 2+1)
C C

a ( x 1 , x 2+1 )
Figure 4.5.7 The bilinear interpolation of a.

in order to obtain the desired spatial transformation of a. In particular, the values of for in Eq. 4.5.5 are now replaced by the coordinate functions of f. Figure 4.5.8 illustrates a rotation using rst order interpolation. Note that in comparison to the rotation using zero-order interpolation (Fig. 4.5.6), the boundary of the small interior rectangle has a smoother appearance; the sawtooth effect has disappeared. The outer boundary of the rotated image retains the sawtooth appearance since no interpolation occurs on points .

Figure 4.5.8 Rotation using rst-order interpolation.


165

ig f phSW

`d

u 8P

r g 5sd t rq

a ` Y W b!9XV

P H

v P x yP H wu c c ` g t` q

R P H F 9QIGE

Now given a transformation and set

and an output array Y, we view f as restricted to

a ( x 1 +1 , x 2)
C

a (x 1,x 2 )

 $

& "  '%

 6  6 

 3 @ 3 

1 7 4 2 7 6  4 3  2 9 86  53  % 1 "  %$ B

0 ( )  &   &   "    #!  P H R T F USE

where

(4.5.6)

The computational complexity of the bilinear interpolation (Eq. 4.5.5) can be improved if we rst interpolate along one direction twice and then along the other direction once. Specically, Eq. 4.5.5 can compute be decomposed as follows. For a given point

along the line segment with endpoints

along the line segment with endpoints

This reduces the four multiplications and eight additions or subtractions inherent in Eq. 4.5.5 to only three multiplications and six additions/subtractions. Although Eq. 4.5.6 represents a functional specication of a spatial image transformation, it is somewhat deceiving; the image in the equation was derived using typical algorithmic notation (Eq. 4.5.5). To obtain a functional specication for the interpolated image we can specify its values using three spatial transformations , and , mapping , dened by

and two real-valued images functions

dened by

and We now dene

A nice feature of this specication is that the interpolated image is only dened over the region of interest and not over all of . Since , it is very likely that . This means that the image may contain many zero values, and if Y is not properly chosen not all values of a will be utilized in the computation of b. The latter phenomenon is called loss of information due to clipping. A simple rotation of an image about its center provides an example of both, the introduction of zero values and loss of information due to clipping, if we choose . Figure 4.5.9 illustrates this case. Here the left image represents the input image a and the right image the output image . Note that
166

s u 8t i

9 p } ~ }  lUpqpy ~ $d#h 8 t  h 9~ #} %5ge ~ ~ #h { } }

and

h f e h j h i h h i 8ge d  5ge 9e  g59e l e m

h o shr i pq i e m Se h h ne 9e s h 59e 

j f e i h i k   9e  g d  5
and and

} }  Uprdh ~ ~ #h 8  t ~  9d #} ~ $ 9e d h |y } h ~ } {

u t i t w i 8t e t u t e 8t w i t w

z x z x m y u t

i s z x y 5

h e  w 

z m x i m

8$5$s

t

l t

, and

. Then set

t u yhvt

t e u e 8t

!t

the value is zero since . Also, the corner areas of a after rotation have been clipped since they do not t into Y. Of course, for rotations the problem clipping is easily resolved by choosing Y sufciently large.

Figure 4.5.9 Rotation within the same array. The left image is the input image and the right image is the output image. The denition of the interpolated extension requires images to be specied as computational objects has rather than enumerated objects (such as the input image a). Once the spatial transform been chosen, the dummy variables and are replaced by and , respectively. Each pixel value of can then be determined pixel by pixel, line by line, or in parallel. The spatial transformation of a digital image as exhibited by Eq. 4.5.6 represents a general scheme. It is not restricted to bilinear interpolation; any extension of a to a point set containing the range of f may be substituted. This is desirable even though bilinear interpolation and nearest neighbor approximation are the most widely used interpolation techniques. Similar to zero-order, rst-order interpolation has its own drawbacks. The surface given by the graph of is not smooth; when adjacent four pixel neighborhoods are interpolated, the resulting surfaces match in amplitude at the boundaries but do not match in slope. The derivatives have, in general, discontinuities at the boundaries. In many applications, these discontinuities produce undesirable effects. In these cases, the extra additional computational cost of higher order interpolation schemes may be justied. Examples of higher order interpolation functions are cubic splines, Legendre interpolation, and . Higher order interpolation is usually implemented by an image-template operation. The general formulation of spatial transformation given by Eq. 4.5.2 includes the class of afne transformations mentioned at the beginning of this section.

4.5.2

Denition. A transformation

of the form

Observe that an equivalent denition of an afne transformation is given by (4.5.7)

where

167

)8

m9

p l

where a, b, d,

, and

are constants, is called a (2dimensional) afne transformation.

q555s

p 5  r 5  bs l

8s8

8sl8

9 $ lr555l g !

858h

( y1 ,y 2)

(x 1,x 2 )

The matrix A can always be written in the form

where and correspond to the points (a,c) and (b,d) expressed in polar form. In particular, if , , and , then Eq. 4.5.7 corresponds to a rotation about the origin. If A is the identity matrix and , then Eq. 4.5.7 represents a translation. Various combinations of afne transformations can be used to produce highly complex patterns from simple patterns.

, then represents a magnication of a by the factor (see also Example 4.5.1). On If the other hand, if , then represents a contraction (shrinking) of a by the factor . Figure 4.5.10 illustrates a contraction using the factor . Here the input image a, shown on the left, contains a trapezoid of base length l and angle of inclination . The output image is shown on the right of the gure, with pixels having zero values displayed in black.

Figure 4.5.10 Image contraction using an afne map. Suppose

represents a shift in the direction . Composing with results in the image shown on the left of Figure 4.5.11. The composition of two afne transformations is again an afne transformation. In particular, by setting , it is obvious that could have been obtained from a single afne transformation, namely

Then

Now iterating the process by using the algorithm

168

s Q x 3 w w @ yw q )r s s 2r s 2r s s 3 %9 4 3 u E36 @ 4 3 9 u 3 6 @ s 2r s s 43 9u3 6 4 3 u v3 s )r 3 @ s s tr g 4 53 9 u 3 6 4G3 pghf5edbcY53 2Y 43 qi u ` S Q I TRPF H X W X W a9 F U6 &9 F VU6 H GED0BA%8753 F C 8 @ 9 64

1 

$ 0)#  

Let

, where

 

! '  '( &%# $  

! "  

(i)

4.5.3

Examples:

vbm8 v#8

8#)r  8mr

8 Qv 8

! 8 r

0$2# 

with initial

(ii)

Figure 4.5.11 A railroad to innity. Another example of iterating afne transformations in order to create geometric patterns from simple building blocks is the construction of a brick wall from a single brick. In this example, let w and l denote the width and length of the brick shown on the left of Figure 4.5.12. Suppose further that we want the cement layer between an adjacent pair of bricks to be of thickness t. A simple way of building the wall is to use two afne transformations f and g, where f is a horizontal shift by an amount , and g is composed of a horizontal shift in the opposite direction of f by the amount and a vertical shift by the amount . Specically, if and

then iterating the algorithm

will generate a brick wall whose size will depend on the number of iterations. The image on the right of Figure 4.5.12 was obtained by using the iteration

Figure 4.5.12 Generation of a brick wall from a single brick.


169

i o 2r t (r 2r r u u t s eq pp0g5& nB%5V"jp5e55 l e d i g ed o g 75&eefnV lm5kj7hf5d5V d i g e R yE

i E~ { z r i o u}r t )r t)r i |{r u s r s 5nwv zywx

, results in the railroad to innity shown on the right of Figure 4.5.11.

4.6 Set-theoretic Operations The two prime concepts associated with a function are its domain and range. Since these two notions are viewed as mappings from to and to , they provide a link between images and their underlying point and value sets. The outputs of the domain and range functions, however, are sets and not individual points or values. In various computer vision tasks it is often necessary to extract single points or values from an image, or to know the number of elements in a particular value or point set. These tasks can be accomplished by using two fundamental concepts from elementary set theory. The two concepts are the choice function and the cardinality of a set. The choice function, whose existence is guaranteed by axiomatic set theory [3], is not obtainable (or from previously dened operations. We shall view the choice function as a mapping of ) which, when applied to a set , returns a randomly chosen element of A. Thus, if and , then the statement

denotes a randomly chosen pixel location whose pixel value is k. This example illustrates how we can get from an image back to a point in its domain. More generally, we have the following commutative diagram:

FY

domain

2Y

choice

The choice function is, of The dotted arrow in the diagram denotes the composition course, not the only function from to . For example, if is a commutative semigroup and , then again we have a global reduce operation induced by and dened by , where . In particular, if X is a nite subset of , then corresponds to the largest number in X. The cardinality of a set was discussed in Section 2.7. For nite sets the cardinality of a set corresponds to the number of elements in that set. Thus, when our discussion is restricted to digital images, we shall view the concept of cardinality as a function

For example, if k is an integer, Y a nite subset of

, and

, then the number n in the statement

170

2%

 5

f&7hG5&5" GaE 5m5n

5A5 n5 | B" 25p

 5 5Pf pB

B aGh7p&G&"A ) "jva5R5V

7k

corresponds to the number of pixels having value k. Obviously, if no pixel of a has value k, then and Note that an alternative algorithm for obtaining n is given by the statement

and does not involve operations dened in this section. The cardinality of a set and the choice function are unary operations from to and to Y, respectively (or from to and , respectively). They do not provide for operations on or . However, there are numerous computer vision algorithms and tasks that require manipulating whole sets of pixel locations as well as sets of pixel values. In order to provide a coherent mathematical theory in which to express these types of operations more readily, we need to incorporate the Boolean algebras and as part of image algebra. The laws governing the operations on sets were given in Section 2.2 (Fig. 2.2.1). The operations of union, intersection, and complementation can be combined to dene various other set-theoretic operations. For instance, set subtraction can be dened as

and the symmetric difference between two sets as

It follows that

4.6.1

Example: shown in Fig. 4.6.1 (a) and (b), Let A and B be the two point sets in the cellular space respectively. Thus, the set A consists of the cells whose union forms the letter A, while the set B consists of cells forming the letter B. The result of the set operations of union, intersection, set subtraction, and symmetric difference on these two sets are shown in Fig. 4.6.1 (c), (d), (e), and (f), respectively.
171

 

U T

ehBDA'C( ) 

) '  )  ' 4 ASc43Q"

43220' )  ' 1 )(

)  ' 1 8 5 B2A"2@)97(6'


)  '  )  ' 8 5 RDQP 43IRH)GF(E'  &"!%$        #"!   

et

(a)

(b)

(d)

(e)

Since and are homogeneous algebras, one obvious implication is that the algebra discussed in Section 4.3 provides for the manipulation of set-valued images (or ); the operations on set-valued images are those induced by the Boolean algebras. For example, if , then

and

172

G!Qf q f3$!Q

Proof: Suppose that for some pair of functions a and b with , we have that Then such that . Thus, not both and

i f Aq y !Q ed q q

Theorem. The function isomorphism.

GgAgq

jq

G!AfoGgAgq

e ed r f i Ad u i f Q

4.6.2

t ! 3q

y q

The function

is a dual (or an inverse or transpose) in the sense that dened by

q i y ~y q d

e u tr f ysq

fAgqREytjj|A y q l r g e SRPSq u xr

This can be ascertained from the observation that any function to as an inverse or transpose) dened by

g ` g X ed #}h |{g i f Ayz

The Boolean image algebra

has a natural dual structure, namely

has a dual (often referred

g ` g X ed }h %~g f i IPz

q a x c fIg9y h QIgwqb

where

. is an

fe u t r wv%sq

&Y9FaEW c b Y X B2W

Figure 4.6.1 (a) The set A. (b) The set B. (c) The set . (e) The set . (f) The set (d) The set

V Ya W

g t g ` r ` lkkj$ifAf4hfIgqs$fAedmfAeCgIREq gktkj$ifAf4XhfIgs$fAedr4%IRXEq l g q g i f Ad%q e g pe u tr yxq

g t t c b r g n vuds$g h AfI!rqq$fAedmfIiApo h q

Fih!gPQd ` g X gpe Y ` RDW

#i!%EAd hg ` g X g fe

(c)

(f)
.

. can be

empty. Suppose, without loss of generality, that . Since , such that and . But then and , contrary to our assumption that . This shows that is one-to-one. is obviously onto. Thus all that remains to be shown is that is a homomorphism. To show that is equivalent to showing that . Now

In a likewise fashion we can show that

. Finally we have

which shows that

Since typically, Y (or ) is well structured a topological space, metric space, vector space, etc. (or a semigroup, ring, eld, etc.) it makes sense to try preserve this structure by viewing a(x) as a set in Y (or ) instead of a point in . This change of perspective has fruitful consequences; while the theory of set-valued functions (Section 2.6) can still be applied, intuition is maintained and properties of . Y are not forced into hyper properties of Borrowing from the idea of induced set-valued functions, recall that given , then f induces a set-valued function which is dened as ; i.e., . In addition, there is an inverse dened by . Pictorially, we have the following interesting diagram of functions:

a-1

2X

f -1

173

i2 o y!yg 2v

The obvious question that may arise is as to whether or not veried that this is false even in the simple case where and the following theorem:

B y y Rj4Q! Q!

2Y
. It can be easily . However, we do have

y 9gA o6!Ig

gI A  IA fIgRsks q fIgRDks q ifA&Rds I Fy y y y mI A y hQ y fA dj fAgRsku Q PfAgRsku Q Qsku A y EA y y y Q RP!Q EA y o y! I I!D G

QGy!k 6SAg

vdfQ!mPGs  f e Ag

Q.E.D.

Proof:

Example: Let Then

Figure 4.6.2 illustrates the difference between the set-valued functions a and . Note that in the illustration we view in terms of the cellular space . The gure also illustrates the possible applications of set-valued functions for image analysis in differently scaled spaces.

( i,j )

a( i,j )
Figure 4.6.2 The set-valued function a and the induced function .

The function a is said to induce a partition on Y if the following two conditions are satised: (i) (ii)

One relationship between a,

"e "  X " Ad cb4a`Y1W361)g V TU S RQPIH fS 1 8) 8 ) @ 8 ) @F8DC3G4@F97S1B@ED3CB6170S61 3(B14A9)70S16 3(5154p3210)g ('& $#! % "

4.6.4

be given by

, and

is given by the next theorem.


174

  dy p y

Since is an isomorphism, it follows that the two images and Every set-valued image induces another set-valued function

fg

IC  y A y y fIgddj9 y fAgRds~ I R Go pG QIRs R Go e#%I9%EQs RS|GoA y gQ  fAg    $!

y v y P%EA
Q.E.D. are Boolean equivalents. dened by

4.6.3

Theorem.

w i 9w x !hw 4 r s x w i x u s pr i r (tyh#Ctyh#w vth q#h

a ( W)

4.6.5

Theorem.

If a induces a partition on Y, then

If only condition (i) is satised, then

The proof of the theorem follows directly from the denitions of the induced functions and , and the observation that conditions (i) and (ii) for a functionally induced partition are equivalent to conditions ( ) ( )

at most one x s.t. at least one y s.t.

respectively. The following example shows that, in general,

4.6.6

Example: Let

and

be dened by

Then

Hence,

. But

so that

4.7 Operations Between Different Valued Images The algebra induced by is a homogeneous image algebra; the algebraic operations act on images of the same value type. To provide the capability of combining images of possibly different value types, we need to extend the operations dened on to a more general class of operations. This class of operations is based on the theory of generalized matrix products. Observe that Eq. 4.3.1 is practically identical to Eq. 3.14.1. The induced operation is a component or pixelwise operation, the only difference is that in Eq. 3.14.1 we are dealing with nite dimensional matrices. In a similar fashion we may borrow Eq. 3.14.3, the componentwise product of two matrices of different types, in order to dene the pixel level operation between images of different value types.
175

w Wg h

q t7WWWW449&4n 7W4744&4n l i l l 4V2 9475759i 745 #i n 0Ul0(i zDyrkjiWf h g n l h g &V97rki Wg W9744po n l h n l i n F! x V q F! xx 7W4 f2ljiW n n h g n ! F x n F W n i n q n xx W4 Ul0 Wu W4o o k n n q i s lvo0lrki hWg d i } lt# |  o } { y xx l i } ! ~|  } | k ~W{ zyx

ql i sl h d v0outrki Wg fe t

ql i nl hgd Wp0oA!mkjiWfe

Suppose , and are three, not necessarily distinct, value sets and operation. Then induces a binary operation

dened as follows: for each

by

Generalized unary operations are dened in a likewise fashion; any function unary operation dened by

Whenever is a commutative semigroup and X is nite, say the heterogeneous image dot product of two images as

where

Since the dot product involves the global reduce operation , it is a binary operation whose resultant is a scalar; i.e., . Although these heterogeneous operations seem somewhat articial, they provide a versatile environment for the specication of a wide variety of image processing tasks.

4.7.1

Example: (Image centroid) Suppose , , , and . If denotes scalar multiplication of points of by real numbers, then , where and . As a particular application example, we compute the centroid of an image. Recall that the coordinates of the center of gravity of a continuous real-valued function f on a compact set are given by

For

, the discrete approximation of these integrals is given by

176

C# A E Y

u 6   7 6  y 5  !! !y 66 ! F # j# tC 6 p !y V t t2 2! 7 fq mm C 070 p 2t !!y 5! ! f Eu t ! ty p A AA FvEt4


and each , dene As an example, suppose and is dened by . Then
4 2 1 0 5! 3') 89# # $ $ !(  (6  % !   ! "      7     # # $ u  0 2 &  2 0 c$ 2 0  0 0 C q !mE # v B f 6 0 ! (     %    ! (    '& %   

m9

a binary

(4.7.1) (4.7.2)

induces a (4.7.3)

, we dene

(4.7.4)

Considering these formulas, it is not difcult to ascertain that the image centroid is given by the simple image algebra statement
Y P I gH G FfDiBhP I FgH G fD F F U H `Xa VTS@ A Y W U BR u q l y

where denotes the inclusion map . Figure 4.7.1 provides an illustration of an image centroid. The Boolean source image a, which shows the sillhouette of an SR71 spy plane, is shown on the left. The image on the right shows the location of the centroid which is in the center of the von Neumann conguration.
Y

Figure 4.7.1 Example of an image centroid; the source image a is on the left, the location of the centroid is the center of the von Neumann conguration in the image on the right.

4.8 Image-Template Products Image-template products are one of the most useful consequences of the concept of a heterogeneous image product, they provide the rules for combining images with templates and templates with templates. These products include the usual correlation and convolution products used in digital signal processing.
f q e p d6 u t q Sp q

If , then for each 4.7.2, and 4.7.4, and induce a binary operation
u r q p y w u ts q Qxv6Vrp

. Thus, if , then according to Eqs. 4.7.1, . It follows that the binary operations and

is dened by
eye" pxe'vfSfee pde}v&7&f6~}{6 i|Q{67& v v ee z v p e z v e e v p e v u t yw& x'w&76 fs n e d& p n n e r m

The expression is called the right product of a with t. Note that Eq. 4.8.1 is essentially Eq. 3.14.16 with x and y replacing k and t, respectively.
p of
177

y qqhppf

n om

where

P I H G D B Q@ F @ F EC@ A

k y w u t s

g j u ihf

c b d7R

(4.8.1)

Every template has a transpose which is dened . Obviously, and reverses the mapping order from to . If we also reverse the order of and in our previous discussion by assuming , then we have and , for and . Hence the binary operations and induce a binary operation
9 rr&Q q h h 7 Q  67h Q6 p x 6q C o V f

is dened by
&x7&( ~ y x  r

The expression is called the left product of a with s. Here Eq. 4.8.2 is the analogue of Eq. 3.14.17. Observe that for both the left and the right product, the source image a is an valued image on X, while the transformed image b is an valued image on Y. It follows that imagetemplate products are capable of performing both pixel level and spatial level image transformations; images with certain range values dened over a given point set are transformed into images with entirely different range values over point sets of possibly different spaces. When computing , it is not necessary to use the transpose since
5~wx'r6"~ y r o 3 x~67d76 f yy yw&7i'w f yy Q

This allows us to redene the transformation

Imagetemplate products are computation intensive. For example, if X is an array of points and Y of size , then according to Eq. 4.8.1, the computation of each image value b(y) requires operations of type and operations of type , for a total of operations. Thus, in order to construct the image b, a total number of are required. For standard or size images computations of such magnitude would be prohibitive even on todays supercomputers. Fortunately, in most cases is a monoid. Hence, whenever , where 0 denotes the zero of , the two operations
}"S 67& 767&7 y}76 x7}7&&~676 d67&&}& x7Q'7& i }`" 7 ~  i}p

collapse into a single

operation since

178

hq  f

For the remainder of this section we assume that under the operation . Suppose and topological space. Since is a monoid, the operator
i

y}7& i}'&7&& x|&7&6yQ i(}&

y}76 x}7&&}& x|Q7676

qqp

where

(4.8.2)

(4.8.3)

as

(4.8.4)

is a monoid and let 0 denote the zero of , where X and Z are subsets of the same can be extended to a mapping

where

The left product is dened in a similar fashion. Subsequent examples will demonstrate that the ability of replacing X with Z greatly simplies the use of templates in algorithm development. Signicant reduction in the number of computations involving the imagetemplate product can be achieved if is a monoid and is a commutative semiring. If , then the with respect to the operation is dened as . support of t at a point Since whenever , we have that whenever and, therefore, (4.8.6) It follows that the computation of the new pixel value b(y) does not depend on the size of X, but on . Therefore, if , then the computation of b(y) requires a total the size of of operations of type and . If m and n are as above, and k is small, then is signicantly smaller than . Substitution of different value sets and specic binary operations for and results in a wide variety of different image transforms. Our prime examples will be the ring and the bounded and Here we substitute for the l-groups bounded l-group discussed in Section 3.12 by replacing the symbol with 0. From a mathematical perspective, this amounts only to an interchange of symbols. However, from a practical standpoint, this interchange allows for the manipulation of non-negative real-valued images that may contain zero values. by changes into Replacing

where

(4.8.7)

, and . The left product is dened in a similar fashion. In digital image processing X and Y are usually arrays of form . In this case the relationship between the right and left product can be stated in terms of transposes:

where

Example: (Local Averaging) Let a be a real-valued image on a rectangular array the translation invariant neighborhood template dened by

1 1 1

1 1 1

ty =

1 1

179

4.8.1

and

) '  1 43&%20

  

v x v H t s q p c bG 4wdurrFa i dTa D5A C B@

(~w

y& h& &  d w& y

HwXXq7wtiQsFrq 7onmd&8if i R7d X p l k je h g X H RU i i XD358Aa H UH

H V Vg U V r` i rU x | H {  } X ~4T4~wr|HA{$s

 yy

i

gT&TRH G p ya` V eH eH SH P h V e H e H S H P c bG &gT&f$RTH dT7a` YXW3TRQPIDFA@ V UH UH SH H G E

rE

&

Erw w gy `~ 981 ) ' 76 50 1 #!  $"o i

w& y

X H H 4wF8

AX{| i d7|H7{ V H X

yg w zxFya` u

h& C

zzya` u

i S

is dened by (4.8.5)

) '  (&%

u h a v

The image b obtained from the code

represents the image obtained from a by local averaging since the new pixel value b(y) is given by

Figure 4.8.1 illustrates the effect of local averaging. The source image a is on the left and the locally averaged image is on the right.

Figure 4.8.1 Effect of local averaging. The source image is displayed on the left and the averaged image on the right. It is important to distinguish between the mathematical equality and the program code . The former denotes equality of two images, while the latter means to replace representation b by . In Example 4.8.1, the image is, by denition, an image on all of with zero values outside the array . This is not a problem if we represent as a function. However, as a data structure, such as an array of numbers, then we run into the problem of if we represent storing an innite array on a nite machine. Also, in practice, one is only interested in the image restricted to the array Y (in our particular example ) on which b is dened, that is . This problem could be solved as follows: Let be dened by for each , where t is the template dened in Example 4.8.1. Then provides the desired digital image since . Thus we may ask why not dene t simply as a template from X to X instead from to ? The answer is that by dening the local averaging template as we did, the template can be used for smoothing any two-dimensional image, independent on the dimension of X. The reason for this is that when dening an image b in a program, one usually has to declare its dimensions, i.e., the size of its underlying array. In particular, if b is declared to be an image on Y, then the image means to replace b pointwise by such that the value of b at point algebra pseudo code y is the value of at point y, where, of course, . In terms of algebraic equality, we then have . As a result, a programmer is not faced with the task of redening t for different-sized images as would have been the case if we had dened . Of course, the program statement will produce a boundary effect. In particular, if a images with underlying coordinate set , and b are

180

z $rv

4 D rA 

7&8u rWi 72 y s 2 7 r $rv d v fy

&7

v 4 $r

v4

I Q

4r

Q&r

then which is not the average of four points. One may either ignore this boundary effect (the most common choice) or use one of several schemes to prevent it. For instance, one may simply avoid boundary pixels by dening an array and setting . Then b represents the desired output image. Letting m and n be variables allows the application of t to images of arbitrary size. If, on the other hand, a true average is desired in the interior as well as along the image boundary, then an appropriate variant template can be dened to accomplish this task. Specically, for , set and dene t by

In Section 4.5 we hinted that spatial transformations may also be performed using template operations. This should come as no great surprise since templates operate on both pixel values and pixel locations. We provide an example of a spatial transform in terms of a left imagetemplate product.

a parametrized template dened by

Then the image b obtained by setting

represents a rotated through an angle using nearest neighbor interpolation. In this example the denotes the rounding of a to the nearest integer. symbol The bounded l-group provides for two lattice products:

where

and where

In order to distinguish between these two types of lattice transforms, we call the operator maximum and the additive minimum. It follows from our earlier discussion that if

the additive ,

181

`D TWu

n " n v |} ) D} o fyy } n ` vn vn n " })))qhn lq | o u v } ku SUE   ~}S'S))TxwDty)Yp)nly i kjx Shf r 9 i 9 '9 %87 6  R   Sx |ur{zy p v u srq o mx r  ige d 

& x  x RvSf9y! w 4s vu 4s UtDvW %r r s r s r

4.8.2

Example: (Image rotation) Let a be a real-valued image on a rectangular array , , and

vW  

(4.8.8)

(4.8.9)

p gfe c qe ih6 %)T9db $ IaDTF`YBSX4I 4T4~ A$A  876 G  0 C @ & ! I G  0 CB PWT VUTS@ 2224 F0 ) ( & ! R4(4T4~d7 727Q7&QzA$A  876 Q 2 3 I G  0 C @ ! PHT FrEDB'A9&27Qz 7 &Qz" 876 5 12222 && $  !  'id%&#"7~d  &T  !

T)SRWW S }

7DrDz7252Dz27 i&QF

A9rA    4(F4DvRwr7

and

respectively. The relationship between additive max and min is given in terms of lattice duality by where the image template is dened by dened by , and the conjugate (or dual) of . It follows that

4.8.3

Example: (Salt and pepper noise removal) An image may be subject to noise and interference from several sources. Image noise arising from a noisy sensor or channel transmission errors usually appears as discrete isolated pixel variations that are not spatially correlated. Pixels that are in error often appear markedly different from their neighbors. In Boolean images this type of noise appears as isolated black and white pixels and is referred to as salt and pepper noise. The image a on the top left of Figure 4.8.2 provides an example of this type of noise. The silhouette of the SR 71 spy plane contains small holes while the background contains isolated black pixels or small isolated groups of black pixels. One way of removing this type of salt and pepper noise is by geometric ltering using local maxima and minima. denote the 3element bounded subgroup Let dened by

Pictorially, t can be represented as

ty =

182

`EP 4EP TuwEP 4uwq`EP P0YYE U 6 E uw } E ( ( wEx (

@4u4 ( uy P0uEP

where the cells outside the support of If , then

| ywv ts }v {zf xuwr o n m l l l n m l j i q Uu q` EwkW hgf g I UH D qf ih %a e t Qtr d 0r u0sEB  " p f

(everything not labelled zero) have value

3 5 c" a $ E& XTb`3 & )V " SQ I F DB TRPHGEC "

of

, and

then the value of b(y) in Eq. 4.8.8 is , the zero of under the operation of , then in Eq. 4.8.9. The left additive max and min operations are dened by

. Similarly, if

yS 9      D  `ii ) 9 q D U
A3 5& X 8 $ ) @(Y4" 9W3 & )V " A3 5 8 $ 3 5 ) 7@&  976& )   3 1! ) " & $ " ) 4)  20('%# !  q p d v eb4Y( (yxw" ~

lq

}T7 y

I DB F Q UHS EC ) " )

T)
d

(4.8.10)

(4.8.11)

is the

be

Figure 4.8.2 Example of salt and pepper noise removal. The sequence of images illustrates the different steps of the algorithm, starting with the noisy source image on the left in the top row and ending with the cleaned image shown on the bottom right. Thus, b(y) is the maximum of a restricted to a von Neumann neighborhood about the point y. In particular, if but for any 4neighbor x of y, then . Therefore, in the transformed image b, any small hole appearing in a will have been lled in as illustrated by the top center image of Figure 4.8.2. However, since we are taking local maxima, all black objects in a have become enlarged or dilated. To shrink black objects back to their former size, using the additive minimum operator . The conjugate of t looks we convolve b with have been replaced with . The the same as t, the only difference is that pixel values of resulting image is shown on the top right of Figure 4.8.2. In order to remove the pepper noise, we need to apply the additive min operator one more time. The image is shown on the bottom left of Fig. 4.8.2. Unfortunately, the second application of the operator also eroded the silhouette of the SR 71. To dilate the eroded silhouette back to its former size we need to apply the additive max operator to d. This results in the nal ltered image shown on the bottom right of Figure 4.8.2. The complete algorithm resulting in f can be stated in one line of pseudo-code; namely,

yw4 E Y

The bounded l-group

also provides for two lattice products. Specically, we have

183

bWE7

} G @u'y

bW76

kyR

%by# y

EU x

and where

Here 0 is the zero of under the operation of , so that whenever . Similarly, whenever . The lattice products and are called the multiplicative maximum and multiplicative minimum, respectively. In analogy with Eqs. 4.8.10 and 4.8.11, the left multiplicative max and left multiplicative min are dened as
# ! $" 4G FD$ E C B

(4.8.14)

and

(4.8.15)

respectively. The duality relation between the multiplicative max and min is given by

This is similar to the additive conjugate dened in Eq. 3.12.1 (Section 3.12).

4.8.4

Example: (Geometric edge ltering.) Roughly speaking, a local edge in a digital image is a small area in the image where there is a sharp pixel value transition between neighboring pixels. Local edge ltering enhances these transition zones and suppresses values of pixels whose neighboring pixels are of approximately the same value. The basic idea underlying most simple edge detection techniques involves the computation of the local derivative operator. This example differs from the standard gradient techniques in that it computes differences in local maxima and minima.
v x uw s ytr p h qig

Let t and s be templates mapping

and dened by

ty =

sy =

184

T  

VF S  de'f S  B

bca bca b ca

Y W U `X' V6

 25

RS

where dened by
R

and

. Here

denotes the additive conjugate of r in

and is

% &

G E4

4H

4H

C B D$

s(

@7@

 1R @ %  E7 y Ww E s7E s(7 } (h}w E7

@ A 9` sE 7 sE78@7u`E

@ ` sE sE7

@(Y4}@ Y
Q

where

(4.8.12)

(4.8.13)

Q %

RS

R @7E }(

# !  0) 7 I

67`E

24 5 3

46

    24 5 46

' (

(7

7E

2 ty = 1 2 sy =
p q r q s

1 2 1

The differences between the local maxima and minima in both the horizontal and vertical directions enhances local edges in these directions while smoothing local areas without sharp edge contrast. The particular algorithm is given by
} } { ~ } ` m|m$ fV|m0 `$ ~ } { z x v u $t|iywDt

where a denotes the source image and e the edge enhanced image. Figure 4.8.3 illustrates the effects of this technique; the source image a is shown on the left and the edge enhanced image e on the right.

Figure 4.8.3 An example of geometric edge ltering. The source image is on the left and the ltered image on the right. In both, the denition of the product operator as well as the four lattice image-template products, we assumed that X is a nite point set. There are various instances where this restrictive assumption can be lifted. For example, if a is continuous, is continuous , and is compact and the appropriate zero, then and all exist. Here we assume that the global reduce operations and denote the sup and inf of the functions , etc. In case of the product operator , Eq. 4.8.7 assumes the form
V ft9h Fh Aehffeieftw Pt I f 8 $Fh

Extensions to the continuous case are essential for modelling or computing continuous image transformations.
185

In i o g

n mi j

j lk

j fi

hd

g e qf

d

g o n k nj k i 8iy

Let and

be the reection , respectively. Then

and dene

and

by

4.9 The Algebra of Templates Since a template is simply an image whose values are images, the basic elementary function theory concepts that were applied to images are also applied to templates. For example, restrictions and and , then extensions have analogous meaning when applied to templates. If denotes the template dened by . If , then denotes the template dened by . As in the case of image restrictions, these two concepts of template restrictions can be combined into a single, mutually inclusive denition.
 tq

4.9.1

Denition. If

, and

, then restriction of t to Z and V is dened as

and

The common unary and binary operations on templates correspond to those dened on images. For example, if and , then is dened by

 

186

7 $ 86

7 8 9

1 3 1 ) '  $ q5420(&f%f

1 3 1 ) ' q0542A(

1 3 1 ) ' B42A(

9 @

C %

" y # 

Thus, if , and and maximum are given by


$"

, then the basic binary operations of addition, multiplication,

where f is applied pointwise to the image as in Eq. 4.7.3. Similarly, if and , then the induced binary operation



, is dened by

  

 

8 t

9!A 

On the other hand, if and dened by


and . Thus, if

, then the range extension of t to s is denoted by , then .

f 

In order to dene the complementary notions of template extensions, let and The extension of t to r is denoted by and is an element of dened by
 9D D y

h eet

 y

y"h

Thus,

, and if

, then

and

fVe)

i TtF

Ffy

Dh

sy =

Using the basic binary operations of template addition, multiplication, and maximum we obtain the templates

1
Y Y

( s + t )y =
Y

5 -1

If is a (commutative) group, then according to Theorem 4.4.1 is also a (commutative) group. Replacing the group by the induced group in Theorem 4.4.1 results in the conclusion that is a (commutative) group. This proves the following theorem:

As can be inferred from the last two theorems, the algebra of templates behaves very much like the algebra of the underlying value set. In view of theorems 4.4.1 and 4.4.2, and the fact that templates are images, this should come as no great surprise. Of course, just as for images in general, the induced
187

r f h f w 4&!t

r Qy d q

pr f h f d t@46qc

4.9.4

Theorem. If is a (commutative) ring (with unity), then tative) ring (with unity).

is a (commu-

w !t

r QI@l&kj@0i d q i i i h h

tr f h f r d ty@4&vQq

~

g u p

c n m

(

w uvQI&Ur t r d q i i i

g hfe d p c

r yi

~f

xfwj v

(

((

g x}|uz { p c

o p(p eUm c n

pr f h f d ts@46qc

dened by and If
w t r d q 4kvQI u u

. Thus, and , , . is a ring with multiplicative identity 1, then we can dene a multiplicative identity template by , where 1 denotes the multiplicative identity image of . Thus, and , , and . The next theorem is an easy consequence of Theorem 4.4.2.

t h f A&w r d q

h f

r d q

If 0 denotes the zero image of

, then the zero template of

h f w 04!t

r Q d q

p h f d y46xc

4.9.3

Theorem. If

is a (commutative) group, then

t h f r d u4%sQq

( s . t )y =
a `

( s v t )y =

b a

G F E T V T R P H !R BUSQI&2#D

4.9.2

Example: (Template arithmetic.) Suppose templates:

are the following translation invariant

1
q s
r vd

q r
X d a p h f d %igec ` w 4t r Qq d

ty =

3 -1

1 1 3 1

is a (commutative) group.

, denoted by , is

follows from our earlier observations concerning the algebraic structure of that if is a division ring, then is a von Neumann ring with zero divisors and, hence, not a division ring. There is a natural connection between the algebra of valued templates and the algebra of matrices with entries from . Suppose that X and Y are nite, say and . Then there is a natural map
2Uvs yUvsU 8x 8 p u I @ge S @4 uvQ

1 t (1,1) =

1 0 0

0 0 0

0 0 0

1 0

The region outlined in bold show the support of t. If we use the usual row scanning order for relabeling the array X, then the vector corresponding to the image is given by
xB

188

 A

Let and s to the point set X in both its domain and range. More precisely, . In particular, the image corresponding to appearance:
uvq  fB8uq40z4 hUe

"   # 

' $ $ $ $ $ $ $ (% %2& %22&2

 !

  B

  

$ $ %2

  

BUSQx

4.9.5

Example: Suppose

is dened by

1
q

sy =

1 1

be the restriction of so that has the following

Uq

Us q

e2~#e2x%s

&

   s

dened by the transpose of the vector

. Then

, where

 Us q

dened by

. Another way of visualizing the map

is by using the image-to-vector map

t@46q

# tx

y@!uvq

structure

is, in general, weaker than the original structure

. For example, it easily

(4.9.1)

denotes

r&

&

HI(! QY I I} ! W 5y& 99 W99 Q9 &yl Q& W Q@#Wx& 1y

Y& d#

~ v

a5&H& 1& & 9&! (&! II5 w xu u y y d fe v y

yw @xv

t t t

t t

t t

u s

f 3 e E e E eE e E e E eE X E e E eE X E E X 0 (%d%a&d%aa&!a%d#!X W4 33 cE b A 2 E G G E 3 ` E X A 2 E 3 E X A 20 4 da#0 R a(!G C0 R Y!X 0 R 9WV3 R &P8 A 20 TD3 RB A 20 8 E U9SQ@PI(G G HF&C@(975&1) G ED3 B A 20 86 4 3 20

By denition, this vector forms the rst column of the matrix Similarly, the second column is derived from the vector

where the image

r p ih 2 sq g4 R 2 A

4.9.6

h e g e w q o n w k ih e g e d t(s(%r#a5pmljffV&I1v

The relationship between matrix algebra and the algebra of templates is given by the following theorem.

Theorem.

Continuing in this fashion, we obtain the symmetric matrix

Proof: To show that is one-to-one, let . But this means that some pair of indices i, j. Thus, For , dene proves that is onto.

t (1,2) =

is given by

is an isomorphism.

with

. Then and, therefore,

 t

| { }Cz

Therefore,
y

If

189

by

, and

. . Then such that for , then . This .

This shows that for nite point sets, templates are equivalent to matrices and the induced binary operations on are equivalent to the induced binary operations on ; e.g. template addition corresponds to matrix addition, and template multiplication corresponds to Hadamard (pointwise) matrix multiplication.
#d &

4.10 Template Products


V 9I sV&

According to Theorem 4.9.6, if

ring (or semiring). The operations and on are pointwise induced operations. In Section 4.8 we observed that under certain conditions the operations and can be combined to induce the more . This notion extends to templates as well. complex imagetemplate product operator , where
V9W H5 x p 9f

, , Suppose point set. Then the template product


(V&

a commutative semigroup, and X a nite , is dened as


  

Pictorially we can view as a functional composition with t applied as a valued template from Y to X, followed by the valued template s from X to Z as shown in Figure 4.10.1.

Figure 4.10.1 Illustration of template composition. Similar to the computation of the imagetemplate product, it is generally not necessary to apply the global reduce operator in Eq. 4.10.1 to all of X but only over a certain subset of X. For illustration purposes we again use the primary value sets , , and .
190
0 (& 1)# & $ '%# # "

9y

&

By denition, the operator

is a function

  

 I

1&&xr#5 y a&d#  d&I

Similarly,

. Q.E.D.

is a ring (or semiring), then

is also a

(4.10.1)

p U T R no18P I H h T X gSP I B

U T R o1P I d e jjc }

T R %1SP

c 2

U T R %vP I

r 2 B U

a 3 r

a r q3

r 2 t

p U T R 1SP U

v xI H I

t r 3

B R q p F1T I P

r s2 t U

pqovSP I H U T R d ec c 2

m T X nigSP I

w T R %18P

h T X vgP I U

w T R fvSP

U T R %1P I

y8I U T X P X V U T R P I YW)1SQH D @ A 8CB 7 5 3

w T R xvSP

t r s3

R q p T F1'I

B P

h i3

If

and

, then for a given

X g f d eeT G 3 FE

3 T R P I vQH X c 2 3 P )H

a b3 `

It follows that can use the formula

whenever

. Hence, in order to compute

c u2

A @ 9 7 5 3 '%8642

where

The lattice product dene

whenever

is dened in a similar manner. For

dene

D @

v 'uA SwB 7 5 3

A @

v 'u9 8qs2 7 5 3

where . It follows from Eqs. 4.10.5 and 4.10.6 that the duality relation

r 3

B R q p QnT I P B 

h T X y8P I

h T X jgSP I

h v x i3

is preserved. It is also not difcult to verify that the support of by or , then .

p 1SP U T R d  ~ lk Y1jjc }

v xI H

T R 1P

c 2

U T R gvP I

X { f d zT

c 2 P

v x H

3 R

a by3 `

X V U T R W%18P

where whenever The dual operation

v yH xI

c 2

d lk jjc i

and

G 3 FE

Then

can be dened using the formula:

. can be computed in terms of the formula

, where

or , is given , respectively. Similarly, if

R U T ngQI

pxTvSP v I H U R v x P H s2 t

p p U T R P I xvSQH

v RUT I P H a q3 r

R V U T %I

Y2

r xuB B t P WU

c 2 h v 3 X { f d FzT P d e  jjc U T R vSP I

a b3 `

X V U T R nvSP

vI H

T R 18P

c 2

B s2 t U

U T R %1P I

D @

v '9u S| 7 5 3

For

and

, the lattice product

A @ 1 v 7 5 3 D uWSB

where is as in Eq. 4.10.2 and dened either in terms of duality by

whenever

. The dual operator

where . For many templates an easy way of computing the template product fact:
B d l  jjc h T X SgSP I B Y T R 1P c 2 U T R %18P I 2 U h @ 2 r B 5 U B 2 @ v 7 5 3 A 19 W)Se2

2 U

or by the formula

191

is dened by

is to use the following (4.10.8) (4.10.7) (4.10.6) (4.10.5) (4.10.4) (4.10.3) (4.10.2) , we can be

T R vSP I H

s2 t

P %H

The theorem follows from the observation


1vS WgSQ 1S w ngSQ g gv

and
yy8 gS

Then the template product

is the template dened by

1 ry = 3 -1
ny u u eyS

2 6 -2

1 3 -1
outside the support, then the template

If product

are dened as above with values is the template dened by

2 4

3 5 1

2 4 0
and
n

ry =

In this particular example, the templates and


g

9 87! @ 3 0 ! %2 ' 65 42 1)$#( '"  & 

192

 

   

4.10.2 Example: Suppose

are the following translation invariant templates:

sy =

There is nothing special about using the operator product .


u euSWo

, the argument is identical when using the general

1 ty = 3 -1

eC1SQ'

4.10.1 Theorem. If

, then

QC

have the property that

Thus, at each point the templates and are identical except off their support. The reason for this is that the set is either empty or consists of a single point. The template t is not an valued template. To provide an example of the template product , we redene t as

ty =

Then

is given by

1 ry = 3 1

and , it is easy to see that the templates and Again, as for the products are identical except off their respective supports, and that . In order to obtain an example where and are not identical on their supports, we need to use templates s and t such that for some pair of points x and y. Let s be as before and dene t by

ty =

Then

is given by

2 ry = 4

3 5

while

is given by

2 uy = 4

2 3

193

g d b ` f e3i

u 24s q x p u q x g 544` Bd &d%4p4X d ( g Y g Y u s iq x p b u s q y#wv0t&arp `Y g d b hX f eca

) 67 $54!320(&%# " 1)' $ "!      


1 3 1

ED

  ed er U em

A 9" B@8 XY

k qj h g lPwp

k ij h g lPHf

T QS I G HRPHF

 C

2 6 2

1 3 1

h & 0H h x H h xx t 0 x 0 z 0 0 x 0 t x 0 H h & h x 4 & 4 4 H 4 H& 4 H& 4 e H (z&( rx2(x#txx{(t({B&t e{( { t y t t z v { w y &t ~ v Hw y %   u { v{ w&ut &t w  v  u~ } { v wv{ w y (ut &t
Suppose It now follows that if This establishes the following theorem. Also, is associative in , where . Then for and . preserves the multiplication operation . Hence, , then . Let we have distributes over . in , .

{ t { { t { t 3 (xt hw y wv   ~u } v e { t &u yv wv  ~ (zu4}

. Since and are isomorphic under the map dened by Eq. 4.9.1, we only need to investigate the relationship between the generalized matrix product and the template product.

According to Theorem 4.9.4, if

vw Btw v v y(v  u~ }  u~ y w { yv v |zxwut


on

if

ring (or semiring). The operations

and , then is isomorphic to the matrix ring , where denotes Hadamard multiplication in the ring . Now if , then is also a ring under generalized matrix multiplication (Eq. 3.14.15). This follows from Example 3.5.6. Thus, it is natural to ask about the relationship between and

{ v wv{ t w y (u&t y { v wv{ t |xy&u&t v v 04t2w

Similarly,

Therefore,

This shows that

Therefore,

is a ring (or semiring), then

194

are pointwise induced operations. Moreover,

is also a

, and

 w x w x &s3 x s t | w  x t  x x t wH w &sAt| w# x w x s| t t wQt# x Aw w # x &s&| t w t t w2w# x w Id x s| t t t w t w x #sw2ww x s  t x w t |  t x t I(Q! t x w t |  x t w#swws  x  x t |  x w yw&t w6Qs( Qst
, we have that

Since in general matrix multiplication is not commutative, we have, in contrast to Theorem 4.9.4, that is not a commutative ring even if is a commutative ring. However, if

14

E 1 4 321 F% 9 DC A@9 861 4 321 ' 0(&%#!  E B 7 5  ) ' $"

has an identity with respect to , then also has an identity with respect to identity of with respect to , then the template dened by

is the identity of with respect to the operation . This template is also called the unit template of . The image-template product is closely related to the templatetemplate product. In order to , , and investigate its relationship to matrix multiplication, let let and denote the vector maps dened by and , respectively. For set , , and . Then

t x w t |  x y2ww#sAt 6s y w#sHt HD6st t x w t | w | w  x { t | w  x w t } | v  x v t }~ p | y x w v t m &qp Gw&33Qutus Aww(&utqzw(us r&q0A{AvzD&uQsron g l   9E  2E1E4 E  E  l   l l E  ) $ S ' Q%d i B E cQ%99  E c A9 9 E % 9 9 sEE 1 4   E 9 kj E C hgAf&e9   % 7 (  % 7 '   9 c   9 9 G  c 9   y  x 4
is one-to-one,

14 v i wi ut` srqpG2hgf e c XW d6$ Sba` Y! E 9 VR ' ) ' &%UTR ) ' ' I(Q%$ E 4 321 % 9 
, then

The next example demonstrates the utility of Eq. 4.10.13.

3Ts |

)' ' IH&%$

% 5  )' $ 614 3P1 ' IH&%G"

   

Therefore,

Hence, whenever

It now follows that

' ) ' $%

or, since

Thus,

4.10.3 Theorem. If

If

isomorphism.

, then

and

and Eq. 4.10.10 has form

195

. If 1 denotes the

(4.10.13) (4.10.12) (4.10.11) (4.10.10) is a ring (4.10.9)

4.10.4 Example: Suppose

is dened by

. Then according to Eq. 4.10.13,

where

sy =

requires nine multiplications and eight additions The construction of the new image per pixel (if we ignore boundary pixels). In contrast, the computation of the image requires only six multiplications and four additions per pixel. For large images (e.g., size ) this amounts to signicant savings in computation.

Boundary problems will occur when convolving images dened on nite arrays with templates dened over the whole discrete plane . Equation 4.10.13 holds for images and templates . In particular, the equality in the last example need not hold for arbitrary dened by . As an example, suppose are two translation invariant templates

3 sy = 1 2

1 2 1

1 1 1

ty =

1 1

196

( 8 Y w
,

, and

4 6 -4

ry =

-6

w HD d

-2

ty =

H s 6  T

ed

T8b



H& HQ T G D 2I &8 2D

6 9

-4 -6 4

2 3 -2

Then

2 3

ry =

1 1 1

8 3 1

4 1

2 2 2 1

1 4

2 2 1 0

3 1

Figure 4.10.2 Part of the image a near the corner point (1,n) with the shaded cell representing the point (1,n). Now if , then

On the other hand, if

2 H xD X H xD v s p Q ec b V S 2 FDCA fdyxA  T Q 9 tyxA 4 iXwu trqGihgfdP a`YXWR UT3RQ IH GEB)

8 3 1
since

, then

s(1,n)

|X

= 1

197

sq pone fr k fm

r(1,n)

|X

1 1

4 1

&

'

&

t l k j hi e h i @agfd

# !  $" 

9 68 4 0 @75321)

 

Let

with

and values near (1,n) as shown in Figure 4.10.2.


3 0 1 2

is given by

3 5

3 8 5 2

3 3 3

since

and

t (1,n)

|X

1 1

However, if

are dened by

), then

and . Note that if

(i.e., , then

r(1,n) =

1 1

4 1

Thus,

(e.g., equality fails for points in X that are on the boundary of X).

4.11 Spatial Transformations of Templates Spatial transformations are applied to a template in the same way as they are applied to any other image; if and , then

is dened by

198

Figure 4.11.1 The spatial transformation

{~

where

. The corresponding diagram is given in Figure 4.11.1.

FX
of the template t.

| |

x m~ " | }  y Y} }

Therefore,

x xw x 7w x t } } t rY| } y | |@y }y | "y YG } | }  | xy  } z x y x y w z E~x y y|{7w


.

W 7"

W W

uD d t "r d Y~

2 1

and

(4.11.1)

It follows that every spatial transform induces a unary operation dened by . If f is a transformation from Z to X instead from Z to Y, then f induces a unary operation dened by , where

Thus,

There are obvious differences between the transformations dened by Eqs. 4.11.1 and 4.11.2. Computationally, 4.11.2 is far more complex since functional composition has to be performed for each point y. However, as the example below illustrates, for translation invariant templates we only need to compose once. Spatial transformations can be a useful tool for redening templates. For instance, the templates and in Example 4.8.4 were obtained using spatial transforms. The next example illustrates a similar application.

4.11.1 Example: (Edge mask determination.) Edge information conveys image information and,
consequently, scene content. Edge detection contributes signicantly to algorithms for feature detection, segmentation, and motion analysis. In a continuous image, a sharp intensity transition between neighboring pixels as shown in Figure 4.11.2(a) would be considered an edge. Such steep changes in intensities can be detected by analyzing the derivatives of the signal function. In sampled waveforms such as shown in Figure 4.11.2(b), approximations to the derivative, such as nite difference methods, are used to detect the existence of edges. However, due to sampling, high frequency components are introduced, and every pair of pixels with different intensities could be considered an edge. For this reason, smoothing before edge enhancement followed by thresholding after enhancement are an important part of many edge detection schemes.

a (x)

a (x)

x0 (a)

x0 (b)

Figure 4.11.2 (a) Continuous image with edge phenomenon. (b) Sampled image function. The gradient of an image a is dened in terms of direction oriented spatial derivatives as

199

WY Ba

      " #!   Y B

GY Ut t Y5 rI

(4.11.2)

One discrete approximation of the gradient is given in terms of the centered differences

and

The centered differences

ty =

of and are the centered differences The pixel values at location and , respectively (see also Example 3.6.6). This concept forms the basis for extensions to various templates used for edge detection. Variants of the centered difference templates are the templates

-1

1 1 1

ty =

-1 -1

sy = -1 -1 -1

which form smoothened or averaged central difference operators. The templates t and s are orthogonal; one is sensitive to vertical edges and the other to horizontal edges. We may view t and s as corresponding to evaluating the averaged derivatives in the 0 and 90 direction, respectively. Evaluation of the derivative in directions other than 0 or 90 becomes necessary if one is interested in detecting edges that are neither horizontal or vertical. One simple way of obtaining a template that can be used for evaluating the averaged central difference in a desired direction is to simply rotate the image through the angle and use the resulting image values for the weights of the new template. For example, applying the rotation f dened by Eq. 4.5.4 to the image with = 90 results in the image which is identical to the image . Since s is translation invariant, the image completely determines s. However, for angles other than 90 the resulting image may not be a satisfactory approximation of the averaged central difference in that direction; for = 30 the image is basically the same as . The reason for this is the small size of the support
200

aW T 20VGq

v w y x H y x B y x

1 A 'B$ 1 ) 'G$ % % I 1F' %9 E A 1 A ' 9 C A @' 0('% 5 H1 A ' #7 A @' 0'% 5 41 A 'G$ ) C 9 ) 3 % 1) 2F' %9 E 10' ) ' 9 C ) ('% 5 D2B' ) ' #8) '% 6420('&$ A @ C 1A @ 9 7 5 3 1) %
and

can be implemented using the templates

1 -1 1

Y x y

i ce phb

EP

f ce ` X W T R gdb a0YVFVUSQ

y x

y x

ED U

sy = -1

y x

rutr s T `a (VGq v

of and associated interpolation errors. In order to obtain a more accurate representation, one scheme is to enlarge the image to the image
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1

and rotate this image using linear interpolation. For = 30 the resulting image of form
-0.73 0.13 -1 -1 -1 -1 -0.37 -0.87 -1 -1

1 1 0.87

1 1 1 1

0.5

-0.5 -1

0.37

-0.13 0.73

The nal template r is obtained by restricting its support to a center pixel location y, namely
-0.37

neighborhood of the

0.5

1 0.87

ry =

-0.87 -1

-0.5

0.37

While t will result in maximal enhancement of vertical or 90 edges, r will be more sensitive to 120 edges. Likewise, rotation through an angle of 60 results in the template
0.37 -0.5 -1 0.87 0 1

sy =

0.5

-0.87 -0.37

201

qo k rpYnl mlj

t u xwt

y y

s s

g g g g g s

fd ed y

z|

tu dvt

fd ed {

0 0 0 0 0

1 1 1 1 1

1 1 1 1 1

is

which is sensitive to 150 edges.

4.12 Multivalued Images is a unique element of , a(x) may be composed Although each value a(x) of an image of values from several value sets. For example, if , then a(x) is a vector of form where for each , . Thus, with each vector-value a(x) there are associated n real values . A real vector valued image represents a special case of a multivalued image.

with

, then

is called a multivalued set. If

product, then If

is called a single-valued set.

is a multivalued set and

, then

multivalued set or simply a vector-valued set. A multivalued set which is not a homogeneous multivalued set is referred to as a non-homogeneous or heterogeneous or mixed multivalued set. and is a multivalued set, then a is called a multivalued image. If If homogeneous multivalued set, then a is also called a vector-valued image.

If

and

, then a is of form

where for each

is given by . Thus, every multivalued image can be viewed as a vector whose components are single-valued images. Conversely, if for there exists an image determines a multivalued image which is dened by

, then the collection

(see also 2.5.7). This means that we can construct a multivalued image from any array of images dened over the same point set. Another method of forming multivalued images is through functions that map a single-valued set , where is a single-valued set, and into a multivalued set. More precisely, if then f induces the unary operation

For example, if and is dened by , then the image has values . This example is, of course, a special case of the general unary operation dened by Eq. 4.7.3. Obviously, any unary operation on single or multivalued images on a given spatial domain X is a function of the type described by Eq. 4.7.3.
202

H~HUh

4~

2w

~ SU ~

4 H~ Y ~ 4 d dd~ (w8(H   ~ # 6t8vH~H

BF2 ~~ ~

UB24U4

 pSS~

B ~ ~ Y2 ~ 2 H~ # ~ pd ~ dd~ 

4.12.1

Denition.

If

is a value set and

can be written as a Cartesian product of value sets cannot be written as such a

is called a homogeneous

4~

 SB~ 26 4  dd~

 ~

BH42F~ ~  pdd~

is a

dened by . Thus, every function induces a unary operation and a family of unary operations (as dened by Eq. 4.7.3). Conversely, given a sequence of functions , then we obtain a sequence of induced unary operations and a unary operation which is dened by (4.12.1)

Equivalently,

Induced unary operations can be constructed from an even lower level of specication. Suppose that for some indexing function there exists a sequence of functions

Then the sequence of induced unary operations

which is dened by the sequence

Equivalently,

For homogeneous multivalued sets we obtain a special class of unary operations. Suppose and are homogeneous multivalued sets, , denotes the identity function , and . Then the induced operation f is called a homogeneous unary operation, otherwise f is called a heterogeneous or mixed unary operation. If f is a homogeneous unary operation then we let the coordinate function represent f.

(i)

If

Similarly, if for

Note that

203

$ %

$ $ $ $ %2  %6 % % # H   (  4( 2 "02 2 !H2      Y2 G HY HUHH  Y2 r

4.12.2 Examples:

B x0 2 2 H 0 F 2H 0 4HH GH 2H U4 F2 S 0 F F Y0vd 4 pF02xFF2&Bd BG Y24 H Uv8UHH GH 2H U4 p Fg F u BS 8 r u
Suppose , where and , where denotes the projection also induces a unary operation and for , then , then

. Then f generates a sequence of functions

induces a sequence of unary operations

. Obviously, which is dened by (4.12.2)

(4.12.2)

is a boolean vector valued image. For a boolean vector valued image , is dened as , the boolean complement of b, denoted by , where the ith coordinate is dened by Eq. 4.4.5.

(ii)

3 & k ' 3p w i 3 k h s s 4ss ss s k k s s zaSss i h 7 6 k dw 4tAatsD H ( ' H D sk ' k 9 9@@@ 2 sD 9 sD 9 vsD(X2 1 D9 C D9 T D) s ss ) 6 9@@@ p i k h s 4osbs k st k q u } } br u ~ T 6 { } i 9@@@ 9 97 w q 9 @@@ 4tAk Bn q m r p H k U1 onm H lk s T 6 {|C u |T u AwszyIxPi WuBB9 C Wu9 T vu { 2 ) 5u 6 2 A4&AWwyW&) G 0 f i g 2 ) 5u 2 )u 2 C )u x 2 ) 5 ) 6 2 ) 2 ) 9 ) 6 2 jh'tf9c22XW) C &BBWwexBb24) T 4&"b9b24) C W&BdB2XW) T &A4w4uXW h 24bg4eA4&) G 3d Y ' C W0& srBWw(q d 2 9 6 ) 2 ) 5u x 2 )u 3d C Y0 i 3 2 C Y0 u h G x 2 ) 5 u 6 2 9 6C 2 G srT G9 q) C G G 0 ipC 0 hC G fgde1 sr1) yBqA4wvtsbrq) T G 0 pC 0 (T G i h 9 @@@ Y 62 C &c9 TR b&B9 CC b&9 T a&`XW&) G D 62 T QVI4D) USRHC F G C QPID) HC F G D 62 43%0((& 21 ) ' 0 ' (ED 9 @@@ 97 6 C1 BA85
by and . Then the induced function Applying f to an image results in the image deletes , the function The induced unary operation vector valued image . where The map by Thus, if we represent complex numbers as points in and a denotes a complex valued image, then , where sin denotes the complex sine function. Dene Suppose n is an even positive integer and and . Then Suppose and and denotes the and . components from an element of . Since for generalizes the notion of the ith projection function. deletes image components from a factor of , where . Dene . For by given by and with dene .

(iv)

(v)

The general framework for binary operations on multivalued images is similar to that for unary

k sk s 6 s T 6 s k Bnq m s lk

f s k i Szsz p SzsW %eh s F i w9 @@ 7 i 9@@@ 97 AB@U9Ix i he h 3 Q 3 & p ' ' 92 U q b& C b& T 4&(EV& 9@@@ 9 9 ) 6 3 3s k 3 p 3 s h s k i p lUh s i Bh f 3s k 3 p 3 eh E s i 3k 3p 3 2 PW&) 6 h is s f& i p %h i p Xh s T 6 T k i p dh H p B onm H p H B1 onm H 6
operations. Suppose generates a sequence of binary operations . Thus, every binary operation and a family of binary operations , where , , and

operation i.e.,

and . As for unary operations, binary operations can also be induced from coordinate level binary operations. Suppose that for some indexing function there exists a sequence of binary operations

i9@@@97 sBUe 3k i 3p

Conversely, given a sequence of binary operations , then this sequence induces a sequence of binary operations and a binary operation which is dened by

204

dened by ; induces a binary operation . Then the binary

, and are homogeneous value sets, In analogy with unary operations, if , and , then the induced operation 4.12.3 is said to be a homogeneous binary operation. Otherwise is called a mixed or heterogeneous binary operation. If is a homogeneous binary operation, then we let the coordinate operation represent the operation .

Ae U e E e vv 4 s4S c 4 o o!

BX  d (E e B e Sz oz o Es c Sz o o4%E

Equivalently, we have that

Then the sequence of induced binary operations , which is dened by sequence of binary operations and . This new sequence then induces the binary operation which is dened by

4.12.3 Examples:

U B (E V s UB f  e  d (Ee IQt
, then

(i)

and

  |  B ( U B (E V

etc. In the special case where

e se ! f 4W 4 ! 4 XW 4 4  v gt  B g   Be o v 4 p vU4


. and , , the components of is dened by with an image

vU 

(ii)

Then for values

for If If

combine a scalar of any multivalue set

Similarly,

Suppose that for

and for

, then according to Eq. 4.3.3 we also have

, we simply use the scalar and dene , and so on. Of course, these operations can be generalized to

205

induces another

(4.12.3)

have .

Let

and

and

Now if represent two complex valued images, then the product represents pointwise complex multiplication, namely

Basic operations on single and multivalued images can be combined to form image processing operations of arbitrary complexity. Two such operations that have proven to be extremely useful in processing real vector valued images are the winner take all jth-coordinate maximum and minimum be dened by of two images. In order to dene these two special operations, let . Now if , then the jth-coordinate maximum of a and b is dened as

where

The jth-coordinate minimum is dened as

where

An easy interpretation of the images dened by Eqs. 4.12.4 and 4.12.5 is given by the following equivalent statements

and

respectively. Since it is possible that for some the pixel value jth-coordinate maximum and minimum are not commutative.

, the operations of

The next example illustrates an application of a jth-coordinate maximum.

4.12.4 Example: (Directional edge detection). The output of this directional edge detection technique
is a two-valued edge image in which each pixel has an intensity value as well as one of eight
206

 1 g  1  t  X   uytxwftsrpb  1 H  1 d   W b    1 &X b u qi b  ` )T

 X   uytxwvtsrpb  1 h  f edc   W b    a 1 YX b u qi g 1 b  ` ) '

"   B   b      X  

  

R H P H SQIG CF$ $9(8 1E6 4D$2 C B9@8 176 5$3 1 0(  A A 4 2 ) ' %$# ! X !  """  &

C$ $(8 E6 D$2 C BWU8 E6 5$3 1 0( F AV 1 4  AV 1 4 2 ) T

X 4  4

R H P H SQIG

(iii)

be two binary operations of

y X  4 

dened by

(4.12.4)

(4.12.5)

possible directional values. In this particular scheme, a gray scale image is convolved with the four translation invariant templates shown in Figure 4.12.1

t (0) = -1 -1 -1

-1

1 1 1

t (2) =

-1 -1

Figure 4.12.1 The four directional edge templates. The resulting four images are then fused to form a single two-valued image e. Data fusion is accomplished by assigning to the resultant pixel the value of the largest magnitude (i.e. the largest absolute value) of the corresponding pixels in the four images and the direction associated with the template which yielded the largest magnitude if the pixel value is positive, or if the value is negative. Thus, each pixel location of e has both an edge magnitude and an edge direction associated with it. It is customary to use the integers 0 through 7 to represent the eight directions 0 through 315 , respectively. The addition . then becomes addition modulo eight, namely be dened The image algebra translation of this algorithm is as follows. Let , then by for , and . Here each is a vector valued image of form . More specically, if , then

Note also that is simply the scalar addition of a vector and a vector valued image as described in Example 4.12.3(i). Since , it also follows that , where for and k denotes the smallest integer for which .

It should be obvious by now that multivalued image operations are special cases of image operations between different valued images as discussed in earlier sections of this chapter. For example, suppose
207

~| { x y xv }IzI#wu f rnpko fg n$d& emljh e

h h lfrq p h p # p Xp c p X ta  y 0#qve u hh e qth ehh !sh h q !q ev p  tp h #  0 Dv lf!n$veq tq u !qv!ev n!0@k tsf 3!u # B

djh gs Ekoptrq

f f

femljh fe nrrEkigrrd

1 t (1) =

1 1

1 -1 -1 -1

1 t (3) = -1 -1 -1

1 1

that for

and sets the binary operation

induces a global reduce operation

where is dened by Eq. 4.3.12. If is homogeneous and is also homogeneous (i.e., ), then is called a homogeneous reduce operation, otherwise is said to be a mixed or heterogeneous reduce operation. If is homogeneous, then we let represent . For example, if for , , and , then

In contrast, the summation

In order to provide an example of a mixed reduce operation, let Then for , we have

4.13 Multivalued Templates A template is called a multivalued template if In this case t is of form

. If is a homogeneous value set and , then t is called a homogeneous template, otherwise t is said to be a heterogeneous template. Since templates are special types of images, concepts and properties of multivalued images apply to multivalued templates as well. Specically, operations on multivalued images are also operations on multivalued templates. The only operation not discussed in the multivalued setting is the product operator . Template products of multivalued templates are governed by Eqs. 4.8.1 and 4.8.2. As for binary operations on multivalued images, an image-template product of a multivalued image and template induces a sequence of image-template products on the coordinate level, and products on the coordinate level induce products between multivalued images and templates. More precisely, suppose is a commutative semigroup, where , and denotes the operator

208

    tD

c t &  3  i 3t$ E av }II t#  r D $ ct c%$#$ %$ck ai }UfkE !& $%rQh @y!5Etr! #$%rptcnWE t$%c  W7 n#$%k#pEi pa $$ #%$k%!w #%$%$! E!hU t%$k I
, each represents a commutative semigroup. denote two arbitrary elements of dened by Let dened by since each . , , and with .

. Then for nite point

can be written as a Cartesian product , where and

, and

 $&% #$%k$ 

ct 

t$%c  r r( 

Following the method used for obtaining induced binary operations on multivalued images, suppose that for some indexing function there exists a sequence of binary operations

S H H  H  9 A h D H  fAAB9 7  d 2  F D 6HfAAB 79 fH3H 9 A 4 2 2Hl W2 w 0 i" &9 H 7 7 fFade4 tyS @ S  @FXe4 6S @y k S hggg S HFade4 6S S  Fe4 S @y k2 h t6S @y S  S d d S 9 hh t D @y D  D @y d D fAAf9 h y 7 @ 7  y 7 @ d 7 fd 2 9 A Fjqtd'fAAB69 fBtdByf F D  4 D 9 A F 7  47 4 2F 4 S H IH  2 9F 9 A9 4 2 k D H jAAB 7 H  dEH  H 9 S S H  6S @y kg S H  2 S H S H SH S  b o( p F b y&I$ b ~H  0 4 " 9F 9 A9u 2 0 jwfAAfvtys4 bS o( p F b &V$ b ~ S H  4 " 9 F 9 A 9 u 2 bS 0 jwfAAfvtys4 o( p F S @b &V$ S d~ S H  4 b " S x( S @y$ S d S  0 & " k#fAABetC#AAB~} V#fAAj~| 9 A9u} $ l9 A9u (  w9 A9u} 7w u 2 w &7 2 v{ yxw z& 'tskw4 @r" Qpi yxoml" F q nv 2 9kFFPBed4 aIBCjfeXf4hggEdH6F 7F de4 XIf 7F eBdf i S Fi 4 SH g S S  4 4 2F 4 F  2F 4 # S tf4 S f p h b d& b 8 S H  v% 2 " 0 ( b $ b" pS r hp g d& S H  S (&'$ S  SF H S9 y0x6w#AABvts 0 " 4 9 A9u 2 S H SH S  9 pS rqpigf&ec S H  0 ( hb d $ b"  S0 (S0 $S0 S S0 ( & $ " S XWYa'`XPYH XW)V%UTE FD 9 A 7 4 2 GECAAB@98653H   0 ( &$ " 1)'%#! FD9 A 74 2 RQ6H#AAB@9PH5IH
If If The operator in Eq. 4.13.1 is induced by in Eq. 4.13.2 is dened by denotes the operation dened in Eq. 4.13.4. Note that if and and and (Eq. 4.13.3) is dened by . . Then , then the image is of form . Thus is a commutative semigroup and and induces a sequence of products and is dened by , then

where is induced by and . Conversely, if for each then we obtain a sequence of induced products

, and are homogeneous sets, , and both and are homogeneous operations, then is called a homogeneous product operation, otherwise is called a mixed or heterogeneous product operation. If is a homogeneous product operation, then we represent by . Left products and products between two multivalued templates are dened in a similar fashion. where where each and the operator and Then we obtain the operators where or, equivalently, by Thus, if induced by , then products can also be induced from coordinate level products. as dened by Eq. 4.8.1. The operator (4.13.5) (4.13.4) (4.13.3) (4.13.2) (4.13.1) , where ,

209

4.13.1 Examples:
(i) Suppose and . Let and denote multiplication and extended addition, respectively. If we use the semigroup structure , where , then we obtain the heterogeneous imagetemplate product

where

In particular, if

represents a vertical edge enhancement and the second then the rst coordinate of coordinate a dilation or local maximization. (ii) Suppose that , , and denotes the binary operation of scalar multiplication of n-dimensional vectors. If , where + denotes vector addition, then we obtain the homogeneous imagetemplate product

which turns a single-valued image into a vector-valued image. The value of the image at a point is given by

4.14 The Algebra of Lists A common activity in computer vision, and computer science in general, is the arrangement and representation of data in some ordered fashion. The ordering usually depends on both, the particular task at hand as well as the properties of the data. One of the most utilitarian of such ordered data structures are
210

tf f Qf6fC f f a fB6d  6fC #BC fd z fqf z 8 8 C #BI 5 h % i P6CB@d V

id f 'ym v f f 'y 5 f E T6) Bf tG8G `` fG RRGR f'


so that and .
-1 1 1 1 t 1, y = -1 -1 t 2, y =


0 0 0

0 0

lists. In this section we dene several basic concepts associated with lists and show how these concepts t into the larger framework of image algebra. Given a set , a list over is a nite sequence of elements of . Such lists are denoted by angle brackets containing the ordered, comma separated elements. For example,

represents the list over the integers containing elements 1, 3, 5, 7, and 9 in that order. The empty list, containing no elements, is denoted by . More formally, a list over the set is an element of the set

where we dene so that . , then for some and for . It is customary to If denote the elements of L by and to specify the function l by enumerating the s using the natural order of . That is, we dene and specify l by . Since lists are images, namely functions from a point set to a value set (see Theorem 4.14.1), many of the concepts dened previously apply to lists as well. For example, the length of a list , which is denoted by , is dened as the number of elements in the sequence dening l. Hence can be computed using the following statement: Note that if , then , and if , then . is concatenation. The concatenation operator The fundamental binary operation on lists together. If, for example, if l is the list and denotes the list then denotes the list where
u ! F VSR R  C G Tu y y C 3 3 3 65H 3 3 3 56H  G y y Tu u  3 3 3 56  3 3 3 56 1 w R R  d  x B C 7 8! G P  I 3 3 3 654

for . It follows that for any and that . Since concatenation is associative and the empty list acts as an identity under the operation of concatenation, we have the following result:
( bx %

4.14.1 Theorem.

is a monoid.

Obviously, equivalence implies range equivalence while the converse need not be true. For a given string and an arbitrary element , the occurrence number of x in l, denoted by , is dened as . Thus the occurrence number tells the number of times an element of L occurs in a string l.
211

( 4P 9)P4dpPc % ! a c (% ! a

R UR 

R  VSR

 u

p o n fg f  m@l`s' r uq DB pm B 

z( u @)%

G I

y e c a Y mPpUx w (

  

4.14.2 Denition. Two lists


 fg f i fg f m@lkjheeW d

are said to be range equivalent whenever . Two lists l and are said to be equivalent if and there exists a permutation such that .

3 3 3 56H

u x

 

f f  h 8


j # # ` C

3 3 3 56H

x  px 

1 2 '

G D 

G Q  G u   I 3 3 3 55H v t (  % ! ' a q i ef e c a Y W R  Qu9)s@prphg5db` XVSR

Q6~PP6
 ('% 0)&

R  TSR

 

f T C `

#$"!     

('% )@9FE D B B C

u % vs!  t

 

'

(A'@9 %  

RVUR G Q  I

R&uSTS 9uUSR R R  R R x  G I B gby  B 

3 3 3 65H

G 

( &

 

u% )s!

joins two

P6Tg55sQU q94

H@9@ 4 P

where . List projections belong to a class of important unary operations on lists that do not increase the range is called range-limited if . of a list. Specically, a function Rangelimited maps can be conveniently dened in terms of a parameterized projection map which is dened as follows: For each , with , dene

)

ePp @@

4.14.3 Theorem.

It will be convenient to use the notation , and to denote arise when using the notation without specifying s; e.g., if s is a list, then
v@ w9 @ @ @g e55t9@ 9T@ 0Q g  )4 lV@ tVTFD l9@9 VUD@C | } 4wTss P | )5| 9P9P| D s56)6g& 9 64) 9 ` ePp tPp   x`VS Pp 5p 4g56Hd4Q@ `l)@ 9 D ) pwg 9  89d) 98  9 4 d456H644P4 P } 4&Vs)s VSUVv5P| ~ } &Tss PP| 2&TsAs g 5  ~ } sVUj9vss6| {

V@

&

it follows that

for otherwise there exists an integer assumption we have .

VU$

Let

Proof:

Since

If

and

, then

. Therefore

is a partition of

The basic unary operation on lists is the projection map

212

. If

dened by

, which means that contrary to our

, then

. Therefore,

. Some confusion may , but if s represents (4.14.2) (4.14.1) Q.E.D.

Again, if s is not specied, then it may not be clear whether refers to the map dened by Eq. 4.14.1 or to the map dened by Eq. 4.14.3. Hopefully, the content of discussion leaves no doubt as to which of the two maps an author is referring to. For example, if we specify s as the single integer list and , then it should be clear that
  )9) " ` 

1. 2.

, for any

Such properties can be used to manipulate strings in a coherent and concise fashion. Lists are often viewed or dened as sequences. For instance, if , then l can be viewed as projections

an element of

. Thus, in addition to the above dened projections, we also can apply the standard

The operations of concatenation and projections can be used to dene more sophisticated operations on lists. The next example provides an illustration of this.

4.14.4 Example: (Median lter). The median lter is a nonlinear technique for noise suppresof an image with the mesion. It consists of replacing each pixel value dian value of the pixels in a neighborhood N of y. The ltered image, , is given by , where is a neighborhood conguration function about the point . In order to provide an algorithm that expresses the median lter in the language of the list algebra, let be the set of lists with real valued elements and dene the binary operation by
n m k i &lje &`% o v o h v U5Qf o v &`%G m ~ fw h gf 7Pe i g h h g f i } ~ h }f e | f y xv t r p o h gf w53il&{A{zdwusqyn Pq~ k

213

 

W  W

% %

v d"

w6

" w

 

b 

v "

V T p

"

to lists. The maps such that


 "  

and are distinct but similar in behavior. For example, if , then

Since is dened in terms of concatenation, various relationships between exist. The following two properties are obvious:
b i!fd b 0 v v))9bgq`)Y 5g a h g e c a Y X V T S I I I  WUA4RQPdH $ 8 4 666 4 F B 0 $B 4 666 4 2 0 $ 8 4 666 4 2 0 A0 117GE 3D(C30 117A1(q@9(0 711531( 4

and concatenation

and

 

qp

mUp@e 4
"

an integer, then . It is also common practice to view the unary operation is denoted by , and dened by
vdl 0  "s
&5

as a unary operation on

, where

(4.14.3)

&TQ@l` $" $" &%#(`'u`&9A%#!x9g

"

x y " w

P " w

" w

    v!u" t r s

 

The algorithm now proceeds as follows: be dened as Let


`jb

The median lter dened in the above example should not be confused with the mean or local averaging lter described in Example 4.8.1. While the local averaging lter is generally more effective in suppressing smoothly generated noise, the median lter is much more effective in reducing the effects of discrete impulse noise. Figure 4.14.1 provides a comparative example of the effects of these lters on an image containing a fair amount of discrete impulse noise.

214

AG 7{ Gu

Then, the ltered image

is given by

{ `% wR `%

9

f 1 %DG H&{ f% dA 

Dene the median function for a list

&33U wR5AqP {R55% jR5A 33fdwjR3AqP7z{R55%77zjR5A 7!AP % 5{`%

of length

A9 lq%

U&&

qq

Dene

recursively as follows:

by

Figure 4.14.1 Example of mean vs. median lter. The top row shows the noisy source image on the local averaging template is shown on the right. The left and the mean ltered image using a bottom row shows the effect of median ltering. The image on the left is median ltered using a neighborhood, while the image on the right is median ltered using a neighborhood.
 
4 = 1

Since the median lter represents an image-to-image transformation, we could have used previous methodologies for an algebraic specication of the median lter algorithm. For example, if represents a von Neumann neighborhood, then for , let be dened as follows:
    

t1=

t2=

t = 3

0  # '  # &  # ! ")("%$"%$"



Note that if

, then t is given by
215

1
2 1 b ` T W T U T S Q I H F aYXVRP7G4

ty =

1 1

This scheme can be generalized by decomposing any size template into the appropriate number of one-point templates. However, the number of convolutions (iterations) for single-pixel templates (with odd) is
str s q q tXf S A p o

This provides for an extremely inefcient algorithm for most computers. For some computer architectures, however, this neighborhood decomposition into single-pixel templates is a very efcient method for implementing order statistic lters [2, 1].

n l mk v ev n l mk v v n l mk v v c i h g 3 i f 3 i 4 3 86 j5ep5ed59c

`VA S 8 96 vv x v pu WV5y6 S A H 8 v v x v u U 86 ayPH v ev x v wu s 3 i q 3 i d 3 86 trpPh%9gc

216

If

3 86 d f9e3

A 3 86 4 B@9753 D EC

, then the median image

of a can be computed as follows:

Bibliography
[1] P.C. Cofeld. An architecture for processing image algebra operations. In Image Algebra and Morphological Image Processing III, volume 1769 of Proceedings of SPIE, pages 178189, San Diego, CA, July 1992. [2] P.C. Cofeld. An Electro-Optical Image Algebra Processing System for Automatic Target Recognition. Ph.D. dissertation, University of Florida, Gainesville, August 1992. [3] J. Dugundji. Topology. Allen & Bacon, Inc., Boston, 1966. [4] G.X. Ritter, J.L. Davidson, and J.N. Wilson. Beyond mathematical morphology. In Visual Communication and Image Processing II, volume 845 of Proceedings of SPIE, pages 260269, Cambridge, MA, October 1987. [5] J. Serra. Image Analysis and Mathematical Morphology. Academic Press, London, 1982.

217

CHAPTER 5 TECHNIQUES FOR THE COMPUTATION OF GENERAL LINEAR TRANSFORMS This chapter presents methods for the computation of discrete linear image transformations. Linear image transformations represent a large class of fundamental image processing operations in which images are transformed by the use of linear combinations of pixels. Special consideration is given to the linear operator to represent and optimize linear image processing transforms.
u v

5.1 Image Algebra and Linear Algebra In Sections 4.9 and 4.10 we established natural connections between matrix algebra and the algebra of templates. A consequence of these connections is that for any given eld , the ring is algebraically the same as the matrix algebra , where , , and denotes both (induced) matrix multiplication and multiplication in . Since any linear algebra of dimension mn is isomorphic to a subalgebra of (Section 3.9), linear algebra can be viewed as a special case or as a subalgebra of image algebra. Thus, any relationship which can be expressed using the notation of nite-dimensional linear algebra can also be expressed using the usual notation of image algebra. Image algebra notation, however, differs from the conventional matrix/vector notation in that it reects the way computations are carried out in digital image processing. In comparison to image algebra, linear algebra is an ancient and well-established area of mathematics encompassing a great wealth of accumulated knowledge in terms of theorems and computational techniques. The relationship between image algebra and linear algebra provides the link to this knowledge and offers direct methods for optimizing and implementing linear image transforms on digital computers. The pertinent link between image algebra and linear algebra is the pair of isomorphisms and dened in Section 4.9. These isomorphisms, however, are not unique. Their denitions are based on the ordering of the points of X. Distinguishing the points of X by subscripts, say , provides for a linear ordering of X by use of the rule: . The isomorphism is dependent on this linear ordering since by denition, , where . A similar comment applies to the vector space isomorphism . It follows that for each different ordering of X one obtains a different isomorphism. The next theorem describes the relationship between them.
x y 5h""5y  y " |xw  x y 5h"m5y y  " x  @ x x j | x w  x | { y u y x }"tzaw | x w hPw | { y u y | x w thPPw { |Rw @ dw | ez z u y u y tx v  ~ x  % | "" w

5.1.1

. and for every template , then there exists an ordering


x  | x w hw

219

z$

| ew

Conversely, if there exists a permutation matrix a matrix with the property that
| x w dtw)t(

| x aw w

Theorem. Suppose and orderings of . Let and isomorphisms dened relative to the ordering of and a permutation matrix such that
| Vew w | | x w d

are two different be two , respectively. Then there exists

w | dre$ w | w

hPt

y y y  t"m5m7e5"

In order to prove the second part, let P be the permutation matrix with the property . Since P is a permutation matrix, there exists a permutation such that . on X by setting and an isomorphism Dene an ordering relative to this ordering. By the rst part of the theorem we have
d B

and by the hypothesis of the second part of the theorem we have that
b c' ) ' % # T aI R ` X P 0YWD B &@ V E D I G

Hence

. Q.E.D.

According to Theorem 5.1.1, two isomorphisms dened in terms of distinct linear orderings of a point set differ only by a permutation. For this reason we shall use the symbol to denote the isomorphism described in Chapter 4. The ordering on X will be understood as given and no mention of it will be made in general. The special case where X is an array, or , is of particular interest. Unless otherwise specied, in these two cases we shall always assume the lexicographical or row-scanning order. The isomorphisms and allowed for the easy proofs of basic properties governing the general convolution operator (Chapter 4). We conclude this section by reformulating the most pertinent of these properties in terms of the eld operations and .
220

5 t

u t vWP

   5g

q p rdi

% ' ) ' &#

R T UI SB @ I

P QD B @ H FD I G E

t""5 7 7

% ' ) ' &#

, where

a d

V  

T eI R

B @ 5 7 5 3 1 C% A98642' 0(&$" ) ' %# !

X ` dP B @ I

B @ 5 7 5 h% Agf3

But

   d

w

 d

Let

and

. Then

. Therefore or, equivalently, . This proves the rst part of the theorem.

where 0 and 1 denote the additive and multiplicative identity of

Vt"m5e

Proof: Let be the permutation dened by the permutation matrix is dened by


w y R

for

. Recall that

, respectively.

$(

a p a p

f }dP

w5 xt

on

such that if .

is dened relative to this ordering, then

wu t xWP

' ) ' %#

. Specically, the Properties 1 and 2 of Eq. 5.1.1 express the linearity of the convolution operator transformation , dened by is linear since it follows from Property 1 that and Property 2 that . The remaining ve properties provide the necessary tools for linear transform optimization and inversion.
{& y0lrk{zpe y l f fV{&z{ r q r Ve ${& kog& W k{

5.2 Fundamentals of Template Decomposition Template decomposition plays a fundamental role in image processing algorithm optimization. It provides a method for reducing the cost in computation and, therefore, increases the computational efciency of image processing algorithms. This goal can be achieved in two ways, either by reducing the number of arithmetic computations in an algorithm or by restructuring an algorithm so as to match the structure of a special image processing architecture optimally. Intuitively, the problem of template decomposition is that for a given template t, one needs to nd such that convolving an image a with t is equivalent to a sequence of smaller templates . In other words, t can be expressed the sequence of convolutions . in terms of the s as One of the reasons for template decomposition is that some current image processors can only handle very small templates efciently. For example, ERIMs Cytocomputer [17, 8], Martin Mariettas GAPP [2], and the National Bureau of Standards PIPE [14] cannot deal with templates of size larger than at each pipeline stage. Thus, a large template has to be decomposed into a sequence of or smaller templates before it can be effectively processed. A more important motivation for template decomposition is to speed up template operations. For large convolution masks, that is templates with large supports, the computation cost resulting from implementation can be prohibitive. However, in many instances, this cost can be signicantly reduced by decomposing the templates into a sequence of smaller templates. For instance, the linear convolution of an image with a template whose support is an square array at each point requires multiplications and additions in order to compute one new image pixel value; while the same convolution computed with a template whose support is a row, followed by a convolution with a template having support consisting of an column at each point, takes only multiplications and additions for each new pixel value (Example 4.10.4 illustrates this concept). This cost saving may still hold for mesh connected array processors, where the cost of a convolution is proportional to the size the templates support.
221

&

rgl w f f

f

f

d r Fevxf Ue2|f Ce d n q q q r f d evud Ue2hC& n q q q f pd U2pf a& r d n q q q q f pd f&2pf a& 6 r d n A q q q q r f d 6ivud 6i2peo& 6 n ~ q q q y l r f f&h}|f p{zC& y l n xw q q evu9f 6&tsf pog& r n 9m q q q j h f d k(iWg9e (( U m m

y y f r f y rf q q y y y y y y zf $8zf V8f $f i q q q q f f zg8xf

C& f

Suppose

is a eld,

, and

. Then

(5.1.1)

The problem of template decomposition has been investigated by several researchers. Ritter and Gader [16] presented some very efcient methods for decomposing FFT and general linear convolution templates. Wiejak and Buxton [20] proposed a method to decompose a 2-dimensional (or higher dimensional) Marr-Hildreth convolution operator into two one-dimensional convolutions. Zhuang and Haralick [22] gave an algorithm based on a tree search that can nd an optimal decomposition of an arbitrary morphological structuring element if such a decomposition exists. Wilson and Manseur [11] provided optimal decompositions of templates into templates, while Wei and Lucas [21, 9] gave methods for decomposing templates on hexagonal arrays. In this section we discuss necessary and sufcient conditions for decomposing separable rectangular templates. As mentioned in Section 5.1, properties 3 through 7 of Eq. 5.1.1 provide the necessary tools for linear transform optimization. They can be used when exploring the possibilities of computing template operations in different ways. For example, if is a eld, , and we know that , then by Property 4, we could apply r and s sequentially to a instead of computing directly since, in general, r and s have much smaller support than t. In practice, however, one usually does not know r and s for a given t. A programmer may start with a large template t i.e., a template with large support and is faced with the task of nding two smaller templates r and s such that . In many cases, the task of decomposing a template into smaller pieces may be very difcult if not impossible. Denition. A linear decomposition (or decomposition) of a template is a sequence such that . A weak linear decomposition (or weak decomposition) of t is a sequence of templates such that
k&4 9 h {Sx "x C &2| v{ &vvzvx z C F &gAxg

5.2.1

For example, if and has a weak decomposition according to properties 3 and 4 of Eq. 5.1.1, can be computed as
f 6 "

Thus, when computing one can compute the image and store it, then compute the image , and nally add b and c. In general, a linear decomposition of t is preferred to a weak linear decomposition because usually more time and space is involved in computing with weak decompositions. With the concept of template decomposition dened, we turn our attention to the decomposition of some commonly used templates. These templates belong to the class of shift-invariant templates with nite support. , and is a template In the subsequent discussion, we assume that is a eld, with nite support at some point . Since is nite, the following are well dened:
Ufg&Vhi{gph&fHa ph& p hi aC h& khi Az&hr|Hi Y C p zhe|V u AziprFgV& Yo&h zhe|H v 8h v Q {v& {x h h hh&

p h

Let

, and dene

222

Y|

Uz

p v z pz 6x p 6i

Hia

vuCe

, then

ph VAzi Fo h& kh&

z pz Q f

(5.2.1)

By denition, is an rectangular array and it is the smallest rectangular array containing . Figure 5.2.1 illustrates the concept of the smallest rectangular array containing the support of . As shown in this illustration, y need not be contained in .
U h&{h&fe ip Az&U

i ( y )min

i ( y )max

y1

Figure 5.2.1 The rectangular array containing . Here is represented by the shaded region. .

Part 2 of the denition says that and . In particular, it follows that if t is a shift-invariant template with nite support, then t is a rectangular template for
223

C A pi@

X S EW@

4.

S   TR

3.

C A DB@

8 I#

8 h#

X S abC

6 75

2.

  4

6 75

C A FH@

C S `g fC  6

X S a`@

 "G 

@ S ed c@  6

X S 9YC

0 # ( 3( ' % 2

C A $V@ 8Q#   4U" 6 C 7A 5 QP@ C A FE@

8 9#

6 75

1.

A template is said to have nite support if and only if is nite . A template t with nite support is called a rectangular template, or simply an template, if is of size . An template t is called strictly rectangular if and only if . An template t is called a row template whenever , and a column . If both and , then t is called a one-point template whenever template.

0 ( '% # ( 1)"&$

5.2.2

Denition. Let

j ( y )min

   

 " 

 !  "  ! 

j ( y )max

y2

some pair of integers m and n. Thus t can be represented by an matrix , where , and and are as dened in Eq. 5.2.1. The matrix T is called the weight matrix associated with t. Note that if t is a strictly rectangular template with weight matrix , then for and . dened earlier. In The weight matrix associated with t should not be confused with the matrix fact, two distinct templates can have identical weight matrices. For example, the matrix

is a weight matrix associate with the two shift-invariant templates s and t shown in Figure 5.2.2.

s =

3 1

t =

3 1

Figure 5.2.2 Two templates having identical weight matrix T.

, then

(5.2.2)

for and , provides for a one-to-one correspondence dened by between shiftinvariant templates and matrices dened this way. For example, the templates s and t dened in Figure 5.2.2 have template representations

respectively. The matrix T dened by Eq. 5.2.2 is called the centered weight matrix corresponding to t. In contrast to weight matrices, centered weight matrices provide for the location of the target pixel, which is always located at the center of the matrix. For this reason the target pixel of a template is often referred to as the center pixel. Among shift-invariant templates, rectangular templates are the simplest and most commonly used templates in image processing. A rst step in various template decomposition schemes of such templates
224

Qs4f i

It is clear that by choosing the smallest rectangular array of type with the property that the matrix

t r lHq

y x v """Bwu

x kRxw tg rrr g d v utsoavi 

h f3

s  s h

Rx i t r $sq 

qg rrr g d v utsoa)

e l 

x " } )q { d z

q pv Qd"y d

y v | `m

d i hkpGjx 2 Rx "hfefx 2 "x v y ig d x e e `  hf y x v o3Rn"hhm  l ~ e "h F Ujfe &79  "

is to decompose the template into the product of a row and a column template. In light of this, it is important to note that although every template whose corresponding centered weight matrix is a row or column matrix is a row or column template, respectively, the converse need not necessarily be true. The template shown in Figure 5.2.3 is a row template but its corresponding centered weight matrix is a matrix.

5.2.3

Ideally, to speed up the template operations, we would like to decompose an arbitrary rectangular template into two onedimensional templates, namely a row template and a column template. Thus, for a template, the number of arithmetic operations required for each template given strictly rectangular operation at each pixel location can be reduced from to . The next theorem provides necessary and sufcient conditions for the separability of strictly rectangular templates.

225

I&

To prove sufciency, suppose that Eq. (I) holds. Dene a column template s by

u o sfs b2

Proof: Suppose that t is separable and that , where r is a weights and s is a column template with weights of template products, for and

h sx s  sU U

utso

$ Q

uts

2RE

U " lw

e9F

4sfs

for all

and

7e2

5.2.4

Theorem. If

is a strictly rectangular template with associated weight matrix , then t is linearly separable if and only if (I)

fpag

"g

da

o2Rn"

ec

-1

Figure 5.2.3 Example of a row template. Denition. A template is called linearly separable, or simply separable, if it can be expressed as linear decomposition of a row template and a column template.

row template with . By denition . Therefore,

row template r and a

(i)

respectively. Thus,

and, therefore,

Note that condition (I) is equivalent to saying that the rank of T is 1. The theorem provides a straight forward method for testing and decomposing linearly separable templates. Since Eq. (I) is equivalent to , it takes multiplications and comparisons in order to check whether a rectangular template of size is separable or not. If it is separable, then one can easily construct the corresponding row and column templates by using Eqs. (i) and (ii). In many cases it is convenient to dene large invariant templates by a weight function w of two variables. For example, the function

when evaluated at the integers and , provides the weights of the template t shown in Figure 5.2.4. Note that if denotes the centered weight matrix corresponding to t, . In practice, weight functions are commonly restricted to rectangular domains centered then at the origin.

6 3 -6

2 1 -2

t =

2 -4

The separability of a shift-invariant template can be reduced to the separability of its associated weight function. The following result is obvious.

Note that this theorem is similar to Theorem 5.2.4 with the weight functions f and g specifying the row and column templates.

5.2.6

Examples:
226

P IC P EC R P IG EC v F!DB

x w us q w yvtrp

p U h R igf

5.2.5

Theorem. Suppose and is an invariant template with nite support and weight function w. Then is linearly separable if and only if for some valued functions f and g.

X Y I W E b W I E X Y U E X W IU E R P IG EC edQc@a`@V@TSQ4HFDB

Figure 5.2.4 The template t dened by

 "

9htsQ

and

 6 &   ' 7  3 !o 3 h 4  & ( & ( & 1 ' ! % '  & 2 '  )0  ' )& 

  !

 

RPh &U j

(ii)

# $

a

 

. Q.E.D.

  

 8 @9

 h 

(5.2.5)

 %

(i)

The template t with weight function w dened by Eq. 5.2.5 is separable since where and and column templates are given by
-2 r= -1 2 and

where . This template is also known as a Marr-Hildreth template. Clearly t is not separable but it still has a very efcient weak linear decomposition which is the sum of two separable templates, namely where is dened by for .

5.3 LU Decomposition of Templates The rank of a template t is dened as the rank of its corresponding weight matrix T. It is easy to show that every matrix T can be decomposed as a sum of at most n rank 1 matrices. Thus, if t template, then t can be expressed as is an . According to Theorem 5.2.4, each can in turn where is a rank 1 template for each be decomposed into a product of a row and column template, namely . Therefore, (5.3.2) This shows that every invariant template with nite support has an effective weak linear decomposition. However, the computational cost of replacing the convolution by the convolutions is in most cases still prohibitive. It is therefore desirable to reduce the number of terms appearing on the right-hand side of Eq. 5.3.2. One effective method for accomplishing this is the LU factorization technique of standard numerical linear algebra. For the remainder of this section L will always denote a lower triangular matrix and U an upper triangular matrix. A matrix T is said to have an LU factorization whenever T can be written as a matrix product . The next theorem provides a rst step in the reduction of the number of terms in Eq. 5.3.2.
227

42 ! Fv"cF !o!n S H S  F F 4v" S H v v cf@ "k0vS nv

(ii)

Consider the

vk o vo vT e c a V

y g h cxwvr j h g vd0ae d uSo!m } e| z c{u rp m g h lj h g e d tvsqo!nQe!Vki0af)i4!


. Thus, template t dened by

, where the corresponding row

)"

kH

@) H)0T

)${

~ 2 g  v e V ce

s =

-3

-2

-1

(5.3.1)

Proof: Suppose . For dene to be the matrix whose ith row is the ith row of U and whose remaining rows have zero entries. For let denote the zero matrix and for set Then

where

where e is of size ; i.e., any template whose weight matrix has an LU decomposition can be decomposed into a product of a row and a column template plus a template of smaller size.

5.3.2

Using centered weight matrices in the LU decomposition of a template t simplies the task of locating the support of the template in relation to the location of the target pixel since i.e, has form
c!  4 vxe 

k!2` kv c ! e edFc`c! Qc F $ ! c ek  w 7 4) H0

is at most of size

. In particular, if

Denition. A template is said to have an LU decomposition if its corresponding weight matrix has a LU decomposition.

em =

. . . en-m,1

. . .

. . .

en-m,n-m


228

e1,1

. . .

e1,n-m . . .

42! "@"  

e2

Thus, if the weight matrix T corresponding to the for any , we can write t as the sum

H$

where

and

template t has an LU factorization, then

 v x x )) H@i
with , then

f H f k f  ` n  4wnSv

H fS

H @) Hx 2 $

) )40 ) H"H 0)7vt S "@

5.3.1

Theorem. If matrices for

has an LU factorization, then for any each of rank at most 1 and a matrix such that

there exist

ce

Q.E.D.

(5.3.3)

(5.3.4)

This observation implies that Eqs. 5.3.3 and 5.3.4 are not as good as they seem at rst glance; even for templates with centered target pixels, the target pixel of will always be in the upper right hand corner and thus requiring, in general, a shift of data in order to map the template operation to a particular architecture or to achieve optimal computation speed.
q r Fsq

5.3.3

Example: Consider the

template

1 2 t = 3 2 1

1 3 4 3 1
t u t

The corresponding centered (as well as non-centered) weight matrix is given by


xy y

and an LU decomposition of T is given by


xy y xy y

229

xy

w i e kgjDv w i

xy

w e gfdDv w

For

E piFWge#dDbaYXWVUB @ h C f H c c c H ` H E & R H

2 5 7 5

3 4 3 1

0 (

G G E T9A'SAQ9I9FD7A397531)'%#! C R 4 @ P 6 H G E C B 4 @ 8 6 4 2 0 ( & $" w pv

where

for

1 2 3 2 1

w v

2 3 2 1

2 3 2 1

4 6 4 2

2 3 2 1

t =

2 1

1 2 t =
~

3 2 1

1 1

Although t is now a sum of products of row and column templates, it is not a sum of products or smaller templates which are better suited for the types of architectures mentioned in of Section 5.2. However, it is not difcult to show that

1 2
}

1 = 1 1 +

1 1 1

3
~

2 1

and
1 1 2 1 1 = 1 1

230

Thus, t can be written as a weak decomposition of

or smaller templates.

{ dy

z dy

Since each of the templates

and

is of rank 1, t can be decomposed further as

v w v t r p ud7usqol n m |

and Thus,

1 2 + 1 1 1 1 1 1 1 1 1

} 

1 + 1 1 1

There are two noteworthy observations regarding Example 5.3.3. First, since
1 1 1 + 1 1 1 + 1 1 + 1 1 1 =

1 1 1 + 1 1
x x

1 + 1 1
x

the template t can be expressed as


1


1 1 1
| d d

1 + 1 1

1 1 1

1 1 1
|

1 + 1 1

1 1 1

1 1 1

t =

1 1

As a second observation we note that the template t in Example 5.3.3 does not satisfy condition (I) . In fact, t is a rank 2 template and it is for this of Theorem 5.2.4 since, for example, reason that , where and are rank 1 templates. The relationship between the number of terms in the expansion of t and the rank of t is given by the following corollary of Theorem 5.3.1:
jA

5.3.5

231

d#D

where each for

is an

rank 1 matrix, has the property that , and is the zero matrix whenever .

F d%

gddQ

Theorem. If T is an ,
5d#D59

matrix of rank r and T has an LU factorization, then for any

Ud#Vdd9Ts

5.3.4

Theorem(OLeary). If is a template, then , where


i

template such that either and are templates.

has rank 1 or

is a diagonal

d3

d#'

Therefore, In particular, the templates; namely,

, where s and are templates and is as in the above example. rank 1 template in Example 5.3.3 is now expressed as a product of two . OLeary showed that this holds in general [14].

~ } } } }

D

fD

kjfDX D D

5.3.6

Example: Let t be the rank 3 template dened by

An LU decomposition for the corresponding weight matrix T is given by

and

Thus,

For

we have

t =

-3

t =

-3

-3

-3

-3

-2

-3

232

, where

-3 3 -2 1 2 -3 3 + -2 2 -3 3 2 -3 3 2 2 -2 -2 -2 + 1

or . Since is a rank 1 template, can be further decomposed into , where r and s are templates. Therefore, the convolution can be accomplished using only templates, namely
'9 d saQ 9 F sud d s  ddpkF

where

1 ,

1 s1 = 1

r1 = -1

, b 1

-a

-1
U

into the column and row templates


1

-1

1 + -1

1 + 1 1 a 1 + 1

233

template

-1

-1

-1

, and

. The templates and where obtained by rst decomposing the , whose pictorial representation is given by
1 1

-1

-1

1 r2 =

1 ,

-1

-1

-1

and then recombining these templates in the order

1 +

1 1 a 1 and s1 = 1 + 1
x

r1 = -1

A prime assumption in the LU decomposition of a template is that the weight matrix of the template has an LU decomposition. But given the weight matrix T of a template, how do we know whether or not T has an LU decomposition? A well known fact of matrix algebra is that every matrix T can be written as for some permutation matrix P. However, since a permutation matrix moves the template weights to different geometric locations, thus resulting in a different template, this fact is, in general, not directly applicable to the problem of template decomposition. Necessary conditions for the existence of an LU decomposition are given by the following theorem:

For a proof see [13] or [5].

5.4 Polynomial Factorization of Templates

The polynomial dened by Eq. 5.4.1 is called the weight polynomial of t. The weight polynomial should not be confused with the weight function dened in Section 5.2. However, just as for weight functions, the factorization of weight polynomials is equivalent to the decomposition of the corresponding templates. Since polynomial factorization results in polynomial factors of lower degree, the corresponding template decomposition results in template factors of smaller size. The following polynomial decomposition theorem was proved by Manseur and Wilson [11].
234

v " ! 

" d9 a `fee

and . The coefcients of matrix T shifted to the rst quadrant.

dene a matrix

"  YXW

d wX a 

v t r t r UAu As

(p

$p

" d 9 a ihgfb`

"Ade9cab` V T SR Q T U6P

Every template represented by a polynomial

with centered weight matrix in two variables, where

as dened by Eq. 5.2.2 can be

which corresponds to the

2 3 542

0 1

IHH F 9 C C C 9 @ 9 7 GDEEDBA862

( & $"  )'%#!

5.3.7

be of rank r and let denote the leading principal submatrix Theorem. Let is nonsingular for , then there exists a lower triangular matrix L and of T. If an upper triangular matrix U such that .

" d 9 a h`fb`

x y x  ( g $ % H !

  

~
v

(5.4.1)

} } } } i Ag l hf g d hBn bhb m |Dhn m hb m j  GId ogfb lf l f ~ ~ UBgfb`


But Thus,

i Ag l hf g d hn cBn m u m j GId u  lf l f ~ ~ d iAg l i Ag l i Ag l hf g m j d u l i m j u l f m j GId  l l f ~ ~ ~ ~ i Ag l Ahf i g lf m j d l f ~ ~ }

} } } d  d u } u xB m h b h |Dhn } nhb m } d  wbhn u |xhb m Ghn r

ogfbhEcBgfbxsh`fb`gcn t r q } } } Id  Ah u m U`fbht } kxhb hhb k1hb m `fnDq u } r B #Bn hb#


and

} W Do m

m i l i 1Aj g l e

g l hf g l f { G j 1d  l f ~ ~ ihgf)y

Uhgc){
and

i Ag l Asf i g l f y }  j } d  l f ~ ~ i Ag l Ghf i g l f t }  j } Id  l f ~ ~

lf v l f lf q l f

iAg l Ahf i g } } ~ ~ iGg l Ghf i g } } ~ ~

ogfbDv

U`fbht

pogcnDq
where

{ u y r v u t r q Dogcn)|ch`fb)zshgcxwc`fbhEs`fnDpogcne
u, v, p, q, and r such that

5.4.1

m i j g l i gd l f 1AkAhf e e l f

Theorem. If

, and

Bcb`

B

Proof: If

|hb m

polynomials

and

with

, then by the Fundamental Theorem of Algebra, there exists

, and such that

} } Do hb m hb m h m r
with

} m Dwo

l l p m Do

5hb

Similarly, if

m i 1Aj g l

Dene

and

Multiplying u and v, we obtain

, and such that

, then there exists polynomials

235

} kxh m u  sogfee u chb m nsogfeeUhgcn

, then there exists ve polynomials

(i) , .

 k |

, each template can in . Thus, t can be written as a

fEEx n | | |6

H AGEcBG)

`fb chgf)Esh`fDcogfbhEcBgfbx

ogcnYkcogfbhEcBgfbxUh`fb

G k

GIogfb h`f
it can be ascertained that is of form

i D GIUogfeY hecnY
is of form

A G

If

which means that

, then c can be decomposed as

ogfb)Es`fbxsh`fbUhgc bxb cxb 8h`f) oG8hgfD A Dn Gxh G |H 1 x E6x


, then d can be decomposed as , , where , and

Again, by multiplying

Similarly, if

. Let

by

and noting that

h`fb

GI| G hI`fb ogfb) `fnD

where u, v, p, q, and r are of size at most achievable for certain templates.

It follows from OLearys theorem (Theorem 5.3.4) that for turn be decomposed into a product of two templates weak decomposition of templates

Obviously, Theorem 5.4.1 provides for a better result; the number of actually half of the number indicated by the rank method, namely

kH Do

|xbh

Let t be an arbitrary of ve rank 1 templates

It now follows from Eqs. (i) and (ii) that

template. According to Eq. 5.3.1, t can be decomposed into a sum

. Example 5.6.18(iv) shows that this result is the best

236

can be written as

templates needed is , where Q.E.D. (ii) .

(5.4.3)

xb#

The methods of Theorem 5.4.1 can be applied several times in order to decompose templates of size larger than into sums and products of templates. For example, if t is a template, then t can be decomposed as

where each and is a template. In actual applications, further savings can be achieved by noting appears in every decomposition. that in the proof of Theorem 5.4.1, the polynomial Thus, the distributive law can be used to further reduce the operation count in templates of size or larger.

5.5 The Manseur-Wilson Theorem The decomposition methods presented in the next section are based on a remarkable theorem rst proven by Z. Manseur and D. Wilson [11]. While the statement of this theorem is somewhat lengthy, the key idea (as noted by Manseur and Wilson) is as follows: If the roots of the four boundary polynomials (Eq. (I) of Theorem 5.5.1) of a template can be rearranged so that they match, then the template can be decomposed into a sum and product of three smaller templates.

5.5.1

Theorem (Manseur and Wilson).

Suppose

is a polynomial such that

(II)

237

E U

and let denote the roots of , denote the roots of denote the roots of , and let denote the roots of . If there exists an ordering of the roots such that

   G

E U

h

x

P P

I B

E QH P I

I H 8 ER

E V

V S S  

D

Uhb

   A

I P QH P PI R

h

E V

   G

I H Q# ER

ixb

Uhb

U U T T

D#

, and

are all nonzero. Dene

3 2 0 ' % $ &)!@9&1 k

I I H QH P 8 D EG G Fogce P P

" 8 | 1

h`fb

7 6 4 32 0 ' %$ )5&)1)(&! 6

" # ! h

V V S S

   D

where of form

is a

template and, for

, the templates

and

are products

where each , and is a template. By factoring the polynomials in the proof of Theorem 5.4.1 into the product of quadratics, a general can always be decomposed into a sum

and template t

x

Y b Y b xbghhb

#|c |4Enkx |zbx k4EbcE k |Yb G G f |

    ABG

A B

k6

A &

I (I

(I)

a W X W a c X c e a W e X a cX Y`bfefez9YfYW edec

o ```q q y y y a q X

fs x j s tefec c y y y a c X g ~ g f s x j s y a i X i i y y ~ j s x dj s j W y y y a W X dxY`YW g ~
By substituting appropriate roots in the above equations, one obtains the relations

xywe s pda c X e a e X c } g h y w c f s c y y e y y c c } a nh ~ pa ~ v f u { s xe j s e f s eX s we e y y y x v s g xe iy w i f s y y e y y y s p a i X z9 a e X i i e i } g } a n  ~ a ~ { Qfs x j s eQfs x Xs xwe v fe s e y y y s g exye yy w W y y pra W X ez a We X W W p j g s W y } } a n  ~ fa ~ j { | j s x (j s z j s xyX j s xwe v j m s e e y y y v s g u s tfe t( s u
Factor , and as follows:

Conversely, if , where p, q, and r are dened as above, then there exists an ordering of the roots as described in Eqs. (II) and (III).

e y r br rbr q pr 9 g

k h

g mr

k h k lh

j Qi a gk

j pi a hg

k h

e y r d 9 br p dr g r d 9 (ef p u t vs


then there exists polynomials , and such that

q y y y w q i y y y w i g c y y y w c W y y y w ffQQexW

a q X q a i X i g a c X ca W X ```rpfphefedb`YW
or such that

where

j Qi Qi j gk hg k a n a n lh h

g fr 9p

and

X i X i g gk h g dr k X n X n &h  h

Proof:

and

exe v y``e `fyq } j g o fqeyyywfq y y y a q e X s } a q X q a n h ~ a ~ { j j s x dj s e j s x j s e v j u X e y y y s g

and

g j s x (j s j

Now let

238

~ pa

a c X c g X fefem s

(viii) (vii) (III) (iii) (vi) (iv) (ii) (v) (i)

According to Eq. 5.4.3, any template can be decomposed into a weak decomposition of ve templates. However, given a template t which satises the hypothesis of Theorem 5.5.1, then t has a weak decomposition of only three templates

` ` rx9

erx  h r dx9 r pdx9drx9

y e

( r

q9 q9y q  f   f h Qp@( e)rmq9 `` fp 9


. Next let .

` fv

e`he epr

xxf

Substituting Eq. (vi) into (iv) shows that

fpdp9

)zff
and

and

Substituting Eq. (vii) into Eq. (iii) shows that

Using a similar argument it can be ascertained that Eqs. (ii) and (iii) can be written as products and , respectively.

p` p

The polynomial the coefcient of in , and

In order to dene the polynomial , set equal to the coefcient of in , the coefcient of in , the coefcient of in , the coefcient of , and set all other coefcients equal to zero.

f q9

is now dened by dening to be the coefcient of in , in , to the coefcient of in , the coefcient of .

e q

By dening that the only indices for which the coefcients and . That is,

To prove the converse, observe that if , where is as in Eq. (ix), then Eqs. (i)(iv) can again be used to show that either and or .

erx

r erx9

r(

8 y dr h

239

it follows from the conditions on the roots of are possibly nonzero, occur when can be written as

Q.E.D. and (ix) in

  e 5  e

rx9

f e

q9

e 9y

p`

9y

5.6 Polynomial Decomposition of Special Types of Templates For many templates, the conditions listed in the hypothesis of the Manseur-Wilson Theorem (Theorem 5.5.1) are often difcult to establish. First the roots of the boundary polynomials , and have to be determined and then their ordered products (Eqs. (II) and (III) of Theorem 5.5.1) must be computed. Once this has been accomplished, the polynomials (templates) and have to be constructed as in the proof of Theorem 5.5.1. Some of these tasks can be simplied by using commercially available computer algebra software tools. However, there is a large class of commonly used templates whose weak decomposition can be ascertained by simple inspection. These templates exhibit specic symmetric properties. We begin our discussion by considering properties of symmetric and skew symmetric column templates. The treatment of symmetric and skew symmetric row templates is identical.

5.6.1

Denition. A polynomial respect to n whenever for corresponding weight polynomial is symmetric.

is said to be symmetric with . A row template is symmetric if its

According to Eq. 5.4.1, the weight polynomial corresponding to a column template t is of form

Hence our interest will be focused on polynomials that are symmetric with respect to an even integer . Another important observation is that Denition 5.6.1 makes no provision for to be of degree satises the symmetric property with respect n. For example, the polynomial since . This also shows that although n is even, the degree to of need not be even. Closely associated with the concept of symmetry is the concept of skew symmetry.

5.6.2

Denition. A polynomial is said to be skew symmetric with respect to n whenever for . A column template is called skew symmetric if and only if its corresponding weight polynomial is skew symmetric.

240

q9q

Similarly, if

is skew symmetric with respect to n, then . Therefore, for both symmetric and skew symmetric polynomials. This proves the following theorem.

 f p

(pm q

w     

(p

q9q

Suppose

. If

is symmetric with respect to n, then

rx9

q9prr9e q9q

rxfdxp

Qe  x ``pq9p

pve b Yw  fqp

e) pq9p  wtqq

mq(

q9p

fp

q9

(5.6.1)

5.6.3

Theorem. If is a polynomial satisfying the symmetric or skew symmetric property with respect to n, then a nonzero number is a root of if and only if is a root of .

Suppose . Since , satises the symmetric condition with respect to . The polynomial can be factored as , where . The factor has degree , and leading coefcient equal to the leading coefcient of . In addition, is of degree and is also symmetric with respect to . More generally, the following result holds:

5.6.4

Note that this theorem is true for both even and odd integers n.
241

f & ~}nr   %0V z t p Y& t y y & ut y 8 y & t ed y y & lt lf   % f & ~}|{r   %0V z l & l Qt rpABt y)& y ed & y y y ut y y & t y & st 8 y & t d 8x y & t ed y EWtl     rr2#E8E4ABv $" t xd uttl cAsr www ! @ & y y & f &  l 3 DDD 3 l l &   p qtpo#nm a i3 AX%0V f k   %0V          3 DDD ' gf#j3 1  1 xdy y i a edy y `iYI 0V 3 3!h &    y 4%0 V  &  y 3 D D a ed y y &   #gfD a xd  v3  '% @ )& y y f & y   % y y y & 0E0 A& 8 & y      g## a gQ0AXF y 3DDD 3 y 3y &   f g f Tg      0V % fS & y dbg   y &   2 0WVA'%   F     e f   p vBx%wWqh e f    p vItFuWqh   %0V   F 1 8( 1 dc b`YX 0V t srqigbce    ph f S &   3 a6 3 ! &     1( &  %0WV70A'%     U & )TS   R D@ 3P D@ 39( 36 31( 3 D@ 3@ &  % 0FICQFICH4052450205GFECBA'% 9( 36 31( &  8575420)' 
is a polynomial of degree k and Theorem. If respect to n, then where Proof: Let . If is skew symmetric, then . If is symmetric, then . Thus, in either case . Therefore, where and we use the plus sign if is symmetric and the minus sign if In either case, is of degree . , where and Let If for is symmetric, then Therefore, is symmetric with respect to is skew symmetric, then . Similarly, if Hence is skew symmetric with respect to .

satises the symmetric property with

, denotes the leading coefcient of , and is a polynomial of degree which satises the symmetric (skew symmetric) property with respect to .

is skew symmetric.

  %

" $#!

   

  

Q.E.D.

5.6.5

Theorem. Suppose is a polynomial which satises the symmetric property with respect to an even integer n. If the degree of is k and , then

where

Proof: By Theorem 5.6.4, , where . If k is even, then is even since is even. If k is odd, then j is odd and, hence, is even. Thus, in either case, is divisible by 2. , then set and the result follows. If Now if from the Fundamental Theorem of Algebra and Theorem 5.6.3 that , then it follows can be factored as

where

In contrast to Theorem 5.6.4, the requirement for n to be even is necessary. For example, if , then is of even degree but symmetric with respect to the odd integer . In this case we have , where is of odd degree and can, therefore, not be factored into a sequence of quadratic polynomials. Another observation is that in contrast to Theorem 5.6.4, Theorem 5.6.5 does not hold for skew is skew symmetric with respect to , but symmetric polynomials. The polynomial for any number b. In fact, the polynomial is a common factor of any polynomial which is skew symmetric with respect to an even integer.

5.6.6
(i)

Examples: According to Eq. 5.4.1, the weight polynomial corresponding to a row template t is of form

If one allows for complex roots, then it follows from the Fundamental Theorem of Algebra that t has an exact factorization , where p and q are of size at most since , where

f 'fm ts y v # d r g xs } tu dgI x i}Fx#B }Fx#Bkg%bI 0 %0  F0b X%r AiI iC vC|T F0 mF
.
242

v` I Fr Iq Eii A C 4% xt y #Q# Fr#AX% vT~ % % i %0Fy8 e x '4%0 4F d C e IQ%

Q.E.D.

A F %0 0G  k  0 % Q0 2 Q 48A'  4 0G4F}4%

I.

II.

For example, the row template

has weight polynomial

Thus,
t = 1 p1 1 + 1

However, it is more convenient to represent diagonal templates in terms of polynomials of one variable, namely

where

It follows from (i) above that such templates can always be factored exactly into two diagonal templates of smaller size (see also OLearys Theorem (5.3.4)). For instance, a diagonal template will have decomposition of form
d1 d2 p1

q1

d=

d3

p2

q2

d4

p3

q3

d5

243

X7 sIf%4 0 x

(ii)

If d is a diagonal template, then the weight polynomial of d is of form

d b2 g 7 xQ 8 dq#dx dc2~xn4 x 8v8vgnQ 7 w'%4

t =

which factors as

q1

E W A ! E A E ' 1 } v |U XS Dc vU  U ! E uWU ' U } W |'  U gW g XS Pcg' #i~"`  )g{4g' f XgnGl' WS'  E WS'  B k5!Gq1fP(f1g5pz` XxwmU  U m!  uWU ' t r 3 f  y v A ' s 1 f )gDpqd))iqFD&! WS' !  E WSA !  EA  E' 1  )S Dp S i B  B ! W ' ! A ! A '
and . for some

S S 6eP(nj E C B  A C HHH C A A W '  f S XS C d)S XS 6 )S  )S ! o )S 6h(PH E W W ' C W W ' W ' C HH H(PHnd f ml6C    kg6j&&i H C f ' ! E' ' ! B' C E' ! B' !   ' ! ' ' ! H S W)S 'ChH((HdC"fg E 'C  B 'eC  XS )S xP(d!  G E ! B  W W ' ! HHH % W W S' H H H C E' C B' % # !     ( )S  )gFP(&&6g P6wQ  )'
.

#$!G  0   #  V B wyuU B wvuU b "p U A ! UA  t t h vuU Bh wyuU B whvuU U )A C )A U U x)A  # srq h t ht h t bpih)A XDVi)A hA !  h 91 fff 1# 1 b  g2P(Xedca` YX)DV)A UWSA !  U S A C HHH C E A C B A   95  )873 S TTRQ(PIG&F$D)@
is a polynomial which is symmetric with respect to

1  ' %# !    20)(&$" 


5.6.7
is a polynomial which satises the skew symmetric property with respect to Theorem. If an even integer n, then

 

We turn our attention to the decomposition of skew symmetric row or column templates.

where

5 ! 643

 )'

Proof:

Let

and

. Since is skew symmetric, , . Therefore,

 

Thus,

An analogous argument shows that . Hence

for

is a root of

and

. Also, since

. Therefore, is a common factor of

has a common linear factor

has a common linear factor and can be written as

 0

0  

5 ! 3  XS  Xg(PIG(&$g@)' W W S' C HHH C E' C B'   1w)'P&#$!"  %    #  # C  # ! !  0r6 # C b  # ! V

We now proceed inductively. Assume that

Thus, we have

Therefore,

Note that

where with respect to

244

. It remains to be shown that

. Since . is symmetric

l

i  wl 7 s)

P e  0
is l,

)

we have that

v 2)g  d) v 2 X v Xg v 2)g v 2 XP g v 2)  v 2 X g v X " yv 2) P g y TXqevg

Therefore

since, by induction,

is symmetric with respect to

5.6.8

Combining the preceding three theorems, we obtain

Theorem. If is a polynomial of degree k satisfying the skew symmetric property with respect to an even positive integer n, then there exists an integer j such that

0) ) 0 T ) T  " P(e  e ix V0g m i  00g  &g(Pq0P&& $ TTs


denotes the leading coefcient of , , and is of form

where

Since n is even, order to obtain

Proof: Let k denote the degree of . Then according to Theorem 5.6.4, , where , denotes the leading coefcient of , and is a polynomial of which satises the skew symmetric property with respect to . degree

where

is a polynomial of degree which is symmetric with respect to . Since l is even, Theorem 5.6.5 can be applied to . Since the degree

of

 &g((q0P&g 7 Y(Tp l 7  (Tps $ V0g 2 &g(PkP&0g 0P

where the leading coefcient

is even. Thus, we can apply the results of Theorem 5.6.7 to

for . However, according to the proof of Theorem 5.6.4, . Therefore,

245

Q.E.D. Q.E.D. in

According to Theorem 5.6.5, any symmetric column template whose weight polynomial is given by Eq. 5.6.1 can be decomposed into a product of at most templates

where s denotes the one-point template dened by

and

is of form

where

Similarly, if t is skew symmetric, then according to Theorem 5.6.8, t is the product of at most templates

where s and

are as above and

There are certain polynomials which are almost skew symmetric and can be decomposed using the decomposition method for skew symmetric polynomials.
246

vqT&vm P( (mQ (mc 4

(P m m 6

7G

g4 g40 P(e)pa

for

. In particular, the convolution convolutions using only templates:

z uTlyX P( ( ( p (w
1 r = -1

(5.6.4)

$7  $ v V l
1 ti =

bi 1

can be achieved in terms of at most

(5.6.5)

5.6.9

is said to be skew symmetric Denition. A polynomial with respect to its pivot coefcient if for . A column template is skew symmetric with respect to its target point if its corresponding weight polynomial is skew symmetric with respect to its pivot coefcient.
!

where is skew symmetric with respect to and . Thus, can be decomposed using the methods of Theorem 5.6.8. Therefore, if t is a column template which is skew symmetric with respect to its target point, then , where u is the one point template
 5FI %   ')phi V x Qce  x Qe % 1 H 1T y v  s  Qutrq  FG

and v is the composition of at most templates given by Eq. 5.6.5. The convolution convolutions using only templates: therefore, be accomplished in terms of at most
C ed e B f 7g ! q $$I$q  " " "    " " "  a$$S2q  e C  ! T  !

Having laid the foundation for the decomposition of symmetric and skew symmetric row and column templates, we now extend these ideas to two-dimensional templates. Denition. A polynomial of form
H B D D D B C B @  GuF$1g`9 t n t0   Gr q t p n 0 `a5` 0 n t ) 0 t 0 p

5.6.10

for

, is called symmetric (respectively skew symmetric) with respect to .


H B D D D B C B @  8uF$g)u`wv9

A template t is said to be symmetric (respectively skew symmetric) with respect to y if its corresponding weight polynomial is symmetric (respectively skew symmetric) with respect to y.

A similar denition can be given for the variable x. However, one can always restrict the decomposition methodology to the y variable by simply transposing a template which is symmetric or skew symmetric with respect to x and then taking the transposes of the resulting smaller templates which are symmetric or skew symmetric with respect to y.
n B !  n B   n B `xaFG2$`gaFGeyx n B `xa

5.6.11 Theorem. If
n B  `xaFI

247

n B ! g5FI

n 0 `&8

y if

is symmetric (respectively skew symmetric) with respect to n for all

is any polynomial of two variables, then , where is symmetric with respect to y and is skew symmetric with respect to y.

 n 0 o`&8

 q G0

%p

 rq t  q IsG0

%p

 n B o`g5

" %   )m)lUf

" j   1kih

where

and

, where

q 

B i    I5cIch

 x w baIv

(! cgF$f %   " " "

! ed  c  Qba     

If , then

is skew symmetric with respect to its pivot coefcient

 6 !  3 V  `YXWP

For example, the polynomial is not skew symmetric since is skew symmetric with respect to its pivot coefcient .
  C 3 T Q)U % 5!  SR5 !

CQ3PHIBGD$DFDEB1CB8@A29 0 6 % !  3  0 875'421 % ) %!   " " " '&$$#   !        !

% (!

, but

5 % )

can,

The theorem implies that any template t whose weight polynomial is given by Eq. 5.4.1 can be decomposed into a sum , where is symmetric and is skew symmetric.
 ~ `a{ z | G  ~ } | `x{ z G  ~ `a{ z |  ~ } | `x{ z I}G$$g})g}8p  ~ `5{ z ~ 2 ) h ~ 2 1 ~ 2 } ~ G | x$Fi  ~ } | { ~ | IIcG7`xz

Proof:

Suppose

. If one rewrites

 ~ } | { xz

It follows from the denition of these two polynomials that to n and that is skew symmetric with respect to n for all the polynomial

 ~ `{

EG

h`{ ~

FU

~ 2

EG

 ~ b`5{ z

}  ~ ``{ EG 1 | ~ 2  1

z |

`{ z  ~ | G |  G G |  ~ |

~ uG

G ~ G|

G ~  |

then it is easy to see that each term

I ~

 ~ } | { xz

Obviously,

is symmetric with respect to y.

is symmetric with respect to y and the polynomial

where

248
pk

. can be decomposed as as is symmetric with resect . Therefore,

Q.E.D.
 ~ } | { z  ~ } | yxtk`xa{

 ~ } | x{ z

5.6.12 Example: Let t be the template dened by

1 2

6 7 8 9 10

11 12 13 14 15

16 17 18 19 20

t =

3 4

Using the equations

11 12

11 12 13 14 15

11 12 13 14 15

11 12 13 14 15

11 12

-10 -10 and

-5 -5 -5 -5 -5

t1 =

13 14 15

13 14 15

t2 =

-10 -10 -10

$Q2$

with

.
249

to compute the coefcients of the templates

and

, respectively, we obtain

7 F

EG

'

and let

represent the weight polynomial of t.

21 22 23 24 25

uG I

5 5 5 5 5

10 10 10 10 10

r=

-1

-1/2

1/2

and

r1 =

-1

and

r2 =

1/2

The template s on the other hand is symmetric, with corresponding weight polynomial given by . Applying Theorem 5.6.5, one obtains

satises this equation. It follows that


1 s1 = b1 1 and

-1 u+ v = b1 -1

1 b1 1 +

1/2 b2 /2 1/2

250

b2

b2

1 0

c d b

G 1

Thus, a product of two

. By dening templates; namely

and , where

C 1 9 2 QBPR F D

s2 =

b2

, one may write

% % & 2 $

Since and

, it is not difcult to ascertain that , where

"  !

f `)

respectively. The row template r is skew symmetric with corresponding weight polynomial given by . According to Theorem 5.6.8, . Obviously, Hence, r can be factored into the product , where and are dened by
$s g &IFs &f`) mk k1#71)t7)

 s  &k &Fmv FFmh

G YR XW8V2 1 0 C H7 6 4 D C A 9 2 QBPIH F D

('

% " ! $ #  Rd  ak a

Fp1FpG1$p7`1$p7`1SW

S T US C EA EB9 3B@8530 C 1 C A 97 6 4 2 1 F D D F D

'

m c $

The template into the product

in the above example is skew symmetric with respect to y and can be decomposed , where r and s are the row and column templates given by
10 10 s = 10 10 10

as

The reason for the easy decomposition of into the product of two templates is that is not only skew symmetric with respect to y, but also symmetric with respect to x. In contrast, the template in Example 5.6.12 is symmetric with respect to y but has no symmetry property with respect to x. Hence, decomposing into a product of a row and column template , where
11 12 r= 1 1 1 1 1 and

s =

13 14 15

then r is necessarily symmetric with respect to y, while s has no symmetry property with respect to x. Although r can be decomposed into two row templates by use of Theorem 5.6.5 (see also Example 5.6.6 for a decomposition of this template), we have not explored methods for decomposing the nonsymmetric column template s into two column templates. Thus the question arises as to whether or not can be decomposed into a product of templates. The next theorem answers this question.

5.6.13

Proof: Since is either symmetric or skew symmetric with respect to y, it follows that and . Using the notation employed in the Manseur-Wilson Theorem, the boundary polynomial is either symmetric or skew symmetric, depending upon whether is symmetric or skew symmetric, respectively. In either case, according to Theorem 5.6.3, each root of can be paired with its reciprocal and we can choose and such that

251

x P e

~ ~ ~

x BP u

r@

Similarly, since

is symmetric or skew symmetric, we can choose

and

such that (ii)

p u g

r u

p g

~ ~ ~

x BP u

q m ~ k 8lpot8lowWs}slW

such that

f x y tloq f q x f v v e d  f  d d  f  d |z{g f m x f k x y twWom f f v v v v u e u u u m 8lpon$8lhk

rW@oq

@ g ji e g wWW

r g

trl@sk

Theorem. If

is symmetric or skew symmetric with respect to y and , and of form

, then there exist polynomials

f e

u t r q sPse w v

g h pig

y Isx

y 3

f e

g d d h f  f f e

x y p

q e

j i e d g

g j i i Ppd d

rWW

q e

(i)

 s    l r

The polynomial , where , and , is called the upper left-hand corner polynomial of t. Upper right-hand corner and lower corner polynomials are dened in a

y p

wWo 8lo 8lp 8l W wWo   3 o  r   o  3 8lo ro ro o  l@ o  rl@o  


Let

  ro 

rl@o

8l
where

8lpowWo 8lp rlp p 


, , such that , and

wWo rlpolwWp U Q     8lW


Theorem. If , and

template dened in Example 5.6.12 can be decomposed into The theorem shows that the a weak sum of at most three templates. The proof of the next theorem provides a simple method for decomposing rectangular templates that exhibit symmetry at their corners.

 I

88{

$  {

$W$hE
But (iii) and (iv) imply

8
. Therefore,

$ 

Ww
Also, since

s@ h@

r @l

r8

BWhQ
Combining (i) and (ii), we obtain

5.6.14

Thus, the conditions of the Manseur-Wilson Theorem are satised and the result follows. Q.E.D.

is symmetric or skew symmetric,

has the property that

and

Proof:

Dening

by

252

s@

and

provides for the desired conclusion. Q.E.D. , then there exist polynomials and (iii) (iv)

likewise fashion. Thus, if all corner polynomials of a template t are symmetric and their pivot coefcients are zero, then t can be decomposed into a weak decomposition of three smaller templates p, q, and r, where p is given by
1

and the templates q and r can be constructed using the description given in the proof of the theorem. in the values of the templates p and q provides methods that are Introducing sign changes analogous to those given in the proof Theorem 5.6.14 for decomposing templates whose boundary and corner polynomials satisfy various symmetry conditions different from those given in the hypothesis of the theorem.

satises the following conditions:

4.

where

and

Dening

by

provides for the desired conclusion.

253

y  ry  

wWo8lph 8l WwWo 8lo y  y y 3  r  3 8lo

sl@h

Proof:

Let

and

 

8lpowWo8lphtrlp

rl@o

wlpo

8loX$8lh

then there exist polynomials

o53 hhI

trl@o

 

8lh

1. 2. 3.

and for and for the upper left-hand corner and lower right-hand corner polynomials are skew symmetric the upper right-hand corner and lower left-hand corner polynomials are symmetric,

, and

such that

Theorem. If

has the property that

r W

5.6.15

3W U rWW

p=

1 1

and

`DCB@ GE! ! q "p t yV 1 E d p p

G E! @ S G E! g G E! @ H`DBaHDCB@ DBA9 G ! g G ! @ 9 P G E! @  G E! @ G E! @ EDCB@ Y EDCBHDCB`$B `DCB Y V S ggg S V Vp i S gg S V d  B B ii p  eS$g7g&B b S q 1 E V p  B V 61  w$7&g fE V p  B  eS V V p  B  b P tp  v1 xd p  w$7&g S V 61 E V vu1hS V 61 )61 sP XV 61 E d 61 X hD&7g fE eS ` cb a`DCB@ Y p B t p E B r q p p i S gg S d  GE! EV B S VEB S E P B P  G ! @ X'WR)UTRQIHFEDCBA9 8!%%% !# !  )'&7$6$" 54 (!%%% !# !  )'&&$$"    0 321      0   
1. 2. 3. 4. and dening then setting by . ,

This reects the appropriate corner symmetries of t. It should also be apparent how other corner symmetries and boundary conditions could be utilized in order to obtain analogous decomposition schemes. For instance, if the corners of t are all zero and the following conditions are satised

5.6.16 Example: If t is dened by

Note that according to the above proof, the template p is given by

and for and for the upper left-hand corner and lower right-hand corner polynomials are symmetric the upper right-hand corner and lower left-hand corner polynomials are skew symmetric,

then the corner polynomials of t are symmetric. According to the proof of Theorem 5.6.14,

h wfh ep '6hp efhp he{j f p f| hf| h p h| f p f| p y xf v f| k H6w|p q h q 6wp q cftp q h wp q '6~|tp q h}6e{zylj f hf k h p h| p k xf q v H&nwmWp s h q x`hp q Xx6cmts p q xq h q &uuq ep q x'&Cuq cmtpq usq &urex5`x6w`cmlDCfd f q u m f o u k s f r m s hq f q k h n m spq h q n m p o n k j i h g e
1 2 1

t =

p=

254

4 3 2 -1

2 2 1 3 -1

results in the decomposition

1 2 1

Q.E.D.

Hence, q is given by
1 q=

1 2 1

and

by
1 1 p+q= 2 1 4 2 2 8 2 1 4 2 1

2 4 1

4 1

Since

, we have
-2 1 -4 1 -2 1 -2

r=

1 -2

and

In the above example, the template t is symmetric with respect to both x and y. In addition, the centered weight matrix corresponding to t is a symmetric matrix. It may therefore not be surprising that the template factors p, q, and r exhibit the same symmetric properties. Thus, it is natural to ask whether or not this phenomenon is true in general. The next theorem answers this question in the afrmative.

5.6.17

Theorem. If

y and if the matrix and such that

is symmetric, then there exist polynomials

255

H`Dh`DA

)`$h$DC7`$AeH`$u H H`$ ' )2 "uDCx

satises the symmetric property with respect to both x and ,

e hh h

2 2

2 1

where

and

Proof: If , then by symmetry and the result follows from Theorem 5.6.13. The symmetry of the polynomial follows from the fact that the polynomials , and dened in the proofs of either Theorem 5.6.13 or the Manseur-Wilson Theorem all have, in this case, the same coefcients and, therefore, the same decomposition. If , then again by symmetry we have that . The result now follows from Theorem 5.6.14 and the denitions of , and in the proof of 5.6.14. Q.E.D.

In contrast to Eq. 5.4.3, the number of templates needed to decompose a template is at most 3 if the template satises the symmetric conditions of Theorems 5.6.13, 5.6.14, or 5.6.17. In general, the number of templates needed to decompose a template exhibiting the symmetry conditions described in Theorem 5.6.17 is at most .

5.6.18 Examples:
(i) The Laplace template
-1

satises the conditions of Theorem 5.6.14 and can, therefore, be decomposed as


1 1 1 1 + -1 -1 -1 -1 + 2 8 2 2

7 ` ` ` C C xH xH u C C ) 6H` ' ' ' A 6 v H` aHu CA s s


l = -1 4 -1
256

W TuD I6 WT6C


-1

This represents the decomposition into templates that exhibit the same symmetric behavior as l. A simpler decomposition of l into diagonal templates is given by

-1 + -1 +

This shows that the theorems discussed in this chapter need not provide the most efcient decompositions. (ii) The template

-13 2 h= 7

2 17 22 17 2

7 22 27

2 17 22 17

-13 2

2 -13

22 7

2 -13

used by Haralick [6] satises the hypothesis of Theorem 5.6.17. Adopting the construction used in the proof of the Manseur-Wilson Theorem, results in the following decomposition of h:

-13

-19.73

-13

-1.672

-19.73 -28.943 -19.73

-1.672 1.5411 -1.672

-13

-19.73

-13

-1.672

257

8.39

(iii)

The template

is symmetric with respect to y, but does not satisfy the hypothesis of either the Manseur-Wilson Theorem or the hypotheses of Theorems 5.6.13, 5.6.14, or 5.6.17. It can be shown that t cannot be decomposed as , where each p, q, and r is of size at most [10]. However, using LU factorization, t can still be decomposed as a weak decomposition of four templates. (iv) Similar to example (iii), the template

2 1 1 1 1

t = 1

1 1

is symmetric with respect to y, but does not satisfy the hypothesis of either the Manseur-Wilson Theorem or the hypotheses of Theorems 5.6.13, 5.6.14, or 5.6.17. Z. Manseur has shown that t cannot be decomposed as such that each is of size at most [10]. Of course, employing the constructive method used in the proof of Theorem 5.4.1, t can be decomposed into a weak sum such that each and r are templates.
258

a X XUa7& f& 7& }&7& f&

h

h h

t = 1 1

5.7 Decomposition of Variant Templates In this section we shall be concerned with decomposition techniques for variant templates that are analogous to the techniques discussed in the preceding sections. We shall restrict our discussion to rectangular templates. variant templates can be specied by a family of matrices Rectangular , where , , and and are dened by Eq. 5.2.1. The matrix is called the weight matrix associated with t at y. Whenever y is understood, we simply write T for and for . In analogy with centered weight matrices associated with invariant templates, we also dene the notion centered weight matrices for rectangular variant templates. In particular, if t is a rectangular template and m and n are positive integers such that is the smallest rectangular array containing , then the centered weight matrix associated with t at is dened as , where , and . Note

is the that since t is a rectangular template, the array smallest rectangular array which is centered at and contains . and t is variant, then r and s cannot both be invariant. However, it is often Obviously, if possible to decompose t into a pair of non-trivial smaller templates such that one of the factors is an invariant template. Thus, again, the transform computation can be optimized and templates can be tailored to t particular architectures. Having one factor invariant can further enhance the speed of computation. As a rst example, we decompose an arbitrary template.

5.7.1

Theorem. If t is a

template, then there exist templates

, such that

where templates.

and

are invariant

templates, and

and

are variant

Dene the three invariant


1

templates

t1 = 1

, t3 = 1

, and t 5 =

259

Aq A 6  o S Ay pp r yr    yr p rp    pp r 6   

Proof: The centered weight matrix

associated with t at

is of form

and

by

1 1 1 1

u wdu

 0 &

 G A  6 6 %x`S`y8x    7Y I B A e T S D VT xtSD y x I  0 c )& c $ #" f E FE ( T Q I D %SG T G 6 %xG tSD G `yx B  #"  I  A     6 x%`Sy`8xwv  Eutsp rqpihA ge  c c 0 d4 & 74 #" F   E #"  9 H  9VT aYXI WT )0 & F9VUT%SRQ7D H0 & FEDCB@#"98  753 1)'%$0 #"!&   `P G  P I G  A   6 4 2  0 ( &  F9bD 6 6 6   6 r yr   yy r yr EE  6 6 rp    y rp  E   6 r 6yr FEE  yy r 6yr tt  F   6 %xiS`yx{z  u wvu lsA yrXhpxS 6 A AS A lqA StlsA G `rA G lqEA G `lpA G lo9A G  6 A G y EAnA  gf m S P D 'S'ljRjjkiCiShFS A ed y r 6    yy yr  rp   yy r 6yr aaFEE  F  E

u edu 6 r 6    66 yr     rp   |E 66 r 6yr abE  }~~~~ 

oXS Ay A

Theorem 5.7.1 is void of any type of symmetry assumptions. If t satises certain symmetric conditions, then the number of computations can be signicantly reduced. The next theorem is analogous to Theorem 5.6.14.

lw7` lEQkU X9Q7Rl lEn


It follows from these denitions that

`h`%UF t V t` 8`n R F @ `Y `%U`8n n ` a F a @ ` Q% U%` ``88n y z R a h @  dRR QR  y a     az@  `h` `% ``8n R`  a F t z t U%`Q`8n `YF `%UiQ`88n Q n R  t @z % Ell 9Y7` x7Rl l)fl
t6 = t 0,-2 t 2,0


t -2,1


t -2,-2 t -2,-1 t -1,-2 t 2,1

# hv#

Without loss of generality set

t2 =

t 1,2

and dene

t4 =


t 1,-2

and

Now let

t 2,2

260

t -2,0

. Then

t 0,2

t 2,-2 t 2,-1

t -1,2

t -2,2

Q.E.D.

5.7.2

Theorem. If t is a the following conditions 1. 2.

then there exist three templates p, q, and r such that

where p is a

invariant template and q and r are

Proof:

Dene q in terms of the centered weight matrix

Note that the support of consists of the non-zero boundary values of and that the (the matrix associated with ) are all zero except along the boundary of the entries of matrix. Convolving q with

The remarks and observations that followed the proof of Theorem 5.6.14 also apply here. Variant templates whose corner polynomials exhibit specic symmetry properties and whose boundary values satisfy certain sign rules can be decomposed into weak sums as with appropriate sign changes in the values of the templates p and q dened in the proof of Theorem 5.7.2. In Sections 5.2 and 5.3 we observed that rank 1 invariant templates are linearly separable. This observation also holds for invariant templates.
261

( &$ )'%#

0  "S(

  '$ ! 

( B 5 G 8$ E ( B 5 @ 8 I"H'"FDCA9$

results in the template template

Ci zk F' C ) C z EC vi '1z vz 17 '%t Q z FE ` a `i`Qi


template whose associated weight matrix which agrees with t along the boundary of is of size

variant templates

as follows:

p=

1 1

H

satises

9 F Q e wQhQ Fe e@  VC` Q{ Q RQ@CC` Q{hg Q    Q hg  `YieFQi w7 8n


     

 k t  h 9 8 ' C '




(  $ 5 3 1 '6%420 ! 7   ! "

( P RQ$

. Thus, the Q.E.D.

R6t )
It now follows from (i), (ii), and (iii) that

c T )'a

t c } 'a

s i c T a x t c } x y c y xa mIjCd6%DYQ" u p )b9ddba d u

u l ~

t c } ddba p
and

 i c T a t c } X  c T )sa d 'a d DCuHoD"" u p )sh7'a v g f t c } y c y a ~

t c } dd'a p

c t g ngfY s g n q g DH{t f e e e f fa y cDy t g fnegefeYdDy s g ndDy q g 9{t f fa X c i ` e e e ingfY |Ds{b%e ` d `a t c Ta


Therefore,

t F7

A similar denition can be formulated to dene templates having row rank 1.Whenever y is understood, we write v for and for .

r ph g if

g f

c Ta )')`

5.7.3

Denition. A rectangular template t has column rank 1 if and only if there exists a column and for every column vector in , there exists vector u such that for every scalars such that .

c Ta )'%e

c Ta db`

iy)rIpxwvu)s)` h g f t c Ta X W U YCVT

r ph g qif

5.7.4

Theorem. If t is a template having column rank 1, then there exists an invariant column template s and a row template r such that

Proof: Suppose t is of size associated with t at y. Let there exists a xed column vector that

is arbitrary, and is the denote the column vectors of and scalars

trg fnmefegeY g h rg f s f q c Ta )s%e

c Ta se

c e e e z y t xa v f t u hmgfYQwy g vRn` cpilonegefeY X lm d 9kj la t i ` e e e d ` d YhgfYDSiDS` X 7 W U T


.

5.7.5

b{U

Example: Let

X z mry{ofyn9" oD'Vj}  t x cc xa d a t z y g% v X zmr{tocfn9a" omj d 'aVj}  y x c y x t z sa p t c } d qv X z y t c y xa mr{xocfn9" odD'aVtj}  Dz v X U c oDDQ X { d a t T W t


, and let be given by

respectively.

Dene the templates r and s by

262

weight matrix . By hypothesis such

Q.E.D. (iii) (ii) (i)

It is easy to verify that and that t is strictly rectangular and has column rank 1. Figure 5.7.1 provides an illustration of t at location .

2 4 -6

t (1,2) =

It is also not difcult to ascertain that the row template r in the decomposition given by

ry =

y2

y1

while the column template s is given by


1 2 -3

sy =

The notion of column rank 1 has the following generalization.


263

R4

'9 IsH

Figure 5.7.1 The function

with corresponding rectangle

ir
4 8 -12

hg'R"

outlined in bold.

is

Since each template in the above theorem has column rank 1, it follows from Theorem 5.7.4 that each template can be decomposed as , where is an invariant column template and is a row template. The following corollary is, therefore, an immediate consequence of Theorems 5.7.4 and 5.7.7.
j f g g f f hU f F j ki f F f F g S R V'P D G f d ScP t X e$e8$15W G I g s s s g G f d ScP i X &He1erqCp5W U S g s s s E5e&Heg hG g G f d ScP ` X 1e$q88315W 5'U g P hG U S RP vV'G I hG S ScP 5Ct X hhHHe3Cpi X h383` X b$d G !vVP G W g s s s g ScP W g ScP W P f U S R I I D S G f d ScP t X W g s s s g G f d ScP i X W g G f d ScP ` X W P U S RP $e$e8u15h&He1erqCp5h1e$e8baY3!VT'QG G HF ( D BA9 76 4 2 0 EC@8531)

d d d eHe

F d F

)sh '  dn ' % # &$" s   d  gS    mmfgYm ! fh mmfgYm b mnggn m nggY )s% Q 7 fg  F
,

fhh db%

hh ngggShDY

5.7.6

Denition. A rectangular template has column rank at most k if and only if there exist k column such that for each and every column vector v in there vectors exists scalars such that

5.7.7

Theorem. If t is a template having column rank at most k, then there exist k column rank 1 such that templates

Proof: Suppose t is of size associated with t at y. Let there exist xed column vectors such that

arbitrary, and suppose is the matrix denote the column vectors of . By hypothesis, , and scalars

b%

hggY

for each

h s

Since

The weight matrix associated with

Dene the templates

G F

y w e!xR

Also, since

we have that

has rank 1.

, where by

at y is given by

264

Q.E.D.

U F

5.7.8

Corollary. If t is a rectangular template having column rank at most k, then there exist k invariant and k invariant row templates such that column templates
r s n p p p n o s n m $thHeH$&$s Hu $ { } ay n tC E tq8 n v n tq8 ~ ' m u zy y C v 3q8 n | H| { n @8  o u v ~ { | m s | { Ty l z r y x
265

Similar results can, of course, be proved for row rank k templates.

5.8 Local Decomposition of Templates In order to take advantage of the capabilities of computers with parallel, recongurable, or distributive architectures, there is a need to understand the process of computing global linear transforms locally. In this as well as the subsequent section we discuss necessary and sufcient conditions for the existence of local decompositions of linear transformations with respect to directed networks of processors. For the remainder of this section let X be a nite set and . We shall also assume that .
&n !&T ~

We may view the elements of X as processors in a network. The assumption that can be interpreted as meaning that every processor in the network has direct access to its own memory. Similarly, the interpretation of is that processor x has direct access to the memory of processor is a collection of processors to which processor x has direct access. We call N a y. Thus, processor neighborhood conguration. Denition.
Hu

A template is said to be local with respect to N if and only if . If N is understood, then we say that t is a local template.

and t has a linear decomposition such that for each is local with respect to N, then we say that the sequence is a local decomposition of t with respect to N. Again, if N is understood, then we say that t has a local decomposition whenever such a sequence exists. If Several concepts from graph theory are essential in our discussion of local decomposition of templates. The following list of denitions denes the necessary concepts.
u

5.8.2

, where and V Denition. A directed graph, or digraph, is a pair is a nite set. The elements of V are called the vertices of D. If , then is called an arc (or edge) from x to y. If there is need, we may write and to emphasize that V and E are the sets of vertices and arcs associated with the digraph D, respectively. Denition. A graph G is a digraph with the property that . If , then we say that xy, or equivalently yx, is an edge of G.
tq8 n n 5d' v

5.8.3

u v u

5.8.1

v wu T ~ ~ y n p p p n 5hHHen a v u ~ !

r l n p p p n o l n m phHHqH&$Hl

a function such that

Note that if is a graph and such that there exists an x-y path in G, then there exists a y-x path in G. Hence reachable and mutually reachable are equivalent notions in graphs.
Ytq dCe

5.8.8

Denition. Let be a digraph. We say that D is strongly connected if and only if every pair of vertices is mutually reachable. If D is a graph that is strongly connected, then D is called a connected graph.

266

3 'E 3 $qe

'd 3 ' xkq51e

Suppose is a graph. Let . Since is a graph, Therefore, and N is symmetric.


C 8E 3 ' 8

Proof:

'

5.8.10 Theorem.

is a graph

N is symmetric.

with and, hence,

. By denition, .

eaV

A neighborhood conguration N is called symmetric if and only if for every pair . This notion has the following consequence.

bT'

'

dened by

'

Ct8x8 3w3d'$CT'

5.8.9

Denition.

Let

be a neighborhood conguration. For each , let . The digraph of N, denoted by , is the digraph , where .

$Y

We now set up a connection between the processor neighborhood conguration function and digraphs.

&e

&e

te$

dCe

5.8.7

be a digraph and . We say that y is reachable from x Denition. Let (in D) if there exists a path from x to y. If y is reachable from x and x is reachable from y, then we say that the pair is mutually reachable (in D).

&&He$1EYtq8

te3

The sequence of vertices in an x-y walk will be denoted by and . where


A closed x-y path is an x-y path such that

&e

@'h

5.8.6

be a digraph and . An x-y path in D, or a path from Denition. Let x to y, is an x-y walk with distinct vertices, except possibly x and y. .

&e

@'h

5.8.5

Denition. Let be a digraph and . An x-y path in D, or a path from x to y, is an x-y walk with distinct vertices, except possibly x and y.

; i.e.,

EhtCC

&$&uH5hHe$H &q

&V8

5.8.4

Denition. Let be a digraph and . An x-y walk in D, or a walk from x to y, is a nite sequence of vertices , such that for . An x-y walk is called a closed walk if .
$&hHh1e5$ dC!

'!Ek

The next theorem provides necessary and sufcient conditions for the local decomposition of a template with respect to a given processor neighborhood conguration. Although the theorem is disguised in the language of image algebra, it was rst stated and proved by M. Tchuente [19, 18].

Tchuentes theorem is not as general as one might like. The assumption that N is symmetric restricts the type of multiprocessors being modeled to those in which the data can ow in both directions along any communication links. In many important cases, such as pipeline and parallel-pipeline computers, and systolic arrays, this assumption is not valid [7, 12, 15, 3, 4]. In order to provide for effective computations of linear transforms of these types of architectures, P. Gader proved the following generalization of Tchuentes theorem [3, 4].

Although Gaders and Tchuentes appear almost identical, it happens as is often true in graph theory that the case for directed graphs is signicantly different than for graphs [1]. There are two differences between graphs and digraphs which emerge when one tries to use a straightforward generalization of Tchuentes proof. One difference is that any permutation graph can be accomplished by a sequence of adjacent transpositions. This is not necessarily true for digraphs (e.g., consider the directed cycle). Another difference is that for a connected graph there is always at least one vertex which can be removed, along with an edge incident to it, such that the resulting graph is still connected. This is not necessarily true for digraphs (consider again the directed cycle). Tchuente relies on both of these facts in order to prove his theorem.

5.9 Necessary and Sufcient Conditions for the Existence of Local Decompositions This section is devoted to the proof of Gaders theorem. With the exception of some slight changes, we essentially follow Gaders proof by proving the theorem in stages. We rst prove that strong connectivity is a necessary condition. We then establish a sequence of theorems which show that strong connectivity is sufcient for permutation matrices. Finally, we show how certain matrix decompositions
267

 4'

Then every template connected.

   210)

5.8.12 Theorem (Gader). Suppose X is a nite point set and

a neighborhood conguration. has a local decomposition with respect to N is strongly

(' 

conguration, then every connected.

    

5.8.11 Theorem (Tchuente). If X is a nite point set and

%  !  &$#"

If N is symmetric, then we let

denote the graph of N.

a symmetric neighborhood has a local decomposition with respect to N is

3 ' Hq' we

3 3 ' dHeC1q'

Conversely, assume that N is symmetric and that symmetry, . Thus, and is a graph.

. Then . Therefore,

and, by

!  %  #3

Q.E.D.

can be used in conjunction with the results for permutation matrices to deduce that strong connectivity is sufcient in general.

Proof: Suppose to the contrary that is not strongly connected, but that every has a local decomposition with respect to N. Since is not strongly connected there exists points such that x is not reachable from y. Let be dened by

Observe that if b denotes the image

Dene

and for

, let

. We shall show that

and

Suppose that for some , . Then there exists such that and . Since , . Hence, z is reachable from w. However, according to the denition of a, since , we must have . But this means that x is reachable from y, contradicting the fact that x is not reachable from y. Therefore, . Using induction, suppose that the claim holds for and for some . If the claim does not hold for , then there exists such that . Thus, again, there exists such that and . By induction hypothesis, . Since , and, hence, z is reachable from w. Also, since , x is reachable from z. Thus, x is reachable from w, which leads to the contradiction that . Therefore, and . Since , we now have that . But this contradicts the fact that . Since this contradiction follows from our assumption that r has a local decomposition with respect to N, our assumption must be false. But this in turn
268

gc

According to our assumption, r can be factored as is local with respect to N.

T R q lWE x T x R } i Y 4q h T x q eR T } R E T phf czh pihgf c R 5 q T R } q T R ph q T R } 8 E h q x R } T R x phf {c T yei WE X XB q yg`X t y T R lWE x q x Tc j c j mT R i q j c j } R p q ei X X B q ygX t p x { v t 0 u E k x gy(k lWk k W 6 8 T R

q R T x li i i q sl ggX t X XB E TWRHax gi E x b  T R T R E WHh q T R WE x T x d"T f cmb2h phR f c R 5 R E q T T R E Wh q R} q T R phyf gc 8 E H2h q x R gg`TX gi Tpihyi T R lWeE x i X BXt } i X X i X} gyeei

k jk } c q c j k ygjc ~3Fc u x srp h0 WH{q |`x y0vv u t 9zY r ephyyph wvut0n qo mT x li { q R q T R q T RfcT R c "bi jk q u h Y f  Hg`h wv u t e$ph d qT R q

I E C a

and let

be dened by

, then b is given by

such that each

E P C C GI FD

T 5R USQ

X u Y q h W x t r q T R f H1Hq g`ywv u Ss$pihgc

C @ 86 B A975 T 5R VQ

5.9.1

Theorem. Let X be a nite point set and let a neighborhood conguration. If every has a local decomposition with respect to N, then is strongly connected.

T R 5VQ

C E C P e GI dc 8 E YX ba`W

P C G E C &$IHFD

It follows from Theorem 5.1.1 that if is a permutation matrix for some ordering of X, then is also a permutation matrix for any other ordering of X. Recall also that every permutation can be factored into a product of transpositions (Section 3.3). Thus, every permutation template can be factored into a product of templates corresponding to transpositions. We identify these templates in the next denition.

is the permutation template corresponding to the Observe that the exchange template transposition dened by . That is, interchanges x with y and leaves the remaining if elements of X xed. This observation follows from Eq. 5.9.1 which says that and , or if and , or if . Thus, if and , then

and an yx path

is a closed path, then the exchange template

lz 3 ` ygy9`9`|egge0HUF"

in

. If

is local with respect to N

269

bz

5.9.4

Theorem. Let exists an xy path

a neighborhood conguration on X and

p HU a$pi z 

b9tggge`He

H` {yg ` H

`2 0qg` ` Hywz m`il Hyw e S S d zU

lz

the template

wg`{0 p Hywp y (pem Hvpi y plzm

Denition. Let

. For each parameter

, dene

is called the exchange template associated with p.

$(

5.9.3

. Suppose there

&

Denition. If permutation matrix.

y

e"

5.9.2

, then t is called a permutation template if and only if

dV

contradicts the hypothesis of the theorem. Hence, our original assumption that strongly connected must be false.

is not Q.E.D.

is a

g

by

(5.9.1)

Proof: The proof is by construction. Relabel the closed path P as so that , and

`B ! Y W8 X  X 9 9 F G 9 P P P EF  !  ! 9 EF  ! 9 P P P EF B G 9 EF 9 B  9 VB   8 E)BS&D  8 E F U)B S% DG H% 8 0B %  TS% 8 E F RQIH&D  8 0B  D 8 CCA'@ 8 6 % 571&" 54321&0)(& '  %' %  !    $#"
. Then

We shall show that each template has a local decomposition with respect to N. It is interesting to note that the factors of the decomposition are not permutation templates. Figure 5.9.1 is helpful in understanding the action of the templates we are about to describe. We begin by decomposing into a product of local templates . For , dene

sIDHhD Tq  $ h` $ $ hqR  2 RYYT y {Ish$D h Q T &t  2 RU 2 2 q s 2 RQ r 2 2 Y  C $  q} `qT 2 $ 3q p}5b  on l sn{qzApShAmk B qt9 x c(h"gfRYth&0sj B t9  e x B `t9 e s x QuB qt9 `sRG  G 2a q89   i f X h B ! jB qt9 ~ x B qt9 d x h e h ge }| b V on l Cny{qzApHTAmk B qt9 x G y16 #"$B t9 Wwv x YB qt9 Rwv s x wuB qt9 `sB Tu 2a `89 E x v 61 i h g ec #ifR3Td b V n l tsnrqIDpoHAmk B te9 x c   i f 5hjgYTheug X #"" B qt9 d xe x YB qt 9 s xx uB t9 sB 2a 89 h  h #""B qt9 B `t9 g d b x V 6 $ E B tq9 s v 6 $B qt9 x fB qt9 2xywuB tq9 s`B 6 ra q89 c h g ec pifR3Td b B  9 R&D 8 !  G 2a 8 E F RQE F G 2a 8 7 2a 8 EF PPP
, dene , dene , then , dene , dene is a local template. We need to show that . and set . Then is given by is given by

If

By denition, each

and for

For

For

For

Let

270

!

 "

T    W  }   0  T    5ARYT g W  2} RQ7 2 2R 0 W W} &  AShAQ 0 ` T 2&  AShA q I 0 2& t AHA ` & q & U0 ($3RYT W  q   2R RQ u 2R f 2`5jY
  !      

Figure 5.9.1 below illustrates the action of the local decomposition of input image a.

Therefore, has a local decomposition. Using an identical argument, we can construct for each of . We then have sition

Since we also have

Finally, let

Next set

Let

. Then

. Then

271

, it follows that

. Then

a local decompo-

on an arbitrary Q.E.D.

g ym

V f rR

V h a g qpQR

V % ` a 5 ` d&cb1R V T R WU)#

8 C7 4

'

8 C7 4

( 64

' D4

5 64

% D4

2 3$

Figure 5.9.1 The mapping stages of an input image a in the local implementation of

V T R W1#

V T R X)# A ' B@ % 89 C7 %

V T R X)#

V T R X)# A 5 B@ % 89 67 %

V T R WUS#

8 C7 4

@ 4

8 C7 4

@ 4

8 C7 4

'

8 C7 4

@ 4 '

A ' B@ 89 C7 '

8 C7 4

@ 4 '

A 5 B@ 89 67 '

8 C7 4

( 64

( 4 E ' CGQI4

( 64

@ 4

A 5 B@ 9 (

( 64

' D4

' I4

' D4

@ 4

A 5 B@ 9 '

' D4

% 4 E 5 DPH64

% 4 E 5 IGHC4 A % B@ % ( )$ 89 C7

% 4 E 5 DGF64 A % B@ % ' &$ 89 67

% 4 E 5 DGF64

% D4

% D4

@ 4

@ 4

5 64

5 64

0 1$

% &$

5.9.5

V h a g iQR

V f R

. . .

Theorem. If to N.

Proof: Since is strongly connected, every pair Thus, there exists xy and yx paths

If and have only vertices x and y in common, then the result follows from Theorem 5.9.4. Otherwise, label the common vertices such that . For sake of convenience, set and . Dene by , where
g d d d fdeu' u% ` a ` @ "Sd)a B@ a @ ` ' s % s g v a xS% 8 a a % a 5 v h t "Sd)1CSuu' s h v 7 g a W% 8 C7 ` a a % ` a 5 ` v g t cd)&y1xwuu% s

o @ 1j ` v o n

a a Sd)'

a %

l v h%

. . .

is strongly connected, then

. . .

. . .

has a local decomposition with respect

is mutually reachable in

V f R

and

272
k g cj i v h5

. . .

. . .

. . .

are all closed paths. Furthermore,


d y  1x t y 1x H&pt y 1x y " 1x t y 1x H y y y1x 1x 1x d " t ~ b Q t y y y 1x 1x 1x F t t ~ b qqpt ~ C q

Since for each , each is a closed path, each of the templates has, according to Theorem 5.9.4, a local decomposition for . Hence has a local decomposition with respect to N.
r w t v v v t r t q Hd)C)X1p y

If is a permutation template, then t can be factored into a product of exchange templates. Thus, if is strongly connected, then according to the theorem each of these exchange templates has a local decomposition with respect to N. Therefore, t has a local decomposition with respect to N. This proves the following corollary:
i r

5.9.6

Corollary. If is strongly connected and a local decomposition with respect to N.

is a permutation template, then t has

It now follows that strong connectivity of is a necessary and sufcient condition for the existence of local decompositions of all permutation templates. We now show that this holds in general.
 rXI

5.9.7

273

D6

. . .

S

"

and

DC

pc

y

Lemma. Suppose there exists templates


 SdXC

and

is strongly connected. If for some such that

&pt ~ zy p 1x 1x zy t

"d)t t v v v

q t v v v "Sd)t t v v v ")t 

t | rq q

Wt

Xxq 1x t

 y x y x  y x } { tSvvdv)t t q  3x x ~ } | t | q uuw{  C1x By x  t v v v )t {  c1x y qj qj t y 1x } r{

zy B)x

t v v v d)t

w t v v v t r t d)6)Wxq

w t v v v t u t r SSWCsHp q ij

. By our choice of the

s, the closed walks

Q.E.D.

Sr

j1 Q) 1

wx

U  S

1 T

Q)

qQji

) C d)XQ BCP I &  &

! p "U1

! hG D 1

F 7 @5 E
B

7 9 @5 3

E 3 0

5 64

 S

1 Q)

QUi

S S

B B

9 7 @85

3 1 2c2

5 64

j1

where each O denotes a zero-matrix of the appropriate dimension, then decompositions with respect to N.

Since and is strongly connected, there exists such that and . The idea of the proof is to rst multiply by and leave everything else xed. Each is then moved to the location , is added to the current value at the location , and is then moved back to location . All steps can be carried out locally.

Wd) W dx" !

)  & $ 0d)C(u'% j1

SB

and

Proof: We consider . If and

We now dene the templates for the local decomposition of

rst. Let , then b is given by

denote the ordering used to dene

. Dene

1

j# 

! 

 

  

j1

qji Q) q

)DSd)&W3

Obviously,

is local and if

 

For each

dene templates

, then b is given by

and

) C SdSWD BCA ($ &  &

Since

and

is local with respect to N. Furthermore, by Theorem 5.9.5, each and is local with respect to N. Therefore has a local decomposition with respect to N for each .

, each

p ! U1

UH 

Now, if

and

for some

) C &  & SdXSB6R($

Hence, if

8Y

Therefore, decomposition with respect to N.


Y8
0c1 W 1 c` Qji Xc1 W 1 V ! p U1

, which enables us to conclude that

274
1

, then

by

, then

by

has a local have local

! "

T i 

Y8 B

XYhu

m0 B

u b q Yl2

u b a q cc%

x b e s iD6 e s b DD

Y

@f

g hb

f e u } | { z 6ms~2q

xywmY8vuthsQh#erqopDeskjnu Vq"g6h"uYbmtq"lg g f w xrvtrd e u s q f u s q t"g y b e s iDkj u b q g g ci2Ghb e e s edB8Y"I"D b a h g e i(fd p

We now prove the lemma for . The concept is the same; there are some points which must be modied to account for the transposition. Note that if , then b is given by

b ca

Next dene a local template

} | { m@z

Again, since there exists an

and

by

is strongly connected, for every such that and

w h h e pYY"uivB6#

We need one more lemma before proving sufciency. In the following, let and denote matrices of the form and , respectively, as given in the hypothesis of Lemma 5.9.7.

w irw

b u

h g g 8Yg p

h | b v0dz p h g p

h } | b z e b m0dAca p

x u } | { ums~z

h g g 8Yg p

h | b v0dz p

h } | b z mXkVq p

h g e b Dca p

x e s UDf e s UDe

u b q g g Ymt"lT f

h u q "@yV"g u s q V"g

e u s q Gtd w h (~

z z

As before, since is local and each exchange template has a local decomposition, local decomposition for each . Furthermore, if , then b is given by

e s Qfkj e s Qekj z

g f

@ e @Utq u

e A"

u 2f q

hG

w GmY8"B u f q u Hq

For

w h h e 8Y"uSkBBAdAf

and

dene templates

and

by

has a , where

h g e P(d p

w h h e l8Y"DdBAdA6

x vu b 0s t@ q

h p

h u  b 2@De q p

Thus for every

Therefore, respect to N.

and, hence,

b ca

} | { v@z

5.9.8

Lemma. If matrices and

with , then for every of the above form and permutation matrices

has a local decomposition with

there exist and such that

#f

ilY8"

. . .

275
'Xi ( { f' m vB n

Q.E.D.

Y8

) 2 0 " 3 1

Y8

Y8

) &

YY

YY B

" !  & (     %' 


. . .

%'    & $ #

! "
B

     

 

 

Y8

8Y

8Y

 e%

8Y e2

for some

Proof: We make use of the following observation made by Tchuente [19]: Given , then there exist permutation matrices P and Q, constants , and an matrix C such that

pY8"@Yp@Y

. . .

. . .

. . .


(i)

The proof proceeds by induction on n. If

Now assume that the result holds for matrices and , and an

' ' m8Y"

. . .

By induction hypothesis, for every matrices and , and a constant

, there exist permutation matrices such that

   
,

mY8v

Y (A

mY8v@

puf

For

. . .

, dene

, then the result follows from Eq. (i).

. By Eq. (i), there exist permutation matrix C such that

. . .



 #

mY8v e

. . .

. . .

 

276



) & 

) "#

(iii) and (ii) ,

| | | R

n&p r q &pp o wx } w }
. . .

 9s~

{ s39Ep hf r q g wx t &pvup o m lk ns`ij z zz yzz

e ee ee d

R R R R V

S U U S

a 5 8u W g 5 W f Fsxr Eq5 v YY U YY U YY `X S @@ CE@ S

U R

S a U S YY S IP Y U III YYY S Q HII YYY U Y `X S


. . .

U @@ CC@ S

U R

R V

Y YY U U YY X bCC@ S @@ R U S R R R V
. . .

R R R U V S R

a 5 8u W g 5 W f Fsxr C5q v YY U YY U YY `X S @@ CE@ S R R S U R R R S U R R V R V

R S y 6Ca R 5 8u DW B 6W5 4 Fwxr E5q vu C5 v R S IP G 5 g 5 f st q YY 8r U V U I U II YY U YY `X S @@ CE@ Q HII R S a S G U IIIP Q HII S a S G U IIIP Q HII
. . .

ipa 5 W g @ 5 Wf Y U YY U @@ CC@ YY `X S

Y YY U U YY S @ @ `X hCE@

U R

R V

S U IIIP Q HII S

Y YY U U YY S @ @ `X bEC@ S a 5W4 S

U R

dea 5 c@ 5 W 4 WB Y U YY U @@ EC@ YY `X S

Y YY U U YY S @ @ `X bCE@

R R R U V S R

S U IIIP Q HII

Y YY U U YY S @ @ `X TCC@

U R

Then

. . .

. . .

5 WB

R R

S G 8 75 B@ 8 75 S 3FEDCA9&64 U IIIP Q HII

and

. . .

. . .

5 Wg R

S a

5Wf

S 87 g 87 S G FC5 E@ FE5 f U IIIP Q HII

Therefore,

It now follows from Eqs. (iii) and (iv) that

S vu F&5 S IIP G 5 B 5 4 st q 8r U II Q HII

. . .

. . .

r v sq R

S U S IP I II S I U III Q HII

YY `X S

a 5 8u DW B 6W5 4 Fwxr E5q v YY U YY U @@ EC@ S a

U R

R V

. . .

. . .

@@ CC@ U

S U

R R V

or, equivalently,

. . .

277

. . .

. . .

(iv)

(v)

R R

S S IP U III Q HII S S U IIIP Q HII

Substituting Eq. (v) into Eq. (ii) yields

We now show that strong connectivity is sufcient in general. Theorem. If is strongly connected, then every template position with respect to N.

Proof:

Let

. According to Lemma 5.9.8,

where and are permutation matrices, and in Lemma 5.9.7.

and

and for

Since is a diagonal matrix, s is local with respect to N. By Lemma 5.9.7, each and has a local decomposition with respect to N. By Corollary 5.9.6, each and has a local decomposition with respect to N. Thus, since

it follows that t has a local decomposition with respect to N.


278

e v 3 b

let

" " w s

. . .

Set

" Eu s

. . .

" &C w  

5.9.9

" &u w
Q.E.D. has a local decomare matrices of the form given


. . .

& &v 6

Q.E.D.

In summary, the last sections show how correspondences between directed graphs, neighborhood congurations, network of processors, and matrices can be used to provide necessary and sufcient conditions for the existence of local decompositions of linear transforms. In contrast to earlier sections of this chapter, the existence theorems of this section do not readily suggest methods for constructing efcient algorithms for decomposing templates into local factors. This topic will again be addressed in the next chapter.

279

Bibliography
[1] M. Behzad, G. Chartrand, and L. Lesniak-Foster. Graphs and Digraphs. Wadsworth International Group, Belmont, CA, 1979. [2] E.L. Cloud and W. Holsztynski. Higher efciency for parallel processors. In Proceedings IEEE Southcon 84, pages 416422, Orlando, FL, March 1984. [3] P.D. Gader. Image Algebra Techniques for Parallel Computation of Discrete Fourier Transforms and General Linear Transforms. PhD thesis, University of Florida, Gainesville, FL, 1986. [4] P.D. Gader. Necessary and sufcient conditions for the existence of local matrix decompositions. SIAM Journal on Matrix Analysis and Applications, pages 305313, July 1988. [5] G.H. Golub and C.F. van Loan. Matrix Computations. John Hopkins University Press, Baltimore, MD, 1983. [6] R. M. Haralick. Ridges and valleys on digital images. Computer Vision, Graphics, and Image Processing, 22:2838, 1983. [7] R. Keown. An Introduction to Group Representation Theory. Academic Press, New York, 1975. [8] R.M. Lougheed and D.L. McCubbrey. The cytocomputer: A practical pipelined image processor. In Proceedings of the Seventh International Symposium on Computer Architecture, pages 411418, 1980. [9] D. Lucas and L. Gibson. Template decomposition and inversion over hexagonal sampled images. In Image Algebra and Morphological Image Processing II, volume 1568 of Proceedings of SPIE, pages 157163, San Diego, CA, July 1991. [10] Z.Z. Manseur. Decomposition and Inversion of Convolution Operators. PhD thesis, University of Florida, 1990. [11] Z.Z. Manseur and D.C. Wilson. Invertibility of a special class of mean lter operators. Journal of Mathematical Imaging and Vision, 1(2):137144, 1992. [12] J.H. McClellan and edit. C.M. Rader. Number Theory in Digital Signal Processing. Prentice-Hall, Englewood Cliffs, NJ, 1979. [13] C.L. Nikias, A.P. Chrysas, and A.N. Venetssanopoulos. The lu decomposition theorem and its implication to the realization of two-dimansional digital lters. IEEE Transactions on Accoustics Speech and Signal Processing, COM-26(3):694711, 1985. [14] D.P. OLeary. Some algorithms for approximating convolutions. Computer Vision Graphics and Image Processing, 41(3):333345, 1988. [15] W. Rheinboldt. Future Directions in Computational Mathematics, Algorithms, and Software. Society for Industrial and Applied Mathematics, Philadelphia, PA, 1985. [16] G.X. Ritter and P.D. Gader. Image algebra: Techniques for parallel image processing. Journal of Parallel and Distributed Computing, 4(5):744, April 1987. [17] S.R. Sternberg. Overview of image algebra and related issues. In S. Levialdi, editor, Integrated Technology for Parallel Image Processing. Academic Press, London, 1985. [18] M. Tchuente. Parallel calculation of a linear mapping on a computer network. Linear Algebra and Its Applications, 28:223247, 1979. [19] M. Tchuente. Parallel realization of permutations over trees. Discrete Math., 39:211214, 1982.
280

[20] J.S. Wiejak, H. Buxton, and B.F. Buxton. Convolution with separable masks for early image processing. Computer Vision, Graphics, and Image Processing, 32:279290, 1985. [21] W. Zhang-Kitto. An Isomorphism Theorem between the Extended Generalized Balanced Ternary Numbers and the p-adic Integers. Ph.D. dissertation, University of Florida, Gainesville, FL, 1991. [22] X. Zhuang and R. M. Haralick. Morphological structuring element decomposition. Computer Vision, Graphics, and Image Processing, 35:370382, 1986.

281

CHAPTER 6 TECHNIQUES FOR THE COMPUTATION OF THE DISCRETE FOURIER TRANSFORM In this chapter we examine the discrete version of the Fourier transform. It is no exaggeration to say that the discovery of efcient algorithms for computing the discrete Fourier transform has revolutionized the practice of digital signal processing and digital signal analysis. Collectively, these algorithms are known as Fast Fourier Transforms (or FFTs) and they are signicant for several reasons. They allow for real-time or near real-time spectral analysis and ltering. Efcient computation of many spatial domain computations can be achieved in the frequency domain using fast Fourier transform methods. This is due to the well known result that the convolution of two waveforms in the spatial domain corresponds to the equivalent operation of multiplication of their respective Fourier transforms in the Fourier (or frequency) domain. Just as importantly, the study of methodologies of the various fast Fourier transform algorithms have stimulated a reformulation of many signal processing concepts and algorithms in terms of discrete mathematics. This resulted in a shift away from the notion that signal processing on a digital computer is merely an approximation to analog signal processing techniques. It became evident that discrete signal processing is an important eld of investigation in its own right, involving properties and mathematical methods that are exact in the disrete-time domain and independent upon any continuity assumptions. The methods and techniques discussed in this chapter can be considered part of this new eld of investigation.

6.1 Linear Separability and the Discrete Fourier Transform The Fourier Transform (FT) was rst introduced in Section 3.8 (Example 3.8.13). Although other transforms are discussed in some detail, we place special emphasis on the Fourier transform because of its wide range of applications in image and signal processing. One of the basic properties of the twodimensional Fourier transform is its linear separability. This property is a key ingredient in the efcient computation of the discrete version of the two-dimensional Fourier transform. For this reason we begin our discussion with some observations concerning linear separability. For the remainder of this section and will denote the ring isomorphism discussed in Section 5.1. Note that since X is nite, is nite and . However, because the shape of differs in most cases if y is on or near the boundary of X from the shape of when y is an interior point of X which is far removed from the boundary, we need to modify the denition of a row or column template slightly. , then t is called a row template on X if and only if for every such that whenever . Similarly, t is called a column template on X if and only if for every such that whenever . Observe that a row (column) template as dened in Denition 5.2.2 also satises this denition of a row (column) template when restricted to the nite array X. Also, if t is both a row and a column template, then t is a one-point template unless , in which case t is the zero template. The most common row (or column) templates used by algorithm designers, which are also the templates we are concerned with in this section, are those for which and
283
 3

1 ( &$  20 )'%

 

 

" h#cc

 

 

6.1.1

Denition.

If

D3

Fc

9 9c


 !

9s

whenever (or whenever ). Therefore, unless otherwise stated all row and column templates considered henceforth are assumed to satisfy these latter conditions. Recall that if t is a row (column) template, then the weight matrix T associated with t is a row (column) matrix. The isomorphic image , however, does not satisfy these conditions.
g e c b e hfd 9@ U @P Ba`

6.1.2

Theorem. Suppose

.
p q r9p

The proof is obvious as it follows directly from the denitions of row and column templates and the denition of the map .

6.1.3

Example: If

r =

If
2
l

s =

1 3

284

i i i i i i i k ii i i i i i i i i i i i i i i )h

x 6yw

and

, then

p q vup

2. If t is a column template on X, then is a block diagonal matrix consisting of blocks and each block is an diagonal matrix.
U @P Ba` s q ts `

U @P ia`

1. If t is a row template on X, then and each block is an matrix.


s q ts

Y 57 !XT

U TR P H E CA W !7 VS4 QIG FDB@ x a

8 57 964

is a block diagonal matrix consisting of

blocks

q n m Ba#r   p | r  )~ v  )~

S S

S u S tu v

S S

S u   S tu )~

u tu

r q n Bam x y x y y } { x y x } y { x y x y y z y y | y y |

} x } w x z x { z z x { x x x x x x x x x x x { x z x x { x w z

x x } y { x x { x x x x y y y z { y y y y y y { w y

y x | w z x | z x x

} } { } w z { x x x z x x

x } { x } w { x z z

w z                      )~ x



It follows from Theorem 6.1.2 that the matrix should be highly structured whenever t is the product of a row and a column template. For example, if r and s are as in Example 6.1.3, then has form

q n iam x

x w x x { z x x x { x x x x x x x x x x x x { x x x z z x x x { x x w x x

x x x { w

x y y { x x x { x x x x y y y z { y y y y y y

y x x | w x x | z x x x x x

} x } x { x w x { x z x x x x

w x

x x } x x { x x x x x { x x z x z x y x y w { x y y y y x y } { y y x y y

y x x | } x x | w x x x x x

x x x { x } x

w {

{ x w x x

then

                      )~

Equation 6.1.1 shows that each block of More generally, if r is a row template on

x x x x { } x x { } w z x x x w z x } x x x

x x x { x } { x } w z x

x x x { x x x x { x x w x x } x

x x {

. . .

. . .

. . .

. . .

..

..

is a matrix which is void of zero rows or zero columns. , s is a column template on X, and , then

. . .

. . .

285
v r

. . .

. . .

..

. . .

r q n m q n ip a am

x x {

x v x u { u u u u u r q n m q n Bp am x u x u uu { } uu { u u x uu u x u u } u u w tu q n m q n m r q ip a ap | n m r q n aBam u

(6.1.1)

x v x u { u u u u u r q p n sBom x u x u x uu { } uu { u u x uu u x u u x u u w tu u

 %  S i  S i  )

 S     S  S  S S  F S  o2

V 2 S VB2)

'a

S

  Da

S

VSF ' 2

'

t tt 2

% 'a

is a scalar product of the kth Since j and were arbitrary, it follows that the kth column vector of for . Thus, if we form the matrix by dening the column vector of jth column of to be the kth column of , where , then has rank 1 for all and all . Hence, a necessary condition for linear separability of a template t on X is that each matrix , where , has rank 1. This condition is also sufcient.

'

V 2 V 2F

V 2F SQ F iSSBS

V BIF BFQiS) iS#

F  BSS  B S  S

where O denotes the zero matrix. Suppose denotes the kth diagonal entry of matrix . Then the kth column vector

, each

is a diagonal

VBV2V I

and

denotes the

th entry of the

QB2

while the kth column vector

V2F

of

can be expressed as

of

Q2

6.1.4

From Eqs. 6.1.2 and 6.1.3 we obtain:

Theorem. If

In order to prove sufciency, suppose that has rank 1. Then there exists a column vector of such that each column vector of is a multiple of . Thus, if denotes the jth column of , then there exists a scalar such that

'a

'a

'

V%

where

has form

, then t is linearly separable if and only if for , each matrix has rank 1.

V% a 

and

'

Proof:

We have already shown that if t is linearly separable, then and .

'a

Now, if

. . .

. . .

..

. . .

286

has rank 1 for

matrix, and

(6.1.4)

(6.1.3)

(6.1.2)

(i)

VS

qr543Crpi 222 ) #  8 g f e g h 

8 d 222 (C&($rr54&C&(

&C



'a

If t is a template on X such that each of the matrices has rank less or equal to some positive integer p, then an argument analogous to the one given in the proof of Theorem 6.1.4 can be used to show that each column of is a linear combination of column vectors . If we continue to reason along the same line as in the proof of the theorem, we obtain the following corollary:

'a

R R R

 

R R V
. . .

R D Q  c

  %

R Q R 54D DD b @ R 54D DD DD aa $` R 54D


. . . .. . . . . . . . . . .

DD 54D D54D D DD 54D


. . . .. .

c
. . .

c U TU V


Let

Q 55D DD b V b  Q Q c DD 55D Q U DD 55D aa ` aa ` TU c c @ q 222 #  v u t yG345yxwr%s rG55Api q 222 #  6 F DD 7  Y45D X 1(  F ) X


. . . . . . . . . .. . . . .

h fd %ge VR D X V

c (c

c c   c

6 2 2 2 ) # &55&A&&45S
 VR

Q 6 H PI6
Dene the matrices

@ 3G  5EC 7  9 8 B&( "    '543"A & (  '&45 & (   FD 6 !  222 ) !   # !   @ 9 6 !   2 2 2 ) !    # !     %$8 7( "   %'543"10 & ( %'&%$ "   
then by denition of
'a

and

aa $` X

D45D D DD 45D

In view of Eq. (i), we have

and

by

..

. . .

X # W&  F TUU

  R

and

R TUU

 R

6.1.5

Corollary. If only if for

Then

Hence, by Eq. (ii),

, then t can be written as the sum of and , each matrix

'

6 222 ) #  r543Crp

and, therefore,

287

separable templates if and has rank less or equal to p. Q.E.D. (ii)

In Section 3.8 (Example 3.8.13) we introduced the Fourier transform of a function . Here we reformulate the denition of the Fourier transform by dening in terms of the equation (6.1.6)

Equations 6.1.6 and 6.1.7 are called the Fourier transform pair. This transform pair exists if f and satisfy the conditions given in Example 3.8.13. The reader must be warned that there is no single customary denition of the Fourier transform and its inverse. The variations arise in the treatment of the factor and the sign of the exponential. is missing in the exponent. However, for each denition For instance, in Example 3.8.13, the term of the Fourier transform, there is only one reasonable denition of its inverse. The various denitions have the form (6.1.8)

. Other denitions use various combinations of . The factor is selected so that the inverse Fourier transform of f is actually equal to f for a general class of functions. Suppose . The Discrete Fourier Transform, abbreviated as DFT, of a is dened as

where . In digital signal processing, a is usually viewed as having been obtained from a continuous function and setting by sampling f at some nite number of points
288

4x G345 x r

m j n m j 0 G| x G G7

n yGr54C

n r55Cp

where

. The Discrete Inverse Fourier Transform, or DIFT, is given by (6.1.11)

n (x  n n

We have taken

and

m j n m j  0C 3 x& yG|

$%

A n n AA ( x n p n p ~ 7 B} 7l ~ (l m j n m j | 

v o

for some constants

and , with the corresponding inverse transform being (6.1.9)

(6.1.10)

x (

~ $% ((7l y(hl m j ~ n m }j | 

1$4(

mB} j7l ~ | 

n m j B 7l

zx vt s r $yweYl

Given

, then f can be recovered by using the inverse Fourier transform which is given by the equation (6.1.7)

n m lj {7ki

n m lj o(ki

W45(3

(l ~ m j ~

n m }j hl | q

zx vt s r $ywuyyl

so that Eqs. 6.1.10 and 6.1.11 represent the nite analogues of Eqs. 6.1.6 and 6.1.7, respectively. As we are only interested in the computational aspects of the DFT and its inverse, we view a as a vector of nite length

Dening the template

of Eq. 6.1.10. The template f dened by Eq. 6.1.12 is called the one-dimensional Fourier template. It follows directly from the denition of f that and , where denotes the complex conjugate of f . Hence, the image algebra equivalent of the DIFT is given by dened by

The notion of the Fourier transform and its inverse can be easily extended to functions In particular, the two-dimensional Fourier transform pair is given by

For discrete functions

with the inverse transform specied by

The image algebra equivalent formulation of the transform pair 6.1.17 and 6.1.18 is given by (6.1.19) (6.1.20)

and

. The two-dimensional Fourier template f dened by Eq. 6.1.21 satises the conditions of Theorem 6.1.4.

and

0C yG&1 "

289

  

%  &

B B

where

is dened by

5G5$ ( &(

and

we have the two-dimensional discrete Fourier transform

eu

w&&G5$g (r%(C07 7

(r%('" 7 yC&7 B 1u

 # $ "

    

3 e k e ( 1&7 C& 7

3 e k ( 3 G % 5

we obtain equivalent image algebra formulation

(r%SG( B rW 154%&7'07Se
, where , by

  

!     

! 

&(

1&7h

'

AG 7xG

(6.1.12)

(6.1.13)

(6.1.14) .

(6.1.15)

(6.1.16)

(6.1.17)

(6.1.18)

(6.1.21)

h } ) g 8 8p~~ 88 ~~ g U33 Add ) g 3 g U3} Ad3 vU33 w ) U3 Udd } d Add h a rg YY WW a rYY WW xx pU33 mUdd ) ) a a r x rg x x 8 ~ ) d } 8  iA3} b ~ ) 3 s x qR R 0) T x ) ToI U33 u Q |x ) {) Xmx V s x T x Q x V R R y) zR R y) &R x w) vTI d b u a YW V V R a rrg x Y W ) tsAR I r ) SUsR x I r x a Y W R ar Y W ) V R I r ) V R xI r R x ) V xR I r ) V x R xI r x gr x b i pj x x b b b b h sa gYY WW a nYY W ) d sa rnYY W sa rnYY W ) 3 ) 3 bsa r b a r b rg x W qP8kj R bsa gr x W sa r x W pU3kj R xx xx pUdkj rx g x x bsa Y W ba Y W b nY W b Y W d ba r Y sa r Y ) d ) d b b R sa rgY W rnY rag x W )lo8kj R a rg x W bsa rg x W mA3kj R xx xx lAdkj rx ib j b YW b YW x ba r Y W bsa r Y W x a rg x sa rg x x ) V X) &9I b r Y W b Y W x ba #Y W bsa r Y W x a rg x sa rg x x R u 2u T vt yu SQ vt x wR u V R D UTSQPIHGF ECBA@9 81 5 31 ) 76420( bsa Y W sa Y W x b sa rgr x Y W sa rr x Y W xx b b g hg iA33 Ud3 3Af Ude 2) Y W Y W x d d b a bsa b rY W a rr x Y W xx b sa g g r x V ) &e9I y YW R sq4gSedI cPa3 `X) V pr i h f b
for . derived from F are given by has rank 1. Choosing and . Then in the remaining cases. . The matrix as long as whenever , and

6.1.6

where and corresponding to f, is given by

Example: Suppose

Hence

Also,

According to the proof of Theorem 6.1.4

then for

and

Clearly, each

The matrices

290

, called the Fourier matrix

Setting

and

we obtain

s (0, v) = 1

and

In the above example, the row template r does not depend on the variables u and j and is, therefore, equivalent to the one-dimensional Fourier template . This holds in general and follows from the law of exponents; i.e., . More precisely, since

the template t can always be written as the product of a row and a column template, namely Therefore,

Equation 6.1.22 says that the two-dimensional Fourier transform can be computed in two steps by successive applications of the one-dimensional Fourier transform; rst along each row of a followed by a one-dimensional Fourier transform along the columns of the result. Observe that the roles of r and s can be reversed; the same result can be obtained by rst taking the one-dimensional Fourier transform along the columns of a and then along the rows of the result. As a nal observation we note that Eq. 6.1.20 implies that

This means that the inverse Fourier transform can be computed in terms of the Fourier transform and simple conjugation.

6.2 Block Structured Matrices and the Fourier Matrix The isomorphism maps many commonly used templates to matrices that display highly regular structures. Many of these highly regular matrices can be subdivided into blocks of submatrices that exhibit similarities or common properties that prove very useful in transform optimization. The Fourier matrix is a particularly elegant and useful example of a block structured matrix. Due to the particular block structure and intrinsic properties of the Fourier matrix, block structured matrices arise quite naturally in the analysis and optimization of the discrete Fourier transform. In this section we digress temporarily to study a few concepts from the theory of block matrices and investigate some properties of the Fourier matrix.
291

U e P so X  P XzHS E ci Sv H e n`no

6
s(1, v) =

z #` w

sp

A`HS oH tt

sp

, where

1 -1 ,

(6.1.22)

(6.1.23)

Column and row partitioning of a matrix are examples of matrix blocking. The notation

is used to denote an block matrix, where each block is an matrix of scalars. The special case where or provides for row and column block vectors. The manipulation of block matrices is analogous to the manipulation of scalar matrices. For example, if is a block matrix and is a block matrix, then the matrix is the block matrix dened by

where the individual matrix pairs are assumed to have dimensions such that the product exists. One of the simplest type of block matrices are block diagonal matrices. Recall that if , then the matrix is the diagonal matrix with diagonal entries . This concept generalizes to block vectors. If is a block vector such that each , then is the block diagonal matrix
" # !          ' ' ' % & ' %   $

This should not be confused with when , in which case is a vector of . scalars given by A key role in the theory of block matrices is played by the tensor product and we shall make heavy use of it in subsequent sections. For example, if denotes the identity matrix, then is the block diagonal matrix
2 3 1

More generally, we have

This follows from the even more general property


5 62

where we assume that the ordinary matrix products are dened.


292

t & A U e  k t v  s s k s p q  k pv k t  k p yw t &t S   t& S & |  y X p & mps mp pm & s U o t p s Ap Uk


. . . . . . .. . . . .
5

vy

. . .

. . .

..

. . .

  

( )

. . .

. . .

..

. . .

s s s

' 4

' 4

" #

) ' '

'

'

'

'

s o

   1 2

  

(6.2.1)

(6.2.2)

Three additional facts about tensor products that we shall use are as follows: If A and B are matrices, then
  ) & 10(' ` tW 8 Xa V U % 6 sr  q p G H PIG ep q  q p Q5G q fp q fp q q b !   e q "p ep q p q q q   

(6.2.3)

If A and B are nonsingular matrices, then


! $   q q d q q  q 6 B CA A6 r  6 r %  ! #" 

(6.2.4)

If A and B are permutation matrices, then so is


$

(6.2.5)

These results are not difcult to verify and we leave it to the reader to convince himself of their validity. We now turn our attention to some basic properties of the Fourier matrix. If denotes the Fourier matrix corresponding to the Fourier template f dened by Eq. 6.1.12, then the image algebra formulation of the DFT (Eq. 6.1.13) is equivalent to the vector-matrix product
4 53   B A (Cu9 y % Wr r 6 Wr q 23

(6.2.6)

The vector-matrix representation of the DFT facilitates the analysis of the transform. In order to represent Eq. 6.2.6 more concisely, we let denote the Fourier matrix, where
` YW 'TS@ B Q Xa V R U  R ) bighefd1A c b B 6 E 1F6 6 7% B A 9 DC1@8 B A 9

Replacing F by in Eq. 6.2.6 species the size of both the transform matrix and signal length. The representation of Fourier matrices is commonly simplied by setting and noting that
6 7%

and
y r q y r q q 7% q 

293

q 

Thus,
q 8 ! %

6 r 6 r  6 A A r 6  wx6 6 r (p  wu6 6 r qp w  y x6 6 r

v6 Wr r r q q

D n D D

n kl lm

j x

D D

x x w

x w

z j #n p t j z p

j 8

d i~ j

S p  n j p j ( i~ t i( i~ d n p p t ~ j j 8 j i~

n t

S p j p ( p Y |

g j j g j ( ~ {

g g

j g

n j 7g g j g |

g 7j

p j

7g

 ~ 1Y@ j  ~ | D1@}j h p y x z x x x x x x x x x x w n x qh p sh p n t t p h t qh p rut sh p Wut qh p n t p q h ut n t qh p n t qh p rut n sh p q h ut p n n t n t n t n n t n h p n ft t p s h ut qh rp p h ut n {

e{

~ u j

n t o o o

p h ut qh p p s h ut n t v o o o o t h p qh rp sh rp n

respectively. We say that A is symmetric if

Similarly,

The conjugate and the conjugate transpose of a matrix

, Hermitian if

, and unitary if

{

#{

e{

q h t p n t qh p n t p q h t n t qh rp n

s h ut p n n n n q h ut p p h t n t t sh p n qh p n n n h p n

lm l t l l l l l l l l kl l j h eig

6.2.1

Theorem.

Proof:

This is obvious since

is symmetric.

. Therefore,

As an easy corollary we have that since is a real-valued matrix for

. Thus, is not Hermitian if is Hermitian whenever or 2.

or 2,

7g

6.2.2

Theorem.

Proof:

If

, then

Therefore, Thus,

Let

whenever

. If

and consider the

. . .

, then

. . .

..

. . .

. Therefore,

th entry

. . .

. . .

..

. . .

294

are denoted by

. However,

. However,

Q.E.D.
D j lm kl {

Q.E.D. .

Accordingly, a can be obtained from using matrix inversion. Using Eqns. 6.2.7 and 6.2.8 one obtains
f  u

or
I

which is, of course, equivalent to the image algebra expression . The signicance of Eq. 6.2.9 is that the original signal a may be recovered from the transformed version without the need for matrix inversion. This property is especially useful when computing two-dimensional transforms where the transformation matrices may be quite large and, therefore, the computation of general inverses impractical.

6.3 Shufe Permutations and the Radix Splitting of Fourier Matrices If p divides n, then it is possible to relate to and . This relationship, known as the radix-p splitting of , allows for the computation of an n-point DFT from DFTs of smaller size. Repetition of this process is the heart of todays algorithms for the efcient computation of the DFT. The construct that provides the link between and the Fourier matrices of smaller dimensions is a permutation matrix that shufes or sorts the column (or rows) of a matrix in some desired order. Suppose with . Let
fu 1 u @ fu f if h 

denote the row and column scanning maps dened by


t i 7@ @

An easy way of visualizing the shufe permutation is to label the points of the array in row scan order, then taking the transpose of X and listing the elements of the
@x

295

$ t

t x

$ C D

respectively. The

shufe permutation

is dened as

is almost unitary since it is a scaled unitary matrix. Thus, Multiplying the Fourier transform equation by

"

According to this theorem,

or, equivalently, (6.2.7)

one obtains (6.2.8)

(6.2.9)

. Equivalently,

` Y F Y E E E E E E E E E E E E E D Y Y Y Y Y Y Y Y Y E Y Y Y Y ` Y Y

Y Y Y Y ` Y Y Y Y Y

Y Y Y Y Y Y ` Y Y Y

Y Y Y Y Y Y Y Y ` Y

Y ` Y Y Y Y Y Y Y Y

Y Y Y ` Y Y Y Y Y Y

Y Y Y Y Y ` Y Y Y Y

G u B@B~|  } y z { " v wu ` Y s t q ro b G y ` f S a S #   ` n m lR k  e Y Y P Q  y Y 1%` a

x u  y%B

X j

d S h iS 5  6QS   QS g

S f S # 

g e "  !S  S

a S d QS 6 5 

R 

 6WS  WS

R

!QS  "  QS

 R  P   B

"

hX

6 6

6 5 6

# " #

R !

6  6 P  

G ' ) 6y

X `

d tW&&$ q $ $ d tW&&$ q $ $

` d

b ssrU&%pS d q S $ $ $

0 X  0

0 )  4%&$ $ $  4%&$ $ $ 0 '  WU&&TS S $ $ $  VU&&TS S $ $ $

transposed array in rowscan order. The mapping of the subscripts corresponds to the permutation of elements of by . Thus, if

The horizontal bars are added to emphasize the structure of the shufe permutation. The permutation matrix is called the mod p perfect shufe.

b u

S U&%pS $ $ $ `

g `

y ` a

d xwv&%$ b u $ $ $ $ &%$

` g `

g hb `

S ` b fS 9 C

a " `

& Y P 

d ib

0 $ $ %&$ 7 d ec%&$ b $ $

2 3) ' 0 9 @

2 3) 7  4&%$ $ $ $ $ &%$   !QS   QS ' ' 2

) 9 C 0

) 7   4%&$ $ $ $ $ %&$ ' " ! " ! '

)  #  6  R P Q &I

" #

2 1)  $ $ &%$ " 9 ' C

2 3) 7 8 ' 9 B

) 7 A 9 ' @

7 8 

0 1) E E E E E D ' 0 1)

2 3) " " ' # " 2 3) '  " #

2 3) ' # " 2 3) '  ! '

) ) '

5  64&%$ $ $

' #4&%$ "  $ $ 0 1) ' ( $ $ &%$

. . .

. . .

. . .

..

. . .

G HF

" !        

 

(i)

6.3.1

Equivalently, we have

then

Suppose

Examples:

and

a b

Y &` q

Since

q o b rpu

we have

Hence

. In this case we have

is dened by

296
Y Y Y Y Y Y Y ` Y Y `  Y   Y   Y    Y   Y    Y   y Y 1&` G a u Y Y Y  Y u

1C3 &  %

&

B 3 B 

pB

C3s%&CIy@CC

IH&&6C@

@CI@C

Cp &%3C

y y8 %IB&

&pB&RC

 B! B! 6 # R C# 4  % # @# & R B#

& ~ RQ RQ

C# R

% !Q RQ

C# !

~ 6 6

! R

! ! 6 R Q C 

# #

B# #

6 6

 

# #

6 #

# 6

(ii)

If

and

, then

&r

and

B#

B!

@#

C#

B#

Suppose A is a example,

matrix and

Thus,

is just A with its even-indexed columns grouped rst. In general, if

where denotes the jth row of Of course, since Note that in our case (i.e.,

is referred to as the even-odd sort permutation matrix. It is customary to This is the reason that by . denote the even-odd sort permutation matrix As mentioned, the shufe permutation matrix plays a key role in linking with . Consider . Here we have the case

. Thus,

denotes the jth column of A. Then according to the above

is just with its even-indexed rows grouped rst. this observation also follows from Eq. 6.3.1.

4 B3

&

pB

B8R@y&

&pB&

Where

Thus each block of in Eq. 6.3.2 factors as

is either

or a diagonal scaling of

297
& & &

. Furthermore, the right-most matrix , then (6.3.2) (6.3.1)

   $  $8" S $  6$" X $ H 6F" D S 6$ f"


8$" f

0 3 & e91

0 ( & d7c

Y a b$  8$" T`

 6$" X "  8$" S "W%F$8" S V TF$UTD" S R %FQ$%D"  H H 05342 & 0( 1P&2 C 6$ A" 6$" BA  H I GFE$D%"    6$" @ 6$"  9  %$#!  "

0 3 & 542
~

   

    
~@ 1 R

This shows how a four-point DFT can be computed in terms of two two-point DFTs. As the next theorem , then can be split into two half-sized DFT matrices. shows, this holds in general; i.e., if

p % & &i x  CI 3C  C r

BI 3C CB

&

&

where

denotes the

identity matrix. Hence, multiplying Eq. 6.3.2 by

Therefore, if

1y

Theorem. If

where A, B, C, and D are columns grouped rst and grouped rst. Thus, if

Proof:

Let

and

, then

matrices. Since is just with its even-indexed , is just with its even-indexed rows with and , then .

 " 8$" 7 6$

0( & 1)'
%

R {v

But since

. Therefore,

Similarly, if

, then

for

, then

and

Since Now if

is a diagonal matrix, , then

Therefore,

298

, where

and

. Since

we obtain

(6.3.3)

&

k w l wl gw l k y

u w l !p u w } w l h y p r p y  u w p w ph y p u w l !p u w } w l dr u w l h y y p p f ge nk cw w l h w l w rh w l cw k l lh w Wh w rh )k w j l w j l h u w l x B8pu w % w l #r h p h y  ePo  h x w w }p


and

The idea of splitting the DFT can be applied again if m is even, relating to and , and to and . In case n is a power of 2, we can divide and conquer all the way down to a sequence of one-point DFTs. In case n is not a power of 2, then the radix-2 divide-and-conquer process breaks down. However, as a function of smaller DFT as long as n is not a prime number, it is still fairly easy to express matrices. Specically, if with , then can be expressed as a function of the DFT matrices and . The key is to use tensor notation. Note that

Vw 8 p

w p

uB#7'xsp  v u p u p p h u p v uz p vvv u p u p p kmwv |p w #8sp9p 8uP'xsp  zp !tsypqh p p w l w l h u w p w ph y p z h y 4p i~x nk w w k w j u vv u p uz p vvv u p u p p w l w l h j w h }uC1xpp wv u|pp #8sp b)1{xsp  zp !tsyp@h y p u p vvv u p u p p h n 1w w cw j Bu#7'xsp w #8sp utsprqp k k l w l w h j w h y h y e y n okmw w kcw j l w l w Ih j w h ih y y e f ge
It now follows that where Corollary. If and, hence, and we obtain . , then , then .

w d w Rg h y y v w v ty v 8ts Vh wy v s w v ty v 6ts ISh w Tt 86s QRSh 8ts r y v wy h xv usp h 6t!rqig


. Using the fact that , we obtain

6.3.3

where . The general formulation of Eq. 6.3.8 is given by the next theorem.

w p

w p

and Eq. 6.3.7 as

Thus, Eq. 6.3.4 can be rewritten as

This establishes the following corollary:

Hence, if

If we multiply this equation by

Finally, let

299

Q.E.D.

(6.3.9) (6.3.8) (6.3.7) (6.3.6) (6.3.5) (6.3.4)

Iw p

is known as the radix-p buttery matrix and derives its name from the graphical The matrix representation of its action on an input vector (Section 6.5, Fig. 6.5.1). Note that for , , where is the radix-2 buttery matrix dened by Eq. 6.3.9.

T T S q 8 B88 6 q8 8 q T 6 T 6T 7 8 RS  6 6 8 W86 G ! 8 BC#' % 8 # C %%7 6s #C11 ! %T#Co %% 8c2 %8 }T x # s}s 8 g B T T S } R  Es 8 8 8 6 8 % 8 6 8 8 6 8 8 8 8 6B8 688 d) 8B q1we  w8 g V w  %  } 8  8g V xs}s  o8!R! 8  w R W  T  } ds R G s % R sb8x#q I w4X
Let show that Since where Since where By denition of Proof: and each block matrices. Let and denotes the jth row of is just , and denote the . with its rows sorted mod p, we also have and , . Thus, if is an th entry of , and denotes the matrix such that and , then , we have th entry of and

6.3.4

In analogy with the radix-2 splitting, radix-p splitting can be used to obtain an npoint DFT by gluing together p DFTs of length .

s}s 1 } w  o w  %8  o51 8 4 T  8   Q  w 8w Rw ' 4 wq~ %i


Multiply both sides of Eq. 6.3.10 by and , then and .

6.3.5

where

Theorem. If

Corollary. If

Proof:

300

, respectively. we need to

, then

(6.3.10)

Q.E.D.

Q.E.D. are

6.4 Radix-2 Factorization, Perfect Shufes, and Bit Reversals According to Theorem 6.3.4 and its corollary,

where and . Now if , , and there exist integers and such that with , then we can reapply Eq. 6.4.1 to each of the expressions , replacing each DFT of length by DFTs of length . This procedure can always be employed until for some index k, cannot be factored further. In order to better understand actual implementation of the split-and-merge process, we restrict our attention to the simple case where and . The methodology derived from the analysis of this case can then be generalized to derive implementations of the general formulation expressed by Eq. 6.4.1 (e.g., [6, 10]). This approach is analogous to our derivation of Eq. 6.3.10 from Eq. 6.3.8. , Eq. 6.4.1 becomes For

Merging Eq. 6.4.3 with Eq. 6.4.2 results in

Using tensor notation, we may rewrite Eqs. 6.4.2 and 6.4.4 as

and

where each of the subscripts

is some binary sequence of length k.

301

7  2 E 2 x 3



3 R x H x

" x

" x

For

, let

denote the base 2 expansion of s; i.e.,

G WWcy# Q" b f " D 

p h qig

respectively. Since , continuation of the split-and-merge process formulation of the DFT:

G D G G G G D cy# Q " ` f " u Q Udb xI Udb U edb VW Id` II!u4s'

more times leads to the following

X Q G Y " P

G G c Q" b a " ` I! D 's

R Q" GP xICW " GH RF(EyD4IC ( ( ( dC

Assuming

" ! "   #'&" %  "  $" P 01R) ( " " #     !   %q    g}wxoGR~ RT#s8'7G'
, the split-and-merge procedure can be replaced by applying Corollary 6.3.3 to which splits each into

(6.4.1)

(6.4.3)

(6.4.4)

(6.4.5)

(6.4.6)

(6.4.7)

T (

7 8 

s   " y# 'C 2

G D  I " H  U yW 

Q" v "b D G

3 5

Q 0 IFE 0 E sE D ut(    ( r(

Q G " H

3 2 4

" 8 E 2 x  x x  y E 2 w @

G 'sG'

G  V  " H G I UDT ' S

2 #

 @

3 2 9

3 6

 9A@ B

(6.4.2)

g f C{}CIhIxu II `I{`I|})ppu I f g g f fVU|I|V|pvu }I|p|IVx I }ICI|I)Uxm I g f f f g f g f f d g f f g f VU|I|V|pvu1 V{}CICxpu I!VI|p|I)Uxm1II! f f d fV v p I{ Cf { Cf |f  I |f  I Cf Cf I Cf I{ vu I |f H zf !|f HI!p
where

VIV|I`I|VUCI)Fp I `V{}CI)p|V|p|VIvu g f g g f f f g f f f g f g f d g f f V{)}|I|I|V|p|V|pvu !V{}zV|p|VExCV)pp1I! f g f f f d f E` f p` I Cf H Cf Cf PIvuW` ChH!p f hE g f g f g g f f f f f g EI)I|VI|}`ICV|sCIhICI)pCV|s|}`Ipu g f g f d g f f f f f d I)V|I)I|})ICI)FCI)Fz}CxCV)p|})ppu f f Uic p` Cb1vu e 
and where , we can synthesize each 8point DFT, , from a pair of where

where is the permutation matrix dened by . This means that the DFT of consists of a permutation of the components of a followed by a product of k sparse matrices. Since plays a central role in the efcient computation of the DFT, we provide a formal denition and an image algebra specication for its implementation. The following example will provide the on the coordinates of a vector. necessary insight into understanding the action of

y q

r y }'

f y qs f iii 8&t `Ir CEaf q ECf o E n y A8FC)w


.

f g k j y w f i i i f g y w f d y w tq sr f i i i fq f o aU{`UC)x{~VU`}C)x|V{)p!zxvuRI`IFECVFE)pC n
for

Using induction on k, it can be shown that 6.4.3). This implies that

g k j f iii f g f d ml!hEe

FAUI)

where is the permutation dened by Equivalently, we have

y y y l~azw

6.4.1

Example: Suppose

U1'

Repeating this process, we obtain

`4j

Using the buttery matrix 4point DFTs as follows:

and

302

. Then (e.g., Theorem (6.4.9) (6.4.8)

eFUC

UUUC

C{I}eCx|VI)VUCx)V{)IUCv)}U)UUCx|VU`}eCx|}I|pUCpx ||I|VU|VVzV)p I)ICV|pCV)xeVI|V)VzV)p|V|I|I|F|I)ICVExCV)p|I|pv U


Thus,

eFUC

&c v`|)I|II|IhI|})p V|ICV|sCI)F|I`}zVEICV|s|VVzV|pCV|ICICpCI)pC})sp vPp I{I ) UII C VU{ C {UI IVUCU}UaCVIUII{UaCIIV!CUI}C}UV!CIUV!CI}ICUVI!CVI{CI{Iv `IIC`HU{a)hWVeaC`PIUzhIV!|`HUV!zPeI!C`PIIx
The nal stage is now given by

15

14

13

12

11

10

It follows from the table that is obtained from i by reversing the order (reading from right-to-left) of the four bits in the binary expression of i.

Expressing i and in terms of binary notation elucidates the action of we have the following relationship:

Figure 6.4.1 The permutation

15

11

13

14

10

12

and its corresponding binary evaluation

303

UUUC

binary

1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000

binary

1111 0111 1011 0011 1101 0101 1001 0001 1110 0110 1010 0010 1100 0100 1000 0000 . Specically,

 R c p R9       E ' c  f U 9 Rf be vv 9 URc I vv 9
, we now have as

c x 9
6.4.2
Theorem. If and

'

f v 9 f p ` f pu 9 v  W`1V

 RceI C!h4

Because of its action on the indices of a vector, the permutation matrix is commonly known as the bit-reversing permutation matrix. For the formal specication of , let and for set

Dene

 R

This suggests the following theorem:

while for

Thus, is composed of copies of the perfect shufe permutation matrices according to Eq. 6.2.5, makes a permutation matrix. , then Note that if

Proof:

Let

. Then

e c  I   u h
and

The recursive characterization of action of .

u$

Since

Hence, using Eq. 6.2.2, we can factor

Using Eq. 6.2.1, we obtain

where

given by this theorem makes it easy to prove the bit-reversing

, then

304

(6.4.10)

Q.E.D. which,

R 8 H C9 

9 

5  F r 6"

j H

u 9 e  E7

u 5  m8e   u 9 e

R H r9 8PDDB7 H   7 A A A F G

R H C9 

 7 A A A 88CDB7 H @9   7 

f UH F ee  2 V Q d 9    4Be 5 9 ( FG F r F G R8 H C9   7 A A A 8PDCB7 9 87 5 Ie  H  5 88CDB7 H      7 A A A  7 w@9   I s F G F G F r F r H C5687@9 87PADDB7 H A A  87 9  I UH C9 ECDB7 H   7 A A A  87 9   a F r F G F G  7 9  4 C4 9  H  7 A A A 8PDCB7 H w7 9 4      R H  7 A A A I 9 8PDDB7 H    4Be  F r 9 F r uCuDu$ H E9    H  9 F r

 H C9 

F G

7 w

u 9 e  E7

u 5 e  f86 F G



 u  9 e 7 5 e H W rExP4

 

 H W @u F r 9

 Dye u F G

 u  ye

ds

R 8 H  9

 7 A A A 7 9  7 5    8PDCB@48xQIe

 H @Q88CDB7 H  5  7 A A A

 w7 9

  I s 

R H  5  7 A A A SIDQ8PDDB7 H

F G

 87 9

F G

 I

C4 9  H

F G

 7 A A A 7 9  7 5   EDCB@6864  

2 3 1) &% 0(' 

# ! $"     

6.4.3

Theorem. If dened by

and

 

has the property that

Proof:

We now proceed by using induction, assuming the result to hold for all integers less than , where .

c3T b

2 ` aT

If

, then

is the permutation matrix dened by Eq. 6.4.10, then the permutation

and, therefore,

 5  H DQ

 H DQY   5  

W H X

H 

2 VUT

Let

, and

 u  ve

ts

F r X

p q7

i g e 7 "hf Xd

where

By Theorem 6.4.2,

and

for

2 `

p 7 A A A PCDE7 2 7 X 

 2

8 e 

 9 e  

Let even, . Hence, By induction hypothesis,

. Suppose i is even. Then and

. We must show that

maps maps to

878ACADB7  7 9    5 A H @4II@8e  4I 5 e     IIBe

Reversing an index bit twice results in the original index. Thus, . Therefore, . This proves the following corollary.
 u  pe 9 F G  7 A A A 7 9  7 5    8PDCB@48xQIe F G  H @Q88CDB7 H  5  7 A A A  7 8@9 F r F r    g p H   7 A A A "Ir9 8EDCB7 H F r  87 9 F G   2 n 5 Q F r  7 w@9 F G   I s  u u u F r 9 oDCh H ds R H C5687C94P7ACADAB7 H F r  o 9 F r  7 l9 F G F r p H  9  7 A A A EG4P8DCB7 H  7 9  4 F r F r H 9 ECDB7 H 7 A A A  87 9   F G F G  4  H @9   7 A A A 8PDCB7 H w@9 4  7    F G 9 9 F G ki` j 2 2 g  u u u DCh 9 " V  t`   2  H

 a u

However, the coordinate position the coordinate position since ,

Q 5

 7 A A A 8PDDB7 9 w7 5      e 

I4 5 e  

But since

5 6

Therefore,

By induction hypothesis we again have

If i is odd, then

and

maps

305
q  $   F  X  W  r3 u  

to

in the vector in the vector

, where

. Therefore,

to

corresponds to . Thus,

. Since i is .

and, hence, Q.E.D.

end loop return j end


s

In view of Eq. 6.4.7, the DFT of can be obtained by rst computing followed by a sequence of k computations of type , where each column of has exactly involves integer operations, Algorithm two nonzero entries. Since each evaluation of 6.4.5 requires integer operations. Thus, the amount of integer arithmetic involved in computing is of the same order of magnitude as the amount of oating point arithmetic in . Hence the overhead associated with bit reversal is nontrivial with respect to computing the computation of , often amounting for 10% to 30% of the total computation time.
r u s vt f y z w kG6I y w u { "m4l}3 yu w s ev ttt y z u z w G6Dv y s u Dyt " 4} w u s v eUt

6.5 The Fast Fourier Transform The vector-matrix product involves complex computations. The Fast Fourier Transform, or FFT, is a method that drastically reduces the number of computations when forming the product .
u s vt z u s t

Using the results of the previous section, we can write


u s r u t { s u DDiDyt

as (6.5.1)
z Sh{

306

| h{

| E8EDCw8 ~ ho { x | { z

s u et

where following algorithm for computing


{ qV

, and

. Thus, we may use the

s u 4qt

s r u Dyt

u u u DDDu

y s r w { P4Cmd

Of course, by specifying the template . of the convolution product


t

s r u rt

s v t eqV{

For specication:

, the computation of

can now be accomplished by using the simple image algebra

| h

y z w GG6

{ | {  Y { t

for

x {

begin

:= 0 to

loop

y x w s IIev

z { U8PDDBlB}x

~ | { @}iz

For

and

y ev x w s

6.4.5

Algorithm (Evaluating

) dene as:

, we could just as well compute

s ev

The following algorithm computes the permutation function

r u s xyt

s r

Having examined the structure of

s r

6.4.4

Corollary.

is symmetric.

, we turn our attention to the computation of

in terms

6.5.1

Algorithm (Radix-2 FFT) for


ef

(Algorithm 6.4.5) to loop

end loop

Since each has only two nonzero entries per column and each complex add involves two oating point operations, or ops, while each complex multiply involves six ops, it is not difcult to ascertain that ops if the sparsity of the s is exploited. This is the primary this algorithm requires only reason why sparse factorizations of form the mathematical framework for the efcient computation of the DFT. These algorithms are collectively called Fast Fourier Transforms. Algorithm 6.5.1 represents a high-level version of the Cooley-Tukey radix-2 FFT algorithm [1, 4, 3]. The FFT ranks as one of the great computational developments of this Century. Although Cooley and Tukey are, deservedly, given credit for the modern development of the FFT as represented by Algorithm 6.5.1, Carl Friedrich Gauss had developed identical as well as more general methods for the efcient computation of the Fourier transform more than 150 years earlier [7]. Consequently, much time and effort could have been saved during the 1950s and 60s had researchers been familiar with Gausss work. In addition, the general computational framework for the FFT could have been established much earlier. and, hence, to different factorDifferent FFT algorithms correspond to different factorizations of izations of the Fourier template . While template operations provide a highly structured environment for studying image transform theory, template factorizations provide a general framework for studying key aspects of advanced image transform computation; e.g., vectorization, localization, and parallelization. Some of these issues have already been discussed in previous sections while others will be discussed in more detail in subsequent sections. In this section we focus our attention on the image algebra specication of Algorithm 6.5.1. The image algebra equivalent of Eq. 6.5.1 is given by
P dyDC e p " U  GD Q

where . Here we use the notation instead of to denote a sequence of templates. As will be shown subsequently, the sequence can be represented by a single parametrized template , where p is of form . Thus, the notation will accustom us to the idea that is a parametrized template. To compute Eq. 6.5.2, we may use the following algorithm which looks very much like Algorithm 6.5.1.
8CDB II  PDCk  E  

6.5.2

Algorithm for
hhV3 f

(Algorithm 6.4.5) to loop


II

end loop

307

UV3

(6.5.2)

8f

B F D B  CDG@rE C
& P'  I@

 8    

mr

}mr omri

@

eI@mk@k@

lap

To complete the specication of this algorithm, we need to examine the parameters dening the templates . Suppose and . In this case we need to specify , and corresponding to the matrices , and , respectively. Using the tensor representation of these matrices, we obtain

4CmyII@

and

At the ith stage of the loop in Algorithm 6.5.2 we compute the product . By denition of the product operator , the value is given by

308
 A9 7 5 3 1 '@ 86 420 ) & SP( 

, where

(6.5.3)

$ "  %#!

iqt

The cardinality of is two since the template image corresponds to the jth column of . Thus, using Eq. 6.5.3, the computation of each value involves two multiplications and one addition which shows that the image algebra formulation exploits the sparsity of . To complete the specication of the template , we need to dene the weights . Let , where . By carefully considering the columns of the matrices , it is not difcult to see that and can be computed in terms of the following two-dimensional vector product
e fd W x W U S 6CS Y XXbQ W U S XXbQ e h v g W h p(S g Re e q t yEg W U S XXbQ v w (e g yt e g e fd WXUXSbQ vsu2sq q tr w W h piS g v h YW U S cXXbQ e ` YW US Q I aGXVTRPH e z e fd

where

. Equation 6.5.4 can be represented graphically as illustrated in Figure 6.5.1.

bi-1(j)

bi-1(j) + wbi-1(j + 2 i-1)

w bi-1(j) - wbi-1(j + 2 i-1)


{ |

bi-1(j + 2i-1 )

Figure 6.5.1 Graphical representation of the buttery operation.

With a little imagination, the term buttery becomes evident when viewing this schematic representation of Eq. 6.5.4. The complete set of buttery computations in the eightpoint Cooley-Tukey FFT is shown in Fig. 6.5.2. Here we exploited the symmetries of in order to express each buttery weight w in terms of .
309
 ~ 48XX} }

n l om

j i g khf e l

g W h 8p(S

e g

f e v edh

g W h p(S

e g

v u ut p y wv u t r q bxR8XsXY

(6.5.4)

a(0)

a(4)

8 8
2

a(2)

8 8
1

^(2) a

a(6)

^(3) a

a(1)

8
2

^(4) a

a(5)

8 8
2

8
3

^(5) a

a(3)

^(6) a

a(7)

^(7) a

. Using the convention and simple inspection veries that , and , the templates generated by correspond to the templates , and , respectively. The eight-point radix-2 FFT can easily be generalized. In the general case we have , where and . Thus, is the block matrix with blocks of size given by
d u ( of( f f d 4

where for the parameters

310

. . .

. . .

..

. . .

s Cb

s88 sTpx#i sTpx#ici spbsTpx#i pc( #bhTapx#i

pE#bb C%abab

Equation 6.5.4 is the key for representing the templates parametrized template . Specically, let
(b

, and and for

Figure 6.5.2 The Cooley-Tukey data ow graph for

^(1) a

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

^(0) a

bhC C c f f % opV 6XC

6CfGb

. in terms of a single , dene by

(6.5.5)

where

Since the number of zeros between the two nonzero entries in each column of is , the is exactly . But the nonzero entries in the spacing of the two nonzero entries in each column of jth column of corresponds to the nonzero weights of the template image . Thus, Eq. 6.5.5 for . also denes With the specication of completed, we are now able to formulate the Cooley-Tukey radix-2 FFT using the language of image algebra.
g S% ` 7 64 855& (  20 3  1  ) & % X Y &
(

end loop

The appealing aspect of the image algebra version of the FFT is that even though it completely species the computation of the FFT, it retains the same high level appearance as Algorithm 6.5.1. Although we are only interested in general algebraic and computational frameworks, we need to remind the reader that many important issues arise when trying to obtain highly optimized versions of Algorithm 6.5.3 for specic implementations. We briey discuss two of these issues. Note that as i increases, the spacings between the nonzero values of increases by a factor of . This spacing is called the stride of the buttery operation at the ith stage in the loop of Algorithm 6.5.3. More generally, strides refer to the spacings of vector components that are named in a vector reference. In many advanced computer architectures, large power-of-two strides can severely degrade performance. Machines with interleaved memories serve as good examples of this problem. The stride issue can often be resolved by reordering the algorithm in order to achieve unit stride. However, this reordering typically results in algorithms having a high level of redundant arithmetic. This represents the typical dilemma of many current high performance computing environments: one

311

e  

efd' "

for

to

loop

Algorithm (Radix-2 FFT). If following algorithm computes


w v y wv Fxfu c tr` s q

, and

@ A3 9

6.5.3

is specied by Eq. 6.5.5, then the

 &  '%

    

W Q T T T Q Q VUSR

. . .

. . .

..

. . .

. . .

. . .

..

. . .

$ !

i ph e c a fQ dbB

    

I G PH& %

E F

@ A3 9

. . .

. . .

..

. . .

. . .

. . .

..

. . .

! "

8 8%

8 %

D B CC@

4 @ 9 & A3 ( G `

procedure is arithmetically efcient but has nonunit stride, thus severely degrading performance due to memory accessing, while the alternative has attractive stride properties but an excess of arithmetic [2, 8, 9]. Languages as well as computer architectures pose problems for achieving optimized FFTs. Some languages such as FORTRAN store complex vectors in stride-2 fashion. For example, an n-dimensional complex vector is stored as an array of length 2n of real numbers . Thus, the extraction of either the real or imaginary vector components involves stride-2 access. Algorithms involving complex vectors inherit, therefore, all the problems associated with this access. In addition, an algorithm describing the buttery operation (Eq. 6.5.4) that needs to explicitly reference the real and imaginary parts using stride-2 access will obviously destroy the simplicity of Eq. 6.5.4 and obscure the key algorithmic point. A second issue concerns on-line versus off-line computations. We may either precompute the template once and for all so that at execution time they may be recalled by simple look-up. This is weights the off-line paradigm. However, the off-line paradigm requires vector workspace. The vector workspace requirement can be greatly reduced since the weight s associated with are a subset of the weights . This follows from the observation that , where and . associated with If not sufcient workspace is available, it may be necessary to use the on-line paradigm which assumes that the weights for are generated by direct call during the ith stage of the loop. Of course, on-line computation will increase the total computation time of Algorithm 6.5.3. We conclude this section with the image algebra version of the two-dimensional FFT and its inverse. In our observation following Eq. 6.1.22 (Section 6.1) we noted that the two-dimensional DFT can be computed in two steps by successive applications of the one-dimensional DFT; rst along each row followed by a one-dimensional DFT along each column. Thus, to obtain a fast Fourier transform for two-dimensional images, we need to apply Algorithm 6.5.3 in simple succession. However, in order to perform the operations and specied by the algorithm, it becomes necessary to extend the functions and to two-dimensional arrays. For this purpose, suppose that , where and , and assume without loss of generality that . Let and for dene the parameterized row template by
x t w v s r t w v o r u u u r t s r t o r q s r q o 'S'S)RU''SSpn t )w t | v R xYfU| n s r o x s r o YVn xsVrU|fn h o x s r o YVn | t "w r pdpS x r n o )VU5'iY|fR x)VU5n'iYfRxRm5nzy )8pV '28RA~ r | o |r o x r n x |n x n | )Vr""iYfRo x |r 5Uopnzy x)V"S"iSfU r n | o d x |n R'~ C| rRuuudrUr jPH S i  '5~ x |n h R'~ t "w  'p~ v Y S x |n R'~ lj h mkig p~  x |r {n }5Yzy v Y

(6.5.6)

Note that for each , is a row template which is essentially identical to the template dened by Eq. 6.5.5. The permutation is extended to a function in a similar fashion by restricting its actions to the rows of X. In particular, dene
Rx{5r8xpjpn n Y5n x {r j 
312

With the denitions of r and t completed, we are now in a position to specify the two-dimensional radix-2 FFT in terms of image algebra notation.

x |n }A'~

p|

for

to

loop

end loop for

to

loop

end loop

Following Eq. 6.1.23 (Section 6.1) we also observed that the inverse Fourier transform can be computed in terms of the Fourier transform by simple conjugation. The next algorithm computes the inverse FFT, , of .

6.5.5

Algorithm (2D inverse FFT). Algorithm 6.5.4


  

When using parallel machines, it may be advantageous to implement the forward product in order to generate the data that is broadcast to other processors [5, 11]. In this case, the statement in the preceding algorithms is replaced by .
' p

6.6 Radix-4 Factorization According to Theorem 6.3.4 and its corollary,


0 ) 4&  

313

  V XW

) 0 E 

g  Q g  g  8h ! fV I  8V 8 8h ! V  8I ! fV g  2

  V ed

 4 V

 B @ UT

b c

Assuming
Y ` Ua #

, the split-and-merge procedure can be replaced by applying Corollary 6.3.3 to which splits each into

R S 0 E  )

  Q    !(f!Pd8f! f!IH   2

@ A

E ) 0 G4

"

' E F  0 (4C !D $ E   

B @ CA

where and . Now, we consider the case where radix-2 case. For , Eq. 6.4.1 becomes
8
" 8 9 "  7 @ A

and

. The factorization is very similar to the

C2r

 !  & 4!6H4 f(3 5 5 5    2

A 5

0 )  1& !

"d


6.5.4

Algorithm (2D FFT). If and t are specied as above and algorithm computes the two-dimensional Fourier transform .
d' " 2f Pr2

, then the following

 p 2f 2 
' & $ (% 

PR 

"    # !

  p


"

(6.6.1)

(6.6.2)

(6.6.3)

i h m i s !6UfUdFii h h m i h i !6UF6h UFFis y i i h i

3h c l gf Fdkh !p !p p 4p y %is !i e p q i q i q i q i q p f

ii

where is the permutation matrix dened by . This means that the DFT of consists of a permutation of the components of a followed by a product of k sparse matrices. The following example will provide the necessary insight into understanding the action of the coordinates of a vector.

r 

y P

r 

r l

p i s w z u i x x x Sr  4TG dy W!46 w U v w u i u i p m ~ h 4} Ah r  s r {r {r 

x x x m H4!e6Ws

~ 4} h h cfWi i s u l  p p !!p d

Iy

 s h Sh ~ !} x x x !!6d   ey s

h 

h f e p Ur  |!F4( c r l |f k4!t  {f c r 3(dfW34!6fWFxti e w p p p e w p w z y u i x x x w u i v u iw s r q p r p sqo

h f e p r  g4Fd( c r l gf xHkh j c r 4IH j c r !H j r !3W j c r !hHi ew p q p i q p i q p i q p y q i q i q i q y j c r 4p c j c r !p j r !p W j c r !p c i j c r 4p c j c r !p j r !p W j c r !p c i q i q i q i q y j c r 4IH c r !H r !3W c r !h3%it!Di q p y i j q p y i j q p y i j q p y y i s r q p

h f e p r  g!%d( c r 4IH r ! c r ! c r 4I3t!i q p i q p i q p i q p y i w s r q p

p q i q i q i q y i (r  4p (  !(!ch1p eI!p ech!p ecI4p xw  !( ch 1hc I !P ch ! cI 4Icxw q p i q p i q p i q p y i p  !( ch 1hc I !P ch ! cI 4Icxw q p i q p i q p i q p y i p 1 !(!ch1(cHeI!hfHech!hHe%(64IHxFvt!i p q p y i q p y i q p y i q p y y iw u s r q p

where each of the subscripts

respectively. Since , continuation of the split-and-merge process formulation of the DFT:

and

Using tensor notation, we may rewrite Eqs. 6.6.2 and 6.6.4 as

Merging 6.6.3 with Eq. 6.6.2 results in

is length k sequence of base 4 numbers.

h m s nv(q

For

Py

4

6.6.1

Ti

Using induction on k, it can be shown that by , we have

Example: Suppose

where

and

, let

314

. Then denote the base 4 expansion of s; i.e., for more times leads to the following . Dening (6.6.8) (6.6.7) (6.6.6) (6.6.5) (6.6.4) on

U

f4c U

fc lC



fc U

!lc UFUlc lUx64 UFUU!c Ux dec UxU44c UxUcUflc UFUcc Ux c!c lUx6cf4c UxUcUflc UF%c Ux cUc c  %6f  x6d c  xcf  Fv !4CUc W4fCUc !ffCd !FWx6UFFvSc D  { Fn4d6ecUF UlU46UFUF 46UF6UFd U4f6%6CF6%i  | Fnk c c !c!4dc %i d |hF4k4!I3d!3d!Hd4IH d!I3d!3d!Hd4IH d!I3d!3d!Hd4IH d!h3d!HCe3d!h3%i d4HCUIe!e!(F

l4ec6UFd W11UF6WUFG3

Figure 6.6.1 Thus, and 4 3 2 1 0

Expressing i and in terms of base 4 representations elucidates the action of Specically, we have the following relationship:

Repeating this process, we obtain

The permutation 12 1 8 4 0

and its corresponding binary evaluation (base 4 ) 10 03 02 01 00

315

(Continued) . . . 01 30 20 10 00 (base 4) .

(base 4 ) 11 12 13 20 21 22 23 30 31 32 33

5 6 7 8 9 10 11 12 13 14 15

5 9 13 2 6 10 14 3 7 11 15 Figure 6.6.1 The permutation


c 

and its corresponding binary evaluation

is obtained from i by reversing the order (reading from It follows from the table that right-to-left) of the digits in the base 4 expression of i.
U

The following algorithm computes the permutation function

6.6.2

Algorithm (Evaluating
C

) dene
U U

end loop return j end

316

es

Of course, by specifying the template terms of the convolution product .


, we could just as well compute

cS

For specication:
ss

, the computation of

can now be accomplished by using the simple image algebra

{  lx

for

:= 0 to

begin

aH3!46e6W

For

and

as:

loop

4c U

c c 

c U U

c d% e

(base 4) 11 21 31 02 12 22 32 03 13 23 33

in

6.7 Radix-4 FFT Algorithm

6.7.1

Algorithm (Radix-4 FFT) (Algorithm 6.6.2) to loop

for

end loop

has only four nonzero entries per column and each complex add involves two oating Since each point operations, or ops, while each complex multiply involves six ops, it is not difcult to ascertain that this algorithm requires only ops if the sparsity of the s is exploited. The image algebra equivalent of Eq. 6.7.1 is given by

where

To compute Eq. 6.7.2, we may use the following algorithm which looks very much like Algorithm 6.7.1.

6.7.2

Algorithm (Algorithm 6.6.2) to loop

for

end loop

To complete the specication of this algorithm, we need to examine the parameters dening the templates .

) u V v x vx u R v x u P vx  h y v x Wh  Yh @h Xu @  w

317

5 !

V ) TTT ) R )P I A  D B A8  5 WUSSQ H)G @FEC@976!

where to compute

and :

) ' ! % ! " !    0(& #$#  u 1t q h Gsrp1ig u Ih v4bfeb` I x ` P V @#cba  ` 5 !&d4b`f V P eb` I @dcba   ` u 5 p!h " h  uI 5u h " $h !  uI 5 ! YX 3  ' 421

. Thus, we may use the following algorithm

Using the results of the previous section, we can write

as

(6.7.1)

(6.7.2)

t | 0sF t 0$ | t t H F t s F | t F | t t w t t u t u t w 7 o t $ t H| u t H| t t H| u t | o o o o o o @ o

t t H| t s| t H| t t o 7 | o t t w t $ t u t w u t o o o t H# | t | t ut HF | t F u G o 7 F o | o o o o o o o o o q w v x w z w z z  ~ | { v z w y v @n w @p w @uw p w @w t v x t e pt GFx t e

| F o7 | o o7 o 7 o o | 7 |F o o o o o o F o7 | o | o o 7 o o | o7 F o | o o o o F 7 | o e | o o 7 o o o | 7 # o o | o o o o F | o | o 7 o 7 o o o | # o o | o o o o | o F | o o o o 7 o 7 o o $@ae | F o o | o x wv o o o o o q t $@n 6t @w0p t @uw pt @w t vp~ }f$@Fw @F $@ae t s v x w z z z @ | { x w v e z w y x w v


Suppose matrices and

and . In this case we need to specify and corresponding to the , respectively. Using the tensor representation of these matrices, we obtain

q gn Yrm

qon pm

lk e &cji

u #s Fs t g e hfd

and

318

u s

 U F Us Us Us Us Us Us  Us F @ Us 0F p  Us  Ws  W

where . By carefully considering the columns of the matrices , it is not difcult to see that , , , and can be computed in terms of the following vector product

@s F 

X pF F p FF F FF F p F # @

is four since the template image corresponds to the jth column of The cardinality of . Thus, using Eq. 6.7.3, the computation of each value involves four multiplications and three additions which shows that the image algebra formulation exploits the sparsity of .

dbd Ws 

U@ Us

}XFscF

At the ith stage of the loop in Algorithm 6.7.2 we compute the product . By denition of the product operator , the value is given by

To complete the specication of the template , where . Let

319

, we need to dene the weights

, where

(6.7.5) (6.7.4) (6.7.3) . Let

@s F  @s  W  } 6Y

@ 6w4

(Us9

r b W 

@&0 

a(0)

a(4)

8 8
2

^(1) a

a(2)

8 8
1

^(2) a

a(6)

^(3) a

a(1)

8
2

^(4) a

a(5)

8 8

8
3

^(5) a

a(3)

^(6) a

a(7)

^(7) a

Equation 6.7.5 is the key for representing the templates and in terms of a single parametrized template . Specically, let and for , dene by

`QX VU &X ba' YW$I F B@ @STQRPIGppE GH$DECA 6 4 2 0 % # !      s  9 7d531 )(' & $"  8 X YSE

320

Figure 6.7.1 The Cooley-Tukey data ow graph for

. . . . . . . .

. . . . . . . .

. . . . . . . .


. . . . . . . .

^(0) a

(6.7.6)

where and . Using the convention and simple inspection veries that for the parameters and , the templates generated by correspond to the templates and , respectively. The 16-point radix-4 FFT can easily be generalized. With the specication of completed, we are now able to formulate the Cooley-Tukey radix-4 FFT using the language of image algebra. Algorithm (Radix-4 FFT). If following algorithm computes , and

for

to

loop

end loop

321

je$i

| r q z d x u t} r A sywvs{sq

6.7.3

is specied by Eq. 6.7.6, then the

je$i d Ad$

h g d fe y x w d $EApq u

~ h h i r { qdiq x y )dy ~ u 3idq 5 q ~

je$i pnoml h h k h ml h h k y x w u s r Yf d $E5Apq vtq ihgec p

Bibliography
[1] E.O. Brigham. The Fast Fourier Transform. Prentice-Hall, Englewood Cliffs, N.J., 1974. [2] P. Budnik and D.J. Kuck. The organization and use of parallel memories. IEEE Transactions on Computers, C-20:15661569, 1971. [3] J.W. Cooley, P.A. Lewis, and P.D. Welch. The fast Fourier transform and its applications. IEEE Transactions on Education, E-12(1):2734, 1969. [4] J.W. Cooley and J.W. Tukey. An algorithm for the machine calculation of complex Fourier series. Mathematics of Computation, 19:297301, 1965. [5] G.R. Fischer and M.R. Rowlee. Computation of disparity in stereo images on the Connection Machine. In Image Algebra and Morphological Image Processing, volume 1350 of Proceedings of SPIE, pages 328334, 1990. [6] P.D. Gader. Image Algebra Techniques for Parallel Computation of Discrete Fourier Transforms and General Linear Transforms. PhD thesis, University of Florida, Gainesville, FL, 1986. [7] M.T. Heideman, D.H. Johnson, and C.S. Burrus. Gauss and the history of the fast fourier transform. Arch. Hist. Exact Sci., 34:265277, 1985. [8] D.H. Lawrie. Access and alignment of data in an array processor. IEEE Transactions on Computers, C-24:99109, 1975. [9] D.H. Lawrie and C.R. Vora. The prime memory system for array access. IEEE Transactions on Computers, C-31:14351442, 1982. [10] G.X. Ritter and P.D. Gader. Image algebra: Techniques for parallel image processing. Journal of Parallel and Distributed Computing, 4(5):744, April 1987. [11] J.N. Wilson, G.R. Fischer, and G.X. Ritter. Implementation and use of an image processing algebra for programming massively parallel computers. In Frontiers 88: The Second Symposium on the Frontiers of Massively Parallel Computation, pages 587594, Fairfax, VA, 1988.

322

CHAPTER 7 TRANSLATION INVARIANT TEMPLATES ON FINITE DOMAINS In this chapter we are concerned with two important classes of templates, translation invariant and circulant templates. These templates are used to implement various convolutions and occur frequently in digital image processing. As we shall show, these templates are closely related to the discrete Fourier transform and its efcient computation. However, the main emphasis of this chapter is on the algebras associated with translation invariant templates on nite domains.

7.1 Translation Invariant Templates and Toeplitz Matrices It follows from earlier chapters that translation invariant templates occur naturally in image processing. Translation invariance was dened in terms of a group (Section 4.1) such as . which However, in most image processing tasks take place on nite subsets of the discrete plane are not closed sets under addition. For example, if , then dening to be translation invariant if makes little sense since or may not be points in X. This poses the question as to the meaning of the term translation invariant or shift invariant in case the underlying point set X is not closed with respect to addition. is a group and , then is said to be translation Denition. If such invariant on X if and only if there exists a translation invariant template that .

Thus, translation invariant templates on X are restrictions of translation invariant templates on Y. It follows that translation invariant templates on X look very much like translation invariant templates on Y. For example, if and denotes the unit template, then is also the unit template for the set . However, the comment look very much like should not be taken too literally. Suppose

and

is dened by

If we restrict

to

, then clearly

It therefore follows that if

is a translation invariant template, where

there exists innitely many templates in whose restrictions to equal t. It is possible, however, to identify a translation invariant template with a unique translation invariant template on Y which has essentially the same support on X as on Y (except, possibly, near the boundary of X). Specically, for each translation invariant template , let

and

323

q i g R H rphf1T dP T R Q )SH )P Q FE1A @8775231#()(! '# % ! " D C B 9 64 0 ! # ! & # # ! T      $   H IG      9 WYWRb P p T    m$v  m  m b pY$m  m  m m)$ W9 3 1y1


e `2

Ca cb6

YU W `XV

w H Y }P

7.1.1

}E E P7 P

37WvTwdY}$1T 11 5m

is nite, then

Suppose without loss of generality that t is not the zero template on X. Then for some , and , therefore, . Since each is translation invariant, we have that . Now choose an arbitrary template and note that if , then since , . Dene by
s k %dx y x j y " e y v t wus n t e t y fg 1 s dj t y x  ~ } ( x SX%| l h v t ih h r y y %x zx {y w y s y %dx y s t ih t y t fg u s %dx y %r u n t r qo r uspt e t fds y e y n s %x y y h1x l m h y q r t r o

If t is the zero template on X, then the unique template corresponding to t is the zero element of . This shows that we can always identify a translation invariant template on X with a unique translation invariant template on Y, namely the one with smallest support as dened by Eq. 7.1.1. Invariant templates can just as well be dened in terms of spatial transformations. If is a is called a translation (or shift) if and group under point (vector) addition, then a function only if there exists a point such that . Thus, for each , there exists which is dened by . a translation If and is an abelian group, then Since y was arbitrarily chosen and , this shows that
w" s y 1%w e t fp h s y ets s s w y e t s s s y e e h h s y h 1 E h h s w y s w w s w@w c y y X y y e e t rs y e e ww e t fp n

As a trivial consequence of this equation we have the following result:


is an abelian group and Theorem. If under the operation of composition.

This proves associativity. Commutativity follows from Eq. 7.1.2.




Since

is the identity of

. has an inverse. Q.E.D.

324

dfEEh`p'

Note that if , then , where Thus, in general, is not a function from X to X. We are now in a position of classifying translation invariant templates in terms of elements of
gs'ps u

uw 1 @7 'w

For

, dene . .

 {s" g1@@w

Finally, since

, each element of

w" w" ww

"

w y @w

Proof:

e t puw d

7.1.2

"

t n

It follows that

o x 1 @

, and that

(7.1.1)

(7.1.2)

, then

is an abelian group

7.1.3

Translation invariant templates on a nite point set X can also be classied in terms of special types of Toeplitz matrices.

6 9 S 5 ) u) E y E D BA BA p 1% $ y )dGpX %A"w% )Ss I `)s I )) E 'p'fi)p $  6 1C5pd(s s $  hwipps &s8 i 7@ $ 1 wifX1ip $ sS   sSd wi %w%  xghpSwp w sSd k' y  u ) E E  3t)ES vqX   tssS U X U 0 X U T R P B A u )) E rqXpih3g0fUedIWc3ba`YsS iWTV%SQ swI H F F uGhE $ DA BA BA )8wC Ssh %C shw%
1d

$ 4 2 0 $ )s@39)8)s 7 6 'w $ 5 $ 420 $ ( 31) 'gi &

'p'r# %#1 ! ! rS"  (`wp"  ! !   pcp       )S 'i p`sS


sSd ' 5c) % hp w( )) i

Theorem.

is translation invariant

and

cs%d'

udp

Proof: Suppose that t is translation invariant. Let denition of , there exists such that translation invariant on X, we now have

c''rsS c'

SE % m) s

Note that if satises

To prove the converse, let

, then

and dene

and

. Suppose . Observe that if

In particular, we have

It follows from our observation (Eqs. (i), (ii), and (iii)) that

Now dene

Thus, if

d )

Let

, then

. If

, then

by

, then

and the following equations hold:

and

is well dened.

and , hence, ,

we have

Clearly, if invariant on X.

Therefore,

. If . Then

is translation invariant on Y.

, then

, let and

325

. Hence, ,

. Thus,

. Therefore t is translation . By . Since t is , and . Likewise, and (iii) (ii) (i) ,

Q.E.D.

$ %

According to this denition, Toeplitz matrices are constant along their diagonals. Denition. An matrix if and only if A is of form

where for each

For the remainder of this section let theorem should not be very surprising. Theorem.

is translation invariant

is an where each is a Toeplitz matrix. Let

matrix. Our rst goal is to show that for each pair

, where . It follows from the denition of the isomorphism that . Fix s and t, and let k be an integer such that . Since t is translation invariant,

which implies that To show that and

is a Toeplitz matrix.

is block Toeplitz, let k be any integer such that , then for we have

This shows that

326

s q p fon

s q w u pow u yttx1zxn

s q w uow u k r%yr

o ~ ~ d j w u ~ j 7ye} }I{@7gWoln ye} eih rgWoln e eih rId

~ ~ f f y}h r}SxihS ~ j j o xgywuyln a y}ih rffoen eih tGCd s q o ije8y}h y}S fjIldihS ~ ~ f f k Y@z j 3S

s q o k %g

ihS f

j gfoen r ih YId ijCld1ihS f

ihf

j 3S

Proof: write

Suppose t is translation invariant on X. Since in terms of a block structured matrix

5  S SV SS S j o   V W 3S   S V gS fS 8)8 lS j

. . .

j S

q st

7.1.6

s s k 8xx f s q S  #n V WSr gS" o S QV S SQV

8)8

7.1.5

is said to be block Toeplitz with Toeplitz blocks

. . .

. . .

..

denotes a Toeplitz matrix.

. Considering Examples 4.9.5 and 6.1.3, the next

is block Toeplitz with Toeplitz blocks.

. . .

..

s q w u pow u k t{bzyxvn
. . . is an . . .

j ihf ed9

~y}h "r}f |ihgd ~ d f s q p k trgWon ihS f

Denition. pair

Let . We say that A is a Toeplitz matrix if and only if for every and for every integer k with the property it follows that .

km j f glkVihged

7.1.4

matrix, we can

(i)

. If

Since

is block Toeplitz with Toeplitz blocks, entry of . Therefore,

, where

denotes the

Q.E.D.

if t has an inverse, then

. Obviously, if T is an

block Toeplitz matrix

is an invariant template on X. However, since the inverse matrix of a with Toeplitz blocks, then block Toeplitz matrix with Toeplitz blocks is not necessarily a Toeplitz matrix (see for example [4, 9]), Theorem 7.1.6 has the following implication:

7.1.7

Corollary. The inverse of a translation invariant template is not necessarily translation invariant.

7.2 Circulant Templates Implementation of many translation invariant transformations often involve circular convolutions since circular convolutions can be computed using fast transform methods. Circulant templates, the topic of this section, are used to implement circular convolutions. . For Unless otherwise specied, for the remainder of this section we dene .

7.2.1

lant translations in terms of

7.2.2

 e ! z"W'e #fe3 Yyi  33ligVC3@I@s)3l   #t #W e38I 9@#fe3l)8l #fl3e%8l #fi38C r9yfe3e8wvl ) t iC3a@g'C3els#gl3&p ")lfl { x x

Denition. such that

A function

is called a circulant translation if and only if

Note that if

and , where

, then

and . Therefore, we shall sometimes dene circu-

Theorem. If group of vector addition

and

is the additive

, then

is isomorphic

Proof:

For each

327

9t

, let denote the circulant translation dened by . Note that for some

vl3p

Since matrix

is an isomorphism, a template has an inverse. The inverse of

has an inverse if and only if the corresponding (if it exists) will be denoted by . Thus,

. Thus,

Igfeir i3 S )ee98 8))8

Conversely, suppose that Eq. (i). Let and is the entry of .

@)8l y r7gyei y y i3r y x t@V y rS yWie y y y "l9 3S Wzl S '  ) ) yy)fe9"gfiIe9 z7 $ %l# Yl  f 3S  ' splt p 9 @#fe3l@)8l |

is block Toeplitz with Toeplitz blocks and written in terms of and suppose that such that . By denition of , , where

6 Un"w w 5lv w 4  A nn rnn Pv A rnn


. . . . . . .. . . . .

p p o 5xtUb o F b A
7.2.5
matrix Denition. An only if for every integer k,

6 4 A n5v

6 p f A 6 9 ` 4 E b Qf A 66 4E C p o f A 6 4 Q eVd4 oQ SWVdcSdG54 Q m GdUf 6 4 2 )uq E C 9 ` T A 6 yw s4 v u s6 9 ` (I8575@(IlT4 9i`udSA68zi@iVd4 WiwT yw s4 vu s6 9 ` ) 9 ` ) 9 ` IWiud ) 6 4y A 9 ` IYTiwT ) 6 4y A 9 ` Idud IW9 6 4 ~ suv Tw yVy@i}d i Bzzy xx%If | { 6 ) w h4 v 6)4utsC 2 j i g i keh3 Df
. Denition. A template and templates on X by .

if we dene ,

by , then h is onto. Also, since . Therefore, h is one-to-one.

Q C HA E RPIGC

EC A 6 4 FDB@98&

6 4 & HA 6 4 T HA YT8XW@V9U& #S9 6 )4 2 0 ) ' 7531"(&

By denition of h,

QC EC A 6T ` 4 ReBRadB98& 6 46 Q C E C4 dGG5A 66 4 Q C4 E C 5dcRRA r547sqid4RA 6 yw s vu 6 T ` fE C 6ws4@u7sq`Fs5u7sTqiVd4gA y v r 9 6 yw 4 v 6 ` f 6Gx4@itsrYq`V94p`ihdgeed4 cE C yw s vu 6 T f A6 Qb Q bE C A 6 T ` 4 cRaYBV9U&


. But

) d

7.2.3

. Therefore,

is said to be circulant if and only if . We denote the set of all valued circulant

A 6 4Q SldUf

6x)wxwv h4 ) T w 66 4 C p o m arqYd eld54 Q nf

7.2.4

Thus, we can use the simpler notation

This proves the following theorem:

and

It follows from this denition that if C is a circulant matrix of order n, then C is of form

Suppose

Theorem. Every circulant template on X is translation invariant on X.

and

and

. If , then there exists a point such that . Since and , . Thus, using the circulant translation , we have that

328

is said to be a circulant matrix of order n if and

to uniquely represent the matrix C. whenever Q.E.D.

y (y

nn S   n   n  5   5
. . .

p    5 n 5  5
. . . . . .

nn nn

n n
,

D p 5 3p  5    n       gu
. . . . . . and , is of form . . . . . . .

5 q

nF k g  nF @lak n k k " rn rn B


. . . . . . . .. . . . .

7.2.6

matrix A is said to be block circulant with circulant blocks of type Denition. An if and only if A can be expressed as a block matrix

7i

Fz

7.2.7

to represent a block circulant matrix We shall also use the notation with circulant blocks. The next theorem shows that circulant templates deserve their name.

Theorem. If

Let

e Fpe nn U U q  rnn rnn k


. . . is circulant. . . . .. . is block Toeplitz with Toeplitz . . .

Proof: Since t is translation invariant (Theorem 7.2.2), blocks (Theorem 7.1.6)

We shall show that for each

such that each

Since

, then

is block circulant with circulant blocks.

..

nn
..

Let

PQA7I5HG2F1 0 A7I5HG2F1 EDGi5"  CB@8643 0'%)( 5  '&%#    9  9  !  A 9 7 5 2 1    !    $ "  !      g  Gicc5 B "#p zi5@(iDR U@X
, and consider the circulant translation dened by . If , then . Let be denoted by . Since t is circulant, we have

zi8eDeelG BF

Therefore, where

is circulant .. . . . . .. . .

329

Q.E.D.

of all block circulant matrices with circulant blocks of type forms a The set commutative ring with unity [6]. Since is an isomorphism, Theorem 7.2.7 implies the following corollary:

7.2.8

Corollary.

is a commutative ring with unity.

As mentioned previously, circulant templates are used to implement circular convolutions. In fact, if , then the mapping is the circular convolution of the two-dimensional and . These circular convolutions can be used sequences for approximating translation invariant template operations [1, 14]. The simplest techniques, which are adequate for small convolutions (i.e., templates with small support), are either to pad the array with zeros or to ignore the boundary effects. Circular templates are closely related to the discrete Fourier transform and the theory of fast convolutions. The next set of denitions and theorems help to establish this relationship. If and denotes the two-dimensional Fourier template, then the twois denoted by and dened by . We dimensional Fourier matrix of order use the tensor notation in order to avoid confusion with the one-dimensional Fourier matrix dened in Section 6.2. Note that in general . The relation between and the one-dimensional Fourier transform matrix is given by the following equation:

(7.2.1)

This relation corresponds to our previous observation (Eq. 6.1.22) that the two-dimensional Fourier transform can be computed in two successive applications of the one-dimensional Fourier transform. , let . Thus, if For each is of size , then , where . Furthermore, since

330

8z

w d d4Xg# w8 % E Gd4g# GGgGG  F%

8z

U fb h z&@S

| { y wzx

l qC(eS  t C&%4mp%@S  G 4%#)qg(S o G CBu y x u U pb T u UU pbV i hS y x T u U pbV i h T u y

BzqG&eG)3wz)zIz

U fb hS z&@

BHGd& % ms

Iz

qzIz

z(E&( o 4% (

} U |b S { (8@R

B F B d ddg#3Ed3eg%oGw gE4ddg#3%Gd @g%G

U fb hS hU v ~S u U ~S y z(E%dmo%Xx t r U bVS u v bUyuS (tnw444tu d s

Let

w wh 8oq

U bU |b S Fb 4&S

U pb T u y BeS o t %nx

Thus,

. We need to show that

, and dene the circulant translation . Then

l mk

. . .

..

. . .

Uy xS u t B@wvQs

j Gi
by

r a i h b ff f b c b a Y W %qpd#g3ed`XV U b d (eS e t CT

We now show that is block circulant. Let and is block Toeplitz, we have that

and

. Since

t r s u t E s qs U a i fb d T gg(e@S 4d t hg#

g#

U a i fb %)gBeS  t T

U b (eS ( t T

u t s

U TS %8R

U TS %R

eo@3 U |b S W &@T

qv

U fb hS z(

qz

` #A6SU!vUEWrU` Q e 'C}U ` e S `} UW SSe{C}P` ezw '0WQ z'e R p H `Y eY  R ) I IR 1 H R H AQFPH 0FQ7S vg v a a R TH p R  H 2!QpV &q v ap r p RH t o sa p Y eY  0x

Next suppose that , Since is a commutative ring,

p p R H x a R H x t $0c&0 e a p WY wY  s a e sa p WY wY  s r r
, then

R v @H 4 C

r a p

v w R v y u|{QfPH 4 zx

can be implemented using pointwise multiplication. Equation 7.2.5 Note that the computation of shows that the FFT can be used to facilitate the computation of convolutions. The Fourier template f induces an isomorphism . This corresponds to the image algebra version of the convolution theorem.

w R v uv Q@UH 4

cu ap

RQuH 4

e s 27d  D  y 9 8 uS7 

H y UR

H cy G 4

" 1 ) %% % "   9 8 GFED'(#$&CB A   @ 7 4


, where

5 6
with

   

it is easy to show that

" 1 ) %%% "  320#('&$#!g

zw

where

Equation 7.2.2 represents the matrix formulation of the circular convolution theorem. Similarly, for each block circulant matrix C with circulant blocks of type we can dene a polynomial by

RV T 9 !WAUH S8

y y y x q q p X a ggg a p X p X yT a gg 'd $ V d $ d q &('B@V d d q a Y d q 7s d q CrA''g ggg x q V q pdX a g gg a VddX a YdXs T q V q pYX a ggg a VdYX a YYX R V T ''ha 'd ed wr&('Bv`eruPe7tra d ed eicA''hfe`cb`QAUH 9 8 R ) I AQFPH

where

such that

Fourier matrices. In the language of image algebra this says that if exists a template such that and

. Thus, circulant and block circulant matrices are diagonalizable by

and

ap R ap r ap H H ap tSd q rsS bR r3`q F k m l ki h R gH oEn'jDUbf

7.2.9

Theorem. The function

dened by

p  R H `Y eY ~}0x

Proof: If Eq. 5.1.1 we obtain

such that

p p p `Y eY  a QY eY  `Y eY 

From the denition of the Fourier template we obtain

331

R v QfPH 4

, and . Hence,

is a ring isomorphism.

. It now follows that

. Using this and

, then there

(7.2.5)

(7.2.4)

(7.2.3)

(7.2.2)

p `Y eY `Y eY p r sa p e  ca  s

R H x R a H }0$ru0x

Therefore, can be represented as the cyclic convolution of the two-dimensional sequences and (see also Section 3.6 and Example 3.10.3(ii)). By the Convolution Theorem we now have

Then

To show that is one-to-one, suppose that . Then and, since f is invertible, . However, circulant templates are determined by their values at . one point. Therefore, Q.E.D.

One of the most useful properties of the Fourier transform is that it converts convolutions into pointwise multiplications, a fact which is expressed by Eq. 7.2.6. Because of this, local algorithms for computing convolutions can be derived by deriving local algorithms for computing discrete Fourier transforms. For , dene by . Note that if is a one-point template with , then and . In addition, is a diagonal template. One-point templates and invertible templates provide a structure which is essentially the same as the ring . Suppose is invertible. Dene the following theorem:

Proof: The proof, which proceeds in two steps, is routine and we leave the details to the reader. The rst step consists of showing that is a commutative ring (this is trivial), and that is an isomorphism. This shows that is a commutative ring.
332

`$

" 3 1  54 20)

('& # $# %

6 7

3Q}f zS} S7 E

7.2.10 Theorem.

is a commutative ring which is isomorphic to

3Q}

The structure of

is revealed by

3Q7

` e $ ` e $ S s ` e$ s W wS s E s st` e S} d3rEdAQF!SUbFP` eS 0e

3`fUos

# A

" !

}0e `A o0B E w b d S7 & S}A

 

   

 

fr ! Qf

E}A 7 ` e

To see that

is onto, let

. Set and dene and extending t circularly by dening

Thus,

preserves the ring operations. by setting

!$ S

and, hence,

` e C` e fs` e
(7.2.6)

w(!} ` e

SeeC ` e }PQ S

The second step consists of verifying that the function dened by , where , is an isomorphism. This is also straight forward. For suppose with and . If and , then and, similarly, . Thus,
q (p D X fiV h q r fX D h S TR q V P QI!EC)@8 H G F D B A 9 P G 9 S  f j k D h D n H Uq5' CvH H fv f h q f h f Qh X q (p D D f h f q (p yr D X h  B q H 'b q (p D f h q q fqp0D f D @X V Qh `h q D f f q (p yxV D X h h H q r B Y EH f q (p D q V B Y at5'!W!8 X H b B 8 f H V B f iV h f D gedb X h 8 q (p D r @X f f D h h H IwvCutV G F D B A s r F F ~ !aR H tz H b B Y 'ca`W!U8 X H V B F q r

Therefore, . Note that we used Eq. 5.1.1 to establish this equality. In . a similar fashion one can show that The verication that is one-to-one and onto is just as routine. Q.E.D.
fiUsr'qpW!U8 V B 8 X H b B 8 o H V B h H b '!5'UmWU8 f V B 8 X H b B 8 f H V B

Thus, if methods can be found for implementing invertible transforms locally, then these methods can be used to implement a larger class of linear transforms locally.

7.3 Circulant Templates and Polynomials In the preceding two sections we dened translation invariant and circulant templates and outlined their relationship to the matrix algebra associated with the discrete Fourier transform. In this section we describe a family of relationships between circulant templates and the quotient rings of polynomial rings. These relationships show that the problem of nding decompositions of circulant templates is equivalent to factoring multivariate polynomials. For separable circulant templates, the problem reduces to the single variable case and is, therefore, equivalent to nding roots of polynomials in one variable. This is analogous to the polynomial factorization methodologies developed in Chapter 5. However, the underlying techniques are different. For circulant templates we use shifts and the Fundamental Theorem of Algebra in order to obtain minimal local decompositions. Throughout this section, x, y, and z will denote elements of , , x and y will denote indeterminates, and the ring of polynomials in two variables with coefcients in . We let denote the quotient ring of polynomials and (see Section 3.6). The circulant von Neumann conguration is the function dened by
H Qz R B q H } F } B 'wve|{ X z u x wyywytG v u X B F B F H F 4w!w!cuU CqH B B F H F w!w!cqB eE!vx X H F B tv  B F ~ vE0aR

In this section, the term local shall mean local with respect to N.
333

l p D

f f V f D d lmp D iHr)!B $yX h h q fiD f f (p D f D d $yX q h h g hh q H f B d eyX q d ff d yX q q r d $tf V d eyX n H b 'Q)!X f V B 8

'p

y ! 

Qd

` ! 4

Uw'$('UUg'$''i`

( ( ( 

' ( 

(' v$ (' a

qE!q 2 (4 (' m

waq v

7.3.1

Denition. For each where

, dene

by

EQ v

tg wftq'waqg

I)

or, equivalently,

Note that by dening

is called the polynomial representative of t.

we obtain

c w q'

which is identical to Eq. 7.2.3

( i! 5wav a

7.3.2

Example: Let

Cwg

Then

'''((Q('i''('$('Q't0v! '

7.3.3

The following properties are easy to ascertain:

while

Properties of

tgs E ! 

r0v ! 

1. 2. 3.

If or , then t is local. If or If , then the circulant transform vertically and j units horizontally.

0E` v ! 

7.3.4

Theorem. If

, then

0q

'vUs

I!qQ(

Proof:

For

, let

be given by

t =

denote the circulant translation dened by , then . Since s is circulant,

 

! " @Aa9i4"  ' 8U   7 w6u4"54     32!'@1 0 ) '"$h ( & % #  t  au     


'

. If

! " 

7 U

334

. Thus,
9 6 3

, then t is local. shifts all pixel values i units

(7.3.1)

(I) ,

Ac4R '`4R f Y "e S y b v b  H  E bc4R mf Y e S 'vu`0R f Y )e S $jily  H  E b  H  E f H e E b"0Rji$`0jihjily e v b R e f H e E b R e f H e E y b ` 0jihjilg {4R n n b v b y b c4R e j`4R e ` D0R e n
To prove Eq. 3, observe that since have that and

bd cR e f H e "2R E y bd

By denition of polynomial products in (see Section 3.6), the numbers , for , given by Eq. (I) are exactly the coefcients of the polynomial product .

b W U Y HG W U S ER PI HG C ca`XVT0)Q9FEDB

b HG E TuR tx v b HG E tr Aq wTuR 1sq i g phf b fR e T`"d

7.3.5

Theorem. For every then

Proof: It is not difcult to check that is one-to-one and onto, and we leave the details to the reader. Similarly, Eq. 1 follows from the fact that addition of templates is dened pointwise.

bc4R io`4R V` R mjil v b y b f H e E k n b R e f H e E y b `jihg"sV`4R d b R b R y b R `4`'c4"`w4"`W


, is one-to-one and onto. Moreover, if

b iG BR g G 5D0hs`

i g bG R y 194f

To prove Eq. 2, let and note that

be the circulant translation dened by . Now, if , then since

Y H y W y S `~{}|TE b xG tR v u tb f qR y b q ywAl8srR p
, we have that

A`R e mj)lrAR 1Tq Tj"sy b f H e E y b H G E t v f H e E l l H 4j64R e Eb G v f H e y E   s Y s S l s f "e 0buxjv"ut02XmGwtjv"u54l09"$ H E b R tb RR y   s` Y s S l s H 4A64R Eb G y b r`4R   s` Y A S b iG BR g 56{w

The desired result now follows by multiplying the equation by

f He E

335

. Q.E.D. , we , ,

Q.E.D.

fVo4R p y b z p

1 s = 1 2 3 and

r=

2 3

The following facts are direct consequences of Theorems 7.3.4 and 7.3.5.

and

The collection constitutes a class of mappings between image algebra and polynomial algebra that are almost isomorphisms. For , the operation of multiplication is not preserved (Theorem 7.3.5 Eq. 3). However, for , they differ from the isomorphism only by shifts. Thus, if any polynomial representative of a template t can be factored, then the template t can also be factored. It follows that the template decomposition problem for circulant templates is equivalent to the problem of factoring multivariable polynomials. We will use this fact in order to show how any separable circulant template can be implemented locally with respect to the von Neumann conguration. Since the von Neumann restriction simulates a nearest neighbor mesh-connected array of processors, the methods we develop can be used on such machines. Additionally, we shall provide upper bounds on the number of parallel steps required.

7.3.10

Denition. 1. 2. 3.

If

, then

, , and .

336

X 96u4`0 96u4o ju4`"ju4oaju4 T T6X 56{4

7.3.9

Corollary. If , , and , then , , and s represents a circular shift where units vertically. Moreover, s can be replaced by a template horizontally and represents a circular shift i units horizontally and j units vertically.

6u4 Tu4

A0 6u0 4jj2s'l~j0 Tu irj0 ju4'1T A6u4 awA`T 1945 l294|X 9D4

7.3.8

Corollary. Let

j o 96u4om  j )o 80Aoj Vp )o 86j6u0m l9 l 6u4o

pDs')

7.3.7

Corollary.

is an isomorphism.

lc D4 4 jsV" 0 jlc4 4 io`0 0 m

, , where

, and

'l`}pl`}5`4y0 c

gl}l}c4y4 c

Thus, multiplication shows that

and

. If

"209 'cj~"00 m"

7.3.6

Example: If t denotes the circulant template from Example 7.3.2, then Also, , where

. Simple polynomial

, then . , units which

is an isomorphism, is separable if and only if there exists polynomials p Since and q such that . It follows from the preceding corollaries that if t is separable, then for every there exists polynomials and such that . We shall use this observation to provide a systematic method for factoring any separable circulant transform into local transforms with respect to 4connected processor arrays and give upper bounds for the number of parallel steps required.

1. 2. 3.

of these steps consists of horizontal or vertical shifts of the entire array by one location, of these steps consists of at most one addition and one multiplication (possibly complex) per pixel, and one of these steps consists of at most one multiplication per pixel.

such that Dene circulant templates for and for . By property 7.3.3(1), each of the templates is a local template. In fact, it should be obvious that these templates have the following geometric representations:

p =

, which implies that

. Similarly,

. Hence, by

Corollary 7.3.9,

337

w9x

C pl

y mq # z P iP

P 19xxmVxwx!dx

By our choice of p and q,

" " w "{ " " w C``xSixi`V@T`xSixm " " " o p 7CxSP5`7p % t A p % SdVHS@9 c b " " " o p d`Sxi5`7p p %  c b "% 8 2 p %  c 1!STrVP!Sb " " w "{ " " w " " dd`Sxixi59@CxSPxm``

-p 1

. Furthermore, by Theorem 7.3.4,

a`PxSP55xPSxix`xx`x`dt  t " " w t "{ 2 " " y 2 " w 2 " "

where

q =

-q

% A ts % 8 2 p % A" 8 U!7!7rVPdsrTiV 6 4 2

Proof: Since t is separable, there exists polynomials p and q such that By the Fundamental Theorem of Algebra

"% t A s s s % y t A% w t A p % A t  ~ | %{ 2 8 s s s % y 2 8% w 2 8 t p % 8 TS!dxSzxn9Vxn9x1U97`x}5auV5xSzx`vu9Vx`vu9Usr!P2

 ag j h ig k dd`"Pu@!fp % A" 8 6 ) ( ' p D UTi! 4 2 0  %" 9Br9 p

j  j q e o j j pnmj j l e " fVx@!ffp e A" 8 6 ) ( ' p D %UT@9 !4 2 0  % $"    fT#!ey

7.3.12 Theorem.

Suppose is separable and Additionally, let and , then the circulant transform local parallel steps. Moreover,

% A v t s % 8 v 2 p % A" 8 U9xu1r9xUwT@9 R 4 2

$  Y W % % A " 8 R4 2 ) ( ' F D% A " 8 64 20 ) ( a`XVUT@!S!5QPIHGECB@97!531' v t

vU2 $  daY % A t s % 8 2 p % A" 8 g U!7u1r9rqUTiV h4 2 % $"    fT#VeHd

% $"    &#!

7.3.11

Denition. If y is a minimal point for t.

and

, then we say that

% 2 8 p % b "% A Sd&u9sxV c U97t

! P

c Sb

is a minimal point for t. . If and can be computed in at most

This equation expresses t as a product of local templates. The number of steps required to implement the circular convolution transform is also given by this equation; namely, multiplication steps and shifts. Q.E.D.

To provide a specic example, suppose that X represents a array and t a rectangular separable circulant template. Then and . Hence, if , then can be computed locally in 60 parallel steps consisting of at most one multiplication and addition per pixel, one step consisting of one multiplication per pixel, and a total of 28 unit vertical or horizontal circular shifts. Since the computation in its original form required 900 multiplications per pixel, it is clear that the decomposition is far more efcient with respect to the number of arithmetic operations as well as parallelism. Nontrivial examples of such templates are the discretization of the Marr-Hildreth edge operators [16]. Another systematic method for decomposing separable circulant transforms into local transforms is given by the next theorem. This theorem also avoids complex multiplications.

Proof: We can write

as

, where each

polynomial with real coefcients and . For each , dene property 7.3.3(2), each is a local template. Furthermore,

Therefore,

, where s is a shift template.

where each

is a monic quadratic polynomial with real coefcients,


338

7 8 56

If the second hypothesis of our theorem holds, write

as

, and

g h

If , then we can choose s to be a shift of then we can let s be a shift of can be executed in steps.

units. If , units. In either case, the shift

2 c G E9 HX@ q p 7  56 i &B G E9 @n mG E XFHaoX9 B @ f l !bT9 Y 4 P k c U GS

GG E9B @ HFDCA9

786 52 2 04  31) $ (

de Hj3 e f iU d dG 9 e q f qG 9 aU 2 I &B i B f y HwvS x c U 2 2 7 5 7 8 56 i &B f i &B I I q6 p2 Y Q fhY Ec U G u G `DB 9 tP geW s!rDB 9 4 P geXd!bTa9 4 P `XVTD9 RP fhY W Ec U GS Y W E U GS Q

r! $

" 

GS Ta9

Y4 P

' % r9 &$ $ # !s B Qx "

V 

pG9r9 s

2.

is a monic quadratic . By

  d     

v& l 9r9T Ps

1.

If for some and , then the transform can be computed in local parallel steps. Furthermore, of these steps consist of vertical, circular unit shifts of the entire array, k of these steps consist of at most two real multiplications and additions per pixel, and one of step consists of at most one real multiplication per pixel. If for some , then the conclusion of part (1) holds with k replaced by .

G E9B XFDC@

dP

variable

. Let

r!5uUT@!S5

V! vTEep

7.3.13 Theorem. Suppose

is separable and be a minimal point for t.

is a polynomial in one

q

H SUfU

v& 

Sdi

pGd

a n 7

is

The remainder of the proof is now identical to the latter part of the proof of part 1. Q.E.D.

If , let denote the smallest integer greater than or equal to r. The following is an easy consequence of Theorem 7.3.13.

The templates corresponding to the quadratic polynomials that result from the decomposition of t as given by Theorem 7.3.13 or its corollary are depicted in Figure 7.3.1.

a0 qi = a0

pi =

a1 1

Figure 7.3.1 The quadratic templates resulting from the decomposition technique used in Theorem 7.3.13 and its corollary. The rationale for establishing the relationship between circulant templates and the quotient ring of polynomials in two variables is the same as that for establishing the relationship between templates and polynomials discussed in Chapter 5; the relationship provides a method for decomposing separable circulant templates by factoring (or nding the roots) of corresponding polynomials in one variable. Although nding roots of polynomials can be a numerically unstable procedure, many computerized techniques have been developed that are capable of factoring polynomials exactly [5, 10, 13]. These techniques can be applied in our methodology for developing parallel algorithms for computing convolutions.

339

TeT`

 H 8

 hTwt t 8y

t. If

j  at b H p 8y py d  8H| t

7.3.14 Corollary. Suppose t is a separable circulant template and

is a minimal point for , and , then the circulant transform can be computed in local parallel steps. Moreover, of these steps consist of vertical and of these steps consist of at most two horizontal circular unit shifts of the entire array, multiplications and additions per pixel, and one of step consists of at most one multiplication per pixel.

  ~| H`| dt `qdC}

 | pF

Obviously, an analogous theorem holds for

z &s z &s 8 z  ` r | { v  r | { v yex ~ t  r | { v  r | v oy`x ~ !t T| { v s s

with

a1

s r

a monic linear polynomial with real coefcients. Dene local templates . Then

as before and set

z   ~ | } | ex { v t XFHAywur sA

7.4 G-Templates In this section we generalize the notion of a circulant template by introducing the concept of Gtemplates. The concept of G-templates was rst introduced by P. Gader [7]. Gaders generalization of circulant templates grew out of an awareness of the possible uses of Cayley networks as models for parallel computer architectures and the importance of translation invariant transformations in parallel processing; these generalizations were also inuenced by observations that the discrete Fourier transform is related to the theory of group representations [2]. G-templates are translation invariant with respect to Cayley networks, which are networks whose underlying graphs are the group graphs of some nite group G. Since Cayley networks have been investigated as possible models for parallel computer architectures [15], Gtemplates have potential applications in the eld of parallel image processing. Roughly speaking, a G-template is a template which is translation invariant with respect to a digraph induced by a neighborhood conguration which admits a group structure. In the case were the conguration is the von Neumann conguration, the group turns out to be and the set of all G-templates will be the set of all circulant templates on X. For general congurations, the set of complex-valued G-templates is a linear algebra over . The details of this section reect much of Gaders initial work. For the remainder of our discussion on G-templates we let X be a nite point set, N will denote a neighborhood conguration on X, G will denote a nite group (written multiplicatively), and images will be complex valued.

A color-preserving automorphism of a Cayley color graph is an automorphism of the digraph with the additional property that for every edge , and have the same color.

It is not difcult to ascertain that the set of color-preserving automorphisms of is a group under composition which is isomorphic to G. Such an isomorphism can be dened by using the mapping rule , where and is the automorphism of dened by . Note that this implies that the group of color-preserving automorphisms is the same for every group graph constructed using the generating sets of G [3].

340

s 

  3tb21

1 1 t !"q`6T8 T5

7.4.3

Denition. Let and be digraphs. We say that if there exists a one-to-one and onto function .
4s

is isomorphic to if and only with the property that

y y

  H

) % 0(

8 F  "`! p  8Fu

7.4.2

Denition. An automorphism of a digraph the property that

is a permutation

with

If

and

, then we say that

is colored by

, or that

qFF

F

1eRtTyts

7.4.1

Denition. Let be a set of generators for the group G. The Cayley color graph, or group graph, of G with respect to is the graph , where and such that .

HhH!

% &

e

 `

'

h0y

 C! 8 

`

has the color

% &

# $

In Section 5.8 we dened the digraph of a neighborhood conguration N on X. If is isomorphic (as a digraph) to for some group G and generating set , then the isomorphism between the digraphs induces a group structure on X which is isomorphic to G. In order to demonstrate this we shall need the following denition:
A @ 8 '97 A @ I H 2P28

7.4.4

is said to simulate the group G if and only if Denition. The pair to for some generating set .
A @ 8 B97

is isomorphic

Dening the desired binary operation by , we have that . To check that is indeed a group is a routine matter and, therefore, omitted. Q.E.D.
b A r T p 8 w!V A A r 8 V A p 8 V 8 x v V s r T 5!ww5ygwut&qp T A T I H g258 A r8 V A p 8 6(!V

Unless otherwise mentioned, we shall identify X with G whenever simulates G. Also, whenever we write X as a linearly ordered set , we shall assume that , where e denotes the identity of G. Finally, note that if is any one-to-one and dened by . onto function, then there exists a corresponding function Conversely, given a one-to-one and onto function , then there exists a corresponding function dened by . Pictorially we have the following two commutative diagrams representing these cases:
|

X
}

G -1 and -1 X

G X

341

! s ww!&y  ~ 

c!D

9 3 

&m~

22!

7.4.6

Denition. Suppose simulates G. A template only if for every color-preserving automorphism holds. We denote the set of all G-templates on X by

For this reason we shall use

to denote either map. is called a G-template if and , the equation .

d b ep

A 5w568 Qv us!l A A p 8 V 8 l x V b A p 8 p

A @ I H S28

FoYnF&Wml x Qv

F ihgfV Y H W

p I RQI

H rqml Y H W p

H rtl Y H W p

p I p b H

F b A A F 8 C 7 dea35Q3!8

{ { A v x zwz8 Qv !l qxDw6l V y p y V b A v8

H b A A @ 8 7 dca'!958

digraphs,

A A F 8 C 7 535Q38

A @ I H U258

Proof:
X

Since
X

simulates G, there exists a one-to-one and onto function for some generating set of G. By denition of the respective and . Hence, .

A T I H E28

A @ I H S28

7.4.5

X Y `A '!98 A @ 8 7

A d b kuwA !ji!68 p 8 V I g hg f

A F 8 C 3R37

in

A @ I H 22!8

If

simulates G, then we assign to each arc in

the same color as the associated arc

Theorem. If simulates G, then there exists a binary operation is a group which is isomorphic to G.

on X such that

A @ 8 '97

A @ 8 B97 G

A F 8 C 3ED7

A F 8 C 3!Q37

Y utl F W

The set of G-templates is, in a sense, the same as the set of templates that are translation invariant with respect to the group graph or since color-preserving automorphisms are essentially translations within the group. The next theorem shows that G-templates are indeed generalizations of circulant templates.
U gq`u '9 w Q3

7.4.7

To verify that , recall that the set of all circulant translations on X is a (Theorem 7.2.2). Also, G is group under composition which is isomorphic to isomorphic to the group of color-preserving automorphisms of for any ; this follows from the assertion made immediately following Denition 7.4.2. Therefore,
35Q3 3DnuwwwPU!a E2 9 3t9 3

where the symbol is interpreted as is isomorphic to. Thus, a mapping is is a circulant translation. By denition, a color-preserving automorphism if and only if holds . Therefore, .
9q3u9q53

Q.E.D.

The theorem establishes the algebraic structure of the set of Gtemplates for the special case where . In this case is identical to the ring of circulant N is the von Neumann conguration on templates. The next theorem reveals the algebraic structure of the set of G-templates for the general case.
9 !D

7.4.8

Theorem.

is a linear algebra over

Since scalar multiplication is also dened pointwise, we have that . It now routine to check that is a vector space over . This shows that the rst axiom of a linear algebra is satised (Section 3.9).
342
'Dw9q5D' 9 !3

ga9 3

that

9 !3'

9 3

9 3

Proof:


Let

. Since template addition is dened pointwise, it is clear that . The zero template . Hence, using Theorem 4.9.3, we have is a commutative group.

a35Q3!f3a6

ea!R92S

6B

9 !3

`RE

U

559!a!

&uqga!gE2&`!ug!

"'g

sa6

29!E'!n

&

 

Let

. Then . Therefore, for some . This implies that that converse is just as easy to show. Therefore, simulates G.

and

on

a9gakg!wP&akf

a35RD5"a

a3!ED5

5'950

Proof: Thus,

Let

, and the identity map. is one-to-one and onto. Hence we need to show that . or, equivalently, . But this says . The

9q!3e9q3

nge

Theorem. If the group

and N denotes the von Neumann conguration, then (written additively). Furthermore,

simulates

x5'9!f"! $q32

Therefore, , which shows that is closed under multiplication. According to Eqs. 5.1.1, template multiplication is associative and both left and right distributive over template addition. This proves that the second and third axioms of a linear algebra are satised. is clearly an element of . In view of the The one-point unit template pointwise multiplication of a template by a scalar, it is also a simple routine to check that . This veries that the remaining two axioms of a linear algebra are also satised. Q.E.D.
9 3  9q 3

This establishes the fundamental algebraic structure of generalized circulant templates. In the next section we shall delve deeper into the algebra of these templates.

7.5 Group Algebras and G-Templates Group algebras were rst discussed in Section 3.10. In this section we will show that the set of all G-templates for some conguration N is isomorphic to the group algebra over of the group corresponding to N. Group algebras arise quite naturally in the study of linear representations of groups. These representations furnish another description of the set of G-templates. They also provide necessary and sufcient conditions for determining the invertibility of G-templates. The topic of group representations has been in existence since before the turn of the century when Froboenius rst dened group characters [12]. Since its early formulation, this topic has seen applications in physics and chemistry as well as in group theory. It is fascinating to realize that a subject developed at the turn of the century has now applications in the theory of parallel computing. Let X be a nite point set that has a multiplicative operation which provides X with an abelian group structure. Let G denote this group and let . The elements of the group algebra are formal sums of the form
 3 

343

w! Q

R!

 4wU

!

&

2 0 ) " S!R1(2'

! 

Q 6

8 97

R! R

4 5

 " $ &2%

 

  9q3

B!

R!

" " #"y

t t

&

Thus, since

is onto, we have

u R!Ewz!Q

25

s!

( 2  "

2R

Let

a color-preserving automorphism of

, and

 '

. Note that

(7.5.1)

d Hmd A @ V S hE gI

sx

GF

1 v  p9wA  e v u h r su Y d

V |V h

r qY

@Sk1fpqpspaV h @Sk{fzV e @SByxk f kS d u w v f p p p f u f r 5qstsd pA nTV A Bk F d @S q o b

We let denote the natural vector space isomorphism so that if is given by Eq. 7.5.1, then is given by . For the remainder of this section we shall write images in terms of their vector representation . Clearly, and are not isomorphic as algebras; image multiplication, which is dened pointwise, does not correspond to group convolutions under f. However, we can dene a new product on that will turn into an algebra which is isomorphic to . Consider the group convolution

e fI

This shows that h is a vector space isomorphism. According to Theorem 4.4.3, the vector space also isomorphic to . We have, therefore, established the following result:

Y I

d V b S P c d

V sh V sh

r qY r qY

e v 9A A @A P yd GF r qu Y h e v 9wA A @VA F P d BG S r quY h F f p p p f h F f e F S 9gqsiG&d F f p p p f h F f e F S d V b S P g9qsigGsyRcaqy

V aacb &d S P V S P x x x t r sY r qY Vh fqsqh e sh p p p f f S V F f p p p f h F f e FS ggsq1gd x x x r qY r qY h F f p p p gsqf h h gf e F e d FS V h A @ V A x e v R9A h r qu Y x A F GS h A @A F h e v 9A r quY e v 9A r quY P &d

A @ A

P d &V t

b S aP I C 

A @ BA

x e v y9wA h r quY d

f V sh

r qY

F f p p p f h F f e F S d V b S g9qqBigG&RcaP Y `I W V U S I Q XHTR&P

where The map

and

I C A &HGF

E C A &DB@

where

7.5.1

and

and

Theorem.

is given by Eq. 7.5.1, is clearly one-to-one and onto. Also, if

, then

and

(see Section 3.10). dened by

are isomorphic vector spaces.

344
t ~ hb e I e I e I V E S }TI I C k d V b S e mlTcBi I W V S I Q e jfhE g9i e I V S hE gI

is




 g

p |g 

} g m g c y &|c g 

9 c 

R zc 

m m

 g   &

tx

1 |

R B {

z 

c

G q h

R B {



H g

is isomorphic to the group algebra . This isomorphism It now follows that the algebra provides us with the convenience of letting the elements of represent the elements of .

g &



q  |q c

 |q

1 q

q 

The element

is of form

, where

, while

ympD

since

f Hg { qg c  | B 1 q s

. But

by

such that

cBR

T B

7.5.2

Example: Let G denote the group with the operation of addition We make X into a multiplicative group by dening

If

, then

f5l

where

x

Thus,

7.5.3

Lemma. Suppose corresponding to dened by

is a circular convolution.

simulates G, , and . If

iDB

&m 

where

Proof: Let

represents the identity of X, then

. Since the map

and

Therefore,

is given by

. Equivalently,

. By dening the convolution product of two elements , we have that .

345

is a G-template.

is a group isomorphism, we have that

denotes the color-preserving automorphism denotes the parametrized template

is given by

Q.E.D.
|c

 B

For each , let denote the corresponding parametrized G-template guarantied by Lemma 7.5.3. By denition of we have that . This shows that is onto. In order to show that is one-to-one, suppose that . Again by denition of , for each . Let and a color-preserving automorphism with the property . Then for each . Since is an automorphism, we have that . Since y was arbitrarily chosen this shows that . We have left to show that preserves the algebraic operations. Since addition and scalar multiplication are dened pointwise on both and , the equations and follow immediately.
" 0  6 ~ "  6 E DCiuCxw} " y  6 E C|{ " 0  6 E DCxwv "  6 E DCp "   &  $ 1 0  (54%uoc  a a a   ebbttc E fEe" V Fd T  Gn0 E 6 6 " p  WD0 " T  HtXQ I GtSQ I 0 E " T  d " $  & %yxwg" bd Wv9Pbur" Y Htsr" V WH 1 " Y f T  p  a a a  T  p  T  p  a a a   ebbtikji E 6 6 6  1 T l " T  g 83mFcSGF9X0 E " T  g " " T  d  g WFSGhgtFH9X0 E " " T  d  g d "  6 DCAC6 E " 0  E qp p WC6 E " " p  0   x 1

Let

, and

Note that if , then is identical to the map dened in Section 7.3. At the end of Section 3.4 we mentioned that every nite group G is isomorphic to some subgroup of or, equivalently, to some subgroup of , the group of all permutations of G. This fact, known as Cayleys Theorem, allows for the representation of G in terms of . The study of group representations has become a formal theory in its own right. The theory of representations is closely connected with the theory of algebras. It deals with the problem of mapping an abstract group, ring, or group algebra homomorphically (i.e., without destroying the algebraic structure) into the more concrete group or ring of matrices or (equivalently) linear transformations of a vector space. For our purposes, this theory provides another description of G-templates in terms of the representation of the group algebra .
346
%) P i ' u89G

7.5.5

Corollary. If s and t are G-templates, then

C`DC

mC

Thus, 3.10.1 that

. However, since G is a commutative group, we have by Theorem and, therefore, . Q.E.D.


W 

gtp

Y Xf

s DuT

F

DC

5 Q I Feb0 E " " T  

XDuA

bC

PC

qFF Q I FC{ E " T y E " T 

C`DC DCt C DCtv C mC 3

"  p W5 Q I E "

and

, we have that

E " 0 p  oqC6

buf

h " " Y f d T  Q I 0  a a a  " Y T  Q I 0  " V T  Q I 0  igPbeSRXc9Pb9!P`HPRXC!DWUSRPHGFDC6 E " 0 

s T v (yE

" $  %)&

" $  & %)BA(54%986 @ "   &  $ 7

Y f

"   &  (54o$

s T DuvQ I 5FgDvXQ I FFeb0 0 E " " T    0 E " T  

p 0 E ony z

" 0 s r  6 DXC'DCDtr E " 0  6 s

"   &  $ 1 (54%320

Proof: Let

and dene

by

" $  %)&

"   &  (!'%$

" #!  

7.5.4

Theorem. If

simulates G, then

is isomorphic (as an algebra) to

" 0  6 p "  DC`C6

. Since

which shows that . This essentially shows that is a group. The group is referred to as the k-dimensional linear representation of G. The map is only a homomorphism. We now turn our attention to isomorphic representations. As with identity . For before, we let G denote the multiplicative abelian group each , let denote the permutation dened by the rule . Denition. A right regular representation of is a representation of the form . A right regular representation of is a representation of the form
) G t WU )  # C

7.5.7

where

is a right regular representation of G.

Note that for a right regular representation of a group G the cardinality of G equals the dimensionality of the representation. In fact, right regular representations are isomorphisms. Note that there is a different right regular representation of G for every different ordering of G [8].
g %

According to our denition,


. Thus, it is clear that any

representation of G can be extended to a representation of . In fact, G can be considered to be embedded in via the map , where represents the ith element of the standard basis. Hence we can dene and extend linearly. It can be shown that multiplication is preserved [11]. Henceforth, we use the same name for either representation; that is, we take .
y ( P

347

The function denotes the restriction of the isomorphism dened in Section 4.9. The conclusion of the theorem is that the diagram
) (

  h

, then

Theorem. Let this ordering. If

and is a right regular representation of

%i

Pbt

7.5.8

be dened relative to .

tx

HW

P e

DkCD

uec#!9yb

bPt

tb

 k

Wc9bPu

Xry

Ht

Ws

h C

k Uy

%9

Therefore,

. Similarly,

X

bH

bB

Suppose such that

is a representation of G and e denotes the identity of G. If , then

and

seCD

7.5.6

is a group homomorphism A linear representation of a group G over for some integer . A linear representation of the group algebra over is an algebra homomorphism ; that is, preserves sums, products, and scalar multiplication. Denition.
 CR F x y CD3

!  " 

DkCD

This concludes our algebraic characterization of generalized circulant templates. In the next chapter we shall examine some practical applications of these theoretical considerations.

FGYIPUSaYQP4 T bQP"zwQPEzxEFQPIba` 66 )4 H4 R C A 6 ) V R R C A 6 )4 C A 9 8 A 66 )4 H4 ghYeArPfQP4 tis 6GY4HzA T g WQarhg f 6 v ) V v f v ) A f e e v g ihv A fhge f D6 YGxhg j g v4 ) A f f v QA l 9 SA p 6 f bG) 8 v4 v v A y v g GzGWtdv ff A 6 )4 xrGYEC V T
and . If we also have . This implies that and

v f v ) A 6f v V y s6 )4 H A 6f v4t s6 )4 H A f ST g WGirPPQb4 T PubGYIxwYGYubQPIrqpgPe V


Proof: Let , , , and

6 fe4 A 66 )4 H4 ihgFbdcFGFIba`

6 )4V T R A 6 )4 6 )4 C A 9 6 4 2 0 GYXWUSQPIH GFEDB@8 75 "31)

' #

&

G(X,C)

M (C)

$ (

is a commutative diagram.

Now let

Figure 7.5.1

, and suppose that

C(G)

pxp

for some triple

6 ol nl hpUbmk 4

j g f dA ipge h

A @o f j xA pgfhgw d

w v A v v } v A ue G dT ~ r|{v v v A u v g Qr7Qtdv n A 6 srpk 4 q fhge d a G ihg S78 g f A 6 f 4 A 9

we have

348

for some l, then . Since

. Therefore,

. Then

and, therefore,

Q.E.D. . Then

Bibliography
[1] H.C. Andrews. Computer Techniques in Image Processing. Academic Press, New York, 1970. [2] L. Auslander and R. Tolmieri. Is computing with the nite fourier transform pure or applied mathematics? Bulletin of the AMS, 2(6):847894, November 1979. [3] M. Behzad, G. Chartrand, and L. Lesniak-Foster. Graphs and Digraphs. Wadsworth International Group, Belmont, CA, 1979. [4] R. Blahut. Fast Algorithms for Digital Signal Processing. Addison-Wesley, Reading, MA, 1985. [5] J.H. Davenport, Y. Siret, and E. Tournier. Computer Algebra. Academic Press, 1988. [6] P.J. Davis. Circulant Matrices. John Wiley and Sons, New York, NY, 1979. [7] P.D. Gader. Image Algebra Techniques for Parallel Computation of Discrete Fourier Transforms and General Linear Transforms. PhD thesis, University of Florida, Gainesville, FL, 1986. [8] V.E. Hill. Groups, Representations, and Characters. Macmillian, New York, 1975. [9] T. Kailath, B. Levy, L. Ljung, and M. Morf. The factorization and representation of operators in the algebra generated by toeplitz operators. SIAM J. Appl. Math., 37(3):467484, December 1979. [10] E. Kaltofen. Polynomial time reduction from multivariate to bivariate to univariate integer polynomial factorization. SIAM J. Comput, 14:469489, 1985. [11] R. Keown. An Introduction to Group Representation Theory. Academic Press, New York, 1975. [12] W. Ledermann. Introduction to Group Characters. Cambridge University Press, Cambridge, 1977. [13] D.R. Musser. Multivariate polynomial factorization. Journal of the Association for Computing Machinery, 22(2):291308, April 1975. [14] A.V. Oppenheim and R.W. Schafer. Digital Signal Processing. Prentice-Hall, Englewood Cliffs, NJ, 1975. [15] H.B. Sexton. Cayley networks as parallel computer architectures. In Cooperative Research Associateships tenable at the Naval Ocean Systems Center. National Research Council, Washington, DC, 1986. [16] S. Winograd. On computing the discrete fourier transform. Math. Comp., 32:175199, January 1978.

349

CHAPTER 8 INVERSION OF TRANSLATION INVARIANT TEMPLATES Inverse problems have come to play a central role in modern applied mathematics such as mathematical physics, in imaging areas such as computerized tomography, seismic imaging, remote sensing, and image restoration. The importance of the Fourier transform would be drastically reduced were it not for its invertibility. In this chapter we are concerned with the inversion of transforms of form , where t belongs to the class of general translation invariant templates. Rosenfeld and Kak [17] explained the equivalence between the Wiener lter, least square methods, and the problem of inverting a block circulant matrix with circulant blocks. In 1973, Trapp [18] showed how the discrete Fourier transform can be used to diagonalize and invert a matrix that is either circulant or block circulant with circulant blocks. While the algebraic relationship between circulant matrices and polynomials was completely formulated by Davis [2], it was Gader and Ritter [5, 16] who established the connection between polynomials, circulant templates, and G-templates. A consequence of this connection is that a circulant template t dened array is invertible if and only if its corresponding polynomial has the property that on an for all and (Section 8.2).

8.1 The Radon Transform Our interest in the Radon transform stems from the role this transform plays in the invertibility of G-templates. Prior to examining this role, we provide a brief overview of some basic concepts associated with this transform. In the classical setting, the Radon transform involves the evaluation of integrals of real-valued dimensional hyperplanes. Techniques from Radon transform theory functions of n variables over have been successfully employed in medical imaging (particularly computer aided tomography), in radio astronomy, and in non-destructive testing. Less well-known are applications in representation of Lie groups and applied statistics [6, 10, 1, 4]. For functions of two variables which are of major interest in image processing applications the Radon transform reduces to a line integral. For a continuous function , the Radon transform of a, denoted by , can be found by integrating along a line L given by the normal equation

(8.1.1)

where denotes the angle between the xaxis and the line perpendicular to L, and distance from the origin to L. Figure 8.1.1 illustrates the normal form of L.

denotes the

351

G 

"1

7"PB"

z 3d

xd1z r

GF

S w

a 3 a 3

wYG
8.1.1
Example: Let

c tPtP G
is given by the integral

BtP c tP
Solving for x and y, we obtain

tP1 3 P37
The parametric equations for L are given by

Therefore, the Radon transform

Figure 8.1.1 The normal-form representation of L.

be dened by

352

wwS

(8.1.4) (8.1.3) (8.1.2)

W bGY dY

Graphically, a represents a disk of radius 1 (Figure 8.1.2.)

1 1

Figure 8.1.2 The graph of a.

The limits of integration are found by substituting the right side of Eq. 8.1.3 for x and y in the equation . Substitution yields and, hence, (see Figure 8.1.3).
353

8 9

7 5 S R

7 Q 8

 4"

7 P 8

I 4"

G E 8 H 8 FE

7 A DC

A B

where

& !

 %

 " $#

 !

) 1 0 @89 7 5634 & ( '   1) 20

 

  

 YG

( '

YtGY

dYG

Since

for all points x outside the circle of radius 1 we have

L
- 1- 2

Figure 8.1.3 The limits of integration on the line L.

In practice, the Radon transform of an image a is given empirically by sensors. These sensors count the number of photons that are emitted from an x-ray source and pass through some material body such as human tissue. Different tissue densities will absorb different amounts of photons. By knowing the amount of photon energy emitted by the source versus the amount of energy received by the sensor, an is obtained for a xed position of the x-ray source and sensor. Specically, approximation of

where A represents the number of photons that are detected by the sensor and C denotes the number of photons which are emitted from the source; i.e., C corresponds to the number of photons that would be received by the sensor if no obstruction were present. In actual tomographic imaging, the value C is usually precalibrated. The typical method by which data is collected for transverse section imaging in computer tomography is indicated in Figure 8.1.4. The goal in computer tomography is to reconstruct the image a from the measurements . Since represents the amount of energy absorbed along the line L, it follows from Eq. 8.1.4 that corresponds to the absorption capacity of the tissue at location x. This absorption capacity corresponds to the tissue density at location x.
354

b x X wv ecay

h wv y x wv t b ph gXdb `X V ia4usaaacerqU

T b ph gXdb `X c2iefecaYWVU b X e` b ph gXdb `X V 2earqU

O
1- 2

(8.1.5)

source

z=a

z=b

sensor

Figure 8.1.4 Data collection for computer tomography. The image a to be reconstructed is rectangular and contains the area of obstruction (shaded area) such as a cross section of the human body. The support of the image to be reconstructed corresponds to the area of obstruction.

In the formulation of Eq. 8.1.4 there is an important difference between the domains of the image function a and the function . In polar form, the image function a is dened for pairs of real numbers which represent the polar coordinates of points in the plane (Figure 8.1.5). The pair of real numbers in the domain of on the other hand, is not to be interpreted as polar coordinates in the plane. Roughly speaking, the operator associates with a function a over space another function over space, where each point in space corresponds to a unique line L (determined by ) in space. The basic relation between and is given by

355

ge d roq!

me l o

ge d qor!

me l oe

ie h kjc!

g { m z yw d t }|exvul

me l oe

cer

r

%ioec! h me l oi me l oe ces

me l c2e ie h pon ged %2f!

region to be reconstructed

(8.1.6)

where

. Note that the integral

where , is an integral over a circle of radius q with center . Although the exact details of 8.1.8 may seem a bit obscure, the implication is clear: the value is uniquely determined by the set of all its line integrals; the integration is with respect to all values of and the partial derivative is with respect to the variable . In computer tomography one deals with only a nite number of receivers. It is, therefore, impossible to calculate all the line integrals. The basic geometry for data collection is shown in Figure 8.1.6. The source and sensors are on opposite sides of the object to be reconstructed. The sensors reside on a
356

~ rsre

0 %n6n~ ~ ~

~

Reconstructing the image a corresponds to inverting the Radon transform solved in 1917 by Radon [15]. Radon proved that

F4e

4Ye

 }or!~

kp!~ 0 q0qu9 %

c0 }!%@nc ~ ~

~  e9kex0fo#0q}u %roq!~

It is easily veried that transform is given by

. Hence the polar form of the Radon

c2~

 %2qe~

Figure 8.1.5 The relationship between

and

px09ec ~

  ~ ! qoqec j ~ csace~ n~  ~ Y#e

(r, )

(8.1.7)

. This problem was

(8.1.8)

detector strip and the source and detector strip move in unison around a common center of rotation. The x-ray source assumes m distinct positions during a stepwise rotation (indicated by in Figure 8.1.6). The detector strip contains sensors spaced equally on an arc whose centers corresponds to the source position as shown. For each position of the source, measurements are obtained. The total number of measurements (i.e., the number of line integrals) is, therefore, which is not the innite number of measurements required by Eq. 8.1.8. Hence, there is no hope for exact reconstruction.

y s0 s m-1

s 2 s1

rn

r0 r-n

detector strip

Figure 8.1.6 Fan beam with spinning scanner for data collection using a single source and multiple sensors. There are other problems as well. According to Eq. 8.1.5, the actual measurements only approximate the corresponding line integrals. The left side of the equation corresponds more to a sum (count of the number of photons absorbed) than to an integral. Moreover, by using digital computers, only nitely many values of a can be reconstructed. These problems lead to the discrete treatment of the Radon transform and its inversion. The formulation of the discrete Radon transform provided below is the one most suitable for our subsequent discussions.

Note that in this denition the integral of Eq. 8.1.4 has been replaced by a sum and the line L by the set . In the case where G is the group (with the operation of addition ) and a digital line, the value represents the sum over the line . This
357

H0

! " D     0 1 s

 

ac

r S$

$ 0FqD

8.1.2

Denition.

Let , where on S is dened as

, G a nite multiplicative group, , and . If , then the discrete Radon transform of a based

rj

source

si

sensor

rj

q}er

0fuqf

B#}


 )

' c( # %# & $ %

(8.1.9)

shows that Eq. 8.1.9 does indeed represent a simplied discrete version of the Radon transform. This simple version has found applications in applied statistics. For example, Diaconis [3] applied this version to the analysis of syllable counts in Platos Republic. For each sentence in the book, the syllable pattern in the last ve syllables was recorded. This provided a binary vector in . A function was dened which counts the number of sentences for each pattern. The function a was then analyzed (characterized) by considering the Radon transform for various choices of S. It is natural to inquire about the choices of S that characterize the function a when the only available data consists of sums over the translates of S. We explore tis topic in the next section.
C A 5 3 2 8 DB6@97 5 3 642

8.2 Invertibility of the Radon Transform and G-Templates. The fundamental question that arise in connection with the discrete Radon transform is whether or not it is possible to invert it; i.e., whether one can recover (in principle) the function a from the data provided by . This question is closely related to the invertibility of G-templates. In this section we present necessary and sufcient conditions for the invertibility of both, the discrete Radon transform and G-templates.
iyf b g Y S g w P t RH b i g f UdUvusrqph9b Y c edb P Y X WH T a`B1VUS R

8.2.1

Lemma If , then there exists a set such that , then there exists a G-template t such that Conversely, given a non-empty set .
Y c xb Y S g w pP t b RH

358

b i yuP srb RH

7 ~i R

According to Lemma 7.5.3, there exists a G-template t such that and by the rst part of our proof,
Y S g 9dw vm)b P t RH b i g f

W S n7

b gy S b S

z i P H %}@7

Y c dlb

To prove the converse, suppose that

is non-empty. Dene

P RH b U9b

v P RH b S e X e i s r g f 8 Y S p ` rjgu)trmIBkqi

v z yi x s g f w |{fmr m% Bkqi R 8 Y S p

h b S e X g f e i 8 Y S gonmflBkjidi

h z ~y i }vmBkjidi P H t R 8 Y S

h b S e 8 g f e i g f gd`fdb

|P t di RH b

Y S 4 aVR P Y X WH T S

Proof: Let

QP 7H F "IGE

the identity of G, and dene

. Then

by

. Hence,

Q.E.D.

Note that the image dened in the proof of the Lemma is just the characteristic function on . Hence, in view of Theorem 7.5.8, the template dened in terms of the parameter has the property
hm ( s sm(i6 hm(  hm{ v s @ 6 {u
359

which corresponds to the discrete Radon transform based on . Since is determined by and is dened in terms of , we refer to as the template induced by . The relationship between the template induced by and the discrete Radon transform is revealed by the next theorem.
q l 6

8.2.2

Theorem. Suppose simulates , , and Radon transform based on is invertible if and only if

is induced by . The discrete is invertible.


q l hh 4 I

Invertibility of the Radon transform is closely linked to irreducible matrices. A matrix is said to be reducible if there exists a partition of into two non-empty subsets and (i.e. and ) such that wherever and . Otherwise, is said to be irreducible.

8.2.3

Example: Let

be a matrix of form
m u

and

#! g$"

  

  

( & & '% v6e

If

and . Therefore,

, then , , and is irreducible. On the other hand, the matrix

wherever

h I

Uf

invertible. This will be the case if and only if

qh

. Thus,

is invertible if and only if the map is invertible.

Q.E.D.

nq

Proof: We identify
} @ mhh

with

. Let

and

. Then

I6s

I~

is

is irreducible. Note that if denotes the permutation matrix formed by interchanging the rst and the third rows of the identity matrix and is the matrix of the above example, then
C C DB @ C C @ @ @ @ @ @ @ g gfc W v t wus Q Q Q Q Q @ A A A A I S r @ @ @ 788 @ 88 3 1 20 )

where and are square matrices [13]. Thus, an equivalent denition of reducibility of a matrix is to have the form expressed in Eq. 8.2.1. to simply require We now turn our attention to the collection of matrices of a dimensional representation of the group . If the collection is reducible, then each matrix may (by choice of an appropriate permutation) be presented in the form
5 y 3 g c d 5 beby x v mt ggc k l g c qfji g gfc A I i 5 g hgfc g qfc g e c Y a Y W V g F`XwX"c 3

and

for every

and furnish and our group , respectively. The following denitions are expressed in terms of group representations but can just as easily be expressed in terms of representations of group algebras.
g e Y a hfc bY W P

8.2.4

If

is not reducible, then we say that

is irreducible.

360

I PG

g e Y a hc bY

Denition. Let be a representation of and only if there exists a non-singular matrix


W t ggfc k q g c gfji W UV i W 5 g |wgfc

. We say that such that

is reducible if

so that

and

Hence, the collection dimensional representations of

g un

x c o ftsn

k q

g c gji

g n

where is an matrix, is a and denotes the zero matrix. Since assumes us of the non-singularity of both of

I g n R fc x n V g xrhgfc 5 V g X"hqfc kI qb kI   I g  c } g gfc 5 g v c g  c } g gfc 5 6g {v c k k k g  c }~ggfc A  t 5 g  c ~gfc } g 5 wg v fc I I I k k g  c }lggji S g  cj2~gfc c i } g g  c } g ~gc kq I i XVx g qfc g gfc g gfc I kq g ggfc } ~gqc c{D|wggfc {Dy z d y 5 g c z d n o g xwvn R c x A I x c o g frn R fc x g gfc n o pn g gfc k q

g e c Y a Y W V hfdb`X63

p qi

In general, it can be shown that matrix such that is of form


I PG ) 3 F4) ) p

is reducible if and only if there exists a permutation

matrix,

T UE @

C B @

A 9

R 8

78

and
8 8 8 8

E @ @

A A A @

@ 9

5 3 64) 5 I G ) 3 FPHF4) s

(8.2.1)

is an

matrix, , the non-singularity . Furthermore,

It is well-known [9, 11] that if is a right regular representation of , then there exists a non-singular matrix and irreducible representations of such that for every
~ {22j q b D j2 hf gf

Moreover, if is any irreducible representation of , then is similar to for some . The same statement holds true for as well. The next result relates the invertibility of the Radon transform to irreducible representations.
{bh f6 

8.2.6

and be an irreducible representation of . If the discrete Radon Proof: Let transform based on is invertible, then according to Theorem 8.2.2 is also invertible. Let be a right regular representation of and be the isomorphism dened relative to the same ordering of as . by Theorem7.5.8, . Since is invertible, we now know that is also invertible. By our observation following Denition 8.2.5, there exists a non-singular matrix and irreducible representations of such that
b b|w~h hf" v h D Ff 'F  ~h wfF hb {222

.
~

361

wfF

where

is non-singular and each is an irreducible representation of . Thus, each is invertible, which implies that is invertible. Since is an isomorphism, we

.
{b

..

wfF

jq

{b

Conversely, suppose that According to our observation

is invertible for every irreducible representation

gv~6{b

. Therefore,

~h

`u

|beh|b

gu

and

for some

. Since

is invertible, is invertible.

jq

w~h

Theorem. Let transform based on representation of

and suppose that is invertible if and only if .

is induced by . The discrete Radon is invertible for every irreducible

..

is invertible for each

~m

dP

. . .

. . .

..

. . .

XxhPsfgfh|qfh

gf j2

hfb"`X j2

gjq

|wgh

wfF

8.2.5

Denition. Two dimensional representations only if there exists an invertible matrix

and of are said to be similar if and such that .

of

have that is invertible. Therefore, by Theorem 8.2.2 the discrete Radon transform based on is invertible. Q.E.D.

Note that the proof of Theorem 8.2.6 yields the more general result given by the following corollary:
{bh beh fh b "b fw h

8.2.7

As an immediate consequence, we now have the following result:

8.2.10 Corollary. If

, then the discrete Radon transform based on is invertible if and only if for every irreducible representation of , the matrix is invertible.
P F

Proof: By Theorem 8.2.6, the discrete Radon transform based on is invertible if and only if for every irreducible representation of , the matrix is invertible. But by Theorem 8.2.9 this will happen if and only if is invertible.
DPqfF "b

This corollary was rst proved by Diaconis and Graham using different techniques [4].
362

P F

"b

is invertible. However,

is invertible if and only if

is invertible. Q.E.D.

Pq

"b D Pg

"b

qfh

is invertible. Moreover,

is invertible if and only if

Q.E.D.

gfh

"b

~hwh

function on ,

. Therefore,

'

b gh h hf ~ q p~h P

Proof: Let

. In view of our observation following Lemma 8.2.1 we can write . Furthermore, since corresponds to the characteristic is invertible if and only

t{f|U

P F

8.2.9

Theorem. Suppose is an irreducible representation of is invertible if and only if induced by . The matrix
h

P 4 gfh j

It follows from the denition that dient representation of some representation.

and that every representation is the contragre-

, and is invertible.

Dqmq

8.2.8

Denition. If is a representation of representation dened by

Corollary. representation

is invertible if and only if

invertible for every irreducible

of

, then the contragredient representation of .

is the

is

The results developed in this section show that the invertibility of the discrete Radon transform is closely linked to the invertibility of templates. In the case of circulant templates the irreducible representations of abelian groups are all one-dimensional. As an example consider the group algebra over . If and is a right regular representation, then according to Theorem 7.5.8 and Eqs. 7.2.4 and 7.3.1,

of the set If

and

is invertible, then

is invertible if and only if

for every

and .

Let

and

. Then

. Similarly, . Therefore, is invertible if and only if and are not divisible by 3. Hence, the invertibility of the averaging template depends on the dimension of the array !

The inverse of the circulant averaging template given in the above example can be found explicitly using the following method: Let denote the set of circulant matrices with each associate a polynomial . Now dene by . It is not difcult to show that is a ring isomorphism. Thus,

363

!  p ) a

The inverse

#Q G g Ut4U o n d s Irqpq o rUIpg$a#e

is given by

s e ) r

x r o n m i i gq ro n s i i gq Up)U8lwl(!q)tlvp4Due r o n m i i i gq o n s i r o n m i i gq i o n m i i g e d q)U8lkjkj4!1)t1p4q)8Ulkj4!dpf)w8lkj4hf1Dg

then

s e Qr4

a)

m } m ee r f q } o n i i g e d )8m v#|~

$ rlt 8  $ u! ) ( ) ) rIpqa IUr gr 4 1y dD Gp) 81gns o p e i i e d ql | o r#dG i s

p& s o o n i i g e d )Um #2#|{zyG

8.2.11 Example: If

denotes the circulant Moore template


1 1 1 1 1 1 1 ,

t =

1 1

W V

where

. Thus, the irreducible representation of

over

` b ii i y B @ 97 5 T Dx Dqpq Dx  rx 4A$wv u0 f t f f f

' 3 % 0 ' %  )421)(~&w

B &T S  P H )F E C H

$

"  #w!

  

  

  u  Usp5IriqipiagUIgU5 A$7 e0  h 5 f @ 9 5 X b `Y I aS H QH P

  c d

T T S H P H B F E C B @ 9 7 5 GUR QIG$1D(A86

(8.2.2) are the elements

. Therefore,

 

Therefore,

1
-1

1 1 -2 1

-2 -2 4 -2

1 1 -2 1

1 -2 1

t0 =

we obtain the commutative diagram shown in 8.2.2.

a
f

a+ t
f

a + t-1
e

Ft
from
g p h Bg i d

a
and
h Tg r q p 'PEi

Figure 8.2.2 Recovering

Figure 8.2.3 provides an example of this commutative property. Here, with corresponding to the circulant averaging template. It may be somewhat surprising that the extremely noisy looking image (lower left hand image of Fig. 8.2.3), when locally averaged, results in the image of the SR71 spy plane. This surprise dissipates in view of the fact that contains both positive and negative values. In order to display , the pixel values have been linearly shifted
364

y w u y w u Yxvt

r q 'Pp

h Bg i

Ft -1
d

Ft -1

Ft
d

a b7

A 5 ` X ! BV3 PY" W8 A 97 BVUTS8 A 53 8 5 A A B5 F D HC Q I D 'PEC EC D D C 4'PEC R Q I D

h Tg r q p 'PHi

A F B5 G" ! R Q I D 'PHC

h g r q p 'PEi %

( & 0 ( & $ " )21)'%#!

Let

be dened by

. If

is invertible, then since

 

Figure 8.2.1 The inverse of the circulant


D A 5 8 7 53 " B@9#64#! D EC

averaging template t.

and . The template

Gg$I&

 4 4 4 a y

and

4! 4D 1Dg q q


ylvG

4  1I   g$a

where

[2]. For example, if

, then

is shown in Fig. 8.2.1.

As we have seen in Example 8.2.11, if denotes the Moore neighborhood of , then the inversion if fairly straightforward. In general, however, proving invertibility can be rather complicated even for simple neighborhood conguration for averaging an image, the invertibility is not as easily established. Specically, if
1 ty = 1 1 1 1 ,

365

q q q i q w w E

q x

q q i

@w

Y#t

then

. For

, we have

B~

6t g

t

oo 46k

@w i f}Vk ' o q q

}t

~ {v

~ t

|u }en

t {s

Furthermore,

y gt v w 6xUEv

u en

t Ts

i eh

Suppose
qr Tn p n l k om#j

by the amount
fed u T

. Thus, the image displayed in the lower left hand corner is not really

Figure 8.2.3 Inversion of a locally averaged image. is a circulant valued template. According to Theorem 8.2.2, the transformation is invertible if and only if the Radon transform based on is invertible.

T P

, but

6k

Thus,

, then 5 or 6 The obvious question one may ask is: Does it follow that whenever divides ? This question was answered in the afrmative by Z. Manseur and D. Wilson [12]. In Fact, Wilson and Manseur proved invertibility for a more general class of von Neumann neighborhood based templates. They considered the template dened by
W 9 ' Y4Y o S T T 64

b ty =

a b

Their results are summarized by the following theorem:

The proofs of statements 2 and 3 follow the argument used to prove the invertibility of the Moore template. However, the proof of statement 1 is rather involved. Note also that the hypothesis requires a square array. It is still an open question whether or not similar results hold for rectangular (i.e. not necessarily square) arrays. Another requirement in the above theorem is the symmetry of the pixel values about the center point . The invertibility of von Neumann templates having non-symmetric pixel values remains another open question.

366

9 E GFD

Q RHH HH  A8C4 S 8@3 B A  PI 7  4  86523

1. 2. 3.

If If If

, then t fails to be invertible if and only if either 5 or 6 divides and , then is invertible is odd. , then is invertible.

1 ( $ " 20)'&%#!

    

8.2.12 Theorem. (Manseur and Wilson) Let

where

with

and

. Pictorially,

has representation

and

be dened by Eq. 8.2.3. .

Therefore, if 5 or 6 divides

, then . It follows from those observations that if , then the transform is not invertible.

(8.2.3)

Gb o G e

o4P@G%' o b o @W }

More generally,

and

8.3 Determinants and Inversion Determinants can be used to establish the invertibility of a template. Specically, if and , then t is invertible if and only if . Determinants can also be used to provide explicit expressions for the inverse of a given template. If , then the determinant is given by

The term by

is obtained by setting results in the polynomial

and is, therefore, equal to

. Multiplying Eq. 8.3.1

where

and

The polynomial

corresponds to the characteristic polynomial of A (Section 3.8). and . If , then t is invertible and

8.3.1

Theorem. Suppose

where

and

Proof: It follows from the Cayley-Hamilton Theorem [8] that A satises its characteristic polynomial. Therefore,

Since

. Hence,

and

Since is an isomorphism, and The result now follows immediately by applying

for to Eq. 8.3.3.

In contrast to Section 8.2, the templates considered here are translation invariant but not circulant. According to Corollary 7.1.7, the inverse of a translation invariant template is not necessarily translation
367

bX a YX V @`5WU

y e mmy{ e {  m}6'e j k k y c V p c V })p 'e y y { V j jk jk jk o b v g lll g kb kb v kb p Y d j inmmWRY j Y g Y e xez v V k j j pb Y jv g lll g kb kb v kb { xvd inmmWY j Y g j Y e xez v il Fvd V bY w V z v w26tr V w u s o b Y V b Y zv jv g lll kb kb v b V qvd ig yxmg Y j Y ig Y 6rw t j

V V z c c z mc { p vixmwg Y vY g j Y ce z e v V j k c jv g lll kb ckb v kb V w u s w y V 6tr fc h p h eg c d qw t o b b Y g lll g j w V w ~u kb 0Y  nmxwg t j r66'ss v f}V j Y v wus b e w z 6tr Y f!|V xv kb V { zv jv g lll qig vyxmwg k b Y v g b u`w t j Y j i)Y e s!w us 6rwqvtr V b b Y hY opVFbY hig j Y inmmWg k b j h g b b f)0w kb h g lll e j Y xi)Y Y Y ttr b Yb d 'gw Y f b d wus V w w u s c'yxvtr ph e d h qi'gf#c

(8.3.1)

(8.3.2)

(8.3.3) .

Q.E.D.

invariant. Translation variant template operations run notoriously slow on current computer architectures. The above theorem provides a way to write the inverse of a translation invariant template in terms of invariant templates. However, speed-up in performance can generally not be achieved by simply replacing with

due to the increase in the number of convolutions that must be performed. Fortunately, it is often possible to decompose the polynomial representation of a template into fewer products. For example, using polynomial factorization, the polynomial

can be factored as

Thus, the number of convolution products can be reduced by one-half, from 6 to 3. A classical method of evaluating determinants of large matrices is by cofactor expansion. The next theorem is a consequence of the use of cofactor expansion on certain types of block Toeplitz matrices.

. . .

. . .

. . .

. . .

then

. . .

. . .

368

x x mx mx mx

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

m v mm mm mm xm xm v xm

tm tm tm

Proof:

xm xm xm xm xm v xm 

t vt vt

8.3.2

Theorem. If A and B are

v yxmw v m v@ ux  u 0 }f ` vf 
matrices and

vt

is an

block Toeplitz matrix of form

..

. . .

. . .

. . .

. . .

. . .

. . .

. . .

! t rqvt rqvt i t t u t f w
. , respectively.

xm xm xm xm xm v xm
.. . . . . . . . Q.E.D.


. . .

x rqvt F 'xvt F
is an . . .

8.3.3

Corollary. If

and

we obtain

The above discussion provides a quick method for the determination of the invertibilty of certain templates. For example, consider the template shown in Figure 8.3.1.

 

( & $" & )'%#!



 

t
More generally, we have that

Applying the reduction formula given by the above corollary to the matrices

If

Figure 8.3.1 A template which is invertible on an array with an even number of columns.

then

, then the matrix

A Y ba ` aa ` f Qe UWWX 2 F E D VTGSC ` ba A Y ` aa d aa dc ` ba ` A Y I H 8 I PRQPH F ED G%C


is the . . . . . . .. . . . .

tridiagonal matrix of form

ry =

369

. . .

. . .

block Toeplitz matrix given by

(8.3.5) (8.3.4)

A 4 8 6 4 2 B@97531

Since if and only if n is even and , the template r is invertible if and only if and the number of columns of the array X is even. An analogous argument will show that the template s dened in Figure 8.3.2 is invertible if and only if and the number of rows of X is even.

sy = b

Figure 8.3.2 A template which is invertible on an array with an even number of rows. Using the same reasoning also shows that the templates shown in Figure 8.3.3 are never invertible.

uy =

Figure 8.3.3 Two non-inveritible templates. As another example, consider the Sobel edge template
1 2 1

ty = -1 -2 -1

Now

, where
ry = 1

keih gs SGe j h g f d

and

vy =

370

Q y

b x b

. . .

. . .

. . .

. . .

..

. . .

 x x x x
. . .
a b

xb xb xb x b

x x y x x y

x x x x

x x s g x vvw th x vv vvv x uv yz nm

i p rqi

x s !y x s t y x s h g

w tv r p xusqo

h )g

where

is the

matrix

. . .

. . .

. . .

. . .

..

. . .

. . .

It is well-known that has n distinct eigenvalues strictly between 0 and 4 ([14], p. 101). Thus, for all n and, hence, for all m and n. Therefore, r is always invertible. Since s is invertible whenever the number of rows of X is even, the Sobel template is invertible if and only if the number of rows of X is even. in the above discussion is almost diagonally dominant. Recall that an matrix The matrix is diagonally dominant if and only if for all . Since diagonally dominant matrices are always invertible, templates whose corresponding matrices are diagonally dominant must also be invertible. In particular, the template
ty = 1

is invertible. Our next result is also a consequence of straight forward cofactor expansion and induction.

then

Theorem. Suppose

and

is as in Theorem 8.3.4. Then r is invertible if and only if


371

Sh

Q7g

8.3.5

Note that if

is as above, then

, and

is dened by
b

ry =

x b

b Q b

b b b  b

 

G GShih

8.3.4

Theorem. If

is an

tridiagonal matrix of form

. . .

. . .

. . .

. . .

..

. . .

. . .

!!

S

~ } 7bb7 5'

~ } us 

~b Q ~ b 3b 3b 3b 3b

} } e  !SG 

% | |  

~ } sq| ~

and s is the template shown in Figure 8.3.2 with Eq. 8.3.5, where

and

. The matrix

is given by

~ ~ ~ ~

} ~

G%

}  | bG#}

w xw p i xs p w
,

wr u sr w t p vt p q p

y u i zw p w d$Rq p
.

jj i i j jj o n i i j h w jj mm kj i i gg jj mm kj i i i gg jj mm l kj i i fgg eu w d$ u w Wp$ x ayu w


1

x uw aYWyvt
1 1

b ` X V T QS caYWURP
1

I0 G E CB @ E HFD8A
8.3.6
Corollary. Suppose 1. If is dened by

7 ' 7 9 86

1 )  5 

3 1 ) %  !  420('& h$#"'SG%h    


.. . . . .

Proof:

The matrix

is an

VTG% P
. . .

As an easy consequence we have:

then r is invertible if and only if

then t is invertible if and only if

s q ig e q Hrphfd

2. If

Let

The result now follows from the fact that

Proof:

(1) By Theorem 8.3.5,

is dened by

. Then by Theorem 8.3.4,

t =

ry =

. . .

372

. . .

block Toeplitz matrix of form

and

. . .

. . .

..

. . .

. . .

, where

, where

Q.E.D.

, and .

It follows by induction that , , and with if is even and if k is odd. For suppose the result holds for some integer k. According to Theorem 8.3.4,

and

(2) A similar argument shows that the template


1

is invertible if and only if Since , and

The techniques discussed in this section can be used to determine whether a template is invertible. However, with the exception of Theorem 8.3.1, they do not suggest a method for nding the inverse of a template. Methods for inverting templates are discussed in the next section.

8.4 A Class of Easily Invertible Templates The preceding sections suggest the obvious: template inversion is in general a difcult and computationally inefcient process. Furthermore, the inverse of a translation invariant template is generally translation variant. The main objective of this section is to describe a large class of templates that can be easily inverted and have the additional property that their inverses can be factored into a small number of invariant templates. Moreover, the support of each template will have the same geometric conguration as the original template. In order to establish the main goal of this section it will be useful to recall some elementary facts from linear algebra.
373

aY 8 aY  d H aW f

and

aY U

Il

U{

Therefore,

{  { {  {  { { }$| H4 ~}|  p}| A d&~(}| D dt(}|  t}| v (t}| {

caY8  }| { |  {  {  5vd$~" ~}$| f d}$| 5 d}$| {

t(}| {

Thus,

. Similarly,

sy =

1 1

. , t is invertible if and only if Q.E.D.

} | { } | { } | { } | { } | { } | {  {  { ~e~faft~v~~Av~5 t~}| A d&~(}| 5 }| {

}| 8~{

}| xY~{

}|{ }| }| ~~U~{ yt$~{

} | {

and are elementary symmetric functions of degree 1 and 2, respectively. An easy extension where of Eq. 8.4.2 proves the following fact:

d d 

9 

(

5dtaa dWd9hfd5daddad ~ df~9d5daddad  98d2daddadp


There are n special symmetric polynomials with integer coefcients, called the elementary symmetric functions of degree k: . . .

04 pa Wd d dddad
The polynomial

8.4.1

Denition.

Let be a polynomial ring. is said to be symmetric if and only if

In particular, the elementary symmetric function of degree

 f 9  f f c da (###D q
matrix, then the equation

d

cddadt#x

d x

8.4.2

An matrix is called upper triangular if whenever and strictly upper triangular whenever . The matrix A is said to be nilpotent if there exists an integer k such that . If k is the smallest such integer, then A is said to be nilpotent of order k. With these notions in mind, the next theorem becomes a routine exercise.

0 ( 1)'
.

% & !

d 8 dd
matrix, then

ddd $  (   dda

is an immediate consequence of the associative and distributive laws of matrix multiplication. Equivalently, we have

If

Theorem. If

where

for every permutation

and A is an

is an elementary function of degree k for

tWyq

and A is an

374

0 3 54'

# W$

7 6 % 2 ! "! 

dap

is of form

(8.4.2) (8.4.1)

j CFQQQ C e j j k V dj V HTSRF I F D C ` V X i Pd V C i` ST@d I C i` d SD C i` j j m j m k d V C i` TSd SI Y C i` d D Y C i` e $ l D


is given by In particular, for , the inverse of the matrix Proof: By Theorems 8.4.2 and 8.4.5,

d j Y C i` ST@d j PC i` d j bC i` e l I D p u 8FQQQ FsFp e 1B$$TSR$rAh j j k e j )i d HV C i` TSd I C i` d D C i` V UcSTRF I UF D C CF QQQ C

f D e &e $yV &)SThe I &e D p 1u V gd "fX e ` d V UtSTfF D C ` V X e V rSS I DC ve V CFQQQ C C


. . . . Therefore,

D I e d V rTSRF D C ` X e V C rV C $yV C TS C DC C IC DC e I CFQQQ C dV CFQQQ FD tUtSSRGP e V C D V D I D C e I `C I X drC ST PCbC bCP) d V UcTSF D C ` D X e V C TS I C D e D CF QQQ C F V dp e V Tu ` tSTu u rTI Td PA$aV TDP5u u V Pd d V C "I` SV I C Du ` d D B ` e "cX C ` p u V d "cX e ` 8FQQQ FsFp e Y C $tSTR$yxwh
If

p&uv8t$QSTQRs$rpqeih g5WUcSSRGbUGPC a$X F Q F F f e dV CF QQQ FI CFD `Y V CFQQQ FI CFD WU$TSRGPHGEC


for metric function of degree k. Theorem.

8 9 AB8

8 A8 9 89 )@8

8.4.3

8.4.5

8.4.4

The next result follows immediately from this theorem.

Corollary. If A is a block matrix with strictly upper triangular of order n.

Theorem. If A is a strictly upper triangular the product of any n strictly upper triangular

denotes the list of the distinct nth roots of unity, then , where denotes the elementary sym-

Y $X

8.4.6

These preliminary results provide the necessary means for proving the central theorem of this section.

Theorem. Suppose A is a nilpotent matrix of order n. If distinct nth roots of unity, then

But

where

Proof: For

is a root of the polynomial

375

matrix, then A is nilpotent of order n. Moreover, matrices is the zero matrix.

blocks, then A is nilpotent

denotes the list of the . Thus, Q.E.D.

TS 5  TS TS
. . . . . . .. . . . .

TS TS 5 TS TS TS
.. . . . . . . .


. . .

ST TS ST TS ST TS r@ R
a 1


. . .

SS SS SS SS SS
.. .

n v u 1p r

w o |Ac p b|n x o w uWSS)n } zuSAutp x |r v ~~~ w v y n w v s q p o n y cupzn o wAvusST|n } w uzw |us ~~~ v y n v w
, then ,

y w v s ~~~ y  v y  w v s $n o AuTSzn } bw usn x Pup x |r u p y v s ~~~ y  v y  w v )czn o w uTSzn } bw u{szn x Pusr~ r y n v s ~~~ y n} w v y nx w v s zGPw |utSSzP|u{szPutp r
Therefore, by the uniqueness of inverses,

q p o 5@n

8.4.7

W

Thus, if

A particular consequence of this theorem is that if

Thus, if

Let U and V denote the

Example: Suppose

By the rst part,

But

For the second part suppose that

. . .

, where

. . .

since A is nilpotent of order n.

. . .

. . .

, then

..

. . .

. . .

. . .

upper triangular matrices dened by

t =

. . .

is a primitive nth root of unity, and

. . .

376

..

is a primitive nth root of unity, then

. . .

. . .

. . .

is given by Q.E.D.

where and denotes the zero matrix. According to Corollary 8.4.4, A is nilpotent of order n. Hence, , where each is an block matrix, consisting of blocks. Specically,

. . .

. . .

..

. . .

where

denotes the

zero matrix and

is the

upper triangular matrix of form

. . .

. . .

. . .

..

. . .

. . .

Therefore, where

is of form

ti =

i..a

Thus, each is invariant and has the same geometric conguration as t. Furthermore, the number of factors in the decomposition of is one less than the number of columns. Note also that the primitive nth root of unity can be chosen in the eld , where p is a large prime. This means that all calculations can be accomplished using only integer arithmetic, therefore avoiding round-off errors and dealing with complex numbers.

The above example has the following generalizations: Theorem. Suppose and is translation invariant. If is upper triangular and , then can be factored into a product of at most mn invariant templates. Furthermore, the support of each template in the factorization will be identical to the support of t.

Proof: By hypothesis, , where A is a strictly upper triangular matrix. Therefore, A is nilpotent of order . Hence, by Theorem 8.4.6, the inverse of can be factored into a product of at most mn matrices of form , where is a root of unity for . Thus, can be factored as

where

377

Q.E.D.

a@

 

3% ' $%1)% ' 2 0 0 0 ' (

&A

 

1 $

$ 4c cxc

8.4.8

wA

$@ $ ST z $ ST ST ST ST ST AA A ST ST ST c 5 $ c SS R 4 )$| AA |$STR$rUx a


 """   & %$#! 

G@

 z 4 $

@

G@

u i xp j n r z r %% %r z y z yxp z yx z yxp u i z s%% u i  Iu i j  Ip


. where

g d $%#! B fff de d j $r j r {u p j sronm


Therefore, is given by

u i 4 zysp$%eu i 4 xu i j  sp x z y p z yx u p n u p n p u p `%r$%e$%r%wu j rn `rn { z yx v ut rp m |3wI%sqonajl k Ui


.

r p p p gi gi D 6 Y sD g i %$q)b D hW f)D
If

8.4.9

R P H E P SQIG FD

Theorem.

Suppose and is translation invariant. is a list of the nth roots of unity and t has factorization

6 UT

C7 @ 8 &BA97 6 5

C e$%#`ca`XV VYddd Yb VYW

then

t x u t $%1 9$t hw %yw vt

where

such that

ti =

i .d i . c

i .b i .a

i . f i . e

j . d j . c

j . f j . e

tj =

j . b j . a

for

gd fff de d h9$%#! BF

Proof:

Let . Thus A is a block matrix with strictly upper triangular blocks and, by Corollary 8.4.4, nilpotent of order n. According to Theorem 8.4.6 we now have that the inverse of

378

for

g } ~4g

Q.E.D.

Note that Theorem 8.4.9 is valid for a much wider class of templates than indicated by the hypothesis. is a strictly upper triangular block Toeplitz matrix with strictly upper triangular In particular, if Toeplitz blocks, then the conclusion of the theorem still holds. Identical results could also have been obtained using lower triangular matrices instead of upper triangular matrices. Furthermore, by Schurs Theorem [7] every matrix with real eigenvalues is equal to the sum of a diagonalizable matrix and a nilpotent matrix. Therefore we could have stated many of the results in this more general setting. However, the benets of doing so do not warrant the added complications.

dened by

r(i) = i.b i.a 1

i.b

i.a i .c

1 , and u(i) = 1

t(i) = i.d

where i, a, b, c, and d are integers. Consider the transform

Figure 8.4.1 shows the result of this transform and its inversion for and . Note that for the transform completely disguises the airplane. Having used only integer
379

v  %$q ` s|  ` $%q ` s  ` $%q ` v f $%1   9%$e v &  $%# v

This transform is invertible whenever the hypotheses of the theorems presented in this section are satised. Observe that parts of the hypotheses are satised since and are block matrices with strictly upper triangular blocks, and . Similarly, and are block matrices with strictly lower triangular blocks. Now suppose that a is a image with pixel values between 0 and 31. As noted earlier, the theorems hold for the nite eld , where p is a prime. This lets us avoid complex arithmetic and round-off errors. To invert the transform exactly, we need only choose a prime number p which is larger than both the number of columns and the maximum pixel value (assuming ). Thus, the most reasonable prime in this case would be the integer . Since the integers are all the roots of unity in the eld , it follows from the results of this section that the transform is invertible if we set for and . Furthermore, the inverse transform is given by

& %$q f &` %$q `` e %$q eI %$q `f

3I ` h%`

3s&s 3)$s

&

8.4.10 Example: Let

cs

3sq

, and r, s, t, and u be parameterized real-valued templates

i.d

i .c

1 s(i) =

i.a i .c

i.b i.d

i .c i.a

i.d i.b

arithmetic provides for an exact inversion of the transform in both cases and thus allows the recovery of the original image.

Figure 8.4.1 Masking and inversion transform. The top row shows the input image on the left and the resulting image for break value on the right. The lower (left image) and row shows the effect when setting the break value at the inverted image wich is identical to the source image for both breakvalues. The foregoing example indicates how images can be encrypted and decrypted. Using large primes, the choice of combinations becomes extremely large, thus making the decoding task computationally prohibitive unless the basic template congurations, values, and k are known. Of course, messages as well as images can be encrypted using these techniques. One may simply equate the letter A with the integer 1, the letter B with 2, etc. If the message is entered into an array with 80 columns, then the integer 83 will be the smallest prime that will encode and recover the message exactly.

380

vB~

as

Bibliography
[1] E. Bolker. The nite radon transform. In Proc. AMS Summer Conference on Integral Geometry, 1984. [2] P.J. Davis. Circulant Matrices. John Wiley and Sons, New York, NY, 1979. [3] P. Diaconis. Projection pursuit for discrete data. Technical Report 148, Stanford University, Department of Statistics, 1983. [4] P. Diaconis and R.L. Graham. The discrete radon transform on z2k . Pacic Journal of Mathematics, 118(2):323345, June 1985. [5] P.D. Gader. Image Algebra Techniques for Parallel Computation of Discrete Fourier Transforms and General Linear Transforms. PhD thesis, University of Florida, Gainesville, FL, 1986. [6] I.M. Gelfand, M.I. Graev, and N. Y. Vilenkin. Generalized Functions. Academic Press, New York, NY, 1966. [7] K. Hoffman and R. Kunze. Linear Algebra. Prentice-Hall, Englewood Cliffs, New Jersey, 1971. [8] T.W. Hungerford. Algebra. Springer-Verlag, New York, 1974. [9] R. Keown. An Introduction to Group Representation Theory. Academic Press, New York, 1975. [10] J. Kung. The radon transform of a combinatorial geometry. Journal of Combinatorial Theory, Series A:97102, 1974. [11] W. Ledermann. Introduction to Group Characters. Cambridge University Press, Cambridge, 1977. [12] Z.Z. Manseur and D.C. Wilson. Decomposition methods for convolution operators. Computer Vision, Graphics, and Image Processing, 53(5):428434, 1991. [13] F.D. Murnaghan. The Theory of Group Representations. Dover Publications, Inc., New Yorck, 1963. [14] J.M. Ortega. Numerical Analysis: A second course. Academic Press, New York, London, 1972. [15] J. Radon. Ueber die bestimmung von functionen durh integralwerte langs gewisser mannigfaltigkeiten. Ber. Verb. der Saechischen Akademie der Wissenschaften, Math. Phys. Kl.(69):262277, 1917. [16] G.X. Ritter and P.D. Gader. Image algebra: Techniques for parallel image processing. Journal of Parallel and Distributed Computing, 4(5):744, April 1987. [17] A. Rosenfeld and A.C. Kak. Digital Picture Processing. Academic Press, New York, NY, 2nd edition, 1982. [18] G. E. Trapp. Inverses of circulant matrices and block circulant matrices. Kyungpook Math. Journal, 13(1):1120, 1973.

381

CHAPTER 9 DECOMPOSITION AND INVERSION OF TEMPLATES OVER HEXAGONALLY SAMPLED IMAGES Most digitally sampled image representations employed in digital image processing are based on placements of pixels in a rectangular grid form that corresponds to tiling the plane with squares. Reasons for interest in hexagonal grids in image processing are that digital scenes in low resolution images often look more natural when pixels are presented in hexagonal rather than rectangular arrangement, hexagons can be grouped into natural aggregates for fast addressing, and since each point in a hexagonal grid has six equal-distance neighbors, the 4neighbor/8neighbor problem does not exist. Hexagonal grids have been examined and used by various researchers for several decades. In 1963, B.H. McCormick proposed hexagonal grids as a possible array representation for planar images [11]. in 1969, M.J.E. Golay proposed a parallel computer for hexagonal array processing and developed a basic theory for hexagonal pattern transformations [5]. Kendall Preston developed a special purpose computer architecture in 1971 which was based on hexagonal pattern transformations in order to achieve high-speed image processing routines [12]. In the early 1980s, D. Lucas and L. Gibson exploited the geometric advantages of the hexagonal representation in applications to automatic target recognition [2, 3, 4, 8, 9]. Narendra Ahuja investigated polygonal decompositions in 1983 for hierarchical image representations in triangular, square, and hexagonal lattices [1]. In 1983, D.K. Scholten and S.G. Wilson showed that the hexagonal lattice outperforms the rectangular lattice as a basis for performing chain code quantization of line drawings [13]. Informative summaries of the properties of hexagonal arrays with emphasis on image analysis in the morphological domain can be found in J. Serras work on mathematical morphology [14, 15]. The main emphasis of this chapter is on the problem of template decomposition and inversion over hexagonal arrays. Hexagons organize themselves naturally into a hierarchy of snowake shaped regions. These tile the plane and consequently yield a simpler denition of circulancy. Unlike the circulancy of rectangular tiling of the plane, which yields a toroidal topology, the hexagonal analogue yields the topology of a circle. As a result, circulant templates are mapped isomorphically into a quotient of the ring of polynomials in one variable. These polynomials are products of linear factors over the complex numbers. A polynomial will be invertible in the quotient ring whenever each of its linear factors is invertible. This results in a simple criterion for template invertibility.

9.1 Generalized Balanced Ternary Balanced ternary is an addressing system proposed by D.E. Knuth for locating integers using three symbols [6]. Taking these symbols to be the integers , , and , the need to address negative integers requires that 2 will be used in the role of the negative integer . The resulting notation for the integers is shown in Figure 9.1.1. A look at this gure suggests how to construct addition and multiplication tables for these symbols which, when applied sequentially in the manner of decimal operations, will yield standard arithmetic. In order to make things work analogous to integer arithmetic on the discrete line we must have , , , etc.
383

F4v 4y $)

Figure 9.1.1 Balanced ternary notation for integers close to 0. Generalized Balanced Ternary, abbreviated GBT, extends the algebraic and geometric properties of balanced ternary to higher dimensions [7]. The 2dimensional generalized binary ternary numbers , , where developed by L. Gibson and D. Lucas as a method for addressing a hexagonal abbreviated tiling of Euclidean 2space [2, 3, 8, 9, 4]. They describe the hexagonal tiling as a hierarchy of cells, where at each level in the hierarchy new cells are constructed according to a rule of aggregation. A hexagon and its six neighbors form the rst level in this hierarchy (Fig. 9.1.2). Note that a rst level aggregate can also tile 2space and has the same uniform adjacency property that the hexagonal tiling possesses. A rst level aggregate and its six rst level aggregate neighbors form a second level aggregate (Fig. 9.1.3). The hierarchy continues in the obvious way. Figure 9.1.4 shows a third level aggregate.

Figure 9.1.2 The rst level aggregate.

Figure 9.1.3 The second level aggregate.


384

212 210 211 22 20 21

12 10 11 122 120 121

Figure 9.1.4 The third level aggregate. addressing method of the hierarchical tiling is based on the following scheme. A rst The level aggregate is chosen and labeled with the integers through as shown in Figure 9.1.5. The center hexagon labeled is considered as the origin.

Figure 9.1.5 The GBT address of the rst level aggregate. The six rst level aggregates neighboring are labeled with the digits shown in Figure 9.1.6 and form a second level aggregate ; each digit is some integer from . Reading these digits from right to left, the rst digit corresponds to where the labeled hexagon is in its rst level aggregate and the is in the second level aggregate . second digit corresponds to where
385

Figure 9.1.6 The GBT address of the second level aggregate. Figure 9.1.7 illustrates the labeling scheme of the third level aggregate centered at . Continuing in this manner, every hexagon in the tiling will correspond to a unique nite sequence (an address) with

Figure 9.1.7 The GBT address of the third level aggregate.


386

 

9.2 GBT2 Arithmetic addressing scheme described in the previous section is rooted in The rationale for using the geometry and a desire for an efcient addressing system for hexagonal array processing. The geometric basis becomes clear if one considers Figure 9.2.1 and the parallelogram law of vector addition. If the hexagon with address 0 is centered at the origin of the plane, then the resultant of addition of the vector with terminal point at the center of the hexagon labeled 1 with the vector whose terminal point is located at the center of the hexagon labeled 2 is the vector whose terminal point is at the center of the hexagon labeled 3; i.e., .

A quick check shows that whenever the resultant of two vectors whose initial points and terminal points are the origin and the center of one of the hexagons in the rst aggregate, respectively, is another vector in the rst aggregate, then the address addition that yields the corresponding correct vector addition is simply addition . In particular, , , and . Proceeding to the second level aggregate, we note that if we use vector addition we should obtain . By examining the rst aggregate and its surrounding hexagons (Fig. 9.2.2), one obtains a simple mechanism for dening a new addition on the set .
387

U G P C VHFTI

4 3 2 1

Figure 9.2.1 Addition of rst level aggregate

R G E C I G E C SHQDP &HFDB

b ca

!  " 

entries an integer from . Thus, the with entries from the set .

system can be thought of as a set of all nite sequences

4 3 2 1

!   

@ 86 A975

 

) ' % 0(&$ #

 

addresses.

IP G P 9`YXC W

Figure 9.2.2 The rst level aggregate and its surrounding hexagons. The addition table corresponding to the vector addition in the rst level aggregate is shown in Figure 9.2.3. We may view the addition dened by this table much in the same manner as addition in the decimal system. The sum of any two digits yields a remainder digit and, potentially, a nonzero carry digit. For example has a remainder of 4 and a carry of 3. Note that the remainder corresponds to the addition , while the carry is one of the two digits to be added.

The digitwise addition decomposes the addition table into a remainder and a carry table as illustrated in Figure 9.2.4. The digitwise arithmetic allows for the vectorially correct addition of any two
388

7xvtsrq y wu g e d ig h g e pSHXfd

+ 0 1 2 3 4 5 6

0 0 1 2 3 4 5 6

1 1 12 3 34 5 16 0

2 2 3 24 25 6 0 61

3 3 34 25 36 0 1 2

4 4 5 6 0 41 52 43

5 5 16 0 1 52 53 4

6 6 0 61 2 43 4 65

Figure 9.2.3

addition table.

where (x) denotes the carry digit x. Note that nonzero carry digits in single digit addition indicate that the vector sum lies in a different rst level aggregate.

+ 1 2 3 4 5 6

1 2 3 4 5 6 0

2 3 4 5 6 0 1

3 4 5 6 0 1 2

4 5 6 0 1 2 3

5 6 0 1 2 3 4

6 0 1 2 3 4 5

Negation of GBT addresses is accomplished on a digit by digit basis. The negative of 0 is 0. The . Looking at negative of any other GBT digit d is the integer difference between 7 and d; i.e., Figure 9.1.5, one can easily infer that the negative of a given digit lies on the opposite side of 0. To form the negative of any other address one simply takes the negative of each of its digits. For instance, the negative of 123 is 654. Subtraction is dened in terms of addition combined with negation in the usual way. Thus . In particular, . Multiplication of addresses is similar to addition in that it is a digitwise operation. The multiplication table (Figure hexa12) shows that the GBT product of two digits is just their integer product modulo 7. Multidigit multiplication in is best explained by example. To multiply 254 by 62 we proceed as follows:

1 1 2

2 2 4

3 3 6

4 4 1

5 5 3

6 6 5 (Continued) . . .

1 2

Figure 9.2.5

multiplication table.
389

Similarly,

. Note that the multiplication of two

addresses can be viewed as

l k mj

p d Ff h p g d k h g

o ip e h p d 9h g h d &p e g d h d h

i

Figure 9.2.4 Digitwise operation on

h td g d Sf e d vv 

addresses. For example, the addition of the

addresses 416 and 346 is given by

+ 1 2 3 4 5 6

1 1 0 3 0 1 0

2 0 2 2 0 0 6

3 3 2 3 0 0 0

4 0 0 0 4 5 4

5 1 0 0 5 5 0

6 0 6 0 4 0 6

with remainder table on the left and carry table on the right.

i p o qXk n  ~ s |{y w u s r sv}zxvt f n o d z p h zh h

3 4 5 6

3 4 5 6

6 1 3 5

2 5 1 4

5 2 6 3

1 6 4 2

4 3 2 1

multiplication of vectors in 2dimensional space; it is identical with multiplication of complex numbers. That is, it adds angles and multiplies magnitudes. In particular, it is commutative, associative, and distributes over addition. As a result, we a commutative ring structure which is isomorphic to a subring of the complex numbers with addition corresponding to vector addition and multiplication corresponding to complex multiplication.

9.3 Images on Hexagonal Arrays and Polynomial Rings Let denote the subset of addresses consisting of all sequences whose rst rightmost k entries are equal to zero. The set is closed under addition and multiplication. Therefore, is an ideal of the quotient ring . If denotes the corresponding quotient ring , then consists of equivalence classes of addresses and these addresses are in one-to-one correspondence with the hexagons of the kth level aggregate [10, 17]. The effect of the quotient ring structure on arithmetic operations in a level k aggregate is to ignore any carries beyond the k least signicant digits. This causes the aggregate to wrap on itself in a toroidal fashion; i.e., any arithmetic operation which would normally result in a departure from the aggregate to another level will now reenter the aggregate at some other location. For example, in the full ring. In the carry into the . third position is ignored so that Addition of two images is dened as the usual pointwise addition:

Multiplication can also be dened pointwise, yielding a commutative ring structure on . Another ring structure on , which is pertinent to this chapter, is a convolution ring. Addition in this ring is again pointwise addition. However, multiplication is dened in terms of convolution as

where denotes the subtraction in the quotient ring properties of the ring closely to the structure of the Another ring having elements is . An isomorphism

. This multiplication links the element ring . can be dened by setting , , etc.

The fact that is an isomorphism can be shown directly [10] but it is also a consequence of a deeper isomorphism theorem linking the 7adic integers with an extended version of the which allows innite strings of nonzero digits [16].
390

S &v

, and

. Thus,

FTFfsmsS SDFsfSv 7 p S 7 

p

Ac

t}(xx9SXH

vx}x

m V z97S



Figure 9.2.5

multiplication table.

 t

For two images a and b we have

 

Therefore, the ring

is isomorphic to the quotient ring of polynomials

391

# ! $"

  

r A }

 z

 

where

by denition of polynomial multiplication. Also,

q7Y c tvA

The inverse of the isomorphism , between images on the hexagonal array associate a polynomial dened by

provides for an elegant correspondence and polynomials. With each image , one can

A cvA

Bibliography
[1] N. Ahuja. On approaches to polygonal decomposition for hierarchical image representation. Computer Vision, Graphics and Image Processing, 24:200214, 1983. [2] L. Gibson and D. Lucas. Spatial data processing using generalized balanced ternary. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 566571, June 1982. [3] L. Gibson and D. Lucas. Vectorization of raster images using hierarchical methods. Computer Graphics and Image Processing, 20:8289, 1982. [4] L. Gibson and D. Lucas. Pyramidal algorithms for automated target recognition. In Proceedings of the IEEE National Aerospace and Electronics ConferenceNAE-CON, pages 215219, Dayton, Ohio, 1986. [5] M.J.E. Golay. Hexagonal parallel pattern transformations. IEEE Transactions on Computers, C18(8):733740, August 1969. [6] D.E. Knuth. The Art of Computer Programming, Sorting and Searching, volume 3. Addison-Wesley, Reading, MA, 1973. [7] D. Lucas. A multiplication in n-space. In Proceedings AMS, number 74, pages 18, 1979. [8] D. Lucas and L. Gibson. Image pyramid partitions. In Seventh International Conference on Pattern Recognition, pages 230233, Montreal, Canada, July 1984. [9] D. Lucas and L. Gibson. Techniques to exploit the relation between polynomial representations and moments of pictures. In Proceedings IEEE Conference on Computer Vision and Pattern Recognition, pages 183143, San Francisco, CA, July 1985. [10] D. Lucas and L. Gibson. Template decomposition and inversion over hexagonal sampled images. In Image Algebra and Morphological Image Processing II, volume 1568 of Proceedings of SPIE, pages 157163, San Diego, CA, July 1991. [11] B.H. McCormick. The Illinois pattern recognition computer ILLIAC III. IEEE Transactions on Electronic Computers, 12:791813, 1963. [12] K. Preston. Feature extraction by golay hexagonal pattern transforms. IEEE Transactions on Computers, C-20(9):10071014, September 1971. [13] D.K. Scholten and S.G. Wilson. Chain coding with a hexagonal lattice. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-5(5):526533, 1983. [14] J. Serra. Image Analysis and Mathematical Morphology. Academic Press, London, 1982. [15] J. Serra. Image Analysis and Mathematical Morphology, Volume 2: Theoretical Advances. Academic Press, New York, 1988. [16] W. Zhang-Kitto. An Isomorphism Theorem between the Extended Generalized Balanced Ternary Numbers and the p-adic Integers. Ph.D. dissertation, University of Florida, Gainesville, FL, 1991. [17] W. Zhang-Kitto and D.C. Wilson. An isomorphism theorem between the 7adic integers and the ring associated with a hexagonal lattice. Journal of Applicable Algebra in Engineering, Communication, and Computation, pages 269285, April 1992.

392

S-ar putea să vă placă și