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

Image Algebra by Ritter

Embed Size (px)

Citation preview

Page 1: Image Algebra by Ritter

IMAGE ALGEBRAG.X. Ritter

CENTER FOR COMPUTER VISION AND VISUALIZA TIONDepartmentof Computerand Information Scienceand Engineering

University of FloridaGainesville,FL 32611

copyright 1993, 1999, G.X. Ritter

Page 2: Image Algebra by Ritter
Page 3: Image Algebra by Ritter

PREFACE

This documentis an initial draft of thedevelopingtheoryof imagealgebra.Theprimaryobjectiveofthis treatiseis to providethe readerwith an introductionto the theoryandfoundationsof imagealgebra.For readersinterestedin applicationsandimagealgebraspecificationof awidevarietyof imageprocessingtransformswe recommendthe Handbookof ComputerVision Algorithmsin ImageAlgebra [46].

Sincethe disciplineof imagealgebrais in its infancyanda stateof flux, this documentwill undergovarious changesbefore its completion in book format. The book will consistof eight chaptersandwill be largely self contained.The first chapterwill containall the introductorymaterial;e.g., what isimage algebraall about, the history of image algebra,the peopleinvolved, organizationof the book,etc. Chapters2 and 3 containbasic backgroundmaterialdealingwith point set theory, topology, andabstractalgebra.Lack of this backgroundis oftena fatal stumblingblock to understandingtheunderlyingconceptsof imagealgebraand the mathematicsof computervision in general.

As to this initial draft, we recommendreadingthe introductionandthenproceedto a quick overviewof thebasicconceptsthatdefineimagealgebra,we suggestto startwith Section3.13(Chapter3) andthenproceeddirectly to Chapter4, referringto precedingsectionsfor notationandtheoremsastheneedarises.

iii

Page 4: Image Algebra by Ritter
Page 5: Image Algebra by Ritter

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

Page 6: Image Algebra by Ritter

3.12 Minimax Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

3.13 Heterogeneous Algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

3.14 Generalized Matrix Products . . . . . . . . . . . . . . . . . . . . . . . . . 135

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

4 IMAGE ALGEBRA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

4.1 Images and Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

4.2 Functional Specification of Image Processing Techniques . . . . . . . 147

4.3 Induced Operations on Images . . . . . . . . . . . . . . . . . . . . . . . . 150

4.4 Properties of ��� . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

4.5 Spatial Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

4.6 Set-theoretic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

4.7 Operations Between Different Valued Images . . . . . . . . . . . . . . . 175

4.8 Image-Template Products . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

4.9 The Algebra of Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

4.10 Template Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

4.11 Spatial Transformations of Templates . . . . . . . . . . . . . . . . . . . . 198

4.12 Multivalued Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

4.13 Multivalued Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

4.14 The Algebra of Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

5 TECHNIQUES FOR THE COMPUTATION OF GENERAL LINEARTRANSFORMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

5.1 Image Algebra and Linear Algebra . . . . . . . . . . . . . . . . . . . . . 219

5.2 Fundamentals of Template Decomposition . . . . . . . . . . . . . . . . . 221

5.3 LU Decomposition of Templates . . . . . . . . . . . . . . . . . . . . . . . 227

5.4 Polynomial Factorization of Templates . . . . . . . . . . . . . . . . . . . 234

5.5 The Manseur-Wilson Theorem . . . . . . . . . . . . . . . . . . . . . . . . 237

5.6 Polynomial Decomposition of Special Types of Templates . . . . . . . 240

5.7 Decomposition of Variant Templates . . . . . . . . . . . . . . . . . . . . 259

5.8 Local Decomposition of Templates . . . . . . . . . . . . . . . . . . . . . 265

5.9 Necessary and Sufficient Conditions for the Existence of LocalDecompositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

6 TECHNIQUES FOR THE COMPUTATION OF THE DISCRETEFOURIER TRANSFORM . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

6.1 Linear Separability and the Discrete Fourier Transform . . . . . . . . . 283

6.2 Block Structured Matrices and the Fourier Matrix . . . . . . . . . . . . 291

6.3 Shuffle Permutations and the Radix Splitting of Fourier Matrices . . . 295

6.4 Radix-2 Factorization, Perfect Shuffles, and Bit Reversals . . . . . . . 301

6.5 The Fast Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . 306

vi

Page 7: Image Algebra by Ritter

6.6 Radix-4 Factorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313

6.7 Radix-4 FFT Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322

7 TRANSLATION INVARIANT TEMPLATES ON FINITE DOMAINS . . 323

7.1 Translation Invariant Templates and Toeplitz Matrices . . . . . . . . . 323

7.2 Circulant Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327

7.3 Circulant Templates and Polynomials . . . . . . . . . . . . . . . . . . . . 333

7.4 G-Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

7.5 Group Algebras and G-Templates . . . . . . . . . . . . . . . . . . . . . . 343

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349

8 INVERSION OF TRANSLATION INVARIANT TEMPLATES . . . . . . 351

8.1 The Radon Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351

8.2 Invertibility of the Radon Transform and G-Templates. . . . . . . . . . 358

8.3 Determinants and Inversion . . . . . . . . . . . . . . . . . . . . . . . . . . 367

8.4 A Class of Easily Invertible Templates . . . . . . . . . . . . . . . . . . . 373

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381

9 DECOMPOSITION AND INVERSION OF TEMPLATES OVERHEXAGONALLY SAMPLED IMAGES . . . . . . . . . . . . . . . . . . . . 383

9.1 Generalized Balanced Ternary . . . . . . . . . . . . . . . . . . . . . . . . 383

9.2 GBT2 Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387

9.3 Images on Hexagonal Arrays and Polynomial Rings . . . . . . . . . . 390

Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393

vii

Page 8: Image Algebra by Ritter
Page 9: Image Algebra by Ritter

CHAPTER 1INTRODUCTION

Since the field of image algebrais a recentdevelopmentit will be instructive to provide somebackgroundinformation. In the broad sense,image algebrais a mathematicaltheory concernedwiththe transformationand analysisof images. Although much emphasisis focusedon the analysisandtransformationof digital images,the main goal is the establishmentof a comprehensiveand unifyingtheoryof imagetransformations,imageanalysis,andimageunderstandingin the discreteaswell as thecontinuousdomain [45].

The idea of establishinga unifying theory for the variousconceptsand operationsencounteredinimageandsignalprocessingis not new. Over thirty yearsago,Ungerproposedthatmanyalgorithmsforimageprocessingandimageanalysiscould be implementedin parallelusingcellular arrayCellular arraycomputercomputers[61]. Thesecellular array computerswere inspiredby the work of von Neumannin the 1950s[63, 64]. Realizationof von Neumann’scellular array machineswas madepossiblewiththe adventof VLSI technology. NASA’s massivelyparallel processoror MPP and the CLIP seriesofcomputersdevelopedby Duff and his colleaguesrepresentthe classicembodimentof von Neumann’soriginal automaton[2, 18, 16, 17, 20]. A moregeneralclassof cellulararraycomputersarepyramidsandThinking MachinesCorporation’sConnectionMachines[59, 60, 25]. In an abstractsense,the variousversionsof ConnectionMachinesareuniversalcellular automatonswith an additionalmechanismaddedfor non-local communication.

Many operationsperformedby thesecellular array machinescan be expressedin termsof simpleelementaryoperations. Theseelementaryoperationscreatea mathematicalbasis for the theoreticalformalism capableof expressinga large numberof algorithmsfor image processingand analysis. Infact, a commonthreadamongdesignersof parallel imageprocessingarchitecturesis the belief that largeclassesof image transformationscan be describedby a small set of standardrules that induce thesearchitectures.This belief led to the creationof mathematicalformalismsthat were usedto aid in thedesignof special-purposeparallel architectures.Matheronand Serra’sTextureAnalyzer [28], ERIM’s(EnvironmentalResearchInstituteof Michigan)Cytocomputer[32, 57, 31], andMartin Marietta’sGAPP[7, 5, 6] are examplesof this approach.

Theformalismassociatedwith thesecellulararchitecturesis thatof pixel neighborhoodarithmeticandmathematicalmorphology. MathematicalmorphologyMathematicalmorphologyMorphologyis the partof imageprocessingconcernedwith imagefiltering andanalysisby structuringelements.It grew out oftheearlywork of Minkowski andHadwiger[39, 40, 22], andenteredthemodernerathroughthework ofMatheronandSerraof theEcoledesMinesin Fontainebleau,France[37, 52, 53,54]. MatheronandSerranot only formulatedthemodernconceptsof morphologicalimagetransformations,but alsodesignedandbuilt the TextureAnalyzerSystem.Sincethoseearly days,morphologicaloperationshavebeenappliedfrom low-level, to intermediate,to high-level vision problems.Among somerecentresearchpapersonmorphologicalimage processingare Crimmins and Brown [8], Haralick et al. [24, 23], MaragosandSchafer[34, 36, 35], Davidson[14, 13], Dougherty[15], Goutsias[51, 21], andKoskinenandAstola[30].

Serraand Sternberg were the first to unify morphologicalconceptsand methodsinto a coherentalgebraictheoryspecificallydesignedfor imageprocessingand imageanalysis.Sternberg wasalso thefirst to usetheterm“imagealgebra”[56, 58]. In themid 1980s,Maragosintroducedanewtheoryunifyinga large classof linear and nonlinearsystemsunderthe theory of mathematicalmorphology[33]. Morerecently,Davidsoncompletedthe mathematicalfoundationof mathematicalmorphologyby formulating

1

Page 10: Image Algebra by Ritter

its embeddinginto the lattice algebraknown as Mini-Max algebra [11, 12]. However, despitetheseprofound accomplishments,morphologicalmethodshave somewell-known limitations. For example,suchfairly commonimageprocessingtechniquesasfeatureextractionbasedon convolution,Fourier-liketransformations,chaincoding,histogramequalizationtransforms,imagerotation,andimageregistrationandrectificationare— with theexceptionof a few simplecases— eitherextremelydifficult or impossibleto expressin termsof morphologicaloperations.The failure of a morphologicallybasedimagealgebrato expressa fairly straightforwardU.S.government-furnishedFLIR (forward-lookinginfrared)algorithmwas demonstratedby Miller of Perkin-Elmer[38].

The failure of an image algebrabasedsolely on morphologicaloperationsto provide a universalimageprocessingalgebrais due to its set-theoreticformulation,which restson the Minkowski additionandsubtractionof sets[22]. Theseoperationsignorethe lineardomain,transformationsbetweendifferentdomains(spacesof differentsizesanddimensionality),and transformationsbetweendifferentvaluesets(algebraicstructures),e.g.,setsconsistingof real,complex,or vectorvaluednumbers.Theimagealgebradiscussedin this text includestheseconceptsandextendsthe morphologicaloperations[45].

Thedevelopmentof imagealgebragrewout of a need,by theU.S.Air ForceSystemsCommand,fora commonimage-processinglanguage.Defensecontractorsdo not usea standardized,mathematicallyrigorousand efficient structurethat is specificallydesignedfor imagemanipulation.Documentationbycontractorsof algorithmsfor image processingand rationaleunderlyingalgorithm designis often ac-complishedvia word descriptionor analogiesthat areextremelycumbersomeandoften ambiguous.Theresultof thesead hocapproacheshasbeena proliferationof nonstandardnotationandincreasedresearchanddevelopmentcost. In responseto this chaoticsituation,theAir ForceArmamentLaboratory(AFATL— now known asWright LaboratoryMNGA) of the Air ForceSystemsCommand,in conjunctionwiththe DefenseAdvancedResearchProject Agency (DARPA — now known as the AdvancedResearchProjectAgency or ARPA), supportedthe early developmentof image algebrawith the intent that thefully developedstructurewould subsequentlyform the basisof a commonimage-processinglanguage.Thegoal of AFATL wasthe developmentof a complete,unified algebraicstructurethat providesa com-mon mathematicalenvironmentfor image-processingalgorithmdevelopment,optimization,comparison,coding,andperformanceevaluation.Thedevelopmentof this structureprovedhighly successful,capableof fulfilling the tasksset forth by the government,andis now commonlyknown asimagealgebra.

Becauseof the goalsset by the government,the theory of imagealgebraprovidesfor a languagewhich, if properlyimplementedasa standardimageprocessingenvironment,cangreatlyreduceresearchanddevelopmentcosts.Sincethe foundationof this languageis purely mathematicalandindependentofany future computerarchitectureor language,the longevity of an image algebrastandardis assured.Furthermore,savingsdue to commonality of languageand increasedproductivity could dwarf anyreasonableinitial investmentfor adaptingimagealgebraasa standardenvironmentfor imageprocessing.

Although commonalityof languageand cost savingsare two major reasonsfor consideringimagealgebraasa standardlanguagefor imageprocessing,thereexistsa multitudeof otherreasonsfor desiringthe broadacceptanceof imagealgebraas a componentof all imageprocessingdevelopmentsystems.Premieramongtheseis thepredictableinfluenceof an imagealgebrastandardon future imageprocessingtechnology.In this, it can be comparedto the influenceon scientific reasoningandthe advancementofsciencedueto the replacementof the myriadof differentnumbersystems(e.g.,Roman,Syrian,Hebrew,Egyptian,Chinese,etc.) by the now commonIndo-Arabicnotation.Additional benefitsprovidedby theuse of image algebraare

2

Page 11: Image Algebra by Ritter

• The elementalimage algebraoperationsare small in number, translucent,simple, and provide amethodof transformingimagesthat is easily learnedand used;

• Image algebraoperationsand operandsprovide the capability of expressingall image-to-imagetransformations;

• Theoremsgoverning image algebra make computerprogramsbasedon image algebranotationamenableto both machinedependentandmachineindependentoptimizationtechniques;

• The algebraicnotation providesa deeperunderstandingof image manipulationoperationsdue toconcisenessand brevity of codeand is capableof suggestingnew techniques;

• Thenotationaladaptabilityto programminglanguagesallows the substitutionof extremelyshortandconciseimagealgebraexpressionsfor equivalentblocksof code,andthereforeincreasesprogrammerproductivity;

• Imagealgebraprovidesa rich mathematicalstructurethatcanbeexploitedto relateimageprocessingproblemsto other mathematicalareas;

• Without image algebra,a programmerwill never benefit from the bridge that exists betweenanimagealgebraprogramminglanguageand the multitude of mathematicalstructures,theorems,andidentities that are relatedto image algebra;

• Thereis no competingnotationthat adequatelyprovidesall thesebenefits.

The role of imagealgebrain computervision and imageprocessingtasksand theoryshouldnot beconfusedwith the government’sAda programminglanguageeffort. The goal of the developmentof theAda programminglanguagewasto providea singlehigh-orderlanguagein which to implementembeddedsystems.The specialarchitecturesbeingdevelopednowadaysfor imageprocessingapplicationsarenotoften capableof directly executingAda languageprograms,often due to supportof parallel processingmodelsnot accommodatedby Ada’s taskingmechanism.Hence,most applicationsdesignedfor suchprocessorsare still written in specialassemblyor microcodelanguages.Image algebra,on the otherhand,providesa level of specification,directly derivedfrom theunderlyingmathematicson which imageprocessingis basedand that is compatiblewith both sequentialandparallelarchitectures.

Enthusiasmfor imagealgebramustbetemperedby theknowledgethat imagealgebra,like anyotherfield of mathematics,will neverbe a finishedproductbut remaina continuouslyevolving mathematicaltheory concernedwith the unification of image processingand computervision tasks. Much of themathematicsassociatedwith image algebra and its implication to computer vision remains largelyuncharteredterritory which awaitsdiscovery. For example,very little work hasbeendone in relatingimagealgebrato computervision techniqueswhich employtools from suchdiverseareasasknowledgerepresentation,graphtheory, and surfacerepresentation.

Severalimagealgebraprogramminglanguageshavebeendeveloped.Theseinclude imagealgebraFortran (IAF) [68], an image algebraAda (IAA) translator[65], image algebraConnectionMachine*Lisp [67, 19], an imagealgebralanguage(IAL) implementationon transputers[9, 10], and an imagealgebraC++ classlibrary (iac++) [66, 62]. Unfortunately,thereis oftena tendencyamongengineerstoconfuseor equatetheselanguageswith imagealgebra.An imagealgebraprogramminglanguageis notimagealgebra,which is a mathematicaltheory. An imagealgebra-basedprogramminglanguagetypicallyimplementsa particular subalgebraof the full image algebra. In addition, simplistic implementationscanresult in poor computationalperformance.Restrictionsandlimitations in implementationareusuallydueto a combinationof factors,the mostpertinentbeingdevelopmentcostsandhardwareandsoftwareenvironmentconstraints. They are not limitations of image algebra,and they should not be confusedwith the capability of imagealgebraasa mathematicaltool for imagemanipulation.

3

Page 12: Image Algebra by Ritter

Image algebrais a heterogeneousor many-valuedalgebraHeterogeneousalgebrain the senseofBirkhoff and Lipson [3, 45], with multiple setsof operandsand operators.Manipulationof imagesforpurposesof imageenhancement,analysis,andunderstandinginvolvesoperationsnot only on images,butalsoon differenttypesof valuesandquantitiesassociatedwith theseimages.Thus,thebasicoperandsofimagealgebraareimagesandthe valuesandquantitiesassociatedwith theseimages.Roughlyspeaking,an imageconsistsof two things,a collectionof pointsanda setof valuesassociatedwith thesepoints.Imagesare thereforeendowedwith two types of information, namely the spatial relationshipof thepoints, and also sometype of numeric or other descriptiveinformation associatedwith thesepoints.Consequently,the field of imagealgebrabridgestwo broadmathematicalareas,the theoryof point setsand the algebraof value sets,and investigatestheir interrelationship. In the sectionsthat follow wediscusspoint andvalue setsaswell as images,templates,andneighborhoodsthat characterizesomeoftheir interrelationships.

4

Page 13: Image Algebra by Ritter

CHAPTER 2ELEMENTS OF POINT SET TOPOLOGY

In order to readanythingaboutour subject,the readerwill haveto learn the languagethat is usedin it. We shall try to keep the numberof technicaltermsas small as possible,but there is a certainminimum vocabularythat is essential.Much of the standardlanguageis takenfrom point set topologyandthe theoryof algebraicsystems,subjectswith which we arenot concernedfor their own sake.Bothsubjectsare, indeed,independentbranchesof mathematics.Point set topologyandset theoryhavetheirown basicundefined concepts,subjectto variousaxioms;oneof theseundefinedconceptsis the notionof a set itself. It is not our intention to formally definethe requiredaxiomsthat governthe useof setsbut deal with setson an intuitive basis.

2.1 Sets

Intuitively, we think of a set as somethingmade up by all the objects that satisfy some givencondition,suchasthe setof integers,the setof pagesin this book,or the setof objectsnamedin a list.The objectsmaking up the set are called the elements,or members,of the set and may themselvesbesets,as in the caseof all subsetsof a given set.

We adoptthe conventionof denotingsetsby capital lettersandthe elementsof setsby small letters.The following is a brief summaryof someof the thingswe shall simply assumeaboutsets.

2.1.1 A set X is comprisedof elements, and if is one of the elements,we shall denotethis factby “ ��� .” The notation“ � �� ” shall denotethe fact that is an object which is not anelementof X.

2.1.2 Thereis exactlyonesetwith no elements.It is the emptyset, andis denotedby the symbol � .

Throughoutthis book, the notationof symbolic logic will be usedto shortenstatements.If p andqare propositions,then the statement“ ����� ” meansthat p implies q or, equivalently,if p is true, thenq is true. The statement“ ������� ” is read: “p if and only if q,” and meansthat p and q are logicallyequivalent; i.e. “ ��� � and ����� .”

An expression����! thatbecomesa propositionwhenevervaluesfrom a specifieddomainof discoursearesubstitutedfor is calleda propositionalfunction or, equivalently,a conditionon ; andp is calleda property,or predicate. The assertion“ haspropertyp” meansthat “ ����! ” is true. Thus, if ���"� isthe propositionalfunction “ is an integer,” then p denotesthe property“is an integer,” and “ ���$#% ” istrue, whereas“ �!�'&)()#� ” is false.

The quantifier “there exists” is denotedby * , and the quantifier “for each” is denotedby + . Theassertion“ +,-*%.0/214351 +,6879�!�:<;5.=;56) ” reads“for eachx thereexistsa y suchthat for eachz, �!�:>;?.@;?62 is true.”

A set may be describedeither by giving a characterizingpropertyor by listing the elements.Thestandardway to describea setby listing elementsis to enclosethedesignationsof theelements,separatedby commas,in braces,e.g. {1,2,3,4,5}. In termsof a characterizingpropertythis set could be written

5

Page 14: Image Algebra by Ritter

as ACBEDGF�H�B!IKJ , which reads“the setof all B suchthat F!H:B!I ,” wherep denotesthe property“is a positiveinteger less than 6.”

If L and Y are sets, then “ L MON ” will mean that L and Y have the sameelements;that is,P BQDRH�BRSTL�IVUXW H"B0STNXI .L YZN , read “X is a subsetof Y,” signifies that eachelementof X is an elementof Y, that is,P BRD[H�BRSTL�I\W]H�BRSTN�I . Equality is not excluded— we call X a propersubsetof Y wheneverL^Y�N

and L _MQN . The set whoseelementsare all the subsetsof a given set X is called the powerset of Xand is denotedby `ba . The following statementsare evident:

2.1.3 L YcL for every set X.

2.1.4 If LdYeN and NfYZg , then LhYZg (i.e. Y is transitive).

2.1.5 LhMiN if and only if both LjYkN and N]YeL .

2.1.6 l YmL for every set X.

2.1.7 l Sn` a and L SQ` a .

2.1.8 N^YoLhU�WdN]Sp` a , and BpS�L�U�W ACB!J9Sp` a .

Of these,2.1.5 is very important: the equality of two setsis usually provenby showingthat eachof the two inclusions is valid.

Throughoutthis text, various familiar setsof numberswill occur naturally. For convenience,weshall now reserve:q

to denotethe set of integers,rthe set of rational numbers,sthe set of real numbers,

and tthe set of complex numbers.

Thenotationq>uwv=q�xyv?szu

, ands{x

will refer to the setof all positiveintegers,the setof all negativeintegers,the set of all positive real numbers,and the set of all negativereal numbers,respectively.Observethat the number0 is not an elementof any of thesefour sets. The setwhoseelementsare thenumber0 and the positive integerswill be denotedby | . Thus,

|}M^AC~ v���v ` v���v>���b� J .Threefinite subsetsof

qthat will occur throughoutmuch of this text are

q�� M�AC~ v���v��b�K��v?����� J v\q u� M�A ��v ` v��K����v5� J v\�)�=��q>�@� M�A ����v����b�Kv����2v ~ vK��v��b���Kv5� J v

where� S q u .

6

Page 15: Image Algebra by Ritter

2.2 The Algebra of Sets

Intuitively, an algebra is simply a collection of nonemptysets togetherwith a finite numberofoperations(rules) for transformingone or more elementsof the sets into anotherelementof one ofthe sets. The formal definition of an algebrawill be given in Chapter3. In this sectionwe definethe elementaryset-theoreticoperationsand presenta list of standardformulaewhich are convenientinsymbolic work.

Whendefiningoperationson andbetweensetsit is customaryto view the setsunderconsiderationassubsetsof somelargersetU, calleda universalsetor the universeof discourse. For instance,in planegeometry,the universalset consistsof all the points in the plane.

2.2.1 Example: Considerthe equation�"�[�p�)�'���������2�C�:�=������� ��¡whosesolution set is the set ¢ �d£����C¤�¥� ¤5¦K¤�� ¦"§ , where

¦��f¨ ���, provided that © is the

universalset. However, if ª is the universalset, then ¢ �m£«�¬�2¤C¥� § .2.2.2 Definition. Let X andY be given sets.The union of X andY, written ¢®­�¯ , is definedasthe

set whoseelementsareeither in X or in Y (or in both X and Y). Thus,

¢°­�¯ ��±)²�³¬²X´ ¢®µ2¶ ²�´ ¯�·{¸The intersectionof X and Y, written ¢º¹T¯ , is definedas the set of all elementsthat belongto both X and Y. Thus, ¢^¹�¯ �]±)²�³¬²X´ ¢¼»¾½=¿ ²�´ ¯�·\¸ For example, À�­TÁ� � Á andÀe¹ ±Ã� �«¤�����¤:¡«¤��2¤?� · �f±C¡�¤���¤?� · .

Two setsX andY arecalled disjoint if they haveno elementsin common,that is, if ¢®¹T¯ �oÄ .Obviously, Á>Å8»¾½=¿pÁ� are disjoint.

If ¢ ÆÈÇ , then the complementof X (with respectto U) is denotedby ¢8É and is defined as¢8É �Z±��0³¬�R´ Ç ¤\��Ê´ ¢Ë· . The differenceof two sets ¢ ¤ ¯OÆiÇ is denotedby ¢�Ì�¯ and definedas¢�Ì�¯ �m±C�0´ ¢ ³¬��Ê´ ¯�· . Note that ¢8É � Ç-Ìb¢ .

For future referencewe list below (2.2.1) someof the more important laws governingoperationswith sets. Here X, Y, and Z are subsetsof somegiven universalset U.

Becauseof associativity,we candesignate¢m­ � ¯Í­0Î � simply by ¢®­�¯Í­0Î . Similarly, a union(or intersection)of four sets,say

��Ï ­�¢ � ­ � Î�­�¯ � , can be written asÏ ­Ð¢Ñ­V¯Í­8Î because,by

associativity,the distributionof parenthesesis irrelevant,andby commutativity,the orderof termsplaysno role. By induction,thesameremarksapply to the union (or intersection)of anyfinite numberof sets.

The union of n sets, ¢ÐÒ ¤�ÓbÓ�Ó5¤ ¢[Ô , is writtenÔÕÖØ× Ò ¢ Ö , and the intersectionis

ÔÙÖØ× Ò ¢ Ö .The relation between ¹ , ­ , and Æ is given by:

2.2.3 The statements

(i) ¢ÚÆ�¯ , (ii) ¢ � ¢O¹�¯ , (iii) ¯ � ¢m­Ð¯ , (iv) ¯[É<Æ�¢9É , and(v) ¢m¹T¯¬É �nÄare all equivalent.

7

Page 16: Image Algebra by Ritter

Identity LawsÛ°Ü9ÝßÞnÝ Ûcà9ÝßÞpÛÛmÜ0áQÞpÛ ÛmàTáQÞná

Idempotent LawsÛmÜ�Û^ÞpÛ Ûmà�ÛºÞ�ÛComplement Lawsâ ÛRãåä$ã=ÞpÛ áæã,ÞnÝ�çGÝGã�Þßá

ÛmÜ�Û ã ÞnÝ Û®à�Û ã Þ�áAssociativeLawsâ ÛmÜ�è�ä>ÜTé�ÞpÛcÜ â è�Ü0é-ä â Û°àÐèXä>à0é�ÞpÛmà â ènàTé-ä

Commutative LawsÛmÜ�èZÞpèÍÜ�Û Û°à�èoÞ�è�à�ÛDistributive LawsÛmÜ â èÍà0é ä\Þ â ÛmÜÐèXä>à â Û°Ü0é ä Ûmà â èÍÜTé-äyÞ â Ûmà�è�ä>Ü â ÛmàTé-äDeMorgan’s Lawsâ Û°ÜÐèXä ã ÞpÛ ã à�è ã â Û®à�è�ä ã ÞpÛ ã Ü�è ã

Figure 2.2.1 Laws of Operationswith Sets

2.3 Cartesian Products

LetÛêÞië�ìíç?î�ï

andèOÞZëCð�ç?î@ç�ñ�ï

. The set of distinct orderedpairs

é�Þ�ë â ìíç'ðòä?ç â ìíç?î�ä?ç â ìíç?ñ�ä5ç â î@ç?ð ä5ç â î@ç?î%ä?ç â î@ç?ñ2äKï

in which the first componentof eachorderedpair is an elementof X while the secondcomponentis anelementof Y is called the Cartesianproductof X andY. Orderedpairsaresubjectto the onecondition:â ìíç?î�ä Þ â ñ«ç?ðòä�ó�ô�ì�Þoñ�õÃö�÷TîRÞøð

; in particular,â ìíç?î�ä Þ â î@ç?ì@ä ó�ô�ì�Þoî

. Sincethe Cartesianproductis oneof themostimportantconstructionsof settheory— enablingus to expressmanyconceptsin terms of sets— we define it formally.

2.3.1 Definition. Let X, Y be two sets.The Cartesianproductof X andY, denotedbyÛ^ùTè

, is theset of all orderedpairs

ë â ìíç'î�ä\ú¬ìRûTÛ8ç?î�ûTè�ï.

2.3.2 Example: View the elementsofÛ�ÞZëÃü�çKý�çÿþ%ï

as the coordinatesof points on the x-axis andthe elementsof

èmÞQë�ü�ç?ý«ç5þ«ç���ïas the coordinatesof pointson the y-axis. Then the elements

ofÛ ùRè

are the rectangularcoordinatesof the twelve pointsshown(Figure2.3.1).

8

Page 17: Image Algebra by Ritter

4

3

2

1

1 32

(1,1)� (2,1)� (3,1)�(1,2)� (2,2)� (3,2)�(1,3)� (2,3)� (3,3)�(1,4)� (2,4)� (3,4)�

Figure 2.3.1 The Cartesianproduct ����� viewedas a subsetof the plane.

If in the aboveexamplewe would have let � ����� instead,then the elementsof the set� ����������� are all the points in the first quadranthaving integral coordinates.Similarly, when��������� , the set ������������ consistsof all pairs �����! #" of real numbers� and , andrepresentsthe usual �$���% &" -coordinateplane.

The Cartesianproductof threesetsX, Y, andZ is definedby ��'�(��)*�+�,�-�'��".��) , andthatof n setsby induction: ��/0�2131415���76'������/8�2141315�'�96;:</=">���96 . The Cartesianproductof n setsis

alsodenotedby6?@BA / � @ ; an elementof

6?@BA / � @ is written �$�C/D�FE3E4E%�!�#6#" and � @ is called the ith coordinate.

If ����� @ for GH�JI;�3E4EKE3�KL , thenwe define � 6 � 6?@BA / � @ . In particular,the ���M�% <" -coordinateplane,also

known as two dimensionalEuclideanspace, is denotedby �.N , while O�N denotesthe discretesubsetof� N consistingof all points having integral coordinates.

Thenotionof Cartesianproductextendsthesetof elementaryset-theoreticoperations.In comparisonto P and Q , however,theCartesianproductis neithercommutativenor associative:in general,�R�7�TS������ and �����'��">��)�S�����U���(�U)V" . Also, �-�W���YX Z7[����JXY\;]^�R��X (or both). Therelationbetweenthe Cartesianproductand the operationsof union and intersectioncanbe summarizedas follows:

2.3.3 � ��_��P�)0"`������'��">P��,����)0" .� ���_��Q�)0"7��_���'�a"^Q�������)0" .2.4 Families of Sets

If for eachelement b of somenonemptyset c there correspondsa set �ad , then the collectione � d�f bhgickj is called a family of sets,and c is called an indexingset for the family. We alsowritee ��dlj dDm3n fore �ad f b'g�o9j . If the indexing set c(�p� , then the indexedfamily

e � @ j @ mDq is called asequence(of sets)and may also be denotedby

e � @ jsr@BA / .9

Page 18: Image Algebra by Ritter

The notion of union and intersectioncan be generalizedto any arbitrary indexedfamily of subsetsof someuniversal set U.

2.4.1 Definition. Let t3uav5w v=x3y be a family of subsetsof a universalsetU. The union of this familyis denotedby zvDxDy u�v and is the sett|{W}�~Y�^{�}'u v����;�>�=�.�B�3�����.�;�#�V� }���w��The intersectionis denotedby �vDxDy u v and is the sett|{W}�~Y�^{�}'u�v ���l���4�;�F�K��� }���w��For a sequencet3u7�,w3��B��� of setswe also usethe notation������� u ��� u �^� ua� � �4�3�!¡ �D�C¢ �£�B��� u ��� u �.¤ ua� ¤Y�4�3�to denoteunion and intersection,respectively.

2.4.2 Example: Let � � t � � � }�¥R�§¦9¨ � ¨+©Dw . For each � } � , let u v �t|ª«�>ª`}�¥ ¡ ¦9¨�ª`¨ � w . Then�vDxDy u v � t|ª`�>¦`¨�ª`¨¬©Dw � � ¡ �D�­¢ £vDxDy u v � t3¦5w®�Example2.4.2canbegeneralizedto the following usefulfact: let X beanysetand,for each{W}'u ,

let u7¯ be a subsetof X suchthat {°}�u9¯i±�u . Then u � z¯ xD² u9¯ .It follows from the definition that the union andintersectionof a family of setsdoesnot dependon

how thefamily is indexed.That is, unionandintersectionareunrestrictivecommutativeandassociative.Thecomplementlaws,distributivelaws,andDeMorgan’slawsalsohold for thesegeneralizedoperations.In particular, we have

2.4.3 If t3u v w vDxDy is any family of subsetsof someuniversalsetU and ³´±J~ , thenµ ©D¶³ � µ �vDxDy u v ¶ � �v=x|y µ ³ � u v ¶µ�· ¶¸³ ¤º¹ zvDxDy u v|» � zvDxDy µ ³ ¤ u v ¶µ�¼ ¶ ¹ zvDxDy u v;»F½ � �vDxDy u ½v �=�C¢ ¹ �v=x|y u vD»s½ � zvDxDy u ½vµ�¾ ¶¸³T¿ ¹ zvDxDy u�v » � zv=x3À ¹ ³¸¿Uuav »µ�Á ¶¸³T¿ ¹ �v=x|y u v » � �v=x|y ¹ ³´¿°u v »µ� ¶ �v=x|y · ²>à � ·Ä �ÃKÅKÆ5Ç^ÈKÉ ÊDËCÌ ÍÎDÏ3ÐkÑ Ç>ÈaÒ Ñ.Ó ÍÈKÔ%Õ Ç^ÈKÉ�Ö

10

Page 19: Image Algebra by Ritter

2.5 Functions

The notion of a function (or map) is basicin all mathematics.Intuitively, a function f from a setXinto a set Y, written ×ÙØ­ÚÛÜ , is a rule which assignsto each Ý�Þ°Ú someelement ß of Y, wherethe assignmentof Ý to ß by the rule f is denotedby ×Mà�Ý�á�â¸ß or ×JØãÝ*ä ß . However, we shalldefinethe notion of a function formally in termsof the primitive concept“set” by identifying functionswith their graphs.

2.5.1 Definition. Let X and Y be two sets. A function f from X to Y, denotedby ׬ØHÚåÛ Ü isa subset×ÙæJÚ�çUÜ with the property: for each ÝÙÞ°Ú , there is one, and only one, ß2Þ°Üsuch that à�ÝHè%ß&áéÞ+× . The set of all functions from X into Y will be denotedby ܧê . ThusÜ ê âë|×�Ø>×9ìîí>ï�ð_ñCòCó!ô�ìîõ;ò`ð_öKõD÷(ÚTôKõVÜ�ø .

We write ×Mà�Ýùáaâ�ß for à�Ý�è%ß<á'ÞY× and say that ß is the value f assumesat Ý , or that ß is theevaluationof f at Ý . For instance,defining Ú�â*ÜRâ+ú , then the set ×�æÙÚ-çWÜ definedby

(i) ׬â�ëDà$ÝMèûß<á>Ø;ß9â�ü;Ý`ý*þ;è>ÝWÞ'ÚUø�õ;ö(ii) ×Jâ�ë;à$Ý�è%ü;Ý«ý*þDá>اÝWÞ'Ú°øis a function ×°Ø�ÚÿÛ�Ü . Observethat this function is completelyspecified by the rule

(iii) ×Mà$Ý�ákâJü;Ý9ý+þ or, equivalently,by either ßWâJü;Ý�ý+þ or Ý�ä ü;Ý9ýºþ .Throughoutmuch of this book we shall specify functionsby assignmentrules (as in (iii)) and call

the set ë;à$ÝMèûß&á Ø5ß9â�×Mà�ÝùáMï=ò � Ý'Þ'Ú°ø , where ×°Ø#ÚÿÛ Ü , the graph of the assignmentrule ×Mà$Ý�á8â ßor, simply, the graphof f. Note that underthis definition the statement“the graphof f ” is synonymouswith the statement“the function f.” We will alsoperiodicallyrefer to certainspecialpropertiesandtypesof functions. In particular,it will be importantto distinguishbetweenthe following typesof functions:

2.5.2 A function ×�Ø5Ú�Û�Ü is said to be one-to-one(or 1–1) if distinct elementsin X havedistinctevaluations;i.e. Ý��â���� ×Mà�Ýùá��âY×Mà�&á or, equivalently, ×Mà�Ýùá®âY×Mà�&á� ÝWâ�� .

2.5.3 A function ×*Ø�Ú Û Ü is said to be onto (or f is a function from X onto Y) if every ß2Þ°Ücorrespondsto anevaluation×Mà�Ýùá for some Ý�ÞiÚ ; i.e. if ßaÞiÜ�� ��Ý�ÞiÚ í$ñCó��7ô��­ïDôé×Mà�Ýùá.âß .

2.5.4 A function ×YØ Ú Û Ü assigningall ݬÞ*Ú to the samesingle element ßÙÞ*Ü is called aconstantfunction.

2.5.5 The function ×�Ø#Ú ÛÚ with the property ×Mà�Ýùá8â(Ý���Ý2ÞUÚ is called the identity functionon X and will be denotedby ��� . If �æJÚ , the function �VØ�� ÛåÚ given by ��à�#á«â�� iscalled the inclusion of A into X.

2.5.6Given sets Ú��Dè���� �%èûÚ"! , the function #%$YØ !&')( � Ú ' Û Ú*$ , where þ,+.-/+10 , defined by

# $ à$Ý � è�� ���Kè!Ý $ è ��� �Kè%Ý ! áãâ Ý $ is called the projection onto the jth coordinate.

11

Page 20: Image Algebra by Ritter

2.5.7 Suppose 243 5�6 6�6�572�895 :;3<5 6�6�675�:=8 , and X are nonempty sets, and >@? A BC5�6�6 6�5EDthere exist functions F�GIHJ2KG1L :=G.M<NPO QRGSH/2 L 2KG . Then the familiesT F G HU?VA,BR5�6 6�6�5�D=WXMYNPO T Q G HZ?VA�BR5 6�6�675ED[W inducenew functions F\H 8]

G_^ 3 2 G L 8]G_^ 3 : G MYNPO`QaH

2 L 8]G_^ 3 2 G that are defined by F[bcd3�5 6�6�6�5Ece8gfhA biF<3 bcd3 fE5�6�6�6 5EF 8gbicg8gf7fjM<NdO Q=bkc=fhA

blQ 3 bcmfE5�6�6 6�5iQ 8 bkcmf�f , respectively. The functions F G M<NdO Q G are called the ith-coordinatefunctionsof f and g, respectively.

2.5.8 Given a function FnHd2oLS: and a subsetp/q�2 , then the function f consideredonly on A(i.e. the function

T bkc[5EF[bcmf�fUHUcsrtpuW ) is called the restriction of f to A and is denotedbyFwv x . Thus, Fwv x�AyF{z|bp~}�:�f .2.5.9 In the reversedirection, if pJq~2 and F�H�phLo: , then any function ��H�2 L1: with the

property �Kv x�A�F , is called an extensionof f over X relative to Y.

2.5.10 Let 2 A�p`��� . Given functions F�HPp�L�: and QaHP�hL : , then the function �/H�2 L.:definedby

��b�cmf�A� F[bcmft?�F�c�rspQ=bcmft?�F�c�r�2���p

is called the extensionof f to g over X relativeto Y. We will usethe symbol F�v � to denotethisextension.

Thedifferencebetween2.5.9and2.5.10is in the definitionof an extensionand the extensionof thefunction f. Observealso that in 2.5.10, �Kv x�A/bFwv �Rf4�� x A�F .

The following examplesshouldhelp in clarifying the importantconceptsof “one-to-one”and“onto”functions.Thefunction F�H��~L�� definedby F[bic=fUA��Cc=�"B is notontosince,for example,F[bic=f9�A��"rt�for any c�r�� . However, f is one-to-onesince �Rc��~B�AJ���*��B�  c¡A�� . On the other hand, thefunction Q¢H�£�L�£U¤�� T�¥ W definedby Q=bkcmfwA�cP¦ is onto sincefor every §�r�£�¤�� T�¥ W�¨�ctrs£ (namelyctA,©�ª § ) suchthat Q@bkcmf«A�§ . But Q is not one-to-onesince Q@b�¬��Cf«A�Q=bk��f and ¬��s�A�� .

Given two functions F�HR2­L®: and Q¢H<:hL.¯ , thenthe compositionQ�°UF�H<2±L.¯ is definedbyblQ²°³FVfibcmfUA�Q=bkF;bcmf�f">@csr�2 . The following theoremindicatesa simplemethodfor establishingthat agiven function f (respectivelyQ ) is one-to-one(respectivelyonto).

2.5.11 Theorem. Let F�H<2®L±: and Q¢HC:�L®2 satisfyQU°@F�A�B�´ . Thenf is one-to-oneandg is onto.

Proof: Since F[bic=f�AµF[bi��f� ¶c�A~b·QX°³F;f7bcmf�A�Q=biF;bcmfifUA�Q=bkF;bi��f�fUAub¸Q²°«F[f�bi��fUA�� , we havethat f is one-to-one.The function Q is onto sincefor any c�r�2o¨�§|r�: , namely §�A�F[bcmf ,such that c`A�b·QX°«F[f�bic=f²A¹Q=bF;bic=f7f²A�Q=bk§ef .

Q.E.D.

As a simple illustration of Theorem2.5.11we showthat for any function ºtH�2­Lo¯ , the functionFuH=2»L»: , where :­A�2 }�¯ and F[bcmf²Aybic;5Eºmbkcmf�f is one-to-one.Let ¼P3�H[2�}�¯/L½2 be the

12

Page 21: Image Algebra by Ritter

projection onto the first coordinate. Then ¾P¿�À�Á,Â�Ã Ä Ã is ÅEÆ . Hence,by Theorem2.5.11, f isone-to-one(and ¾ ¿ is onto).

The fact that the compositeof one-to-oneandonto functionsis againa one-to-oneandonto functionfollows from the next theorem.

2.5.12 Theorem. SupposeÁ�Â[ÃSÄIÇ and ÈÉÂ[Ç®Ä Ê .

(i) If f and g are onto, then È4À9Á�Â=ÃIÄ Ê is onto.

(ii) If f and g are one-to-one,then È�ÀÁ`ÂPÃoÄ»Ê is one-to-one.

Proof: (i) Let Ë�Ì�Ê . Since È is onto, Í�ÎsÌ�Ç suchthat ÈPÏÎeгÑ�Ë . Sincef is onto, Í�Ò|ÌÓÃsuchthat Á;ÏiÒ=гÑ�Î . But then ÏlÈ"À«Á[Ð�ÏÒmЫÑ`È=ÏkÁ;ÏÒmÐ�гÑ�Ë . Therefore,È�À«Á is onto.

(ii) SupposeÏlȲÀ«ÁVÐiÏiÒ=ÐÑ�Ï·È"À«Á[Ð�ÏiÒgÔÕÐ , i.e. È=ÏkÁ;ÏÒmÐ�ÐÑuÈ=ÏkÁ[ÏÒeÔÕÐ7Ð . Then Á[ÏÒmÐÖÑ,Á[ÏÒeÔ_Ð since È isone-to-one.But then ÒtÑ�Ò Ô sincef is one-to-one.Accordingly, ÈXÀÁ is one-to-one.

Q.E.D.

2.6 Induced Set Functions

If Á�Â<Ã±Ä®Ç , thenthe setX is calledthe domainof f andis denotedby ×�Ø<Ù�ÚgÛlÜ[ÏiÁ;Ð . The rangeoff, denotedby Ý<Ú�ÜeÈeÞ<ÏiÁ;Ð , is definedas Ý<Ú�ÜeÈPÞ<ÏkÁ;ÐUÑ~ß�Á;ÏiÒ=ТÂ�Ò�ÌsÃÓà . It follows that ×�Ø<Ù�Ú�ÛkÜ[ÏiÁ�á â�ÐUÑ�ã ,Ý<Ú�ÜeÈPÞ<ÏiÁ�á â�Ð�Ñ�ß<Á;ÏiÒ=Ð4²ÒtÌsãäà , and that ÁnÂ=ÃoÄSÝ<Ú�ÜeÈPÞYÏÁmÐ is onto.

Sincefor each ã,Ì|å Æ\æ Ý<Ú�ÜeÈPÞ<ÏiÁ�á â ÐÖÌ�å<ç , f inducesa function èÁ|Âgå Æ Ä¶åYç definedby

èÁ;ÏiãäÐ�Ñuß�Á[ÏÒmÐKÂ�ÒsÌsãÓàUéIn addition, f also inducesa function èÁ;ê ¿ Â;å<ç,Ä»å Æ definedby

èÁ ê ¿ ÏkëKÐUÑìß9Ò�Â�ÒsÌ�Ã�í<îPï�Á[ÏiÒ=ЫÌsë/à�éThe set èÁ ê ¿ ÏëKÐ is called the inverseimage of B.

It is commonpracticeto let f(A) and Á[ê ¿ ÏëKÐ denotethe evaluation èÁ;ÏiãäÐ and èÁ[ê ¿ ÏkëKÐ , respectively.Sincein mostcasesthecontextof discussionavoidspossiblemisinterpretation,this economizesnotationaloverhead. Although we shall follow this conventionto someextent, we point out that in machineimplementationand algorithm descriptionthe maps Á æ Á[ê ¿<æ èÁ , and èÁ[ê ¿ must be distinguishedas theydo representdifferent processes.

2.6.1 Example: Let Á�ÂRð�Ä.ð be defined by Á[ÏiÒ=Ð�ѵÒdñ , ãìÑ�ò�ó æ�ô9õ å æEõ å æ�öd÷ , and ë¹Ñìß�ó æiøPæ�ù à .Then Á[ÏãäÐ9ÑJß�ó æ å æ�ù à and Á;ê ¿ ÏiëKÐ9ÑJß�ó æ�ô ó æ å æ�ô å æEöeæ�ô9ö à .

The inducedset-valuedfunctions èÁ and èÁ;ê ¿ arecalledsetfunctionssincethey arefunctionsof setsinto sets. Inducedset functionspossessvariousproperties.In particularwe state:

13

Page 22: Image Algebra by Ritter

2.6.2 Theorem. Let ú�ûCü®ý±þ , ÿ�������ü , and ��ÿ��� �� � beanyfamily of subsetsof X. Then:

(i) ú��kÿ����­ú������(ii) ú

������� ÿ������ ����� ú��iÿ����(iii) ú

�! ���� ÿ � � � ���� ú��iÿ � �The following exampleshowsthat the inclusion(iii) cannot,in general,be replacedby equality.

2.6.3 Example: Let ÿ � �"�$#�%'&(�«û*)"+,#-+/.(%*)0+/&1+/.�� , � ��0�2#�%3&(�Uû*)0+/#4+/.(%657+/&1+98:� , and ;=<�û?>A@B>�ýC> the projectiononto the first coordinate(i.e. the x-axis). Since ÿ,DE�F�HG , I; < �iÿ9D��E�6�JGLK�J��#sû*)"+�#M+�.N�0�OI; < �ÿP��DJI; < ����� .

Of the two inducedset functions, Iú�Q < is the more importantone as it is much more well-behavedin the sensethat it preservesthe elementaryset operations.

2.6.4 Theorem. Let úÓûRü±ý±þ , ÿ������nþ , and ��� � � �R � any family of subsetsof Y. Then:

(i) ú�Q < �iÿP����ú�Q < �����(ii) ú Q < �2�0ST�:�VU�ú Q < �����XW S(iii) ú Q < �Y����� � � � � ����� ú Q < �2� � �(iv) ú Q < �Z �R � �"� � � �R � ú Q < ���"�[�Proof: We only prove(iv); the proofsof (i) through(iii) are just assimple. Observethat

#-\tú Q <^]7_���� � �a`Fb:c ú���#d�6\ _�R � � ��b:c ú���#d�6\B� �fehg \Mib:c #j\aú Q < �$� � � e�g \Mi b:c #-\ _�R � ú Q < ��� � �#-\tú Q < ]7_���� � � ` b:c ú���#d�6\ _�R � � ��b:c ú���#d�6\B� �fe�g \Mib:c #j\aú Q < �$� � � e�g \Mi b:c #-\ _�R � ú Q < ��� � �

Q.E.D.

The following importantrelationshipbetweenthe two set functionsis alsosimple to verify:

14

Page 23: Image Algebra by Ritter

2.6.5 Theorem. Let k�lnmVoqp , rtsum , and v�sup . Then:

(i) rCswk�xzy|{|k�}$rP~������(ii) k�{0k x=y }�v�~�s�v .

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

2.6.6 Example: Let A and � y be as in Example2.6.3. ThenrF�� � x=yy }�� y }2rP~'~ � � x=yy }����-l����/�4�/����~ � �[}$���'�(~�l*�"�,�-�/�(�*�"���,�E���/�6�If k!l�m�o�p is onto, thenequality holds in 2.6.5 (ii). In particular,f is onto �:� �k� ^�k x(y }�v�~$¡ �v£¢zv sqp . Similarly, f is one-to-one �:� ¢z�L¤ �k�}¥m¦~ the set �k�x(y�}�� �(�[~ consistsof a single

element. Thus, with each one-to-onefunction k�l7m o p there is associateda function k x=y l�k�}2m!~Yo m , called the inverse of f, which is defined by k x=y }$�(~ � � , where � �§� � �k x=y }'�����[~ ;that is, k x(y }��(~�¤ �k x=y }'� �(�[~E¢z�u¤ �k�}2m!~ . For example, if k¨l"©NªZoC© is given by k�}��d~ ��« � ,then k�x=y�}2�~�¤ �k�x=y�}'�����[~ � �a¬(� and, hence, k�x=yR}2��~ � ¬ . Similarly, k�x(y   « � ¡ � � and, in general,k�x=y�}$�§~ � �=­^¢z�Y¤ �k�}$© ª ~ . If kYl�mOo�p is both one-to-oneandonto, thenthe inverseof f is a functionk�x=y7l�p¨o�m since k�}2m!~ � p . This differs from �k�x=y�l���®/o��R¯ eventhough,aspointedout earlier,it is standardpracticeto usethe samefunctional notation.

There are severaluseful observationsconcerningone-to-oneand onto functions. Supposethatk!l�m�o�p is one-to-oneandonto. Then k x=y l�p¨o�m is one-to-oneandonto, and }�k x=y ~ x=y � k . Inaddition,equalityholds in 2.6.5(i) and(ii). If we alsohavea one-to-oneandonto function °�l�p�o²± ,thenboth °|{³k and }T°´{fk�~ x=y areone-to-oneandonto functions. This follows from Theorem2.5.12andthe fact that }X°0{�k�~ x=y � k�x=yP{*°dx=y .2.7 Finite, Countable, and Uncountable Sets

Two setsaresaidto be equivalentif thereexistsa one-to-oneandonto function k4l�m�oOp . Hencethe idea that the two setsX and Y areequivalentmeansthat they are identical exceptfor the namesofthe elements.That is, we canview Y asbeingobtainedfrom X by renamingan element� in X with thenameof a certainuniqueelement� in Y, namely � � k�}$�§~ . If two setsX andY arefinite, thenthey areequivalentif andonly if they containthe samenumberof elements.Indeed,the ideaof a finite setX isthesameassayingthatX is equivalentto a subset�����3���¶µaµ�µ3�¶��� of thenaturalnumbersfor some�Y¤-· ª .To makethis andrelatedideasmoreprecise,we list the following definitionsinvolving a setX and · ª .

2.7.1 Definition. A set X is

finite if andonly if either m �H¸ or ¹?��¤B·�ª suchthat X is equivalentto �����3�(�aµaµ'µº�¶��� ,infinite if it is not finite,

denumerableif and only if it is equivalentto · ª ,

countableif and only if it is finite or denumerable,and

uncountableif it is not countable.

15

Page 24: Image Algebra by Ritter

Somepropertiesof countablesetsare listed in the next example.

2.7.2 Example:

(i) » ¼L½�¾�¿C» is countable.

(ii) X is countableÀ ¿ÂÁ�Ã�Ä�źÆ�Ç�¼u½ ¾ suchthat X is equivalentto Y.

(iii) If X is equivalentto Y and Y is countable,then X is countable.

(iv) If »È¼uÇ and Y is countable,then X is countable.

(v) If É,Ê »�ËqÇ is onto and X is countable,then Y is countable.

(vi) If É/Ê »�ËqÇ is one-to-oneand Y is countable,then X is countable.

(vii) If Ì is countableand Í »EÎ Ê(Ï�ÐMÌ�Ñ is a collectionof countablesets,then ÒÎ�ÓaÔ »1Î is countable;

i.e. the countableunion of countablesetsis countable.

Assuming Example 2.7.2 as a fact, it is not difficult to show that the set ½�Õ and the set Ö ofrational numbersare countablesets. First, note that the function ÉJÊ ½ ¾ Ë×½ definedby É�Ø$Ù�Ú�Û7ÜÝÚand É�Ø�Ù�Ú1Þ/ß�Û"ܨÞ�ÚMàJß , where ÚAÜLß�á3Ù�á'â(áäã�ãaã is one-to-oneand onto. Thus, ½ is equivalentto ½ ¾and hencecountable.Now for each åæÐ ½ define »7ç ÜuÍ[Ø$å�á�Ú�Û6Ê�ÚYÐ ½ Ñ . Then,since ½ is countable,itfollows from 2.7.2 (vii) that ½ Õ Ü Òç ÓRè » ç is countable.

To show that Ö is countable,define ÉJÊ ½�Õ1Ë Ö byÉ�Ø$å�áêé(Û6Üìë å¥í3éuå¥É´é4îÜðïïñå2É7é�ÜðïfòThen f is obviously onto. Henceby 2.7.2 (v), Ö is countable.

We wish to attacha label card(X) to eachset X, called the cardinality of X, which will provideus with a measureof the “size” of X. In particular,the label shoulddistinguishin someway if one ortwo given setshas more membersthan the other. Assigning ó¶ô?õ�ö(Ø » Û:ÜwÚ to a set X equivalenttoÍ?ß[á3Ù�áaã�ãaãºá3Ú�Ñ will satisfythis requirementfor finite sets(using the conventionóºô�õ�ö(Ø » ÛNÜðï if andonlyif » ܨ÷ ), for if Y is equivalentto X, then it follows from Theorem2.5.12 that Y is also equivalentto Í�ß�á3Ù�á�ãaã'ãºá¶Ú�Ñ . Therefore,óºô�õ�ö(Ø Ç Û"ÜøÚ and hence, óºô�õ�ö(Ø » Û�Üùóúô?õ�ö(Ø Ç Û . As can be seenfrom thefinite case,countingis not neededfor the purposeof determiningwhetheror not two setshavethe samecardinality. We needonly to pair off eachmemberof one set with a memberof the other set and seeif any elementsare left over. Thus the notion of two setshaving the “samesize” canbe formalizedasfollows: two setsX and Y havethe samecardinality if andonly if they areequivalent.

2.7.3 Examples:

(i) Let » ÜHÍ�Ù�ÚYÊ�ÚYÐ ½�¾ Ñ ¼�½�¾ and ÉZÊ ½�¾!ËC» be definedby É�Ø$Ú�ÛfÜHÙ�Ú . It is easyto verifythat f is one-to-oneand onto. Thus X and ½ ¾ have the samecardinality even thoughX is apropersubsetof ½ ¾ . This is not possiblefor finite sets.No finite setcanbe equivalentto oneof its proper subsets.

(ii) Any openinterval Ø�ônáüû�Û³ÜJÍ�ý-Ð-þtÊ0ô1ÿ/ý4ÿ/ûúÑ ¼ þ is equivalentto theopeninterval Ø'Þ�ß�áaß�Û ,sincethe function ÉYÊ(Ø'Þ�ß�áaß�Û Ë Ø2ôná3ûúÛ definedby É�Ø�ýdÛ³Ü��Õ ô(Ø¶ß Þ!ýdÛdà��Õ û�Ø3ßfà¦ý§Û is one-to-oneandonto. Furthermore,by defining �-Ê�Ø'Þ�ß[áúß�Û Ë þ by �dØ$ý§Û^Ü ���� � � � it canbe seenthat (–1,1)

16

Page 25: Image Algebra by Ritter

is equivalentto � . Thus, � ����������������������� ������� � . It thereforefollows that any openinterval�!"��#�� has “just as many points” as � itself.

In order to comparethe size of two sets,we makethe following definition:

2.7.4 Definition. For two sets,X andY, we write � �����%$&�('�)*�����,+-� if thereexistsa one-to-onefunction from X to Y.

Note that we use the symbol “≤” rather than the word “smaller.” Obviously, if $ ./+ , then� �����0$1��'2� �����0+3� . However, the existenceof a one-to-onefunction from X to Y doesnot excludethe possibility that thereexistsalso a one-to-oneand onto function from X to Y, as Example2.7.3 (i)and (ii) show. Example2.7.2 (iv) showsthat, roughly speaking,countableinfinite setsrepresentthesmallestinfinity: No uncountableset can be a subsetof a countableset. In fact, it can be shownthat� �����%465 ����� �����%78� and � ������495 �;:�<� ������� � [27]. Since 465&.=� , )*�����>465?� '@)*�����>� � . Thus, � isin a sensemuch larger than 465 or 7 , which are of the sameinfinite size.

2.8 Algebra of Real-Valued Functions

If A=BC�?D (i.e., A=E"$GFH� ), then f is called a real valued function on X. Many of the commonarithmeticoperationsof � areinheritedby � D . We providea quick review of theseinheritedoperationsas they are of fundamentalimportancein imagealgebra. Specifically, let A"�>IJB=� D �LKJB=� , and |k|denotethe absoluteof k. Then we define:

2.8.1 �!MN� �!A-OPIQ��EQ$RFH�TS UV�!A3OWIX���!YQ�Z��A9�!Y[�\O1IQ��Y[��!M]M]� �0K_^�A`��E9$aF �TS Ub�]Kc^�A9���!Y[�d�eKf^ �!A9�!Y[����!M]M]M]�g�ihNA3hj�_E6$kF �RS Ul�)h]A3hm�>�!Y[�c�nh A9�!Y[��h�!M0o�� ��Ap^iI"��E6$GFH�RS Un�>Af^qIr�>�>YQ����A9�!Y[��^�Ir��Y[�Observethat �>Af^iI"�fE\$ F � is not the composition Ats;I definedpreviously. For example,ifAuE_�eF � is definedby A9�NY[�c�vYXw and I@E_�xF � by IQ��YQ�_�gy�Y , then ��Ap^iIX���!Y[�c�gy�Y{z , while�!A3s\IQ�>�!Y[�d�}|*Y"w . Note also that At^�IW�}If^�A , but A~s�I�:�uI_s�A .

It is alsoconvenientto identify the realnumberKpB�� with theconstantfunction �~E�$nFl� definedby �"�!Y[����K_�rY�BP$ . In particular,if ACE $�F�� , then �XKWBW� we definescalaradditionof f by k asthe function �>A_O&K"��E*$�F�� , where ��A-OWK"���>YQ����A6�>YQ�`O1K . Thus, A-O&K��}A-OJ� .

The set � D , togetherwith the aboveoperations,possessesvarious important properties,someofwhich are included in the next theorem.

2.8.2 Theorem. The set � D togetherwith the operationsdefined in 2.8.1 satisfiesthe followingproperties:

1. Theoperationof addition of functionsf and g satisfies:�!MN� �>A_O�IX��O@�<��AtOu��IcOC�Q�17

Page 26: Image Algebra by Ritter

�!�]�]� �P���@��������!�]�]�]�@�r�&�1�`�, i.e. a zero function

�C�*�����, suchthat

�-���W�}��!�0���k�r�=�J� � �f C�=�J� �, i.e., a function

 ¡�J�Q�G�H�, suchthat

�p�=�¢ ¡�6�Z�£�,

the zero function.

2. Theoperationof scalarmultiplication ¤c¥ � of a functionf by the real numberk satisfies:�!�N� ¤p¥ � ¤*¦{¥ �9�_�v� ¤ ¤ ¦ � ¥ ��!�]�]� § ¥ �}�v��!�]�]�]� ¨ ¥ �}�l�3. Theoperationsof addition and scalar multiplication satisfy:�!�N� ¤p¥ �!�3�W�X�©�£� ¤p¥ �6� ��� ¤-¥ �Q��!�]�]� � ¤ � ¤ ¦ � ¥ �=�£� ¤p¥ �9����� ¤*¦Q¥ �6�Proof: We only provepart 3 of the theorem.The remainingpartsare just assimple to proveand are left as an exercise.�>�>� ª ¤©¥ �!�3�W�"��«0�!¬[�\� ¤_¥ ª­�!�3�W�"���!¬[��«r� ¤_¥ ªm�6�>¬Q�6���r��¬[��«� ¤ �>�6�>¬Q���[� ¤ ���Q�>¬Q�>�?�®� ¤c¥ �6���!¬[�[�C� ¤c¥ �Q�>�>¬Q�for all

¬P�t�; hence,¤_¥ �>�_���X����� ¤c¥ �9�`�J� ¤c¥ �Q� . Observethat we usethe fact that k,

�9�>¬Q�and

�r��¬[�are real numbersand satisfy the distributive law.�>���N��¯�¯ ¤ � ¤ ¦±° ¥ � ° �!¬[�²�³¯ ¤ � ¤ ¦±° �6�>¬Q�� ¤ �>�6�>¬Q���r� ¤ ¦ �!�9�!¬[���²�®� ¤c¥ �6���!¬[�[��¯ ¤ ¦ ¥ � ° �!¬[�

for all¬��C�

; so� ¤ � ¤ ¦ � ¥ �=�³� ¤f¥ �9�\��� ¤ ¦ ¥ �9� .

Q.E.D.

It follows from properties1 through3 of Theorem2.8.2that� �

togetherwith operationsdefinedin2.8.1formsa real linear vectorspaceasdefinedin Chapter3. If X is a finite setconsistingof n elements,

then�²�

may be viewed as the well-known vector space�`´W� ´µ¶±·Q¸ �p¹

2.8.3 Example: Let� � º*§¼»X½�»6¾�¾�¾"»X¿9À

and let Á �W�`� � �`´be defined by Á ���9�}��!�9�¢§Â��»¢�6�>½ ��»�¾�¾�¾�»¢�9�>¿9���

. If Á ���Q��� Á ���9� , then�%�Q��§���»!�Q��½Ã��»)¾�¾�¾i»>�Q�,¿Ä���c���>�6�i§��i»��9��½Ã�¢»�¾�¾�¾�»¢�9��¿9���

and, hence,�Q���>�W��9�!�N�p�r�1�e�

. Therefore,�e���

and Á is one-to-one. Furthermore,if�!¬ ¸ »¢¬{Æ�»�¾�¾�¾�»i¬ ´ �=�b�²´

, and�/�3� � �

is the function defined by�9�!�N�J�Ǭ ¶ , thenÁ ���6�����>¬ ¸ »¢¬"Æ�»�¾�¾�¾�»¢¬ ´ � and, therefore,Á is alsoonto. It follows that any function

���¼�/�Å�canbe uniquely identifiedwith the orderedn-tuple

�!�9�¢§Â�¢»¢�9��½ �¢»�¾�¾�¾�»i�6��¿9���. In addition, if f and

g correspondto the n-tuples�t�®�!¬ ¸ »¢¬XÆ�»�¾�¾�¾�»¢¬ ´ �ÉÈ�ÊXËÌ�f���>Í ¸ »¢Í�Æ�»�¾�¾�¾�»¢Í ´ ��»18

Page 27: Image Algebra by Ritter

then Î3Ï�ÐfÑ�Ò!Ó"Ô ÏÖÕ�Ô�×¢Ó{Ø ÏCÕ�Ø�×�Ù�Ù�Ùi×¢Ó ÚLÏÖÕ�Ú{Ûand for any ÜuÝÌÞ ,

Ü©ß ÎtÑ�Ò Ü Ó Ô × Ü Ó Ø ×�Ù�Ù�Ù�× Ü Ó Ú Û�àExample2.8.3 showsthat Þ\á and Þ Ú are, from an algebraicpoint of view, essentiallythe same

vectorspace.This fundamentalfact providesa key componentin the studyof the imagealgebraanditsrelationshipto other algebraicstructures.The precisedefinition of algebraicequivalenceof two vectorspacesis given in the next chapter.

2.9 Distance Functions

A type of real valuedfunction of particularimportancein imageprocessingandpatternrecognitionis the distancefunction. Distancefunctions inducegeometricstructureson setsthrough the notion ofnearnessof oneelementto another.Thegeneraldefinitionof a distanceor metricon a setX is asfollows.

2.9.1 Definition. Let X be a nonemptyset. A distancefunction or metric on X is a functionâPãQälåPäRæ Þ that satisfiesthe following threeconditions:

(1)â Ò>Ó6×¢Õ Û�ç}èêérÓ9×¢Õ Ý äÅëÂìXíWâ Ò�Ó6×¢Õ�Û�Ñ�ètî3ïðÓñÑ2Õ¡à

(2)â Ò�Ó9×�Õ�Û©Ñ â Ò�Õ"×¢ÓQÛ£érÓ9×¢Õ Ý ä à

(3)â Ò�Ó6×¢ò Û©ó â Ò!Ó9×¢Õ Û\Ï â Ò!Õ"×¢ò ÛxérÓ9×¢ÕX×iò Ý ä à

When speakingof setson which metricsare defined,we refer to the elementsof the set as pointsand to

â Ò�Ó9×�Õ�Ûas the distancebetweenthe points

Óand

Õ. Property(1) of the function d characterizes

it as strictly nonnegative,and (2) as a symmetricfunction ofÓ

andÕ. Property(3) is known as the

triangle inequality. Excellentexamplesof distancefunctionsarethreemetricscommonlyusedin imageprocessing.Theseare the Euclideandistance,the city block or diamonddistance,and the chessboarddistanceon Þ Ú . For arbitrary points ô ÑlÒ�Ó"Ô�×�Ù�Ù�Ù�×¢Ó�Ú{Û

, and õ ÑlÒ!Õ�Ô�×�Ù�Ù�Ù�×iÕ�Ú{Ûof Þ Ú we define the

Euclideandistancebetweenx and y by

â Ò ô × õ Û\ÑÅö Ú÷øiù Ô Ò>Ó ø�ú Õ ø ÛØ�ûZüý ×

the city block distanceby

â Ô�Ò ô × õ Û\ÑÚ÷øiù Ô\þ Ó ø ú Õ ø þ ×

and the chessboard distancebyâ Ø�Ò ô × õ Û\Ñ@ÿ�� Ó�� þ Ó ø�ú Õ ø þ ã�� ó Ü ó�����à19

Page 28: Image Algebra by Ritter

Given a setX, a distanced on X, anda number � � , thenfor any point ����� , we candefine theset ����� ������� of points ����� that arewithin distancer of ��� ����� �����!�#"%$&�'�(�)� *+�,�.-��/�102 3 . In orderto simplify notationwe let � � �,�!� denotethe set � �4� � �5��� if it is clear from the discussionas to whichmetricd is beingused.We maythink of � ��� � �,�!� asa “sphere”with centerx andradiusr. Geometrically,however,thesesetsneednot look like spheres.Figure2.9.1providesexamplesof spheresin 687 of radius�":9 aboutthe point 0=(0,0) determinedby the Euclidean,city block, andchessboarddistances.

-1

1

-1 1

(a); (b)<-1

1

1=-1

(c)>-1

1

1-1

Figure 2.9.1 The spheres?,@+ACBED�F GH?,I�A�JK?,L�AMB�DON5F GH?,I!APJQ@/R�ST?,UVAWB�DYX5F G�?�I!A .2.10 Point Sets in Z#[

A large portion of the materialintroducedin the previoussectionsdealt with abstractsets,that is,setsof arbitraryobjectswhosenatureis immaterial. In this sectionwe briefly reviewpropertiesof specialsetsin Z [ . A nonemptysubsetof Z [ will be referredto asa point set. Elementsof a point setX, calledthepointsof X, will bedenotedby smallbold letters. In particular,the origin of Z [ , which is the n-tuple?,\+JP\]J�^_^_^�JP\`A consistingonly of zeros,will be denotedby 0.

2.10.1 Definition. Let acbd?,e�f&J�^_^Y^�JPe [ A1ghZi[ . Then the lengthor norm of x is definedasjkj a jlj b m e�nfpo�q_q_qro e n['sIt follows from this definition that the norm of the differenceof two points is the sameas the

Euclideandistancebetweenthe points; i.e., if acb:?,e f J_^_^_^�JPe [ A and tub:?�v f J_^_^Y^�JPv [ A , then

S+?�apJwtxA8bzy [{|�} f ?,e |�~ v | A nY� NX b jkj a ~ t jkj sIt is now easyto establishthe essentialpropertiesof the norm.

20

Page 29: Image Algebra by Ritter

2.10.2 Theorem. Let x and y be points in ��� . Thenwe have�,��� �l� ���l�����]�K�/�.�c�l� �W�l�!�����������/�����&���������������¡ �¢�,����� �k� ��£h¤¥�l�8�¦�§� ¤�£h�W�l�4¢�,������� ¨¨¨¨ �©ªP«�¬]­ ª � ª ¨¨¨¨¯® �l� �W�k�4�§� ¤¥�l�4¢�,��°+� �k� �²±³¤¥�l� ® �§� ���l�´±µ�l� ¤¥�l�Proof: Statements(i) and(ii) areimmediatefrom the definition. Statement(iii) is knownastheCauchy-Schwartzinequality which can be rewritten as¶ �·ªP«�¬ ­ ª � ª_¸�¹ ®

¶ �·ªP«�¬ ­ ¹ª ¸ ¶ �·ª�«º¬ � ¹ª ¸ ¢Sincea sum of squarescan neverbe negative,we have�·ª�«�¬ � ­ ªV» ±³� ª � ¹ �¼�for every real numberr. This inequality can be written in the form½ » ¹ ±¿¾&À » ±uÁ��2���where ½ � �·ª�«�¬ ­ ¹ª �ÂÀÃ� �·ª�«�¬ ­ ª � ª �ÄÁÅ� �·ª�«�¬ � ¹ª ¢If

½dÆ �, thenlet » �:£ÇÀ�È ½

in orderto obtainÀ ¹ £ ½ Á ® �

, which is the desiredinequality.If

½ �É�, the proof becomestrivial.

Statement(iv), known as the triangle inequality, follows directly from the Cauchy-Schwartzinequality: �§� ��±h¤¥�l� ¹ � �·ª�«�¬ � ­ ª ±³� ª � ¹ � �·ªP«�¬�Ê ­ ¹ª ±u¾ ­ ª � ª ±u� ¹ª&Ë�µ�l� �W�l� ¹ ±Ì�l� ¤¥�l� ¹ ±³¾ �·ª�«º¬ ­ ª � ª

® �§� ���l� ¹ ±��k� ¤¥�l� ¹ ±u¾��l� ���k�4�§� ¤¥�l�`�%�r�l� �W�Í�_±%�§� ¤¥�l�Î� ¹ ¢Thus �§� ��±h¤¥�l� ¹ ® ���k� ���l�r±Ì�l� ¤¥�l�Ï� ¹ ¢By taking the squareroot we obtain (iv).

Q.E.D.

With the notion of distance,we can now proceedto define what is meantby a neighborhoodofa point in �x� .

21

Page 30: Image Algebra by Ritter

2.10.3 Definition. Let Ð.Ñ Ò�Ó�Ô and Õ�Ò�Ó8Ö . The set×�Ø_Ù Ð.Ñ_ÚpÛ%Ü_ÐhÒ�Ó#ݼ޲ßPÐ�àáÐ.Ñ`ßQâ¼Õ`ãis called an opensphere of radius r and center Ð Ñ . The set× Ø Ù Ð Ñ ÚiÛÌÜ_гÒ�Ó Ý Þ²ß�Ð�à�Ð Ñ ß¯ä¼Õ`ãis calledthe closedsphereof radiusr andcenter Ð�Ñ . Any openspherewith center Ð.Ñ is calleda neighborhoodof Ð.Ñ andis denotedby

×áÙ Ð.å/Ú . An openspherewith its center Ð.Ñ removediscalled a deletedneighborhood of Ð.Ñ and is denotedby

×�æçÙ Ð.Ñ&Ú .Observethaton the line ÓcÛ¡Ó�è , a neighborhoodof a point Ð Ñ is a symmetricopenintervalcentered

at Ð Ñ , while in the plane Ó�é it is a disc centeredat Ð Ñ with its boundary,which is the setof all pointsx satisfying the equation ßPÐ�àhÐ�Ñ/ß'ÛÉÕ , removed.

With respectto a set êìë%Ó Ý , eachpoint Ð�ÑíÒhÓ Ý hasoneof threerelations,and for eachwe usea familiar word in a preciseway:

1. Ð.Ñ is an interior point of X if thereexistsa neighborhood×áÙ Ð�Ñ_Ú suchthat

×áÙ Ð.Ñ�Ú1ë¼ê ,

2. Ð Ñ is anexterior point of X if thereexistsa neighborhood×áÙ Ð Ñ Ú suchthat

×hÙ Ð Ñ Ú�î�êÄÛ%ï ,and

3. Ð å is a boundarypoint of X if Ð å is neitheran exteriornor interior point of X.

The setof all interior pointsof X is called the interior of X and is denotedby intX. The set of allboundarypointsof X is calledtheboundaryof X andis denotedby ð�ê . Note thata boundarypoint mayor maynot belongto X: If we let êÄÛ ×�ØHÙ Ð.Ñ�Ú and ñKÛ ×�Ø�Ù Ð.Ñ&Ú , then ð�êÄÛÌÜ_ÐhÒ�Ó Ý Þ²ß�ÐMàáÐ.Ñ/ß�Û Õ`ãand, hence, ð�êÄî�ê Ûòï while ð�ñTÛÉð�ê ëKñ .

Beginningstudentsof multidimensionalcalculusoftenconfusethe two distinctnotionsof limit pointand boundarypoint. Limit points of setsin Ó Ý are definedas follows:

2.10.4 Definition. A pointy is a limit pointof X if for everyneighborhood×áÙ�ó Ú of y,

× æ Ù�ó Úºî²êìôÛ%ï .

It follows from the definition that every interior point of X is a limit point of X. Thus, limit pointsneednot be boundarypoints. The next exampleshowsthat the converseis also true.

2.10.5 Example: Let êTÛ�õ�гÒ�Ó é Þ�ö÷âdßPÐWߥä%øCù�ú'Ü Ù öCûYüCÚYã . Theboundaryof X consistsof threeseparatepieces:The circumference,where ýlý Ð�ýlýCÛ�ø , and the two points

Ù ö]ûPö`Ú andÙ ö]ûPü`Ú . The

interior of X is the set of points x with ö�âòýký ÐWýlýiâþø , and the set of all limit points of X isthe set õ&ÐhÒ�Ó�éhÞ�ö�â:ßYÐWßQä%ø/ù�ú�Ü Ù ö]ûPö`ÚYã'Û × è Ù,ÿ Ú . In particular,

Ù ö+ûPü`Ú is a boundarypointwhich is not a limit point. A boundarypoint of X which is not a limit point is also called anisolatedpoint of X. The reasonfor this definition is that for isolatedpointsonecanalwaysfindneighborhoodswhich intersectno other points of X.

A subsetX of Ó Ý is calledan openset in Ó Ý if êÂÛ�������ê andclosedif every limit point of X is apoint of X. Thus,opensetsaretheunionsof neighborhoods,andclosedsetsaresetsthatcontainall their

22

Page 31: Image Algebra by Ritter

limit points. We wish to stressthe differencebetweenhavinga limit point andcontainingone. The set������ ������������������hasa limit point (namely, � � � ) but no point of X is a limit point of X. In

everydayusage,“open” and“closed” areantonyms;this is not truefor the technicalmeaning.ThesetXjust describedis neitheropennor closedin

�. The readershouldalsobecautionedthat anopeninterval!#"%$'&)(

in�+*

is no longer an openset when consideredas a subsetof the plane. In fact, no nonemptysubsetof

�,*canbe openin

�+-, becausesucha setcancontainno two-dimensionalneighborhoods.

It is important to note that we definedthe conceptof “open” for sets in�/.

. This conceptcanbe extendedto “open in X.” Suppose0 �1� �2� . . Then Y is said to be openin X if there existsan open set W in

� .such that 0 �43 56� . Similarly, Y is closedin X if there is a closedset W

in� .

such that 0 �73 5�� . Thus the set! � $ �98:�;�<=�6�2���?>@<=A �)�

is open in the closedsetBDC � $ �E8+�FG<H� C �IAJ<=AK���since

! � $ �L8/� ! � $NMO( 5 BPC � $ �98and! � $QMR(

is openin� *

.

The following list summarizessomeimportantfacts aboutopennessand closedness.

2.10.6 Every neighborhoodS !UT,( is an opensetandeveryclosedneighborhoodS !VT,( is a closedset.

2.10.7 The union of any collection of open setsis openand the intersectionof any finite collectionof opensetsis open. The intersectionof an infinite collection of opensetsneednot be open:��O�W� XYZ9[ * \ C *Z $ *Z^] is closed.

2.10.8 The intersectionof any collectionof closedsetsis closedandthe union of any finite collectionof closedsetsis closed. The union of an infinite numberof closedsetsneednot be closed:!QC � $ � ( � X_Z9[ *a` C *Z C � $ � C *Z�b is openeven though ` *Z C � $ � C *Z�b � S *'c Z ! � ( is closedfor

eachk.

2.10.9 A set is open if and only if its complementis closed.

2.10.10 A point x belongsto theboundaryof X if andonly if everyneighborhoodof x containsa pointthat belongsto X and a point that doesnot belongto X.

2.10.11��dWe%�

is a closedset.

It follows from 2.10.4that the set�f�g�2d6 T � T1hji+kIlDhDmHhon+prq�hDs^n�q�tvu �

, calledthe closure of X,is a closedset. In particular,X is closedif andonly if

��� �. The relationbetween

�andthe closed

set in 2.10.11is given by the equality�w� �xd6e%�

. Also, from the definition of boundary,a point xbelongsto the boundaryof X if andonly if everyneighborhoodof x containsa point that belongsto Xand a point that doesnot belongto X. In fact, this observationforms the usualdefinition of boundarypoints of regionsin digital images. This is in contrastto limit points: Neighborhoodsof limit pointsneednot containpointswhich do not belongto X. Anotherdistinguishingfeatureconcerninglimit pointsand boundarypoints is providedby the next theoremand its corollary.

2.10.12 Theorem. If p is a limit point of X, theneveryneighborhood of X containsinfinitely manypoints of X.

23

Page 32: Image Algebra by Ritter

Proof: Supposethereis a neighborhoody{z#|,} which containsonly a finite numberof pointsof X. Let ~����L�)�G�9�'~/� denotethe pointsof y{z#|,}���� , which aredistinct from p and let

�=�J���U�r�����%�����D� |��W~r� �D��� ~��+�6y��Dz�|,}����������� � � �Theminimumof a finite setof positivenumbersis clearlypositive,so that �H�@  . But thentheneighborhoody:¡)z#|,} containsno point x of X suchthat ~£¢� | . Hence,accordingto Definition2.10.4, p is not a limit point of X. This contradictionestablishesthe theorem.

Q.E.D.

2.10.13 Corollary. A finite subsetof ¤/¥ hasno limit points.

Accordingto thecorollary,finite setsarealwaysclosedsets.In ordinaryusage,thewords“finite” and“bounded”aresometimessynonymous.In mathematicsthey areusedto describequite differentaspectsof a set. A setX is said to be boundedif thereexistsa numberr suchthat �P� ~ �¦�R§ ¨ for every ~W�6� .Geometrically,this saysthatno point of X is fartherthana distancer from theorigin; thatis, ©«ª@y ¡ z#¬�} .For example,everyneighborhoodin ¤ ¥ is boundedandinfinite. Of course,everyfinite set is bounded.

If X is a boundedset of real numbersthen, obviously, there exist numbersr and s such that­ �f®¯� �±° ® �²© . In this case,the numbersr and s are also called an upper bound and lowerboundfor X, respectively.Any setof real numbersthat hasan upperboundis said to be boundedfromabove. Similarly, any set of real numbersthat has a lower bound is said to be boundedfrom below.Obviously,a boundedsetof real numbersis just a set that is boundedfrom aboveand below. One ofthe mostbasicpropertiesthat characterizesthe real numbersis the leastupperboundproperty; namely,any nonemptyset that is boundedfrom abovehasa smallestupperbound,andany nonemptyset that isboundedfrom below hasa greatestlower bound.To bemoreprecise,supposeX is a boundedsetof realnumbers.Then � �W¤ is the leastupperboundof X, denotedby lub or by supX, if andonly if r is anupperboundof X andfor any ³v�6¤ with ³ §g� , t is not anupperboundfor X. Thegreatestlower boundof X, denotedby glb or infX, is the numbers with the propertythat s is a lower boundfor X andif ³v��¤with ­=§ ³ , then t is not a lower bound.For example,the set z � �'´�µ �K� ® �6¤ � � § ®�� ´^� haslub = 2,and glb = 1. Here ´��¶z � �Q´�µ but

� ¢�¶z � �Q´�µ . As our next theoremshows,closedboundedsetshavetheimportantpropertythat they containtheir leastupperboundand greatestlower bound.

2.10.14 Theorem. If ©�ª@¤ is closedandboundedwith lub = r and glb = s, then � �·© and ­ ��© .

Proof: Suppose� ¢�£© . For every ³ �F  �=¸ ® �£© suchthat � �¶³ �®£� � , for otherwise� ��³ would be an upperboundlessthanthe lub of X. Thuseveryneighborhoodof r containsa point x of X with

® ¢�� , since � ¢�W© . It follows that r is a limit point of X which is notin X. But this contradictsthe fact that X is closed.

Q.E.D.

The notion of boundedsetscan be extendedto setsother than subsetsof ¤ ¥ . SupposeX is anarbitrary nonemptysetwith metric d and ¹1ªº© with ¹x¢�¼» . Then we say that A is boundedif and

24

Page 33: Image Algebra by Ritter

only if the set ½�¾À¿#Á�Â'ÃÀÄvÅ+ÁÆÂQÃÈÇ6É:Ê is bounded.If A is boundedthenwe definethe diameterof A by

¾À¿UɱÄ,Ë�Ì)Í^Îr½G¾À¿#ÁÆÂEÃOÄvÅ�ÁÆÂQÃ�Ç6ɱÊvÂand ¾À¿UɱÄ�ËfÏ if A is not bounded.

The greatestlower boundcanbe usedto definethe distancebetweensets. In particular,for Á�Ç�Ðwe define the distancebetweenx and A by

¾À¿#ÁÆÂQɱÄÑË�Ò�ÓrÔ�½�¾À¿#ÁÆÂNÕÀÄvÅ�ÕÈÇ6ɱÊ�Âandthe distancebetweentwo nonemptysubsetsA andB of X by ¾�¿UÉ=ÂQÖ?Ä+Ë×Ò�ÓrÔ�½�¾À¿#Õ%ÂEÖØÄvÅ�Õ?ÇÙɱÊ�Ú

It is of interestto notethat ¾À¿UÉ=ÂEÖ�ÄÜÛËKÝHÞßÉ£à�Ö¼Ë á , but that the converseimplication neednotbe true, evenif both setsareclosedsetsin â . As an example,considerthe sets ÉK˺½�Ó�Å�Ó�Ç6ã�ä�Ê andÖåËfæ�Ó�ç1èé Å�Ó�Ç6ã äëê . Here É×à·Ö;Ë1á , while ¾À¿#É=ÂQÖØÄIËìÝ .2.11 Continuity and Compactnessin â é

Closelyassociatedwith the notion of boundedsetsis the conceptof compactness.Compactnessisusually definedin termsof opencovers. By an opencover of a set X we meana collection ½îí�ï^Ê ofopen setssuch that Ð ðfñ ï í ï .2.11.1 Definition. A subsetX of â é is compactif everyopencovercontainsa finite subcover.

More explicitly, therequirementis that if ½)í ï Ê is anopencoverof X, thenthereexistsfinitely many

indices ò è ÂGó)óGó9ÂLò�ô such that Ð ð ôñõDö è í ï)÷ .It is clearthateveryfinite setis compact.Recallthateveryfinite setis alsoclosedandbounded.The

next theorem,knownastheHeine-BorelTheorem,showsthat this propertyis sharedby all compactsets.

2.11.2 Theorem. (Heine-Borel) ÐßðJâ é is compactif andonly if X is closedandbounded.

We omit the proof of this theoremwhich can be found in [49]. The notion of compactnessis ofgreatimportancein connectionwith continuity. We recall the ø and ù definition of continuity.

2.11.3 Definition. Let Ðßð�â é and ÔWÅ�Ð�úßâ ô . Then f is said to be continuousat a point ûýüHÇ�Ðif, given an arbitrarynumber øÿþJÝ , thenthereexistsa number ùHþ@Ý (usuallydependingon ø )suchthat for every ûWÇ���� ¿Uû��RÄ�à�� we havethat ÔÆ¿Uû,ÄvÇ���¿�Ô�¿�û ü Ä�Ä . The function f is said tobe continuouson X if it is continuousat every point of X.

Anotherway of sayingthat f is continuousat û�� is that given ø�þKÝ , then thereexists ù�þ²Ý suchthat for û4ǼР� û� Wû ü ��� ù=Þ � ÔÆ¿Uû+Ä� WÔÆ¿Uû ü Ä ��� ø/Ú

25

Page 34: Image Algebra by Ritter

This is the usualdefinition of continuity taughtat the beginningcalculuslevel.

Continuousfunctionshavea very useful characterizationin termsof opensets:

2.11.4 Theorem. Suppose������� and ���������� . Thenf is continuouson X if andonly if � �"!$#&%('is openin X for everyopenset Y in � � .Proof: Supposef is continuouson X andY is openin � � . We haveto showthat thereexistsanopensetW in �)� suchthat �*�+!,#-%.'�/1032�� . Let 4�56�7�"!$#8%9' . Then �*#&4:':5;% andsinceY isopen,thereexists <�=?> suchthat @�AB#B�7#84�'C'��D% . Sincef is continuous,thereexistsa numberE =�> suchthat for every F.5;@HGI#&4�'J2K� we havethat �7#8FL'�5@MAB#N�*#&4�'C':�O% . By thedefinitionof � �"! #&%(' , we havethat @�GP#84�'�2��Q�R� �"! #8%.' . This showsthat for every 4D5S� �"! #&%T' , wecan find a neighborhood@U#84�' suchthat @�#-4:'�2��V�W� �"! #&%T' . So let

0 / XY[Z]\[^�_&`ba�c @U#&4:'+dwhereeachneighborhoodsatisfiesthe property @�#-4:'"2e�f��� �"! #&%T' . Then 0f2������ �+! #8%.' .But clearly � �"! #&%T'g�h0i2� . Thus, � �"! #&%T'�/j0i2� .

Conversely,suppose�*�"![#-%T' is openin X for every openset Y in �:� . Fix 4k5;l and <m=n> .Let %j/?@�Ao#N�7#84�'B' . Thenby 2.10.6, Y is open. Hence �*�"!$#&%T' is openin X. Thus,thereexistsan opensetW in � � suchthat � �"! #-%T'p/W0i2T� . SinceW is openin � � , thereexists

E =?>such that @ G #84�':�rq . Therefore,@ G #84�'s29�f�t0V2T��/1� �"! #-%T'"uThis shows that for every FW5j@ G #&4:'�2v�6d�*#&F+'v5h�xw&�*�"!$#&%T'Nyz/�@ A #N�*#&4�'C' . Hence, f iscontinuousat 4z5l and – since x was an arbitrarily chosenelementof X – f is continuouson X.

Q.E.D.

Continuousfunctionshavethe importantpropertyof preservingcompactness:

2.11.5 Theorem. Suppose����� � is compact.If �6���{�3�:� is continuous,then �*#&�z' is compact.

Proof: Let |}%�~�� be an open cover of �*#&�z' . Since f is continuous,Theorem2.11.4showsthat eachof the sets �*�"![#8% ~ ' is open. SinceX is compact,thereexistsfinitely many indices,say � ! d��$�}�Pd���� such that

��� �X��� ! � �"! #&% ~$�-���Since �p�-� �"�$�&� �B��� � for every � �h��� , (i) implies that

�*�&� ��������� � �7�$� �26

Page 35: Image Algebra by Ritter

This completesthe proof.Q.E.D.

A function  6¡[¢�£f¤�¥ is saidto beboundedif thereexistsa realnumberM suchthat ¦§¦  7¨8©�ªP¦�¦�«�¬for all ©�­® . We now deducesomeconsequencesof Theorem2.11.5.

2.11.6 Theorem. Suppose¢ ¯h¤ ° is compact. If  D¡*¢Q£i¤�¥ is continuous,then  *¨&¢zª is closedand bounded. In particular, f is bounded.

This follows from 2.11.5and the Heine-BorelTheorem. The result is particularly importantwhenf is a real valued function.

2.11.7 Theorem. Suppose¢±¯?¤ ° is compact.If  z¡L¢²£³¤ is continuousand¬ ´?µ}¶�·¹¸] *¨&©:ª:¡[©z­®6ºJ» ¼½´?¾-¿¹ 7¸À *¨&©�ª�¡[©k­;®6º�»thenthere existpointsp and q in X suchthat  *¨NÁ:ª�´? and  *¨Nà ª�´WÄ .

Proof: By Theorem2.11.6f(X) is aclosedandboundedsetof realnumbers;hencef(X) containsits lub M and its glb m (Theorem2.10.14).

Q.E.D.

The conclusionof Theorem2.11.7may also be statedas follows: There existpointsp and q in Xsuchthat  *¨Bà ªe«n *¨8©�ªK«h *¨BÁ�ª for all ©�­® . That is, f attainsits maximumand minimum valuesatp and q, respectively.

We concludethis sectionwith anotherimportant fact concerningcontinuousfunctionson compactsets. First we note that if X is a compactsubsetof ¤)° , then since X is boundedthere exists an n-

dimensionalrectangularbox Å{´ °ÆÇ�ȹÉ7ÊÌË Ç »ÎÍ ÇÐÏ suchthat ¢i¯jÅ . Figure 2.11.1 illustratesthis situation

if ¿j´³Ñ .Now given a continuousfunction  6¡�¢�£f¤ we let ÒR¡JÅÓ£3¤ be the extensionof f definedbyÒm¨B©�ª9´hÔ  7¨8©�ª�Õ�Ö�©�­®× ÕØÖ�©�­vÅMÙ}¢

The integral of f over X is then definedasÚÛ  *¨8©�ª"ÜL©R´ Ú

Ý Òm¨N©:ª+Ü+©9ÞBy consideringtheusualRiemannsumsof advancedcalculuswhich approximatethe integral ßÝ Òm¨B©:ª+ÜL© ,

it is easyto seethat ßÛ  *¨&©:ª+ÜL© doesnot dependupon the choiceof the n-dimensionalbox containing

X. Furthermore,sinceX is compactand f is continuouson X, it follows from Theorem2.11.7and thedefinition of F that F is a boundedfunction on B. It now follows from the theory of integration(see[1] or [43]) that ßÝ Òm¨&©�ª"ÜL© existsand,hence,so does ßÛ  *¨8©�ª"ÜL© . The evaluationof the integralof the

multivariablefunction f overX canbeaccomplishedby evaluatingn successivesinglevariableintegrals.This follows from Fubini’s theorem[43], and [50]. We statetheseobservationsasa theorem:

27

Page 36: Image Algebra by Ritter

2

aá 2

aá 1 bà

1

xâ 1

xâ 2

Figure 2.11.1 A compactset in ã�ä containedin a rectangle.

2.11.8 Theorem. If å�æÀç�èfã is continuousand çféDã ê is compact,then ëì å í-î�ï"ðLî exists.

Furthermore, if çfé êñò�ó7ô¹õ÷ö òBøÎùPòÐú and ûhæÀüÓèfã denotesthe extensionof f definedabove,then

ýì å*í8î�ï"ðLîRþ ÿ �ý� �

�� ÿ �����ý� ��������� ÿ �ý� � ûmí&î�ï� �� ô��� �� �� ê����

������ �"!where #%$'& � � !)(�(�(*!��+�+, .

Theorems2.11.7and2.11.8areessentialin thedefinitionof imagealgebraoperationson continuousimages.

2.12 Topological Spaces

In the previous section we discussedsuch notions as continuity, compactness,limit point, andboundarypoint. Thesenotionsareall topologicalconceptsanda careful look at theseconceptsrevealsthat the basicingredientof all them is the idea of an openset. Continuity of functionscan be definedpurely in termsof inverseimagesof opensets(Theorem2.11.4); closedsetsaremerelycomplementsofopensets(2.10.9); the conceptof compactnessrequireslittle morethanthe ideaof opensets.However,opensetsin - � are really just an elementaryexampleof opensetsin more generalspacesknown astopological spaces.

2.12.1 Definition. Let X be a set. A set .0/21�3 is a topologyon X if and only if T satisfies thefollowing axioms:

28

Page 37: Image Algebra by Ritter

4�5X and 6 are elementsof T.4�7The union of any numberof elementsof T is an elementof T.498The intersectionof any finite numberof elementsof T is an elementof T.

A pair (X,T) consistingof a setX anda topology T on X is calleda topologicalspace.

Wheneverit is not necessaryto specify T explicitly, we simply let X denotethe topologicalspace(X,T). Elementsof topologicalspacesare called points. The membersof T are called opensetsof thetopologicalspaceX. Thereis no preconceivedideaof what“open” means,otherthanthatsetscalledopenin any discussionsatisfy the axioms

4 5,4 7

, and4 8

. Exactly what setsqualify as opensetsdependsentirely on the topology T on X — a set openwith respectto one topology on X may be closedwithrespectto anothertopology definedon X.

2.12.2 Definition. Let (X,T) be a topologicalspaceand :<;>= . By a neighborhoodof x, denotedbyN(x), we meanany openset (that is, any memberof T) containingx.

The points of N(x) are neighboringpoints of x, sometimescalled N-closeto x. Thus, a topologyT organizesX into chunksof nearbyor neighboringpoints. In this way, topology providesus with arigorousand generalworking definition of the conceptof nearness:The topology of a spacetells uswhen two points or two objectsin the spaceare closeto eachother.

2.12.3 Examples:

(i) Let X be any setand let ?%@BA�6DCE=GF . This topology, in which no set other than 6 and X isopen,is called the indiscretetopologyon X. Thereareno “small” neighborhoods.

(ii) Let X be any setandlet ?H@JI�K . This topology,in which everysubsetof X is an openset, iscalled the discrete topologyon X, and X togetherwith this topology is calleda discretespace.Comparingthis with example(i) aboveindicatesthe sensein which different topologieson aset X give different organizationsof the points of X.

(iii) Recall from Section2.10 that a set in LNM is an “open” set in LNM if and only if it is the unionof neighborhoods;that is, a set O P�L M is openif and only if for each QG;�R thereis someSUTWV suchthat XZY�[\Q^]_P`R . It is not difficult to verify that the collectionof all setssatisfyingthis definition of “open in LNM ” determinesa topologyT on LNM . Axiom

4�5is trivial. Axiom

4�7is alsoobvious,for if eachmemberof AOGaUb�c<;ed9F is “open in L M ”, thenso is fahg�i OGa , since

Qj;%kagi O aUlnm c<;edporqts�uwvEuyxvzQG;{O aZlnm SUTWV o}|~v)|�XZY)[\Qz]�P�O a P�kahg�i O a |We leaveit to thereaderto convincehimselfthatAxiom

4 8holds. ThetopologyT definedin this

way is calledtheEuclideantopologyon L M , and L M togetherwith T is calledEuclideann-space.

29

Page 38: Image Algebra by Ritter

2.13 Basis for a Topology

The introductionof a basisin an abstractmathematicalsystemallows us to reducethe numberofobjectswe dealwith in orderto describemoreeasilytypical elementsof thesystem.Thereaderis alreadyfamiliar with the utility of basisfrom his studyof linear algebra: In an n-dimensionalvectorspacetheprimitive objectswe deal with are vectorsandany vector can be expressedas the linear sum of a few(at mostn) basisvectors. Similarly, the primitive objectswe deal with in a topologicalspaceareopensets. Sincethe union of opensetsis open,it makessenseto ask if thereare classesof subsetsB of atopologyT suchthat any elementof T canbe expressedasthe union of elementsof B. Suchclassesdo,in fact, exist and they are called basesfor the topology T.

2.13.1 Definition. Let (X,T) be a topologicalspace.A classB of opensubsetsof X, i.e. �`��� , isa basisfor the topology T if and only if

(i) every nonemptyset �`�p� is a union of elementsof B.

Equivalently, �'��� is a basisfor T if and only if

(ii) for any point � belongingto an opensetU, thereexists �`��� suchthat �����`��� .

If B is a basisfor a topology T, then we say that B generatesT.

2.13.2 Examples:

(i) T is a basis for T.

(ii) Let T be the discretetopologyon a setX. Then ���������t�U�z�<�e�j� is a basisfor T.

(iii) The set �9�������Z�����z���z�G�<���t�+�U�<�z �� is a basisfor the Euclideantopologyon �N¡ .

(iv) Define ��¢j�£���Z���¤�z�¥�z�G�<¦ � �y�U�<¦   � . Then ��¢ is a countablebasis for the Euclideantopologyon � ¡ . For if �j�G�J�>� , whereT denotesthe Euclideantopology,then §¥¨U©«ª suchthat � � �����¬�2� . Now if �p­�<¦Z� and ¨�­�®¦Z  , pick ¨�¯z�j¦°  suchthat ¨�¯²± ¢³ ¨ and chooseapoint ´®��¦ � suchthat µ¶µ �<·G´¸µ¶µ ±�¨ ¯ . Then �®�G�Z�º¹»��´����9�Z�}���z���`¼ . Figure2.13 illustratesthis situation. A slight modificationof this argumentwill verify the casewhere ¨��W¦Z  , but�p­��¦°� . Thecasewhere �®��¦°� and ¨½­��¦°  is trivial. Thus �¾¢ is a basisfor T with ��¢"�«�9� .The fact that �¾¢ is countablefollows from 2.7.2(vii).

30

Page 39: Image Algebra by Ritter

xy

U¿

rÀr /Á

Figure 2.13.1 Â2Ã�ÄZÅ�ÆÈÇ�ÉzÊ_ËÌÄZÅ�Ç�Â�ÊzËÎÍ .

(v) Let X be a nonemptysetandd a metric on X. Define the opensphereof radius ÏÐÃGÑ�Ò abouta point ÓÔÃJÕ by Ä Å ÇºÓÖÊ�×HØ�ÙwÃ�ÕÛÚ�Ü+Ç�ÓÞÝ�Ù Ê�ß«Ï�à_áThen âÔ×JØ�ÄãÅ�ÇrÓtÊ�Ú�Ó�Ã<äåÝyæUÃ<ÑzÒ�à is a basisfor a topologyon X. This topologyis calledthemetric topology çÖè inducedby the metric d. The topologicalspace Ç�Õ�Ý�çÞè}Ê is called a metricspace, and it is customaryto usethe simplernotation(X,d) for the spaceÇ�Õ�Ý�çÞè}Ê .

In view of theseexampleswe seethat a given topology may havemany different basesthat willgenerateit. This is analogousto the conceptof a basisfor a vectorspace:Differentbasescangeneratethe samevector space.Any linearly independentset of n vectorsin ÑNé can be usedas a basisfor thevector space Ñ é .

We now ask the following question:Given âÎË�ê�ë , whenwill B be a basisfor sometopologyonX? Clearly, Õ'× ìíNîïãð is necessarysinceX is openin every topology on X. The next exampleshows

that other conditionsare also needed.

2.13.3 Example: Let X={1,2,3}. The setB={{1,2},{2,3}} cannotbe a basisfor any topology on X.For otherwisethesets{1,2} and{2,3} would themselvesbeopenandthereforetheir intersectionØ�ñ�Ý*ê�àÌò<Øê+Ý�ó�àU×JØê�à would alsobe open;but {2} is not the union of elementsof B.

The next theoremgives both necessaryand sufficient conditionsfor a classof setsto be a basisfor sometopology.

2.13.4 Theorem. Let B be a collectionof subsetsof X. ThenB is a basisfor sometopologyon X ifand only if it possessesthe following properties:

(i) Õ × ìíNîïãð .

(ii) If for any ô�Ý ð Ã<â½Ý�ÓeÃjô�ò ð , then õ�ö Ã�â , suchthat Ó<Ã<ö Ë�ôåò ð , or equivalently,ôHò ð is the union of elementsof B.

31

Page 40: Image Algebra by Ritter

Proof: SupposeB is a basisfor a topologyT on X. SinceX is open,X is theunionof elementsof B. HenceX is the union of all elementsof B. This satisfiesproperty(i). Now, if ÷�ø�ù2ú�û ,then, in particular,U andV are opensets. Hencethe intersection ÷Wü<ù is alsoopen;that is,÷«üýùÎú�þ . SinceB is a basisfor T, ÷«üýù ÿ �������� . Thus, if �úp÷«üýù ÿ ������� , thenjú � � ÷�ü<ù for some � úpû . This satisfiesproperty(ii).

Conversely,supposethat B is a collectionof subsetsof X which satisfiesproperties(i) and(ii).Let þ� ºû���ÿ���÷��Ì÷Hÿ������Ì÷������ �"!$#&%'�(�)%*�,+-!/.(!102!3%4�/�5�,+¥û26 , i.e., þ7 rû�� is the collectionofall possiblesubsetsof X which canbe formedfrom unionsof elementsof B. Then,obviously,þ7 rû�� containsboth X and � . Therefore,Axiom 879 holds.

If ��÷;:'6 is a collectionof elementsof þ� ºû�� , theneach ÷<: is the unionof elementsof B; hencethe union

� : ÷<: is also the union of elementsof B. Therefore� : ÷;:eúGþ7 rû�� . This showsthat

Axiom 87= is also satisfied.

Lastly, supposethat ÷�ø*ù�úWþ7 rû�� . We needto show that ÷�ü{ù'ú þ7 ºû�� . By definition ofþ7 rû�� , ÷Hÿ � : ÷ : and ù�ÿ � > ù > , whereeach ÷ : and ù > is an elementof B. By the distributive

law, we have

÷ üýùÔÿ ?A@: ÷ :BDC ?A@ > ù > B ÿ @

:FE > *÷ : üeù > �HGBut by (ii), each ÷ : üDù > is the union of elementsof B. Therefore

�:,E > *÷ : üeù > � is the union of

elementsof B and so belongsto þ7 ºû�� . This verifies Axiom 8JI .Q.E.D.

If X is a set and B a collection of subsetsof X satisfying(i) and (ii) of Theorem2.13.4, then wesaythat þ7 rû�� is the topologyon X generatedby B. If û 9 and û = aretwo basesfor sometopologiesonX, then it is possiblethat þ7 ºû�91�"ÿ�þ7 rû7=3� eventhough û�9LKÿ2û7= . The two basesdefinedin Example2.13.2(iii) and(iv) illustrate this case. If þ7 �û79F�Ìÿ�þ7 rû7=3� , then we say that the two basesû79 and û�=are equivalent. A necessaryand sufficient condition that two basesû�9 and û7= are equivalentis thatboth of the following two conditionshold:

(1) For each ÷�úGû 9 andeach �úp÷ , thereexists ù`úGû = suchthat �úGù � ÷ .

(2) For each ùÎúGû7= andeach MnúGù , thereexists ÷�úGû�9 suchthat Gúj÷ � ù .

2.13.5 Example: Let N'9 , N'= , and N)I denotethe Euclidean,city block, and chessboarddistance,respectively.Then the following threebasesare all equivalent:û7OQP�ÿSR�TUO/PVE WF YXZ�Z�ZXGú\[ = ø$]Uú\[-^`_Ìøû�Oba_ÿSR�TUOca E WF YXZ���ZXGú\[ = ø$]Uú\[ ^ _Ìø-d%feû�Obg_ÿSR�TUOcg E WF YXZ���ZXGú\[ = ø$]Uú\[ ^ _$GThe equivalencefollows from the fact that T O4hjilkmbnFoYp�q7rts�uwv i n olp�qyx�z{2|L}t~b�l��}t� . The fourpossibleinclusionsare illustrated in Figure 2.13.2.

32

Page 41: Image Algebra by Ritter

(a)� (b)� (c)� (d)�r r� r� r�

r/2� r/2� r/2�r/2�

Figure 2.13.2 Equivalenceof threegeometricallydistinct bases.

The specificationof a topology by giving a basisis generallyaccomplishedby specifyingfor each���\� a family of neighborhoods������� ���-�y�L�L� � ���b� , calleda neighborhoodbasisat x, andverifyingthat the family �������*�'� �����-���L���J�\� � � ���c� satisfiesthe conditionsof Theorem2.13.4. If theconditions of the theoremare met, then each member � � � �¡� is called a basic neighborhood of x.For example,the set ¢�¤£��Y¥ �-� ¥ ��¦�§'�$¨U�\¦ª©y« is a neighborhoodbasisfor the Euclideantopologyon ¦-¬ and each open disc �¤£F�Y¥ � is a basic neighborhoodof x. Similarly, if X is any set, then�­�®�¯�°� �¡�-� �°� �¡� ��� �¡�4�Z���L�±� is a neighborhoodbasisfor the discretetopology on X.

2.14 Point Sets in Topological Spaces

In this sectionwe will emphasizetopologicalconceptsin termsof basicneighborhoodsin order toretainasmuchof the geometricflavor of Section2.10aspossible.We beginby giving somedefinitionswhich will havea familiar meaningwhen specializedto ¦;² .

2.14.1 Definition. Let X be a topologicalspace,�±��� , and ³µ´ � . Then

(i) x is an interior point of Y if thereexistsa neighborhood�°� �¡� (i.e. an opensetcontainingx) such that �°� ��� ´¶³ ;

(ii) x is an exterior point of Y if thereexistsa neighborhood�°� �¡� suchthat �°� ���¸· ³S�®¹ ;

(iii) x is a boundarypoint of Y if x is neitheran exteriornor interior point of Y; and

(iv) x is a limit point of Y if for everyneighborhood�°� ��� of x, ��º»� �¡�¡· ³½¼�¾¹ , where ��º¿� ���denotesthe deletedneighborhood�°� �¡�bÀ � �¡� .

Theclosure of Y, denotedby ³ , is definedas ³Á���à�L�Ä�  � ³ �;Å�Æ Â*Ç�È�ÉJÊjÇÌË*Ç(Í�Î Å Ç�Ï'Í Å,Ð ³ � . Thesetof all interior pointsof Y is called the interior of Y and is denotedby intY. The setof all boundarypointsof Y is calledtheboundaryof Y andis denotedby Ñ"³ . In contrastto Euclideanspaces,an interiorpoint of Y neednot be a limit point of Y. For example,if X is a discretespaceand ³Ò�­� �A�wÓÔ� ´ � ,then ��� �¡� �®� ��� is an openneighborhoodof an x in X with �°� ��� ´D³ but ³ · �\ºj� �¡� �D³ · ¹t��¹ .Thus x is an interior point which is not a limit point.

2.14.2 Definition. Let X be a topologicalspaceand ³µ´ � . Then Y is closedin X if and only ifevery limit point of Y is a point of Y.

33

Page 42: Image Algebra by Ritter

Thus a set is closed in a topological spaceif and only if it containsall its limit points. Thisis in agreementwith Euclideanspaces,where Y is closedif and only if Õ�Ö Õ . The next theoremcharacterizesclosedsetsin terms of open sets.

2.14.3 Theorem. Let X bea topologicalspaceand Õ­×ÙØ . ThenY is closedif andonly if ÕUÚHÖÙØÜÛFÕis open.

Proof: SupposeY is closed. Then Y containsall its limit points and so for any ݶÞß Õor, equivalently, Ý ß Õ Ú , thereexistssomeneighborhoodà°áâÝ¡ã suchthat à°áYÝ�ã�äLÕµÖ­å or,equivalently,à°á Ý�ã-×DÕ Ú . Thus,for eachpoint Ý ß Õ Ú we canfind a neighborhoodà°á Ý�ã-×æÕ Ú .But then Õ Ú canbewritten asthe union of suchneighborhoods,that is, Õ Ú Ö çèéê<ë à�áYÝ¡ã . Since

each à°áYÝ¡ã is an open set, Õ Ú is open.

For the converse,supposethat Õ�Ú is open. Now, if Y were not closed,then therewould haveto be at leastone limit point Ý ß Ø of Y with ÝìÞß Õ . Thus, Ý ß ÕUÚ and, since ÕUÚ is open,Õ Ú is a neighborhoodof x. But clearly, Õ®äíálÕ Ú ÛîÝ�ï�ãyÖ�å , which contradictsour assumptionthat x is a limit point of Y.

Q.E.D.

This alsoprovesstatement2.10.9asit is a specialcaseof this theorem.Thenext theoremis obviousand we dispensewith its proof.

2.14.4 Theorem. Let X bea topologicalspaceand Õð×ÙØ . ThenY is openif and only if Y=intY.

Let áYØ\ñbò�ã be a topologicalspaceand Õó×ÙØ . ThenT inducesa topologyon Y, calledthe induced(or relativeor subspace) topologyonY. Its importancelies in this: To determinewhatanyconceptdefinedon X becomeswhen the discussionis restrictedto Y. We simply regardY as a spacewith the inducedtopology and carry over the discussionverbatim.

2.14.5 Definition. Let áVØíñwòJã be a topological spaceand Õô×¶Ø . Then the inducedor relativetopology ò ê on Y is defined as ò ê Öõî�Õ¾ä�ö®÷$ö ß ò7ï . The space áYÕ$ñbò ê ã is called asubspaceof X.

To verify that ò ê is actually a topology on Y is trivial. In fact, it is also straightforwardto showthat if B is a basisfor T, then the set îFÕ�äíö�÷øö ß\ù ï is a basisfor ò ê .

2.14.6 Examples:

(i) Let ÕÁÖ�áÃú7û�ñFûÃüýUî�þ'ï�× ÿ � , where ÿ � hasthe Euclideantopologyand áÃú¤û)ñ3û3üHÖ�îÝ ß ÿ¶÷2ú¤û� Ý��Áûï . The inducedtopology on Y is generatedby all setsof form {2}, all openintervalscontainedin áÃú¤û�ñ�û1ü , andall intervalsof form á��ñ�û1ü with ú¤û���� � û . Theseareexactlythesetsonecanobtainfrom ÕDä2à�áYÝ¡ã , where � ß ÿ�� and Ý ß ÿ � . Note that thepropersubsetá/ú�û)ñ3û3üof the spaceY is both openandclosedin Y while it is neitheropenor closedin the spaceÿ .

34

Page 43: Image Algebra by Ritter

(ii) The subspace �� of ��� is a discretespace:If ������������ �� , then ����! #"$ �����%���'&)(*���+�,����- .Thus, eachsingletonset {( m,n)} is open in � .

(iii) Let .0/1&32*4��!����576%4868&:9<;>=?��� . Then the relative topology on .@/ is generatedby smallopenarcs of form .0/A�! CBD�E4�� as shown in Figure 2.14.1. Again note that if .@/A�F BD�G4@� isnonempty,then . / �� BH�G4�� is open in . / but not in � � .

1

-1 1

-1

xINJ

r ( x )K

xL

yM

Figure 2.14.1 The intersectionof N0O with an opendisk PQSRET�U .

2.15 Continuity and Compactnessin Topological Spaces

Thegeneralizationof thenotionsof compactnessandcontinuityretainthegeometricflavorof Section2.11.

Given a topologicalspaceX and VXWZY , then an opencover of Y is any collection of opensets[ V�\<] with the property V^W`_ \ V�\ .

2.15.1 Definition. If X is a topologicalspaceand VaWbY , then Y is compactif and only if everyopencover of Y containsa finite subcover. A spaceX is a compacttopologicalspaceif andonly if X is compactas a subsetof X.

It follows from this definition that an indiscretespaceandany finite space(i.e. the underlyingsetX is finite) is always compact.

2.15.2 Definition. SupposeX and Y are topological spacesand c:d@Y e V . Then f is said to becontinuousat a point fhg!ijY if given any neighborhoodP#R�c�R�fhgHU,UWkV l a neighborhoodP#REf g UmWnY suchthat for every foijP�REf g U , c�R�fpUmioP#REc�R�f g U,U . The function f is said to becontinuouson X if it is continuousat every point of X.

35

Page 44: Image Algebra by Ritter

The condition qsrEt�uCvxw�rEq�r�thy*u�u for each tovjw�r�tzy*u simply meansthat q�r�w#r�thy*u�um{3w#rEq�r�thy*u�u .Note the similarity betweenthis definition and 2.11.3. Also, as before, continuousfunctions can becharacterizedin terms of open sets:

2.15.3 Theorem. SupposeX andY are topologicalspacesand q}|�~���� . Thenf is continuouson Xif and only if q����Dr%�1u is openin X for everyopensetU in Y.

Proof: Supposeq ��� r%��u is open in X for every open set U in Y. Let tzy be an arbitrarypoint of X and let w�rEq�r�thy*u�u be an arbitrary neighborhoodof q�r�thy*u . Then, since w�r�q�r�tzyDu�uis open in Y, q ��� r�w�rEq�r�thy*u�u�u is open in X. Obviously, tZv)q ����� w#rEq�r�thy*u�u�� . Thus, lettingw#rEt y u���q ��� � w#rEq�r�t y u,uE� , we then have q�r�w#r�t y u�u�{�w#rEq�r�t y u�u . Therefore,f is continuousatt y , and since t y was arbitrary, f is continuousat every point of X.

To prove the converse,assumef is continuousand U is open in Y. We must show thatq����Dr%��u is open in X. Let t�v3q����Dr%��u . Then q�r�tpu+v`� . Thus U is a neighborhoodofq�r�tpu and, since f is continuous,thereexists a neighborhoodw#rEt�u such that q�r�w�r�t�u�u�{`� .But then w#rEt�um{)q��h��rEw�r�t�u,um{Zq��h��r%��u . This showsthat t is an interior point of q��h��r%��u .Since t was arbitrary, this meansthat every point of q ��� r���u is an interior point. Therefore,q����Dr%��u��b�E���z��q����Dr%�1uE� and,hence,by Theorem2.14.4, q����Dr���u is open.

Q.E.D.

Oneof the most importantconceptsencounteredin topology is that of a homeomorphism. Homeo-morphismstell us when two objectsare topologically the same.

2.15.4 Definition. SupposeX and Y are topological spaces. A homeomorphismfrom X to Y is acontinuousone-to-oneandonto function q#|�~X��� suchthat q ��� |��)�X~ is continuous.Ifq�|<~���� is a homeomorphism,thenwe say that X andY arehomeomorphic.

2.15.5 Example: Let X be the interval ~ � r%��� H�Du and let B be the set B =¡ w¢Sr�t�u£|����¤ot}¤?��¥<��¦Cw¢Dr�tpu�{§r��C�¨ ©�Du�ª . Then B is a basis for a topology on X.Define q�|C~ � « by q�r�tpu¬�­��¥<��®H�¯*°�t�± . Then f is continuous,one-to-one,and onto.Furthermore,the inverse function q���� is also continuous. Hence « and the open intervalr%��¨ ©�©u are homeomorphic.

A property P of sets is called a topological property or a topological invariant if wheneveratopological spaceX has property P, then every spacehomeomorphicto X also has property P. Asseenin the previousexample,the real line « is homeomorphicto the openinterval ~��?r%��¨ ©�©u . Hencelengthis not a topologicalpropertysince r%��� H�Du hasfinite lengthwhile « is of infinite length. Similarly,boundednessis not a topological invariant sinceX is boundedbut « is not.

2.16 ConnectedSets

Much of topologyconcernsthe investigationof consequencesof certaintopologicalpropertiessuch

36

Page 45: Image Algebra by Ritter

as compactness,connectedness, and Euler characteristic. In fact, formally, topology is the study oftopologicalinvariants.Severalof theseinvariantsplay an importantrole in imageanalysis.

Intuitively, a spaceor a subsetof spaceis connectedif it doesnot consistof two or moreseparatepieces. This simple idea is somewhatproblematicin the analysisof computerimages. Digital imagesare discreteobjectsfrom a signal processingpoint of view. They are discretespaceswhen viewed assubspacesof Euclideanspace. Thus, any object in a digital image consistsof finitely many disjoint(disconnected)points. Yet the isolationandanalysisof “connected”regionsin digital imagesis a typicalactivity in computervision. The reasonthat oneis ableto talk aboutconnectivityin digital imagesin arigoroussensestemsfrom the fact thatconnectivityis a topologicalconcept.Connectivityof a subsetofa digital imagedependson the topology defined on the imagespace.

2.16.1 Definition. A topologicalspaceX is connectedif it is not the union of two nonemptydisjointopensets.A subset²´³¶µ is connectedif it is connectedasa subspaceof X. A spaceor subsetof a spaceis called disconnectedif and only if it is not connected.

Observethat if Y is a subsetof a topologicalspaceX then Y is disconnectedif thereexistsopensubsetsU andV of X suchthat ·%¸º¹�²¼»s¹!·�½?¹¼²7»�¾:¿ , with ²À³b¸¶Á!½ and ¸o¹7²�¾:¿`¾ý:¹7² .Note also that ²À¾3·�¸j¹¼²7»Ä¹�·�½x¹�²7»�żƭ²`³Z¸ÃÁ>½ . The two sets ¸o¹Ç² and ½:¹7² are calleda decompositionof Y.

2.16.2 Examples:

(i) The set È�ɼ³kÊ@É is disconnected.The sets Ë�·�Ì�Í�Î�»ÐÏCÑÉÓÒ Ì�ÔC¹!È�É and Ë<·EÌ�Í%Îh»ÐÏCÑÉÓÕ Ì0ÔC¹!È�Éform a decompositionof È É .(ii) The rationals Öb³jÊ are not connected since the sets Ë�Ì!×!ʺÏÐÌ Ò

Ø Ù Ô�¹ÚÖ andË ÌÇ×�ʶÏÐÌ Õ

Ø Ù Ô ¹�Ö provide a decomposition.

2.16.3 Definition. Two subsetsA and B of a topological spaceX are said to be separatedifÛ ¹ ÜݾX¿�¾ Û ¹�Ü .

If A andB aretwo nonemptyseparatedsetsin a topologicalspaceX, then ¸§¾oµ�Þ Û and ½k¾jµ¬Þ Üareopenin X. Furthermore,· Û Á>Ü�»Ä¹>½�¾ Û and · Û Á�Ü߻Ĺ�¸b¾bÜ are nonemptysetswhoseunionisÛ ÁFÜ . Thus, we havea decompositionof

Û ÁFÜ . This showsthat if A and B are two nonemptyseparatedsets,then

Û Á1Ü is disconnected.Thebasicrelationshipbetweenconnectednessandseparationis given by the next theorem.

2.16.4 Theorem. A setA is connectedif andonly if it is not theunionof two nonemptyseparatedsets.

Proof: We show, equivalently,that A is disconnectedif and only if A is the union of twononemptyseparatedsets. We alreadyknow that the union of two nonemptyseparatedsetsisdisconnected.In orderto showtheconverse,assumethatA is disconnected.ThenA is theunionof somedecomposition¶¹ Û and ½§¹ Û . We claim that ¸j¹ Û and ½§¹ Û areseparatedsets.Since ¸#¹ Û and ½j¹ Û aredisjoint, we needonly showthat eachsetcontainsno limit point ofthe other. Let p be a limit point of ¸j¹ Û andassumethat à�×F½:¹ Û . ThenV is an openset

37

Page 46: Image Algebra by Ritter

containingp and so V containsa point of áxâ>ã distinct from p; i.e. ä%á¶âÇã�åsâ>æ�çèZé . Butby idempotencyand associativityof set intersectionwe havethe contradiction:

ä�á¶â>ã1å�â>æ è ä�áoâ�ã1å�â!ä�æ?â�ã1å è§éoêThus ë�çì æ:âÇã . Similarly, if p is a limit point of æ:âÇã , then ëºçì áoâÇã . Therefore ájâíãand ækâ�ã are separatedsets.

Q.E.D.

Theorem2.16.4canbe usedto showthat the only connectedsubsetsof î containingmorethanonepoint are î and the intervals(open,closed,or half-open). On the other hand,thereexistsa myriad ofdifferentconnectedsetsin î@ï . For example,considerthe set ð è ã�ñ¼ò shownin Figure2.16.1, where

ã è?ó ä�ôzõ�öhåÐ÷�øù�úoö7ú?ù*ûò è:ó ä�ü�õ%öhåÐ÷Ðö è�ýDþEÿ ä%ù��*ü�å�õ�ô��oü}ú?ù�û ê

Eachpoint of A is a limit point of B; henceA and B are not separatedsets.

A

B1

-1

y�

x�0�

Figure 2.16.1 The connectedset ��� ��� .

A usefulnotion of connectivityin digital imageprocessingis that of weakconnectivity.

2.16.5 Definition. A subsetA of a topologicalspaceis weaklyconnectedif andonly if for eachpairof open setsU and V satisfying

����� ������������ � �"!#� %$&�('��)*'�+%$,�.-it follows that ��$&��'�/) .

38

Page 47: Image Algebra by Ritter

Observethatcondition(1) implies that 0 1�230%46587:9�230%4�;<7 . Thus,in a sense,weaklyconnectedsetsarealmostconnectedsincea set is weakly connectedif and only if it is not the subsetof a unionof two nonemptydisjoint opensetseachintersectingit. This is very much like Theorem2.16.4withthe open setsreplacingthe separatedsets. In fact, in Euclideanspaces,the notions of connectedandweakly connectedare equivalent.

2.16.6 Theorem. Suppose=>@?BA . ThenX is connectedif andonly if X is weaklyconnected.

Proof: SupposeX is connectedand U and V are two opensubsetssatisfyingconditions(1)and(2) of Definition 2.16.5. Now if 5C4D;E1�F , thensince 2G=*4&5H7I4,2G=J4D;<7K>�5�4D; , wehavethat 2G=L465H7I4M2N=�4D;<7O1 F . Thus =*465 and =L4D; is a decompositionof X. But thiscontradictsthe hypothesisthat X is connected.Therefore 5@4�;QP1EF .

Now supposethat X is weakly connected.If X is not connected,then accordingto Theorem2.16.4, X is the union of two separatedsetsA and B. Let

5�1 RTSVU6? A+WOX 2NSOYZ087O[ X 2GS\Y^]<73_a`�bdc ;(1�ReSfUg? A+WOX 2GS\YZ]�7O[ X 2GS\YZ0h7i_kjSupposelCUgm . SinceA andB areseparatedsets,p is not a limit point of B. Thus thereexistsa number nMoqp such that r�s^2"lk7t4,u(1�F . Therefore X 2Gl\Yeu�7Ov.nwo@p and lxUzy . Hence0{>*5 . Similarly, ]>|; and thus neither U nor V are empty. The two setsU and V arealso disjoint because

X 2GS\Yi0}7Zo X 2GSOY~u�7q`�b�c X 2�SOYZmh7O[ X 2NSOY~u�7cannothold simultaneously.Let SCU�y , ��1 X 2NS\Y~u�7Z� X 2NS\Yim}7 , and �fUg�M�3����2GS�7 . Thenby thetriangle inequality

2Z��7 X 2N��Y�m87k[ X 2GS\Yim}7t�f�����wjAlso,

X 2���Y�u�7t�f������o X 2NS\Y�u�7���� X 2���Y�u�7 �%������o X 2NS\Y�m87 �������2"�#7 X 2�SOY�m87��%������o X 2G��Y�u�7dj

But (1) and (2) imply that X 2G��YZmh7�[ X 2N��Yeu�7 . Therefore �fU y and, since y was arbitrary,r �3�"  2�S�7O>*y . It follows that x is an interior point of U and, sincex was arbitrarily chosen,everypoint of U is an interior point of U. Thus,accordingto Theorem2.14.4, U is open. Theproof thatV is openis identical. This showsthat thereexist two disjoint opensetsU andV with

=¡>�5�9�;�Y{`�b�c =*4&5�1+0EP1�F*P1@]E1.=J4D;@jBut this meansthat X is not weakly connectedwhich contradictsour hypothesis. Henceourassumptionthat X is not connectedis false.

Q.E.D.

The first part of the proof actually shows that connectivity implies weak connectivity in anytopological space;no use of special propertiesof ?BA was made. The converse,however,does nothold in generaltopological spaces.

As mentionedearlier,connectednessis a topologicalproperty. In fact, evenmoreis true, namely:

39

Page 48: Image Algebra by Ritter

2.16.7 Theorem. If X is connectedand ¢V£�¤Q¥¡¦ is continuous,then ¢B§N¤C¨ is connected.

Proof: We proceedcontrapositivelyby proving that if ¢©§�¤f¨ is not connected,then Xis not connected. If ¢t§�¤f¨ is not connected,then there exists a decomposition ¢©§G¤C¨%ª§"¢©§G¤C¨I«6¬8¨O­C§"¢©§G¤C¨ «,®�¨ , where U and V are disjoint nonemptyopen setsin Y. But then,sincef is continuous,¢©¯ °±§�¬H¨ and ¢©¯d°±§"®<¨ areopensetsin X. Also, sinceU andV aredisjoint,¢ ¯d° §Z¬H¨ and ¢ ¯d° §3®�¨ are also disjoint. We now have

¤/ª+¢ ¯d° §G¢©§G¤C¨�¨�ª�²�¢ ¯d° §"¢©§G¤C¨3¨t«D¢ ¯d° §�¬H¨G³\­+²�¢ ¯d° §G¢©§G¤C¨3¨t«�¢ ¯d° §"®<¨G³µ´and, therefore,the decomposition

¤Qª·¶¸¤*«�¢ ¯d° §Z¬8¨"¹�­%¶º¤�«,¢ ¯»° §3®�¨G¹\¼Q.E.D.

As an applicationof Theorem2.16.7 we obtain the following generalizationof the intermediatevalue theoremof standardcalculus:

2.16.8 Theorem. Everycontinuousreal valuedfunctionon a connectedspaceX takeson all valuesbetweenany two it assumes.

Proof: Since ¢&£�¤½¥¡¾ is continuous,¢©§G¤C¨O¿.¾ is connectedaccordingto Theorem2.16.7.By our observationfollowing Theorem2.16.4, ¢t§�¤f¨ is either a point, an interval, or equalto¾ . If ¢©§�¤f¨ is a point, then thereis nothingto prove. But if ¢©§"À�¨Kª�Á and ¢t§3Âè�ªzÄ , with sayb greaterthan a, then we have Å�Á�´ZÄiÆw¿(¢t§�¤f¨ . Now if c is any numberwith ÁxÇÉÈÊÇ(Ä thenfor any ËVÌ@¢ ¯»° §3Í�ȱÎ�¨ we have that ¢©§"Ë#¨�ª*È .

Q.E.D.

A componentof topologicalspaceX is a maximalconnectedsubsetof X; that is, if C is a componentof X, then C is connectedand C is not a proper subsetof any connectedsubsetof X. Thus, if X isconnected,thenX hasexactly onecomponent,namelyX itself. On the otherhand,in a discretespace,everypoint is a component.If x is a point in a topologicalspace,thenthe largestconnectedsubsetof Xcontainingx is called the componentof À and is denotedby Ï\Ð . It is intuitively clearandnot difficultto prove that eachpoint À%Ì%¤ belongsto a uniquecomponentÏ�Ð .

Componentsareclosedsets.This follows from the fact that if Y is a setin a topologicalspaceandpis a limit point of Y, thenthe setsY and{ p} arenot separatedsets.In particular,if Y is connected,thenso is ¦ . Thus,if C is a component,then Ï�ª Ï sinceC is a maximalconnectedsubset.It alsofollowsthat if A and B are two distinct components,then ÑÒ«�ÓLª(Ô . If this werenot the case,thenA andBarenot separatedsetsand,thus, ÑÒ«DÓ is a connectedsetcontainingA (andB). But this contradictsthemaximality of A. We summarizethesecommentsas a theorem:

2.16.9 Theorem. Everyconnectedsubsetof a topologicalspaceX is containedin somecomponentofX and the componentsform a partition of X.

40

Page 49: Image Algebra by Ritter

According to this theorem,a topologicalspacecanbe decomposeduniquely into connectedpieces,namelyits components,andthenumberof componentsprovidesa roughindicationof how disconnecteda spaceis. A spaceX is called totally disconnectedif the only componentsare points; i.e. ifÕ�Ö%×QØ�Ù�ÚgÛIÙ(ÜzÝ

. Obviously, Þdß�à{áâß is totally disconnectedwhen viewed as a subspace,andso is any discretespace.On the otherhand,the subspaceãäà+á of rationalnumbersis a spacethat isnot discretebut is totally disconnected.

2.17 Path-ConnectedSets

For mostpurposesof analysis,the naturalnotion of connectednessis that two pointscanbe joinedby a path.

2.17.1 Definition. Let X be a topologicalspaceand å æDç�è»éeêeëwì Ýcontinuous. Then the imageí × å©îZç�è»éTê�ëNï is calleda path in X. The points å©î3è�ï and å©îZê�ï arecalledthe initial and terminal

points of the path Y, respectively,and Y is a path from å©î3è�ï to å©î�ê�ï . The initial and terminalpoints are also called the endpoints of the path. A point ð Ü í

is a multiple point if the setå©ñ òóî"ð»ï containsmore thanone point. The imageY is an arc (or simplecurveor simplepath)if it containsno multiple points.

It follows from the definition that if Y is an arc, then åVæôç�èÃéTê�ë©ì íis a homeomorphism.Also, if

Y is a path from åtî3è�ï to å©î�ê�ï , then it is clear that the function

õ æOö�ì¡å©îZêw÷Cö�ï�éOö Ü ç�è»éTê�ë�édefinesa path from å©îZê�ï to å©î"è#ï .2.17.2 Definition. A topologicalspaceis path-connectedif for eachpair of points p and q in the

spacethereexistsa path from p to q. A subsetof a spaceis path-connectedif and only if itis path-connectedas a subspace.

2.17.3 Examples:

(i) áBß is path-connectedand if ø*ù�ê , then for every countablesetÝ àQáBß , áBßdú Ý is also

path-connected.

(ii) Ifí à(á ß is an arc and øÒùÉê , then á ß ú í is path-connected.

(iii) A discretespacehaving more than one point is neverpath-connected.Every indiscretespaceis path-connected.

A trivial but useful reformulationof 2.17.2 is providedby the next theorem.

2.17.4 Theorem. Let X be a topologicalspaceand û ÜfÝ. ThenX is path-connectedif and only if

for everyÙÒÜÒÝ

, there is a path from p to x.

41

Page 50: Image Algebra by Ritter

Proof: If X is path-connected,thentheconditionholdsautomatically.Conversely,assumethatthe condition is satisfiedand that ü©ýZþ,ÿ�� . Let �������Ãý� ��� definea path from x to p and� �����»ý������� a path from p to y. Let �������»ý������� be defined by

��������� � � �"!���� #��$�&%'�(%*)+� ��!��-,./�0#1�2)+(%.�(%3 4Thenh is continuoussinceh is the continuousfunction f on the interval 56�Ãý )+87 , the continuousfunction g on the interval 59)+:ý/�7 , and at �&�:)+ , �;�"���<�=� �>?�<� � �9�@� . Thus, �A�����»ýB��C� is a pathfrom x to y.

Q.E.D.

The next theoremestablishesthe generalrelationof connectednessandpath-connectedness.

2.17.5 Theorem. Eachpath-connectedspaceX is connected.

Proof: If X is not connected,thenX is the unionof two nonemptydisjoint opensetsU andV.Now let DgÿFE and GÊÿIH , andlet J*�3� �>���Ãý���C� bea pathfrom u to v. Then �>E'K&JL�NMO�"HPKQJR�is a decompositionof Y. But this contradictsTheorem2.16.7accordingto which JS�T� �����Ãý���U�is connected.

Q.E.D.

2.17.6 Example: A connectedspaceneed not be path-connected. Consider the example � �V M�W , whereV �YX8�"�ÃýZþZ�[�<,\]%ÒþQ%P8^ and W_�YX8�"ü©ýZþ`�a�\þ&�cb�#�d ��8e�ü;�Zý>�(f.üg%38^ (Figure

2.16.1). ThespaceX is connectedbutnotpathconnected:thereis nopathfrom �9�Ãý>��� to �>8e�h�ýi�Z� .However, it is obvious that eachof the setsA and B are path-connected.Also, as mentionedearlier, jWS�3� . Hencethe closureof a path-connectedsetneednot be path-connected.

In view of Theorem2.17.4, the union of any family of path-connectedspaceshaving a point incommonis againpath-connected.Becauseof the propertyof unions,we can definea path componentof a spaceas a maximal path-connectedsubsetof the space.As before,the pathcomponentspartitionthe space;indeed,from 2.17.5, the pathcomponentspartition the components.However,in contrasttocomponents,path componentsneednot be closedsubsetsof the space:in Example2.17.6, B is a pathcomponentof W .

2.17.7 Theorem. Thefollowing propertiesof a spaceX are equivalent:��8� k�l@m�\nilpo9�qm>r�s(nir8dut/dvo�#�bOr�nit/dI�"l@d�w�o9�vt��8t/�ur8�8t]lyxzb/r-mxCr8b�t/w`� 4�9!@� k(l@m��nir8#1dvo r8�{�|�vl@b-lOnil�o"�},(mBr8dAdAt�m~o"t/w�dAt/# � �v�Br8�8�ir8r8w 4Proof: If eachpathcomponentis open,thengiven üVÿF� , the pathcomponentcontainingxis a path-connectedneighborhoodof x. Thus, ��8��� �9!@� .To show that ��!Z��� ��8� , let P be any path componentand ü@ÿ3� . By hypothesis,x has apath-connectedneighborhoodU. However,P is a maximalpath-connectedsetcontainingx and,

42

Page 51: Image Algebra by Ritter

therefore, �S�3� . Thuseverypoint of p is an interior point and thereforeU is open(2.14.4).Noting that �O�A�'�F�N� is the union of the remaining(open)pathcomponents,we havethat �O�is also open. Hence,by 2.14.3, P is closed.

Q.E.D.

This theorem provides a tool for determining when path-connectednessand connectednessareequivalent.

2.17.8 Theorem. A spaceX is path-connectedif and only if it is connectedand each ����� hasapath-connectedneighborhood.

Proof: Sincepath-connectednessimpliesconnectednessandX is apath-connectedneighborhoodof everypoint, only the converserequiresproof. For this, we know from 2.17.7that eachpathcomponentis both open and closed in X; since X is connected,this path componentmustthereforebe X.

Q.E.D.

This theoremhasthe following importantconsequence:

2.17.9 Corollary. An openset in � � is connectedif and only if it is path-connected.

Proof: Again, since path-connectednessimplies connectedness,we only needto prove theconverse. If ���:� � is open, then eachpoint x of the space �������u�}� has a neighborhood�(� �9�A���:� . But

��� �"�;� is path-connected.Henceit follows from Theorem2.17.8 that U ispath-connected.

Q.E.D.

Of course,asExample2.17.6shows,non-openconnectedsubsetsof � � neednot bepath-connected.

Simple pathshave a particularuseful and unique property that can be expressedin terms of cutpoints. A point x of a topologicalspaceX is a cut point of X providedthat ���8�N�A�(���'�q� , whereAand B are nonemptyseparatedsets;otherwisex is a non-cutpoint of X.

2.17.10 Examples:

(i) Every point  (�F¡�¢`�~£B¤ with ¢&¥. \¥Y£ is a cut point of [0,1], and0 and1 arethe only non-cutpoints of [0,1].

(ii) Every point of � � , where ¦.§$£ , is a non-cutpoint of � � .

In view of Example2.17.10(i) and the fact that arcsarehomeomorphicimagesof the unit interval,the next theorembecomesintuitively obvious. However, its proof, which is given in [26], is far fromtrivial and is beyondthe scopeof this book.

43

Page 52: Image Algebra by Ritter

2.17.11 Theorem. If ¨ª©c« ¬ is compactandconnectedwith just two non-cutpoints,thenX is anarc.

A path ­S®°¯ ±�²�³y´µB¶z· in a spaceX is a closedpath if ¯ ±"³Z·¸®3¯ ±>µ8· . A simpleclosedpath, alsocalleda simpleclosedcurveor Jordancurve, is a closedpathwith exactlyonemultiple point ¹Qºg¯�±�²�³y´�µ�¶z· suchthat ¯�»i¼/±9¹y·�®P½N³y´�µ/¾ . An equivalentandmorecommonway of defining a simpleclosedcurve is asthehomeomorphicimageof the unit circle ¿¸¼À®*Á@±" ´>¹@·�Ã�ÂAÄaÅƹ@ÄÀ®=µ@Ç . It is clearthat the omissionof anytwo distinctpointsfrom ¿�¼ separates¿�¼ into two openarcs(objectshomeomorphicto the interval (0,1)).It turns out that this propertycharacterizessimple closedcurvesin «¸¬ .

2.17.12 Theorem. If ¨È©c« ¬ is compactandconnectedandhasthepropertythat for any two pointsÉ ´9Ê�ºIË , ¨�Ìp½ É ´ÍÊa¾ is not connected,thenX is a simpleclosedcurve.

As in thecaseof Theorem2.17.11, thestatementof this theorem(aswell asthatof thenext theorem)is intuitively obvious,but its proof is nontrivial [26].

2.17.13 The Jordan Curve Theorem. If ¨ ©Î« Ä is a simpleclosedcurve, then « Ä ÌNË has twocomponents.

Therearevariouswaysof provingtheJordancurvetheorem;a geometricproof is givenin [41] while[55] providesanalgebraicversion.Accordingto this theorem,everysimpleclosedcurvein theplane «�Äseparates« Ä into two components,eachof which mustbenecessarilypath-connected(2.17.9). In thenextsectionwe showthat Theorems2.17.11, 2.17.12, and2.17.13all haveanaloguesin the discretedomain.

2.18 Digital Images

We now take a closer look at the set Ï ¬ . For ÐP®Ñµ�´ZÒ , and 3, this set plays an important rolein discretesignal and image processing. Viewed as a subspaceof « ¬ , ÏA¬ is a discretespace. Thecomponentsarepoints;thusthereareno interestingconnectedsubsetsof ÏA¬ andno point is a limit pointof any given subsetof Ï;¬ . However,as mentionedpreviously,the isolation and analysisof connectedregionsin Ï;¬ is a commonactivity in imageanalysis.Obviously,whentalking aboutconnectedregions,theremustbe topologieson the set Ï ¬ which providefor the connectivityof setsthat containmorethanonepoint. Beforediscussingdifferenttopologieson Ï ¬ , we provideanalternategeometricrepresentationof Ï ¬ and discussthe role of Ï ¬ in imagerepresentation.

With eachÓÔ®�±ÖÕ ¼ ´1Õ Ä ´~×/×�×�´�Õ ¬ ·�º0Ï;¬ we associateann-dimensionalcell, Ø/±9Óa· , with centerp definedby

ØN±�Óa·a®*Ù É Ã É ®3±" ¼ ´�×�×/×i´> ¬ ·�º�« ¬ ´OÚ ÕyÛAÜÝÂ`Û�ÚZÞ µÒ_ß8àAá µ�Þ°âaÞ.ÐäãQåThe setof all n-dimensionalcells is denotedby æ ¬ ; that is, æ ¬ ®*½�Ø/±9Óa·RÃ�Ó�ºIÏ ¬ ¾ . Set theoretically,the sets ÏA¬ and æ�¬ are the same: The function Ø&Ã�Ï;¬0çèæ�¬ definedby ØLÃ]Óéç2Ø/±�Óa· is one-to-oneand onto. Figure 2.18.1 illustratesthis relationshipfor ÐP®êÒ . The set æ�¬ is also referredto as thedual representationof ÏA¬ .

44

Page 53: Image Algebra by Ritter

pë pëcì ( )í

Figure 2.18.1 The set î�ï and its dual ð\ï .Onereasonfor usingtherepresentationð�ñ of î;ñ hasto do with samplingof continuousimagesand

the displayof sampledimages.In order to processa picture (continuousimage)or any othersignalbycomputer,we mustconvertit into a finite setof numbers.Samplingis the selectionof a setof discretepoints from a compacttime and/or spatialdomain. Only the valuesof the signal at thosepoints willusuallybe usedin further processing.In the one-dimensionalcasethe fundamentalmathematicalresultis Shannon’ssamplingtheorem[42]. It showsthat any continuoussignalover any durationT but band-limited in frequencyto ò cyclespersecondcanbecompletelyspecified(i.e. reconstructed)if we sampleits amplitudeat intervalslessthan ó8ô8õ/ò seconds.It follows thatall we needto do is to samplethesignalat k greaterthan õ/ò�ö equidistantpointsduring the durationT in order to encompassthe total signal.

Shannon’stheoremdoesnot suggesta way for reconstructingthe continuoussignalfrom its discretesamples;it only saysthat it is possible. In fact, it is necessaryto usefairly sophisticatedtechniquestoreconstructa signalwhenit is sampledat the minimum frequency.In addition,the choiceof algorithmsfor reconstructionis usuallyseverelylimited in imageprocessing.Pictorialdatamustusuallybesampledat a muchhigher rate,about160 times as often, thanwhat one might expectfrom the trivial extensionof Shannon’stheoremto two dimensions.To illustratethe problem,considerthe high resolutionimage(512÷ 512) shownin Figure 2.18.2(a), which to the humaneye is indistinguishablefrom a continuousimage such as a photograph. The two imagesin Figures2.18.2(b) and 2.18.2(c) have beenobtainedfrom the former by skipping samples,so that Figure 2.18.2(b) consistsof 64 ÷ 64 samplesand Figure2.18.2(c) of 32 ÷ 32. They aredisplayedon a larger grid by repeatingthe valuesof eachsample8 and16 times. The quality of their appearanceis not due to undersamplingalone. Their quality improveswhen squintingone’s eyesor looking at them from a distance;this is due to the fact that most of theinformationis still there. It is our methodof piecewiseconstantreconstruction,i.e. thesimplereplicationof values,that introducesthe distortions.Evena simple linear interpolationbetweensamples,insteadofreplication,would havegreatly improvedthe quality of the images.

45

Page 54: Image Algebra by Ritter

Figure 2.18.2 Effects of reducingsamplinggrid size.

In the caseof two-dimensionalimages,suchasshownin Figure2.18.2, the imageis usuallyviewedas being derivedfrom a continuousimagefunction øcù�ú�ûRüýú�þÔÿ������ by taking a finite numberofsamples.The value ø���� representsthe intensity, photographicdensity,or somedesiredparameterofthe physicalimageat the point ���Iú� . In a perfectimagesamplingsystem,spatialsamplesof the idealimagef would, in effect, be obtainedby multiplying f by a spatialsamplingfunction s composedof aninfinite array of Dirac delta functionsarrangedin a grid of spacing ������������������� û . The sampledimage ø�� is then given by ø������ !� ø"����$#�%&��� ; that is

ø��'��� (�°ø"�)��*#,+-/.1032�4 ���65879#�:<;�=�>@?A/B1C3DFE"G�H9I1J ;�= I�KLG ;NM HOI/J ;�=QP (2.18.1)

In this equation,vector subtractionand multiplication are definedcomponentwise;e.g. if ;R> G�SUT�VWSUX =and H > G�Y T V�Y X = , then

;�M H > G�SUT M Y1T�V�SZX M Y1X =*[�\^] H9I ;_> G�Y�T`I�SZT�V�Y�X�I�SZX =QPA continuousimagefunction may be obtainedfrom the sampledimage E�a by linear interpolationor

by linearspatialfiltering. If r representsthe impulseresponseof an interpolatingfilter, thena continuousimagefunction E�b is obtainedby convolving E�a with r; i.e. E1b > E�a c d where c denotesthe convolutionproduct. However,substitutingE�a from equation2.18.1andperformingthe convolutionyields

E b G ; =(>@?A/B&C'DFE a GHeI�J ;�= I�dLG ;6M H9I1J ;�=^P (2.18.2)

This showsthat the impulseresponsefunction r actsas a two-dimensionalinterpolationwaveformforthe sampledimage E a .

Of course,Equation2.18.1representsan idealizeddescriptionof E a . It is physically impossibletoobtainmeasurementsat a point. Theevaluationof E a at a point x representsthe measuredintensityovera small convexareacenteredat x. Thedimensionof the samplingareasareapproximatelyequalto theirspacing(Figure2.18.3). Anotherphysicalrestrictionis that f canonly be sampledat a finite numberofplaces.Thus,the union of all convexsamplingareasforms a compactsubsetfhgji X . Thesecommentscan be formally expressedand are the rationalefor the next definition.

46

Page 55: Image Algebra by Ritter

2.18.1 Definition. Supposekmlen�oqp n is continuous. A samplingcell associatedwith a pointrts n�u is a compactand convexsubsetof n o with barycenterp over which the value of asample k�vWw r�x of f is calculated. The union of all the centersof the samplingcells is calledthe samplinggrid. Thepair w r�y k v w r xzx is calleda picture elementor pixel and k v w r x is calledthe pixel value.

Figure2.18.3illustratesthe ideabehindthis definition. In general,the spatiallysampledor spatiallyquantizedimageconsistsof an {O|e} arrayof equallydistributedsamplesandcanthereforebeviewedaspointsin the discreteplane ~,o arrangedin rectangularform. We alsoneedto point out that the samplingcells can be disjoint, althoughin most samplingdevicesthey overlapas illustrated.

Figure 2.18.3 Samplinggrid with samplingcells; the differentshadingsrepresentdifferent valuesof the imagefunction f.

The mostcommongrid usedin imageprocessingis the rectangulargrid. Hexagonalandtriangulargrids (Figure 2.18.4) areoften discussedin the literaturebut are rarely implemented.

47

Page 56: Image Algebra by Ritter

(a) Hexagonal grid (b) Triangular grid

Figure 2.18.4 (a) The hexagonalgrid and (b) the triangulargrid.

Althoughthespatialsamples���W����� canberepresentedaspoints,it is oftenintuitively moresatisfyingandcloserto the sensingprocessto usethe dual representationof �,� andview the samplesascells. Inaddition, this view correspondsto the actualdisplay of sensedimageson a variety of display devices.Televisionframes,for example,might be quantizedinto 450 lines of 560 cells each.

2.18.2 Definition. Theset �������'� ���3�1��� ���$���_����������"�z���W��� is calledthedisplaygrid of f andthefunction �3�����������'����� definedby ����� �1��� �¢¡��£���'��� � is called the display image. The pair�¤�3������¥����1���1��� �z�)¡ is called a displaypixel or simply a pixel.

In caseonedesiresa larger displayor a moredensesetof displaycells thanprovidedfor by ����� � � ,we coulddefinethe displayfunction in termsof an interpolatingfunction ��¦ by setting � � �¤�3�����)¡^�§�1¦1��� � .

In order for the sampledimageto be processedby a digital computer,the function f must also besampledin amplitude;i.e., eachrealnumber�"��� � mustbeassigneda binarycode.This processis calledamplitudequantizationandcanbeconsideredasa mappingfrom therealnumbersinto eithertheintegersor into � ��¨ aseachbinary codeis of finite length. The correspondingintegersarecalled the gray levelsor gray valuesof the image. It is commonpracticein imageprocessingto havethe discretegray levelsequally spacedbetween0 and somemaximumnumberL of form ©ª�¬«�­¯®m° . Thesecommentsformthe basisof the following definition:

2.18.3 Definition: A digital image is a spatially-quantizedandamplitude-quantizedimageand thefull rangeof amplitudequantizationlevels availablefor a particular image is called a grayscale. Theprocessof obtaininga digital imagefrom a continuousimageis calleddigitization.

48

Page 57: Image Algebra by Ritter

Digital imagesconstitutea specialclassof computerimages,a topic discussedin Chapter4. Hereweareonly interestedin exploringsomeuseful topologieson digital images.The first problemto consideris that of connectedness.Considerthe digitization of the continuouscurvesshownin Figure 2.18.5(a)and (b) using the gray scale{0,1}.

(a) (b)±

Figure 2.18.5 Continuouscurveswith samplinggrid; thedotsindicatethecentersof thesamplingcells.

Thecontinuouscurvein 2.18.5(a) is connected,while theobjectin 2.18.5(b) consistsof two separatecontinuouscurvesthat are spatially closeto eachother. Due to the limitations of the spatialsamplinggrid, the resulting digital imagesobtainedfrom (a) and (b) are identical (Figure 2.18.6). The digitalrepresentationin Figure2.18.6of eithersetof curvesassubsetsof ²"³ appearstotally disconnectedwhilethedualrepresentationappearsconnectedandseemsa goodrepresentativeof either2.18.5(a)of 2.18.5(b).Thus,the questionarisesasto which curve2.18.6(b) represents;i.e. doesit representa continuousfigureeight curve or two separatesimple closedcurvesthat are spatially close? The answerto this questiondepends,of course,on thechoiceof the topology. Keepingthe subspacetopologyfor ² ³<´jµ ³ is uselessin theanalysisof connectivitysincethe digitizedcurvesarethentotally disconnected.However,we maychoosetopologiesthat providefor the desiredconnectivityof the curveshownin 2.18.6(b). In the nextsectionswe shall take a closer look at thesetopologies.

49

Page 58: Image Algebra by Ritter

(a)±

(b)

Figure 2.18.6 Illustration of the dual representationof digitized curves.

2.19 Digital Topology

Any topology on ¶¸· or ¹!· is called a digital topology. Topologieson ¹!· are also referredto ascellular topologies. Theset ¶ · or ¹ · togetherwith a topologyis calleda digital spaceor cellular space.Topologiesother than the discretetopology can be definedin termsof the coordinatesof points of ¶ · .Oneof themostpopulardigital topologiesusestheconceptof evenandoddpoints. In particular,a pointºt»�¼¾½U¿�À�½ÂÁ�À/Ã�Ã1Ã�À)½ ·ÂÄ`Å ¶ · is calledevenif andonly if

·ÆÇÉÈ ¿ ½ Ç is even. If p is not even,thenp is said to

be odd. Let Ê »£Ë�ÌÎÍ�ÀzÏÂÀ�Í1Ð , º�»£¼É½ ¿ À�½ Á À�Ã�Ã1ÃzÀ�½ · Ä�Å ¶Ñ· , anddefinea basicneighborhoodÒ ¼�º Ä of p by

Ò ¼�º Ä »¬Ó Ë3º ÐjÔÖÕ�ºqÔØ× ÙÛÚÂÚË�¼¾½ ¿ À�Ã�Ã1ÃzÀ�½ ÇÂÜ�Ý À�Ã1Ã�ÃzÀ)½ · ÄßÞ Í¯àmá�àjâ�À Ý Å Ê ÐRÔÉÕ$º�Ô×�ã/ä�ã/å,æIt is easyto verify that the collection ç »£Ë Ò ¼�º ÄUÞ º Å ¶,è Ð satisfiesthe conditionsof Theorem2.13.4.ThereforeB is a basisfor a topology on ¶ · and the topology thus derived is called the von Neumanntopology. This topology was first describedby A. Rosenfeldfor the case âé»ëê [48]. Rosenfeld’spioneeringwork in digital topologyhasprovideda variety of useful tools anda rigorousfoundationformany image processingoperations[29].

Defining basic neighborhoodsÒ ¼�ì3¼�º ÄzÄ for points ì3¼�º Ä�Å ¹ · by Ò ¼�ì1¼�º ÄíÄ »îì1¼ Ò ¼�º ÄzÄ providesfor an equivalent topology on ¹ · . In particular, Ò ¼�ì1¼�º ÄzÄ »ïË3ì1¼�º Ä Ð if p is odd and Ò ¼�ì1¼�º ÄzÄ »Ë3ì3¼É½ ¿ À�Ã�Ã�ÃíÀ�½ Çñð ¿ À�½ Ç Ü�Ý À�½ ÇÖò ¿ À1Ã�Ã1ÃzÀ�½ · Ä�Þ Í9àjá�àjâ�À Ý Å Ê Ð if p is even. If n=2 or 3, then the possibleneighborhoodsÒ ¼�ì3¼�º ÄíÄ of p areshownin Figure 2.19.1(a) and (b), respectively.

As an easyconsequenceof the neighborhooddefinition we have

2.19.1 Theorem. Thebasicneighborhoodsfor the vonNeumanntopologyare path-connected.

50

Page 59: Image Algebra by Ritter

c( )p odd c( )p oddó cì ( )ípô evenõc( )p even

Figure 2.19.1 The von Neumannbasis(a) if öø÷¬ù , and (b) if öú÷éû .Proof: The proof is trivial if p is odd, for then ü8ý�þ ÿ is a point. If p is even,let q and rbe two distinct points in ü8ý�þ ÿ . Thenat leastoneof q or r must be odd, sayq. Now eitherr is evenor odd. If r is even,then ��÷£þ . In this case,we definea path

��������� ��� ü�ý�þ ÿwith initial point q and end point r by� ý��Ñÿ�÷������ ��� ���

ù���� � ý!�¸ÿ$÷�þ"�#� ù � � �$�%Since &'�)(�÷ ü8ý!��ÿ+* ü�ý�þ ÿ , we have

��,.- ý�ü�ý/�(ÿzÿ9÷ �0�� -1 ÿ and�2,.- ý�ü8ý�þ ÿíÿ!÷ �3�4�� �

. Thisshowsthat the inverseimagesof opensetsareopenin [0,1]. Hencef is continuous.

If the point r is odd, then we define�5�)�3�4�� �6� ü8ý�þ ÿ by� ý��Ñÿ$÷����#� �7� �8�

ù ���:9 ù<; ÷ þ � ��� � ý��Ñÿ$÷��=��� ù �5� �>?%

In this casewe have� ,.- ý�ü�ý/�(ÿzÿß÷ �3�4� -1 ÿ , � ,.- ý�ü8ý�þ ÿzÿß÷ �3�4�� �

, and� ,.- ý�ü8ý/�Lÿzÿß÷ ý -1 �@A� .

Thus,again,inverseimagesof opensetsareopenand, therefore,f is continuous.

Q.E.D.

2.20 Path-ConnectedSetsin Digital Spaces

Therearemanymetricsthat canbe definedon B<C . Two commonlyusedmetricsare the city block

metric D - ý�þ � �"ÿ�÷ CEF�G -2H I FKJ�L F H andthechessboardmetric D 1 ý�þ � �"ÿ�÷>MONP�<& H I FQJRL F H �S?�5T�� öU( , whereþ8÷�ý I - �WV@V�V � I C ÿ and ��÷£ý L - ��V�V�V � L C ÿ . Givena point þ�X�B�Y , thenits vonNeumannneighborhood ZÎý�þ ÿis the set ZÎýzþ ÿ(÷[&'� � D - ý�þ � �"ÿ �> ( . In the caseö�÷mù , ZÎýzþ�ÿ is alsoknownasthe4–neighborhoodofp sinceit consistsof thepoint p andits directly adjacenthorizontalandvertical neighbors.Furthermore,if p is even, then ZÎý�þ�ÿq÷ ü8ý�þ ÿ .

The Moore neighborhoodof p is denotedby \�ý�þ ÿ anddefinedas \�ý�þ ÿ(÷$&�� � D 1 ý�þ � �"ÿ �[ ( . Forn=2, \�ý�þ ÿ is also known as the 8–neighborhood of p.

2.20.1 Definition. A sequenceof points &3þ - � þ 1 ��V�V�V]� þ_^`(7*�B C is calleda D - -path if þ F�a - XbZÎýzþ2cÿfor

S�$Td�fe J , and a D 1 -path if þ F�a - X�\�ý�þ2c�ÿ forg�>Th�fe J .

A set ij*kB<C is saidto be D - -connected( D 1 -connected) if for eachpair of points þ � �lXlm thereexistsa D - -path( D 1 -path) þ_÷�þ - � þ 1 ��V@V�Vn� þ ^ ÷o� from p to q suchthat þ F Xli for

?�5T��5e.

51

Page 60: Image Algebra by Ritter

We call a prq -path ( shtvu or w ) a digital path if it is clear from the discussionwhich type of pathis meant. Unlessotherwisespecified,in the von Neumannspacea digital path shall always meanapPx -path and a digital path-connectedset a pPx -connectedset. Also, in the casen=2, pPx -pathsand pPx -connectivityare usually referredto as 4–pathsand 4–connectivity, while pzy -pathsand pPy -connectivityare called 8–pathsand 8–connectivity.

It follows from the definition that every p x -path is a p y -pathandevery p x -connectedset is also p y -connected.Theconverseis obviouslyfalse;for n=2, theset {�t>|r}/~2���4����}�~7�kur���h�ku��n� is p y -connectedbut not p x -connected.The relationshipbetweenconnectivity, p x -connectivity,and path-connectivityisgiven by

2.20.2 Theorem. Let �<� be the digital spacewith the von Neumanntopologyand {f���<� . Thenthe following are equivalent:

(1) S is connected.

(2) S is digital path-connected.

(3) S is path-connected.

Proof: The equivalenceof connectedand path-connectedfollows from theorems2.17.5,2.17.8, and 2.19.1.

To show the equivalenceof connectivityand digital path-connectivity,assumefirst that S isconnected. Let ����{ and set �:�ot�|��R�l{����n����]�����6��pPx��R�.���n�7� �n¡�¢"���]¡£�g��¤O{¥� . If� � t¦{ , there is nothing to prove. If � �¨§t�{ , let © � t¦{�ª'� � . Then � ��« © � t"{ and� �S¬ © � t¦­ . Now if �k�k� � , then ®¯}/�)� ¬ {°��� � . This showsthat � � is open in S.Similarly, if �±�R©²� , then ®R}/�U� ¬ {k�f©²� ; for otherwisethereexistsa path from p to q, aconditionthatviolatesthedefinitionof ©²� . ThusS is theunionof two relativelyopendisjointsets,namely �h� and ©²� . But this contradictsthe assumptionthat S is connected.Therefore�h�$t³{ .

If, on the other hand,S is digital path-connectedbut not connected,then S is the union oftwo separatedsetsA andB. In this caselet �±�b� , �l�l´ , and ��t>� x ��� y ��µ@µ�µ ����¶?t>� be ap x -path in S. Thenfor somej, �Q·¸��� and �Q·�¹ x ��© . Oneof ��º or ��º�¹ x mustbe even. If ��ºis even,then � ·»¹ x+�l¼?}�� · �¥to®¯}!� º � and,hence,®O½¾}�� · � ¬ © §tf­ . Thus, � · �b� is a limitpoint of B; i.e. © ¬ � §t�­ . But this contradictsthe assumptionthat A and B are separatedsets. A similar argumentholds if � ·n¹ x is even.

Q.E.D.

Accordingto the theorem,the connectedsetsin � � areexactly the path-connectedsets.Comparingthis with Corollary2.17.9, we seethat � � with the von Neumanntopologyenjoyssomeof thepropertiesof ¿)� . Subsequenttheoremswill show further similarities between¿)� and �Q� .

For the remainderof this sectionwe shall assume,unlessotherwisespecified, that �<� is the vonNeumannspace.Thenext lemmais a main ingredientin provingseveralinterestingpropertiesof digitalcurves.

2.20.3 Lemma. Suppose{k�>�<� and �R�lÀ . If S is connectedand {6ª`|��Á�Âtf� « © a separation,theneach � « |��Á� and © « |��Á� are connectedsets.

52

Page 61: Image Algebra by Ritter

Proof: We show that ÃoÄRÅ'ÆÁÇ is connected.By interchangingA with B, this also provesthat È�ÄjÅ�ÆÁÇ is connected.

Define É$ÊOË�Ì Ã[ÄjÅ�ÆÁÇ by

É2Í/ÎÁÏ�Ð�Ñ Î"Ò�Ó6ÎRÔ�èÄOÅ�ÆÁÇÆ"Ò#Ó Î�ÔlÕ×ÖWe shall showthat f is continuous.The result then follows from Theorem2.16.7.

Let ÎRÔlØ , ÙjÐfÉ2ÍÚÎ�Ï , and Û�Í�Ù¥Ï a basicopenneighborhoodof y in èÄ�Å'ÆÁÇ . We show thatÉ2ÜKÝÞÍ�ÛßÍÚÙ¥ÏnÏ is open in S. Since Û�Í/Ù¥Ï is a basicopen neighborhoodin Ã[ÄRÅ�ÆÁÇ , ÛßÍÚÙ¥Ï isof form ÛßÍ!àÏ�Ð>á¯ÍâÙ6Ï<ã�Í�ä=ÄOÅ'ÆÁÇ`Ï ÖTherearetwo casesto consider,namelyÙ¨åÐoÆ and ÙRÐ>Æ . SupposeÙ5åÐkÆ . In thiscaseÙjÔ�äand ÙRШΠ. SinceA andB areseparated,y cannotbea limit point of B. Thus á¯Í/Ù¥ÏKã8ÕfÐ>æ .If, in addition, ƨåÔlá¯Í/Ù¥Ï , then ÛßÍ!àÏ�Ðoá¯ÍâÙ¥ÏKãOä and É Ü.Ý Í/Û�Í/Ù¥ÏnÏ6Ð>áRÍâÎÁÏ�ãOØ . Therefore,É Ü.Ý Í�ÛßÍÚÙ¥ÏnÏ is a relatively openset in S containingx.

If Æ�Ôfá¯ÍâÙ¥Ï , then p is odd andÉ Ü.Ý Í�Û�Í/Ù¥ÏnÏ�Ð>Í�á¯ÍâÎ�Ï�ãOòÏQÄOÅ�ÆÁÇçÄ8Õ ÖSince á¯ÍâÎÁÏQãOÕßÐ[æ and Æ�Ô>áRÍâÎÁÏ ,Í�á¯ÍâÎ�Ï�ãèòÏ�ÄOÅ�ÆÁDzÐkáRÍâÎÁÏ�ã�Í/èÄOÅ'ÆÁÇ`ÏÁÐ�á¯ÍâÎÁÏQãOØOéwhich is openin S. However, È=Ä7Å�ÆÁÇ is alsoopenin S.This canbeascertainedfrom the factthat sincep is odd, we havefor each êOÔlÈ[Ä�Å'ÆÁÇ that á¯ÍâêÏ_ãëä[Ð>æ and,therefore,È[Ä�Å�ìQÇ�Ð íî�ï�ð�ñzò]ó'ô Í/áRÍÚêÏ�ã�Ø¥Ï ÖThus, É2Ü.Ý�Í�Û�Í/Ù¥Ï!Ï is the union of two relatively opensets Í/á¯Í/Î�Ï�ãëòÏ�Ä�Å�ÆÁÇ and È$ÄlÅ'ÆÁÇ .This showsthat É2Ü4Ý@Í!ÛßÍÚÙ6Ï!Ï is openin S as long as Ù¨åÐ�Æ .

Next supposethat ÙRÐ�Æ . In this case,É Ü.Ý Í/ÛßÍ!Ù¥Ï!ÏUÐ[Í�á¯Í�ÆÁÏ�ãëÃ?ÏKÄ8Å'ÆÁÇdÄèÈ ÖNow if p is odd, then á¯Í/ÆÁÏ6Ð>Å'ÆÁÇ and, therefore, É Ü.Ý Í�Û�Í/Ù¥ÏnÏ£ÐõÈ�ÄlÅ�ÆÁÇ . By the aboveargument,ȯģÅ'ÆÁÇ is openin S. If, on theotherhand,p is even,let ökÐ>á¯Í/Æ�ÏPã¸Ã8Ä£Å�ÆÁÇçÄ8Õ .Then if êgÔf÷ we musthaveeither êOÔlá¯Í/Æ�Ï�ãOä with êlåÐ>Æ , or ê�Ð�Æ , or êëÔ¯Õ .

If ê>Ôfá¯Í/ÆÁÏ�ãèä with ê$åÐøÆ , then z is odd and { z} is open. Hence êgÔlÅ�ê4Ç+ù�÷ is aninterior point of U.

If ê�ÐoÆ , then á¯ÍÚêÏ�ãbökÐ>á¯Í/ÆÁÏQãOñÄ8Å�ÆÁÇ:Äëá¯Í�ÆÁÏ�ãëÈÐ>á¯Í/ÆÁÏQã8Í�Ã=ÄOÅ'ÆÁÇdÄèÈ�ÏSÐ�á¯Í�ÆÁÏ�ãOË Öwhich is openin S. ThereforeÆ5ÔRá¯Í�ÆÁÏ_ã8Ë5ù�ö is an interior point of U.

53

Page 62: Image Algebra by Ritter

Finally, if úëûlü , then ýÿþ/ú��������� andý¯þ/ú��������ý¯þ/ú ���8þ��������������oý¯þâú �����which is openin S. Thus, in eachcasez is an interior point of U. Sincez wasarbitrary, thisshowsthat ����� !�" . This completesthe proof that #%$'&Aþ)(ßþ�*+�)� is openin S.

Let ,-�.# $/& þ0(ßþ1*+�)� and 2lû�3 . Then #2þ024��û#2þ0,5�6�.#879# $/& þ0(ßþ1*+�:�<;=�>(ßþ1*?� . Thisshowsthat given a point @jû=� and a basicopenneighborhood(�þ0#2þ�@��:�BA"C��D�E��� , thenthereexistsanopensetV containingx, namely ,F�G# $ & þ)(ßþ)#�þ1@��:�H� , suchthatfor each2lû�3 ,#2þ024� ûI(ßþ)#�þ1@��H� . Therefore,f is continuousat x, and sincex was arbitrary, f is continuouson S.

Q.E.D.

Lemma2.20.3 is neededto prove the following surprisingtheorem:

2.20.4 Theorem. SupposeJ!A"KML and NPORQ�S4þHJ?�BT"U . If S is compactand connected,thenS hasat least two non-cutpoints.

Proof: Let N bethesetof all non-cutpointsof Sandsupposeto thecontrarythat NPORQES4þ/ýV�XWYU .Let �>û�J+Z'ý . Then J+Z��[���\�"C���� , whereA and B are separatedsetswith N containedin oneof A or B. Supposewithout lossof generalitythat ý]A�� . For eachpoint 2lû�� , letJ+Z��[24�^�GC`_B���a_ , where C`_ and �b_ areseparatedsetswith ��û=�a_ . Since �jû��a_ andbyLemma2.20.3 C`_6���E2c� is connected,we must have C`_d�=�[24�eAf� .

Partially order the collection gh�>�EC _ � _jilk by subsetinclusion. Since S is compact,S isfinite. Thereforeg mustbefinite. Thuswe canselecta maximalsimply orderedsubcollectionm �n��C`_joqp�rsutMv of w suchthat x`yRzX{|x`yE} whenever~a�Y� . Consider x`y���� r�sutMv x`y�z . Since

the sets x`y � , �ay � form a separationof �?�E��� r p , x`y ����� . Let ����x`y � . Then sincex`y �+� ��� r p^{f� , q mustbean elementof A andthereforea cut point of S. Now considertheset x y . Since x y � �[�cp is a connectedsubsetof �?�����4p , it must either be a subsetof x y �or of �by�� . Since �I�Vx`yE� , x`y � �E�cp6{Gx`yE� andhence x`y�{Gx`yE� . Thus the collection � isa strict subsetof the simply orderedcollection �Ex`y���� x`y��P�P�[�l��� x`y��E��x`y�p . This contradictsthemaximality of � and provesthat N must containmore thanone point.

Q.E.D.

The reasonthat 2.20.4 is a surprisingtheoremis that it is true for Euclideanspace�c� but not forgeneraltopologicalspaces.In particular,2.20.4holds for a classof spacesknown as � v -spacesbut notfor a classknown as ��� -spaces.A topologicalspaceX is a �M� -spaceif given any two pointsof X, thenat leastone of them is containedin an openset not containingthe other. Obviously, both � � and � �are � � -spaces.However,Euclideanspacesalsosatisfy severalstrongerconditions. One of theseis the� v -hypothesis. A spaceX is called a � v -spaceif given any two points of X, then eachof them lies inan opensetnot containingthe other. For example,if �+��� �V� � and ¡R¢0�+���%£¤�|¥ , then � ��V¦e§[¢)��£ and� ���¦ § ¢��c£ . Thus, � � is a � v -space.On the otherhand,if �I��� � is evenand �=�D� � with ¡ ¢0�+���%£?�|¨ ,then � �=¦©¢0��£ . It follows that q is in everyopensetcontainingp and � ��=¦©¢0�c£����E�cp . Hence � � is

54

Page 63: Image Algebra by Ritter

a ª�« -spacebut not a ªM¬ -space.The reasonthat 2.20.4holdsfor ­�® , eventhoughit is not a ª�¬ -space,isdue to the von Neumanntopology which washeavily employedin the proof of the theorem.

2.21 Digital Ar cs and Curves

Thereare many other propertiessharedby ­M® and ¯c® , and one of theseis the similarity betweendigital arcsin ­ ® and arcsin ¯ ® . In the definition of digital arcsgiven below, the set °²±´³0µ�¶ denotesthe deletedneighborhood°e³:µ�¶:·�¸�µ�¹ .

2.21.1 Definition. A digital arc is a º ¬ -path ¸�µ ¬E»[¼[¼l¼:» µc½E¹�¾G­ ® suchthat, for all ¿BÀ�Á »q À�à ,

³�¿Ä¶ µ�ÅeÆǵ�ÈÊÉ6Ë ÁeÆ ÂR»hÌEÍ/γ0Ïж µ%Å�Ñ�° ± ³)µ�ÈÒ¶ÓÉ6Ë ÁeÆ Â5Ô ¿?ÕIf thearcconsistsof onepoint ³)ÃÖÆ|¿E¶ , thenit is alsocalleda degeneratearc. A digital simpleclosedcurve is a ºR¬ -path ¸�µc¬ »[¼l¼[¼:» µc½E¹ suchthat Ã=×YØ and for all ¿dÀ�Á »� À�à ,

³�¿ ± ¶Ùµ%ÅBÆǵ�ÈÊÉ6Ë Á�Æ Â , and

³0Ï ± ¶Çµ Å ÑG° ± ³0µ È ¶>É6Ë ÁeÆ Â�Ô ¿ÛÚ�ÜEº=ÃfÕA digital arc satisfying the additional condition

³0Ýж�µ%ŲÞÑß°e³:µMÈ[¶ ÌÄÍ/Î °e³àµ%Å1¶4á�°e³)µMÈ[¶6ÞÆFâ É6Ë Á`Æ Â�Ô Ï¤Õis calleda digital Jordanarc. A digital Jordancurve is a digital simpleclosedcurvesatisfyingcondition

³0Ý ± ¶ãµ Å ÞÑ °e³:µ È ¶ ÌEÍ�Î °e³0µ Å ¶Ûáä°e³:µ È ¶BÞÆ"â É6Ë ÁåÆ ÂeÔ Ï6Ú\ÜEºäòÕ

Note that a digital arc is a digital pathwhich, becauseof condition(1), cannotdoublebackon itselfor crossitself. Condition (2) implies that a digital arc doestouch itself; a point µ�È with  ×!Á%æ|¿ orÂÖç Á%èß¿ mustbe a (Euclidean)distancegreaterthanone from the point µ%Å . For Jordanarcs,condition(3) meansthat the pathcannotevendoublebackwithin the distanceé Ï of anotherpoint of the path. Inhigherdimensionsit allows arcsto doubleback to within the Moore neighborhoodof a previouspointµ%Å , but at a distancegreaterthan é Ï .

The requirementÃ×�Ø for digital simple closedcurvesrules out one point (degenerate)closedcurves,two point closedcurves,and four point closedcurvesthat form a 2 ê 2 block of cells. In fact, itis not hard to seethat thesearethe only º ¬ -pathswith à ç�ë that satisfy ³ ¿ ± ¶ and ³�Ï ± ¶ . Hencea digitalsimple closedcurvemust containat leasteight points. Figure 2.21.1providesexamplesof digital arcsand digital simple closedcurves.

55

Page 64: Image Algebra by Ritter

(a)ì

(b)ì

Figure 2.21.1 (a) A digital arc (left) and a digital Jordanarc (right). (b)A digital simple closedcurve (left) and a digital Jordancurve (right).

Digital arcsanddigital simpleclosedcurvesasdefinedin 2.21.1are íRî -connectedsets.Obviously,by using ïñð0ò�ó insteadof ôeð0ò�ó onecanjust aswell definetheconceptsof a digital arcanddigital simpleclosedcurve in terms of íjõ -connectivity.

The points of a digital arc ò î[ö[÷l÷[÷ ö ò�ø are all distinct, and ò î and òcø are called the endpoints ofthe arc. It is alsoobviousfrom the definition that the endpointsare non-cutpointsof the arc and thatany otherpoint ò%ù is a cut point. This is onepropertydigital arcssharewith topologicalarcs(Example2.17.10(i)). Beforediscussingfurther commonpropertieswe needto establishthe following result:

2.21.2 Lemma. If ú û�üMý is connected,thenfor anytwo givenpoints ò ö�þ=ÿ�� there existsa digitalarc from p to q in S.

Proof: By Theorem2.20.2, thereexistsa digital pathfrom p to q in S. Let �����Eòcî öÒ÷l÷[÷:ö òcø��be a digital pathfrom p to q in S of minimal lengthwith ò��òcî and þ �Gòcø . Then ò%ù��ãò �if ����� ; otherwise,��òcî ö[÷l÷[÷:ö ò%ù ö ò ���Mî ö[÷l÷:÷[ö òcø�� would be a shorterpath thanP.

If �������� , then ò ù ÿ ôeðàò � ó , for otherwise��ò î ö[÷l÷[÷:ö ò ù ö ò � ö[÷[÷l÷:ö ò ø � is shorterthanP. Simi-larly, we cannothave ò%ù ÿ ôeð)ò��Eó for ��������� , for otherwisethepath �Eòcî ö[÷[÷[÷Hö ò � ö ò%ù ö[÷l÷[÷:ö ò ø �is shorterthan P. It follows that P is a digital arc from p to q.

Q.E.D.

We are now able to prove the digital versionof Theorem2.17.11.

2.21.3 Theorem. If únûÇü ý is compactand connectedwith just two non-cutpoints, then S is adigital arc.

56

Page 65: Image Algebra by Ritter

Proof: Let �! #"�$�% be the two non-cutpointsof S. By Lemma2.21.2thereexistsa digitalarc P from p to q in S. If &(')+* , then thereexistsa point ,-$ *�. & . Sincex is a cut pointof S, *�.0/ ,�1 )325476 , whereA and B are separatedsets. SinceP is connected,P must becontainedin one of A or B, sayA. By Lemma2.20.3, 6�4�/ ,�1 is connected.Since 6 ')+8 ,9;:=<0>@? 6A4B/ ,C10D�EGF . Hence,by Theorem2.20.4, 6-4H/ ,C1 hasat leasttwo non-cutpoints,oneof which,call it y, is not thepointx. We now havetwo connectedsets,namely ? 6�4I/ ,C1�D .J/LK 1and 254M/ ,�1 , and thesesetshavethe point x in common. Thus

*!.J/;K 1 ) ? 2N4B/ ,�1�D 4MO ? 6A4B/ ,�1�D .P/;K 1;Qis connected.But this meansthat y is a non-cutpoint of S that is not in P, a contradiction.

Q.E.D.

A pair of points �� R"S$ST�U are called von Neumannneighborsor simply neighboringpoints if��$WV ? "XD . If p and q are not von Neumannneighbors,then they are referredto as non-neighboringpoints.

2.21.4 Theorem. If *�Y T U is compactand connectedwith the property that for any pair of non-neighboringpoints ,� K $ * , *!.J/ ,! K 1 is not connected,thenSis a digital simpleclosedcurve.

Proof: We divide the proof into five parts.

(1) We first provethatScontainsno cut points. Supposeto thecontrarythatp is a cut point ofS. Then *!.J/ �C1 )W2N4Z6 , whereA andB areseparatedsets.By Lemma2.20.3, 2�4I/ �C1 and6[4M/ �C1 are both compactconnectedsets. According to Theorem2.20.4, thereexist points,$�\ and K $�] suchthat x doesnot separate2^4�/ �C1 and y doesnot separate6[4�/ �C1 .SinceA andB areseparatedsets,x andy arenot neighboringpoints. But then

*�.P/ ,! K 1 )_O ? \ 4I/ �C1JD .P/ ,C1`Q 4BO ? ] 4�/ �C1JD .P/aK 1;Qis the union of two connectedsets that have the point p in common. Thus *!.J/ ,! K 1 isconnected,contrary to the theorem’shypothesis.

(2) Next, supposethat *�.P/ ,� K 1 )^2-4b6 , whereA andB areseparatedsets.Then 2�4c/ ,! K 1and 6�4d/ ,� K 1 arebothconnectedsets.For supposeto thecontrarythat 2I4�/ ,� K 1 )_e�4�f ,where U and V are separatedsets. If U containsboth x and y, let gb$ f . Since fhYi2 ,fj.P/ g@1 andB areseparatedsets.Thus *�.P/ g@1 ) ? fk.J/ g@1PD 4 ? 6�4�e D is a separation,contraryto part (1) of the proof. If U contains only one of the points x and y, say x, then*�.P/ ,C1 ) ?Pl .J/ ,�1�D 4 ? ] 4^m D is a separation. Thus againwe have a contradictionto part(1).

(3) At leastoneof 2N4B/ ,� K 1 or 6A4B/ ,� K 1 is a digital arc. For if not, then it follows fromTheorems2.20.4and2.21.3that eachof the setscontainsa non-cutpoint, say ��$ 2�4�/ ,! K 1and "�$ 6[4M/ ,! K 1 , distinct from x and y. But then

*�.P/ ,� K 1 )�O ? \ 4�/ ,� K 1PD .J/ �C1aQ 4BO ? ] 4�/ ,! K 1nD .P/ "X1;Qis a connectedset since it is the union of two connectedsetshaving the points x and y incommon. In addition, p and q are non-neighboringpoints since ��$B\ and "�$�] . Thiscontradictsthe hypothesis.

57

Page 66: Image Algebra by Ritter

(4) Both o5pMqar!sut�v and w[pMqar!sxtXv are digital arcs. By (3), at leastone of thesetwo setsis a digital arc. Let w+p�qar!sxtXv be the digital arc guaranteedby (3). If o-pq;r!sxtCv is not adigital arc, then it mustcontaina non-cutpoint y-z{ qar!sxt�v . Since w|pBq`r�sxt�v is a digital arcandx andy arenot neighboringpoints, thereexistsa point } {�~ which separatesx from y;that is, �uw�pq;r�s�tCvP�u�Pq0}�v����-p^� is a separationwith r {^� s�t { � , and eachU and Vis a connectedset. But then

� �Jq`r!sxtXv��|�����NpBqar!sxtXvJ�x�Pq`yCvL��pI����p^���is a connectedset,with p andq non-neighboringpoints. This againcontradictsthehypothesis.

(5) The pointsx andy areendpointsof oNpBqar!sxt�v andof w�pBq;r�sxt�v . If neitherx nor y isan endpoint of o-pBq`r�sxtXv , let y�sR} { o denotethe endpointsof o-pBq;r�s�tCv . Then

� �Jq0y�s�}�v��_������pIq;r!sxtCvP�u�Jq0y�s�}�v`��pB� ~ pBqar!sxtXvJ�is the union of two connectedsetshaving the points x and y in common. Thus

� �Jq0y�s�}�v isconnected.Sincep andq areendpointsand �R�=���@��o�pIq`r�s�tXvJ�C�^� , they arenon-neighboringpoints. This contradictsthe hypothesis.Thus q`r�s�tCv containsat leastoneendpoint of A and,for analogousreasons,of w[p�qar!sxtXv .Supposey is the endpoint of o-pIq`r�s�tCv but x is not. If y { � denotesthe otherendpoint,thenp andy cannotbe neighbors.Also, both x andy mustbe endpointsof wApBqar!sxtXv . Forif not, let } {~ denotethe other endpoint. Then

� �Jq0y�sR}�v��+�����NpBq`r�sxtXvP���Pq`yCva�=pM��� ~ pIq`r�s�tXvJ�x�Jq`}Xva�is the union of two connectedsetshaving the points x and y in common. Thus

� �Jq0y�s�}�v isconnected,wherep andq arenon-neighboringpoints. But this contradictsthe hypothesis.

We now have that x and y are the end points of wSp�q`r�sxtXv and p and y are end pointsof o5p�q`r�s�tXv . Then �uo�pIq`rCv��x�Pq�yCv and w�p�q`rCv are connectedsetshaving the point x incommon. Therefore,

� �Jq`y�s�tCv��+�����NpBq`rCv��x�Jq`yCv`�=pI� ~ p�q`rCvP�is connected.This againcontradictsthe hypothesis.

ThusS is the union of two digital arcshavingonly their endpoints in common.Furthermore,sinceA andB areseparatedsets,we havethat y-z{�� ��}X����y { � and } {~ . It now followsthat S hasat leasteight pointsandsatisfiesconditions �� L¡¢� and �£�n¡¤� of Definition 2.21.1.

Q.E.D.

If o�¥G¦�§ , thena �=¨ -componentof A is a maximal �=¨ -connectedsubsetof A. In particular,if ©��W� ,then an 8–componentis a maximal 8–connectedsubsetof A. In [47] and [48], Rosenfeldproved thefollowing digital versionof the JordanCurve Theorem(2.17.13):

2.21.5 Theorem. If� ¥^¦ ¨ is a digital simpleclosedcurve,then ¦ ¨ � � hastwo 8–components.

It canbe seenfrom Figure2.21.1(b) that the 8–componentsof ¦ ¨ � � neednot be connectedsetsinthe von Neumanntopology. However, the exactanalogueof the JordanCurve theoremfollows as aneasycorollary of Rosenfeld’stheorem.

58

Page 67: Image Algebra by Ritter

2.21.6 Corollary. If ªG«W¬�­ is a digital Jordan curve,then ¬�­`®Jª hastwo components.

Proof: Let C beoneof the8–componentsof ¬�­a®Pª guaranteedby 2.21.5and ¯�°�± . Let ²�³denotethe componentof C containingp. We shall show that ²´³Iµ|² .

Since ¯¶°·² ³ , ² ³¹¸µ»º . Supposeto the contrary that ² ³¹¸µ¼² . Then there is a point½ °-²c®�² ³ and, sinceC is 8–connected,and 8–path ¾¿µiÀ0¯XÁ�Â�Ã`ÃaÃ�ÂR¯�ÄnÅ from p to q in C.Since ½ ¸°² ³ , thereexistsan n with ÆÈÇ�É�Ê^Ë suchthat ¯�ÌB°² ³ and ¯�ÌPÍ�Á�°²Î®0² ³ . LetÏ�Ð ÂÒÑ�Ócµ�¯ Ì . Then ¯ Ì0Í�Á ¸°�Ô Ï ¯ Ì Ó , for otherwise ² ³kÕ À0¯ Ì0Í�Á Å is a connectedsubsetof Clarger than ²´³ . Thus, ¯ Ì�Í�Á mustbe oneof the four diagonallyadjacentpoints

ÏuÐ�Ö ÆJÂ£Ñ Ö ÆnÓ .Suppose,without loss of generality, that ¯ Ì0Í�Á µ Ï£Ð�× ÆPÂ£Ñ × Æ�Ó . Now considerthe pointsØ µ Ï£Ð × ÆPÂÙÑ=Ó and Ú�µ ÏuÐ Â£Ñ × Æ�Ó . SinceS is a Jordancurve, it follows from 2.21.1

Ï�Û�Ü Ó , thatat leastone of the points, say x, is not an elementof S. But then ²´³ Õ À Ø Å is a connectedsubsetof C larger than ² ³ . Therefore ² ³ µ·² .

Q.E.D.

The following digital versionof Example2.17.3(ii) was alsoprovenby Rosenfeld[47].

2.21.7 Theorem. If ªW«+¬ ­ is a digital arc, then ¬ ­ ®Pª is 8–connected.

In view of Figure 2.21.1(a), it is obviousthat ¬�­L®Pª neednot be connected.The following digitalanalogueof 2.17.3(ii) follows as an easycorollary to 2.21.7:

2.21.8 Corollary. If ªW«�¬ ­ is a digital Jordan arc, then ¬ ­ ®Jª is connected.

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

A topological invariant that providesa methodfor counting objectsin the digital plane ¬�­ is theEuler number.

2.21.9 Definition. If ª�«�¬ ­ is compact,thenthe Euler numberof S, E(S), is definedas

Ý Ï ª�Ó�µWÞ Ï ª�Ó�ßÉ Ï ª!ÓàÂ

wherem(S) denotesthe numberof componentsof S andn(S) the numberof boundedcompo-nentsof ¬�­L®Pª . The boundedcomponentsof ¬�­a®Pª arealsocalled the holesof S.

If oneof the numbersm(S) or n(S) is known, thenthe Euler numberprovidesa meansfor obtainingtheother. This observationhasdirectpracticalapplications.For example,therearevarious“hole filling”algorithmswhoseoutput are connectedobjectswithout holes. The Euler numbercan then be appliedto find the numberof objectspresent.Conversely,if we know that we aredealingwith one connectedobject, then the Euler numberprovidesus with the numberof holesin the object.

59

Page 68: Image Algebra by Ritter

2.22 Weakly ConnectedSetsand á=â -Connectivity

In theprecedingtwo sectionsweformulatedmostdefinitionsandtheoremsin termsof áJã -connectivityand observedthat most of the theoremshaveanalogousinterpretationsfor á=â -connectivity. This holdsfor the Euler numberas well. For 8–connectivitywe define

ä´å�æuç�è�é5êZå`æ�ç!èìëíîå�æxç�è@ï

whereê å æxç�è

denotesthenumberof 8–componentsof Sandí å æ�ç�è

thenumberof bounded8–componentsof ð âañ ç . Obviously, in most cases

ä å æxç�èjòéiäjæxç�è.

Onereasonwe preferredusing á=ã -connectivityis Theorem2.20.2. It is well known that theredoesnot exist a topology on ð�ó for which connectivity is equivalentto á â -connectivity[4]. However,thereexist topologieson ð�ó in which every á=â -connectedsetis weaklyconnected.Note that if ô é�æ�õ�ï÷ö@è is anevenpoint in the von Neumannspaceð â andq is any oneof the diagonallyadjacentneighboringpointsæ�õ øGùPï£öúøWùaè

, thentheset û�ô ï�üXý is weaklyconnectedbut not connected.This is in contrastto þ ó , whereweakconnectivityandconnectivityareequivalentnotions(Theorem2.16.6). It doesnot mean,however,that 8–connectedsetsareweakly connected;the set û æ�õ�ï£ö�ÿWùnèxï;æ�õîÿWùJï£ö�èuý is not weakly connected.

In thevon Neumanntopologyon ð a basicopenset � æ���è is of form � æ�� è�é û ��ý if��� ð is oddand� æ���è!é û �këGùJï���ï��úÿWùný if p is even.The Cartesianproductof thesebasicneighborhoodswill be used

to definea basisfor a topologyon ð�ó which is different from the von Neumanntopology. Specifically,with each ô é+æ�� ã ï�� â ï����#ï�� ó è� ð�ó we associatea basicneighborhood� æ ô è definedby

� æ ô è!é�æ � æ�� ã è#ï�����îï � æ�� ó è�è�é ó ��� ã �æ�� � èàï

whereeach � æ�� � è is a basicneighborhoodof� � � ð of the von Neumannspaceð . It is not difficult

to show that the collection � é û�� æ ô è�� ô � ð�� ý is a basisfor a topology on ð ó . Sincethereare � ópossibleneighborhoodconfigurations,this topology is appropriatelycalled the � ó -topologyon ð ó . Theset ð ó togetherwith this topologyis alsoreferredto asthe productspaceof the von Neumannspaceð .

For illustrativepurposeswe againconsiderthedualspace� ó obtainedby substituting� æ ô è for p and� æ � æ ô è�è for � æ ô è . Thefour differentneighborhoodconfigurationsfor theproductspace� â areshowninFigure2.22.1. The shadedcell representsthe cell � æuõxï£ö=è�� � æ � æ�õ�ï£ö=èxè�� Here the left-mostneighborhoodresultswheni andj arebotheven.Proceedingfrom left to right, thenextneighborhoodpicturedrepresentsthe casei evenand j odd followed by i evenand j odd, and i and j both odd, respectively.

Figure 2.22.1 The four possiblebasicneighborhoodsin the productspace��� .Productspacesandvon Neumannspacesshareseveraltopologicalproperties.In particular,we have

the following analoguesof Theorems2.19.1and 2.20.2:

60

Page 69: Image Algebra by Ritter

2.22.1 Theorem. Thebasicneighborhoodsfor the �! -topologyare path-connected.

The proof of 2.22.1 is analogousto that of 2.19.1. Given a neighborhood"$#&%�' and %)(�*,+-".#&%�' ,we definethe path /10324%65�(7%98�(:%<;�= , where %65>0?* , %68>0?% , and %@;A0CB , anddefinea continuouspathD,E>FHG (JILK9MN".#�%�' from q to r accordingto the typesof coordinatesof the pointsp, q, and r .

2.22.2 Theorem. Let O ! bethedigital spacewith the ! -topologyand PRQSO ! . ThenSis connectedTVU P is path-connected.

As in the caseof 2.20.2, the equivalencefollows from Theorems2.17.5, 2.17.8, and 2.22.1. Incontrastto Theorem2.20.2, connectivityin the �! -topologyis not equivalentto digital path-connectivityfor either WX5 -pathsor WX8 -paths.It is truethatevery WX5 -pathis connectedin theproductspaceO ! . However,connectedsetsneednot be W 5 -pathconnected.For example,if #&YZ(\[]'^+_O 8 with i andj bothevenintegers,then 2`#�Ya(�[b'7(�#�Ydc?I`(�[ecSIf'a= is connectedbut not WX5 -connected.Although 2`#&YZ(g[b'a(�#�Y<cCIh(�[icSI�'a= is WX8 -connected,it doesnot meanthat all WX8 -connectedsetsare connected;the set 2h#jY�cCIh(�[b'a(�#�Ya(�[ic?I�'Z= isWX8 -connectedbutnotconnected.However,2`#&Y<cSIh(k[]':(�#�Ya(�[>cCI�'a= is weaklyconnected,andsois every WX8 -connectedsetin theproductspaceO ! . Theseobservationsarerelevantin connectionwith the topologicalnotion of weakpath-connectivity.

2.22.3 Definition. Let O ! be a digital space.A sequenceof points 2%65�(9lll<(:%9m�=n+-O ! is calledaweakpath if 2�%9oj(7%@oqp 5 = is weakly connectedfor InrsY>rutwvCI .A set PxQSO<! is weaklypath-connectedif for eachpair of points %)(7*-+-y , thereexistsa weakpath /s0z24%.0?%65�(7%68�(�l�lld(7%6me0?*{=|Q}P . The setP is calleda weakpath fromp to q.

As a consequenceof this definition we have the following:

2.22.4 Theorem. If P is a weakpath in a digital space,thenP is weaklyconnected.

Proof: Supposeto the contrary that some weak path /~0�24% 5 (9ll�l�(:%6m�=�Q�O�! is notweakly connected. Then there exist open setsU and V such that /�Q��z�,� , /s�����0� �0�/1��� , and �3�-��0 �

. Assumewithout loss of generalitythat % m +3/s�-� . Let[�0u���X��24Y E % o +_/C�-�e= . Since [�cCIVr3t we haveby definition of j that %<� p 5�+,/C�_� ,while %��i+_/}�_� . Thus 24%��4(7%�� p 5�= is not weakly connected,contraryto the hypothesisthatP is a weak path.

Q.E.D.

It is not difficult to verify that connectivity implies weak path-connectivityin the von Neumanntopologyaswell as the f! -topology. Also, every W 5 -path is a topologicalpathand,hence,a weakpathin thesetopologies.However,aswe notedearlier,diagonallyadjacentpointsin the von NeumannspaceO 8 neednot be weakly path-connected.Hence W 8 -pathsin von Neumannspacesneednot be weaklypath-connected.On the otherhand, WX8 -pathsareweak pathsin the �! -topology. This follows from thefact that if % o�p 5e+_��#�% o ' , then ".#�% o�p 5�'9�n".#&% o '�0 � for the basicneighborhoodsin the �! -topology.

61

Page 70: Image Algebra by Ritter

In analogyto pathconnectivity,we alsohavethatweakpath-connectivityimpliesweakconnectivityin digital spaces.For supposethat �3�s�9� is weakly path-connectedbut not weakly connected.Thenthere exist open setsU and V such that �����}��� , �,�R����¡  �� �x��� , and �3��� ��  . Let¢�£ �_�-� , ¤ £ �_��� , andP a weak pathfrom p to q in S. Then ¥¦�u�§�¨� , ¥C���¦��z  �� ¥C��� ,and �x�V� �3  . ThusP is not weakly connected,contraryto Theorem2.22.4. Thenext theoremshowsthat the conversealso holds in the von Neumannas well as the ©�ª -topology.

2.22.5 Theorem. Let � ª be the digital spacewith either the von Neumannor the © ª -topology. If�?�z�9� , thenS is weaklyconnected«�¬ S is weaklypath-connected.

Proof: We alreadyknow that weak path-connectivityimplies weak connectivity in digitalspaces.To prove the converse,supposethat S is weakly connected.Let ¢z£ � and ­¯® =° ¤ £ ��±e²j³�´�µZ´^¶¸·º¹e»¼´¹4½�¾�¹f²a³�¿\µ&ÀhÁ ¢ ²aÀ¤�¶�Ã��)Ä . If ­ ® � � , thenthereis nothingto prove.So supposethat ­ ® �� � . Let Å ® � �ºÆ�­ ® ,

� � ÇÈÊÉ�Ë�Ì<Í.Î ¤6Ï�йfÃ�ÑsÒÔÓ ÕÖh×hØ]Ù<Ú.Û�Ü6Ý�Þwhere Ú.Û�ß6Ý and Ú.Û\ÜºÝ denotebasicneighborhoods.

If Üxà-áãâ , then Ú.Û\Ü�Ý{ä_Ú.Û&ß{Ý Ó3å for every ßCàSæ>â . For if Ú.Û\ܺݺäçÚ.Ûjß6ÝèÓ3å for some

ß,àéæ â , let P be a weakpathfrom p to q in S. Then êCëéì ܺí is a weakpathfrom p to x inS and,therefore,Ü,à_æ â , contraryto the fact that æ â änî â Ó3å . It follows that ï ä ÒsÓ3å ,ï ä,ð Óñï ä-æ>â?èÓòå , Ò ä-ð ÓóÒ ä�îeâôèÓõå , and ð÷ö ï�ë�Ò . but this contradictsthehypothesisthat S is weakly connected.Therefore æ â Ó ð .

Q.E.D.

Although øhù -connectivityimpliesweakpath-connectivityand,hence,weakconnectivity,theconversedoesnot hold in either the von Neumanntopologyor the ú�û -topology. For example,if Û&üZÞ\ý]Ýà_þ ù withi and j both even integers,then ê¡Ó�ì Û&üZÞ�ýXÝ7Þ�Û�ü�ÿ ú ÞkýXÝaí is weakly connectedand henceweakly path-connectedbut not øXù -connectedin the úfû -topology. Note,however,that if we shift thesetoneunit in thediagonaldirection, then the shifted set ì Û�ü<ÿ��hÞkýeÿ���Ý:Þ�Û�ü<ÿ � Þ�ý>ÿ��fÝaí is not weakly path-connectedorweakly connected.This is dueto the fact that shifts arenot continuoustransformationsin this topology.As we shallshow, ø ù -pathsaretheonly weakpathsthatareshift invariantweakpathsin the ú û -topology.

If ��Ó Û ��� Þ ��� Þ � û Ý and ß Ó Û ��� Þ ��� Þ � û Ý arepoints in þ û , and ðSö3þ û , thenwe define

� ÿRß Ó Û ��� ÿ ��� Þ ��� Þ � û ÿ � û Ý ���� ð_ÿ �,Ó}ì�� ÿ�ß � ß-à-ð)í � (2.22.1)

A weak path ê�Ó�ì�� � Þ ��� Þ ��� í is a translation invariant or shift invariant weakpath if ê ÿ ��Óì ß � Þ ��� Þ:ß � í , where ß � Ó�� � ÿ � for ��������

, is a weak path for every �! #"�$ .2.22.6 Theorem. Let "�% be the digital spacewith the &�% -topologyand ')(*"+% . ThenS is ,.- -

connected/10 for eachpair of points �3254! 6' there existsa translationinvariant weakpathP from p to q in S.

In particular, P is a ,.- -path /10 P is a translation invariant weakpath.

62

Page 71: Image Algebra by Ritter

Proof: SupposeS is 7.8 -connected.Let 93:5;!<!= , >@?BA93CD:�EEEF:G9IHKJ a 7.8 -path from p to qin S, and L6<#M+N . Since 9PORQ�SUT�L�<WVYXZ9�O\[]T^L_?`VYXZ9POZTaL][ , >bT_L is a 7 8 -path in =cT^L .Since 7.8 -pathsare weak paths,P is a translationinvariant weak path.

To provethe converse,supposethat for eachpair 93:F;c<d= , thereexistsa translationinvariantweak path from p to q in S. If S is not 7.8 -connected,then for somepair of points 93:F;!<!= ,theredoesnot exista 7 8 -pathfrom p to q in S. Let >�?�A9 S :EEE�:F9]HKJ bea translationinvariantweakpathfrom p to q in S. SinceP is not a 7e8 -path,we havethat for some fg9 ORQ�Sih<#VYX\9 O [ ,where jik�f3kblim�j . Let 9 OnQ�S ?�Xno S :EEEp:Zo N [ anddefine L6?�Xrq S :EEEp:Fq N [s<6M N by

q.tu?vxw_ynz o t y|{~}����j ynz o t y�{~���D��� :

where jckB�Wk)� . Then the coordinatesof the point 9 OnQ�S T�L are all odd and, therefore,� XZ9PORQ�S�T!L][�?�A�9PORQ�S3T�L~J . But then

� XZ9 OnQ�S TaL][+� � Xr9 O TaL][3� � Xr9 OnQ�S TuL�[+��VYXZ9 O TuL�[~?�A�9 OnQ�S TaL~JU� � X\9 O TaL][�?��since 9 OnQ�S TaL h<cVYXZ9 O [�T�Lc?�V�Xr9 O TaL][ . This contradictsthehypothesisthatP is a translationinvariant weak path.

Q.E.D.

A shift by a vector L6<gM�� is a function ����#M Nb� M N defined by ���Xr9�[�?�9�T�L¡ �9!<#MP� .The fundamentalproblem with both the von Neumannand the ¢ N -topology is that they are not shiftinvariant; a shift � � is not necessarilycontinuous.Shifts are importantoperationsin imageprocessing,while continuousfunctionspreservesuch important featuresas connectedness.Thereforeit would bedesirableto haveshifts representedas continuousfunctions. There are topologieson M+N that providefor continuity of shifts. The discreteand indiscretetopologiesare two suchexamples.However,thesetopologiesdo not provide the useful propertieswe associatewith £ N suchas the classificationof arcs,the JordanCurveTheorem,and the variouspropertiesof surfacesembeddedin £ N . Digital imagesareusuallyviewedasdiscreterepresentationsof regionsin £ N . Thuswe would like propertiesof £ N to carryover into the discretedomain. As we haveseen,the von Neumannand ¢ N -topologiespreservemanyoftheseusefulproperties.In addition,eventhoughshifts arenot continuousfunctionsin thesetopologies,shifts do preserveconnectivity in the von Neumanntopology and weak connectivity of 7.8 -connectedsets in the ¢KN -topology.

Thereare many other topics in digital topology that provide for a theoreticalfoundationof manyimportant imageprocessingoperations.We refer the readerinterestedin this subjectto [29] and [44]for further references.

63

Page 72: Image Algebra by Ritter

Bibliography

[1] T.M. Apostol. MathematicalAnalysis. Addison-Wesley,Reading,MA, 1964.

[2] K.E. Batcher.Designof a massivelyparallelprocessor.IEEETransactionsonComputers, 29(9):836–840, 1980.

[3] G. Birkhoff and J. Lipson. Heterogeneousalgebras.Journal of CombinatorialTheory, 8:115–133,1970.

[4] J. Chassery.Connectivity and consecutivity in digital pictures. ComputerVision, Graphics, andImageProcessing, 9(3):294–300,1979.

[5] E.L. Cloud. The geometricarithmetic parallel processor.In ProceedingsFrontiers of MassivelyParallel Processing. George MasonUniversity, October1988.

[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. AcademicPress,Inc.

[7] E.L. Cloud and W. Holsztynski. Higher efficiency for parallel processors.In ProceedingsIEEESouthcon84, pages416–422,Orlando,FL, March 1984.

[8] T.R. CrimminsandW.M. Brown. Imagealgebraandautomaticshaperecognition.IEEETransactionson Aerospaceand Electronic Systems, AES-21(1):60–69,January1985.

[9] D. Crookes,P.J.Morrow, andP.J.McParland.An algebra-basedlanguagefor imageprocessingontransputers.IEE Third AnnualConferenceon ImageProcessingand its Applications, 307:457–461,July 1989.

[10] D. Crookes,P.J.Morrow, andP.J.McParland.An implementationof imagealgebraon transputers.Technicalreport,Departmentof ComputerScience,Queen’sUniversity of Belfast,NorthernIreland,1990.

[11] J.L. Davidson.Lattice Structures in the ImageAlgebraand Applicationsto ImageProcessing. PhDthesis,University of Florida, Gainesville,FL, 1989.

[12] J.L. Davidson. Classificationof lattice transformationsin image processing.Computer Vision,Graphics,and ImageProcessing:ImageUnderstanding, 57(3):283–306,May 1993.

[13] J.L. Davidsonand F. Hummer. Morphology neural networks:An introduction with applications.IEEE SystemsSignal Processing, 12(2):177–210,1993.

[14] J.L. Davidsonand A. Talukder.Templateidentification using simulatedannealingin morphologyneural networks.In SecondAnnual Midwest Electro-TechnologyConference, pages64–67,Ames,IA, April 1993. IEEE Central Iowa Section.

[15] E.R. Dougherty.Unification of nonlinearfiltering in the contextof binary logical calculus,part ii:Gray-scalefilters. Journalof MathematicalImagingand Vision, 2(2/3):185–192,November1992.

[16] M. J. B. Duff. Reviewof CLIP imageprocessingsystem.In Proceedingsof theNationalComputingConference, pages1055–1060.AFIPS, 1978.

[17] M.J.B. Duff. Clip4. In K.S. Fu andT. Ichikawa,editors,SpecialComputerArchitecturesfor PatternProcessing, chapter4, pages65–86.CRC Press,Boca Raton,FL, 1982.

64

Page 73: Image Algebra by Ritter

[18] M.J.B.Duff, D.M. Watson,T.J.Fountain,andG.K. Shaw.A cellularlogic arrayfor imageprocessing.Pattern Recognition, 5(3):229–247,June1973.

[19] G.R.FischerandM.R. Rowlee.Computationof disparityin stereoimagesontheConnectionMachine.In ImageAlgebraandMorphologicalImageProcessing, volume1350of Proceedingsof SPIE, pages328–334,1990.

[20] T.J.Fountain,K.N. Matthews,andM.J.B.Duff. TheCLIP7A imageprocessor.IEEEPatternAnalysisand MachineIntelligence, 10(3):310–319,1988.

[21] J. Goutsias.On the morphologicalanalysisof discreterandomshapes.Journal of MathematicalImaging and Vision, 2(2/3):193–216,November1992.

[22] H. Hadwiger.VorlesungenUber Inhalt, OberflæcheundIsoperimetrie. Springer-Verlag,Berlin, 1957.

[23] R.M. Haralick,L. Shapiro,andJ. Lee.Morphologicaledgedetection.IEEE Journalof RoboticsandAutomation, RA-3(1):142–157,April 1987.

[24] R.M. Haralick,S.R.Sternberg, andX. Zhuang.Imageanalysisusingmathematicalmorphology:PartI. IEEE Transactionson PatternAnalysisand MachineIntelligence, 9(4):532–550,July 1987.

[25] W.D. Hillis. TheConnectionMachine. The MIT Press,Cambridge,MA, 1985.

[26] J.G.Hocking and G.S. Young.Topology. Addison-Wesley,Reading,MA, 1961.

[27] E. Kamke.Theoryof Sets. Dover Publications,Inc., New York, 1950.

[28] J.C. Klein andJ. Serra.The textureanalyzer.Journal of Microscopy, 95, 1972.

[29] T.Y. Kong andA. Rosenfeld.Digital topology:Introductionandsurvey.ComputerVision,Graphics,and ImageProcessing, 48(3):357–393,1989.

[30] L. KoskinenandJaakoAstola.Asymptoticbehaviourof morphologicalfilters. Journalof Mathemat-ical Imaging and Vision, 2(2/3):117–136,November1992.

[31] R.M. Lougheed.A high speedrecirculatingneighborhoodprocessingarchitecture.In Architecturesand Algorithmsfor Digital ImageProcessingII , volume534 of Proceedingsof SPIE, pages22–33,1985.

[32] R.M. LougheedandD.L. McCubbrey.The cytocomputer:A practicalpipelinedimageprocessor.InProceedingsof theSeventhInternationalSymposiumonComputerArchitecture, pages411–418,1980.

[33] P. Maragos.A Unified Theoryof Translation-InvariantSystemswith Applicationsto MorphologicalAnalysisand Codingof Images. Ph.D.dissertation,Georgia Instituteof Technology,Atlanta, 1985.

[34] P. MaragosandR.W. Schafer.Morphologicalskeletonrepresentationandcodingof binary images.IEEE Transactionson Acoustics,Speech,and Signal Processing, ASSP-34(5):1228–1244,October1986.

[35] P. MaragosandR.W. Schafer.Morphologicalfilters PartI: Their set-theoreticanalysisandrelationsto linear shift-invariant filters. IEEE Transactionson Acoustics,Speech,and Signal Processing,ASSP-35:1153–1169,August 1987.

[36] P.MaragosandR.W. Schafer.Morphologicalfilters PartII : Their relationsto median,order-statistic,and stackfilters. IEEE Transactionson Acoustics,Speech,and Signal Processing, ASSP-35:1170–1184, August 1987.

[37] G. Matheron.RandomSetsand Integral Geometry. Wiley, New York, 1975.

[38] P.E. Miller. Developmentof a mathematicalstructurefor imageprocessing.Optical division tech.report, Perkin-Elmer,1983.

[39] H. Minkowski. Volumenund oberflache.MathematischeAnnalen, 57:447–495,1903.

65

Page 74: Image Algebra by Ritter

[40] H. Minkowski. GesammelteAbhandlungen. TeubnerVerlag,Leipzig-Berlin, 1911.

[41] M.H. Newman. Elements of the Topology of Plane Point Sets. Cambridge University Press,Cambridge,England,1961.

[42] A.V. Oppenheimand R.W. Schafer.Discrete-Time Signal Processing. Prentice-Hall,EnglewoodClif fs, NJ, 1989.

[43] E.R. Phillips. An Introduction to Analysisand Integration Theory. Intext EducationalPublishers,Scanton,PA, 1971.

[44] G.X. Ritter. Topology of computervision. In Topology Proceedings, volume 12, pages117–158,Auburn University Press,1987.

[45] G.X. Ritter. Imagealgebrawith applications.Unpublishedmanuscript,availablevia anonymousftpfrom ftp://ftp.cise.ufl.edu/pub/src/ia/documents, 1994.

[46] G.X. Ritter and J.N. Wilson. Handbookof ComputerVision Algorithms in Image Algebra. CRCPress,Boca Raton, 1996.

[47] A. Rosenfeld.Arcs andcurvesin digital pictures.Journal of the ACM, 20, 1976.

[48] A. Rosenfeld.Digital topology. AmericanMath Monthly, 86, 1979.

[49] W. Rudin. Principlesof MathematicalAnalysis. McGraw-Hill, New York, NY, 1964.

[50] W. Rudin. Realand ComplexAnalysis. McGraw-Hill, New York, NY, 1974.

[51] D. SchonfeldandJ. Goutsias.Optimal morphologicalpatternrestorationfrom noisy binary images.IEEE Transactionson PatternAnalysisandMachineIntelligence, 13(1):14–29,January1991.

[52] J. Serra. Introduction a la morphologie mathematique.Booklet no. 3, Cahiers du Centre deMorphologieMathematique,Fontainebleau,France,1969.

[53] J. Serra.Morphologiepour les fonctions“a peupresen tout ou rien”. Technicalreport,CahiersduCentrede MorphologieMathematique,Fontainebleau,France,1975.

[54] J. Serra.ImageAnalysisand MathematicalMorphology. AcademicPress,London,1982.

[55] E. Spanier.Algebraic Topology. McGraw-Hill, New York, 1966.

[56] S. R. Sternberg. Languageand architecturefor parallel image processing.In Proceedingsof theConferenceon PatternRecognitionin Practice, Amsterdam,May 1980.

[57] S.R.Sternberg. Biomedical imageprocessing.Computer, 16(1), January1983.

[58] S.R. Sternberg. Overview of image algebraand related issues.In S. Levialdi, editor, IntegratedTechnologyfor Parallel ImageProcessing. AcademicPress,London,1985.

[59] L. Uhr. Pyramid multi-computer structures,and augmentedpyramids. In M.J.B. Duff, editor,ComputingStructuresfor ImageProcessing, pages95–112.AcademicPress,London,1983.

[60] L. Uhr. Algorithm-StructuredComputerArraysandNetworks. AcademicPress,New York, NY, 1984.

[61] S.H. Unger.A computerorientedtoward spatialproblems.Proceedingsof the IRE, 46:1144–1750,1958.

[62] University of Florida Center for Computer Vision and Visualization. Software User Manualfor the iac++ Class Library, version 1.0 edition, 1994. Avialable via anonymousftp fromftp.cise.ufl.edu in /pub/ia/documents.

[63] J. von Neumann.The generallogical theoryof automata.In Cerebral Mechanismin Behavior:TheHixon Symposium. JohnWiley & Sons,New York, NY, 1951.

[64] J.vonNeumann.Theoryof Self-ReproducingAutomata. Universityof Illinois Press,Urbana,IL, 1966.

66

Page 75: Image Algebra by Ritter

[65] J.N. Wilson. An introduction to imagealgebraAda. In ImageAlgebra and Morphological ImageProcessingII , volume1568of Proceedingsof SPIE, pages101–112,SanDiego,CA, July 1991.

[66] J.N. Wilson. Supportingimagealgebrain the C++ language.In ImageAlgebraand MorphologicalImageProcessingIV, volume 2030 of Proceedingsof SPIE, pages315–326,SanDiego, CA, July1993.

[67] J.N. Wilson, G.R. Fischer,andG.X. Ritter. Implementationanduseof an imageprocessingalgebrafor programmingmassivelyparallel computers.In Frontiers ’88: The SecondSymposiumon theFrontiersof MassivelyParallel Computation, pages587–594,Fairfax, VA, 1988.

[68] J.N. Wilson, D.C. Wilson, G.X. Ritter, and D. Langhorne.Image algebraFORTRAN language,version3.0. TechnicalReportTR-89–03,University of Florida CIS Department,Gainesville,1989.

67

Page 76: Image Algebra by Ritter
Page 77: Image Algebra by Ritter

CHAPTER 3ELEMENTS OF ABSTRACT ALGEBRA

If onesurveysthe subjectsof arithmetic,elementaryalgebra,or matrix theory,certainfeaturesstandout. One notesthat thesesubjectsdeal with somegiven or derivedset of objects,usually numbersorsymbolicexpressions,andwith rules for combiningtheseobjects.Examplesof theseare the setof realnumbers,thesetof realvaluedfunctionson a set ¤ , andthesetof complexvalued ¥i¦i¥ squarematriceswith the usualrulesof addition,subtraction,andmultiplication. Moreover,onefinds that therearesomepropertieswhich thesecombining operationshave in common: e.g. addingzero to any real number,addingthe zerofunction to a function, or addingthe zeromatrix to a matrix doesnot changethe valueof the realnumber,the function,or the matrix, respectively.Otherproperties,suchascommutativity,donot alwayshold. Multiplication of squarematricesis, in general,not a commutativeoperation.

Abstractalgebraaimsat providinga fuller understandingof thesesubjectsthrougha systematicstudyof typical mathematicalstructures.Sucha studyhastheadvantageof economyin thatmanysuperficiallydistinct structuresare found to be basicallythe same,andhenceopento a unified treatment.

Imagealgebrahasan analogousgoal in that it aims at providing a deeperunderstandingof imageprocessingthrougha systematicstudy of imageprocessingoperations.Variousstructuresin the imagealgebraareequivalentto thosestudiedin abstractalgebra.Familiarity with someof thesestructuresis,therefore,essentialto the understandingof imagealgebra.

3.1 Relations and Operations on Sets

A binary relation § on a set ¤ is, intuitively, a propositionsuchthat for eachorderedpair ¨r©�ª5«­¬ ofelementsof ¤ , onecan determinewhether ©­§�« is or is not true. Here, ©­§�« meansthat “ © is related(by the relation § ) to « .” For example,if ® is the setof all lines in a plane,then“is parallel to” or “isperpendicularto” are binary relationson ® .

The notion of a binary relation on a set can be rigorously defined by stating it formally in termsof the set concept.

3.1.1 Definition: A binary relation § on a set ¤ is a subset§*¯�°±¦#° .

Thus,any subset§ of ¤�¦²¤ is a binary relationon ¤ andif sucha subsetis beingusedto definea relation on ¤ , then it is customaryto write ©­§�« for ¨Z©�ªF«­¬x³!§ .

3.1.2 Examples:

(i) Set inclusion is a relationon any powerset. In particular,let ¤ be any setand

§)´¡µD¨r¶·ªF¸¹¬sº�¶�¯�¸²ª�¶·ªF¸@³#»�¼Y½¿¾Then § is a binary relation on » ¼ .

(ii) The relationof lessor equal, À , betweenreal numbersis the set ÁD¨Z©Pªp«­¬�º�©gÀ�«­Â�¯uÃ!¦cà .

(iii) For any set ¤ , the diagonal ÄÅ´BÁD¨Z©PªF©�¬�º�©g³�¤! is the relationof equality.

69

Page 78: Image Algebra by Ritter

(iv) The inverserelation of Æ , denotedby ÆgÇ�È , is the relation ÆgÇ�ÈcÉËÊ�ÌÎÍ�ÏFÐ+Ñ�ÒiÌrÐPÏFÍ.Ñ�Ó�Æ#Ô .Thus, the inverserelationof Õ in (ii) aboveis the relationof greateror equal Ö .

Note that in binary relations,eachpair of elementsneednot be related.For instance,in (iii) above,if ÐPÏFÍ×ÓWØ and Ð�ÙÉÚÍ , then neither ÌrÐPÏFÍ­Ñ nor ÌrÍ�ÏFÐ�Ñ are in Û .

An obviousgeneralizationof Definition 3.1.1is to defineanysubsetof Ø¡Ü·Ý to bea binary relationbetweenthe elementsof Ø and thoseof Ý ; thus,a function Þ!Ò�ØàßáÝ is a specialtype of a binaryrelationbetweenØ and Ý . Operationsbetweenimagesand templatesas definedin Chapter4 provideexamplesof binary relationsbetweenelementsof differentsetsthat arepertinentto imageprocessing.

Certain relationson a set allow elementsof that set to be arrangedin someorder. For example,whena child arrangesa setof sticks in order, from longestto shortest,he hasan intuitive graspof therelation “is longer than.” From this examplewe can seethat thereare at leasttwo propertieswhich arelation Æ must haveif it is to order a set. Specifically:

Æ must be antisymmetric. That is, given two sticks, one of them must be longer than the other.Otherwise,they could not be given relative positionsin the order.

Æ mustbe transitive. That is, given threesticks Ð , Í , and â , with Ð longer than Í and Í longer thanâ , then Ð must be longer than â .We collect theseideasin a definition.

3.1.3 Definition. A relation ã on a set Ø is calleda partial order on Ø if andonly if for everyÐPÏFÍ�ÏFâ#ÓäØ the following threeconditionsare satisfied:

(i) Ð�ã*Ð ÌZå\æ�ç�æGè.é|êDæKÑ(ii) Ðäã`Í#ë�ì�í×Í6ã`ÐïîðÐ^ÉÚÍàÌrëKìeñ\é�ò�óõôeöYö1æ÷ñ5å\éùøÑ(iii) Ð�ã¡Ícë�ì�ídÍ!ã¡âúî Ð_ã`âïÌ�ñ5åGë�ì�óré|ñ\éùêDæÑ

The relationsdefinedin Example3.1.2 are all partial order relations. The relationof lessor equalgiven in Example3.1.2 (ii) is also called the natural order on û .

A set Ø togetherwith the partial order ã , i.e. the pair ÌZØcÏãüÑ , is calleda partially ordered set. IfÐWãBÍ in a partially orderedset, 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 easyto seethat the inverserelation Æ Ç�È , denotedbyý, is also a partial order on Ø . The inversepartial order relation

ýis also called the dual of ã and

gives rise to the following definition:

3.1.4 Definition. Thedual of a partially orderedset Ø is that partially orderedset Ø6þ definedby theinversepartial order relation on the sameelements.

Since ÌÿØ þ Ñ þ É¡Ø , this terminology is legitimate.

Note that Definition 3.1.3 doesnot imply that given ÐPÏFÍ�ÓcØ , theneither ÐcãbÍ or Í�ãbÐ ; that is,in a partially orderedsetnot everypair of elementsneedto be related.A partially orderedset in whicheverypair of elementsis relatedunderthe orderrelation is calleda totally (or linearly) orderedset. Theset û togetherwith the naturalorderof Õ is an exampleof a totally orderedset. On the otherhand,the

70

Page 79: Image Algebra by Ritter

relation of set inclusion (Example3.1.2(i)) is a partial order which is not a total order. An extremelyuseful specialcaseof a linear order is providedby the next example.

3.1.5 Example: Let � and � be totally ordered. Then the product set ����� can be totallyorderedas follows:

����� ����������������������������! #"$�%���'&(� � )+*-,.'����0/This order is called the lexicographicalorder on �1�2� as it is similar to the way wordsare arrangedin a dictionary. For example,supposethat 3 & �4�5� , where � &7698��;: ��<!=and � &>6#8���:���< ��?�=

(seealso Example2.3.1). If the integersin � and � are consideredorderedby the naturalorder of lessor equal,then 3 is totally orderedby the order relation��@A�CB��ED7�F@ � ��B � �

definedabove. Thus, if we renamethe elementsof 3 by GIH &J�F@���BK�ML 3 ,where N &O?���@QP�8+�RSB , then 3 &T6 GU � GWV �XYXZXQ� GWU�V = and G H D G$[ if andonly if N D�\ .

If we view the elements��@���B �

of 3 as the usual@th row and

Bth columnlocationof a matrix

array,thenthis orderis alsoknownasthecommonscanningorder of thematrix array 3 . Thiscorrespondsto the usualway a computerreads(scans)the entriesof a matrix; namely,rowby row from left to right, startingwith the top first row thenthe second,andso on, until thelast or bottom row is read.

If �1]T� , then �^�S�_]`�J�a� . Thus, if b is a binary relation on � , then bdc �Fe � ef� is abinary relationon � . We call the relation bdc �Fe � ef� the relation inducedby b on � . In particular,a binary relationon � inducesa definitebinary relationon everysubsetof � . For example,the naturalorder relation b &hg

on � &jiinducesthe naturalorder

gon the setof integers� &`k

.

Oneof themostfundamentalrelationsbetweenelementsof a setis thatof equivalence.Equivalencerelationsareusedin practicallyall fields of mathematics;they arisewheneverone desiresto regardallthosemembersof set that havesomepreassignedcharacteristicas a single entity.

3.1.6 Definition. A relation b ona set � is calledanequivalencerelation if it satisfiesthefollowingthree conditions:

(1)�lL � m � b�n �C"�oqp-osr!�ut#ov�

(2)� bxwym b�n ��zF{!|.|}o�~A"F���Z�

(3)� b�w )v*�,� b`�dm � b�� �C~�"s)v*-z��u~;�ut#oZ�

If b an equivalencerelation and� b�w , thenwe say that

�and

areequivalent.

3.1.7 Examples:

(i) Considerthe relation b of set inclusion(Example3.1.2(i)). For each �x] :v� , ��](� andif�T]�� and ��]�� , then �T]�� . Hence,the relation b & ] is both reflexiveandtransitive.On the other hand, �J]d� and ���& � m �^�]�� . Accordingly, ] is not symmetricandhencenot an equivalencerelation.

(ii) The diagonalrelation � of Example3.1.2(iii) is an equivalencerelation.

71

Page 80: Image Algebra by Ritter

(iii) Let �����4��� be a function and �y�`�#����q�!�����Q��������2�����9����� . Then � is an equivalencerelation on � .

If � is an equivalencerelation on � , then the equivalenceclassof any element  �¡¢� , denotedby £¤ �¥ , is the set

£¦  ¥�`�¨§'��§����0�ª©'¡¬«a�®­The collection of equivalenceclassesof � , denotedby � / � , is called the quotientset of � by� . Thus,

�°¯Y�J�`�!£±�9¥����²¡a«a�The quotientset � / � possessesthe following properties:

3.1.8 Theorem. Let � be an equivalencerelation on � . Then

(1) For every  l¡O�a�³ `¡d£¦  ¥(2) £¦ �¥E�4£´§#¥Sµ   �a©(3) £´ �¥®¶�·£¦§�¥(µ £´ �¥¸¹£¤§�¥º�¼»Proof: (1) Since � is reflexive,we have  ���� and,hence, ¹¡�£¦  ¥ .(2) Suppose£¤  ¥��½£´§�¥ . By part (1),  �¡`£´ �¥��½£´§#¥ . Thus,  ��a© . To prove the converse,let¾ ¡5£¤§�¥ . Then ¾ �a© . By symmetry,§��¬¿ . We now have §���¿ and,by hypothesis,  �a© . Hence,by transitivity,  ���¿ . Again, by symmetry, ¾ ��� and, therefore, ¾ ¡T£¤  ¥ , which showsthat£¤  ¥WÀ`£´§#¥ . Arguing in a similar fashion,we canshowthat £¦§�¥WÀx£´ �¥ and,hence,£´ �¥��£¦§�¥ .(3) Supposethe conclusionis false, i.e. £´ �¥Q¸�£¤§�¥®¶�½» . Then Á ¾ ¡Â� with ¾ ¡�£¤  ¥0¸¹£¤§�¥ .Hence, ¾ ��� and ¾ �a© . By symmetry,  ���¿ . Since   ��¿ and ¾ �a© , we haveby transitivitythat ¾ �a© . It now follows from part (2) that £´ �¥$�7£¦§#¥ which contradictsthe hypothesis.Theconverseargumentis just as easy.

Q.E.D.

A collection �¨ÃºÄK� ÄZÅ¨Æ of subsetsof � is called a partition of � if the following conditionsaresatisfied: �sÇv��ÈÄ+Å¨Æ Ã Ä �O�hÉ+Ê-Ë

�FÌ!�WÃ Ä ¸³Ã�Í.�`»`ΪÏ-ÐÑÊ�ÐYÒ#ÐqÓ�Ô2¶��Õy��Ô��Õ¬¡×ÖØ� ­The following fundamentaltheoremof equivalencerelationsis a consequenceof Theorem3.1.8:

3.1.9 Theorem: If � is an equivalencerelation on � , then �°¯ÑÙ is a partition of � .

Proof: Obviously, ÚÛ ÅvÜ £¤  ¥�À�� . If §2¡Â� , then by Theorem3.1.8(1) §2¡l£¤§�¥�À ÚÛ ÅvÜ £¤  ¥ .Hence,�·À ÚÛ Å¨Ü £¦ �¥ . The remainderof the proof follows immediatelyfrom Theorem3.1.8(3).

Q.E.D.

Eachelement§ of anequivalenceclass £¤  ¥ (i.e., each §'¡2£¦  ¥ ) is calleda representativeof £´ �¥ . Notethat if § is a representativeof £¦ �¥ , then £¤§�¥º��£¤  ¥ .

72

Page 81: Image Algebra by Ritter

3.1.10 Examples:

(i) Two integersaresaid to havethe sameparity if eitherboth areevenor both areodd. Therelation “has the sameparity as” on Ý is an equivalencerelation and partitions Ý into twoequivalenceclasses.In particular, if ÞOßOÝ , thenà¤á Þ-âäã`å¨æ×߬Ýaç�èEé�ê�ëZì#ëqíQî(ï+í0ð à¤á Þ.ñ(òÑâQã`å¨æ×߬Ý5ç�èóéCê$ô�ð�ðõîClearly,

à¤á Þ�âQö à¤á Þ}ñ(òÑâ�ã7Ý�ïví-ð à¤á Þ�âQ÷ à¤á�ø ñ(òqâ�ã7ù .

(ii) Eachequivalenceclassresultingfrom therelation ú of Example3.1.2(iii) containsexactlyone element.

(iii) In Example3.1.7(iii), the equivalenceclassesare the sets û+üäý-þZÿ�����ç��'߬üäÿ����� .3.1.11 Definition. For arbitrary integers��sÞ and , we saythat is congruentto modulo Þ (or is congruentto �����EÞ ), andwrite ��� ÿ����� Þ�� , if the difference��� is an integral

multiple of Þ ; that is, if ^ã ÞQæ.ñ� for someinteger æ .It is easily verified that congruencemodulo Þ , i.e. the set ÿ�Þ��ªãTå#ÿ���� ���ç��� ªÿ!����ºÞ���î , is an

equivalencerelationon Ý . For therelationof congruencemodulo Þ is obviouslyreflexiveandsymmetric.The transitivity also follows easily: If ã ÞQæ'ñ� and �ãJÞ#".ñ�$ for someintegers æ and " , then_ã½Þäÿ�æ®ñ%"&� ñ�$ , so that '�($�ÿ�����ºÞ)� .

If * ã`ÿ ø � denotesthe relation on Ý definedby “ is congruentto �����¬Þ ”, then the quotientÝ)+�ÿ�Þ�� is called the set of integersmod n.

3.1.12 Example: Let * ã`ÿ�,#� be the relation on Ý definedby -�( �ÿ�����.,/� . Then there areexactly five distinct equivalenceclassesin Ý)+�ÿ�,/� :0.1 ã`å3242526�4�Eò879�5�:,���7���,9�Yò479�526242´îEã<;4;5;�ã à �Iò57Zâ0ã à �:,vâ0ã à 7vâQã à ,vâQã à ò47vâ0ã=;5;5;0 þ ã`å3242526�4�?>9�5�A@&�Yò��!B9�Yò�ò��526242´îEã<;5;4;#ã à �:>Zâõã à �.@vâ0ã à òqâQã à B+â0ã à ò#òÑâ0ãC;5;5;0:D ã`å3242526�4�?E9�5�?F�� á ��G3�Yò á �526242´îEã<;5;4;#ã à �:EZâõã à �:FZâ0ã à¦á âQã à GZâ0ã à ò á â0ãC;5;5;0.H ã`å3242526�4��G#�5� á �IF��JE9�Zò5F9�624252 îEã<;5;4;#ã à �KGqâõã à � á â0ã à FvâQã à E+â0ã à ò5F+â0ãC;5;5;0.L ã`å3242526�4�MB��5�EòN�O@&�J>9�Zò8@P�624252 îEã<;5;4;#ã à �:BZâõã à �Iòsâ0ã à @#âQã à >+â0ã à ò8@�â0ãC;5;5;Observethateachinteger is uniquelyexpressiblein the form ã�,#Þ ñ% , where 7RQS RT�,and ®ß 0:U is the remainder.Clearly, Ýaã

LVWYX 1[Z�\ and0 W ÷ 0A] ãTù whenever:_ã`" .

In Example3.1.10(i), thereareexactlytwo equivalentclasses,the setof evenintegersandthesetofodd integers,and 7 and ò arerepresentativesof theseclasses.Although

áand F arealsorepresentatives

of theseclasses,it is customaryto let 7 and ò representtheseclasses;i.e., to identify the set Ý D ã`å�79�YòZîwith the set Ý)+�ÿ á � ã¼å à¦á ÞQâa� à¦á Þ���òqâCî by identifying 7 with

à´á Þ�â and ò withà¦á Þ'ñ�òqâ . In general,it

is customaryto let Ý[baã7å�79�Yò�� á �625242J�sÞc��òvî denotethe set Ý)+�ÿ�Þ�� as thesetwo setsare in one-to-onecorrespondenceunder the function ^ed à ^CâºßOÝ)+�ÿ�Þ�� .

It is easyto showthat for any given æ°ß¬Ýgf , the set Ý)+ih á�j5kKl Ý D!m is in one-to-onecorrespondence

with thesetjnoqpgr9sgt.uwv!sgt4xIy (we leaveit to thereaderto convincehimselfof this fact). Thus,theelements

73

Page 82: Image Algebra by Ritter

of z�{}| canbeuniquelyidentifiedwith theelementsof ~��q�g�&���9�8��� ; i.e. with binarynumbersof fixed length�. This correspondsto the usualrepresentationof digital imagevaluesin digital imageprocessingby

computers(Section2.18).

3.1.13 Example: The set of integersmod 8 consistsof eight equivalenceclasses;namely z {�����3���5���5���8����� �����5� �����5� �����5�����a�5� �����5���5��� . 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)providesfora uniqueone-to-onecorrespondencebetweenz { � and �����5�4�������9�5�4�������9�5�4� �=� z {5�a� .

A binary operationis a relation betweensetswhich providesa rule for combining two arbitraryelementsof one or two sets. The precisedefinition is as follows:

3.1.14 Definition. Let   , ¡ , and ¢ be three(not necessarilydistinct) sets.A binary operation £betweenX and ¡ with resultantin ¢ is a function £ ¤?  � ¡¦¥§¢ . If   � ¡ � ¢ , then£ is simply called a binary operationon   .

The evaluation£ ��¨ �© � is commonlydenotedby ¨ £ © andis calledthe resultantof the operation.Thus,if ��¨ �J© �Aª   � ¡ , then ¨ £ © ��« ª ¢ . Binary operationsbetweensetsplay an importantrole inimageprocessing.In this chapter,however,we will dealmostly with binary operationson a set.

Addition, multiplication, and division are examplesof binary operationson ¬®­ . Addition andmultiplication are also binary operationson ¬ . Due to the fact that for any pair of numbersof form��¯ �� � , ¯�° � is undefined,division is not a binary operationon ¬ . However, it is a binary operationon¬²± ���#� .

Somebinaryoperationsmaysatisfyspecialproperties.Commutativityandassociativityarethemostimportantof thesespecialproperties.A binary operation £ on a set   is calledcommutativewhenever¨ £ © � © £ ¨C³�¨ �J© ª   , andassociativewhenever�!¨ £ © � £ «´��¨ £ � © £ « � ³µ¨ �©P� « ª   .

3.1.15 Example: Addition andmultiplicationarecommutativeandassociativebinary operationson¬ . Division is not commutativeon ¬¶­ . Defining £ on ¬ by

· £(¸ � ·º¹ � ¸ ³ · � ¸ ª ¬then � · £(¸ � £ � �w� ·»¹ � ¸ � £ � �w� ·º¹ � ¸ � ¹ � �and · £ � ¸c£ � � � · £ � ¸ ¹ � � � � ·�¹ � � ¸ ¹ � � � � ·º¹ � ¸ ¹ � �[¼Thus,the operation£ is not associative.Furthermore,£ is not commutativesince · £½¸ �·�¹ � ¸º¾� ¸ ¹ � · � ¸¿£ · .

A set   is said to havean identity elementwith respectto a binary operation £ on   if thereexists an element À ª   with the property

¨ £(À � ÀA£ ¨��Á¨§³µ¨ ª   ¼

74

Page 83: Image Algebra by Ritter

Theidentity elementof  with respectto additionis 0 since öÄÆÅ�Ç�Å.Ä�ÃKÇ�ÅÉȵſÊ% ; theidentityelementof Â®Ë with respectto multiplication is 1 since Å�Ì4Í:ÇÎÍ®ÌÅ�ÇÁÅ=ȵſÊ%Â®Ë . Observethat Â®Ë hasno identity elementwith respectto addition. The next theoremshowsthat identity elementsareunique.

3.1.16 Theorem. An identity element,if oneexists,of a set Ï with respectto a binary operationÐon Ï is unique.

Proof: Assumethe contrary;that is, assumeÑ5Ò and Ñ4Ó are two distinct identity elementsofÏ . Then Ñ Ò Ð Ñ Ó Ç<Ñ Ó since Ñ Ò is an identity element.Similarly, Ñ Ó Ð Ñ Ò ÇCÑ Ò . Therefore,Ñ Ò ÇCÑ Ò Ð Ñ Ó ÇCÑ Ó , which contradictsthe fact that Ñ Ò and Ñ Ó aredistinct.

Q.E.D.

If a set Ï hasan identity elemente with respectto a binary operationÐ

, thenanelementÔÕÊ�Ï iscalledan inverseof Å�Ê�Ï providedthat Å Ð Ô´Ç�Ô Ð Å�ÇÁÑ . The inversewith respectto addition(alsocalledadditiveinverse) of Å�Ê� is ÖMÅ since Å´ÄS×JÖ:Å[Ø�Çwà . The inversewith respectto multiplication(also called multiplicative inverse) of ÅwÊwÂÚÙ�Û�Ã#Ü is Å�Ý Ò since Å%Ì#Å[Ý Ò ÇÞÍ . Note that the set of allß´à�ß squarematricesundermatrix multiplicationhasa multiplicative identity, namelythe ßRàáß identitymatrix. However,not every ßâà�ß matrix hasa multiplicative inverse.

The proof of the next theoremis similar to the proof of Theorem3.1.16and is left as an exercisefor the reader.

3.1.17 Theorem. LetÐ

bea binary operationon set Ï . Theinversewith respecttoÐ

of Å�Ê¿Ï ,if it exists,is unique.

Although not every binary operationon a set Ï providesfor inverseelements,many operationsprovide for elementsthat behavealmost like inverses. Obviously, if Ô is the inverseof ÅÁÊ�Ï withrespectto the operation

Ð, then Å Ð Ô Ð Å�ÇwÑ Ð Å¿Ç<Å and Ô Ð Å Ð ÔcÇ<Ñ Ð ÔcÇ<Ô . Any elementÔ satisfying the two conditions

Å Ð Ô Ð ÅcÇwÅáã�äPåcÔ Ð Å Ð ÔRÇ�Ô (3.1.0)

is calleda pseudoinverseof Å�Ê�Ï . Thus,every inverseis a pseudoinverse.However,in Section4.4we shall seethat the conversedoesnot necessarilyhold.

SupposeÏ is a set with two binary operationsÐ

andÐ�æ

. The operationÐ

is said to be leftdistributive with respectto

Ð æif

Å Ðèç Ô Ð æ�é�ê Çw×�Å Ð Ô�Ø Ð æ ×�Å Ð é Ø�ȵÅ�ëJÔ&ë é Ê�Ï�ì (3.1.1)

and right distributive if ç Ô Ð æ é ê Ð Å�Çw×�Ô Ð ÅíØ Ð æ × é Ð ÅíØ�ȵÅ�ëJÔ&ë é Ê�Ï�ì (3.1.2)

When both 3.1.1 and 3.1.2 hold, we simply say thatÐ

is distributive with respecttoÐ æ

. Notethat the right membersof 3.1.1 and 3.1.2 are equal whenever

Ðis commutative. Obviously, on  ,

multiplication is distributive with respectto addition. However,division on Â¶Ë is not left distributiveover addition. That is, ×�ÔKÄ é Ø6î�Å�ÇC×�Ô�î�Å[ØïÄ�× é î�Å[Ø but ÅíîN×�﵀ é Ø�ðǺ×�Å[î�Ô�Ø�ÄÁ×�Åíî é Ø .

75

Page 84: Image Algebra by Ritter

3.2 Groups and Semigroups

We beginour shortsurveyof algebraicstructuresby listing characteristicfeaturesof specialabstractalgebraicsystemsthat are important in the study of imagealgebra.

3.2.1 Definition. A groupoid is any set ñ togetherwith a binary operationon ñ . A groupoidwhosebinary operationis associativeis called a semigroup.

To becompletelyprecisein denotingasemigroup,weshouldusesomesymbolismsuchas ò�ñ�óô�óõ�ö ,whichspecifiesthesetof elements,thebinaryrelation,andtheequalityrelationusedto specifytheequalityof elements,e.g., ÷Rôøò�ù�ôûú#öAõ<ò!÷Rô(ù�ögôûú . However,it is customaryto useeither the pair òañ�ó8ô`öor simply the letterdesignationof the setof elements,in this caseñ , asa designationof thegroupoidorsemigroup,providedthereis no dangerof confusionasto thenotationbeingusedfor binarycomposition.Also, algebraistsasa rule do not usea specialsymbol “ ô ” to denotea binary operationdifferent fromtheusualadditionandmultiplication. Theystick with theconventionaladditiveor multiplicativenotationandevencall theseoperationsadditionor multiplication, dependingon thesymbolused.Thesymbolforadditionis of course“+”, andfor multiplication “ ü ”. Thus,in placeof the notation“ ÷�ô¦ù ”, we shall beusingeither“ ÷�ýþù ” or “ ÷�ü6ù ”. Thereis alsoa sort of gentlemen’sagreementthat the symbol“0” is usedto denotean additive identity and the symbol “1” to denotea multiplicative identity, eventhoughtheymay not be actuallydenotingthe integers0 and1. Of course,if a personis alsotalking aboutnumbersat the sametime, othersymbolsareusedto denotetheseidentitiesin order to avoid confusion.

To the uninitiated,semigroupsmay seemtoo poor in propertiesto be of much interest. However,the set of all ÿ���ÿ squarematricesundermatrix multiplication forms a semigroup.Anyone who hashadexperiencewith matrix theory is well awarethat this system,far from being too poor in propertiesto be of interest,is, indeed,extremelyrich in properties.Researchinto the fascinatingramificationsofmatrix theory hasprovidedthe stimulus to a greatdeal of mathematicaldevelopmentand is an activeand growing branchof mathematics.

The setof ÿ���ÿ squarematricesundermatrix multiplication hasthe additionalpropertyof havinga multiplicative identity. This leadsus to the next definition:

3.2.2 Definition. A monoid is a semigroupwith identity.

3.2.3 Examples:

(i) Let�

be a set and ñ õ�� � . Then ñ togetherwith the operationof union is a monoid. Bythe laws of setoperations(2.2.1), union is an associativeoperationwith identity � .

(ii) The set of positive integers � togetherwith the operation+ is not a monoid. There is noidentity for + in � . However, ò�� ó8ýeö is a semigroup.

(iii) The system ò�� ó5ü�ö is a monoid with identity the integer1.

Of the variouspossiblealgebraicsystemshavinga singleassociativeoperation,the type known asagroup hasbeenby far the mostextensivelystudied.Also, the theoryof groupsis oneof the oldestpartsof abstractalgebra,as well as one particularly rich in applications.

76

Page 85: Image Algebra by Ritter

3.2.4 Definition. A group is a monoidwith the propertythat eachelementhasan inverse.

It is customaryto denotethe inverseof an element in a group � by “ ���� ” if multiplicativenotation is used,and by “ �� ” if additive notation is used.

Recallingthe definition of a monoid,we may definea groupalternativelyasa set � togetherwitha binary operation,say �������� , such that :

����� �! #"%$'&("*),+.-�/0$'12�3/546+74�48$:9;/5+<-�/�='"7�>/�?@"'?A�CBD C�,E(�8FHGI�J�6 K����EL�*F:�6MN�O P�*EQ�R�.F%?�OST� �! #"U)�"V/W4X+<1Y/5ZT"[1T-8/\-�]Y"_^\"[`K"U1a-b�LGc�d4�e(9� P-� f+<->BD gGI�J�6 K�'��Mh�%�* cMi L?�OjT� BD IGI�J�!kl+<1Y/\1T='"[)_4�"m"_^0"[`H"[1T-3 �f� GI�n4�ef9; o-; f+�-6 K�* �f� Mi �f� �. PMp�3?

If in addition to thesethree propertiesthe operationis commutative,then the group � is calledan abelian group.

3.2.5 Examples:

(i) The set q with the operation+ is not a group. Thereis an identity element0, but no inversesfor integersgreaterthan 0.

(ii) The set of integers r with the operation+ is a group. This group is abelian.

(iii) On rXs we definea binary operation(which we shall againwrite as+, althoughit is certainlynot ordinaryaddition)by t uTvTwxtzyTv�M{t uLw|yQv . Here u and y areany elementsof the respectivesets t uTv and t}yTv of r~s , andthesum u%w�y is theordinarysumof u and y . In orderto showthatwe actuallyhavedefinedanoperation,i.e., that the function(operation)�_t uTvW�Ut@y:vW�6��t uTv[w|t@y:v iswell-defined, we mustshowthat the imageelementof the pair �_t uTvO�*t y:vW� is uniquelydeterminedby t uTv and tzy:v alone,and doesnot dependin any way upon the representativeelementsu oft uTv and y of tzy:v which we happento choose. So, supposethat � and h � are also arbitraryelementsof the sets t uTv and t}yTv , respectively.We then havethat

�~M�u�w��a��+<1fZ2�cMiy�w��[�for someintegers � and � . But then

�Rw|�IMN�0uLw|�T�X�Rw��OyYw|�[�C�6MN�0u�w�y��wx����w|�.���by virtue of the associativityandcommutativityof addition,andthe distributivity of multipli-cationoveradditionfor theintegers.Thus,we havethat t}��w|�(v�M�t u�w|yTv , andour operationiswell-defined,independentof thechoiceof representativesof therespectiveequivalenceclasses.That this operationof additionmodulo � is associativefollows from the associativityof ordi-nary integeraddition. The identity elementis [0] andthe inverseof tzy:v is tA��y7v (we leavetheverificationof thesetwo factsto the reader).Thus, rXs with this operationof additionforms agroup. It also follows from the commutativityof additionof ordinary integersthat the groupr~s is abelian. This group is known as the group of integersmodulo � .

An important property inherent to all groups is the cancellationlaw provided by the followingtheorem:

77

Page 86: Image Algebra by Ritter

3.2.6 Theorem. If � is a group with binary operation � , then the left and right cancellationlawholdsin � , that is, �H�*�H�i�K�*� implies �H�i� , and ���*�P�N���*� implies �K��� , �D��_�f�_�Y�I�

Proof: Suppose�K�*�����P�*� . Then,multiplying by �R�f� , the inverseof � , we obtain

� �f� �<�O�o�*�Q���i� �f� �.���K�*�:���By the associativelaw,

  � �Q� �*�(¡%�*�H�   � �f� �[�(¡b�[�%�By definition of an inverse, � �f� �����£¢ and, hence,

¢%�.�Y��¢%�.�#�V¤.¥�¦Y§a¨K¦Q©_ªf¥#«A¬�«\­7¥K­�®�«5¦T©U¥a¬8«\¬�¨��¯�Y�N�%�Similarly, from �H�'���2�K��� one can deducethat �J�°� .

Q.E.D.

Note that we had to usethe definition of a group in order to prove this theorem.

A commonactivity amongscientistsandengineersis to solveproblems.Often theseproblemsleadto equationsinvolving someunknownnumberor quantity � which is to be determined.The simplestequationsare the linear onesof the forms ±Y²i�³��´ for the operationof addition, and ±K�'�³��´ formultiplication. Equationsof form ±��W�P�i´ arein generalnot solvablein themonoid ��µ¶3�*�}� . For instance,· �����2¸ hasa solution ���¹¸:º · , which is not an integer. However,equationsof form ±H�'���2´ arealwayssolvablein the structure �O» ¶ �*�}� . The reasonfor this is that the structure �O» ¶ �*�}� is a group. Asthe next theoremshows,the propertiesnecessaryto solve linear equationswithin a systemarepreciselythe propertiesof a group.

3.2.7 Theorem. If � is a groupwith binary operation � , andif ± and ´ are elementsof � , thenthelinear equations±Y�¼�½�{´ and �Y��±g�p´ haveuniquesolutionsin � .

Proof: Note that

±��   ± �Q� �*´[¡��   ±Y�*± �f� ¡%�*´�����¤'¾�¾�­#¿;«5¤<¬�«�À'©!ÁW¤[Â���â%�*´��   ¦T©_ªf¥:«\¬�«0­'¥Y­<®V± �f� ¡�n´�� �WÄfÅ;­'Ä(©[Å�¬�¨l­�®b¢<�,�

Thus, ���¹± �f� �'´ is a solution of ±Y�'���2´ . In a similar fashion, �J�2´%�'± �f� is a solutionof �I�#±��Æ´ .

To show that � is unique,supposethat �Y��±c��´ and � � �.±I�{´ . Then �K�*±c�p� � �.± , andbyTheorem3.2.6, �g�2� � . The uniquenessof � follows similarly.

Q.E.D.

It is importantto notethat �c�i± �f� ��´ and �Ç��´~��± �f� neednot be the sameunless� is commutative.

78

Page 87: Image Algebra by Ritter

Following commonmathematicalconvention,to indicatethe compositeof an elementÈ of a groupwith itself É times,where É is a positiveinteger,we shallwrite ÈQÊPËiÈ6Ì0È3Ì�Í.Í*ÍWÌ0È (n factorsof È ) wheneverwe usemultiplicativenotation,or, whenusingadditivenotation, É�ÈgËiÈ3ÎoÈ3ÎÏÍ*Í.ÍWÎoÈ (n summandsof È ).

Similarly, if É is any positive integer, È�Ð Ê Ë£Ñ�ÈRÐ(Ò[Ó Ê and ÔbÉ�ÈgËpÉCÕ,Ô�È(Ö , where Ô�È is, of course,the inverseof È in theadditivenotation.Still following customarynotation, È#×�Ë�Ø and Ù!Ì�ÈcËiÙ , where1 and0 representthe identity elementin the multiplicative andadditivenotations,respectively.

The usual rules of power follow at once:

È Ê Ì*È#ÚÛËiÈ Ê¼Ü ÚlÝÕ�È Ê Ö Ú ËNÈ Ê ÚLÝ

É�ÈKÎ�ÞIÈPË�ÕOÉPÎ�ÞgÖOÈLÝÉCÕ�ÞIÈRÖXË�ÕOÉ�Þ�Ö�ÈDß

In particular, it follows that ÑOÈ ÐfÒ Ó ÐfÒ Ë£È .

3.2.8 Definition. A group ÕWàJÝ*Ì}Ö is called cyclic if for some á�â½à , every È�â½à is of the formȽËNá Ê , where É�â�ã . The elementá is called a generatorof à .

Clearly, every cyclic group is abelian.

3.2.9 Examples:

(i) Let à Ënä[å × Ý8å Ò Ý*Í*Í.Í,Ý8åCæ.ç , where

åXè�Ëié[ê�ë�ì7í�îï Î|ðÌ*ë.ð�ÉVì'íCîï Ëiñ*ò è;ó�ôAõOö Ý î ËiÙ#Ý.Ø'Ý*Í.Í�Í[Ý,÷Nø<ùfúxð~Ëiû Ô�Ø>ßThus, à is the setof solutionsof the equationü ö Ë�Ø , where üKâÏý . Each å è is calleda sixthroot of unity. à togetherwith the operationof complexmultiplication is a cyclic groupwithgeneratorså Ò and å æ . For example,å>þPË�å þÒ and å>þK˹å òæ .

(ii) Õ�ã¯Ý[Î�Ö is cyclic with generator1, sincein theadditivenotationwe havefor every ÉJâÏã¯ÝKÉgËÉIÌTØ . Note that Ô�Ø is alsoa generatorfor this groupsinceany integer î canbe expressedas

î ËdɽÌ#Õ�Ô�Ø�Ö , where ÉhËÿÔ î .(iii) Thegroupof integersmodulo É is cyclic with generator[1], sincefor any � î � âÏã�� , � î � Ë î � Ø � .3.3 Permutations

3.3.1 Definition. A permutationof a set à is a function from à to à which is both one-to-oneand onto.

Supposeà is a finite set of É elements,say à Ë äaØ7Ý ì Ý*Í�Í.Í[Ý,ÉRç , and � a permutationof à . Nosignificanceis to be given to the fact that à consistsof the first É naturalnumbers,it is only a matterof notationalconvenience.It is customaryto usethe notation�KË � Ø ì � Ì.Ì*Ì É

È Ò È ò È�� Ì.Ì*ÌnÈ Ê79

Page 88: Image Algebra by Ritter

� �� ��� ��� ��� ��� ����� �� ��� ��� ��� ��� ������ ��� ��� �� ��� ��� ���� � � � � � � � � � � � �� � � � � � � � � � � � �� � � � � � � � � � � � �� � � � � � � � � � � � � Figure 3.3.1 Productsof permutations.

to describethe permutation� , where ����� ������� for � �! �"$#%#$#&"(' .

Consider,for example,the casewhere ) consistsof threeelements,say )*�,+� -"�./"�0�1 . In this casewe have the following six possiblepermutations:�� �32 . 0 . 054 " ��� �62 . 0 0 .54 "��� �32 . 0. 0 4 " ��� �62 . 00 . 4 "� � � 2 . 00 . 4 " � � � 2 . 0. 0 487The inverseof a permutationis simply the reversemapping. For example,��9 � �62 . 0 . 0:4 �32 . 00 .54 � � � 7Thus, � 9 � � . � �; -" � 9 � � 0 � �<. , and so forth. Similarly,�=9 � � 2 . 0 0 . 4 � ��� "�=9 � �62 . 0. 0 4 � ��� "etc. A productof two permutationsis simply the compositionof the two permutationfunctions. Sincethe compositionof two one-to-oneandonto functionsis againa one-to-oneandonto function (Theorem2.5.12), the productof two permutationsis againa permutation.For example,���>�?���A@B���DCE��� � 2 . 00 . 4 � 2 . 0 0 . 4 � 2 . 00 . 4 � ��� 7

The productdefineshow two elementspermuteor interchangeby repeatedapplicationof permu-tations. For instance, �F� � �?� � �&� � � �G� � CE� � �H� � � � � �F� � � �&� � � � � � �I0 , while �G� � �?� � �J� 0 � ����$�K���$� 0 �H� � ���L� . � �! . The set of all possibleproductsis given by the multiplication table in Figure3.3.1.

It follows from the multiplication table that the set of all permutationson ) togetherwith theoperationof permutationmultiplication is a groupwith identity �� . Note that this group is not abelian

80

Page 89: Image Algebra by Ritter

MGN�O�P$N�QSRTN�UWVRTN�XSRTN�QAP%N�O$Y. It is the smallestpossibleexampleof a nonabeliangroup as any group

with fewer than six elementsmust be abelian[16].

3Z

1 2[

Figure 3.3.2 Symmetriesof an equilateraltriangle.

There is a natural correspondencebetweenthe elementsof this group and the symmetriesof theequilateraltriangleshownin Figure3.3.2. The permutations\-] for ^:_a`�b&c�b&d , representthe rotationsofthetriangleontoitself aboutits barycenter,with \�e representingthe“no move” rotation. Thepermutations\�] , for ^f_,ghb&i�b&j , representthe mirror imagesacrossthe bisectorsof the angles.Thesesymmetriesarealsonicely reflectedin the four quadrantsof the multiplication table (Fig. 3.3.1).

We now show that the collection of all permutationsof any nonemptyset k forms a group underpermutationmultiplication.

3.3.2 Theorem. Let k be a nonemptyset,and let lhm be the collectionof all permutationsof k .Then l m is a group underpermutationmultiplication.

Proof: We havethreeaxiomsto check. Sincepermutationsare functions,in order to showfor permutations\nbSo , and p that q \sr$o�tur$pW_v\Sr q owr$p=thbwe haveto showthat eachcompositefunction mapseach xzy{k onto the sameimagein k .That is, we must show that| q \sr$o�tur$p�} q x~tE_ | \sr q owr$p=tG} q xntw��x{ywk��We have| q \�r$o�tur$p�} q x~tE_ q \sr%o5t q p q x~t&tE_v\ q o q p q x~tJt&tE_v\ qJq owr$p=t q xntHtf_ | \Sr q owr?p~tF} q x~t/�Thus,

q \Sr$o5t:r�p and \�r q owr$p=t map each x�y�k into the sameelementin k . This satisfiesthe associativityaxiom for groups.

Obviously,theidentity function ` m actsasthemultiplicativeidentity. This satisfiesthesecondgroup axiom.

As we remarkedearlier,the inverseof a permutation\ is simply definedto be thepermutationwhich reversesthe direction of the function \ . More precisely,since \ is one-to-oneand

81

Page 90: Image Algebra by Ritter

onto, each �a��� is the image of someunique ����� and we simply define, for each�!��� , ���n�%�G���8��� such that �=���~����� . It follows from this definition of �=�/� that���-�h�h�����=�h�s�-�a���(� . This proves the existenceof inverses,which satisfiesthe thirdgroup axiom.

Q.E.D.

Groupsof permutationsplay an important role in geometry. For example,considerthe set of alltranslationsof the coordinateplane �:� , that is, mappings�� A�f��¡¢�:� , definedby�=�G�¤£¥�/�:��¦G�/§¨£(�-§ª©�£:«­¬�®?¯&®A�/§°�±�S²�³-£E�-§h�,�´²¶µ¤·Here ³ and µ aresomefixed realnumbersand ���¸£¥������ � is arbitrary. Thereadershouldverify thatsucha mapping � is a permutationof �:� . It is alsoeasyto verify that the setof all translationsof this typeformsa groupunderthe operationof permutationmultiplication. Thereaderwill no doubtthink of manyothergroupsof permutationsof theplane,or �5¹ , which areof geometricinterest.Indeed,oneof themostfamousapproachesto geometry,known as the “ErlangerProgramm,” is by meansof the determinationof the geometricpropertieswhich remaininvariantundera particulargroupof transformations[15].

There is nothing in our definition of a permutationthat requiresthe set � to be finite. Our lastexamplewith �*�º� � is a casein point. However,mostof our examplesof permutationgroupswill beconcernedwith permutationsof finite sets.Clearly, if � and » both havethe samenumberof elements,then the group of all permutationsof � hasthe samestructureas the group of all permutationsof » ;i.e., one group can be obtainedfrom the other by just renamingthe elements.This is the conceptofisomorphicstructuresof which more will be said in Section3.4.

3.3.3 Definition. If � is the finite set ¼��-£�½/£?¾$¾$¾(£¥¿¸À , then the group of all permutationsof � iscalled the symmetricgroup on ¿ letters, and is denotedby Á ¹ .

Note that Á ¹ has ¿: elements,where ¿5Â5�ÿ¸�J¿ÅÄB�L�&�G¿wÄ�½-�n�$�$�H�GÆ��H��½��J�(�L� .Thereis anotherstandardnotationfor a permutationwhich is often used.The permutation� � �6Ç � ½ ƽ Æ �¤È

of the set ����¼���£¥½�£(ÆLÀ can be written in cyclic notationas � � ���(��£¥½/£¥ÆL� , where the É?��É?ÊÌËÍ�¥�-£¥½�£¥ÆÍ� isinterpretedto mean:1 is replacedby 2, 2 is replacedby 3, and3 is replacedby 1. The permutation��Î�� Ç � ½ ÆÆ ½ � Ècan be written as (1,3), where the cycle (1,3) is interpretedas: 1 is replacedby 3, 3 by 1, and themissing symbol 2 remainsunchanged.

Not every permutationcan be written as a cycle. Considerthe permutation��� Ç � ½ Æ Ï Ð� Æ ½ Ð Ï Èon the set �Ñ�!¼��-£¥½�£¥Æ/£FÏh£¥Ð-À . There is no consistentway of writing � as a cycle. However,we canwrite � as (2,3)(4,5). The interpretationis clear: 1 is unchanged;2 is replacedby 3 and 3 is replaced

82

Page 91: Image Algebra by Ritter

by 2; 4 is replacedby 5 and 5 by 4. Note that Ò correspondsto the productof the two permutationsÓ�Ô�Õ�Ö�×&Ø�Ù and Ú Ô!ÕGÛh×&Ü�Ù on Ý . For this reasonwe call (2,3)(4,5) the productof cycles. Thesetwocyclesarealsodisjoint, i.e., they haveno symbol in common. Thus, in cyclic notationwe shall expecta permutationon Þ symbolsto consistof a singlecycle or the productof two or moremutually disjointcycles. This fact is expressedby the next theorem.

3.3.4 Theorem. EverypermutationÒ on a finite set Ý is a productof disjoint cycles.

Proof: We assume,without lossof generality,that Ý Ô,ß�à�×(Ö�×ná$á$án× Þnâ . Considertheelementsà�× Ò Õ&àLÙ(× Ò�ã Õ(àLÙ(× Ò�ä Õ(àLÙ&×$á$á%áSince Ý is finite, theseelementscannotall be distinct. Let Ò�å Õ¥àÍÙ be the first term in thesequencewhich has appearedpreviously. Then Ò�å Õ(àLÙ�Ô à , for if Ò�å Õ(àLÙ�Ô ÒLæ Õ(àLÙ , withç8èêéBè!ë

, we would have Ò å(ì�æ Õ¥àÍÙ�Ô¢à , withëîí�éBè!ë

, contradictingour choice ofë.

Let Úhï Ôñð�à�× Ò Õ&àLÙ&× Ò ã Õ(àLÙ&× Ò ä Õ¥àÍÙ&×òá%á$á&× Ò å?ì ï Õ¥àÍÙ¨ó�ôIt is easyto seethat Ú ï hasthe sameeffect as Ò on all elementsof Ý appearingin this cyclicnotation for Ú ï .Let õ be the first elementof Ý not appearingin this cyclic notation for Ú ï . Repeatingtheaboveargumentwith 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 eachcycle could be constructedby repeatedapplicationof the permutationÒ startingat m.

Continuing,we pick the first elementin Ý not appearingin the cyclic notationsof either Úhïor Ú ã andconstructÚ ä , etc. Since Ý is finite, this processmust terminatewith some Ú�÷ . Theproduct Ú ïùø Ú ã ø á$á%á ø Ú�÷thenclearly hasthe sameeffect on eachelementof Ý as Ò does.Therefore,Ò Ô Ú ïø Ú ã ø á$á%á ø Ú�÷ ô

Q.E.D.

The readercan easily convincehimself that the representationof a permutationas a product ofdisjoint cycles,noneof which is the identity permutation,is uniqueup to the ordersof the factors.

A cycleof length2 is calleda transposition. Thus,a transpositionleavesall but two elementsfixed,and mapseachof theseonto the other. A computationshowsthatÕ&à�×¥Ö/×¥Ø�×&Û=×GÜ�Ù:Ô,Õ(à�×¥Ö-Ù ø Õ(à�×¥Ø-Ù ø Õ¥à-×&Û�Ù ø Õ¥à-×¥Ü-Ùand, in general, Õ�ú ï ×¥ú ã ×$á$á&á%×¥úLû=Ù:Ô,ÕJú ï ×¥ú ã Ù ø Õ�ú ï ×¥ú ä Ù ø á%á$á ø ÕGú ï ×¥ú-û�ÙhôTherefore,any cycle is a productof transpositions.We havethe following corollary of Theorem3.3.4.

83

Page 92: Image Algebra by Ritter

3.3.5 Corollary. Anypermutationof a finitesetof at leasttwoelementsis a productof transpositions.

The cycle (1,3,5) can be written as the following productof transpositions:ü(ý�þ(ÿ�þ������,ü(ý�þ¥ÿ����Lü&ý-þ����,ü(ý�þ�����%ü�ÿ/þ���°þthat is, astheproductof two differenttranspositions.Similarly, in theprevioustwo examples,the cycles(1,2,3,4,5)and

ü��� $þ����Lþ������(þ�����were written as productsof four and ��� ý transpositions,respectively.

This illustratesthe fact thata cycleof length � canalwaysbewritten asa productof ��� ý transpositions.Thus, if � is even, then the numberof transpositionsis odd, and if � is odd, then the numberoftranspositionsis even.For a permutationwhich is not necessarilya cycle, the following theoremholds.

3.3.6 Theorem. If � is a permutationon � symbolsexpressedastheproductof � transpositionsandalsoas a productof � transpositions,then � and � are either bothevenor bothodd.

This is quite an importantfact, the usualproof of which may seema bit artificial andcanbe foundin [17]. A permutationwill becalledevenor oddaccordingto whetherit canbeexpressedastheproductof an evenor odd numberof transpositions,respectively.

Permutationof data is one important reasonfor studyingpermutationsand permutationgroupsinsignal processingand computerscience. Matrix versionsof the FastFourier Transform(FFT) involvesophisticatedshuffling of datawhich is accomplishedwith the useof permutationmatrices.

Let � � denotethe groupof permutationson "! þ%ý�þ������?þ �#� ý�$ and %'& the transposeof the matrix % .

3.3.7 Definition. Let (*)+� � and definethe �-,.� matrix /10 by

/10 �Tü325476��98;:5<�=><25476?�A@ ý BDC � � ( ü�EF�! G�H :5<�=>8IBKJL<NM/10 is called a permutationmatrix.

It is well known that permutationmatricesare invertible and that /PO 0 � /�&0 � / 0RQ�S . Using thisfact, it is easyto seethe setof all �T,U� permutationmatricesformsa groupundermatrix multiplicationwhich hasthe samestructure(i.e. is isomorphicto) as � � . Note that if % �êüF��4V6��

is an �-,W� matrix,thenmultiplication on the left by / 0 permutesthe rows of % by ( O andmultiplication on the right by/10 Q�S � / &0 permutesthe columnsof % by ( O . Hence,we can write /10X%�/ &0 �ZY[� 0R\ 43]_^ 0R\ 6L]a` .3.4 Isomorphisms

Throughoutthis book, we deal with various kinds of abstractmathematicalsystems. The name“abstractmathematicalsystem” is usedto describeany well-defined collection of mathematicalobjectsconsisting,for example,of a set togetherwith relationsand operationson the set, and a collection ofpostulates,definitions,and theoremsdescribingvariouspropertiesof the structure.

It is a fundamentallyimportantfact that evenwhensystemshavevery little structure,suchassemi-groupor groups,it is oftenpossibleto classifythemaccordingto whetheror not theyaremathematicallysimilar or equivalent. Thesenotions are mademathematicallypreciseby the morphismrelationshipbetweenabstractsystems.

84

Page 93: Image Algebra by Ritter

3.4.1 Definition. Let bdcfe�bhg�i*j and blkmcne�blkog�ipk3j denotetwo systems.A homomorphismfromb to blk is a function qsrtbvuwblk suchthat for each x9g�y{zpb ,

q'eKx|i}y~j�cfq'eKx~j�i k q?e�y�j��Thus, a homomorphismis requiredto preservethe operationsof the systems;i.e., performingthe

operationx�i�y in b and thenapplying the function q to the result is the sameas first applying q toeach x and y and then applying the operation q'eKx~j�i k q'e�y~j in b k . If sucha function exists,then thetwo systemsare said to be homomorphic.

By definition, a homomorphismneednot be a one-to-onecorrespondencebetweenthe elementsofb and blk . One-to-oneand onto functionsthat preservethe mathematicalstructuresof systemslead tothe extremelyimportant conceptof an isomorphism.

3.4.2 Definition. Let b�cse�bhg�i{j and b k cse�b k g�i k j denotetwo systems.An isomorphismof binto b k is a homomorphismqfr;b�u�b k which is both one-to-oneandonto.

If sucha homomorphismexists,then we say that the two systemsare isomorphic. Hencethe ideathat the two systemsb and b k are isomorphicmeansthat they are identicalexceptfor the namesof theelementsand operations.That is, we can obtain b k from b by renamingan element x in b with thenameof a certainelementx k in b k , namely x k c�q?eKx�j , andby renamingthe operation i as i k . Thenthe counterpartof xtiZy will be x k i k y k . The next theoremwe proveis very obviousif we consideranisomorphismto be a renamingof one systemso that it is just like another.

3.4.3 Theorem. Let b and blk be two groupsandsupposee is the identityof b . If q*rbdu�blk isan isomorphism,then q'e���j is the identity of b . Moreover,

q��Kxm�~��lc��Vq'eKx~j�� ���-� x�z�b+�Proof: Let x5k�z.blk . Since q is onto, ��xWzpb suchthat q'eax~j�c�x5k . Then

x k c�q'eKx~j�c�q'e��;��x~j�c�q'e���j1��q?eKx�j�c�q'e���j1��x k �Similarly, x k c�q'eKx~j�c�q'eKx�����j�c�q'eax~j���q'e���jc{x k ��q'e���j��Thus, for every x5k?zfblk we have

q'e���j1��x k c{x k c{x k ��q'e���j��Therefore, q'e���j is the identity of b .

Moreover, for xfz�b we have

q'e���jc�qP�ox��m����xX�tc�qP�Dx~�m��� ��q?eKx�jand q'e���jc�q � x���x �m��� c�q'eKx~j���q � x �m��� �Thus, q � x �m� � c��¡q'eax~ja� �m� .

85

Page 94: Image Algebra by Ritter

Q.E.D.

The essenceof the theoremis that isomorphismsmap identities onto identitiesand inversesontoinverses.

It is immediatefrom our discussionthat every systemis isomorphicto itself; we simply let ¢ bethe identity function. To show whetheror not two different systemsare isomorphiccan be a difficulttask. Proceedingfrom the definition, the following algorithm can be usedto show that two systems£¥¤}¦�£h§�¨{©

and£lª;¤}¦F£tªK§�¨NªD©

are isomorphic:

STEP1. Define the function ¢ from£

to£ ª

which is proposedasa candidatefor isomorphism.

STEP 2. Show that ¢ is a one-to-onefunction.

STEP 3. Show that ¢ is an onto function.

STEP 4. Show that ¢ ¦K«|¨}¬~©P¤ ¢ ¦K«~©�¨ ª ¢ ¦�¬�© .Step4 is usuallyjust a questionof computation.Onecomputesbothsidesof theequationandchecks

out whetheror not they are the same.We illustrate this procedurewith an example.

3.4.4 Example: We want to show that¦�­ §�®t©

is isomorphicto¦�­�¯I§�°±©

.

STEP1. Define the function ¢A² ­p³�­´¯by ¢ ¦�µ~©�¤·¶�¸�¹Uº�»{­

.

STEP2. If ¢ ¦�µ�©l¤ ¢ ¦_¼�© , then¶½¸.¤¾¶�¿

, and taking the natural log we obtain thatµ+¤Z¼

. Thus, ¢is one-to-one.

STEP3. IfµÀ»�­�¯

, then ¢ ¦_ÁaÂ~µ�©¤�¶�ÃÅÄ�¸P¤�µ . Thus,for everyµ�»À­�¯I§IÆ?Ç#»�­

, namely¼h¤�ÁaÂ~µ

, suchthat ¢ ¦�¼�©|¤Zµ

. Therefore, ¢ is onto.

STEP 4. Forµ1§¼�»�­

, we have

¢ ¦�µP®È¼�©�¤f¶ ¸�¯�¿ ¤�¶ ¸ °�¶ ¿ ¤ ¢ ¦�µ�©1° ¢ ¦�¼�©�ÉAnotherexampleof two isomorphicgroupswasmentionedin the previoussection.Therewe noted

that thesymmetricgroup Ê Ä is isomorphicto thegroupofÂPË�Â

permutationmatrices.This fact signifiesthe importanceof the symmetricgroup in applications.In the theoryof groups, Ê Ä playsan evenmorecentralrole; it canbeshownthatany finite groupis isomorphicto somesubgroupof Ê Ä for some

Â[17].

However,finding the right candidatesfor isomorphismsin orderto establishthis fact is a nontrivial task.

To showthat two systemsarenot isomorphicmeansthat therecannotexist a one-to-onecorrespon-dencewhich preservesthe algebraicstructureof the systems. This is a trivial problem wheneverthetwo systemshavea different numberof elements.For example,Ì�Í and ÊmÎ arenot isomorphicas therecannotexist a one-to-onecorrespondencebetweentheir elements.Similarly, since Ì is countableand

­is uncountable,they can neverbe isomorphicas algebraicstructures.

86

Page 95: Image Algebra by Ritter

3.5 Rings and Fields

The systemswe haveconsideredthus far havebeenconcernedwith setson which a single binaryoperationhasbeendefined. Our earliestexperiencewith arithmetic,however,hastaughtus the useoftwo distinct binary operationson setsof numbers,namelyaddition and multiplication. This early andimportant experienceshould indicate that a study of setson which two binary operationshave beendefinedis of greatimportance.Modeling our definition on propertiescommonto thesenumbersystems,aswell assuchstructuresas the setof all ÏÑÐÑÏ matriceswith elementsin oneof the numbersystems,or the set of all polynomialswith coefficients in, say, the set of all integers,we now definea type ofalgebraicstructureknown as a ring.

3.5.1 Definition. A ring Ò�Ó�Ô�ÕPÔ�Ö7× is a set Ó togetherwith two binary operations+ and Ö of additionandmultiplication definedon Ó suchthat the following axiomsaresatisfied:ÓtØ Ò�Ó�Ô�Õt× is an abeliangroup.ÓtÙ Ò�Ó�Ô�Ö7× is a semigroup.Ó�Ú ÛÝÜ Ô�Þ�Ô�ßPà.ÓPÔ Ü Ö�Ò�ÞáÕNß�×;â�Ò Ü Ö�Þ½×ãÕ*Ò Ü Ö�ß�× Ü Ï9ä#Ò Ü ÕÈÞ½×�Ö�ßtâ�Ò Ü Ö�ß"×�Õ*ÒFÞIÖ�ß"×�åIf axiom Ó Ø is weakenedtoÓ�æØ Ò�Ó�Ô�Õt× is a commutativesemigroup

then Ó is called a semiring.

In subsequentchaptersit will becomeapparentthat the theory of rings and semiringsplays animportantrole in the analysisand applicationof imagealgebra.Of the many examplesof rings whichcomereadilyto mind from experiencewith commonsystemsof elementarymathematics,themostnaturalis, perhaps,the ring ç of integerswith the usualaddition and multiplication. However,if we examinethe propertiesof the ring of integers,we note that it has propertiesnot enjoyedby rings in general.Among thesepropertiesare:

(i) The existenceof a multiplicative identity element,which must be unique, called the unitelement,and which is usually designatedby the number1.

(ii) The commutativity of multiplication.

(iii) The nonexistenceof an element Üpèâêé suchthat for somepositive integer Ï , Ï ÜÀëAÜ Õ Ü Õì�ì�ì Õ Ü â·é (where Ï Ü is definedto be the sum of Ï Ü ’s).

On the otherhand,the integersthemselvesfail to possessa mostusefulproperty,namelythat:

(iv) For every nonzero Ü à�Ó there is an elementin Ó , denotedby Ü5í Ø , such that Ü Ö Ü�í Ø âÜ í Ø Ö Ü âïî , i.e., ÒFÓPÔ�Ö7× is a group.

When it doesexist in a particularring, the elementÜ í Ø is called the inverseof a. In fact, ÒFç�Ô�ÕPÔ�Ö ×also fails to have the slightly weakerproperty:

(v) For every nonzero Ü àðÓ there is an elementin Ó , denotedby ñÜ , such that Ü Ö9ñÜ Ö Ü âÜ}ò�ómô ñÜ Ö Ü Ö5ñÜ â·ñÜ ; i.e., every nonzeroelementhasa pseudoinverse.

Thesepropertieslead us to somefurther definitions.

87

Page 96: Image Algebra by Ritter

3.5.2 Definition: If a ring satisfies(i), it is called a ring with unity. If a ring satisfies(ii), it iscalledcommutativeor abelian. If a ring satisfies(iii) it is said to havecharacteristiczero. Ifit satisfies(iv) it is called a division ring or a quasi-field. A field is a commutativedivisionring. A ring which satisfies(v) is called a von Neumannring.

As we noted, õ�ö�÷�øP÷�ù7ú is a commutativering but not a division ring. On the otherhand, õ�û ÷�ø|÷�ùÅú isanexampleof a commutativedivision ring and,hence,a field. It is alsoanexampleof a ring with unityandcharacteristiczero. Otherwell known examplesof commutativerings are õ�üh÷�øP÷�ù ú and õ�ýt÷�øP÷�ù ú .

In order to give someindication of the generalityof the conceptof a ring, we turn to somelessfamiliar examplesof rings.

3.5.3 Examples:

(i) The set of real valuedfunctionson a set þ togetherwith the operationof function additionandmultiplication ÿ�û��l÷�øP÷�ù � is a commutativering with unity. We know from Theorem2.8.2that ÿ[û�� ÷½ø � is an abeliangroup. That ÿ[û�� ÷�ù � is a commutativesemigroupfollows fromDefinition 2.8.1 (iv) of multiplication of real valuedfunctions. For example,� õ��Tù��mú�ù��aõ� �ú�� � õ��Uù���ú�õ� ~ú���~õ� ~ú�� � �1õ� �ú��~õ� �ú����õ� �ú���1õ� �ú � �~õ� �ú��õ� �ú������1õ� �ú � õ��Pù~ú>õ� ~ú���� � �Tù�õ���ù��ú��aõ� �ú��Thus, õ��Uù��mú�ù�����Tù�õ���ù��ú��Commutativity and distributivity of multiplication over addition can be demonstratedin asimilar fashion.Themultiplicative identity is, of course,the constantfunction ��õ� �ú�� �"!# %$þ . For any function f with the property �9õ� ~ú'&�)(*!+ ,$pþ we may definea multiplicativeinverse õ��9ú.-0/ by õ��1ú1-2/�õ� �ú�� �435�1õ� �ú . However,sincetherearefunctions �6$�û87 with �9&��(but �1õ1 ~ú���( for some %$Tþ , ÿ[û�� ÷½øP÷�ù � — in contrastto õ�û ÷�øP÷�ù7ú — is not a division ring.

(ii) Considerthecyclic group õFö8:m÷�ølú . For ;�÷�<=$�ö8: we definetheproduct ;�ù�< to betheremainderof the usualproductof the integers; and < whendivided by > . For example,in ö"? we have@ ù�A'��B . This operationon öC: is multiplicationmodulo > . We leaveit to the readerto checkthat the system õFö8:X÷½øP÷�ù¡ú satisfies the ring axioms.

An importantobservationconcerningexample(i) is the fact that the operationson û�� are inducedby the operationson û . That is, the addition of two functions ��ø9� is definedin termsof additionofreal numbers,e.g. õ���øD��úFõ� ~úE�F�1õ� �ú�ø9�~õ� �ú , and multiplication of two functions is defined in termsof multiplication of real numbers. In view of this observation,it should be clear that the set û canbe replacedwith any field G in thesetwo examplesand that the result would be a commutativeringwith unity ÿ�G � ÷½øP÷�ù � , where the addition ��ø9� on G � is definedin termsof the addition on G , e.g.,õ��høH��ú�õ� ~úC�I�1õ� �úRøJ�~õ� ~ú , andlikewisefor multiplication. In addition,dueto thefact that theoperationson G�� areinducedby the operationson G , the ring ÿ�G8K ÷�øP÷�ù � behavesvery muchlike the ring õ�GI÷�øP÷�ùÅú .The only missingingredientis the lack of multiplicative inversesfor G�� .

Hopefully the readeris beginningto realizethat in the studyof any sort of mathematicalstructure,an idea of basicimportanceis the conceptof two systemsbeingstructurallyalike or identical, i.e., onebeing similar to the other or one being exactly like the other exceptfor its nameand the namesof its

88

Page 97: Image Algebra by Ritter

elements. In algebra,the conceptof being identical is always called “isomorphism.” The conceptoftwo rings being just alike exceptfor namesof elementsleadsus, just as it did for systemswith oneoperation,to the following definition.

3.5.4 Definition. An isomorphismL of a ring M with a ring MON is a one-to-onefunction mappingM onto M#N such that P#Q4R1S9TIM UWV4X L U QZY[S X \ L U Q X Y[L U S X RU�]^X L U QO_�S X \ L U Q X _L U S X `If sucha function exists,thenwe say that the two rings are isomorphic.

3.5.5 Example: Considerthe ring

U�acb RdY'R�_ X , whereaddition correspondsto vector addition andmultiplication is definedby multiplying the correspondingvectorcomponents,i.e.,U e2f R e�g Rh�hhWR e^i X Y U j f R j g Rh�h�h�R j i X \ U e�f Y j f R e2g Y j g R�hh�h1R e�i Y j i Xand Hadamard multiplicationU e�f R e2g R�h�hh1R e0i X _ U j f R j g Rh�h�h.R j i X \ U e�f j f R e�g j g Rh�h�h.R e�i j i X `We leaveit to the readerto convincehimself that

U�acb RdY'R�_ X is a commutativering with unity.

Supposethat k is a finite set with l elements,say k \nm V R ] R�h1h�hdR�l"o . Let prq a�s t a bbe the function definedby p U�u"X \ U�u"UWVvX R u"U�]^X R�hh�h1R u"U l X�X `We know from Example2.8.3 that p is one-to-oneandonto. Furthermore,p U�uwX Y[p U x X \ U�u"UWVvX R u"U�]^X R�hh�h1R uwU l X.X Y U x U1V4X R x U�]^X R�h�hh1R x U l X1X\ U�uwU�V4X Y x U1VvX R u"U�]yX Y x U�]^X R�h�h.h�R u"U l X Y x U l X1X\ U.U�u Y x X.UWVvX R U�u Y x X�U�]yX R�h�h�h.R U�u Y x X1U l X.X \ p U�u Y x X `An analogousargumentshowsthat p U�u _ x X \ p U�uwX _�p U x X . This provesthat therings

U�azb R{Y|R�_ Xand } a s RdY'R�_ ~ are isomorphic.Of course,by arguing in an analogousfashion,we canprovethat for any field � the correspondingrings

U � b RdY'R�_ X and }�� s R{Y'R�_ ~ are isomorphic.

Thusfar, all our exampleshavedealtwith commutativerings. However,noncommutativeringsplayan importantrole in the structureof the imagealgebrawhich is the central themeof this treatise. Wepresentthe most pertinentexampleof sucha ring.

3.5.6 Example: Let � be any field, say � ,

a, or � , and considerthe set � g{�^g U � X of all 2 � 2

matricesof form U ����� X \n� �^f1f �^f1g�^g1f �^g1g2� Rwherethe ����� ’s areall in � . Theset � i���i U � X of all lE��l matricesover � is similarly defined.

89

Page 98: Image Algebra by Ritter

Matrix addition on �,�d�^������ is definedby�+�^�1� �^� �� � � � �1����� ���d�1� �d� �� � � � �1����� �����.� � �d�1� �^� � � �d� �� � � � � � � � �1� � � �1�0�[ thatis, by addingcorrespondingentriesusingadditionin � . After a few momentsof thought,itis clearfrom theaxiomsof a field that ¡��9���^�4���c�  ��£¢ is anabeliangroupwith additiveidentity�+¤ ¤¤ ¤ �  and with additive inverse ¥ � � �1� � � �� � � � �1� � � �

¥ � �1� ¥ � � �¥ � � � ¥ � �1� �§¦Matrix multiplication on �9���^����c� is definedby� � �1� � � �� � � � �1� �©¨ � � �1� � � �� � � � �1� �ª� � � �1� � �1� � � � � � � � � �1� � � � � � � � � �1�� � � � �1� � � �1� � � � � � � � � � � � �1� � �1� � ¦If � equals« or ¬ , thenthis multiplicationcorrespondsof courseto theregularmatrix productover thesefields and can bestbe rememberedby� ��­�® ��� ��­�® � � ��¯ ­�® �  where ¯ ­�® � �°±W² � � ­ ± � ± ® ¦Of course,theanalogousdefinitionholdsfor matrix multiplication in which thesumgoesfrom³ �µ´ to ¶ . In short,everythingwe saidaboutthe system ¡�� ���^� ���c�  ��' �¨·¢ is alsovalid forthe system ¡��9¸ � ¸����z�  d�' �¨¹¢ .To show that ¡ � ¸ � ¸ ���c�  ��' �¨ ¢ is a ring, it remains to prove the associativeand dis-tributive laws. Using the field propertiesof � and the definition of matrix multiplica-tion in ¡�� ¸ � ¸ ���z�  d�' �¨z¢ , then if º�»1¼ denotesthe entry in the ½ th row and ¾ th column of� � ­�® �W¿À� � ­�® �1��¯ ­�® ��Á , we haveº »1¼ � ¸°±�² � � » ±� ¸°® ² � � ± ® ¯ ® ¼�à � ¸°® ² �  ¸°±W² � � » ± � ± ® à ¯ ® ¼ �ÅÄ »1¼  where Ä »1¼ is the entry in the ½ th row and ¾ th column of ¿À� � ­�® �1� � ­�® ��Á���¯ ­�® � . The distributiveproperty is proved in a similar fashion.

The last exampleprovesthe following theorem:

90

Page 99: Image Algebra by Ritter

3.5.7 Theorem. If Æ is a field, then the set ÇDÈyÉ�È2Ê�ÆcË of all ÌHÍ9Ì matriceswith entriesfrom Æformsa ring undermatrix addition and matrix multiplication.

The rings of matricesover a field Æ are an important tool in the theory and practiceof imagetransformations.In thiscontext,theycanbeviewedascorrespondingto certainfunctionscalledtemplates,andmatrix multiplication,whenviewedin this light, canbeshownto correspondto templateconvolutions(Chapter4). This providesan elegantdemonstrationof the associativelaw for templateconvolutions.

On thedownside,weneedto pointout thatthering Î�Ç ÈyÉ�È Ê�ÆzË.ÏdÐ'Ï�ÍCÑ lackssomeimportantalgebraicproperties.Sincematrix multiplication is not commutative,Ç ÈyÉ�È Ê�ÆcË is not a commutativering. Also,one of the most important propertiesof the real numbersystemis that the product of two numberscan only be zero if at leastone of the factorsis zero. The working engineeror scientistusesthis factconstantly,perhapswithout realizing it. Supposefor example,oneneedsto solve the equationÒ�Ó2Ô Ð§Õ ÓJÖH×ÙØ�Ú·ÛThe first thing to do is to factor the left side:Ò�Ó Ô Ð§Õ ÓÜÖ§×ÝØ Ê Ò�ÓÜÖßÞ Ë.Ê Ó Ð × Ë ÛOnethenconcludesthat theonly possiblevaluesfor

Óare àÔ and–5. Why? Becausetheresultingproduct

is zero if and only if one of the factorsÒ�ÓáÖÅÞ

orÓ Ð × is zero.

Thepropertythatif a productequalszerothenat leastoneof theproductfactorsmustalsoequalzero,doesnot hold for rings in general.For instance,the definition of matrix productin Ç Ô É Ô Ê�ÆcË showsthatâ Ú ÚÚ Þwã â Ú ÞÚ Ú�ã Ø â Ú ÚÚ Ú�ã ÛSimilarly, the Hadamardproduct of the two nonzerovectors(1,0,0,...,0)and (0,0,...,0,1)in ä·å is thezero vector (0,0,...,0).

Theseideasare of suchimportancethat we formalize them in a definition.

3.5.8 Definition. If æ and ç are two nonzeroelementsof a ring è suchthat æEé�ç ØêÚ , then æ andç are divisorsof zero or zero divisors. In particular, æ is a left zero divisor and ç is a rightzero divisor of the product æ'é^ç .

An importantconsequenceof the conceptof zero divisors is providedby Theorem3.5.10below.Let è be a ring and let æ4ÏWç�Ï�ë'ì[è . We say that the cancellationlaws hold in è if æÝé5ç Ø æ�éë , withæ=íØ�Ú , implies ç Ø ë and ç·é�æ Ø ë+é�æ , implies ç Ø ë . Thesearemultiplicative cancellationlaws. Additivecancellationlaws hold since Ê�è'ÏdÐEË is a group.

3.5.9 Definition. An integral domainis a commutativering with unity containingno zerodivisors.

3.5.10 Theorem. Thecancellationlaws hold in integral domains.

Proof: Supposethat î is an integraldomainand that ï^ð Ø ï^ñ with ï6íØIÚ . Thenï^ð Ö ï^ñ Ø ï0Ê�ð Ö ñË Ø�ÚòÛ91

Page 100: Image Algebra by Ritter

Since ó%ôõêö , andsince ÷ hasno right divisor of zero,we musthave ø·ù§ú õÅö . Thus, ø õ ú .A similar argumentshowsthat ødó õ údó , with óDôõµö , implies that ø õ ú .

Q.E.D.

Supposethat û is a division ring and ü�ý4þ õÿö with üDôõÿö . ThenöÝõ ü�� � ý öÙõ ü�� � ý � üOý�þ�� õ�� ü�� � ý�ü�Oýdþ õ� ýdþ õ þ �Similarly, if þEý�ü õFö , then multiplication on the right by ü � � leadsto the conclusionthat þ must bezero. This demonstratesthat a division ring containsno divisors of zero. Thus a division ring lacksonly commutativityof beingan integraldomain.However,sincecommutativitywasnot usedin provingTheorem3.5.10, we seethat the theoremalso holds for division rings.

3.6 Polynomial Rings

An importantconsequenceof Theorem3.5.10 is that we can solve polynomial equationsin whichthe polynomialscan be factoredinto linear factors in the usual fashionby settingeachfactor equaltozero,as long as we are dealingwith polynomialswith coefficients from an integraldomainor divisionring. This leadsus directly into the topic of polynomialswith coefficients in a ring.

3.6.1 Definition. A polynomial � ��� � with coefficientsin a ring û in the indeterminate�

is aninformal sum �� �

��� ó � � � õ ó ��� ó � � � ý�ýý � ó�� � � � ý�ýý��where ó ��� û are called the coefficientsof � ��� � , and ó � õ�ö for all but a finite numberofvalues � . If for some �! ö ó � ôõ ö , then the largestsuchvalueof � is the degreeof � ��� � . Ifno such �" ö exists, then � �#� � is of degreezero.

We also use the notation

� ��� � õ ó � � ó � � � ý�ýý � ó � � �wheneveró � õ�ö for all �$ &% . Any elementof û is a constantpolynomial. Themostimportantconstantpolynomialsare the zero polynomial ö � û and, if û hasunity, the unit polynomial1.

Addition and multiplication of polynomials with coefficients in a ring û are defined in a wayformally familiar to the reader. If

� �'� � õ ó)( � ó � � � ý�ýý � ó � � � � ý�ýýand * ��� � õ ø � � ø � � � ýý�ý � ø+� � � � ý�ý�ý,�then for polynomial addition, we have

� �#� � � * ��� � õ ú � � ú � � � ýý�ý � ú+� � � � ý�ý�ý��92

Page 101: Image Algebra by Ritter

where ������������� . For multiplication, we have ���������������� ����������� � � ����� ����� � � � �����! where ���"� �#$&% � � $ '��( $ . Althoughpolynomialadditionis obviouslycommutativewe notethat if ) is not a

commutativering, then

�#$&% � � $ ��( $ neednot be equalto

�#$&% � $ � ��( $ . However,associativityof polynomial

multiplication follows directly from the fact that � ) ��*� is a semigroup.In particular,suppose ������ and������� areas above, + ����� �-,#$&% � � $ � $ , � �.��� � ������/�0���.��� , and 1 ����� � �������2� + ����� . Then� �����3� + �.��� � ,4� % ��5 � � � 7698;:=<�: 5 �"� �4>=% � � > �'��( >@?0A;B � > � >4 $&% � � $ > ( $DCAlso, 1 ����� � ,4E % � 1 E � E GFIH 5 + 5 1 E � E4J % � J � E ( J CTherefore,K ��.�������������.L.� + �.��� � ,4� % � M �4>=% � � > � ��( >0N � � � ,4� % �"O �4>=% � M >4 $&% � � $ > ( $PN � ��( >�Q � � � ,4� % �SRT 4$VU J UXWY% � � $ J � W!Z[ � �� ,4� % �SRT �4E % � ����( E]\^ E4J % � J � E ( J�_` Z[ � � � M ,4 $&% � � $ � $ N RT ,4E % � \^ E4J % � J � E ( JY_` � E Z[ � ������3� K ��������� + �.���.L C

The fact that multiplication distributesover additioncanalsobe provenin the samestraightforwardbut cumbersomefashion. Thus, our discussionshowsthat the threering axiomshold for polynomialswith coefficients in a ring. We statethis observationas a theorem.

3.6.2 Theorem. Theset ) K �aL of all polynomialsin an indeterminate� with coefficientsin a ring )is a ring underpolynomialadditionandmultiplication. If ) is commutative,then ) K �aL is alsocommutative,and if ) hasunity 1, then 1 is also the unity for ) K �DL .

Thus, b Kdc L is the ring of polynomialswith integralcoefficients, e Kdc L is the ring of polynomialswithreal coefficients, and f Kdc L is the ring of polynomialswith complexcoefficients. The elementsof theserings arethe polynomialsoneencountersin elementaryalgebra.A lesscommonring of polynomialsinone variable is the ring bXg Kdc L . Here we have��� �]h � � ��� ��h � � � h���h ��� � � h���h � ��i � ��ij��iand ��� �]h � g � ��� ��h ����� ��h � � � g � � h���h ��� �]hk� � g �lh C

The most importantpolynomial domainsarisewhen the coefficient ring is a field m . The ring ofpolynomials m K �aL over a field m hasa numberof propertieswhich parallel thoseof the ring of integersb . For example,we know from elementarynumbertheorythat if n is a positiveintegerand o anyotherinteger, then thereexistsuniqueintegers � and + such thato � n � � + ?0A;B iqp +qrsn CThis is alsoknownasthedivisionalgorithm for the integers.A similar resultholdsfor elementsof m K �aL .

93

Page 102: Image Algebra by Ritter

3.6.3 Theorem. (Division Algorithm for t�u*vDw ) Letx�y v�z7{]|~}G��|��=vj�������=��|��Dv �and � y v�z7{���}G�����Yvq�]�����=���'��v �be two elementsof t�u�vaw , with |�� and �'� bothnonzero elementsof t and ���]� .Thenthere existuniquepolynomials� y v�z and � y v�z in t�u�vaw suchthatx�y v�z2{ � y v�z���� y v�zX��� y v�z;�with the degreeof � y v�z lessthan ��{������a�0��� � y v�z .Proof: Considertheset ��{�� x�y v�z3� � y v�z��=� y v�z��7� y v�zG ¡t�u£¢�wP¤ . Let � y v�z¥ S� suchthat forany other ��¦ y v�zI §� , degree� y v�z©¨ª��¦ y v�z . Then � y v�z is of form � y v�z9{ x�y v�z/� � y v�z2�«� y v�zfor some � y v�z¥ §t�ud¢�w . Adding

� y v�z2��� y v�z to both sidesof this equationwe havethatx�y v�z2{ � y v�z���� y v�zX��� y v�z;¬Next we showthat thedegreeof � y v�z is lessthan � . Supposethat � y v�z2{ ­®¯V° }�± ¯ v ¯ with ± ¯  ²tand ± ­´³{µ� if ¶ ³{µ� . If ¶l·�� , thenx�y v�z3�§� y v�z�� � y v�z�� y ± ­0¸ � � z�v ­�¹ � � � y v�zG{�� y v�z�� y ± ­0¸ � � z�v ­�¹ � � � y v�z;¬ (I)

Now let the left side of EquationI be representedby� ¦ y v�zG{�� y v�zº� y ± ­0¸ �'�kz�v ­�¹ � � � y v�zG{�� y v�zº� ± ­X» v ­ � y �'� ¹ � ¸ �'��z�v ­=¹ � �¼���½�'� y �'} ¸ �'�¾z�v ­=¹ �©¿ ¬and let À y v�z©{ y �'� ¹ � ¸ ���Iz�v ­=¹ � �ª�����Á� y ��} ¸ �'��z�v ­�¹ � . Then� ¦ y v�z2{ ± ­�¹ � v ­�¹ � ��������� ± } � ± ­ À y v�zwhich is of degreestrictly less than ¶ . Furthermore,setting � y v�z¾{ » � y v�z�� y ± ­ ¸ �'�¾z�v ­=¹ � ¿andsubstituting� into the right sideof EquationI we obtain � ¦ y v�zG{ x�y v�za� � y v�za��� y v�z . Thus,� ¦ y v�z is anelementof � of degreelessthan � y v�z , contradictingthe fact that � y v�z wasselectedto haveminimal degree.Therefore ¶ must be less than � .

We haveleft to show that � y v�z and � y v�z are unique. Supposethatx�y v�z�{ � y v�z���� y v�z��¼� y v�zand x�y v�z�{ � y v�z���� ¦ y v�zX��� ¦ y v�z¬Then subtractingthe secondequationfrom the first, we have� y v�z3� » � y v�z��¼� ¦ y v�z ¿ {�� ¦ y v�z��¼� y v�z;¬Sincethedegreeof ��¦ y v�z=�k� y v�z is lessthanthedegreeof

� y v�z , wemusthavethat � y v�z=�k��¦ y v�z/{� or � y v�z¥{���¦ y v�z . But thenwe musthavethat ��¦ y v�z2�´� y v�z¥{Ã� or ��¦ y v�z¥{�� y v�z .94

Page 103: Image Algebra by Ritter

Q.E.D.

The polynomial Ä�Å.Æ3Ç in Theorem3.6.3 is called a divisor of È�Å�Æ�Ç whenever É�Å.Æ�Ç is the zeropolynomial. The polynomials Ê�Å�Æ�Ç and É�Å�Æ�Ç can be computedby the samelong division as usedinhigh school for dividing real polynomials.

If Ë is a field or a commutativering and ÌkÍÎË , thenthe function Ï/Ð9Ñ�Ë�ÒdÓDÔ�ÕÖË definedbyÏ�Ð;תØÙ ÚVÛ!ÜGÝ Ú Æ ÚßÞáà ØÙ Ú&Û!ÜGÝ Ú Ì Úfor each

Ý~â�ãlÝDä Æ ãÃå�å�å�Ý Ø Æ Ø ÍlË�ÒdÓ�Ô is a homomorphism.We leaveit to the readerto checkthat Ï�Ðpreservesthefield operationsof additionandmultiplication. It is commonpracticeto let thesymbol È�Å.Ì�ÇdenotetheevaluationÏ7Ð�ÅæÈ�Å�Æ�Ç½Ç à Ý Ü ãçÝ~ä Ì ã²å�å�å.Ý Ø Ì Ø . This notationprovidesfor thefollowing definition.

3.6.4 Definition. Let Ë be a commutativering or field, ÌSÍ]Ë , and È�Å�Æ�ÇèÍ]Ë�ÒdÓ�Ô . If È�Å�Ì�Ç àêé,

then Ì is a zero of È�Å.Æ�Ç .In termsof this definition, theproblemof solvinga polynomialequationis identicalto thatof finding

all the zeros of the correspondingpolynomial. Of course,the zerosof a polynomial are found in termsfactoring the polynomial into productsof lower degreepolynomials.

3.6.5 Corollary. An elementÌ�Í¡Ë is a zero of È�Å.Æ�ǥ͡Ë�ÒVÓ�Ô@ë"ì Æ@í²Ì is a factor of È�Å�Æ�Ç in Ë�ÒdÓ�Ô .Proof: Supposethat ÌîÍÃË and È�Å�Ì�Ç àïé

. Then by Theorem3.6.3 ð¥Ê�Å.Æ�Ç�ñ'É�Å.Æ�ÇçÍòË�ÒdÓ�Ôsuch that È�Å�Æ�Ç à Å.Æí§Ì�Ç å Ê�Å.Æ�Ç ã É�Å�Æ�Ç;ñwherethe degreeof É�Å.Æ�Ç is lessthan1. It follows that É�Å�Æ�Ç à Ý for some

Ý Í²Ë . ThusÈ�Å.Æ�Ç à Å�Æ"í¼Ì�Ç å Ê�Å�Æ�Ç ã�Ý�óApplying the homomorphismÏ7Ð , we obtainéqà È�Å�Ì�Ç à�é å Ê�Å�Ì�Ç ã¼Ý�óHence,

Ý àÃéand È�Å�Æ�Ç à Å.Æôí§Ì�Ç å Ê�Å.Æ�Ç . Thus, Å�Æ"í¼Ì«Ç is a factor of È�Å�Æ�Ç .

Conversely,if Å�Æ"í´Ì�Ç is a factor of È�Å�Æ�Ç , then applying the homomorphismÏ7Ð to È�Å�Æ�Ç àÅ�Æõí¼Ì�Ç å Ê�Å.Æ�Ç , we obtain È�Å�Ì«Ç à�é å Ê�Å�Ì�Ç à�é.

Q.E.D.

Factorizationof polynomialsplaysan importantrole in the optimizationof certainimagetransforms(Chapter5). Similar to thefactorizationof numbersinto primenumbers,polynomialscanonly befactoredinto prime componentsthat cannotbe factoredany further. More precisely,a nonconstantpolynomialÈ�Å�Æ�ÇõÍÃË�ÒdÓ�Ô is an irreducibleor prime polynomial in Ë�ÒdÓ�Ô if È�Å�Æ�Ç cannotbe expressedas a productÄÁÅ�Æ�Ç å Ê�Å.Æ�Ç of two polynomialsin Ë�ÒdÓ�Ô , both of lower degreethan the degreeof È�Å�Æ�Ç .

95

Page 104: Image Algebra by Ritter

In additionto factorizationinto prime components,the ring of polynomials ö9÷*øDù over a field ö hasmanyotherpropertieswhich parallel thoseof the ring ú of integers.For example,the set ö�÷dø�ù may bepartitionedby any polynomial ûÁü�ý�þkÿ�ö�÷dø�ù of degree� ���

into a ringö�÷dø�ù���ü���ü�ø;þ'þ���÷ �/ü½ø;þ ù� �÷��~ü½ø!þ.ù� ��������of equivalenceclassesjust as ú waspartitionedinto thering ú���ü��/þ��ú�� . For any ��ü�ý�þ�ÿ¡ö�÷dø�ù we define÷ ��ü�ý�þ.ù������ü�ý�þ �"!½ü½ý�þ$#=ûÁü½ý�þ&%!½ü�ý�þ¥ÿ¡ö�÷dø�ù'�&(Then ��ü�ý�þ�ÿ§÷ ��ü�ý�þ ù sincethezeroelementof ö is alsoanelementof ö�÷dø�ù , and ÷ ��ü�ý�þ.ù��ª÷*)�ü�ý�þ.ù if andonlyif û0ü�ý�þ is a divisor of ��ü.ý�þ�+,)�ü�ý�þ . In analogywith arithmeticmodulo � , we denotethis last conditionby ��ü�ý�þ.-/)�ü�ý�þ½ü103254IûÁü�ý�þ½þ .

We now defineadditionand multiplication on theseequivalenceclassesby÷ ��ü�ý�þ.ù6�l÷7)�ü�ý�þ.ù��Ã÷ ��ü�ý�þ �,)�ü�ý�þ ùand ÷ ��ü�ý�þPù8#�÷7)�ü�ý�þPù �Ã÷ ��ü.ý�þ$#�)�ü�ý�þ ù9 respectively,and leaveit to the readerto convincehimself of the following facts:

(1) Addition and multiplication are well definedoperationson ö�÷dø�ù��0û0ü�ý�þ .(2) ö�÷dø�ù'�«ûÁü�ý�þ has [0] as zero elementand [1] as unity, where0 and 1 are the zero and unity of ö ,

respectively.(3) ö�÷dø�ù'�«ûÁü�ý�þ is a commutativering with unity.

As for the elementsof ú � , we let the polynomial ��ü�ý�þ representthe equivalenceclass ÷ ��ü�ý�þ.ù ,keeping in mind that polynomial arithmetic is performedmod ûÁü�ý�þ . For instance,if :�÷dø�ù'��;.ý=<>+ ��?denotesthe quotient ring of polynomialsmod ý < + �

, and ýA@B+ �and ýC+ �

are viewed as elementsof :�÷dø�ùD��; ý < + ��?

, then ;.ýA@E+ ��? #Dü�ýF+ � þ3� ýA@G+]ý . In general,if ö�÷Vø�ù���ü�ý=HG+ � þ denotesthe ringof polynomialsmod ü�ý=HI+ � þ , then we considerthe elementsof this ring to be polynomialson whichmultiplication is performedby replacing ý H with 1 whereverit appearsratherthanusingthe equivalenceclassnotation [ ].

Onereasonfor our emphasisof polynomialrings is the immediateconnectionbetweenconvolutionof sequencesof numbersandpolynomialproducts.Convolutionsof sequencesareusedin digital signalprocessingas the primary meansof filtering. In imageprocessing,convolutionscan be usedfor suchmethodsas edgedetection,imageenhancement,and templatematching. A commonlyusedfilter is thenon-recursivefinite impulse responsefilter. A finite impulse responsefilter is simply a tappeddelayline in which the outputsat eachstageare multiplied by fixed constantsand then summed. In precisemathematicalterms,let ûF�J�ûLK'� KNM9O and PQ�R5P�KS� K�M9O be two sequencesof numbers.We assumethatûTK�VU wheneverW&XYU or W[ZV� for somefixed positive integer � . Similarly, P�K��U wheneverW[X\U orW]Z^0 for some 0 ÿ¼ú$_ . If the sequences representsthe sampledinput signal and f the sequenceoffilter tap weights,thenboth input andfilter sequencescanbe representedby the polynomialsû0ü�ý�þ&� H` KbaAc ûTK ý Ked5fLg P3ü�ý�þ&� h` KiaAc P�K.ý K (

96

Page 105: Image Algebra by Ritter

The integer j indicatesthe numberof stagesin the filter and is assumedto be much smaller than kwhich is assumedto bevery large. The linear convolutionof thetwo sequencesis simply thepolynomialproductlLmSnLopVq9m1n o8rSs$m1n o andthe coefficientsof lLmSnLo arecalledthe outputsequenceof theconvolution.

Another form of convolution is the cyclic convolution, which is closely related to the linearconvolution. Here the input sequenceqtpvu5q�w'x�y{z�|wb}�~ and filter sequences�pvu�sT��x�y�z8|��}A~ are assumedtohavethe samelength. Thecyclic convolution, of the two sequencesis definedasthe polynomialproductin �������D�{m1n yG�Y� o ; that is,

lLmSn o�p�q9m1n o�r�s$m1n o�j3�5��m1n y �Y� op y�z�|�� } |�� �� wi�8�����E�S� y } � qTw�sT�����n �> 

where the coefficients of lLm1n o form the output sequence.

Linearconvolutionscanbecomputedfrom cyclic convolutionsby separatingthe input sequenceintoshortsections.Eachsectionis then individually processedasa cyclic convolutionandproperlymergedwith the other sectionsto producea linear convolution. For example,assumeqFp¡u�q w x ywb}A~ is our inputsequenceand s¢p£u�sT��x y��}A~ the desiredfilter sequence.Supposethat we wish to computethe linearconvolution q5mSnLo�r�s$m1n o in termsof a cyclic convolutionon sectionsof length ¤ , where jv¥Y¤ and k ismuch larger than ¤ . Onemethodfor achievingthis is asfollows. For ¦¨§ª©¥Y¤ and ¦«§,¬­¥Yk we firstconstructpolynomials q � ~�� m1n o , q � | � m1n o   ®�®�®L  q � ��� m1n o having coefficientsq � ~��w pVqTw   q � | �w pVq wb� � � z �>�   q �b¯ �w p\q wb� ¯N� � z �>�  >®�®�®�  q � ���w p�q wi�8� � � z �°�A±Note that thereis an overlapof j coefficients in the sequencesq �b² � and q �i² � | � .

To illustratethe constructionof thesepolynomials,considerthe casewhere ¤­p\³ and j´pVµ . Then¦�§¶©C¥·³ andq � ~�� p�u�qT~   q |   q ¯ x   q � | � p�u5q |   q ¯   qT¸�x   q �b¯ � p�u5q ¯   qT¸   qN¹5x  >®�®�®A >º�»�¼ ±Now supposethat l m1n o½p ¾¿À }A~ l À n À representsthe linear convolution l m1n o½pJq9m1n oÁr{s$mSnLo and thatl � À � mSn oEpÂq � À � m1n o�r�s$m1n o�j3�5��Ã'n � �Y��Ä representsthe Å th cyclic convolutionsegment.Then,exceptfor

thefirst j coefficients,all thecoefficientsof lLm1n o canbefoundamongthecoefficientsof thepolynomialsl � À � mSn o , where ¦­§�ÅƧǬ . A quick checkshowsthat thesecoefficientsareas follows:l � ~��w p,l w   l � | �w p,l wb� � � z �E�   l ��¯ �w pÈl wb� ¯�� � z �>�  �®�®�®[  l � ���w p,l wb�8� � � z �>�  where jv§Y©[¥Y¤ . As canbeascertainedfrom thenextexample,eachcyclic convolutionproduces¤ � jcoefficientsof the linear convolution,the remaining j coefficientsaresimply discarded.

3.6.6 Example: Supposeq denotesthe input signalwith degreeq9m1n oEp^k very large. If the filteris of length threewith tap weights s ~ p �É�   s | p^¦  EÊ5Ë�Ì s ¯ p � , then s$m1n oEp^n ¯ �Y� . Thelinear convolution lLm1n o½pÍq9m1n oÁr{s$m1n o is given bylLm�n oÁp � qT~EΪm � q | oSnIÎYm�qT~ � q ¯ o1n ¯ ÎYmSq | � qT¸{o�n ¸ Î ®�®�® ÎÇm1q y{z ¯ � q y o�n y � ¯ ±Thus, l ~ p � q ~   l | p � q |   l À pÏm1q À z ¯ � q À o for ÅvÐ � . Computing the linearconvolution in terms of cyclic convolutionsof length j pѳ by using the formulationl � À � mSn o½peq � À � m1n oÁr{s$mSnLo�j3�5� à n � �Ç� Ä we obtainq � À � m1n o�pVq À ÎÈq À � | n«ÎÇq À � ¯ n ¯  tÒÔÓ{Õ Å3p\¦   �  �®�®�®]  k � µ ±

97

Page 106: Image Algebra by Ritter

Therefore,ÖL×�Ø�ÙSÚ�Û ÜEÝRÞ�ß Øáà ß Ø�âLã Û à ß Ø�âåä ÛAä�æAç�è'Û�äêéÇë�ìêí3î5ïðè'Û=ñ>éªë�ì and,hence,Ö ×bØ�Ù Ú1Û Ü�Ý¢Ú�ß Ø�â�ã éQß Ø Ü à Ú1ß Ø�â�ä éQß Ø�âLã Ü1Û à Ú�ß Ø é,ß Ø�âLä Ü1Û ä�òSinceíóÝVô , thefirst two coefficientsof thecyclic convolutionarediscardedandtheremainingõ é3íÍÝ�ö[é.ô÷Ý^ë , which in this caseis Ú1ß Ø é"ß Ø�âLä Ü , matchesall thecoefficientsof the linearconvolutionexceptfor the first í£ÝÂô coefficients,namely Ö=ø and Ö ã .

sùfúpû

multiplicationüadditioný

sù sù sù sùsù

sù sù- sù sù- sù sù-

1 0þ

-1

0ÿ

1 2 3 4�

0ÿ

12 3 4

0ÿ

12

2......

......

Figure 3.6.1 Linear convolution by sections.

Figure3.6.1providesa pictorial representationof thecomputationof a linearconvolutionasaconvolutionby sections.Herethefilter is superimposedoverpart of the input sequence.Afterthe necessaryarithmeticcomputationis performedthefilter is movedonestepto the right andthe computationalprocessis repeated.

The reasonfor computinglinear convolutionsin termsof cyclic convolutionsis the existenceof amultitude of fast algorithmsfor computingshort cyclic convolutions[5, 22].

The conceptof a ring of polynomialsin one variablecan be generalizedto rings of polynomialsin severalvariables.

3.6.7 Definition. For any ring�

, we definerecursively�������������� � � ������������������������� � � ���������������� �"!If

�is a ring with unity 1, then for any #%$ �

, we havethat� # �'&�(��*)+ # ��,�- . But by definition

of polynomial multiplication,&�(��*)/.�+ # ��,�-0�1&�( # )+2����,�-0� # � . Thus,

� # � # � , which meansthat�

commutesin�������

with any elementof R. Similarly if�

hasunity, then so does�������

and, hence,in���3���54 ���6���3���2��4 �we have 47�8�9&(�4�):. + �;.�4 , - �<&(��*)=. + 4>.�4 , - ����4?!

But then,clearly,�������@�34 ���A����4��B���

or�����=�4��C�A����4��B�D�

. By repeatedapplicationsof this argumentweseethat in forming

����� � �� � �� � � @� � �, the order in which the

�FE’s are adjoinedis immaterial. It should

be observed,however,that if�

doesnot haveunity, then it is meaninglessto considerthe product� #

98

Page 107: Image Algebra by Ritter

in termsof the definitions of multiplication which we areusingsince,andthis is the crux of the matter,G cannotbe an elementof H�I G�J . We shall not be too concernedwith this subtletyas all rings we willuse in our applicationswill be rings with unity.

As we havenotedearlier,rings of polynomialsin onevariableprovidea useful theoreticalfounda-tion for studyingconvolutionsusedin one-dimensionalsignalprocessing.A similar situationexistsforstudyingconvolutionsfor higherdimensionalsignalprocessing.For theanalysisof 2–dimensionalconvo-lutions,which area basictool in digital imageprocessing,therings KLINM�O�P J and KQIRMSO�P J�T�U@G�V�WYX O5Z�[ W\X�] ,where K_^a`bLOc?d , play a key role. Here KQIeMSO�P JfT UgG V W_X OZ [ WYX�] denotesthe quotientring of polyno-mials mod U@G V W\Xh] andmod U Z [ W_Xh] ; i.e., the elementsof this ring arepolynomialsin two variableson which multiplication is performedby replacing G V and Z [ with 1 whereverthey appear,ratherthanusing setsof equivalenceclasses.As before,multiplication of elementsin KLIiMSO�P J correspondsto lin-ear convolutions,while multiplications of elementsin KQIRMSO�P J�T�U@G V WYX OZ [ W\X�] correspondsto cyclicconvolutions.

3.7 Vector Spaces

The theory of solutionsof systemsof linear equationsis part of a more inclusive theory of analgebraicstructureknown asa “vector space.”As we assumethe reader’sacquaintancewith this topic,our treatmentof vectorspaceswill be brief, designedonly asa recall of basicconceptsandtheorems.

Although vector spacetheoryas coveredin elementarylinear algebracoursesis usuallyconcernedwith the EuclideanvectorspacesbQj , the operationsof vectoradditionandscalarmultiplicationareusedin many diversecontextsin mathematicsand engineering. Regardlessof the context, however,theseoperationsobey the sameset of arithmeticrules. In the generalcase,the scalarsareelementsof somefield, which may be different than the real numbers.

3.7.1 Definition. A vectorspacek over thefield K , denotedby k U K ] , is anadditiveabeliangroupk togetherwith anoperationcalledscalarmultiplicationof eachelementof k by eachelementof K on the left, suchthat lnm/O5op^qK and rsOutv^qk the following five conditionsaresatisfied:wyx mYz"rp^qkwy{ m_z U o_z r ];|}U m=o ] z�rw�~ U m%��o ] z r |1U m�z�r ] � U oqz�r ]w�� mpz U rq��t ];|1U m�z�r ] � U m�z�t ]wy� X z7r | rThe elementsof k arecalled vectorsand the elementsof K arecalledscalars.

If the field K of scalarsis clear from the context of discussion,then it is customaryto use thesymbol k insteadof k ( K ). We alsonotethat in comparisonto the algebraicsystemsdiscussedthusfar,multiplication for a vector spaceis not a binary operationon one set, but a rule which associatesanelement m from K and an element r from k with the element maz�r of k .

3.7.2 Examples:

99

Page 108: Image Algebra by Ritter

(i) Considerthe set ��� . It follows directly from Theorem2.8.2 that �g���>����� is anabeliangroupwhich satisfiesaxioms �y� through ��� for all pairs of real numbers� and � . Thus �g���>�����is a vector spaceover � .

(ii) It follows from Example3.5.6 that for any field � , �p�D�����u�/� is an additiveabeliangroup. Itis also easyto seethat if one defines scalarmultiplication by

�a���@�7���������@�C���3��8�S�_�q�¡ �¢y£9���¥¤h¦ §��F�a¨�©��g�s��thenaxioms � � through � � will hold. Thus, � ��� � �g�s� is a vectorspaceover � .

Oneof themostimportantconceptsin thetheoryof vectorspacesis thenotionof linearindependence.

3.7.3 Definition. Let ª ( � ) be a vectorspaceand «��<¬�­C���5­�®���¯�¯�¯B�5­C° ± a subsetof ª . If for everycombinationof scalars�C����C®���¯�¯5¯�����²

�C�s��­:�/���C®s��­:®/��¯�¯�¯��_�C²³��­ ° ��´ µ �=�:��¶¸·�¹ ºs»¼��½ �¾���¯�¯B¯��5¿y�thenthe vectorsin « aresaid to be linearly independentover � . In this definition, 0 denotesthe zerovector in ª and 0 denotesthe zeroof � . If the vectorsarenot linearly independentover � , then they are linearly dependentover � .

Note that if the vectors are linearly dependentover � , then for some combination of scalars�C����C®���¯�¯�¯B�� ²8À �=�>Á�¶ for at leastone »?�ý��¾���¯B¯�¯��¿ suchthat

�C�s��­:ĸ�Å����­:Ƹ��¯�¯�¯��_��°L��­�°���´>ÇIn this casewe can solve for ­�¦ :

­��=� ²ÈÉÊyË�ÌÍÉ�ÎÊyÏiÐ�Ñ ÉÒyÉ�Ó8Ô³Õ�Ö�×BÖ Ñ É³Ø}ÙÛÚ ÉÚ ÏÛÜThat is, Ò Ï can be expressedas a linear combinationof the remainingvectors;i.e., Ò Ï dependson theremaining Ò É ’s.

3.7.4 Examples:

(i) The vectors Ý5Þ Óß�àÓ Ý ß�Ó Þ àâá�ã/ä are linearly independent(over ã ) since

Úaå Ý5Þ Óß�à�æ Ñ å Ý ß�Ó Þ à¼Ø Ý Ú Ó Ñ àFØ Ý ß�Óß�à�çéè Ú Ø�ß�ê�ëyì Ñ Ø�ß�í Ú Ó Ñ áqã Ü(ii) The vectors(-3,6), (3,-4), and (-1,0) are linearly dependentsinceî å Ý Ùâï�Ó5ð7à�æ�ï å Ý ï�Ó�Ù/ñ�à�æ_ï å Ý Ù Þ Óß�à�Ø Ý Ù?ð�Ó Þ î àyæ Ýgò Ó�Ù Þ î à*æ Ý Ù?ï�Óß�à�Ø Ý ß�Óß�à Ü

100

Page 109: Image Algebra by Ritter

(iii) The vectors ó�ôvõ�ö ÷høùù ÷ûúýü�þyÿ�� ôvõ � ÷� ù�úare not linearly independentsince � ô ù ó .

If � is a vector space,then certainsubsetsof � themselvesform vector spacesunder the vectoraddition and scalarmultiplication definedon � . Thesevector spacesare called subspacesof � . Forexample,the set � ô���� ����������������ô ö �� is a subspaceof ��� . Obviously, if ������ �!� � , thendefining " ô$#% ü�þ�ÿ'& ô$#%� , we seethat & ô$#%�éô$#�� ö (�Fô ö ��#%)�Fô ö " for any real number # . Thus,#��� �����Qô*��#% ��#%���Qô*� " � ö " ��� � andaxiom +-, is satisfied.The remainingfour vectorspaceaxiomsare just as easily verified. However,in order to show that a subset� is a subspaceof a vector space� , it is not necessaryto verify axioms + � through +/. . The following theorem,which we statewithoutproof, showsthat in additionto axiom +), , all we needto showis that � is closedundervectoraddition.

3.7.5 Theorem. If � is a non-emptysubsetof a vectorspace� over 0 , then � is a subspaceof�21 the following conditionshold:

(i) 354 ó6� � � � �87�9/: þ ó<; � � �(ii) # � � � = #>� 0 ü�þ�ÿ>� � �@?

Let � ô*A�ó , ��BCBDB-�7óFEHG be a subsetof a vector space� and let I � � � denotethe setof all linearcombinationsof the vectors ó , �DBCBCB(��ó E ? That is,I � � �¼ôKJ/óL�Qó�ô EM N5O , # N ó NQP ?Then if óR� � � I � � � , with ó_ô ESN5O , # N ó N and � ô ESN5O ,T N ó N � we havefor #U� 0 #=ó_ô ESN5O ,V N ó N , where

V N ôW#%# N , and ó�; � ô ESN5O ,/X N ó N with X N ôW# N ; T N ? Therefore, #=ó and ó�; � are elementsof I � � �andby 3.7.5, I � � � is a subspaceof � . The subspaceI � � � of � is said to be spannedby � and thevectorsof � arecalledthe generatorsof the vectorspaceI � � � . If I � � �¼ô � , thenwe say that � isa span for � . In particular,if � is a spanfor � , then every vector óY� � is a linear combinationofthe vectorsin � . For example,if �� ������Z� � , then �� ������ô$[� ÷ �]\ �/;^\ � ÷ � ÷ �(;^�_�`\�� ÷ � ? Thusany vectorin � � can be written as a linear combinationof vectorsfrom � ôaAH� ÷ �b\H���)� ÷ � ÷ ���)�`\_� ÷ ��G . Therefore,I � � �nôK� � . Similarly, if c ôLAd� ÷ ��\H���)� ÷ � ÷ ��G and �� ����e�f� � , then ������ ��ô2��'gh�_��� ÷ ��\H��;$�_� ÷ � ÷ �and, therefore, I � c �nôK��� . It follows that spansare not unique.

Closely relatedto the notion of a spanare the conceptsof basis and dimension. To studentsofscience,the conceptof dimensionis a natural one. They usually think of a line as one-dimensional,a planeas two-dimensional,and the spacearoundthem as three-dimensional.The following definitionmakestheseconceptsmore precise.

3.7.6 Definition. A basisfor a vectorspace� is a linearly independentsetof vectorsof � whichspans� . If a basisfor � containsonly a finite numberof vectors,then � is finite dimensional.

101

Page 110: Image Algebra by Ritter

3.7.7 Example:

(i) Let iFjlknm�odp�q_psrDrCrtp�qHu�p�i[vwkxm�q�pCoHp�q�p�rDrCrtp�q u�p[rDrCr)pyi(z{kxm�q�pCrDrCr�ptq�pCo|u , then }~k��Hi�jFp�rDrCr)p)i)z��is a basis for � z since any vector ��k�m��(jFp�rDrCr(p/��z(uZ�>� z can be uniquely expressedas��k��(jDi�j6���(vDi�v6�$�D�C������z(i)z���} is called the standard basisfor � z , The dimensionof � zis n, the numberof basisvectors.

(ii) Let � jlka� o qq q�� p � vwka� q oq q%� p ��� ka� q qo q�� p����/� ��� k@� q qq o)� �Then ��k@� � jDp � v�p ��� p ��� � is a basisfor �hv|�vDm���u . Any vector �)� �� � � can be uniquely

written as �/� �� � � k � � j�� � � v�� � ��� � � � � � Note that �hvC�vDm`��u is of dimensionfour.

If � is a vectorspacewith basis� � j�p � vDp�rCrDr/p � z/� , thenanyvector

� � � canbeuniquelyexpressed

as a linear combinationof the basisvectors

� k z¡¢5£ j � ¢ � ¢ � It follows that v hasa uniquerepresentation

as an n-tuple vector

� k¤m � j�p � v�p�rCrCr(p � z/u sincethe scalars� ¢ express

�uniquely in termsof a linear

combinationwith respectto the basis � � jDp � v�p-rDrCr)p � z�� .We remindthereaderthatabasisfor avectorspaceis merelyoneof manykindsof basesencountered

in studyingvariousmathematicalsystems.A basisfor a vector spaceportraysthe algebraicpropertiesof the vectorspaceandis intimately connectedwith the linear algebraicpropertiesof the space.Onceabasisfor a mathematicalsystemhasbeenestablished,we may proceedto describethe propertiesof thesystemunderinvestigationrelativeto that basis.The particularform in which thesepropertiesmanifestthemselvesmay well dependuponwhat basiswe choseto studythem. The ¥ z –topologicalspace¦ z hasdifferenttopologicalpropertiesthanthevon Neumannspace¦ z . Themostimportantfactsabouta vectorspacebasiscanbe summarizedas follows. Let � be a vectorspaceand �¤kY� � j p � v p�rCrDr/p � z �¨§f� .

1. If � is a basisfor � , thenevery vector of � can be expresseduniquelyas a linear combinationofthe elementsof � .

2. If every vector of � can be uniquely expressedas a linear combinationof the elementsof � , then� is a basis for � .

3. If � is a basisfor � and ©>§�� with � �ª � m�©!u�« � �ª � m`�¬u , then © is not linearly independent.

Statement2. follows immediatelyfrom the observationthat the zerovectorhasa uniquerepresen-tation in termsof the

�F­’s. Thus, the

��­’s must be linearly independent.Statement3. implies that the

numberof elementsin a basisof a vector spacemust be unique; that is, everybasisof a vector spacehasthe samenumberof elements.With this in mind, we definethe dimensionof a vector space� asthe cardinality of any basis for � .

3.8 Linear Transformations

In the study of vector spacesthe most important typesof mappingsare linear transformations.Itshould,therefore,comeasno surprisethat linear transformationsfrom onevectorspaceinto anotherplayan importantrole in imagealgebrawhich is concernedwith the transformationof digital andcontinuousimages.

102

Page 111: Image Algebra by Ritter

3.8.1 Definition. A linear transformationor linear operator of a vector space®w¯�°6± into a vectorspace²�¯`°R± is a function ³�´µ®¶¯�°�±�·�²~¯`°�± which satisfies³¸¯�¹�ºC»½¼¿¾�ºyÀ�±QÁY¹ ºC³¸¯�»%±[¼h¾ZºC³¸¯`À�±for all »�Â�À¿Ã ®w¯�°�± and for all scalars ¹�Â�¾YÃ�° .

If in addition L is both one-to-oneand onto, the L is called a vector spaceisomorphism. If³Ä´½®w¯�°�±�·Å²�¯`°R± is a vector spaceisomorphism,then ® and ² are said to be isomorphicvectorspaces.

An equivalentdefinition of a linear transformationthat can be found in many text books is givenby the following theorem.

3.8.2 Theorem. ³@´Æ®w¯�°�±�·Å²�¯�°�± is a linear transformation Ç for every ¹2Ã*° and for all»�Â�À@Ã>®(i) ³¸¯�¹�»�±¬Áȹ%³¸¯t»%± and

(ii) ³¸¯�»Æ¼�À�±'Áɳ¸¯�»%±R¼$³¸¯`À�±Proof: Supposethat L is a linear transformation. Then by setting either ¾*Á2ÊZËH̨ÀÍÁaÎin Definition 3.8.1, we obtain that ³¸¯�¹�»%±^ÁϹ%³¸¯�»%± . By setting ¹ÐÁÒÑ�ÁÓ¾ , we obtain³¸¯�»{¼hÀ�±{Á@³¸¯�»%±R¼$³¸¯`À�± .Conversely,supposethat conditions(i) and (ii) hold. Let »�ÔÆÁÕ¹�» and À%ÔÆÁK¾ À . Then bycondition (ii) we have that¯�ÑÖ± ³¸¯�¹�»½¼¿¾�À�±�Á$³¸¯�» Ô ¼¿À Ô ±QÁ�³6¯b» Ô ±[¼×³¸¯ØÀ Ô ±�Âand from condition (i) we obtain¯`Ù±Ú³¸¯�» Ô ±[¼�³¸¯ÛÀ Ô ±QÁ$³¸¯�¹�»�±[¼�³¸¯`¾�À�±QÁY¹%³6¯b»%±[¼�¾%³6¯ØÀ�±�ÜEquations(1) and (2) imply ¯�Ý ±Ú³¸¯`¹�»½¼�¾�À�±�Á$¹%³¸¯�»%±[¼�¾%³¸¯`À�±�ÜThus ³ is a linear transformation.

Q.E.D.

If ³ is a linear transformationmappinga vectorspace®¶¯�°R± into a vectorspace²~¯�°R± , then

(i) ³¸¯�Î_Þ[±lÁ�Î_ß , where Î_Þ and Î_ß are the zerovectorsin ® and ² respectively.

(ii) If À Ô ÂyàDàCàtÂ�À%á are elementsof ® and ¹ Ô ÂCàCàDà�Â�¹[â are scalarsfrom ° , then³¸¯�¹ Ô ºyÀ Ô ¼µ¹Fã6ºyÀ%ãy¼�àDàCàD¼�¹ ⨺yÀ�á�±�Á$¹ Ô ºD³6¯ØÀ Ô ±[¼�¹%ãRºC³¸¯ØÀFã|±[¼$àDàCà|¼×¹ ⨺y³¸¯`À�á ±/ÜStatement(i) follows from the condition ³¸¯�¹Zº�»½¼¿¾ÚºtÀ�±µÁK¹¿ºd³¸¯b»F±�¼×¾hºä³¸¯ØÀ�± with ¹�ÁKÊ and¾�Á>Ê . Statement(ii) can be easily provenby mathematicalinduction.

103

Page 112: Image Algebra by Ritter

3.8.3 Examples:

(i) Recall that the function å2æhç�èxé�ç6ê defined in Example 2.8.3 is one-to-oneand ontowheneverëÅì*íïîdð�ñ�ðyòDòCòtð�ó%ô . Now supposethat õ)ð�õö�÷¿ç and ø(ð�ùZ÷¿ç�è . Thenå�ú`õüûCøþý�õ ö ûsù_ÿwìLú�� õ'ûCø¬ý×õ ö ûbù����tî��tð�� õüûCøþý�õ ö ûsù���`ñ���ð[òDòCò/ð� õ¬ûCø¬ý×õ ö ûbù����ó���ÿìÕúÛõ¬ûCø���î��)ý×õ ö ûtù ��î��tð_õüûCø���ñ���ý�õ ö ûtù �`ñ���ð�òCòDò/ð/õüûCø���ó��Fý�õ ö ûtù �`ó��ÿì���õ¨ûyø���î���ð�õüûCø���ñ���ð[òDòCò)ð õ'ûDø���ó�����ý���õ ö ûtù ��î��tð_õ ö ûbù���ñ���ð�òCòCò)ð�õ ö ûtù �`ó����ì~õüû��`ø���î���ð/ø���ñ��tð[òDòCò�ð(ø���ó�����ý×õ ö û�� ù���î���ðïù �`ñ��tð[òCòDò�ð ù��`ó����ì~õüûCå��`ø��tî��tð ø���ñ��tð[òDòCòtð/ø���ó����[ý�õ ö ûyå��Ûù ��î���ðïù �`ñ���ð[òDòCòtðù �`ó����ì~õüûCå��`ø�� ý×õ ö ûCå�� ù����Thus, å is a vectorspaceisomorphism,and ç è and ç ê are isomorphicvectorspaces.

(ii) Let ��ì�������ð��� �e÷fç and define !�æfç é ç#" by!$�%�&��ì'��� ð(� � ð(� � ý�� ���Then for )nì*�,+ � ð(+ �'÷�ç and -�ð�.*÷�ç!/�,-Úû0��ý1.Úû�)2��ì3!546��-7� � ð�-7� �[ý��8.�+ � ð�.�+ �%9)ì3!$��-7� � ý:.7+ � ð(-7� ý:.�+ �ì'��-7� ý;.�+ ð�-7� � ý1.7+ � ð�-7� � ý1.�+ � ý:-7� ý1.�+ �ì'��-7� ð<-7� � ð�-7� � ý:-7� �-ý=�%.�+ ð�.�+ � ð�.7+ � ý>.�+ �ì3-�û��%� ð�� � ð�� � ý?� ��ý;.Zû���+ ð�+ � ð�+ � ý?+ ��ì'-Zû!/�8�&�-ý;.Zû�!$�%)2�<�Note that if we define the matrix a by@ ì*A B î îî B î C ðthen !$�%�#�Qì3�ED @for each ��÷Zç&F . In general,if a is any GHDZó real valuedmatrix, thenwe canalwaysdefinea linear operator !&I�æ'ç2J�é�ç�ê by !&I��8�&�QìK�LD @for each �¿÷Zç J . The operator ! I is linear since! I ��-�û0�Æý:.�û()2��ì'�,-ÚûM�{ý;.Zû0)2�ND @ìO��-�û0�7�ND @ ý��%.Zû0)2�ND @ ì'- û��%�1D @ ��ý1.Úû��P):D @ �ìQ-�û�!#IR�P�#�[ý;.Zû�!#I��%)2���Thus,we canthink of each GHDÚó real valuedmatrix a asa linear operatorfrom ç2J to ç�ê .

(iii) Considerthe mapping !xæ�ç éÅç defined by !$�P�&� ìÈú8� � ð(� ÿ&� Now!$�%�½ý1)2��ìS!46��� � ð�� ��ýK�%+ � ð(+ �%9ìQ!/�,� � ý:+ � ð(� ý:+ �QìLú%� � ý�+ � ð0�%� ý�+ � ÿ�ðwhile !/�8�&��ý?!$�P)2�QìÕúT� � ð(� ÿ¸ýWú8+ � ð(+ ÿµìLú%� � ý�+ � ð(� ý?+ ÿN�Thus, !$�P�½ý:)#�VUì>!$�%�&�FýK!$�%)2� and ! is not a linear operator.

104

Page 113: Image Algebra by Ritter

(iv) Supposethat W�X�Y�Z�X�[Z�\�\\ Z�X ]�^ is a basisfor _ and `�a�WX�YZ�X�[�Z�\�\\�Z�X�]�^cbd_ is a functiondefinedby `*a X�e5b f e for someelementsf Y Z f [ Z�\\�\ Z f ] of _ . Then ` defines a lineartransformation,againdenotedby ` , of _ into itself. Thelineartransformationis simplya linear

extensionof the original function definedas follows. Let fQg ]heji Ylk e X e and X'g ]hemi Y<n e X e Z .Now extend ` by definingo(pq `'a k X1g k ]r eji Y k esX�e�b k ]r emi Y k e8f�eand

o%t�q `ua�fwv1X:g ]r emi Yok e�v n e

q X�e�b ]r emi Y k e8f ecv ]r emi Y n e8f e�xEquations(1) and (2) imply that ` o k f

q g k `o f q and ` o fyv:X q gz` o f q vK` o X q . Hence,

accordingto Theorem3.8.2, ` is a linear transformation.

From Example3.8.3(iv) onecaninfer thatany linear transformationof a vectorspaceinto itself canbe describedcompletelyby exhibiting its effect on the basisof the space.

Suppose{a/_=b}| is a linear transformation. Then the set W�X:~�_Oa7� o X q g3��^ is called thekernel of ` and is denotedby ����� o ` q . Since ` o � q g�` o�� � X q g � � ` o X q g*� , �w~/���� o ` q x Also, iff&Z�X:~������ o � q , then ` o fyv:X q gK` o f q v1` o X q g3��v:�wg3� , and ` o ��X q g3��` o X q g3� � ��g3� . Hencefyv:X and ��X are elementsof �<��� o ` q . According to 3.7.5, ���� o ` q is a subspaceof _ . In a similarfashiononecanshowthat �����<�<� o ` q is a subspaceof | . We statetheseobservationsasa theorem.

3.8.4 Theorem. If `�a�_=b}| is a linear transformation,then

(a) the kernel of ` is a subspaceof _ , and

(b) the range of ` is a subspaceof |OxThe dimensionof �����<��� o ` q is called the rank of ` , andthe dimensionof the kernelof ` is called

the nullity of ` . The importantrelationshipbetweenrank andnullity is given by the following theoremknown as the DimensionTheorem.

3.8.5 Theorem. If �3a�_=b�| is a linear transformationfrom an n-dimensionalvectorspace _ toa vector space | , then ����� � o ` q v?� � �P�s�s��� o ` q gQ��x

A linear transformation �3a�_Qb�| is nonsingularif and only if it is invertible; i.e., if and onlyif thereexistsa linear transformation�� Y a������<��� o ` q b�_ suchthat `�� Y `�gu� , where � denotestheidentity transformation� o X q gH� on _ .

The next theoremestablishesthe relationshipsof the notionsof nonsingular,dimension,nullity, andrank.

105

Page 114: Image Algebra by Ritter

3.8.6 Theorem. Let  Q¡�¢Q£d¤ bea linear transformationfrom an n-dimensionalvectorspace ¢to an n-dimensionalvectorspace¤ . Thenthe following are equivalent:

(a) ¥ is nonsingular

(b) ¥ is one-to-one

(c) ¦�§�¨ª©8¥�«V¬®­�¯ ° and ¨�±R²<³�§�©%¥�«V¬�¤(d) ²�´�µTµ·¶P¸,¹<©%¥�«�¬*º and ¨�±R²�¦l©%¥»«¼¬�²Proof: The equivalenceof (a) and(b) follows immediatelyfrom Theorem2.5.12.

(b) ½ (c). Supposethat ¾=¬ ¿:¯ and ¾:À5Á�Â�ê©� 5« . Then ¥�©8¾2«Ä¬Å¯ and,hence,�¬�¥�Æ�Ç©�¯�«w¬¥�Æ�Ç�¥�©8¾N«&¬KÈl©P¾2«É¬Q¾ , which is a contradiction.Therefore,¦�§¨ª©%¥�«&¬'­�¯�° . Moreover, ¥ beinginvertible implies that ¥ is onto. Thus, ¨�±R²�³<§�©P¥»«�¬�¤ .

(c) ½ (b). If ¥�©8¾N«1¬Ê¯ , then ¾�¬Ê¯ . Thus, when ¥Ë©�Ì7«;¬Í¥�©8¾N« , we must have that¥�©8¾�Î�Ì7«Ä¬'¯ , which meansthat ¾�¬uÌ . Therefore¥ is one-to-one.Also, if ¨�±�²<³�§�©%¥»«/¬S¤ ,then ¥ is onto.

(c) ½ (a). This is obvious since we already have shown that (c) ½ T is a one-to-onecorrespondence.

(c) Ï (d). This follows immediatelyfrom the definition of nullity and rank.Q.E.D.

This theoremimplies the following corollary:

3.8.7 Corollary. Let ¥>¡�¢Ð£d¤ . Then ¥ is one-to-oneÏ ¦�§�¨ª©8¥»«�¬Ñ­�¯�° .Nonsingularlinear transformationshavethe importantpropertyof mappingbasisinto basis.

3.8.8 Theorem. If ¥ is a nonsingulartransformationfrom ¢H£�¤ , then ¥ mapsany basisfor ¢into a basis for ¤ .

Proof: Let ­�¾ Ç�Ò ¾�Ó Ò0Ô�ÔÔ(Ò ¾�Õ�° be a basisfor ¢ . Then¥1ÖO×Ø ÙmÚ Ç ±lÛ·¾#Û·Ü�¬ ×Ø Û Ú Ç ±<Ûݥ˩P¾&Û%«ÄÀÞ¨�±R²�³<§�©%¥»«&¬3¤àßClearly, ­�¥�©8¾ Ç « Ò ¥�©P¾�Ó« Ò�ÔÔ�Ô�Ò ¥�©%¾#ÕR«�° is a spanof ¤ . Now supposethereexist constantsá Ù ¬¿Vºsuch that ÕØ Û Ú Ç á Û ¥Ë©%¾ Û «&¬Q¯�ßThen ¥ Æ�Ç ÖO×Ø Û Ú Ç á Û ¥Ë©%¾ Û « Ü ¬ ×Ø Û Ú Ç á Û ¥ Æ�Ç ¥�©8¾ Û «&¬ ×Ø Û Ú Ç á Û ¾ Û ¬K¥ Æ�Ç ©,¯ «&¬S¯�ß

106

Page 115: Image Algebra by Ritter

But this is acontradictionsinceit meansthatthevectorsâã�ä�å�ã�æå�ç�çç(å�ã7è�é arelinearly dependent.Hence â0ê�ë8ã äì å�ê�ëPã æì å�ç�ç�ç�å�ê�ëPã èRì é are linearly independentand form a basisfor í .

Q.E.D.

Compositionof linear transformationsprovidesthe fundamentaloperationfor the algebra of lineartransformations.Of particularimportanceis the subalgebraof nonsingulartransformations.Compositionof nonsingulartransformationsis closedin the following sense:

3.8.9 Theorem. Supposeê�îRïñð�í and òKî�ó�ô�õ<ö<÷�ë%ê ì ð�ø . Then ò�ùNê�î�ï®ðdø is nonsingularif and only if ò and ê are nonsingular.Moreover,if ò�ù/ê is nonsingular,thenë�òÞùNê ì�ú ä5û ê ú ä ùò ú ä�üProof: If ò and ê are nonsingular,then clearlyë%ê ú ä ù�ò ú ä ì ù�ë�ò�ùNê ì û ê ú ä ùVý�ò ú ä ù�ò�þ/ù2ê û ê ú ä ùNÿ�ùNê û ê ú ä ùNê û ÿ üThus, ò�ùNê hasan inverse,namely ë�òwùNê ì ú ä û ê ú ä ù5ò ú ä and is, therefore,invertible.

Conversely,supposethat òEùÄê is nonsingular.Then ë�òÞùNê ì ú ä existsandòÞù�� êKù�ë,ò�ù2ê ì ú ä�� û ë�ò�ùNê ì ù�ë�òwùNê ì ú ä û ÿand,hence,êQù5ë�ò�ùNê ì ú ä û ò ú ä . Thus, ò is invertible. Therefore,ê�ù�� ëPê=ù�ò ì ú ä ù�ò�� û � ê�ù�ë8ê�ù�ò ì ú ä ��ùò û ò ú ä ù�ò û ÿwhich meansthat ê ú ä û ë%ê�ù�ò ì ú ä ù�ò . Hence, ê is invertible.

Q.E.D.

As an easyconsequenceof this theoremwe have

3.8.10 Corollary. If ê�î�ï®ðdí is nonsingular,then ê ú ä is nonsingularand ý ê ú ä þ ú ä û ê ü3.8.11 Example: Let êzî� æ ð� æ be definedby êËë���å� ì û ë����å�� ì , where�� û ������������ ��������/å�� û! ���������"�� #�������

and � somefixed angle. Then ê rotateseverypoint ë$��å% ì�& � æ throughan angle � abouttheorigin as shown (Figure 3.8.1).

107

Page 116: Image Algebra by Ritter

x'

y(θ) ( )x,y*( )x,y*

Figure 3.8.1 Planarrotation throughan angle +Since,.-0/�13254�687 +"9 -0/5:;2�7=<�> +�?A@ -$/�1B287=<C> +D9 -�/�:;2�4�6�7 +�E3F /G-�1�4H6�7 +"9 :#7=<C> +8?I@ 1�7�<�> +D9 :J4�6�7 + 2 ?we havethat K ,./G-01 ? :82 E�F /G-�L1 ? L:�2 F / K -01 ? :52 . Furthermore,K ,M-01ON ? :�NP2 9 -�1OQ ? :�QR2 EFSK -$1GN 9 1OQ ? :�N 9 :�QP2F ,T-$1ON 9 1GQP2U4H6�7 +D9 -$:�N 9 :�QP257=<C> +8?�@ -$1GN 9 1GQP2�7=<C> +�9 -�:�N 9 :�QP2�4�6�7 +PEF ,T-$1ONA4�6�7 +"9 :�NA7=<�> + 2 9 -�1GQ4�687 +D9 :�QA7=<C> + 2 ? - @ 1ON37=<C> +D9 :�N34�6�7 + 2 9 - @ 1GQ7�<�> +D9 :�Q4�687 + 2 EF -01ON34�6�7 +D9 :�NA7�<�> +8?A@ 1GNA7=<C> +D9 :�NA4�6�7 + 2 9 -$1OQA4�687 +V9 :�QA7=<C> +8?P@ 1OQ37=<C> +V9 :�QA4�6�7 + 2F -PL1 N ? L: N 2 9 -RL1 Q ? L: Q 2 FWK -�1 N ? : N 2 9XK -01 Q ? : Q 2 YThis showsthat K is a linear transformation.

Defining Z\[A] Q ^ ] Q by Z -RL1 ? L:�2 F -�1 ? :82 , where1 F L1V4H6�7 +_@ L:�7=<C> +a`8bc : F L1D7=<�> +"9 L:#4�687 +"?andusingthe abovemethodof proof, it is easyto showthat Z is alsoa linear transformation.

To find the composition ZedVK , we compute- Zfd�K 2�-$1 ? :;2 FgZ - K -01 ? :52�2 FhZ -RL1 ? L:52 F -PL1"4�6�7 +_@ L:�iPj b3+8? L1D7=<C> +�9 L:k4H6�7 + 2F ,T-�1�4H6�7 +D9 :J7=<�> + 2U4H6�7 +_@ - @ 1�7�<�> +�9 :#4�6�7 + 2�7�<�> +8?F -01�4�687 +"9 :#7=<C> + 2�7�<�> +D9 - @ 1D7=<C> +D9 :#4�6�7 + 254H6�7 +PEFml 1�4H6�7 Q +D9 :#7=<C> Q +8? :#7�<�> Q +�9 :�4H6�7 Q +�n_Fpo 1 l 4�6�7 Q +V9 7=<C> Q +�nU? : l 7=<C> Q +D9 4H6�7 Q +�nRqDF -01 ? :;2 YTherefore, Zrd#KsFht and,hence, ZWFgK_u N . Thus K is nonsingular.

In Example3.8.3, we observedthat any real valued vxwrb matrix correspondsto a linear transfor-mation ]Iy ^ ]{z . This observationalso holds for v|w}b matriceswith entriesfrom any field ~ andlinear transformations� - ~ 2 ^�� - ~ 2 , where � and � arevectorspacesover ~ , respectively.Suppose,for example,that � hasbasis ��� N ?�� Q ?R���P�%?����D� , � hasbasis ��� N ?�� Q ?��P����?������ andthat K�[�� ^� isa linear transformation.Then for each

j F\��?��;?����P��?%v , K - ��� 2 canbe expressedasa linear combination

108

Page 117: Image Algebra by Ritter

of the basisof � : �_�$�I�$�J�W�0�T�������}�$���������W�P�����}�=�¡ ���¢ , where �=�.£_¤r¥ for each¦§�h¨�©�ª;©H«P«�«�©�¬ . Nowlet �­�h® � � � �����P����¯;°#��° be an arbitrary vectorof ± and let �_�$�J�#�h� . Then�_�=�����W�}²e³´ �¡µ3� ¯ � � ��¶ � ³´ �Tµ3� ¯ � �_�$� � �J� ³´ �Tµ3� ¯ �3·¸  ´£¹µ3� � �.£ �»ºR¼½�a²e³´ �¡µ3� ¯U�C�$�¡� ¶ ���{�p²}³´ �¡µ� ¯U�C�$�¡� ¶ �����W���P���¾²­³´ �¡µ� ¯U�C�$�M  ¶ ��¢¿�W�ÁÀTherefore � �  ³Ã�¡µ� ¯U���=�¡�Ä© ³Ã�¡µ� ¯U�C�$�¡��©A«P«�«O© ³Ã�¡µ� ¯U�Å�=�M �Æ . But this suggeststhat the transformation �ÈDZSÉÊ� is nothing more than the matrix product

��¯8��©�«�«P«�©%¯ ³ � ·Ë˸����� �0��� ���P�È�0�0 ����� �0��� ���P�È�0�0 ...

......� ³ � � ³ � ���P�Ì� ³  ¼RÍͽ ����ÎR��©P«�«�«P©%Î� 8�%© (3.8.1)

where Î�£W� ³Ã�¡µ3� ¯U���=�Ï£ for ¦Ð�ѨU©%ª�©�«P«�«R©%¬ , and multiplication and addition are the appropriatefield

operationsin ¥ .

It follows that the transformation � can be representedby the matrix �$�=�Ï£Ò� . Of course, therepresentationof � will bedifferentfor differentbasesof ± and � asthevectorsv andw arerepresentedin termsof linear combinationsof the basisvectors. If we changedoneof the basis,then the questionis “What is the matrix representing� relative to the new basis?”The answerto this questionis closelylinked to the notion of equivalentand similar transformations.

Whentwo vectorspacesare isomorphic,they arealgebraicallythe same,andwe arefree to choosethe simplestonein which to performalgebraicoperationsor solvealgebraicproblems.This observationappliesjust as well to all the other algebraicsystemsusedin this treatise. It is particularly pertinentwhen solving linear imagetransformproblems. It is thereforenatural to inquire as to when two lineartransformationson vector spacesare essentiallythe same.

Considertwo linear transformationsÓ Ç�ÔSÉ!±ÖÕ�×Øg�gÇ��ÙÉ!ÚÛÀSupposethat Ô and � are isomorphicand that ± and Ú are also isomorphic. LetÜ Ç�ÔÝÉ!� ÕÞ×OØàßàÇ�±ÝÉ!ÚÛÀdenotetherespectiveisomorphisms.Since

Üand ß areone-to-oneandontofunctions,theyhaveinversesÜâá � Ç��ãÉÔÕÞ×OØàß á � Ç�ÚÝÉ!±_À

Symbolically, this providesfor the following diagram:ÓÔ äUä�ä�ä�ä�äUä�ä�ä$äåä$ä�äÉ ±Üçæ�è�Ü á � ß æ�è ß á �� äUä�ä�ä�ä�äUä�ä�ä$äåä$ä�äÉ Ú�109

Page 118: Image Algebra by Ritter

Obviously the functions éê­ëhìâíOî�ï�ðsñ�òôóõÌö�÷Oø éï�ë�ìâê�ð»íOîùñ�úÙóûare linear transformations.

Here we follow the conventionof writing the compositionof two transformsin juxtapositionso thatï�ðgëSïùüÞð. If

êXë éêýö�÷Gøçïôë éï , thenê

andï

arealgebraicallythesame; i.e.,ê�þ0ÿ��Jë��=ì íOî ï�ð��Þþ�ÿ��

,which meansthat theresultof computing

êJþ�ÿ��is exactlythesameastheresultobtainedwhencomputing�=ì íOî ï�ð��Þþ�ÿ��

. A similar observationholds for the computationofï_þ���

. Ifê ë éê�öÞ÷Oøpïhë éï , then

we say that the diagramcommutes.We formulatethe notion of algebraicallysimilar as follows.

3.8.12 Definition. Two linear transformationsêXñ�ò óõöÞ÷Oø\ïhñ�ú ó!ûare isomorphicallyequivalentif and only if thereexistsisomorphismsð\ñ8ò ó�ú ö�÷Gø ìsñ�õSóÊûsuch that

êgë ì íOî ï�ð öÞ÷Oø ï¾ëÌì¿êÄð íOî�Two linear transformations ê­ñ�òSó!òãö�÷Gøçï�ñ8úãóúare similar if and only if thereexistsan isomorphismð ñ�ò óúsuch that êXëSð í;î ï�ðÈöÞ÷Oø\ïSë�ðùêÄð íOî.

Note that the notion of similar is simply a specialcaseof isomorphicallyequivalent. Wheneveròôëhõ ö�÷Oøýú�ëhû, and

êand

ïare isomorphicallyequivalent,then they aresimilar.

3.8.13 Example: Let � �� î � denotethe set of all complex valued continuousfunctions on î

. If��� � � {î � , then�

is said to vanishat infinity if ������� thereexistsa compactset ��� �îsuchthat � � þ���� ����� � �"!� � . The norm of

�is defined as# � # ë $%í $ � �Aþ&�'� � ( �

Now let òSë*)��+� � �� î � ñ # � # �-,". öÞ÷OøõÝë ) �+� � � î �_ñ/�10ÒöÞ÷3254&63784Jö�9:2C÷/;G÷<2=9�> .We leaveit to the readerto convincehimself that both

ò ö�÷Gø�õsatisfythe axiomsof a vector

space.Continuousfunctionson î

with finite normareof specialimportancein signalprocessing

110

Page 119: Image Algebra by Ritter

sincethe convolutionproductof suchfunctionsis againa continuousfunctionwith finite norm.In particular,the convolutionproduct ?A@*BDCFE is definedby

?'G�H'IJ@ KLM K BNG&O3I&E'G&HQPAORI�S/OThe vector spaceT togetherwith this product forms an interestingalgebraicstructureknownas a Banachalgebra [20].

Define the transforms UWVNTYXZT\[�]_^+`aVNbcXZb byd UeG�BNI�fgG�H�Ih@ iLM K BNG&ORIkj M'l i M3mon S<Oand d `�Gp?'IpfgG�O3IJ@ ?'G�ORIqsrut Owvrespectively.

The function xyV/T�Xzb definedby xDG�BNI{@}|~ , where�B�G�ORIJ@ KLM K B�G&H'I&j M_��m i S<H vis called the Fourier transformof B . It is well known that the Fourier transformis one-to-one,onto, and preservesthe vector spaceoperations[20]. The inverseFourier transformis given

by B�@ x M_��� �B'� , where

B�G�H�I:@ q��� KLM K�B�G&O3I&j � i m S<O3�

By defining E'G�H�Ih@*� j M i t ByH���� t ByH���we seethat iLM K BNG&ORI�j M'l i M3m�n S<O�@ KLM K BNG&ORI�E�G�H�P�ORI�S<O��Thus, UeG�BNI computesthe convolution UJG�B�IF@*BDC�E . Furthermore,d x�G��'IpfgG��RI:@ �E�G�ORI:@ KL � j M i j M3� i m S<H�@ qqsr�t O �

111

Page 120: Image Algebra by Ritter

Therefore, ���p�_� is simply the product � �p�'�¢¡£�D¤�¥¦ . It now follows from the convolutiontheorem §��¤ ¦ ¡¨�Q© ¦ (see[20]) thatªg«Q¬'­ � «w® ��¯��:¡ ª°«�¬_­ � ®'± ¥¯³²+¡ «�¬_­�± ¥¯-¤3¥¦ ²+¡ «�¬_­�± ¥¯³²Q© «�¬_­�± ¥¦ ²+¡´¯1© ¦ ¡"µe��¯��_¶A similar argumentshowsthat

ª «�·e« ¬R­ ® ¡"� . Thus, µ and � aresimilar.

Sincelinear transformscan be expressedin termsof matrices,the useof terminologyfrom matrixalgebrais natural. Nonsingulartransformscorrespondto nonsingularmatriceswhile similar transformscorrespondto similar matrices. Recall that two n-squarematrices ¸ and ¹ with entriesfrom a fieldº

are similar overº

provided that thereexistsa nonsingularmatrix » with entriesfromº

such that¹c¡"»�¸³» ¬_­ . Eigenvaluesandeigenvectorsalsohavetheir analogousinterpretationin linear transformtheory. In particular,if �W¼¾½´¿À½ is a linear transform,thenany vector ÁYÂý with the propertythat� �pÁJ�:¡ÅÄ3ÁQÆpǾÈsÉ&Ç�ÊQË�ÉÍÌoÎÐÏ5ÎÑÈÒÄis calledaneigenvectorof � . ThescalarÄ is calledtheeigenvalueof � associatedwith theeigenvectorÁ .

Supposethat Ó is representedby the matrix ÓÔ¡\��Õ�Ö ×�� , Á is an eigenvectorof Ó representedby arow vector ��Ø ­�ÙoÚ8ÚÐÚÛÙ Ø8ÜR� , relative to a fixed basis,and Ä is the associatedeigenvalue.Then����Áe�:¡"Ä3Á Ù��Ø ­ Ù8Ú8Ú8ÚÍÙ Ø Ü ��Óz¡"Ä'�ÛÝ ­ ÙÐÚ8Ú8ÚÍÙ ÝÍÞ3� Ùand ��Ø ­�Ù8Ú8ÚÐÚ�Ù ØÐÜR����Óàß�Ä_áÐ�w¡ãâ ÙwhereI denotesthe n-squareidentity matrix and0 the zerovector. This is the matrix form of a systemof n linear homogeneousequations,and a nonzerosolution ��Ø ­ Ù8ÚÐÚ�Ú8Ù Ø Ü � exists ä Óåß�Ä_á is singular.This occurs äçæ/èéÕ��&Ózß�Ä_áÐ��¡Wê . From our knowledgeof determinantswe seethat

æ<èoÕ���ÓWß�Ä_áë��¡*ììììììììÕ ­�­ ßíÄ Õ ­�î ÚÐÚ8Ú Õ ­ ÜÕ î�­ Õ î�î ßíÄ ÚÐÚ8Ú Õ î Ü

......

...Õ Ü ­ Õ Ü î ÚÐÚ8Ú Õ Ü8Ü ßíÄ ìììììììì¡ïê

is a polynomial equationof degreen in Ä , say��ß�ð�� Ü Ä Üòñ�ó ­ Ä Ü ¬_­ ñ ¤8¤Ð¤ ñôó Ü ¬_­ Ä ñ�ó Ü ¡ïê Ùwherethe

óÍõ’s aresumsof productsof the Õ õ÷ö ’s. Thepolynomial æ<èéÕ��&ÓWß�Ä_áé� is calledthecharacteristic

polynomial of matrix Ó and also of the transform Ó . The equation æ<èéÕ��&Ó�ßÅÄ_áÐ��¡ïê is called thecharacteristicequationof Ó and the roots of the characteristicequationare called the eigenvaluesofthe matrix Ó .

Our discussionhasestablishedthe following result:

3.8.14 Theorem. The eigenvaluesof a matrix ø are the eigenvaluesof the linear transformationrepresentedby ø in any coordinate system.

112

Page 121: Image Algebra by Ritter

3.8.15 Theorem. If ù and ú are similar, then ù and ú havethesamecharacteristicpolynomialandhencethe sameeigenvalues.

We presenttwo different proofs of this theorem,one formulatedin the languageof matrix theoryand the other in the languageof transformations.

Proof: (First method)If ùyû"ü{ú�ü�ýRþ , thenùYÿ����ûïü{ú�ü ý_þ ÿ���� ûïü���úÅÿ�����&ü ýRþ��� �&ù�ÿ������hû�� �� ü�� ��� �&ú�ÿ�������� ��� ü ý_þ� û ��� ��ú�ÿ��������(Secondmethod) If ù and ú are similar, then they representthe same transformation �relative to differentbases.The eigenvaluesof � dependonly on � andare independentof thecoordinatesystem(Theorem3.8.14). Hence ù and ú havethe sameeigenvalues.Therefore,their characteristicpolynomialsare alike exceptpossibly for a multiplicative constant. Thus,�� ��ùYÿ������ û����&úWÿ����� for all � . For �Ãû�� we have

��� ��ù��Òû���� ��� �&ú �!� , so that ��û#" ,sincesimilar matriceshavethe samedeterminant.

Q.E.D.

We concludethis sectionwith the well-known fact that the diagonalelementsof a triangularmatrixare its eigenvalues.The proof is straightforward andwe leaveit asan exerciseto the reader.

3.8.16 Theorem. Theeigenvaluesof a triangular matrix are the diagonalelements.In particular, theeigenvaluesof a diagonalmatrix are the diagonalelements.

3.9 Linear Algebras

One way of viewing linear transformationsis as operatorsthat transformvectorsof onespaceintovectorsof the samespaceor a different space.New insight into the behaviorof linear transformationscan be gainedby viewing them as operandsinsteadof operators. If $ denotesthe set of all lineartransformationsof a vectorspace%��'&(� into itself, thenwe defineanadditionandmultiplicationon $ by

��)+* , �-�.)�*/�!�10/�:û.�2�'0/�3)�*/�40/�657098:%��;&/�and ��<=* , �'��<>*?���40/�hû.�2��*@�-0/�A�B5C098C%D�4&/�for all *E5!�F8G$ .

Thesetwo operationsendow $ with a rich algebraicstructure. First note that �;$H5I)J� is an abeliangroup. The additivezero is the transform KL8:$ defined by K��'0@�:ûNM , where M denotesthe zerovectorin % . If �O8N$ , then its additive inverseis the transform ÿ>� definedby ÿ=�2�-0/��û ÿJ�-�2�40/�A� . Also,for PQ5R*E5S�F8#$ we have

�-�+)�*@���-0/�hû.�2�40/�T)�*/�40/��û�*/�-0/�B)9�J�40/�hûU�!*V)9�2���40/�113

Page 122: Image Algebra by Ritter

and WYX[Z�W!\:Z^]J_!_!W4`/_?aNXbW'`/_BZ.WA\:Z�]2_!W-`/_cadXbW4`/_TZ�W!\/W-`/_3Z^]2W4`/_A_aUW;XbW'`/_�Z+\@W-`/_�_3Z^]2W'`@_?a�W�W;X+Z�\@_�W4`/_A_3Z^]2W'`@_?a�W�W;X+Z.\?_TZ�]2_!W-`/_fe

This provescommutativity and associativity.

Defining scalarmultiplication on g by

h ]jikW h ]2_!W'`/_ca h W4]2W'`@_A_�lV`9mCn�WYo/_for all

]pm g and h m�o , we obtainq h W!\VZ9]2_4rYW-`/_ca h q W�\:Z9]2_AW'`@_-rTa h q \/W-`/_3Z^]2W'`@_-ra h W!\/W-`/_A_3Z h W4]2W4`/_A_@a�W h \/_AW'`@_BZ.W h ]2_�W4`/_ca�W h \:Z h ]s_!W-`/_and q W h Z�t?_4]>rYW4`/_Ea�W h Z�t?_!W-]2W4`/_A_@a h W4]2W'`@_A_TZ9tuW4]2W-`/_!_?a�W h ].Z^tv]s_AW4`/_�eThis shows that

h W!\:Z9]J_?a h \:Z h ]FwyxRz�W h Z9tu_4]�a h ]�Z9tv]9eTheseobservationsprovide us with the next theorem.

3.9.1 Theorem. g is a vector spaceovero

.

In our observationswe havenot takenthe multiplication]d{D\

into account. As remarkedin theprevioussection,multiplication,which is definedascomposition,is a fundamentaloperationin thealgebraof linear transformations.The importanceof this multiplication is establishedby the following fact.

3.9.2 Theorem.W g lIZQl{|_ is a ring.

Proof: We alreadyknow thatW g lZJ_ is an abeliangroup. Multiplication is clearly associative

(but in generalnot commutative). To completethe proof that g is a ring we prove the leftdistributive law

]�{=W!\:Z9X}_@aFW4]�{>\/_TZ�W4]�{~Xb_and leavethe right distributivity to the reader. We have

q ]�{=W!\:Z�Xb_-r-W'`/_�a+] q WA\:Z�Xb_!W-`/_'r�a+]2W!\/W-`/_3Z9XbW'`/_A_a.]JW!\/W4`/_A_3Z^]2WAXbW4`/_A_uaUW4]�{>\?_�W4`/_BZ.W']�{(Xb_�W-`/_ca q W']�{=\@_TZ�W']�{(Xb_'r-W-`/_fe

Q.E.D.

Restrictingour attentionto non-singulartransformations,we canmakean evenstrongercasefor theoperationof multiplication. Let � a2�y]�m g i~]��1��x���x��E�;��x������1w|�� .

114

Page 123: Image Algebra by Ritter

3.9.3 Theorem. �A������� is a group.

Proof: It follows from Theorem3.8.9 that � is closedundermultiplication. The associativelaw holds in � sinceit holds in � . Let ����� be the identity map ���-�/�>��� . Evidently � isnon-singularand,hence,a memberof � . It is the multiplicative identity since

�-�s�@�J�!�4�/�?�.���-�2�'�/�A�u�+�2�4�/�?�.�2�4���-�/�A�u�U�4���@�f�!�4�/�f�Sinceeach ���C� is a one-to-onemapping,it hasan inverse �2��� definedby �J�f���'�2�4�/�A�@�.� .Obviously, �-�2���~�/� �|�-�/�?�.�2���|�-�2�'�@�A�@�.�7�.�¡�Y�2�����4�/�4�2�¢�Y���@�2���y���'�/�f� Also, theinverseof a one-to-onefunction is one-to-oneand,hence,�2���£��� . Therefore � is a multiplicativegroup.

Q.E.D.

Vectorspaces,linear transformations,andmatrix operationsareso vital in applicationsthat they areusuallystudiedunderoneparasolcommonlyknownaslinearalgebra. In theprevioussectionweobservedthat linear transformationsandmatricesarealgebraicallyequivalententities,while Theorem3.9.1showsthat thesetof lineartransformationsona vectorspaceis itself a vectorspace.Theseobservationsactuallyprovide the basisfor a formal definition of the somehowfuzzy conceptof linear algebra. Specifically,a linear algebra over a field ¤ is definedas a set ¥ having addition and multiplication, togetherwithscalarmultiplication by elementsof ¤ suchthat the following axiomsare satisfied:

¦ � Under additionand scalarmultiplication, ¥ is a vector space¥=�;¤/� over ¤¦@§Multiplication is associative¦?¨Multiplication is both left and right distributive over addition¦?© ¥ has a multiplicative identity element¦@ª �;«/¬­�u�}®>¯ ��°.®2�A«/¬ ±²� �#«/¬³�'�[®/±���´ �~�!±µ�¶¥¸·|¹�º»´�«b�:¤

In axiom¦/ª

the symbol ¬ correspondsto scalarmultiplicationand ® to themultiplication definedon¥ . It follows that a linear algebra¥ over ¤ consistsof two setstogetherwith five distinct operations

¥=�;¤(�u��¼�¥ �½¤A��¾Q��¿D�!ÀÁ�y¬Â�®yÃ@�where ¼�¥D�½¤~�¾Q�¿D�½ÀÁ�y¬Äà is a vector space. Here ¾ and ¿ denotethe field operationsof addition andmultiplication on ¤ , À denotesvectoradditionin ¥ , and ¬ denotesmultiplicationof a vectorby a scalar.Of course,we follow theconventionalabuseof notationandlet + denotevectoraswell asscalaradditionand ¬ denotebothmultiplication on ¤ aswell asscalarmultiplication of a vector. Indeed,in manycaseswe shall evendispensewith the symbol ¬ entirely and simply write «v� in order to denote «7¬|� . Thisabuseof notationcausesvery little confusionas the type of operationan authorhasin mind is usuallyapparentfrom the context in which it is used.

3.9.5 Examples:

115

Page 124: Image Algebra by Ritter

(i) The field Å of complex numbersis a linear algebraof dimension2 over the field Æ of realnumbers. Å�Ç;Æ/È is a vectorspaceof dimension2 that satisfiesaxioms É@Ê through É@Ë .

(ii) Ì Ç;Í(È is a linear algebra. This follows from Theorems3.9.1 and 3.9.2. If Ì is the set of alllinear transformationsof a vector spaceÎDÇAÍ/È of dimension Ï , then Ì ÇAÍ/È is of dimension Ï Ê .Hencethe algebra Ð7Ñ�Ç4Í/È of all ÏCÒ^Ï matricesover Í is alsoa linear algebra.

(iii) An importantexampleof a linearalgebraof dimensionfour wasgivenacenturyagoby Hamilton.Theelementsof thisalgebraarecalledquaternions, andthescalarsarerealnumbers.Historically,the algebraof quaternionscanbe consideredasthe forerunnerof matrix algebra.A quaternionis an expressionof form

ÓSÔyÕbÖ9Ó Ê× Ö�Ó�Ø1Ù=Ö9Ó�ÚyÛ?ÜThe 4–tuple Ç ÕRÝ × Ý�Ù�Ý4Û È is a basiselementand Ó�Þ2ß Æ for àDáãâ Ýäyä�ä½ÝAå . Let æ denotethe setall quaternions.As an additive group we may view æ as ç'Æ Ú ÝÖ>è , whereaddition is definedcomponent-wise.In particular,renamingthe componentsof the basiselementsby

Õ á�ǽâ ÝêéfݽéSݽé È Ý ×vá�Ç éSÝ â Ý�éSݽé È ÝsÙ á�Ç éSݽéfÝ â Ý4é È Ý:ë|ì�í�Û á�Ç éfݽéSݽéfÝ â|Èand agreeingto let

Ó Ô á�Ç Ó Ô Ý½éfݽéSÝ4é È Ý:Ó Ê ×TáUÇ éSÝ½Ó Ê Ý½éSÝ�é È Ý²Ó Ø Ù á�Ç éfݽéSÝ½Ó Ø Ý½é È Ý:ë|ì�í�Ó Ú Û á�Ç éfݽéSݽéfÝ½Ó Ú È Ýthen it follows from our definition that

Ç Ó Ô Ý½Ó Ê Ý½Ó Ø Ý½Ó Ú È@á Ó Ô Ö�Ó Ê × Ö�Ó Ø Ù~Ö�Ó Ú ÛÁÜThus, Ç Ó Ô Ö�Ó Ê × Ö�Ó Ø ÙHÖ�Ó Ú Û È Ö Ç;î Ô Ö î Ê × Ö î Ø Ù~Ö î Ú Û È

á�Ç Ó Ô Ö î Ô È Ö Ç Ó Ê Ö î Ê ÈA× Ö Ç Ó Ø Ö î Ø È Ù~Ö Ç Ó Ú Ö î Ú È ÛÁÜDefining scalarmultiplication by

Óbï Ç Ó Ô Ö9Ó Ê × Ö9Ó Ø Ù~Ö�Ó Ú Û È/á�Ç Ó�Ó Ô È Ö Ç Ó�Ó Ê È;× Ö Ç Ó�Ó Ø È Ù(Ö Ç Ó�Ó Ú È Ûturns æ into a vector spaceover Æ .

Multiplication on æ is definedin termsof the componentsof the basiselements:

Ó�Õ á Õ�Ó á Ó�ðRÓ@ß æ Ý × Ê á Ù Ê á Û Ê áòñ Õ�Ý:ë|ì�í× Ù á ÛuÝsÙyÛ áN× Ý:Û ×Tá Ù�ÝsÙ ×�áòñ Û�ݲÛ�Ù áòñD× Ý:ë|ì�í × Û áóñ Ù/Ü

To insure that the distributive law holds, we define

Ç Ó Ô Ö�Ó Ê × Ö�Ó Ø ÙCÖôÓ Ú Û ÈAÇ;î Ô Ö î Ê × Ö î Ø Ù^Ö î Ú Û Èá�Ç Ó�Ô î Ô ñ Ó ÊîÊ@ñ Ó�Ø î Ø ñ Ó�Ú î Ú È Ö Ç Ó�Ô îÊ Ö9Ó Êî Ô@Ö9Ó�Ø î Ú ñ Ó�Ú î Ø ÈA×Ö Ç Ó�Ô î Ø ñ Ó Êî Ú@Ö�Ó�Ø î Ô?Ö�Ó�Ú îÊ�È Ù~Ö Ç Ó�Ô î Ú(Ö9Ó Êî Ø ñ Ó�Ø î�Ê Ö9Ó�Ú î Ô È ÛÁÜ

Obviously, since × Ù á ÛGõá ñ Û á Ù × , multiplication in æ is not commutative. However, ifÓ á Ó Ô ÖNÓ Ê × ÖöÓ Ø Ù2Ö�Ó Ú ÛLõá é , then÷øù ø ù ï½ø á Õ�ÝVú>û�üý�ü ÷ø á Ó Ô ñ Ó Ê ×dñ Ó Ø Ù ñ Ó Ú ÛÁÝ:ëþì�í ù ø ù á Ó ÊÔ Ö�Ó ÊÊ Ö9Ó ÊØ Ö9Ó ÊÚ Ü

116

Page 125: Image Algebra by Ritter

Therefore,everynonzeroelementof ÿ hasa multiplicativeinverse.Fromthis we mayconcludethat ÿ is a non-commutativedivision ring that satisfiesaxioms ��� through ��� . In 1878,Froboeniusprovedthat ÿ is the only non-commutativelinear division algebraover � .

The linear algebraof Example3.9.5(ii) plays as importanta role in the theoryof linear algebraasthe symmetricgroup ��� doesin group theory. In Section3.4 we remarkedthat everygroupof ordernis isomorphicto somesubgroupof ��� . Analogously,any linearalgebraof dimensionn is isomorphictoa subalgebraof ���� (or � ����� ��� ). This fact providesa concreterepresentationof any suchabstractlinear algebraanda striking illustration of the generalityof linear transformationsand their importancein linear algebra.

3.10 Group Algebras

Cyclic convolutions,which amountto polynomialmultiplication (3.6), area specialcaseof multipli-cation in a groupalgebra.PaulD. Gader[12] andD. Wenzel[22] werethe first to note the connectionbetweengroup algebras,image algebra,and group algebraapplicationsto image processing. In thissectionwe briefly discusssomeof the backgroundof group algebras.

Let �������������! #"%$ be any multiplicative groupand & be any commutativering with unity. Let&'��� denotethe set of all formal sumsof form(�*),+.- � � �/where - � 0& / � � 0� /21*354 - � �76 for all but a finite numberof indices � . If 8� 9&'��� with8:�<; �,),+ - � � � , then the - � ’s arecalled the coefficients of 8 . If =0 >&'��� with =?�<; �,),+A@B� � � , thenwe define addition by 8DCE=F� (�,),+ - � C @*� G� �HIt is clearthat - �IC @ �'�06 exceptfor a finite numberof indices � , so 8%C�=J K&L��� . Theadditiveidentityis given by 6M��; ��)N+ 6*� � . Since & is a commutativering, we haveas an immediateconsequencethat�&L��� / CO is an abeliangroup.

Multiplication of two elementsof &'P�� is definedby8RQ�=F�TS (�,),+U- �V�W�*X9S (�,),+ @ �*�W�*X<� (��)N+>YZ ([]\�[]^�_`[Va -Bb @Bcedf �W� HObservethat the productof two elements� b / � c g� is someelement� � �h� b � c K� . Thus,naively,weformally distributethesum ; �,),+ - � � � over thesum ; ��)N+ @ � � � andrenamethe term - b � b @ c � c by - b @ c � � ,where � � �9� b � c in � . Since -Bb and @ c are0 for all but a finite numberof � ’s, the sum([ \ [ ^ _`[ a -Bb @ c

117

Page 126: Image Algebra by Ritter

containsonly a finite numberof nonzerosummandsiBj,k�lnmpo and,hence,is an elementof o . Clearly,againat mosta finite numberof suchsums qrtsurtvPw`rVx i j k l arenonzero.Therefore,yDz�{hmpo'|�}�~ .

The multiplication z is called group convolutionand the distributive laws of multiplication overaddition follow at once from the definition of addition and multiplication. For the associativityofmultiplication we have������B� i �*�W�*��� ������N� k �N�W�,� ������N��� �*�W���O�p� ������N� i ���W�,���� ����N�F�� �r�s�r�vuw`r�x k j � le�� �W�*��� ����N�>�� �r��er s r v w`r x iV�Wk*j � l �� � ����� ��,�,�E�� �r]�er s w`r x i*��k*j �� � � �� � ��,�,��� � � �,���� � ��,�,� i � � � � � ��,�,� k � � � ��� � ��,�,��� � � � �0�Thus, we haveproven the following theorem.

3.10.1 Theorem. If } is anymultiplicativegroup, then |�o'|P}�~��e� �Vz,~ is a ring which is commutativeifand only if } is a commutativegroup.

Rings havethe two primitive operationsnecessaryfor defining the elementsof o'|�} ~ . Any morespecializedstructurehaving thesering operations,suchasa field, canof coursebe usedaswell.

3.10.2 Definition. The ring oL|�}�~ definedaboveis called the group ring of } over o . If ¡ is a field,then ¡�|�} ~ is called the group algebraof } over ¡ .

3.10.3 Examples:

(i) Let } bea cyclic groupwith generator¢ definedby theoperation¢¤£B¥G¢§¦ � ¢�¨ , where ©��,ªW��«RmK¬and « � ©��Eª . Then } �®­ ¢¯£#°±©�mK¬³² and¡U|�}�~ �µ´ � £ �,¶ i £ ¢ £ °ni £ �0·¹¸»º�¼U½*¾¿¾`À¯Á¯Â�Ã�įÅÆÂ�Çe¾ÉȠʳ½,Ä§È ©�mK¬EË �The polynomialsare a subsetof this group algebradue to the constraint i £ �Ì· for ©ÎÍ · .The multiplication of this group algebracorrespondsto linear convolutionswhen restrictedtopolynomials. Also note that } is isomorphicto ¬ and, therefore,¡U|�}�~UÏ2¡�|�¬�~ .

(ii) Let }OÐ � ­ ¢ £ °%©�mK¬ÑÐ ² with multiplication definedby ¢ £ ¥§Ò ¦ � ¢5Ó £ÕÔ`¦]ÖØ×Ù�Ú Ð . Then cyclicconvolutioncorrespondsto multiplication in the groupalgebra ¡U|�}�Ð�~UÏ2¡�Û�ÜÑÝ¯Þ .

118

Page 127: Image Algebra by Ritter

(iii) Let ß àâáäãã à å.æ�ç§ètçêé]è5æ�ç¯èVë,éeè5æ]ë�ètç�étè5æeë�èBë*éäì and let multiplication of elementsof G bedefined in terms of the exclusive or (xor); e.g., æPç`ètç�éîí5æ�ç¯ètç�é>à æPç¯ètç�éeèïæeë�ètç�éîí5æeë�èBë*é>àæ�ç`èBë*é]èðæ�ç¯èBë*éí§æ�ç¯ètç�é�àÌæ�ç¯èBë*é , etc. Renamingthe elementsof G by ñ�ò,è�ñ�ó,è�ñ ã è�ô,õ�öFñ�÷ , weobtain the group algebra ø æ�ß�éùà ønú á ããeû àµü'ýþÆÿ���� � þ ñ þ�� � þ��

ø �Moregenerally,let ß à9á � ã andsupposewehavedenotedtheelementsof ß by ñ ò è�ñ ó è������eè�ñ ã������ .Then if ñ þ àïæ�� ò è�������è�� ��� ó é and ñ��0à æ�� ò è������5è�� � � ó é , where ��!�è"��! � åBç`èBë*ì for # àç¯èäë�è$�����5è�%'&�ë , we define ñ þ í�ñ � à�ñ(!*) ñ(!#à æ+� ò è������5è�� � � ó é�í§æ,� ò è�������è-� � � ó é . Again,multiplication is definedcomponent-wisein termsof the usualexclusiveor of binary numbers.The groupconvolution . of the groupalgebra/�æ�á � ã é is called the Walshconvolution.

For eachgroupelement 0 � ø æ�ß�é andeach 1 � ø we definethe scalarproduct 1�0 by120Fà3154�ý6�ÿ�7 � 6 ñ 6�8 à�ý6,ÿ�7 æ+1 � 6 éÆñ 6 It is easily shown that this scalarmultiplication satisfiesaxioms 9 ó through 9$: (Section3.7). Thus,æ ø æ�ß�étè<;Oé togetherwith scalarmultiplication is a vector spaceover

ø.

From our previousdiscussionwe also know that

ø æ�ß�é satisfiesaxioms = ó è>= ã , and = ÷ . Suppose1 and ? representthe multiplicative identities of

øand ß , respectively. Considernow the element@ � ø æ�ß é definedby @ à�ý6�ÿA7 � 6 ñ 6 è

where � 6 à2ç for all but one B , say B ò , and � 6�C à<ë while ñ 6�C àD? . It then follows that0E. @ à @ .F0Fà30HGI0 � ø æ�ß�é This showsthat

ø æ]ß é alsosatisfiesaxiom =KJ . Axiom = : is a trivial consequenceof the definitionsofscalarmultiplication and group convolution. This establishesthe following

3.10.4 Theorem. A group algebratogetherwith scalar multiplication is a linear algebra.

3.11 Lattice Algebra

Theconceptof latticeswasformedwith a view to generalizeandunify certainrelationshipsbetweensubsetsof a set,betweensubstructuresof an algebraicstructuresuchasgroups,andbetweengeometricstructuressuchas topologicalspaces.The developmentof the theoryof latticesstartedabout1930andwas influencedby the work of GarrettBirkhoff [3].

119

Page 128: Image Algebra by Ritter

Let L be a partially orderedset with partial order M . An upper bound (if it exists) of a subsetNof L is an element OQPRL such that STMUO'VWSTP N . The least upper boundof

N, denotedbyXZY�[ N

or \ Y-] N , is an upperbound O�^_P`L ofN

suchthat O�^aMDO for everyupperbound O ofN

. Bythe anti-symmetrypropertyof partially orderedsets, \ Yb] N is uniqueif it exists. The notionsof lowerboundand greatestlower bound, denotedby c Xd[ N or egf$h N , are defined dually as in 2.10. Again byanti-symmetry, egf h N is unique if it exists.

3.11.1 Definition. A lattice is a partially orderedset i any two of whoseelementsSkj<O havea c XZ[ ,denotedby SalmO , and a

XZY�[, denotedby SanmO . A sublatticeof a lattice i is a subset

Nofi , suchthat for eachpair S�j�O�P N we havethat SonmO`P N and SalmODP N . A lattice i is

completewheneverfor eachof its subsetsN

, egf h N and \ Y-] N exists.

SettingN p i , we seethat any non-emptycompletelattice i containsa leastelement q and a

greatestelementr . Theseelementsarecommonlycalled the universalboundsof i . It is alsoobviousthat the dual of any lattice is a lattice, and that the dual of any completelattice is a completelatticewith c XZ[ and

XdY�[interchanged.

3.11.2 Examples:

(i) In 3.1 we observedthat s togetherwith the relation of lessor equal t<uwv is a totally orderedset. If SEn�O pyx{z S |ASkj�O~} and S{l`O p�x egfk|ASkj�O�}�V$Skj�O�P�s , then s togetherwith theoperationsof n{�����El is a lattice. However, t+s�j$n�j�l�v is not a completelattice as thereis nolargest and smallestnumber.

(ii) Let s"� � p s��`|(���3j2��} , the set of real numberswith the symbols � � and � adjoined.Define � � ��S���� V$SRP�s and � � u�S�u�� V S3P�|(� �Rj2�Q} . Then t�s�� �mj�n"j�lKv isa completelattice with largestelement � and smallestelement � � . The dual of this latticeis obtainedby replacing u with the relationof greateror equal � . Obviously, t+s�j$n�j�l�v is asublatticeof t�s�� �{j n"j�lKv .

(iii) The powerset ��� togetherwith the order relation � of set inclusion is a completelattice withlargestelement

Nand smallestelement � . For any family � p |��� ¢¡w£mP{¤m} of subsetsofN

, egf h�� p ¥ �¦�§ ��  and ¨ Yb] � p © �¦�§ ��  .(iv) The set s�ª ^� p s�«���|A¬�j �Q} with the relation u is a completelattice. Here0 is the smallest

elementand � the largest element. ­gs ª ^� j n"j l�® is a sublatticeof t�s�� �{j n"j l�v but not oft+s�j$n�j l"v .(v) We partially order sK¯ by h`u�cU° hkt+S�vFu�c t�S v{V$SwP N anddefine ± p h�n_c by±�t+S�v p³² hkt+S�vµ´·¶�c$t�S v"u�hkt+S�vc t�S v ´,¶"h�t¸S�vK�¹c$t�S�v

and º p h»l�c by º�t+S�v p�² hkt�S vµ´¼¶Fh�t�S v"u�c$t�S�vc t�S v ´¼¶�c$t�S�vK�Rhkt+S�v�½120

Page 129: Image Algebra by Ritter

Then ¾�¿�ÀWÁ Â�Á�Ã�Ä is a lattice which is not complete. However, Å�¿5ÀÆkÇÈÁ�Â"Á Ã"É is a completelatticewith smallestelementthe constantfunction Ê definedby ÊkÅ+Ë�É"ÌÎÍ ÏÑÐ$ËwÒÔÓ andlargestelementthe constantfunction Õ definedby Õ�Å�Ë�ÉÖÌ�Ï Ð$Ë>Ò>Ó .

The binary operationsà and  on latticeshaveseveralimportantproperties,someof them beinganalogousto thoseof ordinarymultiplicationandaddition. Thefollowing propertiesareeasilyverified[3].

3.11.3 Theorem. If ÅZÓ�Á�×ØÉ is a partially orderedset,thentheoperationsof  and à satisfythefollowingequations(wheneverthe expressionsreferred to exist):

(1) Ë{Ã�ËQÌUË�ÁÙËÚÂÛËQÌUË ÅdܼÝ�Þ2ß_à á-â¸Þ2ãäâ2É(2) Ë�ÃÛå�Ì�åoÃmËkÁæËÚÂmåçÌ�å>ÂmË Å�èéá-ßoßëê~â<ì�âíÜïîbÞ�É(3) ËoÃ�Å+åWÃÈð�É�ÌÙÅ�Ë>Ã�å�É�Ã{ð~ÁDË�ÂmÅ+åØÂ�ðñÉ�̳Å�ËoÂÈå~É5Âmð Å�ìAò�ò�á~è�Üóì�â�Üôî-Þ�É(4) ËaÃ`Å�ËoÂÈå�ÉõÌ�ËÚÂÛÅ�Ë>Ã�å�ÉõÌ�Ë Å+ì�ö�òíá�÷�à~â�Üôá-ã É(5) ËQ×�åÎø ËoÃmåE̳Ë�ÁÙËù×úå�ø ËaÂmåEÌúå Å+èéábã�ògÜZò�â�Þ2ã�èéû�É(6) If Ó hasa leastelementü , then ü¢ÃÚË»ÌDü ý(þ ÿ'üTÂmË»ÌDË*Ð$ËWÒwÓ(7) If Ó hasa largestelementÕ , then Õ>Ã�Ë�ÌÙËÎýäþ ÿ'Õ>Â�Ë�Ì�Õ�Ð$ËWÒwÓ

Observethat in the abovetheoremwe do not require that the partially orderedset be a lattice.In fact, Dedekind[11] usedproperties(1) through (4) to define lattices,and Birkhoff [3] proved thatthesepropertiescompletelycharacterizelattices.For lattices,we havethe following additionalalgebraicrelationships.

3.11.4 Theorem. If Å�� Á2Â"Á ÃKÉ is a lattice with partial ordering × , then

(1) å�×Ùð�� ËoÃmå`×ÙËoÃÛðÎýäþ ÿ Ë_Âmåç×úË�ÂÚð ÅdÜóò�ábâ¸ábã~Þ�É(2) Ë�×úð�� ËaÂ�Å�åWÃÈð�ÉI×�Å�Ë>ÂÈå�É�ÃÚð Å�ßoáñÝñê��óì�÷�Üôâ+û�É(3) ËaÃ�Å�å ÂÈðäÉ��KÅ+ËoÃÈå~É�Â�Å+Ë Ã�ðäÉ Å¸Ã�ÝbÜZò�â¸÷íÜ�ö~ê�â�Ü�îbÜôâ�û�É(4) ËaÂ�Å�åWÃ�ðñÉõ׳Å�Ë>Â�å�É5Ã`Å�Ë_ÂÈðñÉ Å�ÂæÝbÜZò�â�÷�Ü�ö�ê~â�Üôî-Üôâ�û~ÉProof: We shall only prove property(2). The remainingpropertiesare just as easyor followdirectly from Theorem3.11.3.

(2) Obviously, Ë'× Ëç å and, by hypothesis, Ë'× ð . Hence, Ë'× Å�Ë>Â�å�É�ÃQð . Also,å5ÃÖða×�åa×�Ë�ÂÖå and å5ÂÖða×�ð . Thus, å5ÃÖða×RÅ+Ë Â�å�ÉAÃÖð and,hence,ËÔÂWÅ�å ÃÈðäÉF×�Å+Ë>Â{å~É�ÃÖð .Q.E.D.

It is often convenientandmuchsimplerto dealwith only oneof theoperationsof  or à andobtainequivalentrelationsfor the other throughduality. For this, the following notion is helpful.

3.11.5 Definition. A semilatticeis a commutativesemigroup Å���Á� �É which satisfies the idempotentlaw Ë� ËHÌÎË .

121

Page 130: Image Algebra by Ritter

It follows from Theorem3.11.3that everypartially orderedset � for which the operation ����� isdefinedfor eachpair ��������� is a semilattice.Conversely,underthe relationdefinedby

������� �! "�$#%�&�any semilatticewith binary operation becomesa partially orderedset in which �� "�$#%')(+*-,.�/�0�01 .3.11.6 Example: 2�34�5�76 is a semilatticewith dual 2839��:;6 . If 3=<>#%3@?A,CB�1 , and 37D�<E#F3G?�,IH5BJ1 ,

then 2�37D�<K�-�L6 is a semilatticewith dual 2�3;<��M:L6 . Note that the semilattice 2N37D�<K�-�;6 is amonoidwith zeroelementHOB since PQ�R2SHTBU6V#W2�H5BJ6X�YPR#FP$Z[P\��3 D�< . Similarly, 2N3 < �-:Q6is a monoid with zero element B .

As mentionedearlier,theoperationsof � and : in a latticeareanalogousto thearithmeticoperationsof + and ] . This analogyis most striking in distributive lattices.

3.11.7 Definition. A lattice 2�^_���7��:;6 is a distributive lattice if and only if the following equalityholds in ^ :2�`a6 �K:T2N�b�dc06�#e28�G:d�06=�T2N��:@c�6 .

This equationexpressesthe similarity with the distributive law �O2��gfhci6G#e���$f%�+c of ordinaryarithmetic. All latticesin Example3.11.2aredistributivelattices.Note alsothat by duality we havethat

2�`j`j6 ����28��:dc�6=#k2N���@�06�:K2��!�@ci6in any distributive lattice. Now if ����c , then cG#F�G�dc . Thus,substitutingz for �!�@c in 28`j`N6 we havethat any distributive lattice satisfiesthe following law:

2�`j`8`j6 ���Jc�l ����2N�b:Kci6;#k2��!�@�06�:@c4mAny lattice satisfyingcondition 2�`j`8`j6 is calleda modular lattice. Although everydistributive lattice

is modular,not every modular lattice is a distributive lattice.

3.11.8 Example: Let ^F#n,.oG��p+�S*.�Nq.�Nr�1 havepartial order definedby os�tp��kr5�uov�k*��kr5� ando��eqw�vr . Then

pb:K2N*=�Kqx6=#%pg:drG#Fp�y#Fo#%oz�do{#k2�pg:@*x6���2Npb:Kq-65mThus ^ is not a distributive lattice. However, whenever �W�|c in ^ , then 28`j`8`a6 holds. Forexample, pz�}r and

pg��2N*=:Gr+6;#%pR�d*&#JrG#�rR:dr$#k2�pg�@*x6�:dr&mTherefore, ^ is a modular lattice.

Suppose is a lattice with smallestelementO and largestelementI, and �u�w^ . If ~��0�)�A^ suchthat �0��:d��#%o and �0���d��#�r , then �0� is calledthe complementof � . Now if ^ is a distributivelattice

122

Page 131: Image Algebra by Ritter

and if �_���U�|����� and �_���U�|����� , then �U�|���T���7�d�/���E�K�T�8�7�K�I�R�}�8�$�d���;�T���!�d�I�R����7�d�0�4�u�8�$�d�0�d�����7�d�O���T�J���N�=�K�0�=���J��� . Therefore, �z��� . Thus, if �I� and �� are twocomplementsof � so that ���K�I�Q�������$�k�� and �G���0�\�W�K���$�k�� , thenby our analysiswe havethat �0�=���� . That is, complementsare uniquein distributive lattices.

We say that a lattice is complementedif andonly if all its elementshavea complement.

Modular andcomplementedlatticesareof specialinterestfor applicationsto probability theory,in-cludingergodic theoryandmultiplicativeprocesses,to linearalgebra,computerscience,andengineering.For example,the set � of all subspacesof �b� is a complementedmodularlattice. Here the orthogonalcomplement�\� of any subspace� satisfies �;�T���t�e  and �V��¡T��|�Q� . Also, by definition, aBooleanlattice is a complementeddistributivelattice. Theusesof Booleanalgebrasin computerscienceandengineeringaremanifoldandrangefrom thedesignof electricalnetworksto thetheoryof computing.

For Booleanlattices we have the following:

3.11.9 Theorem. In any Booleanlattice, eachelementx has a uniquecomplement� � . Furthermore,complementationsatisfiesthe following equations�S¢£� �K���0���|� and �����I�_�|���¤�� �N� � � � �"���¥�� �����K�I� � �¦�0�����C� and �8�$�d�0� � �E�I�+���C�

For a proof we refer the readerto [3]. Complementationshouldnot be confusedwith conjugationor duality. For instance,if for every §�¨w�=©5ª we defineits dual or conjugate §.« by §.«!�­¬&§ , where¬g��¬b®¯����® , then��¤ � � �N§ « � « ��§��¥£�°� ��§_�G±�� « �¦§ « �@± « and ��§_�G±�� « �¦§ « ��± «Equations ��¤ � � and �8¥ � � have the appearanceof statements(2) and (3) of Theorem3.11.9. However,§g��§ « �|¬g® and §&��§ « �|® if and only if §K�E® or §��²¬g® .

Sincecomplementsin a Booleanlattice � areunique,we can view complementationasa function�W³´� that maps �w³´�0� . From this point of view, complementationis a unary operation. If � is aBooleanlattice, thenthe algebra�N��µ5�7µ[�7µ��¶� determinedby the two binary operations� and � , andtheunary operationof complementon � is called a Booleanalgebra.

3.11.10 Examples:

(i) It follows from the lawsof operationson sets(2.2.1), that ·8¤.¸�µ+¡=µ��7µ��M¹ is a Booleanalgebra.

(ii) Let ºW¨%»O¸¼ and define ½J�}º��K¾ by

½5�N�O�L�n¿ º/���O��À°ÁK¾5���O�LÂ�º/�N�5�¾5�8�O� À°Áhº/���O��Ãw¾5�8�O�and Äz��º���¾ by

Ä+�N�O�V�n¿ º/���O�²À°Á�º/���O�LÂU¾5�8�5�¾5�8�5� À°Á�¾5�8�5��Ã�º/���O�[Å123

Page 132: Image Algebra by Ritter

Define complementationof Æ as the function Æ+Ç=È+É­Ê�Ë�Ì , where

Æ ÇÎÍ�ÏOÐ;ѦÒKÓ Ô°Õ Æ Í�ÏOÐ=Ñ%ÖÖ Ô×Õ Æ ÍNÏ5Ð;Ñ Ó;ØThe leastelementis the zero function ÙeÈ5É�ÊÚË�Ì definedas Ù Í�ÏOÐYÑnÖeÛ5Ï¯Ü É and thelargest elementis the constantfunction Ý�È/É Ê Ë�Ì definedby Ý Í8ÏOÐAÑ Ó Û[ÏzÜ É . It isnow easyto showthat ÞjË5ßÌbà5á7à�â=à ÇSã is a Booleanalgebra.This algebraprovidesa rigorousmathematicalbasisfor the descriptionof a wide rangeof Booleanimagetransformations.

(iii) The lattice Í�äQåæ5ç à5á7à[â Ð of Example 3.11.2 (v) is a distributive lattice with minimal andmaximalelements.Only the functions è and Ý havecomplements,namely ÝiÇ Ñ è and è+Ç Ñ Ý .

In addition to being a distributive lattice, the set of real numbersis also a ring, and our earlyexperiencein elementaryalgebrahastaughtus the useful propertieséQê ÏWë}ìJí îGïkÏWë}î$ïkìé Ì Ïkë|Ö ð.ñ�ò ì�ëvÖ�í Ï+ì�ë|Öé/ó î�ëÖ�í´îiÍNÏ á ì0ÐYÑnîCÏ á î�ì�ð£ñ�ò­îiÍNÏ â ì0ÐbÑnî�Ï â î�ì àwhere Ï à ì à î�Üwä . Thesepropertiesexhibit the interplay betweenthe lattice and ring operations.Thequestionnaturally arisesas to whetheror not thesepropertieshold in any ring (or semigroup,group,etc.) which is also a lattice. For the remainderof this sectionwe will be mainly concernedwith thisquestionand examinepropertiesof semigroup,groups,rings, and other algebraicstructureswhich atthe sametime are lattices. While many propertiescan be couchedin termsof lattice-relatedconcepts,the main purposeof approachingthesestructuresfrom a generalalgebraicviewpoint is to developananology to linear operatortheory.

Supposeô is a set with binary operation õ and partial order ö , and supposethat the systemÍ ô à ö à õ Ð satisfiesthe following property:é/÷ Ï ö ì�íùø õ Ï õuú�ö ø õ ì õuú Û[ø à ú Ü ô .

If Í ô à õ Ð is a semigroup,then

1. ô is called a partially ordered semigroup or po-semigroup.

2. If Í ô à õ Ð is a group, then ô is called a partially ordered group or po-group.

3. If Í ô à[á Ð is a semilatticeand Í ô à õ Ð a semigroup,then ô is called a semilatticeordered semigroupor sl-semigroup.

4. If Í ô à[á Ð is a semilatticeand Í ô à õ Ð a group, then ô is called a semilatticeordered group or sl-group.

124

Page 133: Image Algebra by Ritter

5. If û�ü_ý5þ=ý5ÿ�� is a lattice and ûNü4ý���� a semigroup,then ü is called a lattice ordered semigroup orl-semigroup.

6. If û8ü4ý�þ7ý[ÿ�� is a lattice and û�ü9ý���� a group,then ü is calleda lattice ordered group or l-group.

Obviously, û��4ý/þ=ý5ÿ=ý�� is an l-group since �� ������ . On the other hand, û��9ý[þ7ý5ÿ=ý���� is not anl-semigroupsince � � doesnot hold for multiplication. However, û����4ý5þ=ý5ÿ=ý���� is an l-group.

An sl-semigroup ü has an identity elementunder � if there exists an element � in ü such that����������������� for all �! �ü�" It hasa null element# if #Oþ��$�%� and #����&�%����#��'# for all �! �ü�"If the sl-semigroup û�ü9ý þ=ý(��� is also an sl-semigroup ûNü4ý ÿ7ý)��*+� undera semilatticeoperation ÿ and asemigroupoperation �,* and satisfies

�gþ�û�-7ÿ.�/�����RÿKû�-=þ0�/���%�213��ý4-5 �ü4ýthen we say that ü is an sl-semigroup with duality. If the operations � and � * coincide, then theoperation � is called self-dual. An sl-semigroupwith duality and self-dualmultiplication is simply alattice-orderedsemigroup. The l-group û��4ý þ=ýMÿ7ý6� hasthe identity element0 but no null element,asthere is no “smallest” elementin ��" As anotherexample,the l-semigroup û���798�ý þ7ý-ÿ=ý6��ý where denotesthe extendedreal addition �:Fû<;>=?���@;>=AB�C�3;>= 1D�E F� 798 , hasthe null element ;6=but hasno identity element,as ;�= hasno inverseunderextendedreal addition.

It hasbeenshown(Birkhoff [3]) that exceptin the trivial casewhere ü%�HGJILK a partially orderedgroupcannothaveuniversalbounds.Thusan l-groupcannotbe a completelattice (unlessit is {0}), thatis, eachsubsetM of ü cannothavea lub anda glb in ü�" In particular,the l-group û��4ý þ=ýMÿ7ý6��ý cannotbea completelattice. Our particularinterestsfocuson the extensionof an l-groupin a well-definedmannerto includethe universalbounds;�= and =Fý andhencethe resultingstructurewill not beasstrongasanl-group. Note that if we adjoin the element;�= (or := ) to the l-group ü9ý the structureû�ü 7/8 ýMþ7ý-ÿ=ý(�,�(or ûNü 8 ý-þ=ý-ÿ7ý(�,� ) degeneratesto an l-semigroupsincethe element ;�= (or := ) cannothavea inverseunder ��" Here, ü 798 �%üON�GP;�=QK and ü 8 �%üONRGS:=?K . This doesnot turn out to be as much of adisadvantageasonemight think, asan arbitrary l-group ü canbe extendedto includethe elements;6=and := in a well-definedmannerunderbothoperationsþ and � in the following way. Let û�ü4ý þ=ýMÿ7ý(���be an l-group,and let ü�T 8 ��üUNVG(:=FýW=XKiý where ;�=ZY[�EY\= 1]�E uü�" The group operation� is extendedin the following manner.If �+ý^-_ �ü4ý then �!�`- is alreadydefined. Let � * �V� be theself-dual multiplication on elementsof ü9ý that is,

��� * -������`-a1.�+ý^-� �ü�"Otherwise,we have ���b;c=d�[;>=e�R�$�_;>= �! �ü 798���F=f�g=h�E���_= �$ �ü 8��� * ;>=d�i;>=d� * ���[;>= �$ �ü 798��� * =d�g=e� * �$�2= �0 �ü 8û<;>=?���F=f�g=h��û<;>=j���i;>=û<;>=?��� * =h�2=h� * û^;>=Q���g=Hence,the element;�= actsasa null elementin thesystemû�ü�T 8 ý-þ7ý(��� andthe element:= actsasa

125

Page 134: Image Algebra by Ritter

null elementin thesystemk�l�m>n�o4p,o(q�rts4u However,asshownby thelasttwo equations,themultiplicationsq and q r introducean asymmetrybetween v�w and x:w�u The resultantstructure k�l m>n o4y,op�o(q�o(q r sis called a boundedl-group, and, in fact, is a distributive lattice. Note that this extensionis validfor any arbitrary l-group. Two familiar examplesof bounded l-groups are k�z�mDnCoy�op�ox�ox r s and{ z}|m>n o~y�op,o(q5o(q r�� u Here, z�|m>nH� z |���� v�w%oWwX� � ����� zQ� �:�j� � �,� v6w%oWwX�Pu Notethat k�z�oWy,op�ox�sis isomorphicto k�z | oy�op,o(q�s both as a group and as a lattice, and hencetheir extensionsto l-groupswill be isomorphicas well. Theseextensionsplay a key role in lattice spaces(Section3.12) and haveimportantconsequencesin the decompositionof templatesandstructuringelements(Chapter7).

We now return to our original questionconcerningrings that arepartially ordered.

3.11.12 Definition. A partially ordered ring or po-ring is a ring � which is also a partially orderedset undera relation � which satisfiesproperties��� and ��� . A lattice ordered ring or l-ringis a po-ring � which is a lattice definedby � .

3.11.13 Example: Since k�z�oy�op�ox�o(q,s satisfies��� and ��� , z is an l-ring.

As anotherexampleconsider�F�9����k�l,s , thesetof all ��q�� matriceswith entriesfrom l . If l isa totally orderedfield with order � , thenby defining �`�j�H� ��� �6���^� �E� �^o¢¡ �i£ o<¤¥o¦�¦§¦^o4� ,with ��o^� �E¨ª© � © k�l«s , it is easyto seethat � �L��� k�l,s satisfies� � and � � .

If � is a po-ring, then � is a po-group with respectto its additive operation.Suppose¬X� � and­ �g® . Since � is a po-group, ¬a� � and ­ �g® is true � ¬a� � and ­ v¯®0� � . Applying � � to thelatter statement,we obtain ¬ck ­ vb®°s�� � and,hence,¬ ­ vF¬�®$� � or equivalently ¬ ­ �j¬�® . Conversely,if ¬ ­ �3¬�® , then ¬ ­ vj¬�®F� � and hence ¬ck ­ vb®°s�� � . Thus, if our original hypothesis¬?� � and­ �V® implies that ¬ ­ �V¬�® , then it follows that ¬2� � and ­ v%®¯� � implies ¬>k ­ vb®Ls±� � . Wehave just proven the following:

3.11.14 Theorem. In any po-ring property ��� is equivalentto property��²�� ¬?� �d³)´9µ ­ �H® ¶ ¬ ­ �@¬�®Since ¬±y ­ ��¬·o ­ and ¬·o ­ �%¬$p ­ , Theorem3.11.14hasthe following consequence:

3.11.15 Corollary. In any l-ring�·¸$� ®�� � ¶ ®°k�¬�y ­ s5�[®�¬$yR® ­ ³S´�µ ®�¬!p.® ­ �g®Lk�¬�p ­ s4uThis is thebestwe canachievefor generall-rings. However,in totally orderedrings the inequalities

in � ¸ can be replacedby equalities.

3.11.16 Corollary. Property �·¹ holds in any totally ordered ring � .

Proof: Since � is totally ordered,either ¬ªy ­ � ¬ or ¬ªy ­ � ­ . If ¬ªy ­ � ¬ , then®(¬ � ®°k�¬$y ­ sº�i®(¬!yR® ­ and, therefore, ®°k�¬�y ­ s � ®(¬!yR® ­ . The case ¬�y ­ � ­ and the

126

Page 135: Image Algebra by Ritter

remainderof the proof are just as simple.Q.E.D.

In order for »�¼ to hold, total order, althoughsufficient, is not a necessarycondition; the l-ring½�¾�¿:À4Á�ÀÂ�ÀÃ�ÀSÄ�Åsatisfies»·¼ but is not totally ordered.

3.12 Minimax Algebra

In recentyearslatticebasedmatrix operationshavefoundwidespreadapplicationsin theengineeringsciences.In theseapplications,theusualmatrix operationsof additionandmultiplicationarereplacedbycorrespondinglattice operations.For example,given the boundedl-group Æ�Ç�È�É ÀÁ,À(Ä�Ê and ËiÌÍÆÏΰÐÒÑ Ê ,Ó Ì_Æ�Ô4ÐÒÑ Ê two Õ ÄEÖ

matriceswith entriesin Ç�È>É , then the pointwisemaximum, Ë Á Ó , of Ë andÓ

,is the Õ Ä¯Ö

matrix × definedby

Ë Á Ó Ì�× À�Ø�Ù¥ÚÛ<ÚbÜ ÐÝÑ�Ì�Î�ÐÝÑ Á Ô4ÐÒÑ}ÞIf Ë is Õ Ä0ß

andÓ

isß�Ä`Ö

, thenthe maxproductof Ë andÓ

is the matrix ×iÌgË Ä Ó , whereÜ ÐÒÑ Ì àáâã>ä Æ�Î Ð â Ä Ô â Ñ Ê ÞObservethat this product is analogousto the usualmatrix productÜ ÐÒÑ5Ì àåâ^ã>ä Æ�Î�Ð â Ä Ô â Ñ Êwith the symbol æ replacedby ç . Since ç replacesæ in our definition, the pointwisemaximumcanbe thought of as matrix addition.

3.12.1 Example:

(i) Considerthe boundedl-group Æ ¾ È>É ÀÁ�ÀÃ�Ê . Thenèééééêë6ì í ë5î îï ë5ð ñWò ë�óô ó à ì õë�ö ë6ì ñ ë ïë÷ñ ñ ò ð

øÝùùùùú á

èééééêî ï à ì ë�ìë�ì ò ô òë�ö í ñ�î óë:ñ ë�ì î ë�öë�î ñ ë:ñ í

øÝùùùùú Ì

èééééêî ï à ì îï ò ñ�ò òô í à ì õë:ñ ë�ì î ë5öë:ñ ñ ò í

øÝùùùùú À

which providesan illustration of the pointwise maximumof two ð Ä ó matriceswith entriesfrom

¾ È>É Þ(ii) For an illustrationof themaxproductwe usea ð Ä ó anda ó Ä ö matrix with entriesfrom

¾ È>ÉVûèééééêë�ì í ë5î îï ë5ð ñ�ò ë�óô ó ñ(ñ õë�ö à ì ñ ë ïë:ñ ñ ò ð

øÝùùùùú Ä

èééêë6ì í ë�îï ë�ð ñ§òô ó ñ�ñë:ñ ñ ò

ø ùùú Ì

èééééêñ�ö ö ñ§íñ ô ñó î/ññ�õ ñ�ð î�îà ì à ì à ìô í ñ�ñ

øÝùùùùú Þ

127

Page 136: Image Algebra by Ritter

Here ü4ýÒþ5ÿ ���������ý ���� �� þ����

If ���������������� �

is the dual of ����!�"��#�����, thenthe dual or min productof $ and % is the matrix& ÿ $ �' % , where ü ýÝþ ÿ �(���!�')

ý � � �þ+* �

Similarly, the pointwiseminimum $ � % of two matricesof the samesize is definedas

$ � %ÿ & �",.-0/�12/

üWýÝþ�ÿýÝþ� ýÒþ �

Lattice inducedmatrix operationslead to an entirely different perspectiveof a classof nonlineartransformations.Theseideaswereappliedby Shimbel[21] to communicationsnetworks,andto machineschedulingby Cuninghame-Green[7, 8] and Giffler [13]. Othershave discussedtheir usefulnessinapplicationsto shortestpath problemsin graphs[18, 2, 6, 1]. Additional examplesare given in [9],primarily in the field of operationsresearch. Another useful application to image processingwasdevelopedby Ritter and Davidson,[19] and [10].

While lattice theoryandlattice-orderedgroupshaveonly marginal connectionsto the computationalaspectsof linear algebra,Cuninghame-Greendevelopeda novel nonlinearmatrix calculusbasedon themin andmaxproduct,calledminimaxalgebra, which is very reminiscentof linearalgebra[9]. Problemsnotatedusing the minimax products take on the flavor of problemsin linear algebra. By allowingfor the minimax matrix productsto take on the characterof the familiar matrix products,conceptsanalogousto thosein linear algebrasuchas solutionsto systemsof equations,linear dependenceandindependence,rank, seminorms,eigenvaluesand eigenvectors,spectralinequalities,and invertible andequivalentmatrices,canbe formulated.Originally, manyof theseconceptsweredevelopedprimarily tohelpsolveoperationsresearchtypesof problems.Our interestin thesenotionsis dueto their applicabilityto image processingproblems.

An sl-semigroup ���3�4#�����

satisfying the axioms% � 5 �6��78#:9� ÿ

� 5 �;7�#<� 5 �=9

�%?> ��78#@9

�� 5

ÿ��7A� 5

�#<��9A� 5

�B 5 ��7���9;CD� is called a belt. Viewing � as multiplication and # as addition provides � with a ringlike appearance,hencethe name“belt.” If, in addition, � is a lattice with anothersemigroupoperation�' satisfying% � 5 � ��7?�"9

� ÿ� 5 � 7

��E� 5 � 9

�% > ��78�@9

�� 5

ÿ�7F� 5

��E�G9A� 5

��

then � is called a belt with duality.

If the multiplication � and the dual multiplication � coincide,thenwe call the multiplication self-dual. Obviously, any l-semigroupis a belt with self-duality. If the l-semigroupis actually an l-group,

128

Page 137: Image Algebra by Ritter

then eachelement HJI6K hasa uniquemultiplicative inverse H!LNM ; by analogywith division rings, wecall such a belt a division belt.

Let O�K�P�Q4R�S and OGK�TUQ4R�S be two semilattices. A function VXWYK'P?Z[K\T is called a semilatticehomomorphismif V]O�^8R@_`S�aDV�O^bScR"V]O�_dSfor all ^�Q�_ in K M . If OK'PeQfR�Q�ghS and OK�TUQ4R'Qig�S are two belts and VjW:K'PkZlK�T is a semilatticehomomorphismthat satisfies V]O^Fg=_mSnaDV�O^bS\g;V]O�_dS2Q;op^�Q�_qIrK3Qthen V is called a belt homomorphism.A belt (or semilattice)isomorphismor automorphismis giventhe usual meaning.

3.12.4 Example:

Define V;WUstZus'v by V]O�HcS�axw`y . Then V]OHYR@zbS�a{V]OH!S�R:V]O�zbS and V]O�HY|�zbSnaDV�OH!S�grV]O�zbS .It is trivial to show that V is a belt isomorphism. Furthermore,s~}i����s v are commutativebelts, that is, the multiplication g commutes.

Let OK�Q4R'Q+�'Q�g�S be an l-group with identity � and let O��8Q�R�S be a semilattice. Supposewe havearight multiplication of elementsof � by elementsof K :Hrg;�rI�� o�H�Ir�8Q�}i����ok�"I=K��We call OG�?Q�R�S a (right) semilatticespaceover K if the following four conditionsare satisfiedfor allH]Q�zDI�� and for all ��QU��I�K : O�H"g���S�g��;axH�g;O2�"gr��SO�HYR:zbS�g��:a�OH"g<�!S�R"OzFg���SH"g;O2�YR:��S'a�OGHrg;�!S�R�OGHrg"�\SH�g=��a�H��A right semilatticespaceis also called a right s-lattice spaceor simply a spaceover K . If � and Kare known, then shall simply say that � is a space. A subspaceis a subsetof a spacewhich itself isa spaceover K .

Semilatticespacesplay the role of vector spacesin the minimax theory. For example,if ��a�s'�and K�a�s , and we define � g=�8ax�'Q<�.�0�d�2��_�� aD^��!|E�¡Q�¢na¤£�Q�¥�¥d¥�Q2¦then it is easily verified that g satisfiesthe abovefour axioms. Here, O�s�§!Q�R�S is a semilatticeundercoordinate-wisemaximum.Thuswe canregards\¨ asa right semilatticespaceover s�� Similarly, we candefine a left semilatticespaceover K3Q using the left versionsof the abovefour conditions.A two-sidedspaceis a triple O�©3Q��?Q�K\S satisfying the following threeaxioms:

129

Page 138: Image Algebra by Ritter

ªN«�¬ ­is a belt and ® is a left spaceover

­ªN¯�¬ ­is a belt and ® is a right spaceover

­ª�°Y¬ ±�²t³�´�²rµ�¶q·¸³�±t²r´c¶3²;µ ¹N±�º ­�» ¹N´�º ® »�¼¡½!¾ ¹�µ�ºE¿.ÀLet

³¿ »4Á�» ²3¶be a belt. An importantclassof spacesover

¿is the classof function spaces.Here

the s-lattice³ ® »�Á ¶ is replacedby the lattice  ¿ Ã »�Á Ä . Suchspacesare naturally two-sided. We shall

only be interestedin the casewere Å�ÆUÇ¡È ³ÊÉ=¶k·pËÍÌÏÎ. Thus we can view  ¿�à »�Á�Ä as the spaceof

n-tuples³G¿�Ð »�Á ¶

.

When discussingconjugacyin linear operatortheory, two approachesare commonly used. Onedefinesthe conjugateof a given space Ñ as a specialset Ñ Ò of linear scalar-valuedfunctionsdefinedon Ñ . The other involves defining an involution (a one-to-onefunction) taking

´�º Ñ to´ Ò º Ñ Ò that

satisfiescertainproperties.The situationis slightly morecomplicatedin the caseof lattice transforms.

Let³�¿ »ÓÁ�» ²3¶

and³ ® »ÕÔ'» ²�Ö׶ be two belts. We saythat

³ ® »ÓÔ�» ²'Öض is conjugateto³¿ »4Á'» ²3¶

if thereisa one-to-onecorrespondenceÙ ¬ ¿DÚ ® satisfyingthe following two conditions:¹N´ »�Û º�¿ » Ù ³G´ Á@Û ¶�· Ù ³G´c¶ Ô Ù ³ Û ¶¹N´ »�Û º�¿ » Ù ³G´"² Û ¶�· Ù ³G´c¶�² Ö Ù ³ Û ¶NÀ

In lattice theory, Ù is called a dual isomorphism. Note that conjugacyis a symmetricrelation. If³�¿ »4Á�»�Ô ¶is an s-lattice with duality and Ù ¬ ¿ÜÚÝ¿

satisfying¹N´ »�Û º�¿ » Ù ³G´ Á@Û ¶�· Ù ³�´c¶ Ô Ù ³ Û ¶ »then we say that

¿is self-conjugate. If

³¿ »4Á'» ² »�Ô�» ²'Ö4¶is a belt with duality, we say that

¿is self-

conjugatewhenever³�¿ »4Ô�» ²'ÖÞ¶

is conjugateto³G¿ »ØÁ�» ²�¶

.

In particular,everydivisionbelt is self-conjugateundertheone-to-onecorrespondence´ Ò ·x´]ß « , and

everyboundedl-groupis self-conjugateundertheone-to-onecorrespondence³áà8Îâ¶ Ò ·�Î » Î Ò ·�à8Î

,and

´ Ò ·Ü´ ß « if´

is finite. Thus, if¿�ã�ä

is a multiplicative boundedl-groupand Ç ºt¿�ã!ä » then theadditiveconjugateof Ç is the uniqueelement Ç Ò definedby

Ç Ò.å æç è Ç ß « if Ç ºr¿à8Îif Ç ·�é�Îé�Îif Ç ·¤à8Î À (3.12.1)

Here, Ç ß « is the inverse of Ç under the group operation²qÀ

Therefore,³ Ç¡Ò ¶ Ò · Ç . This gives the

following relation for all Ç »2ê in¿\ã!ä ¬

Ç Ô@ê ·�³ Ç Ò Á"ê Ò ¶ Ò ÀIf³�¿ »ÓÁ�» ² »�Ô'» ²�Ö4¶

is abeltwith duality, thenwesaythatthespace³ ® »�Á ¶ over

¿hasa duality if adual

additionÔ

is definedsuchthat³ ® »�Á�»�Ô ¶ is ans-latticewith duality and

³ ® »�Ô ¶ is a spaceover³�¿ »4Ô�» ² Ö ¶

.

We now returnto the nonlinearmatrix algebrainducedby belts. Let ëtì0íïî ³¿'¶ denotethe setof allË;²�ðmatriceswith valuesin the belt

¿. The following aresomebasicdefinitionsandproperties:

(1) Scalarmultiplication of a matrix ñ by an element ò ºE¿ is definedby³ Æ�ófô ¶�² ò ·Í³ Æïófô ² ò ¶ò ²;³ Æ�ófô ¶�·Í³ ò ² Æ�ófô ¶for all ñ ·õ³ Æïófô ¶Yº ë�ìöíiî ³¿'¶ » ò ºx¿ ;

130

Page 139: Image Algebra by Ritter

(2) ÷�ø�ùöúïû�÷ü'ý�þ�ÿ�ý is an s-lattice and a function spaceover ÷�ü3þ4ÿ�þ��hý ;(3) ÷�ø ù0úïù ÷ü'ý�þ+ÿ'þ��hý is a belt;

(4) ÷�ø ù0úiû ÷�ü ý�þ+ÿ\ý is a left spaceover the belt ÷�ø ùöúïù ÷Gü'ý�þ+ÿ'þ��hý ;

(5) For all��� ø���úiû�÷ü'ýNþ���þ � ø ûiúïù�÷Gü'ý�þ�� � ü�þ� �;÷ �Íÿ� ý���÷ � ���Aý�ÿ"÷ � �� ý� ��÷ ������ý���÷ � ���:ý�����

The proofsof thesepropertiesarestraightforward andcan be found in [9].

Since the s-lattice ÷ø ùöú�� ÷ü'ý�þ�ÿ\ý is isomorphicto the s-lattice ü ù , we havethat ü ù is a functionspaceover ü as well as a spaceover ø ù0úïù ÷Gü ý . This mimics the classicalrole of matricesas lineartransformationof spacesof � -tuples.

As in realor complexvaluedmatrix theory,two matricesof primeimportancein minimaxtheoryaretheidentitymatrix andthenull matrix. Supposethatthebelt ü hasidentityandnull elements����� �"!�# ,respectively. We definethe identity matrix $ � ø ùöúïù ÷ü'ý by

$ �%&&&&'

� !(# ) ) !�#!(# � ) ) )) ) ) ) )) ) ) ) !�#!(# ) )*!(# �

+-,,,,.

and the null matrix / � ø ùöúïù ÷Gü ý by

/ �%&&&&'!(# ) )0)1!(#) !�# )0) )) ) )0) )) ) )0) )!(# ) )0)1!(#

+-,,,,. �

Thus we have 2 �3� ø ù0úïù ÷ü'ý ,$ � � � � � $ � �� ÿ / � / ÿ � � �� � / � / � � � / �

In the boundedl-group 4�576 we have

$ �%&&&&'

8 !(# ) ) !�#!(# 8 ) ) )) ) ) ) )) ) ) ) !�#!(# ) )*!(# 8

+-,,,,.

131

Page 140: Image Algebra by Ritter

and in 9�:;7< we have

=?>@AAAAB

C D�E F F D(ED(E C F F FF F F F FF F F F D(ED(E F FGD(E C

H-IIIIJ�K

Conjugacyextendsto matricesif the underlying value set is itself a self-conjugatebelt. This isstatedin the next theorem.

3.12.7 Theorem. (Cunninghame-Greene[9]) If LNMPORQ�O�STOVU�O�S�WYX is a self-conjugatebelt, thenL Z\[^]_[`L MaXVObQ�O�ScO-UaO�S W X is a self-conjugatebelt.

Herethe conjugateof a matrix d > LNe�fRghX with entriesin M or M ; < is the matrix dTi > LkjVfRghXVO wherejVfRg >�l emgNfon i andl e�gNfpn i is the additiveconjugateof emg f definedearlier. Thenotionsof pointwiseminimum

and dual productcould havebeendefinedin termsof conjugationsince

dqUsr > LNd i Q�r i X iand dtS W r > L r i S3d i X ifor appropriatelysized matrices.

While semilatticespacesover l-groupsplay the role of vector spacesin minimax theory, linearhomomorphismsof semilatticespacestake on the role of linear transformations.

3.12.8 Definition. Let L uvO-Q�X and Lkw�O-QxX be given spacesovera belt LNMyObQaOmSvX . An s-latticehomomor-phism z|{}LkuyO-QaXc~ Lkw(O-Q�X is called right linear (over M ) if

z L���S3� X > z Lk��XxS3�t���3��uvO}�7����M KWe denotethe setof all right linear homomorphismsfrom u to w over M by �3�����`L uyO�w�X K

In linearalgebra,we characterizelineartransformationsof vectorspacesentirelyin termsof matrices.A naturalquestionto askis whetheror notasimilar classificationholdsin minimaxalgebra.Thefollowingresultsgive necessaryand sufficient conditionsfor this to be the case.

3.12.9 Theorem. (Cunninghame-Greene[9]) If M is a belt whichhasan identityelement� anda nullelement

D(E, thenfor all integers �3O��3� C O�Z���]�[`LkMaX is isomorphicto �3��� � L M [ O�M � X K

The belt operationsof Q�������S on ����� � LNM [ O�M � X are the naturally inducedoperationsfrom thebelt M � definedby LN��Q�z XNL ��X > ��LN� X�QTz�Lk��X������qL ��S�z`X�L ��X > ��L ��X�S�z Lk� X7���`O�z����3��� � LkM [ O�M � X K

132

Page 141: Image Algebra by Ritter

3.12.10 Corollary: Suppose�3 �¡ with �3¢¤£ . If ¥ is a belt, thena necessaryandsufficientconditionthat ¦�§�¨ª©�«N¥�¬ is isomorphicto ­3®�¯�°�«N¥ ©`± ¥ § ¬ for all integers³²�£ is that ¥ hasanidentityelement with respectto µ and a null element¶T· with respectto ¸ .

We call a matrix ¹� º¦ §�¨�© «k¥a¬ a lattice transform. Since ­3®�¯�°�«k¥ © ± ¥ § ¬ is isomorphic to¦ §�¨_© « ¥»¬ , we shall usually refer to ¼� ½­3®�¯�°`« ¥ © ± ¥ § ¬ as a lattice transform insteadof a rightlinear homomorphism.In particular, lattice transformsare to minimax algebrawhat linear transformsare to linear algebra.

Much of what hasbeenestablishedin this sectioncan be expressedin the contextof dual lattice-orderedsemigroups. However, we wish to study thesestructuresfrom a different perspective. Theextensionof thebelt operationsto matricesallowsus to view matricesasoperatorson spacesof n-tuplesin a way similar to vector-spacetransformationseventhoughtheseoperatorsare non-lineardue to thelatticestructureof theunderlyingset ¥ . Thispointof view will beespeciallyusefulwhenoneis interestedin optimizing non-linearimagetransformsthat correspondto lattice transforms(Chapter7).

Theminimaxalgebrathatwe will bemostlyconcernedwith is basedon thetwo isomorphicboundedl-groups « ¾�¿7À ± ¸ ±ÂÁa±-Ã�±-Ã»Ä ¬ and Åƾ�Ç¿�À ± ¸ ±-Áa± µ ± µ ÄÉÈ�Ê The substructure«ÌË�¶(· ±ÆÍ�± ·ÏÎ ± ¸ ±-Á�±-Ã�±NÃTÄ ¬ of« ¾x¿ À ± ¸ ±-Á�±-Ã�±-ÃaÄ ¬ , which is a 3–elementboundedl-group, is of particular interest in Booleanimageprocessing. The sublattice «�˪¶(· ±ÂÍ Î ± ¸ ±-Á ¬ of the 3–elementboundedl-group is a Boolean algebrawith complementation«Â¶(·�¬ Ä�Ð Í�ÑmÒ�ÓÔÍ Ä Ð ¶(· . By setting Õ×Ö Ð ¸ ±ÙتÚ�Û Ð Áa±�Ü_Ø�Ý�Þ_ß Ð¶(· ±aÑmÒ�Ó�à Ö�á ß Ð Í , we obtain the Booleanalgebracommonlyusedin computerscience.

3.13 HeterogeneousAlgebras

In the previoussectionswe consideredseveralalgebraicsystems,or algebras, suchasgroups,rings,linear algebras,lattice algebras,and minimax algebras.Thesealgebrasare all specialcasesof a moregeneralconceptknown as a heterogeneousalgebra. Imagealgebrais a particularlyapplicableexampleof a heterogeneousalgebra.

Our basicdefinition of a heterogeneousalgebrais due to Birkhoff and Lipson [4].

3.13.1 Definition. An algebra â is a pair â Ð «kã ±Vä ¬ , where

(1) ã Ð Ë×¥�å_Î åmæhç is a family of non-emptysetsof differenttypesof elementsandthesubscriptsèare membersof someindexing set é , and

(2) ä Ð Ë�ê�ë_Î ë�æ�ì is a setof finitary operations(for someindexingset í ), whereeachêÏë�  äis a mappingof the Cartesianproductof someof the ¥ å ’s to another;that is,

êÏëïî ©×ðñòÉó�ô ¥�å�õRö ÷Nø�ù ú�û�üÉý-þ�ÿand each ú û�� � ÷Nø�ÿ�ú û�üÉý-þ������

In this definition the notation ý , ��� �� , and ���� �� meansthat the indexingdependson the operation� ý . In particular, � ý������ û�� � ÷Nø�ÿ�������ÿ � û���� � ÷ ø! ù � û�übý-þ"� ú û�ü ý-þ#�133

Page 142: Image Algebra by Ritter

The operation $&% is unary if '(%*),+ , binary if '(%*).- , ternary if '(%*)./ , etc. The elements021of 3 are called the setsof operandsof 4 , and the elements$ %65�7 are called the operatorsof

(or operationson) 4 .

An algebra4 is called a homogeneousor singlevaluedalgebraif 3 containsonly oneelement—i.e., 38):9 0<;>= otherwise 4 is called a heterogeneousor manyvalued algebra. If 4 is single valued,we simply write ? 0@= 7�A insteadof ?�9 0B;C= 7DA and if the operationsare tacitly understood,we write

0in

place of ?E9 0F;C= 7�A .If 48):?�3 = 7GA and HI)J?�K =!L A aretwo algebraswith 38):9 0M1N; and K*):9�OGP ; , then H is calleda

subalgebraof 4 if andonly ifLRQ 7 and for each O P 5 K thereexistsa

0 1 5 3 suchthat O P QS0 1UT3.13.2 Examples:

(i) A linearalgebraVU? 0 A )J?!3 = 7�A , where 38):9�V =W0F; consistsof a set V of vectorsanda set0

ofscalars,and 7 ) 7YX[Z\7G][Z�7_^ (seeSection3.9). Thescalarsform a field underthe operations7`X )a9cb =ed<; and the set V forms a ring underthe operations7`] )R9�f =Wgh; . In addition,thereis a fifth operation

0Id VaijV of scalarmultiplication, 7_^ )k9Cl ; , satisfyingthe vector spaceaxioms m X through mon (3.7) and the linear algebraaxiom pFn . Since qsrNt�uv?�3 AYw + , Vx? 0 A is aheterogeneousalgebra.Note that the ring 9�V = f =sg�; is a homogeneoussubalgebraof VU? 0 A .

(ii) A finite statemachine ?E9�y =Ez(=E{D;C= 9�| =�}o; A is a heterogeneousalgebra.Herey = set of states,z= set of input symbols,{= set of output symbols,|�~2y d�z i y is the statetransition function, and} ~FyRi {

is the stateoutput function.

If 4k)a?E9 0 1 ;c= 7�A and H���):?E9�O`��� 1 ;c= 7�A is a family of subalgebraswith Ox��� 1 Q�0 1 for every index�, then the intersection� � H��Y)R?�9c����OY��� 1 ;C= 7�A . Higgins provedthe following theorem[14].

3.13.3 Theorem. Any intersectionof subalgebrasof 4 is a subalgebraof 4 .

Another consequenceof the definition of subalgebrasof an algebrais that the subalgebrasof analgebraform a completelattice [3].

The notion of a homomorphismbetweenalgebraicsystemsas definedin the previoussectionshasits natural generalizationto heterogeneousalgebras.

3.13.4 Definition. Let 4 )�?�9 0 1 ;C= 7DA and HS)a?�9eO 1 ;C= 7`��A be two algebras. A homomorphism� ~c4�i,H is a setof functions� 1 ~ 0 1 i�O 1 (one for each

0 1) suchthat for any operation

$�%�~ �e����� X 0 1���� �E� � ¡"¢�£�¤s¥in ¦ there existsan §©¨ ¤©ª ¦`¨ , with

§ ¨ ¤ «@¬�­®�¯�°o± ¢s² ³ ���[� ± ¢�£´¤s¥#µ

134

Page 143: Image Algebra by Ritter

such that the composition¶·�¸º¹s»�¼U½ ¹S¾ ½À¿¹ ¼�Á

¶·�ÂÄÃÄÅ�ÆEÇ

¶·>ÂÄà È�Æ�ÇsÉ�É�ÉÊÇ

¶·>ÂÄÃÌË�ÍsÆ!Î

holds.

As usual,homomorphismsthat are one-to-oneand onto — meaning

¶·ÐÏ�ÑM·ÐÒÔÓ · is one-to-one

andontofor each Õ — arecalledisomorphisms.For instance,if Ö is a finite setwith ×sØCÙ�ÚvÛ!ÖÝÜ ¾�Þ , thenÁ�ß2à Ç ß ÇWá`âsÎ and Û ß"ã Ç ß Çsáåä Ü areisomorphic.Here á`â and á`ä denotethe setof vectorspaceoperationsfor ß2à and ß[æ , respectively. The isomorphism

¶Ï Áçß2à Ç ß Çsá`âÊÎÐÒ Û ßFã Ç ß Çsá`ä Ü consistsof the mapè Ï ß à Ò ß æ given in Example2.8.3 and the identity map é�ê Ï ß Ò ß .

3.14 Generalized Matrix Products

The commonmatrix product,the tensoror Kroneckerproduct,the outer and inner vector product,andthe minimaxmatrix productdiscussedin Section3.12, areall specialcasesof a moregeneralmatrixproduct associatedwith heterogeneousalgebras.

Following the ideasof Section3.12we notethata semigroupÛ Ñ@ÇEë Ü induces,for anypair of positiveintegersì and Þ , asemigroupof matricesÛ�í æoîNï Û Ñ Ü ÇEë Ü . Theinducedoperationonthematrixsemigroupis definedcomponentwise.More precisely, if ð ¾ Û�Øcñ�ò�Ü æóîhï ô�õoöø÷ ¾ Û�ùúñÄò�Ü æûîhï are elementsofí æóîhï Û Ñ Ü , then

ð ë ÷ ¾ýüR¾ Û�þ ñ�ò Ü æóîhï Ç ÿ �������þ�ñÄò ¾ ØhñÄò ë ùúñÄò Ç���¾ é Ç��vÇ�É�É É�ÇWÞ[Ç� ¾ é Ç��ûÇ�É É�ÉsÇ ì�� (3.14.1)

.

We cantakethis concepta stepfurther. If ½ Ï���� ÓaÒ Ñ is any binary operation,then ½ inducesa binary operation

½ Ï í æóîhï Û � Ü � í æûîhï Û Ó Ü Ò í æóîhï Û Ñ Ü (3.14.2)

definedby

ð ½ ÷ ¾ýüR¾ Û�þ ñÄò Ü æóîhï Ç ÿ �������þ ñ�ò ¾ Ø ñ�ò ½ ù ñÄò Ç���2¾ é Ç��vÇ�ÉEÉ�ÉsÇÊÞ[Ç� ¾ é Ç��vÇ�ÉEÉ�ÉsÇ ì�� (3.14.3)

The componentwiseproduct definedby Eqs. 3.14.2 and 3.14.3 is called the generalizedHadamardproduct.

In the specialcasewhere �&¾ýÓa¾ýÑ , the algebraicstructure Û Ñ@Ç ½ ÇEë Ü inducesa matrix structureÛ�í æûîhï Û Ñ Ü Ç ½ ÇEë Ü that behavesvery much like the structure Û Ñ@Ç ½ ÇEë Ü . For example,if ½ distributesover ë in Ñ , then ½ distributesover ë in í æóîhï Û Ñ Ü . Similar commentscanbe madefor commutativityand associativity.

In thesubsequentdiscussionwefollow theconventionof letting Ñ���¾ í â îhï Û Ñ Ü andview Ñ�� asthesetof m-dimensionalrow vectorswith entriesfrom Ñ . Similarly, if ì ¾ é , then Û Ñ ã Ü ¿ ¾ Û�í â îhæ Û Ñ ÜEÜ ¿ ¾í æóî â Û Ñ Ü denotesthe setof n-dimensionalcolumnvectorswith entriesfrom Ñ . Our goal is to definea

135

Page 144: Image Algebra by Ritter

classof matrix productsthatallow us to multiply matricesfrom "!$#�%'&)(�* with matricesfrom "+,#.-�&0/1* ,where m is not necessarilyequal to n.

Suppose24365�7 which divides both m and n. Note that suchan integerp alwaysexists,namely298;: . We shall establishthe following two one-to-onecorrespondences:5 7!"< 5 7%>= 5 7!"< 5 7%@?BA < 5 7ADCFE�G 5 7A < 5 7+H?IA < 5 7-J= 5 7+ < 5 7-�Kwherethe doublearrow “ = ” denotesthe appropriateone-to-onecorrespondence.Observethat the lastfactor in the 3–fold Cartesianproductof the first correspondenceis 5�7A , which is also the first factor inthe 3–fold Cartesianproductof the secondcorrespondence.This commonfactor is the key ingredientinthe definition of the generalmatrix productof order p.

We definethefirst correspondence5 7! < 5 7% = 5 7! < 5 7%@?IA < 5 7A in termsof the row scanningmapL ANMO5 7%�?IA < 5 7AQP 5 7%RTS�U�V�UQL AH&BW K�X *Y8Z&0W\[]:F*^2`_ X�K:'a X ab2 CcE�G :'a]W�a]dfeg2ih (3.14.4)

Since L AO&0W K�X *@j L AF&BWlk K�X km*onpW�j]Wqksr V W`8tWuk CcE�GvX j X k , L A linearizesthe array 5 7%@?IA < 5 7A usingtherow scanningorder (seealso Example3.1.5) as shown:wxxxxxxxxxxxxxxxxxy

z{ z�| z�} ~{ z�| ~ } ����� �{ z�| � } ����� A{ zg| A }A 7 z{ ~ | z)} A 7 ~{ ~ | ~ } ����� A 7 �{ ~ | � } ����� ~ A{ ~ | A }...

......

...{��l� z�} A 7 z{�� | z)} {�� | ~ } ����� {��l� z�} A 7 �{�� | � } ����� � A{�� | A }...

......

...{^{ %@?BA } � z�} A 7 z{ %@?BA | z)} { %�?IA | ~ } ����� { %�?IA | � } ����� { %�?IA } A���%{ %�?IA | A }

��������������������It follows that the row-scanningorder on 5 7%�?IA < 5 7A is given by&BW K�X *@a��IW k K�X k�� n L A &)W K�X *@a L A �0W k K�X k��or, equivalently, by &0W K�X *�a��0W k K�X k � npWYj]W k r V W�8�W k CFE�G�X a X k h

We define the one-to-onecorrespondence� A�MO5 7! < 5 7%@?IA < 5 7A P 5 7! < 5 7%��� � A M�&0� K���K�� *�� &0� K L A & ��K�� *�*�hThe one-to-onecorrespondenceallows us to re-indexthe entriesof a matrix ��8�&B �¡ | ¢ *£3� "!l#¤%i&)(�* intermsof a triple index   ¡ | {�� | � } by using the convention  ¡ | {�� | � } 8¥  ¡ | ¢ n L AO&0W K�X *Y8]¦ KRTS.U�V�U :'a¥W�a]dfeg2 CcE�G :'a X a"2ih (3.14.5)

136

Page 145: Image Algebra by Ritter

3.14.1 Example: Suppose§�¨ª©.«@¬­¨¯®]°c±�²�³´¨ª© . Then ¬fµ�³¶¨¯·�«f¸i¹»º¶¹b³f¨¯©�«v°c±�²¯¸i¹»¼�¹¬fµg³b¨½· . Hencefor ¾¿¨ÁÀBÂ�Ã)Ä Å)ÆiÇ]È"ÉËʤÌFÀBÍ@Æ , we have¾¯¨­Î ÂÐÏ�Ï Â�Ï É Â�Ï)Ñ ÂÐÏ)Ò Â�Ï�Ó Â�Ï ÌÂ É Ï Â É�É Â É Ñ Â É Ò Â É Ó Â É)Ì�Ô¨ Î Â Ï Ä Õ Ï Ä Ï)Ö Â Ï Ä�Õ Ï Ä É Ö Â Ï Ä�Õ×É�Ä ÏBÖ Â Ï Ä�Õ×ÉgÄ É Ö Â Ï Ä�Õ Ñ Ä Ï�Ö Â Ï Ä�Õ Ñ Ä É Ö É�Ä�Õ Ï Ä Ï)Ö Â ÉgÄ�Õ Ï Ä É Ö Â ÉgÄ�Õ×É�Ä ÏBÖ Â É�Ä�Õ×ÉgÄ É Ö Â ÉgÄ�Õ Ñ Ä Ï�Ö Â ÉgÄ�Õ Ñ�Ø É Ö ÔiÙThe factor Ú�ÛÜ of the Cartesianproduct Ú�ÛÜ»Ý Ú�ÛÞ is decomposedin a similar fashion. Here the

row-scanningmap is given by ß�àiá Ú Ûà Ý Ú ÛÜFâ à'ã Ú ÛÜäæå�çËè�ç ß à À)º�«êé�ÆY¨�À0º�ë4¸FÆ�ÀIì\µg³�Æ�íîé�«¸i¹�é�¹]ì\µg³�«´°c±�²�¸'¹»º�¹b³ Ù (3.14.6)

This allows us to re-index the entriesof a matrix ïJ¨ðÀ0ñ Ã�Ä Å Æ1Ç�È Ü Ê Þ ÀBò1Æ in terms of a triple indexñ Õ�ó�Ä ô Ö Ä Å by using the convention ñ Õ^ó�Ä ô Ö Ä Å ¨¥ñ Ã�Ä Åîõ ß à À0º�«0é.Æö¨¥÷�«äTå�ç�è�ç ¸i¹]º¶¹9³Z°F±�²ø¸s¹�é�¹]ì\µ�³ Ù (3.14.7)

3.14.2 Example: Supposeìù¨¯ú�«@ûs¨Z·»°F±�²b³f¨ª© . Then ì\µ�³f¨Z©�«î¸�¹»ºî¹4³´¨Z©�«v°c±�²Z¸�¹"鶹ì\µg³Q¨ü© . Hencefor ïý¨ÁÀBñ�Ã)Ä ÅIÆ�ÇQÈ Ü Ê Þ À0ò�Æ , we have

ï�¨ÿþ��� ñ Ï�Ï ñ Ï É ñ Ï)Ññ É Ï ñ É�É ñ É Ññ Ñ�Ï ñ Ñ É ñ Ñ�Ññ Ò�Ï ñ Ò É ñ Ò�Ñ����� ¨pþ��� ñ Õ Ï Ä Ï)Ö Ä Ï ñ Õ Ï Ä Ï)Ö Ä É ñ Õ Ï Ä ÏBÖ Ä Ññ Õ Ï Ä É Ö Ä Ï ñ Õ Ï Ä É Ö Ä É ñ Õ Ï Ä É Ö Ä Ññ Õ�É�Ä ÏBÖ Ä Ï ñ Õ�ÉgÄ Ï)Ö Ä É ñ Õ×É�Ä ÏBÖ Ä Ññ Õ�É�Ä É Ö Ä Ï ñ Õ�ÉgÄ É Ö Ä É ñ Õ×É�Ä É Ö Ä Ñ

����� ÙThe induced operation � in Eq. 3.14.2 is a componentwiseoperationdefinedonly for matri-

ces of the samedimension. The p-product is defined for matricesof possibly different dimension-ality and extendsthe common notions of vector and matrix products. In general,we start with aheterogeneousalgebra ��¨¯À�FÍ�«��«�ò �Ы����»«����OÆ , where � is a binary operation � á Í Ý ò ã and À��«�\Æ is a commutativesemigroup. For eachquadruplel, m, n, and q of positive integersandeachfixed ³�ÇüÚ Û that divides both m and n, we constructan inducedheterogeneousmatrix alge-

bra � à ¨�����È�� Ê�� ÀBÍ�Æg«.È����� Ê�� � Þ À��Æ�«�È Ü Ê Þ ÀBò1Æ! i«#" �� à «$�&%(' , where �ËÈ)�*�� Ê&� � Þ À+�Æ�«�,' is the inducedmatrix semigroupdefinedby Eq. 3.14.1 and�� à á È � Ê#� À0Í@Æ Ý È Ü Ê Þ À)ò�Æ ã È � � ��Ê � � Þ À��Æ (3.14.8)

is a binary operationinducedby � °F±�²)� . The operation �� à is called the generalmatrix productof order p or simply the p-product and is definedas follows: Suppose¾ ¨JÀB Ã)Ä Å ÆvÇ�È � Ê#� ÀBÍ�Æ andï ¨­À0ñ Ã)Ä Å Æ�Ç]È Ü Ê Þ À)ò�Æ . Re-indexA and B using the rule¾ª¨.-I Ã)Ä�Õ0/lÄ ó Ö21 � Ê3� õ 4 à ÀB¼�«�º�ÆY¨65�«î°c±�²ï�¨7-Iñ Õ×ó�Ä ô Ö Ä Å 1 Ü Ê Þ õ ß à ÀBº�«0é�Æö¨»÷ Ù

137

Page 146: Image Algebra by Ritter

We now define the matrix 8:9<;6=>@?(ACBEDGF�HI$J&K I,L�M*NPO(3.14.9)

by QSRUTWV X�YZR0[ZV \]Y 9 ^_`�acbed+f T�VgRh[ZV i�Y >kj R0iSV XlYmV \+n 9 d+f T�VgRh[ZV b Y >kj R b V XlYZV \+n =�opoqo�= dmf T�VgRh[]V ? Y >kj R ? V X*YmV \+nsr(3.14.10)

where

Q R0T�V X�YZRh[ZV \]Yis the entry in the (s,j)-row and(i,t)-columnof

8. Herewe usethe lexicographicalorderM*t r2u OwvxM+tqy rzu y{O}|~t�v�t�y

or ift 9 t�y r�u v u y

. Thus, the matrix

8hasthe following form:������������������������������

�W�Z�+�g�+�{�Z���g�2� ����� ����*�g�2�{�Z��� �+� �W�{���g�2�{�{�W�g��� ����� ����*�g�2�{�{�W� �2� ����� ��Z���g�2�{�h�Z� �Z� ����� ����*�g�2�{�h�s�Z�p� ����W�Z��� �+�{�Z���g�2� ����� ����*� �z�{�Z��� �+� �W�{��� �z�{�{�W�g��� ����� ����*� �z�{�{�W� �2� ����� ��Z��� �z�{�h�Z� �{� ����� ����*� �z�{�h�s�Z�p� ���...

......

......

...� �Z��� �(�Z���{�Z���g��� ������� �Z��� �(�Z�����Z��� �+� � �Z��� �(�Z���{����g�2� ������� �Z��� �(�Z�����{�W� �2� ������� �Z��� �(�Z���{�U�]� �{� ������� ����� �(� ���{�{�h�s�Z�q� �*�� �{�W�g���{�Z���g�2� ����� � ����g�2�{�Z��� �+� � �0�W�g�2�{�{�W�g��� ����� � ����g�2�{�{�W� �2� ����� � �{�W�g�2�{�h�Z� �{� ����� � ����g�2�{�h�s�Z�p� ���...

......

......

...� �{�W� �(�Z���{�Z���g��� ������� �{�W� �(�Z�����Z��� �+� � �{�W� �(�Z���{����g�2� ������� �{�W� �(�Z�����{�W� �2� ������� �{�W� �(�Z���{�U�]� �{� ������� �{�W� �(�Z�����h���Z�q� ���...

......

......

...� �{�l� ���{�Z���g��� ����� � �{��� ����Z��� �+� � �h��� ��{����g�2� ����� � �{��� ����{�W� �2� ����� � �{��� ��{�U�]� �{� ����� � �{��� ����h���Z�q� ���...

......

......

...��{���g�+�{�Z���g��� ����� �W�{���g�+�{�Z��� �+� ������g�m���{�W�g��� ����� �W�{���g�+�{�{�W� �2� ����� ������g�m���h�Z� �U� ����� �W�{���g�+�{�h�s�]�q� ���...

......

......

...� �{��� ���Z�!���Z���g��� ������� �{��� ���]���{���*� �z� � �{��� �(�Z�p�h�{�W�g�2� ������� �{��� ���]���{���� �z� ������� �{��� �(�Z���{�h�Z� �{� ������� �{��� ���]���{�U���Z�q� ���

 �¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¢The entry £q¤0¥W¦ §�¨Z¤h©Z¦ ª]¨ in the (s,j)-row and (i,t)-column is underlinedfor emphasis.

3.14.3 Example: Suppose«­¬<®�¬<¯�¬<° and ± denotesaddition(+), while ² denotesmultiplicationin the abovedescription. If ³w¬:´¶µ¸·¹¬»º¼µ¾½G¬�¿�µ@ÀqÁÃÂxÄŬ:Æ , then for ÇȬ»´ , one obtains·ÊÉ�Ç­¬.ƶµË½�É�Ç̬�´�ÀÍÁ�Â�ÎÐÏ»ÑÌÏÒ´ . Now letÓ ¬ÕÔÃÖ�×× Ö�×Ø Ö�×�Ù Ö�×�Ú Ö�×Û Ö�×+ÜÖ Ø× Ö ØØ Ö Ø�Ù Ö Ø�Ú Ö ØWÛ Ö Ø�ÜÃÝxÞEß�à]á�â¾ã�äPå}æ<ß Ø á Ü ã�äPåand ç

æèééêìë ×× ë ×Ø ë ×�Ùë Ø× ë ØØ ë Ø�Ùë Ù�× ë Ù�Ø ë ÙÙë Ú�× ë Ú�Ø ë ÚÙ

í�îîï ÞEß@ð¼á¼ñSã*äPå}æ<ß Ú á Ù ã�äPåÃòThen the (2,1)-row and (2,3)-columnelement óqô ØWõ ×ö ô Ø�õ Ùö of the matrix÷ æ<øxùú Ø

çÞÊß àgðÍû*üÍá ô âeûzü ö ñ ã*ä�å&æ6ß Ú á3ý�ã�äPåis given by ó(ô Ø�õ ×�ö ô Ø�õ Ùö æ Øþÿ�� × Ö Ø�õ ô Ø!õ ÿ ö � ë ô ÿ õ ×*ömõ Ùæ Ö Ø!õ ô Ø�õ ×�ö � ë ô ×�õ ×�ö2õ Ù ù Ö Ø�õ ô Ø�õ Ø�ö � ë ô Ø!õ ×*ömõ Ùæ Ö�ØlÙ � ë ×lÙ ù Ö�Ø�Ú � ë ÙÙ ò

138

Page 147: Image Algebra by Ritter

Thus, in order to compute ������� ��� ��� �� , the two underlinedelementsof � arecombinedwith thetwo underlinedelementsof � as illustrated:

��� � � �� � �� � �� � �� � ��� �� � ��� � ��� � ��� � ��� � �������� � �!!"$# � # �� # ��# �� # ��� # ���# �� # ��� # ���# �� # ��� # ���%�&&'

( � � )�*� �� � � ��*���� �� � ��*�+��� � � )�*�+��� �� � ��*�,��� � � ��*�-�.� �/� ���*���� � � ���*���� �� � ���*�+��� � � �)�*�+��� �� � ���*�,��� � � ���*�-�.� �/ �0�� �1�!!" # �+�� �2� # �+�� ��� � # �+�� �3� �# �+)� �/�� # �+�� ���� � # �+�� ��3� �# �+�)� /�� # �+��� ��� � # �+��� �3� �# �+�)� �/�� # �+��� ���� � # �+��� ��3� �%�&&'

( �!!" � �4�� �2���� � � � )� /��+�� �� 56575 � �+�� �2����� �� 57565 � ���� �2�-�.� ���7�+�� ���� )� /8�7� )� �/��+�� �� 56575 �9�+�� ��2����� �� 57565 �7���� ��2�-�.� ��� �+��� ��� )� / � � �)� /��+�� �� 56575 � �+��� �2����� �� 57565 � ����� �2�-�.� ��� �+��� ���� )� / � � �)� �/��+�� �� 56575 � �+��� ��2����� �� 57565 � ����� ��2�-�.� ��% &&' ( �!!" � � � �� 57565 � �� 56575 � ;:� �� � ��� 57565 � ��� 56575 � ��:� �� � ��� 57565 � ��� 56575 � ��:� �� � ��� 57565 � ��� 56575 � ��:

% &&'=<Thenotation >�@? is completein that it involvesall thebuilding blocksof thep-product;thesubscript

p providesuswith thecommondivisorof mandn,�

remindsusof thebinaryoperation�BADCFE@GIHKJ

,andtheoperation> inscribedby thecircledefinestheglobalreduceoperationL of Eq. 3.14.10of elementsofJ

. We makethe conventionof usinga circle,�

, if the binary operationCME@GIHKJ

is viewedasamultiplicativeoperationanda square,N , if it is viewedasanadditiveoperation.Thusif

C ( J ( G (POand > denotesaddition(+), while

�denotesmultiplication, thenEqs. 3.14.9and3.14.10haveformQ ( � �� ? �SR@TVUXWY[Z]\ Y�^._ O1` (3.14.11)

and� �+a�� b�c�4dc� ef ( ?gh�i kj � aX� l Y �+dc� h m5 #�n Y �h � b�2� e;o ( j � a�� l Y �4df� �m5 #.n Y ���� b/�� e;o �qp7p6pr� j � aX� l Y �4df� ? m5 #.n Y � ? � b/2� e;o s (3.14.12)

respectively.On the otherhand,if > denotesthe maximum, t , of two numbersand�

denotesaddition,then Eqs. 3.14.9 and 3.14.10have formQ ( � tN ? �SRuT U�WY[Z]\ Y�^ _ O1` (3.14.13)

and � �4a�� bX��4df� e� ( ?vh�i 1j � a��*�4dc� h � # �h � bX�� e3o ( j � aX�*�+dc� � � # � �� b/�� e2o t p7p6p t j � aX�*�+dc� ? � # � ? � b�c� e;o s (3.14.14)

respectively.

As mentionedearlier,the p-productincludesthe commonlyusedmatrix andvectorproducts.Theseproductsare obtainedwhen substitutingcertain specific values for p. We concludethis sectionbyconsideringthesespecific cases.

139

Page 148: Image Algebra by Ritter

3.14.4 The case wIxBy .If wzx{y , then |u}�wzx~|@���r}�wFx��q��������x�y . Therefore,the entry in the (s,j)-row and (i,t)-

column of the matrix ��xK����V�����S�V�����D�k�����k�is given by �7 �¡�¢ £X¤� -¥c¢ ¦f¤§xK¨©¡�¢* 4¥c¢ � ¤ �Bª   � ¢ £/¤�¢ ¦ . Since« � �/¬ �6y � x ¬ �­�®�¯� � � yD�2° � x�° , �7 �¡�¢ £X¤� 4¥f¢ ¦�¤ is of form �9 +¡�¢ £�¤c 4¥c¢ ¦f¤kx±¨ ¡�¥ ��ª £�¦ . Hence,

����F��� x³²´ ¨ ��� �{� ¨ ��µ �{� ¶6¶6¶ ¨ � � �·�...

......¨ � � � ¨ � µ �{� ¶6¶6¶ ¨ ���F�{��¸¹ �

where ¨ ¡2¥ �{� xº²´ ¨ ¡�¥ �{ª ��� ¶7¶6¶ ¨ ¡�¥ �·ª � �...

...¨ ¡�¥ �qª � � ¶7¶6¶ ¨ ¡2¥ �·ª �9� ¸¹=»This is the Kroneckeror tensorproductfor heterogeneousalgebras.For this reason,whenever� and

�are understood,we let ��V� be denotedby ¼ .

If both wMx�y and |½x�y , then � is a column vector of length l and

�F¼ � x ²¾¾´ ¨�¨ µ...¨ � ¸�¿¿¹ ��M��� x ²¾¾´ ¨

� �·�¨ µ �·�...¨ � �{� ¸�¿¿¹ �u� �*�À�©� �/�Á� �

which correspondsto the tensorproductof a column vector and a matrix.

If insteadof | , �zxÂy , then we obtain the heterogeneousversionof the tensorproductof a rowvector and a matrix:� ¨ � �m¨ µ � ¶6¶7¶ �m¨ � � ¼ � x � ¨ � �q� �$¨ µ �{� � ¶6¶6¶ ��¨ � �·�Ã�Ä�Å� �À�Æ�Á� �/�Á� »

If both ÇÈxÉy and ÊËx�y , thenwe obtain the tensorproductof a row vectoranda columnvector:�F¼ � x � ¨ � �q� �$¨ µ �{� � ¶6¶6¶ ��¨ � �·�Ì� »x ²¾¾´ ¨� ª � ¨ µ ª � ¶6¶7¶ ¨ � ª �¨ � ª µ ¨ µ ª µ ¶6¶7¶ ¨ � ª µ...

......¨ � ª � ¨ µ ª � ¶6¶7¶ ¨ � ª � ¸ ¿¿¹ �Å� �[�D� �/�Á� »

Observethat if |³x~� , then this generaltensorproductcorrespondsto the outer product of two rowvectors.

If |Íxqy and �zx�y , then � �Î� �f� � �/Ï1� � �Ð�Î� � �©� �ÒÑÌ�and

�z¼ � x ²¾¾´ ¨�¨ µ...¨ � ¸�¿¿¹ �� � � x ²¾¾´ ¨

� �{�¨ µ �{�...¨ � �·� ¸�¿¿¹

x ²¾¾´ ¨� ª � ¨ � ª µ ¶7¶6¶ ¨ � ª �¨ µ ª � ¨ µ ª µ ¶7¶6¶ ¨ µ ª �...

......¨ � ª � ¨ � ª µ ¶7¶6¶ ¨ � ª � ¸�¿¿¹ �Å� �c�©� ���1� »

140

Page 149: Image Algebra by Ritter

It follows from the last two casesthat if ÓÕÔDÖØ×ÚÙIÛKÜ is commutative,then Ý�ÞËß©à�áâßcã ß�ä á@àåÞ ,where á ßçæ�èFé�ê[ë Ý;ÖÁãíì­î�ï�Þ ßðæPèMñ�êòé Ý�ÙÌã are the transposeof á æPèMëcêòé Ý�Ö1ãíì�î�ï�Þ æ�èMé6ê©ñ Ý;ÙÌã ,respectively.

If ó ä ôõä ö and ÷ ä ø , then ù7é7Ý;ú�û�üýã ä ù7é.Ý/ú�û ô ã ä ú , þ�é�Ý�ü�û3ÿ®ã ä þ�é.Ý ô û ô ã ä ô , andþ������ ������� �� ä þ�� é � é ������ �� ä þ é ������ �� ä þ����� �� , where þ����� �� ä�� Ó�� . Thus,ázàVÞ ä��0ä�� þ � é � é � û�þ � é � ��� û������ û®þ � é � ��� û�þ ��� � é � û�������û�þ ���!� ��� û"������û�þ �#�$� �$��%ä Ý/þ é û�þ � û�������û�þ � û�þ ��& é û�������û®þ �'� û�������û®þ ��( ãand àºÔÁÖ � ×FÙ � Û Ü � (

.

3.14.5 The case ) ä ÷ ä·ö .

In this case ÷+*,) ä�ö *,) äBô . Since ô.- ú - ÷/*,) ä ô ì�î�ï ô.- ÿ -�ö *!) äBô , we havethat ô0- ù�1DÝ�ú�û�ü ã ä ü ä þ�1DÝ�ü�û;ÿ[ã - ÷ . Therefore, 2Ó � Ô è ëfê � Ý�Ö1ãð× è � ê©ñ Ý�Ù�ã Û è ëfê©ñ Ý/ÜÁã , where�³ä á32Ó � Þ is definedby þ �� ä 4 5687 é � �:9 Ó;� 9� =< (3.14.15)

Herewe set þ �>�'� �8������ �� ä þ �� since Ý@?Æû;ÿ ã ä Ý@?Æû ô ã ä ?=ì�î�ï�Ý/ú�û'A�ã ä Ý ô û8A�ã ä A . We alsodefine 2Ó ä 2Ó 1whenever ÷ ä½ö ä ) .

ReplacingB with C , we seethat 3.14.15hasthe form of the usualmatrix product. For this reasonwe refer to 2Ó as the generalizedmatrix product.

If DFEHG , then IJ K=LNMPORQ MTSVUXW@Y[Z]\_^ Uand `aEcb3IJ.d

is definedbye!f E g hi,jlk�mon Jqp n f (3.14.16)

sincein this casee�r�s�t u�vr�w�t f v E e�r k t k vr k t f v E e f and Gyx�z�{ W@|�}8~�Z E�z { W G },~�Z E ~ E e { W@~�} G Z E e { W:~l}:��Z x�� .

An analogouscaseoccurswhenq = 1. In this case IJ�K�Q.� S�M W L Z O W:Y M Z��\���^ �>� � and `�E�b IJ.dis defined by e s E g hi,jlk m s n J;p n�� (3.14.17)

Equations3.14.15,3.14.16,and3.14.17play a centralrole in imagealgebraand correspondto thegeneraltemplateproduct,thegeneralbackwardtransform(or backwardimage-templateproduct),andthegeneralforward transform(or forward image-templateproduct),respectively.

Another importantproductoccurswheneverDFEH�0E�G . In this case IJ K�LNMPO Y M \�^ . Thus,`�E�b IJ.dis a scalar value in ^ . Since e r>s't u8v�r�w�t f v E e r k t k vr k t k v E e k�k , we set e E e r�s�t u�vr�w�t f v andnotethate E g hi,jlk�mon J;p n�� (3.14.18)

Again, replacing � with � , we seethat 3.14.18hasthe form of the usual inner or dot product oftwo vectors.For this reasonwe call b�IJ�d

the generalizeddot productandset b3IJ.d E�b�� d.

141

Page 150: Image Algebra by Ritter

Bibliography

[1] R.C.BackhouseandB. Carre. Regularalgebraappliedto path-findingproblems.J. Inst.Math.Appl.,15:161–186,1975.

[2] C. Benzaken.Structuresalgebra des cheminements.In G. Biorci, editor, Network and SwitchingTheory, pages40–57.AcademicPress,1968.

[3] G. Birkhoff. Lattice Theory. AmericanMathematicalSociety,Providence,RI, 1984.

[4] G. Birkhoff and J. Lipson. Heterogeneousalgebras.Journal of CombinatorialTheory, 8:115–133,1970.

[5] R. Blahut. FastAlgorithmsfor Digital SignalProcessing. Addison-Wesley,Reading,MA, 1985.

[6] B. Carre. An algebrafor network routing problems.J. Inst. Math. Appl., 7:273–294,1971.

[7] R. Cuninghame-Green.Processsynchronisationin steelworks—aproblemof feasibility. In Banburyand Maitland, editors,Procceedingsof the 2nd International Conferenceon OperationsResearch,pages323–328.English University Press,1960.

[8] R. Cuninghame-Green.Describing industrial processeswith interferenceand approximatingtheirsteady-statebehaviour.Oper. Research Quart., 13:95–100,1962.

[9] R. Cuninghame-Green.Minimax Algebra: Lecture Notesin Economicsand MathematicalSystems166. Springer-Verlag, New York, 1979.

[10] J.L. Davidson.Lattice Structures in the ImageAlgebraand Applicationsto ImageProcessing. PhDthesis,University of Florida, Gainesville,FL, 1989.

[11] R. Dedekind.GesammelteMathematischeWerke. Math. Annalen,Braunschweig,1927.

[12] P.D.Gader.ImageAlgebraTechniquesfor Parallel Computationof DiscreteFourier TransformsandGeneralLinear Transforms. PhD thesis,University of Florida, Gainesville,FL, 1986.

[13] B. Giffler. Mathematicalsolutionof productionplanningandschedulingproblems.Tech.rep., IBMASDD, 1960.

[14] P.J.Higgins. Algebraswith a schemeof operators.MathematischeNachrichten, 27:115–132,1963.

[15] F. Klein. GesammeltemathematischeAbhandlungen, volume 1. Julius Springer,Goettingen-Berlin,1921.

[16] S. Lang. Algebra. Addison-Wesley,Reading,MA, 1965.

[17] Jr M. Hall. TheTheoryof Groups. Macmillan Co., New York, 1966.

[18] V. Peteanu.An algebraof the optimal path in networks.Mathematica, 9:335–342,1967.

[19] G.X. Ritter and J.L. Davidson.The imagealgebraand lattice theory.TechnicalReportTR 87–09,University of Florida CIS Department,1987.

[20] W. Rudin. Realand ComplexAnalysis. McGraw-Hill, New York, NY, 1974.

[21] A. Shimbel. Structurein communicationnets. In Proceedingsof the Symposiumon InformationNetworks, pages119–203.PolytechnicInstitute of Brooklyn, 1954.

[22] D. Wenzel.Adaptionof groupalgebrasto imageprocessing.Master’sthesis,University of TexasatSanAntonio, Dept. of ComputerScience,December1988.

142

Page 151: Image Algebra by Ritter

CHAPTER 4IMAGE ALGEBRA

Thegoalof this chapteris to familiarize thereaderwith thebasicconceptsthatdefineimagealgebra.Since the primary operandsof imagealgebraare imagesand templates,we begin our discussionwiththeir characterization.

4.1 Images and Templates

In thedesignandanalysisof computervision algorithmsit is not only convenient,but alsonecessaryto mathematicallycharacterizethe imagesto be manipulated.

In Section2.18 we discussedthe notion of a digital image. According to Definition 2.18.3, digitalimagesarequantizedversionsof continuousintensityfunctionsoversomespatialdomainX. Specifically,digital imagesweredefinedas functionswith domaina rectangularsubsetof ��� andrangesomesubsetof � �8� . Although mostdigital imagesassumethis type of format, the definition doesnot covervarioustypesof imagesmanipulatedby currentdigital andoptical devices.For instance,digital computershavetwo major forms of numeric representations:integerand real. Integernumbersrangefrom 0 to somemaximumvalue �� F¡.¢ . In a 32–bit computer,for example,the maximumpositive integeris �¤£ � ¡.¢ . Ifan integerarithmeticoperationresultsin a fractionalpart, the remainderis simply truncated.Thus, forexample,the ratio ¥'¦£ is representedas the integer5 without a trailing decimalpoint. With real numbercomputation,the fractionalpartof anoperationis retainedup to thenumericalaccuracyof thecomputer.Theratioof therealnumbers¥'¦!§ ¨£ § ¨ is representedas ©Vª�«�«$¬�¬�¬'«�« . Most imageprocessingtechniquesinvolverealor floatingpoint arithmetic,thusnecessitatingreal-valuedimagerepresentation.Furthermore,variousimagetransformations,suchasedgedetectiontransformsand the Fourier transform,introducenegativeand complexvalues. Also, when modelingimagesand imagetransformsin the continuousdomain,acontinuumof valuesis usually requiredfor the rangeof an imagefunction. Thus, the set � � � doesnotsuffice to characterizeimagevaluesand imageprocessingtransforms.

Three-dimensionalimages,i.e., imageswith domain in � £®­�¯±°N£ , are often generated(computed)from multiple cameraviews,motion,millimeter waveradar(MMWR), X-ray tomography,or laser-rangedata. Therefore,the needfor domainsother than rectangularsubsetsof � � is alsoobvious. In order toprovidea mathematicallyrigorousdefinition of an imagethat coversthis plethoraof different images,itbecomesevidentthat an imagemustbe definedin generalterms,with minimum specification.

4.1.1 Definition. Let ² bea homogeneousalgebraandX a topologicalspace.An ² –valuedimageonX is any elementof ²N³ . Given an ² –valuedimage ´¶µ¶²·³ , then ² is calledthe setof possiblerangevaluesof a and X the spatial domainof a.

It is often convenientto let the graphof an image ´¸µ�²·³ representa. The graphof an imageisalsoreferredto asthe datastructure representationof the image.Given the datastructurerepresentation´0¹»º�¼:½¿¾8´À¼�½·Á�Á±ÂF½�µ¶Ã+Ä , then an element ¼:½�¾8´�¼�½�Á'Á of the data structureis called a picture elementor pixel. The first coordinatex of a pixel is called the pixel location or imagepoint, and the secondcoordinatea(x) is called the pixel value of a at location x.

143

Page 152: Image Algebra by Ritter

Obviously,Definition 4.1.1 coversall mathematicalimageson topologicalspaceswith rangein analgebraicsystem.RequiringX to bea topologicalspaceprovidesuswith thenotionof nearnessof pixels.SinceX is not directly specifiedwe may substituteany spacerequiredfor the analysisof an imageorimposedby a particularsensorandscene.For example,X couldbea subsetof Å�Æ0Ç�ȱÉNÆ with ÊRË¶Ì ofform Ê�Í�Î:Ï�Ð!Ñ=Ð'Ò!Ó , wherethe first coordinatesÎ'Ï�Ð,ÑÔÓ denotespatiallocationand t a time variable.

Similarly, replacingthe unspecified valueset Õ with Å�Ö'× or Õ.ÍØÎ@Å�Ö�×ÙÐ=Å Ö!Ú Ð�Å Ö!Û Ó providesus withdigital integer-valuedanddigital vector-valuedimages,respectively.An implicationof theseobservationsis that 4.1.1alsocharacterizesany typeof discreteor continuousphysicalimage.Thecommonmodelofa physicalimageis in termsof a continuousenergy functionE(x, Ü ), where Ü is a variableassociatedwithenergy at space/timelocationx. In the contextof visual imagesÜ refersto wavelengthandx may be ofform ÊÝÍ»Î:Ï�Ð,Ñ�Ó , ÊÞÍ»Î@ÏÀÐ,Ñ�Ð8Ò'Ó , or ÊÝÍ»Î@ÏÀÐ,Ñ�Ð@ßVÐ�Ò8Ó , where Î@ÏÀÐ,ÑoÓ and Î@ÏÀÐ,Ñ�Ð,ß�Ó representspatialcoordinatesand t the time variable.Physicalimagingsystemsimposea restrictionon the maximumbrightnessof animageand sincelight intensity is a real positive quantity, it is assumedthatàâá3ã Î�Ê�Ð ÜVÓ á�ä ÐwhereB denotesthe maximumbrightness. In addition, the spatialdomain is limited in extentby theimaging systemand the systemoperatesonly over a finite time interval so that å ÊFå"æPç . Thus, E is aboundedfunctionon ÌRè]é à Ð,ê�Ó , whereX is compact,Ê¸Ë¶Ì , and Ü®ËÝé à Ðëê�Ó . In manyimagingsystemsthe imagedoesnot changewith time so that X representsonly the setof spatialdomainvariables.

The observedimagefield is modeledas a spectrallyweightedinterval

ì Î�ÊíÓ·Í îï ð ã Î�Ê¿ÐëÜVÓ8ñ�Î'ÜlÓ8òlÜóÐwhere s( Ü ) denotesthe spectralresponseof the sensorused. In a multispectralimaging systemtheobservedimage field is given by ì Î�Ê�Ó·ÍØÎ ì"ô Î:ÊíÓ,Ð�õ�õ�õ�Ð ìVö Î:Ê�Ó'Ó"Ðwhere ìV÷ Î:Ê�Ó�Í îï ðùø Î:Ê¿ÐëÜVÓ�ñ,ú:Î�ÜlÓ8ò"ÜóÐand û ÷ Î�ÊíÓ denotesthe responseof the ith sensor.For example,in an arbitraryred-green-bluecoordinatesystem, ì Î�ÊíÓ·Í»Î@ü�Î�ÊíÓ,ÐÔýNÎ�Ê�Ó8Ð=þíÎ:Ê�Ó'Ó"Ðwhere

ü�Î�Ê�Ó¿Í îï ð ã Î�Ê¿ÐëÜ=Ó'ñ ÿoÎ�ÜlÓ8ò"ÜóÐýNÎ:ÊíÓ·Í îï ð ã Î�Ê¿ÐëÜVÓ8ñ��VÎ'ÜlÓ,òlÜóÐþíÎ:ÊíÓ·Í îï ð ã Î�Ê�Ð ÜVÓ�ñ��VÎ'ÜlÓ,òlÜóÐ

144

Page 153: Image Algebra by Ritter

and ��� ��� � ��� ��� ��������������arespectraltristimulusvaluesfor thesetof red,green,andblueprimaries,

respectively.

Although theseexamplesarepresentedin the contextof visual images,othermultidimensionaltimevarying signalshave similar representationsand can always be viewed as boundedfunctions from acompactsetX to anappropriatevalueset � . Thesampled(quantized)versionsof thesefunctionsremain,of course,boundedfunctionson compactsetsasfinite discretesetsarealwayscompact.Therefore,bothcontinuousandquantizedimagerepresentationsof physicalimagesare includedin Definition 4.1.1.

Even thoughDefinition 4.1.1 providesa generalframework for specifying imageswith particularpoint andvaluesets,the definition doesnot provide for moreinsight into understandingimagecontent;the functional form of the imagea is almostneverknown. The inability to relatechangesin x to thosein a(x) presentsoneof the greatestdifficulties in imageunderstanding.In addition,4.1.1 providesonlyfor a deterministicimagerepresentation;it definesa mathematicalimagefunction with point properties.It is often convenientto regardan image as a sampleof a stochasticprocess. The image function� ���� � � �"!#�%$&�'��)( (or � �*�+ � � �,!-��$&�(, ) is assumedto be a memberof a continuousfour-dimensionalstochasticprocesswith spacevariable

�"!#��$&��'�and time variable t. A discrete(quantized)imagearray

can be completelycharacterizedstatistically by its joint probability density. The extensionof imagealgebrato include stochasticmodelsis given in Section?.

A moreabstractclassof imagesis providedby templates.Templatesare imageswhosevaluesareimages.In termsof imageprocessingapplications,templatesreign supreme;templateoperationsplay adominantrole in mostalgorithmsandprovidefor brevity of code.Theyaretheessenceof imagealgebra.Thenotionof a template,asusedin imagealgebra,unifiesandgeneralizestheusualconceptsof templates,masks,windows,andneighborhoodfunctionsinto onegeneralmathematicalentity. In addition,templatesgeneralizethe notion of structuringelementsasusedin mathematicalmorphology[5, 4].

4.1.2 Definition. A templateis an imagewhosepixel valuesare images(functions). In particular,an � –valuedtemplatefrom Y to X is a function .0/&1324�65 . Thus, .87:9;�<5>=@? and t is an� 5 –valuedimage on Y.

For notationalconveniencewe define .�ACBD. �;EFHG E 701 . The image .IA hasrepresentation

. A �KJ��*� � . A �;��, / � 7ML0NPOThe pixel values .@A �Q�+ of this imagearecalled the weightsof the templateat point y.

From a set theoreticpoint of view the set 9 �65 = ? of all � –valued templatesfrom Y to X and

the set � 5SR ? are equivalent. Defining for each .M7 9 � 5 = ? a correspondingfunction T.U7V� 5SR ? byT. �Q� �E+W� .@A �Q�+ , and vice versa,providesfor the necessaryone-to-onecorrespondence.Conceptually,however,thereis a greatdistinctionbetweentheelementsof 9Q�65X=@? andthoseof �65HR ? . For the formerwe obtainfor eachpoint

E 701 an � –valuedimage . A on X while for the latter we obtainfor eachpoint�;�F�E6 7ULZYM1 a value . �;�F�%E6 7U� . It is this conceptof associatingwith eachpointE 7M1 an image.IA that providestemplateswith their greatutility.

If t is a real or complex-valuedtemplatefrom Y to X, then the supportof . A is denotedby [ � . A and is definedas

[ � .IA +�KJ�� 7ML\/H.@A �Q�+^]�V_ N`O145

Page 154: Image Algebra by Ritter

For extendedreal-valuedtemplateswe alsodefinethe following supportsat infinity:

a�bdcQeIf gFhKikjmlMn\oHe@f�cQj+gqphKrtsvua#wxbycQeIf�g+hzikj{lMn\o|eIf cQj+gqph~}|r�s�uand a���bycQeIf�g+hzikj{lMn\o|eIf cQj+gqph���r�s`�

If X is a spacewith anoperation+ suchthatc,nUu��|g

is a group,thena templatee�lV�;�6�W� �

is saidtobe translationinvariant (with respectto theoperation+) if andonly if for eachtriple

j u,�Pu��ClMnwe have

thateIf�c;j+g hVeIf��&��c;j0����g

. Templatesthat arenot translationinvariant arecalled translationvariant or,simply,variant templates.A largeclassof translationinvarianttemplateswith finite supporthavethenicepropertythat theycanbedefinedpictorially. For example,let

nZhD�-�andy = (x,y) beanarbitrarypoint

of X. Setj6�Hh�c"�-u��}t��g�uPj � h�c"���V�vu���g�uq������j# �h¡c;�y�t�vu���}���g

. Definee�l �*¢ � � �

by definingthe weights

e f c;�Fgqh£�vuqe f cQj¥¤vgWh§¦xuXe f cQj � gXh©¨xuqe f c;j   gWh§ª&uX���&�«e f c;j�gXh§¬wheneverx is not an

elementofiI�Puj6�-uj � u)j- Is . Note that it follows from the definition of t that

aFc;eIf&g^h�i��Puj¥�-u)j � u)j- �s .Thus,at any arbitrarypoint y, the configurationof the supportandweightsof

eIfis asshownin Figure

4.1.1. The shadedcell in the pictorial representationofe f

indicatesthe locationof the point y.

x®x® +1¯

y­ -1

3 1

2 4

Figure 4.1.1 Pictorial representationof a translationinvariant template

Therearecertaincollectionsof templatesthatcanbedefinedexplicitly in termsof parameters.Theseparameterizedtemplatesare of greatpractical importance.

4.1.3 Definition. A parameterized° –valuedtemplatefrom Y to X with parametersin P is a functionof form ±0² ³µ´ ¶Q°6·X¸I¹{º The set P is called the setof parametersand each »�¼{³ is calleda parameterof t.

Thus, a parameterized° –valuedtemplatefrom Y to X gives rise to a family of regular ° –valuedtemplatesfrom Y to X, namely ½&±�¾¿»�À�¼V¶*° · ¸ ¹ ²Á»0¼M³0 .

146

Page 155: Image Algebra by Ritter

Figure 4.2.1 An exampleof an explicitly specifiedcoordinaterestriction.

4.2 Functional Specification of Image ProcessingTechniques

The basic conceptsof elementaryfunction theory discussedin Sections2.5 and 2.6 provide theunderlying foundationof a functional specificationof image processingtechniques. This is a directconsequenceof viewing imagesas functions; since imagesare functions, the notation and conceptsdiscussedin 2.5, 2.6, andsubsequentsectionscanbeusedto furnishthefunctionalnotationfor specifyingimageprocessingalgorithms. In order to emphasizethe fact that eventhe mostelementaryconceptsoffunctiontheoryhaveimportantapplicationsin imageprocessing,webeginthedevelopmentof a functionalnotationby focusingourattentionon thenotionsof domain,range,restriction,andextensionof a function.

Image restrictionsand extensionsare usedto restrict imagesto regionsof particular interestandto embedimagesinto larger images, respectively. Following the notation used in Section 2.5, therestriction of ÃÅÄmÆ6Ç to a subsetZ of X is denotedby Ã�È É , anddefinedby Ã�È É:ÊKÃdËÁÌÍ�ÎÅÆFÏ . Thus,Ã�È ÉMÄUÆ É . In practice,the usermay specifyZ explicitly by providing boundsfor the coordinatesof thepoints of Z. For example,the imagea on the left of Figure 4.2.1 representsa digital imageon the setРʣÑ�Ì"Ò,Ó;ÔxÏ`ÄMÕ-ÖU×dØHÙÚÒ ÙtÛxØkÜ�ÓPØ�ÙmÔCÙtÛxØkÜ&Ý , while the imageon the right representsthe restrictionÃ�È Þ�ßáà¿â ã�ä¿å Çdæç�èé à é êç�è â%ë è�é ã é�ìç,í�î .

There is nothing magicalabout restricting a to a subsetZ of its domainX. We can just as welldefinerestrictionsof imagesto subsetsof the rangevalues.Specifically,if ï{ðVÆ and ÃMÄMÆ<Ç , thentherestriction of a to S is denotedby Ã�ñóò and definedas

Ã�ñ ò ÊtÃdË0Ì Ð Îôï+Ï�õIn termsof the pixel representationof Ã�ñ ò we have Ã�ñ ò Ê£övÌ;÷FÓÃ#Ìø÷�ÏÏy×|Ã-Ì*÷�Ï�ÄUïFù . The double-barnotation is usedto focus attentionon the fact that the restriction is applied to the secondcoordinateof Ãúð Ð ÎtÆ .

Imagerestrictionsin termsof subsetsof the valueset Æ is an extremelyusefulconceptin computervision as many image processingtasksare restrictedto image domainsover which the image values

147

Page 156: Image Algebra by Ritter

Figure 4.2.2 Exampleof a rangerestriction.

satisfy certain properties. Of course,one can always write this type of restriction in terms of a firstcoordinaterestriction by setting ûµü�ýkþ�ÿ��������;þ� ÿ� � so that ���� ü������ . However, writing aprogramstatementsuchas ��� ü���� � is of little value sinceZ is implicitly specifiedin termsof S; i.e.,Z must be determinedin termsof the property “ ���*þ���ÿ� .” Thus, Z would have to be precomputed,adding to the computationaloverheadas well as increasedcode. In contrast,direct restriction of thesecondcoordinatevaluesto an explicitly specifiedset S avoidstheseproblemsand providesfor easierimplementation.

As mentioned,restrictionsto the rangesetprovidea useful tool for expressingvariousalgorithmicprocedures.For instance,if �Vÿ���� and S is the interval � ��!#"$�&%'� , where k denotessomegiventhresholdvalue,then ��)(+*-, .0/ denotesthe imagea restrictedto all thosepointsof X wherea(x) exceedsthe value k. In order to reducenotation,we define ��)1 *32 ��� (+*4, .5/ . Similarly,

���)6 * 2 ���)7 *4, .�/ !8����9 * 2 ��� (;:<.5, *4/ !���� * 2 ���>= *>? !A@CB<D����4E * 2 �� (F:<.5, *HGJIFigure4.2.2providesan exampleof sucha restriction. In this example,the input a is shownon the left(it is identical to the explicitly restrictedimageshownon the right of Figure4.2.1), while the implicitlyspecifiedimage ��� 1<K is shown on the right.

A more general form of range restriction is given when S correspondsto a set-valuedimage«ÿMLONQPSR � ; i.e., �*þ��T%VUXW þ«ÿ�� . In this casewe define

���4�tü:ýC�;þY!Z�[�øþ��\�]�����*þ��`ÿ^ �*þ��H� IFor example,given an image ��ÿV� � , we may define a function [E`_M��� a NQb by �E<_c�;þ��Müýed�ÿf�V�5dhg����;þ��H� . Then �����Ci)j ü�ýJ�;þY!\���¿þ�k�3���[�*þ� g����;þ��\� . Again, in order to reducenotationalbaggage,we define l�m)n`oqpVl�mkrts)u . Similarly, we define

lm4v o p�wJx y zkl�x{y|\|]}�l[x~y�|�����xOy|���z8lm o p�wJxOy z\l[xFy�|\|3}Tl�x~y�|�����x�y�|\��zl�m�� o p�wJx~yYzZl[x~y|H|]}�l�xOy| ����x y�|H��z�l�m)� o p�wJx yYz\l�x{y|k|3}�l[x~y| ����x y�|\��z�C�<� lmQ�� o p�wtx yYzZl[xFy�|\|]}�l�x~y�|������xOy|k���Combining the conceptsof first and secondcoordinate(domain and range) restrictionsprovides thegeneraldefinition of an image restriction.

148

Page 157: Image Algebra by Ritter

4.2.1 Definition. If �A�f��� , ����� , and ����� , thenthe restrictionof a to Z and S is definedas

�� ¢¡¤£c¥ ¦�§�¨��ª©A«\�­¬^� ®<¯It follows that ��  ¡+£c¥ ¦t§ ¨±°J«~² ³k��«~²�®H®3´�²µ�^�M¶C·<¸­�[«~²® �¹�º , ��  ¡ � ¥ ¦J§ ¨���» ¦ , and ��  ¡+£c¥ ¼J§ ¨���  £ .

The extensionof ����� � to ½¾����¿ on Y, whereX and Y are subsetsof the sametopologicalspace,is denotedby �C  À and definedby

�C  À « ²�®�¨MÁ �[«~²® Â;ÃIJ¹���½�« ²�®ÅÂÆÃ]²¹�8ǹÈC�¾¯In actual practice,the userwill have to specify the function b. Figure 4.2.3 providesan exampleofsuch an extension. Here we extendedthe image É�¨Ê��»�Ë�Ì (displayedon the right of Fig. 4.2.2)with domain �V¨Í°)²¹����´T��«~²�®YÎ$Ï�º to the image ÐѨÒÉc �À shown on the right. In this example,ÇÓ¨MÔ�«ÖÕk³~×c® ��Ø�Ù^´ªÚ5Û�ÕÛ�ÏÜÚ4ÝܳÞÚ0Ûß×]Û�ÏàÚ)Ýcá , andb is the imagedisplayedon the left of Fig. 4.2.3.

Figure 4.2.3 An exampleof an imageextension.

Two of themostimportantconceptsassociatedwith a functionareits domainandrange(Section2.6).In the field of imageunderstanding,it is convenientto view theseconceptsasfunctionsthatmapimagesto setsassociatedwith certainimageproperties.Specifically,we view the conceptof rangeasa functionâCã�äcåSæ5çJè�é�êÊëQìdefined by âCã�äàå<æCíOî�ïYðòñîóí�ôAï . Similarly, the conceptof domainis viewedas the functionõJöt÷ ã�ø ä^çJè�ùúêûë é0üdefinedby

õ�öC÷ ã�øOä[í î[ï8ð ñî�ý<þ-í�èÿï , where Y is a subspaceof some larger spaceX. In particular, ifî��úè ù , thenõ�öC÷ ã�øOä[í î[ïhð�� .

149

Page 158: Image Algebra by Ritter

Thesemappingscanbeusedto extractpoint setsandvaluesetsfrom regionsof imagesof particularinterest. For example,the statement �������� ������������������ (4.2.1)

yields the setof all points(pixel locations)wherea(x) exceedsk, namely � �"!$#&%�'(�)�*��#+�+,.-0/ .ReplacingEqs. 4.2.1 by �1�2�43����6587��9�:� �6� � (4.2.2)

results in a subsetof ; insteadof X.

Restriction,extension,domain,andrangearesomeof theelementaryconceptsusedin the functionalspecificationof imageprocessingtechniques.In subsequentsectionswe shall encountermanyothers.

4.3 Induced Operations on Images

Manipulating imagedatausing the conceptsof restriction,extension,domain,and rangedoesnotinvolve the algebraicstructureof the underlyingvalue set; the statement�<�2�=3�����567��9�:� �6� � doesnotreferencethe arithmeticoperationsof additionand multiplication associatedwith ; . However,it is theoperationsassociatedwith the valueset > that aregenerallyusedin processing> –valuedimages.In thissectionwe describehow the operationson > inducecorrespondingoperationson > –valuedimages.

Operationson and between > –valued imagesare the natural inducedoperationsof the algebraicsystem > . For example,if ? is a binary operationon > , then ? inducesa binary operation— againdenotedby ? — on >:@ definedas follows:

Let �*ACBD% > @ . Then� ? B<�!��9#EAGFH��#+�I�J�1FH��#+�+�K�L��#+� ? B+��#:�MA�#N%<'O/QP (4.3.1)

Inducedunaryoperationsaredefinedin a likewise fashion;any unaryoperationR � >TSU> inducesa unary operation R � > @ S > @ definedbyR �9�*�:�"!���#VAWFH��#:�W�J�1F��9#:�:� R ���L��#+�I�CAX#N%�'Y/�P (4.3.2)

Note that in this definition we view the composition R[Z � asa unaryoperationon > @ with operanda.This subtledistinctionhasthe importantconsequencethat f is viewedasa unaryoperation— namelyafunction from >X@ to >�@ — and a as an argumentof f.

The operationsdefinedby Eqs. 4.3.1 and4.3.2 arecalled inducedpixel level operations.They arealso referredto as grey level basedoperationsas they operateprincipally on the pixel or grey valuesof an image.

In additionto thebinaryoperationdefinedby Eq. 4.3.1, ? alsoinducesthefollowing scalaroperationson images:

For -"% >]\�^`_ ��% > @ ,- ? �a�"!���#VAWFH��#:�W�J�1F��9#:�:�4- ? �L��#:�MAX#&%Y'Y/QA (4.3.3)

and � ? -b�!���#VACF���#+�M�J�1FH��#+�X�.�*��#+� ? -cA+#&%�'O/�P (4.3.4)

150

Page 159: Image Algebra by Ritter

4.3.1 Examples:

(i) Choosingthe l-ring dfehgjiVg$kEg$lmg`n2o as our value set and applying Eq. 4.3.1, we obtain thefollowing basic binary operationson real-valuedimages:

If p�g6qsr�e�t , then

pJl&qNuwv�d�xEgMyHd�x+oMoJz1yHd�x+oXuKpLd�x:o*l{q+d�x+oMgXxTr�|~}�gp[n$qNuwv�d�xVgCy�d�x+oMoJz1yHd�x+oXuKpLd�x:o�n�q+d�x+oMgXx&rY|Y}�gpJiaqNuwv�d�xVgCy�d�x+oMoJz1yHd�x+oXuKpLd�x:o*i�q+d�x+oMgXxNr<|O}Qg (4.3.5)

and pJkaqNuwv�d�xVgCy�d�x+oMoJz1yHd�x+oXuKpLd�x:o*k�q+d�x+oMgXxNr<|O}Q� (4.3.6)

Obviously, all four operationsare commutativeand associative.

(ii) For �~r�e , we obtain the following scalarmultiplication andadditionof real-valuedimages:

�mn$pOuv�d9xEgCy�d�x+oMoJz�y�d�x+oXu4�Jnjp*d9x:oMgXxNr<|O} (4.3.7)

and ��l&p~uv�d�xVgWyHd�x:oIoaz1y�d9x:oEu4��l&pLd�x+oCgXxNr�|�}Q� (4.3.8)

It follows from the commutativityof real numbersthat,

�mn$pOu4pbn������`���mlNpYuKpJl&���(iii) Following Eq. 4.3.2,we note that any function �&z0e.��e inducesa function �Tz6eXt���e�t .

For example,using the sine function we obtain

���9� d�pLoXuv�d�xVgWyHd�x:oIoaz1y�d9x:oEu ����� d9p*d�x+oMojg�xNr�|Y}��As anotherexample,considerthe characteristicfunction

����� df��o:u��1� �����m� �  ¡�¢M£8¤$¥M¦ �¨§ ¤Thenfor any p�rYe t , �m��� d�pLo is the boolean(two-valued)imageon X with value1 at locationx if pLd�x+o � � and value 0 if pLd�x+oª©«� . This type of operationis referredto as thresholdingand k is called the thresholdvalue or thresholdlevel. Figure 4.3.1 showsan exampleof athresholdoperation.The imagea shownon the left is a ¬ ��­J® ¬ ��­ integer-valuedimage; i.e.,|¯u±°*²W³M´ ® °L²M³M´ µ° ´ . The imageon the right is the thresholdedimage � ��¶¸·�¹$º�»L¼ .

151

Page 160: Image Algebra by Ritter

Figure 4.3.1 Application of the characteristicfunction.

In somethresholdoperationsit is desiredto retain the original valuesthat passthe threshold.This operationis accomplishedby setting½m¾K¿[À$Á�Â�Ã�Ä�¿�Åfor thenc(x) = a(x) whenever

¿LĨÆ+ÅÈÇ"Éandc(x) = 0 whenever

¿LÄ�Æ:ÅÈÊ"É.

Thefunction

ÁmÂ�Ãgivenin theaboveexampleis a typical characteristicfunctionon therealnumbers.

In general,given someuniversalsetU and Ë{Ì"Í , thenthe function

ÁªÎ[Ï ÍwÐÒÑ�Ó8Ô$Õ�Ö definedbyÁ1Î�Ä�×ØÅE¾�Ù Õ ÚÜÛ ×�Ý ËÓ Þ�ßIà6á$âMãÈÚåäGáis called the characteristicfunction on S. In the aboveexample, Í ¾çæ and Ë ¾ Ñ�è Ý�æ�Ï è Ç Õ�Õ�éHÖ .There is a useful generalizationof the conceptof a characteristicfunction. Suppose

¿êÝsë�ìandË Ý]í�îðïHñ ì ; i.e., Ë Ä�Æ+Å Ì ë�òóÆ«Ýô

. We defineÁ Î Ä9¿*Å:¾ Ñ Ä�Æ Ô ½HÄ�Æ:ÅIÅõÏ1½�Ä9Æ:ÅX¾ ÕhÚ�Û ¿LÄ�Æ+Å+Ý Ë Ä�Æ:Å ÔXÞ�ßWà8á$âMãÈÚ¨äGá ½HÄ�Æ+ÅX¾ Ó�ÖEö (4.3.9)

Obviously, if Ë ÏVô Ð îðïis a constantfunction, i.e., S returnsthe sameset S(x) for each

Æ�Ý"ô,

then

Á1Îrepresentsthe usualcharacteristicfunction. Also note that

Á1Îreturnsa boolean-valuedimage

regardlessof the type of value set

ëused.

4.3.2 Example: Pixel level imagecomparisonprovidesa simpleapplicationexampleof the general-ized characteristicfunction. Given the image ÷ ÝNæ ì , we define ø0ù`ú Ý í îðû�üþý ÿ ��������� ������������������ �� ��� . The functions ��� �! �#" �! ��$ �! �&% �! �('" � are defined analogously.Thus, for example, � " �)� ���*�+�,��� � � �� �-� and � % ��. �/� �0�*�+�,���*12� �. �-� . Substi-tuting theseset functions for S in Eq. 4.3.9 yields3�465879�;:�� � � �� =< �. �>� � < �. � �@?�ACBD:&�;E� �2� �. � (FHG�IKJML�N APO JQ< �. �(�SRT�

3 46U 7 �;:&�(� � �� >< �; �>� � < �. � �@?�AVBE:&�;E��W � �. � (FHG�IKJ8L�N AXO JY< �. �(�SRT�3 4>Z[7 �;:�� � � �. \< �;E��� � < ��E�(�]?�ACBD:&�; �(� � �; � (F^G>IKJML>N A;O J_< ��E�(�`Ra�3 46b 79�;:&�(� � �� >< �; �>� � < �. � �@?�AVBE:&�;E��c � �. � (FHG�IKJ8L�N AXO JY< �. �(�SRT�3 46d 7 �;:&�(� � �� >< �; �>� � < �. � �@?�AVBE:&�;E� 12� �. � (FHG�IKJ8L�N AXO JY< �. �(�SRT�3�4feZ[7 �;:�� � � �. \< �;E��� � < ��E�(�]?�ACBD:&�; �hg� � �; � (F^G>IKJML>N A;O J_< ��E�(�`Ra�ji

(4.3.10)

152

Page 161: Image Algebra by Ritter

Here,of course,kmlmn o . In order to reduceandsimplify notation,we define

p*q[rHs kut�v pxw q8r s k&t�y p*z8rHs k�t v p�w z[r s k�t�y p�r0s k�t v p�w-{ r s k&t9yp*|[rHs k&t v p�w |[r s k&t�y p*}8rHs k�t v p/~ }[r s k�t�y �0�#� p��{ r^s k�t v p�w �{ r s k&t�� (4.3.11)

The characteristicfunction definedby Eq. 4.3.9 is not a naturally inducedoperation;it is not anoperationon � o , but an operationfrom � o to ���KyM�0� o . However,aswill be shownin the next section,generalizedcharacteristicfunctionscan neverthelessbe derivedfrom the elementarynaturally inducedoperations. Another operationthat mapsimagesto a different domain is given by the global reduceoperation. If � is an associativeand commutativebinary operationon � (i.e., s �hy=�&t is a commutativesemigroup)andX is finite, say ���]�[���0y>���[y��f�[�uy��u�K� , then � inducesa unaryoperation

��� � o�� �called the global reduceoperationinducedby � , which is definedas

� k�� ��>��� k s �EtE� � �� {H� k s �& ¡tD�2k s �¢�ft��uk s �¢�Mt.��£f£[£H�uk s �&�Kt9� (4.3.12)

Thus,for example,if �¤�`n and � is theoperationof addition( �+�¦¥ ), then� ��§ and ¨©k��ª¨«^¬0­¯® °�± ² .

In all, thelattice°�³_´uµ*´#¶V´u·D´u¸�²

providesfor four basicglobalreduceoperations,namely ¹ ® ´Dº ® ´�» ® ,and ¼ ® .

4.3.3 Examples:

(i) Area. If a is a booleanimage,®�½ ¾�¿K´MÀfÁ ­ , whereX denotessomerectangularsubsetof Â�à , then¹ ®ÅÄ ¹ÆTÇ�­*® °�±E² countsthe numberof pixels havingvaluea(x) = 1. This countcorrespondsto

a roughestimateof the areaoccupiedby the black objectsin the imagea. Hereblack objectsare definedas the connectedcomponents(seeSection2.20) of X with the propertythat x is amemberof a component È ® °;± ² Ä À

.

(ii) Imagemaximum.If É Ä ³ and Ê Ä · , then Ë Ä » and» ®�Ä »Æ^Ç0­¯® °;±E² denotesthe maximum

value of the image ®@½ ³ ­ .

(iii) Image histogram. Suppose X is a rectangular Ì ÍÏÎ array (subset of  à ), Рľ\Ñ ½ Ò]Ó ¿ÕÔmÑÖÔ2×ØÁfor somefixed integerK, and Ù Ä Ú ®+½ Ò ­ Ó�Û�Ü ÎÝaÞ ° ® ²Eß Ð,à . Define

a parameterizedtemplate

á Ó Ùãâåä Ò/æQç ­by defining for each ®è½ Ò ­ the templatet with parametera, i.e.,

á ° ® ² ½ ä Ò æ ç ­ , by

á ° ® ² Æ °PѲ Äé À êìë ® °;± ² Ä Ñ¿ í0î�ï�ðMñ>òóêõô-ðDö

153

Page 162: Image Algebra by Ritter

The image ÷ùø�ú¢û obtainedfrom the code

÷ýüÿþ���������is the histogramof a. This follows from the observationthat since ���� ����þ ����� ������� � ,÷������Qþ ����� ��� ��� � �����Qþ the numberof pixels having value j.

Figure 4.3.2 providesan exampleof the process÷ùü þ������ ��� . The left image representstheinput imagea andthe right imagethe graphof the histogramimageh, resultingfrom reducingthe parameterizedtemplatet.

If one is interestedin the histogramof only one particular value j, then it would be moreefficient to use the statement

� üìþ�� � �!�����since � � � ��� representsthe number of pixels having value j ; i.e., since � � ������þ����� � �!�����#"$�%� and � �&�'����"$�(� þ�)+* ���'"$��þ,� .

0

5000

10000

15000

20000

25000

30000

0 50 100 150 200 250 300

"histogram1"

Figure 4.3.2 An image and its histogram.

Note that in the first two examples,the global reduceoperationresultedin reducingan imageto asinglenumericalvalue. In the histogramexample,however,we have -�. /�0�132�4 , where 265�798 . Thus,by definition :;-�.�/�091<2=5>798 is an integer-valuedimageon Y.

Although in imageprocessingby computerthe spatialdomainX is alwaysfinite, the global reduceoperation ? neednot be restrictedto finite sets. Natural extensionsto infinite setsareusually inherentfor differentbinary operations,value sets,andpoint sets. For example,if X is a compactsubsetof @$Aand /B1C@ 4 , then the formulasfor areaandmaximumgiven in Example4.3.3 havethe formD /35 D

4/�.'E$0 F�EHG�IKJ L+/M5NLO�P 4 /�. EQ0R5TS(UWV�XY/�.'E$0$Z[EC13\^]�_

respectively.That theseare well definedfollows from Theorems2.11.7and 2.11.8.

154

Page 163: Image Algebra by Ritter

4.4 Properties of `�aThealgebra togetherwith the inducedalgebra a is calledan imagealgebra. It follows from the

definition of the inducedoperations(Eqs. 4.3.1 and4.3.2) that the algebra a inheritsmost, if not all,of the algebraicpropertiesof the valueset ` . As an example,considerthe setof real–valuedimagesonX. The commutativegroup bdcfehgji inducesa commutativegroup k�c a egml . The zero of the group c ais the zero image, denotedby 0 and definedas nporq�b�s�e%t�i�uvsCw3x^y . Clearly,z g{n|o}n~g z o z� z wTc a . Also, each z w}c a has an additive inverse � z definedby � z o;q�b's�e�� z b'sQi�iQu s6w3x|y��Obviously, z g�b!� z i�o,b!� z iKg z oTn��

Thereis nothingspecialaboutthe group c in this argument. The sameargumentcan be madeforany group ` . This establishesthe following theorem:

4.4.1 Theorem. If b(`fegvi is a (commutative)group, then k�` a e�g�l is a (commutative)group.

If, insteadof a group, ` is a ring then we also have

4.4.2 Theorem. If b(`feg�eh��i is a (commutative)ring, then k ` a e�g�e���l is a (commutative)ring.Furthermore, if ` is a ring with unity, thenso is ` a .

The proof is straightforward;we alreadyknow from Theorem4.4.1 that `Ra is an additive groupand it is an elementaryexerciseto verify that multiplication is associativeanddistributesover addition.Thus, ` a is a ring. The unit image of ` a is definedas �po�q�b�s�e���i�u sCw�x|y , where1 denotesthemultiplicative identity of ` . Obviously, z ���~o,��� z o z� z w�` a . Thus, if ` is a ring with unity, then so is ` a .

In Section3.7 (Example3.7.2) we notedthat c a is a vectorspaceover c . Again, thereis nothingspecialabout the field c ; the sameargumentcan be madefor any field ` . By Theorem4.4.1, ` a isa group, and using the inducedscalarmultiplication (Eq. 4.3.3), it is easyto seethat the vector spaceaxioms �K� through ��� are satisfied. This establishesthe following

4.4.3 Theorem. If ` is a field, then ` a is a vector spaceover ` . Furthermore, if card(X) = nbd��w3��i , then ` a is isomorphicto `Q� .The secondpart of the theorem follows from Example 3.8.3(i) by defining ��uR` a�� `�� by�hb z iQo�b z b's��Yi!e z b's���i�e��Y���Ke z b s � i%i , where x�o�q�s��Ye s���e�������eWs � y , and then using the exactsamear-

gumentas in 3.8.3(i).

It follows from Theorem4.4.2 that the ring k c a eg�e��!l of real-valuedimagesbehavesvery muchlike thering b(cfe�g�e��!i of realnumbers.In view of thefact that theoperationsbetweenreal-valuedimages

155

Page 164: Image Algebra by Ritter

are inducedby the operationsbetweenreal numbers,this shouldcomeasno greatsurprise.Therefore,manipulatingreal-valuedimagesis analogousto manipulatingreal numbers,andour familiarity with thereal numbersystemprovidesus with instant familiarity of the inducedsystem ¡Q¢ . More generally,ifwe know the system £ , thenwe know the inducedsystem £�¢ . In imagealgebrait is alwaysassumedthat the algebraicsystem£ is known and that the algebraicpropertiesof £ ¢ arethenderivedfrom thisknowledge.It is importantto note,however,thateventhoughthealgebraicpropertiesof £ ¢ arederivedfrom thoseof £ , theoverallmathematicalstructureof £ ¢ is quitedistinct from thatof £ ; elementsof £ ¢carry spatial informationwhile thoseof £ generallydo not. Furthermore,the inducedalgebra ¤'£ ¢�¥(¦§is structurallynot identical to the algebra ¨d£ ¥%¦© ; the inducedalgebraicstructureis usuallyweakerthanthe original structure.The succeedingdiscussiondemonstratesthis for the l-ring of real-valuedimages.

The operationsdefinedby Eqs. 4.3.5and4.3.6in Example4.3.1arethe basicor elementarybinaryoperationson real-valuedimages. Analogousto the developmentto the algebraof real numbers,otherbinary (andunary)operationson real-valuedimagescanbe derivedeitherdirectly or in termsof seriesexpansionsfrom thesebasicpixel level operations.However, insteadof reinventingthe wheel,we letthe remainingoperationson ¡R¢ againbe inducedby the correspondingoperationson ¡ . Two of theseoperationscommonlyusedin imageprocessingare exponentiationand the computationof logarithms.In particular, if a and b are real-valuedimageson X, then

ª�«~¬�­ ¨�® ¥%¯ ¨�® ©(©~°j¯ ¨(® © ¬�ª ¨'® © «�±³²�´ ¥ ®6µ3¶C·�¸ (4.4.1)

Sincewe are dealingwith real-valuedimages,we follow the rules of arithmeticandrestrict this binaryoperationto thosepairs of real-valuedimagesfor which ª ¨'® © «�±¹²º´ µ{¡¼»�®½µ<¶ . This avoidscreationof complex,undefined,and indeterminatepixel valuessuch as ¨!¾ ¿ ©�ÀÁ ¥ÃÂÄ Á ¥�Å�ÆKÇÉÈ Ä , respectively. Ifwe considersuch subsetsas Ê�Ë ¬ Ê�ÌÎÍÏÊ�ÐÒÑ�ÓÔ¡ Ì Ñ�ÕÖ¡ , then exponentiationis defined for allª ¥ × µÖ¨dÊ Ë © ¢ Ñ�Ó ª ¥W× µÖ¨(¡ Ì © ¢ .

The inverseof exponentiationis definedin the usualway by taking logarithms.Specifically,ØÚÙ�Û « ªM¬>Ü ¨�® ¥�¯ ¨'® ©(©~°j¯ ¨(® © ¬ Ø'Ù�Û « ±¹²º´ ª ¨'® ©�¥ ®Cµ3¶pÝW¸ (4.4.2)

As for real numbers,Ø'Ù�Û « ª is defined only for positive images; i.e., ª ¥ × µ<¨�¡ Ì © ¢ .

If Þ<µ6£�¢ is a constantfunction, thenk is calleda constantimage. We havealreadyencounteredtwo important real-valuedconstantimages,namelythe zero image0 and the unit image1. It followsfrom Eqs. 4.3.1 and 4.3.3 that

È�ß ª|¬}à ß ª3¬�ª|¬ ¿[á ªM¬=â á ª Å�ÆKÇ�È á ªM¬½à á ªM¬}à ¸More generally,if Þãµ{£R¢ is the constantimage Þ�¨ ® © ¬>ä »m®ãµ{¶ , then

ä ¦ ªÔ¬ Þ ¦ ª ¸Thus, for £ ¬ ¡ we have that

ä ß ªM¬ Þ ß ª ¥ ä á ªM¬ ÞMá ª ¥ ä�åæª^¬ Þ å�ª ¥ ÅçÆKÇ ä�èæªM¬ Þ èéª ¸The observationthat scalaroperationson imagescan be expressedin terms of binary operations

betweenimagesmay be usedto definethe following unary operations:

ª�ê9ë�ªKì ¥ ä�ívë Þ í ¥éÅçÆKÇ ØîÙ�Û ê ªMë Ø'Ù�Û ì ª ¸ (4.4.3)

156

Page 165: Image Algebra by Ritter

Theseoperationsarealreadyinherentin Eq. 4.3.2. For example,using the function ï�ð�ñ�òfó�ôõ providesfor exponentiationby ö÷ó+øjù and yields the inverse úû ô óüï�ð�ú�ò . In contrast,Eq. 4.4.1 doesnotfollow from Eq. 4.3.2.

Many other unary operationscould have been defined directly in terms of elementarybinaryoperationswithout the use of Eq. 4.3.2. For instance,the absolutevalue function ýWþ!ÿ�� ��� �inducesthe function ý�þ&ÿ�� ����� ��

definedby

ý�þ&ÿçð�ú�òRó��ð��� ���ð��$ò%ò�����ð��QòRó�� ú�ð��Qò��� �������jó�� ú ��!However,we could just as easily havedefined

� ú �#"�ú%$Mð�ø úò&!As alludedto earlier,thegeneralizedcharacteristicfunctioncouldhavealsobeendefinedin termsof

elementarybinary operations.In order to demonstratethis, we needto takea closerlook at the inducedstructure

� �. Recall that the operationof exponentiation(Eq. 4.4.1) is not definedfor all real-valued

images.In particular,if ú('ó�) but for some �*��� a(x) = 0, then ú�û ô doesnot exist. Thus, in contrastto ð � ,+- /. ò , the ring 0 �� 1+- ,.�2 is not a division ring. However,every ú3� ��

hasa multiplicativepseudoinverse 4ú5� �6�

definedby7ú|ó5�ð��8 94úð��$ò(ò%� 7ú�ð��$ò$ó�ú�ð��$ò/:<;�ú�ð��QòRó�=> 6?#@�A>BDC�EF:HGIB 7ú�ð��$òRó,ùKJ�ú�ð��Qò� �����L�#! (4.4.4)

Clearly, úM.#4úN.&úMó�úPORQ1S 7úM.�ú�. 7úMó 7úT!Thus 0 �6� /+- /.U2 is a von Neumannring.

Although, in general,7úV. ú neednot equaltheunit image1,

7úW. ú is alwaysa booleanimage.Keepingtheseobservationsin mind, it is easyto seethat if �6ó ð�úéø(X ò8$Y) , then the booleanimage

7��.Z�satisfiesthe equation []\_^ ð ú�òQó 7�].`�a!Thus,the characteristicfunction [-\b^ canbe readily expressedin termsof elementarybinary operations.The function [-c`^ canbe defined in a similar mannerandthe remainingcharacteristicfunctionsarethenderivedfrom [ \`^ and [ cb^ by useof Booleancomplementationandmultiplication. Defining

ú1d�ó�ejø 7úM.�úf (4.4.5)

we obtain [-gb^ ð'ú�òRó�h [-\`^ ð'ú�ò�i d []jb^ ð ú�òQó5h [-c`^ ð'ú�ò�i d [ ^ ð�ú�òQó [ g`^ ð'ú�òT. [ j`^ ð ú�ò1 MORQkS [�lmDnporqts u5vxw�nKo�qtsry<z`{This verifies our earlier claim.

Supposeq�|u~} but for some�(��� a(x) = 0. Setting � u5�a���qW�Iq , we have q]� � u~} while neitherq(|u~} nor � |u~} . Thereforea andb aredivisorsof zero,which saysthat �6� is not an integraldomain.Of course,we havealreadynotedthat � � is not a division ring. The obviousquestionthenis asto howclosely the inducedstructure�� resemblesthe basestructure� . In particular,if � is a division ring orfield, how closeis �6� to beinga division ring or field? From our abovediscussion,it is easily inferredthat the following theoremis the bestwe can hopefor.

157

Page 166: Image Algebra by Ritter

4.4.4 Theorem. If �������-�,�U� is a (commutative)division ring, then ��� ���k�-�,��� is a (commutative)von Neumannring.

The proof is elementary.Accordingto Theorem4.4.2, � � is a ring andif � is a commutativering,then so is � � . Pseudoinversesare defined in the exactsameway as pseudoinversesfor elementsof� � (Eq. 4.4.4) by replacingthe number0 with the additive identity of � .

Sincefor any image �(��P� with the propertythat for some�*�L� a(x) = 0, we areunableto obtainan inverse,� � cannotbea division ring. Hence,� and � � canstructurallyneverbe thesame— exceptin the trivial casecard(X) = 1. However,since � � is a von Neumannring, it is almosta division ringin that everynon-zeroelementhasalmosta multiplicative inverse,namelya pseudoinverse.

If insteadof usinggroup,ring, or vectorspaceoperations,we considerlatticeoperationsweencountersimilar observations.Thelattice � � � ���8�,�f� behavesvery muchlike thelattice � � �/���,�M� . For example,the equality

�%��  �¢¡ � ¡ �f� ¡  ��holds in both lattices. Inequalitiesfor imagescan be definedin terms of the semigroupoperation �(or � ) by

��£3 ¥¤ �-�¦  �   �#§#¨L��£3 ¥¤ �-�©  � �,��ªHowever, if X containsmore than one point, then it is possibleto havetwo real-valuedimagesa andb with �P�� �N��  and  ¢�� �N�¦  . Thus we haveimagesa and b suchthat neitherstatement��£« nor  ¬£P� is true. Hencethe lattice

� � is only partially orderedandcan,therefore,structurallynot beidentical to the lattice

�. This corroboratesour earlierclaim that the inducedstructure� � is somewhat

weakerthan the basestructure � .

We now addressthe question of functionality of the induced operationsfor expressingimageprocessingalgorithms. The procedureof combining a finite numberof imagesusing a finite numberof elementaryinducedimageoperationsresultsin somenew imageor othervalue,suchasa scalar.Theresultof writing downsucha procedureis calledan imagealgebraexpression. A transform­©®Z�6�P¯°�6±definedin termsof an imagealgebraexpressionis called an imagealgebratransform. Thus ­k���,� is animagealgebraexpressionfor each �3�¬� � . For example,the transforms­>�I²*® � � ¯ � � defined by­k���t� � �N�L� ¡ ��� and ²1���t� � �¦�D L�³�N�`� areboth imagealgebratransforms.In the secondtransformwe assumethat b is somefixed given image,anda the variable. We concludethis sectionby showingthat any algorithm — or, in fact, any transformation— that transformsa digital image into a digital,floating point, or any other type of real-valuedimage,can be realizedby an imagealgebraexpressionwith operationsconsistingonly of the inducedelementaryoperationsof additionandmultiplication. Themain ingredientin proving this claim is the following interpolationtheorem.

4.4.5 Theorem. (LagrangeInterpolation).For eachinteger ´ �~µ ��¶#��·D·`·¸��¹ thereexistsa polynomialºZ» ��¼�� suchthat

º » ��½¾� �À¿ ¶Á½�ÂP½ � ´µ ½�Â~½Ã�� ´Äª158

Page 167: Image Algebra by Ritter

Proof: Let ÅÆ`Ç�ÈÊÉfË ÌÍÎ<ÏkÐ�Ñ<Î�ÒÏ Æ Ç�È�Ó(Ô¾É ; i.e.,

ÅÆ_ÇIÈ�É Ë~ÈÊÇ�ÈMÓÖÕRÉ�Ç�ÈNÓ(×ZÉÙØ`ØDØkÇ�È�Ó�ÇÛÚ-Ó¬ÕKÉ�É�Ç�È�Ó�ÇÜÚ�Ý3ÕKÉ�ÉÙØ`ØDØ>ÇIÈMÓ*ÞYÉàßThen ÅÆ`Ç�Ô¾ÉaË«á if ÔWâËPÚ , and ÅÆbÇIÔIÉ�âË�á wheneverÔFË~Ú . Now defineã ÆRÇ�È�É8Ë ÕÅÆ`ÇÛÚkÉ ÅÆ_Ç�È�ɸß

Q.E.D.

For theremainderof this sectionwe supposethatX is a finite point set,say äåË�æ`ç Ðè çÊé è,êDê`êkè ç ÌWë .Now if ìLí�î�ï�È Ð è È é è,êDê`ê1è È Ìað is a polynomialin ÞñÝ¬Õ variables,thenp givesrise to a transformationòì�óaî6ôöõ î6ô defined by òì�Ç�÷tÉTˬì�Ç�÷tÇ�ç Ð ÉtØ#ø è ÷tÇ�çTù#É6Ø#ø è,êDê`êkè ÷tÇ�ç Ì ÉTØ#øúÉ èwhereadditionandmultiplication in ì�Ç�È Ð è È é è,ê`êDê�è È Ì É arenow interpretedasthe inducedadditionandmultiplication in î ô . Thus,

òì�Ç�÷tÉ is an expressionin the imagealgebra û�î ô è Ý è Øxü .Defining for eachinteger j the constantimage ýNË�ÚMØ>ø , we obtain the following interpretationof

Theorem4.4.5:

4.4.6 Corollary. (ImageInterpolation). For eachconstantimageýNË�þ è ø è,ê`êDê1èbÿ , there existsanimagealgebraexpression

òã�� Ç�÷,É in û�î ô è Ý è Ø�ü suchthat

òã�� Ç���É Ë � ø ����tËYýþ �����âËYýProof: Defining

òÅ � Ç�÷tÉ Ë Í� Ï �DÑ � ÒÏ � Ç�÷�Ó�� É , we note that the image �_Æ�Ë òÅ � Ç ýRÉ hasthe property

that �DÆ`Ç�ç�É�âË á��1çÀí�ä . Thus û òÅ � Ç ýRÉIü�� é Ë ù������ ��� exists for ý Ë þ è ø è,ê`ê`ê�èbÿ . It is also

obvious thatòÅ � Ç���É�Ë�þ whenever�-âË�ý . Thus, the expression

òã � Ç�÷tÉVË�� òÅ � Ç ýRÉ�� � é Ø�� òÅ � Ç�÷,É��has the desiredproperties.

Q.E.D.

We concludeby proving that the algebra û�î ô è Ý è ØUü is sufficient for expressingall digital imagetoreal-valuedimage transformations.

4.4.7 Theorem. Suppose 3óúÇ�! "$#�%�&('*) & is any transformation.Thenthere existsan expression+in the imagealgebra ,�) &.-0/1-3254 suchthat +76�8 %:9<;=6�8 %?>78A@B6DCFE$G�%�& .

Proof: Since HJILK�MN6�CFE G %�& 9 OQPSRUTWV XZY , we may assumewithout loss of generality that6�C E G % & 9\[]8 X - 8 E - ^]^_^`- 80aJb , where cd9eO PSRUTWV0XfY .For each gh9ji - O - ^]^_^`- c , let k`lm@n)po q7r - q X - ^]^_^`- q T:s be definedas follows:

159

Page 168: Image Algebra by Ritter

Let t�uwvyx`z�{�| u�}�~=tS��vyx0z�{�|���}�~��_�]�=~�tS��vyx0z�{�|F�w}and set �7� vet ����� , where � ve��~ �S~0�]�]�0~`�

. Now define� z {�� u ~�� � ~ �_�]�7~�� � }�v�� z$� {�� u }�� z�� {�� � } �_�]� � z$� {�� � }�~where

� zJ� {��3}is the polynomial in Theorem4.4.5.

Obviously, �� z {�x z }�v � z {�x z {�| u } �S� ~�x z {�|���} ��� ~ �_�]�0~fx z {�| � } ��� }v � z { � u ~ � � ~ �_�]�0~ � � }v ��7¡]��{ � u]} � ��7¡��${ � �_} �]�_� ��7¡���{ � �w}�v ��¢Now consider

�� z {�x � } , where �h£v¤t . Thenx �?£vyx z and, therefore,

x � {�| ¥�} £vyx z {�|F¥�} for at leastone point

| ¥�¦y§. Thus, ¨ ¥ £v � ¥ and, hence,

�� ¡�� { ¨ ¥�}wv�© .

Therefore, �� z {�x � }�vjª � «�¬?� v�t© «�¬?�h£v�t (I)

For eacht­v\�S~`®�~ �]�]�7~f¯

, let ° z v²±={�x z }and define ³ by³ {�xF}�v �� �_{�xF} �]° �=´ ��7µ {�x } �J° µ ´ �]�_� ´ ��7¶ {�xF} �J° ¶ ¢

It now follows from Eq. (I) that ³ {�x z }�v·±={�x z } and,therefore,³ {�xF}�v·±={�x }w¸`x¹¦d{Zº µ$» }�¼ .

Q.E.D.

The theoremis primarily of theoreticalinterestas it providesno practicalmethodfor determining³ from±

. Of course,the hypothesisof the theoremis generalenoughto cover all image-to–imagetransformationsthat occur in practiceasonly finitely manygrey valuescanbe represented.

4.4.8 Corollary. SupposeX andY are twofinitepointsets.If±¾½L{Zº µ » }�¼À¿ÂÁÄÃ

is anytransformation,then there existsan expression ³ in the image algebra Å ÁÆ~`Á ¼ ~ ´1~ � ~�ÇWÈ such that ³ {�xF}nv±={�x }n¸`xj¦É{�º µ » } ¼ .

Proof: Let � �_~ �`µ ~ �]�_�`~ � ¶ be polynomialssuch that�� z {�x � }�v ª � «�¬?� v�t© «�¬?�h£v�tAgain, let ° z vʱ={�x z } , where ° z is now an imageon Y. Finally, define ³ by

³ {�xF}�vÌËZÍ Î ��É´À� � �� � {�x }ÐÏpÑ �]° � ´ �]�]� ´ÒË�Í Î ��É´�� � �� ¶ {�x }�ÏÆÑ �]° ¶ ¢Then ³ {�x z }�v*Ó�ÔÖÕ ��Æ×0� � �� z {�x z }�Ø0Ù.Ú�Û�ÜÞÝjÛßÜmÝjà=á�â0Ü�ã�ä and, therefore, å á�âFã�ÝjàWá�âFãçæ`â¾èá�é ê�ëSã�ì

.

Q.E.D.

The corollary is useful when consideringtransformationsof imagesto imagesdefinedon differentspatial domains.

160

Page 169: Image Algebra by Ritter

4.5 Spatial Operations

Examplesof spatialbasedimagetransformationsareaffine andperspectivetransforms.Thesetypeof transformsare commonlyusedin imageregistrationand rectification. The needfor registrationandrectificationarisesin digital imageprocessingwhen the positionsof someor all imagepixel locationsaresignificantlydisplacedfrom their true locationson a uniformly scaledgrid. For example,objectsinmagneticresonanceimagery (MRI) are displacedbecauseof the warping effects of the magneticfieldandraster-scannedsatelliteimagesof theearthexhibit thephenomenonthatadjacentscanlinesareoffsetslightly with respectto oneanotherbecausetheearthrotatesassuccessivelinesof animagearerecorded.Since the inducedimageoperationsrepresentedby Eqs. 4.3.1 through4.3.4 are grey level based,theinducedalgebraicstructuredoesnot provide for either intuitive or simpleexpressionsof thesetypesoftransforms.The purposeof this sectionis to resolvethis difficulty by providing a seamlessextensionofthe imagealgebradefined in the previoussections.

Viewing an image íyîÀï�ð as a function from X to ï , we note that the inducedunary operation4.3.2is actuallythecompositionñóò íõô�ñFö�í ÷ of the imagefunctiona with the function f from ï to ï asshownin Fig. 4.5.1. Taking the sameviewpoint,but usinga function f betweenspatialdomainsinstead,

X

a

F F

a

Figure 4.5.1 The inducedgrey level transform ùõú:ûBüeùFý�ûFþ .

providesa schemefor realizingnaturally inducedoperationsfor spatialmanipulationof imagedata. Inparticular,if ù ÿ �����

and û��� , thenwe definethe inducedimage ûmú:ù���� � by

û1úWùhü �Sý����fûFý�ù ý��=þZþ�þÞÿ���� ����� (4.5.1)

Thus, the operationdefinedby Eq. 4.5.1 transformsan � –valued image defined over the spaceXinto an � –valuedimagedefined over the spaceY. Figure 4.5.2 providesa visual interpretationof thiscompositionoperation.

161

Page 170: Image Algebra by Ritter

X

a

Y

a

F

Figure 4.5.2 The spatial transform ����� .

In Section4.8, it will becomeevidentthat the inducedimagecan just aseasilybe obtainedby useof an image–templateoperation. However, in variouscasesEq. 4.5.1 providesfor a more translucentexpressionandcomputationallymore efficient methodthanan image-templateproduct.

4.5.1 Examples:

(i) One sided reflection. Suppose����� � , where ! "$#&% is a rectangular ')(+* array. If,-�./-10 % and � 2 !)3 ! is definedas

�547698;:=< > ? 4�658@:=< ACB .D- 64�E .GF 698@:=<HAIBJ6LK . 8then �M�N� is a one sidedreflectionof a acrossthe line 6O> .

. Figure 4.5.3 illustratessuchareflectionon a P , EQ(RP , E imageacrossthe line

. > ,TSVU.

Figure 4.5.3 One sided reflectionacrossa line.

162

Page 171: Image Algebra by Ritter

(ii) Magnificationby replication. For WQX�Y , let Z[W]\ denotethe smallestintegergreateror equaltor; i.e., Z^W_\a` b�cdWOefZgW_\ , where ZhW_\�Xji . For a given pair of real numberskmlonqpsrTtupwvyx ,let ZCk5\jl)nzZ[pVr{\|t}ZCpVv{\~x . Now let a and X be as in the previous example,and let Y be a�}�1���}�

array, wherek is somepositive integer. Define �/���)��� by �5n�k�x�l�� r� k�� ; i.e.,�5n7pVrVt@pVvyx l n7��rVt@��v]x , where �}�5l � r� py� � . Then �N��� representsthemagnificationof a by a factorof k. Figure 4.5.4 representsan exampleof a magnification by a factor of

� l�� . Here eachpixel wasreplicatedfour times,two times in the x directionandtwo times in the y direction.

Figure 4.5.4 Magnification by replication.

Note that in both, image reflection and image magnification,the function f can be viewed as afunction on �9� into �5� ; that is, asa function preservingintegralcoordinates.The generaldefinition forgeometricoperationsin the plane � � is in termsof a function ����� �¡ ¢� � with�5£¥¤9¦@§|¨�© £7�Vªy£�¤5¦@§}¨u¦@� � £¥¤9¦@§|¨;¨@¦ (4.5.2)

resulting in the expression « £7¤5¦{§=¨ ©+¬�­�¤}®[¦@§s®°¯±©+¬5£��VªV£�¤5¦{§=¨;¦@� � £7¤5¦@§²¨;¨�¦ (4.5.3)

wherea denotesthe input image,b the output image, ¤ ® ©j�Vªy£7¤5¦@§²¨ , and § ® ©j� � £¥¤9¦@§²¨ . In digital imageprocessing,the grey level valuesof the input image are definedonly at integral valuesof ¤ ® and § ® .However, restricting f to somerectangularsubsetY of � �M³ � � , it is obviousthat for most functionsf, ´yµ~¶�·}¸V£¥�9¨Q¹³ � � . This situation is illustrated in Figure 4.5.5, wherean output location is mappedtoa position betweenfour input pixels. For example,if f denotesthe rotation aboutthe origin, then thecoordinates ¤ ® ©j� ª £¥¤9¦@§|¨�©j¤�º]»V¼y½�¾R§²¼T¿�¶&½ ÀVÁ�Â�§ ® ©j� � £7¤5¦@§²¨ © ¤�¼y¿�¶Ã½ÅÄƧ²º]»V¼y½ (4.5.4)

do not, in general,correspondto integralcoordinatesbut will lie betweenanadjacentintegerpair. Thus,the formulation given by Eq. 4.5.1 can usually not be useddirectly in digital imageprocessing.Oneway of solving this problemis by simply redefining f as ÇÈ £�¤9¦@§=¨�É�ÊË�5£7¤5¦@§}¨^Ì . That is,

ÇÈ £�¤5¦@§=¨ ©�­zÍΤ ®°Ï ¦�ÍЧ ®ÎÏ ¯+Ñ �5£¥¤9¦@§|¨Ò©d­�¤ ® ¦@§ ® ¯�¦163

Page 172: Image Algebra by Ritter

where ÓËÔTÕ denotesthe rounding of r to the nearestinteger. Then the image ÖØ×ÚÙLÛÝÜÞ is said to beobtainedfrom a by using the nearestneighbor, or zero-order interpolation. In this case,the grey levelof the outputpixel is takento be that of the input pixel nearestto the position to which it maps. Thisis computationallyefficient and, in manycases,producesacceptableresults. On the negativeside, thissimpleinterpolationschemecanintroduceartifactsin imageswhosegrey levelschangesignificantlyoverone unit of pixel spacing. Figure 4.5.6 showsan exampleof rotating an imageusing nearestneighborinterpolation. The resultsshow a sawtootheffect at the edges.

x,yà( )á xà ,y( )

Figure 4.5.5 Mapping of integral to non-integralcoordinates.

As mentionedpreviously,the outputpixels map to non-integralpositionsof the input imagearray,generallyfalling betweenfour pixels,andsimplenearestneighborcomputationcanproduceundesirableartifacts. Thus,higherorder interpolationschemesareoften necessaryto determinethe pixel valuesofthe output image. The methodof choiceis first-order or bilinear interpolation. First-orderinterpolationproducesmoredesirableresultswith only a modestincreasein computationalcomplexity.

Figure 4.5.6 Rotationusing nearestneighborinterpolation.

Suppose âäã�å²æ7ç�èTéuç�ê_ëÝìÝí�î/ç�è�î+ïðéNíñî+ç�êÅî/ò�é�æ7ç�èVé@ç�ê]ë�ó�ô êzõand âJö&ã�å9÷�ç=öè éuç}öêuø ìJí�î+ç}öè î/ïéNíñî+ç=öê îjò�é+÷�ç}öè é@ç=öê@ø ó�ù ê õ=úGiven û ó+ù�ü

, we extenda to a function û ö ó/æ¥ù�ë�ýVþas follows:

First setboth û æ¥ç è é@ç ê ë�ã ÿand û ö æ7ç è é@ç ê ë�ã ÿ

wheneveræ7ç è é@ç ê ë óLù ê � â ö

. Foræ7ç ö è é@ç ö ê ë óâ ö

, setû ö ÷�ç ö è éuç ö ê ø ã û æ�ç è é@ç ê ë���� û æ7ç è �+ízéuç ê ë�� û æ�ç è é{ç ê ë�@÷^ç öè �Rç è ø��� û æ�ç è é{ç ê � íVë�� û æ�ç è é{ç ê ë�@÷�ç}öê ��ç ê ø��� û æ�ç�è�jísé@ç�ê��+íVë�� û æ�ç�èVé@ç�ê_ë�� û æ7ç�èVé{ç�ê�� íyë�� û æ�ç�è�jísé@ç�ê_ë��;÷�ç öè �Rç�è ø ÷�ç ö ê ��ç�ê ø é (4.5.5)

164

Page 173: Image Algebra by Ritter

where ���� �� ����� and �� ����� denotesthe largest integer with the property �� ������� ��� . Note that � � �� � ����� , and � �� � !#" �$&% �'� ! " $ % whenever ! �( �! and $ �� �$ . Thus, � � is a continuousextensionof a to ) � with the four cornervaluesof a agreeingwith thoseof � � (Fig. 4.5.7).

a xà 1(á

xà 2, )*

a xà 1( xà 2, +1)*

xà 2,a xà 1(á

+1+ )*a xà 1(á

+1+ xà 2, +1+ )

a, 1xà 2,x( )á

Figure 4.5.7 The bilinear interpolationof a.

Now given a transformation -/.1032'4 0�2 and an output array Y, we view f as restrictedto-5.76 4 0�2 and set 8:9';�<>= - (4.5.6)

in order to obtain the desiredspatialtransformationof a. In particular,the valuesof ? <@ for A 95BDCFEin

Eq. 4.5.5arenow replacedby the coordinatefunctions - @�GIH#J C H 2&K of f. Figure4.5.8 illustratesa rotationusing first order interpolation. Note that in comparisonto the rotation using zero-orderinterpolation(Fig. 4.5.6), the boundaryof the small interior rectanglehasa smootherappearance;the sawtootheffecthas disappeared.The outer boundaryof the rotatedimage retainsthe sawtoothappearancesince nointerpolationoccurson points

G ? < J C ? < 2 KML 0 2ONQP < .

Figure 4.5.8 Rotationusing first-order interpolation.

165

Page 174: Image Algebra by Ritter

The computationalcomplexityof the bilinear interpolation(Eq. 4.5.5) can be improvedif we firstinterpolatealongonedirectiontwice andthenalongthe otherdirectiononce.Specifically,Eq. 4.5.5canbe decomposedas follows. For a given point RIS�TU#VWS�TX&Y[Z]\ T compute^ T U`_S T U#VWS XWacb ^ R�S U VdS X Y�egf ^ R�S U e'h VWS X Y�i ^ R�S U VWS X Y�j _kS T U i S U aalong the line segmentwith endpointsRlS U VWS X Y and R�S U e�h VWS X Y , and^ T X _ S T U VmS X e�h a b ^ RlS U VWS X e'h#Y�egf ^ R�S U e'h VWS X egh#Y�i ^ R�S U VdS X egh&Y�j _ S T U i S U aalong the line segmentwith endpointsR�S U VWS X e'h#Y and RIS U e'h VWS X e�hnY . Then set^ T _ S T U VWS T X a b ^ T U _ S T U VWS XWa e5o ^ T X _ S T U VmS X e�h a i ^ T U _ S T U VWS XWaqp _ S T X i S XraDsThis reducesthe four multiplicationsand eight additionsor subtractionsinherentin Eq. 4.5.5 to onlythreemultiplicationsand six additions/subtractions.

Although Eq. 4.5.6 representsa functional specificationof a spatial image transformation,it issomewhatdeceiving;the image ^ T in the equationwas derivedusing typical algorithmic notation(Eq.4.5.5). To obtaina functionalspecificationfor the interpolatedimage ^ T we canspecify its valuesusingthreespatialtransformationstvuDVOt U , and t X , mapping \ T�w \ , definedbyt u _ S T U VWS T X a b _yx S T Umz V x S T X z a

t U _�S T U&VWS T X aOb|{ RD}�S T Ud~ e'h V�}�S T X ~ Y���� }�S T Ud~��'�RD}�S T U ~`V�}�S T X ~ Y �D�d���r�F�7�����and t X _ S T U&VWS T X a b { RD}�S T U ~`V�}�S T X ~ egh#Y���� }�S T X ~��'�RD}�S�TUd~`V�}�S�TX ~ Y �y�F���q�F�7���l� Vand two real-valuedimagesfunctions � U VF� X Z'���� definedby� U _ S T U VmS T X a b S T U i x S T Umzand � X _S T U#VWS T X aOb S T X�i x�S T X z sWe now define ^ T b ^�� t&u e R ^M� t U i ^M� t&u Y�� � U e R ^�� t X i ^�� t&u Y�� � Xe R ^�� t U � t X e ^�� t&u i ^M� t U i ^�� t X Y�� � U � � X sA nice featureof this specificationis that the interpolatedimage ^ T is only definedover the region ofinterest \ T and not over all of � X .

Since t]��� w � X , it is very likely that t�R�� Y��� \ T . This meansthat the image � b ^ T � t maycontainmanyzero values,and— if Y is not properlychosen— not all valuesof a will be utilized inthe computationof b. The latter phenomenonis called lossof informationdue to clipping. A simplerotation of an imageabout its centerprovidesan exampleof both, the introductionof zero valuesandloss of information due to clipping, if we choose� b \ . Figure 4.5.9 illustratesthis case. Here theleft image representsthe input image a and the right image the output image � b ^ T � t . Note that

166

Page 175: Image Algebra by Ritter

the value  �¡�¢D£&¤W¢#¥&¦ is zero since §�¡l¢#£#¤W¢#¥r¦[¨©¡lª�«£ ¤Wª�«¥ ¦�¬­'® « . Also, the cornerareasof a after rotationhavebeenclipped sincethey do not fit into Y. Of course,for rotationsthe problemclipping is easilyresolvedby choosingY sufficiently large.

2,x1x°( )±( )±

1y²

2,y¯

Figure 4.5.9 Rotationwithin the samearray. The left imageis the input imageand the right image is the output image.

Thedefinitionof theinterpolatedextension³�´ requiresimagesto bespecifiedascomputationalobjectsratherthanenumeratedobjects(suchas the input imagea). Oncethe spatialtransform µ·¶¹¸Iµ#º#»Wµ#¼q½ hasbeenchosen,thedummyvariables¾À¿ and ¾ ´¿ arereplacedby Á�µ&¿l¸IÂ&¿½�à and µ&¿¸IÂ&¿½ , respectively.Eachpixelvalueof ÄŶƳ ´>Ç µ can thenbe determinedpixel by pixel, line by line, or in parallel.

The spatialtransformationof a digital imageasexhibitedby Eq. 4.5.6representsa generalscheme.It is not restrictedto bilinear interpolation; any extension ³À´ of a to a point set ÈÉ´ containing therangeof f may be substituted.This is desirableeventhoughbilinear interpolationandnearestneighborapproximationare the most widely used interpolation techniques. Similar to zero-order,first-orderinterpolationhasits own drawbacks.Thesurfacegiven by the graphof ³ ´ is not smooth;whenadjacentfour pixel neighborhoodsare interpolated,the resultingsurfacesmatch in amplitudeat the boundariesbut do not match in slope. The derivativeshave, in general,discontinuitiesat the boundaries. Inmanyapplications,thesediscontinuitiesproduceundesirableeffects. In thesecases,the extraadditionalcomputationalcost of higher order interpolationschemesmay be justified. Examplesof higher orderinterpolationfunctionsarecubic splines,Legendreinterpolation,and ºÊÀËvÌÍ ¾ . Higher order interpolationis usually implementedby an image-templateoperation.

The generalformulation of spatial transformationgiven by Eq. 4.5.2 includesthe classof affinetransformationsmentionedat the beginningof this section.

4.5.2 Definition. A transformationµgÎ�Ï ¼�Ð Ï ¼ of the formµ�¸l º »W ¼ ½�¶Æ¸IÑ> ºÒ]Ó Â ¼�ÒÕÔ#º »ÀÖr ºÒ]× Â ¼Ò]Ô#¼ ½F»wherea, b, d, Ô º , and Ô ¼ areconstants,is calleda (2–dimensional)affine transformation.

Observethat an equivalentdefinition of an affine transformationis given byµ�¸Ø½�¶'ØÚÙmÛ ÒÝÜ » (4.5.7)

where ØݶƸl º »W ¼ ½F»ÉÛ¹¶ßÞ Ñ ÖÓ ×�à »âá&ã�ä Ü ¶å¸ Ô º » Ô ¼ ½�æ167

Page 176: Image Algebra by Ritter

The matrix A can always be written in the formç�è éê ëìåí çÚîrï�ðmñ`òÀó&ï î&ïôòõ�ö÷óvïø îrù�òõ�öúó&ù î&ùÀðmñ>òÀóvù ì�ûwhere ü î ï û ó ïrý and þ î&ù û óvù3ÿ�� ù�� correspondto the points (a,c) and (b,d) expressedin polar form. Inparticular,if

î&ï í î ù , ó&ï í ó ù , and � í�� , thenEq. 4.5.7correspondsto a rotationaboutthe origin. IfA is the identity matrix and ���í�� , then Eq. 4.5.7 representsa translation.

Variouscombinationsof affine transformationscanbeusedto producehighly complexpatternsfromsimple patterns.

4.5.3 Examples:

(i)Let ï ü� ý í ��� , where � í ç ï� �� ï� ì .

If ����� , then ���� ï representsa magnificationof a by thefactor � (seealsoExample4.5.1). Onthe otherhand,if ��� � � � , then ���� ï representsa contraction(shrinking)of a by the factor� . Figure4.5.10illustratesa contractionusingthe factor � í ù� . Herethe input imagea, shownon the left, containsa trapezoidof baselength l and angleof inclination

ó. The output image� �� ï is shownon the right of the figure, with pixels havingzerovaluesdisplayedin black.

Figure 4.5.10 Imagecontractionusing an affine map.

Suppose !#"%$�&�')(*&�+-,/. 00 .214365 $87 9 . '�:; < $�7 9 . '=:;?>A@#BDCFE/GThen

! "representsa shift in the direction C . ComposingHJI !#K with

! "resultsin the image$ H�I ! K ' I !#" shownon the left of Figure 4.5.11.

The compositionof two affine transformationsis againan affine transformation.In particular,by setting

!L(�! K I ! " , it is obviousthat

$ H I ! K ' I ! " could havebeenobtainedfrom a singleaffine transformation,namely$ H I ! K ' I ! " ( H I $-! K I ! " '�( H�I ! GNow iterating the processby using the algorithmMON ( M 3 M I !

168

Page 177: Image Algebra by Ritter

with initial P�QSR , resultsin the railroad to infinity shownon the right of Figure4.5.11.

Figure 4.5.11 A railroad to infinity.

(ii) Another exampleof iterating affine transformationsin order to creategeometricpatternsfromsimplebuilding blocks is the constructionof a brick wall from a singlebrick. In this example,let w andl denotethewidth andlengthof thebrick shownon the left of Figure4.5.12. Supposefurther that we want the cementlayer betweenan adjacentpair of bricks to be of thicknesst.A simple way of building the wall is to use two affine transformationsf and g, where f is ahorizontal shift by an amount TVUSW , and g is composedof a horizontal shift in the oppositedirectionof f by the amount X-TYUOW[Z]\_^ anda vertical shift by the amount `4UaW . Specifically, ifb X8c#d#efchg%ZjikX�c#dml�X8TnUaWfZAe�c#g%Zand o X�c#d#eAc#gFZji�X8c#d�U*X�TnU�W]Z[\_^Ye�c#g�lpX�`pU�W]Z[Zqethen iterating the algorithm r s i r t X r�u b Z t X r u o Zwill generatea brick wall whosesize will dependon the numberof iterations. The imageonthe right of Figure 4.5.12was obtainedby using the iterationv]w�xnw_y#z{ s i rr|s i r�t X r�u b Z t X r}u o Z~Y��z-����{ i r

Figure 4.5.12 Generationof a brick wall from a single brick.

169

Page 178: Image Algebra by Ritter

4.6 Set-theoretic Operations

Thetwo primeconceptsassociatedwith a functionareits domainandrange.Sincethesetwo notionsare viewed as mappingsfrom ��� to ��� and ��� to �%� , they provide a link betweenimagesand theirunderlyingpoint and valuesets. The outputsof the domainandrangefunctions,however,aresetsandnot individual points or values. In variouscomputervision tasksit is often necessaryto extractsinglepoints or valuesfrom an image,or to know the numberof elementsin a particularvalue or point set.Thesetaskscan be accomplishedby using two fundamentalconceptsfrom elementaryset theory. Thetwo conceptsare the choicefunction and the cardinality of a set.

The choice function, whoseexistenceis guaranteedby axiomaticset theory [3], is not obtainablefrom previouslydefinedoperations.We shall view the choicefunction as a mappingof �#����� (or� � ��� ) which, whenappliedto a set �*�p� , returnsa randomlychosenelementof A. Thus,if ��� � �and �k���%�Y�Y�Y�����V� , then the statement �f 2¡#¢�� ��£¥¤ ¡#¦ � ¢ �§���©¨«ª���¬denotesa randomlychosenpixel locationwhosepixel value is k. This exampleillustrateshow we canget from an imageback to a point in its domain. More generally,we havethe following commutativediagram:

FY

2Y Ychoice

domain

The dottedarrow in the diagramdenotesthe composition ­�®n¯#°±­�²m³µ´�¯#¶¸·¹°±ºV» The choicefunction is, ofcourse,not the only function from ¼�½ to ¾ . For example,if ¿-¾ÁÀ=Â/à is a commutativesemigroupandÄ ¿8¾ÁÃÆÅÈÇ#É�Ê ¼�½4ËÌ­�·�Í#´=¿�ÉLÃjÎÐÏ�Ñ , then againwe have a global reduceoperation ÒÓË Ä ¿]¾�Ã Ô ¾inducedby  anddefined by Ò�¿�É�Ã)Å�Õ�Ö[Â/Õ�×]ÂpØ%ØhØ�Â/Õ=Ù , where ÉÚÅ�Û#Õ�Ö#À/ÜhÜ%Ü�ÀfÕYÙYÝ . In particular,if X isa finite subsetof Þ , then ß*¿�É�à correspondsto the largestnumberin X.

Thecardinalityof asetwasdiscussedin Section2.7. Forfinite setsthecardinalityof asetcorrespondsto the numberof elementsin that set. Thus,whenour discussionis restrictedto digital images,we shallview the conceptof cardinality as a function­F·¹Í#´ Ë�¼ ½áà ¼�â�ÔÈã*»For example,if k is an integer,Y a finite subsetof ä Ù , and å�Ê|ã â , thenthe numbern in the statementºæËçÅS­�·�Í#´nè ´�¯#¶¸·�°�ºV¿±å)é�ê#Ã�ë

170

Page 179: Image Algebra by Ritter

correspondsto the numberof pixels having value k. Obviously, if no pixel of a has value k, thenì�í_îJï�ð�ñVò�óõôAö�÷ùøûúand

ñ�øýü=þNote that an alternativealgorithmfor obtainingn is given by the statement

ñæÿ ø � ��� ò�óV÷��and doesnot involve operationsdefinedin this section.

The cardinality of a set and the choice function are unary operationsfrom �� to and to Y,respectively(or from ��� to and , respectively). They do not provide for operationson ��� or ��� .However,therearenumerouscomputervision algorithmsandtasksthat requiremanipulatingwhole setsof pixel locationsaswell assetsof pixel values. In order to providea coherentmathematicaltheory inwhich to expressthesetypesof operationsmore readily, we needto incorporatethe Booleanalgebras� � � ������������� and

� � � ������������� as part of imagealgebra.

The laws governingthe operationson setsweregiven in Section2.2 (Fig. 2.2.1). Theoperationsofunion,intersection,andcomplementationcanbecombinedto definevariousotherset-theoreticoperations.For instance,set subtractioncan be definedas

����� � �!�"� � �

and the symmetricdifferencebetweentwo setsas

�$#%�'&(� ��ò)� �*� ÷+��ò)�,�*�D÷AþIt follows that

�-#.�/&0�4ø�ò1�!�"� ÷2� ò3�,�4� ÷ � ø�ò3�!�"�?÷5� ò)� � �"� � ÷Aþ4.6.1 Example:

Let A and B be the two point setsin the cellular space6�7 shown in Fig. 4.6.1 (a) and (b),respectively.Thus,thesetA consistsof thecellswhoseunionformstheletter“A”, while thesetB consistsof cells forming the letter “B”. Theresultof thesetoperationsof union, intersection,set subtraction,and symmetricdifferenceon thesetwo setsare shown in Fig. 4.6.1 (c), (d),(e), and (f), respectively.

171

Page 180: Image Algebra by Ritter

(a)8

(b) (c)8

(d)8

(e)8

(f)

Figure 4.6.1 (a) The set A. (b) The set B. (c) The set 9 :*; .(d) The set 9,<4; . (e) The set 9�=; . (f) The set 9->.='?�; .

Since @)AB-C�:�C�<�C�D�E and @3A�F2C�:�C�<�C�D.E are homogeneousalgebras,one obviousimplication is thatthe algebradiscussedin Section4.3 providesfor the manipulationof set-valuedimages GIH�JLKMA�B(or GNHOJPKQA�F ); the operationson set-valuedimagesare thoseinducedby the Booleanalgebras.Forexample,if G�CSRUTV@)A B EXW , then

G-:4RZY\[^]1_�CS`a]b_�cSc"Hd`e])_fc�YIGg]1_fch:"Rf])_fciC�_jTkJkl�CG-<4RZY\[^]1_�C+`e])_fcbcmHd`e])_fc�YIGg]1_fch<"Rf])_fciC�_jTkJkl�Cand G D Yonp])_�Ci`a]1_fcScmHd`e])_fc�Yq>rG�]1_fc)? D C�_sTdJutvCwhere >wGg]1_�c3? D YyxZ='Gg]1_fc .

TheBooleanimagealgebra zO@)A B E W C{:�C|<�C D�} hasanaturaldualstructure,namely z2@1A W E B C~:�C�<�C D�} .

This can be ascertainedfrom the observationthat any function GsHOJ�K�A B hasa dual (often referredto as an inverseor transpose) G5�2�4H5x�K A W C definedby

G �O� ])��c�Y\[|_jH�_jT�JU��O�-��T4Gg])_fcbl��The function G �O� is a dual (or an inverseor transpose)in the sensethat @ G �O�~E �O� Y\G .4.6.2 Theorem. The function ��H�@3A B E W K @)A W E B definedby ��]3G�c�YUG �O��� G\TU@)A B E W is an

isomorphism.

Proof: Supposethat for somepair of functionsa andb with Gj�Y\R , we havethat ��]3G�c�Y!��]�Rfc .Then G!�Y�R�� �^_���T�J suchthat Gg])_g�/c��YoRf])_��/c . Thus, not both Gg])_g�/c and Rf]3_��/c can be

172

Page 181: Image Algebra by Ritter

empty. Suppose,without loss of generality,that �g�)�5��$ ¡U¢ . Since �g�1����$ ¡o£ �)�g�'� , ¤^¥\¦�§suchthat ¥,¦¨���1� � � and ¥\ ¦ £ �1� � � . But then � � ¦k��©Oª/�3¥�� and � �  ¦ £ ©Oª��«¥�� , contraryto ourassumptionthat ��©Oª ¡o£ ©Oª . This showsthat ¬ is one-to-one.¬ is obviouslyonto. Thusall that remainsto be shownis that ¬ is a homomorphism.To showthat ¬��)�-­ £ � ¡ ¬��3���2­4¬�� £ � is equivalentto showingthat �3�®­ £ � ©Oª ¡ � ©Oª ­ £ ©Oª . Now

�)�-­ £ � ©Oª �)¥�� ¡\¯ �u¦k°²±�¥s¦¨�3�®­ £ �b�3���´³¡\¯ �u¦k°²±�¥s¦4�g�)�f�2­ £ �3���b³¡\¯ �u¦k°²±�¥s¦4�g�)�f�b³µ­ ¯ �j¦d°²±�¥�¦ £ �)�f�S³¡ � ©Oª �3¥��h­ £ ©Oª �)¥���¶In a likewise fashionwe can showthat �1�m· £ � ©Oª ¡ � ©Oª · £ ©Oª . Finally we have¸ �O¹.º ©�ª �1¥�� ¡¼» �s¦d°²±�¥�¦4�½¹��)�f�i¾¡q¯ �s¦k°²±�¥, ¦4�g�1�f�S³¡q¯ �s¦k°²±�¥s¦4�g�1�f�S³ ¹¡ ¸ � ©�ª �)¥��1º ¹�¿which showsthat ¬À�)� ¹ � ¡ ¬��1�g� ¹ .

Q.E.D.

Sincetypically, Y (or Á ) is well structured— a topologicalspace,metric space,vector space,etc.(or a semigroup,ring, field, etc.) — it makessenseto try preservethis structureby viewing a(x) as asetin Y (or Á ) insteadof a point in ÂÃ . This changeof perspectivehasfruitful consequences;while thetheoryof set-valuedfunctions(Section2.6) canstill beapplied,intuition is maintainedandpropertiesofY are not forced into hyper propertiesof ÂÃ .

Borrowing from the idea of induced set-valuedfunctions, recall that given Äű�§ Æ ° , thenf inducesa set-valuedfunction ÇÄűÈÂ Ã Æ Â/É ¿ which is definedas ÇÄ��3ÊË� ¡Ì¯ Ä��3���"±��j¦4Ê˳ ; i.e.,ÇÄg�)ÊË� ¡ ÍÎaϽÐeÑ ��ÄfÒ Ó�� . In addition, there is an inverse ÇÄ ©Oª ±*Â�É Æ Â Ã defined by ÇÄ ©Oª ��ÔÕ� ¡¯ ¥U±�¥s¦Ö§Ø×/Ù2ÚmÄ��3¥��f¦dÔv³ . Pictorially, we havethe following interestingdiagramof functions:

X

a

YfÛ

2YX2fÛ -1

a-1

The obviousquestionthat may arise is as to whetheror not Ü�ÝvÞ ß àÞgáOâÕÝãÜ�áOâ . It can be easilyverified that this is false evenin the simple casewhere ä�ßoå and Þ ßçæiè . However,we do havethe following theorem:

173

Page 182: Image Algebra by Ritter

4.6.3 Theorem. é)ê-ëÀì�íbî2ïÖð ñì îOï ëvê îOïProof: é3ê®ëÀìgí îOï é)ò�í�ðoó/ò|ô5õ4ö ÷�òsõ¨é3ê-ëÀì�í'ø1ò�ô�ùeúðoó/ò ô õ4ö ÷�òsõ4êûø1ìûø3ò ô ù/ùpúðoó/ò ô õ4ö ÷�ìûø1ò ô ù�õ¨ü~ýsõdþ²÷�ò�õ4êgé)ýfí�ÿûúð ñì îOï éSü'ýjõdþ²÷�ò�õdêgé1ýfíbÿ^íð ñì îOï ø ê îOï é)ò�í ùð\é ñì îOï ë�ê î�ï í+é1ò�í �.

Q.E.D.

Since � is anisomorphism,it follows thatthetwo imagesê�ëaì and ñì îOï ëpê îOï areBooleanequivalents.

Every set-valuedimage ê�÷^þ���� � inducesanotherset-valuedfunction �êd÷� ��� � definedbyñê�é ��í�ð ������ êgé)ýfí �4.6.4 Example: Let ê\÷������ ����� be given byêgé�� � !�í�ð\üpé �"�#�#��! í$�5é��%�'&)("�*��! í$�5é��%�$�*�+!,&-(í*�5é �%�'&.("�/�+!,&.(�íbÿ �

Then ñê5é ��ífð �02143 576 �8� êgé �$� !�í9�;:=<">?� @)� � �Figure4.6.2 illustratesthe differencebetweenthe set-valuedfunctionsa and �ê . Note that in theillustration we view � � in termsof the cellular spaceA � . Thefigurealsoillustratesthepossibleapplicationsof set-valuedfunctionsfor imageanalysisin differently scaledspaces.

W

a Wa( )

i,j( )

i,j( )

Figure 4.6.2 The set-valuedfunction a and the inducedfunction BC .

The function a is said to inducea partition on Y if the following two conditionsaresatisfied:

(i) D�EGFH DJILK M�NODJE+PRQSM�NODJI�P HUT(ii) V H WX"Y[Z M\N]D�P_^

One relationshipbetweena, M'` E , and aM is given by the next theorem.

174

Page 183: Image Algebra by Ritter

4.6.5 Theorem. If a inducesa partition on Y, thenbcedfc\g9hji kml�n)c\i�opl9qIf only condition (i) is satisfied,thenbcedfc g9h i krltsuc\i�ovl_q

Theproofof thetheoremfollows directly from thedefinitionsof theinducedfunctionsc g9h and wc , andtheobservationthatconditions(i) and(ii) for a functionally inducedpartitionareequivalentto conditions

(xzy ) {9|~} k�� at most one x s.t. |~} c\i ��l(x�x y ) { � } o�� at leastone y s.t. |�} c�i]�tl_�

respectively.

The following exampleshowsthat, in general,bc�d�c g9h i]krl��s�c\i�ovl_q

4.6.6 Example: Let o�n���"�����9����n�k and cu�9o����[� be definedbyc\i��7l�n�� ���"�9��� x�� ��n ��[���9��� x�� ��n.�¡ x�� ��n.� qThen c\g9hji � lfn£¢¤ ¥ ��[� x�� ��n ���"�9�%� x�� ��n.��8��� x�� ��n.� qHence, c\i opl�n��"�"�%�_����'�����9���� ¡ � . But c g9h i]krl¦n��[���[���§��%�������'�8����� so thatbcf¨]c\g9hji krlO©,n�ª«z¬ � bc�¨­c\g_h�i��7l�©n bc�i#�"�[�%l¯® bc'i#��%�#�%�"l'® bc\i �8���"ln°�"����"�±®��"��%�_�_�����"�±®S�[�[���9���%�n°�"�����'�"�"�9���9����9�[���9���%�tq

4.7 Operations BetweenDiffer ent Valued Images

The algebra ²t³ inducedby ² is a homogeneousimagealgebra; the algebraicoperationsact onimagesof the samevalue type. To provide the capability of combining imagesof possibly differentvaluetypes,we needto extendthe operationsdefinedon ² ³ to a moregeneralclassof operations.Thisclassof operationsis basedon the theory of generalizedmatrix products. Observethat Eq. 4.3.1 ispractically identical to Eq. 3.14.1. The inducedoperation is a componentor pixelwiseoperation,theonly differenceis that in Eq. 3.14.1we aredealingwith finite dimensionalmatrices.In a similar fashionwe may borrow Eq. 3.14.3,the componentwiseproductof two matricesof different types,in order todefinethe pixel level operationbetweenimagesof different value types.

175

Page 184: Image Algebra by Ritter

Supposeµ±¶R· , and ¸ are three,not necessarilydistinct, value setsand ¹»º'µ½¼m¸¿¾À· a binaryoperation. Then ¹ inducesa binary operation¹Áº"µtÂ-¼v¸ÃÂ.¾�·�Âdefinedas follows: for each Ä)Å)µ  and each Æ�Å)¸  , defineÇ�È ÄɹUÆÊÅp·  (4.7.1)

by Ç�ËOÌJÍRÈ Ä Ë]Ì�Í ¹�Æ Ë ÌtÍ_Î (4.7.2)

Generalizedunaryoperationsaredefinedin a likewise fashion;any function ÏuºÐµ-¾Á· inducesaunary operation Ï�ºfµ  ¾ ·  definedbyÏ Ë Ä Í�È�Ñ[Ë Ì ¶ Ç�Ë]Ì�Í#Í º Ç�ËOÌ�Í�È Ï Ë Ä Ë ÌtÍ Í ¶ Ì ÅSÒpÓ Î (4.7.3)

As an example,supposeÄmÅmÔ Â and ÏGº�Ô½¾ÕÔfÖ is definedby Ï Ë�×%ÍØÈ�Ë�× ¶+Ù × Ù Í . ThenÏ Ë Ä Í�È�Ñ%Ë Ì ¶ Ç�Ë]Ì�Í Í º Ç�Ë ÌtÍ�È�Ë Ä Ë]ÌtÍ ¶8Ù Ä ËOÌ�Í Ù Í ¶ Ì ÅSÒpÓ ÎWheneverË ·Ø¶$Ú Í is a commutativesemigroupandX is finite, say Ò È�Ñ+ÌJÛ ¶ Ì Ö ¶�Ü�Üjܧ¶ Ì�Ý Ó , we define

the heterogeneousimagedot product of two imagesasÄÉÞ�Æ È.ß�Ë ÄɹàÆ Í ¶whereß Ë ÄɹàÆ Í�È ßá$â$ã Ä ËOÌ�Í ¹UÆ Ë Ì�Í�È�Ë Ä Ë]Ì Û Í ¹àÆ Ë Ì Û Í#Í Ú Ë Ä ËOÌ Ö Í ¹�Æ Ë Ì Ö Í$Í ÚÊä�ä�ä%Ú Ë Ä Ë Ì Ý Í ¹�Æ Ë Ì Ý Í$Í_Î (4.7.4)

Sincethe dot productinvolvesthe global reduceoperationß , it is a binary operationwhoseresultantisa scalar; i.e., Þʺ�µ  ¼u¸  ¾ · .

Although theseheterogeneousoperationsseemsomewhatartificial, they providea versatileenviron-ment for the specificationof a wide variety of imageprocessingtasks.

4.7.1 Example: (Imagecentroid) SupposeÒ Èæå�Ë�ç Û ¶ ç Ö Í ÅSè Ö ºÉé;ê ç Û ê-ë춱éíê ç Ö ê)îRï , µ È Ô ,¸ È è Ö , and Ë ·¦¶$Ú ÍfÈ¿ð Ô Ö ¶*ñíò . If ¹ÀºÔó¼vè Ö ¾ÕÔ Ö denotesscalarmultiplication of pointsofè�Ö by real numbers,then Ä�Þ±Æ-ÅmÔ�Ö , where ÄÊÅGÔ Â and ƽŠð è�Ö+ò  .

As a particular applicationexample,we computethe centroid of an image. Recall that thecoordinatesof the centerof gravity Ë+ôç ¶ ôõ Í of a continuousreal-valuedfunction f on a compactset ö�÷UÔ Ö are given byôç�Èàø?øù ç Ï Ë�ç ¶ õ Í�ú õ ú�ç

øÉøù Ï Ë�ç ¶ õ Í ú õ ú�ç û�ü§ý ôõ ÈàøÉøù õ Ï Ë�ç ¶ õ Í ú õ úçøÉøù Ï Ë ç ¶ õ Í�ú õ ú�ç Î

For ÄuÅÊÔ Â , the discreteapproximationof theseintegralsis given by

ôç Û È þÿ������� ����� ��� ��� � � ��� ��� ��������� �� � � ��� � ��� ��� � �����! � �#"�� � � � ���$� ����� �%� � ��� ��� ������� � �� � � ��� � ��� ��� �'&

176

Page 185: Image Algebra by Ritter

Consideringtheseformulas,it is not difficult to ascertainthat the imagecentroid ()+*-, (.�/�0 (.�132is given by the simple image algebrastatement

()546*87:9<;= 7 0where ; 4%>@? A 1 denotesthe inclusion map ; ,B. / 0C. 1 2D*E,B. / 0C. 1 2 . Figure 4.7.1 providesanillustration of an imagecentroid. The Booleansourceimagea, which showsthe sillhouetteofan SR71 spy plane, is shown on the left. The image on the right showsthe location of thecentroidwhich is in the centerof the von Neumannconfiguration.

Figure 4.7.1 Exampleof an imagecentroid;the sourceimagea is on the left, the locationofthe centroidis the centerof the von Neumannconfigurationin the imageon the right.

4.8 Image-Template Products

Image-templateproductsareoneof the mostusefulconsequencesof the conceptof a heterogeneousimageproduct,theyprovidetherulesfor combiningimageswith templatesandtemplateswith templates.Theseproductsincludethe usualcorrelationandconvolutionproductsusedin digital signalprocessing.

If FHG8I$JLKNM3O , then for each PQGSR , FUT5GVJWK . Thus, if XSGVYZK , then accordingto Eqs. 4.7.1,4.7.2, and 4.7.4, XH[\FUT]G_^ K and `ba$Xc[dFUT ecG_^ . It follows that the binary operations[ and finduce a binary operation f[hgiY K_j I J K M OQk ^ OSlwhere mon X f[pFDGq^ Ois defined bym a�Pre n ` a�Xc[dF T e n `s�tBu a$X%a�vwe�[xF T a�vweyen a�X%a$v{z3e|[EF T a$v{z}e~e$f�a�X%a�v��}e [dF T a�v��Ue�e�f5������f�a�X�a�v���e�[xF T a�v���eye�� (4.8.1)

The expressionX f[oF is called the right productof a with t. Note that Eq. 4.8.1 is essentiallyEq.3.14.16with x and y replacingk and t, respectively.

177

Page 186: Image Algebra by Ritter

Everytemplate���V�$�����3� hasatranspose���%�V��� � � � which is defined�3��������r���U�����r� . Obviously,�B� � � � �8� and � � reversesthe mappingorder from ���h� � to � �h� � . If we also reversethe orderof ¡ and � in our previousdiscussionby assuming¢ £��¥¤¦¡§� ¨ , then we have � �� ¢'©_�_¨ �and ªq�$� �� ¢x©��«�_¨ , for ©��_¡ � and �«�¥��� � �3� . Hencethe binary operations¢ and ¬ induce abinary operation ¬¢h£%�$� � � � ¤­¡ � �®¨ �S¯where ° �±� ¬¢p©q�q¨ �is defined by ° ���r�Z� ª ��� ���¢x©��W� ª²�³y´ �~� ��������%¢x©���������µ (4.8.2)

Theexpression� ¬¢o© is calledthe left productof a with s. HereEq. 4.8.2is theanalogueof Eq. 3.14.17.Observethat for both the left and the right product, the sourceimage a is an ¡ –valuedimageon X,while the transformedimageb is an ¨ –valuedimageon Y. It follows that image–templateproductsarecapableof performingbothpixel level andspatiallevel imagetransformations;imageswith certainrangevaluesdefinedover a given point set are transformedinto imageswith entirely different rangevaluesover point setsof possibly different spaces.

When computing � ¬¢p© , it is not necessaryto usethe transpose�3� sinceª²y³y´ �B� �� ���w��¢E©%���w�y�Z� ª²y³y´ �B� � �$�¶�%¢d©%�$���~�Nµ (4.8.3)

This allows us to redefinethe transformation° �!� ¬¢o© as° ���r�Z� ª²�³y´ �~�U���$�r��¢x©����w�~�#µ (4.8.4)

Image–templateproductsarecomputationintensive.For example,if X is an ·¸¤q· arrayof pointsand Y of size ¹+¤º¹ , then accordingto Eq. 4.8.1, the computationof eachimagevalue b(y) requires·¼» operationsof type ¢ and ·¼»¾½V¿ operationsof type ¬ , for a total of Ài·¼»¾½V¿ operations.Thus,inorder to constructthe imageb, a total numberof ¹ »���ÀÁ·¼»<½V¿}� are required. For standardÂ�¿�Àä5Â�¿}Àor ¿UÄÁÀ�Åp¤Q¿}ÄiÀÆÅ size imagescomputationsof such magnitudewould be prohibitive even on todayssupercomputers.Fortunately,in mostcases�~¨ ¯ ¬%� is a monoid. Hence,whenever©%���%Ç$�%¢ÉÈ � ���%Ç$�Ê�QÄ ,where0 denotesthe zero of ��¨ ¯ ¬�� , the two ¬ operations��©����%ÇÌË�Í3�%¢xÈ � ����Ç�Ë�Í}����¬���©����%Ç$� ¢dÈ � �$�%Ç$�~��¬���©����%ÇÏÎ Í}�%¢xÈ � �$�%ÇÐÎ Í}�y�collapseinto a single ¬ operationsince��©�����Ç�Ë�Í}��¢EÈ � ����ÇÌË�Í3�y�$¬���©%����Ç��|¢xÈ � ����Ç�����¬���©%����ÇÐÎ�Í}� ¢EÈ � ���%ÇÐÎ Í}�y��_�$©%�$�%Ç�Ë�Í3�|¢xÈ � ����ÇÌË�Í}����¬���©����%ÇÐÎ Í}� ¢xÈ � �$�%ÇÐÎ Í}�y��µ

For the remainderof this sectionwe assumethat �B¨ ¯ ¬ � is a monoid and let 0 denotethe zero of¨ under the operation ¬ . Suppose©Ñ�V¡ � and Èq�§���DÒ � � , whereX and Z are subsetsof the sametopologicalspace.Since ¨ is a monoid, the operator ¬¢ can be extendedto a mapping¬¢Ó£i¡ � ¤��$� Ò � � �®¨ � ¯

178

Page 187: Image Algebra by Ritter

where Ô¥ÕEÖ¼×Ø5Ù is definedbyÔwÚ�ÛrÜ�Õ-ÝcÞß�àyáãâCä Ú�Ö�Ú�åwÜ ØEÙ�æ Ú�å�ÜyÜÓçÐèêé§ë¼ì_íÕïîð çÐèêé§ë¼ìSÕïîVñ (4.8.5)

The left product ò�×Ø Ö is definedin a similar fashion. Subsequentexampleswill demonstratethat theability of replacingX with Z greatlysimplifies the useof templatesin algorithmdevelopment.

Significant reductionin the numberof computationsinvolving the image–templateproductcan beachievedif ó+Õ]ôõÕ�ö is a monoidand Ú~ö<÷ × ÷ Ø Ü is a commutativesemiring. If

Ùcø_ù ö¶ú ûUü , then thesupportof t at a point Û ø¼ý with respectto theoperation× is definedas þ�ÿ�Ú Ù æ Ü�Õ���å ø ì�� Ù æ Ú�å�Ü íÕ ð�� .Since

ÙUæ Ú�å�ÜDÕ ð wheneverå§íø þ ÿ Ú ÙUæ Ü , we have that Ö�Ú�å�Ü Ø�ÙUæ Ú�å�ÜDÕ ð wheneverå¥íø þ ÿ Ú ÙUæ Ü and,therefore, Þß�àyáãâ�ä Ú�Ö�Ú�åwÜ ØEÙUæ Ú�å�Ü�ÜZÕ Þßyàyáãâ���� ����� Ú�Ö�Ú�åwÜ ØdÙUæ Ú�åwÜ~Ü�ñ (4.8.6)

It follows that the computationof the new pixel value b(y) doesnot dependon the size of X, but onthe size of þ ÿ Ú ÙUæ Ü . Therefore,if �oÕ���������Ú�é-ëHþ ÿ Ú ÙUæ ÜyÜ , then the computationof b(y) requiresa totalof ������� operationsof type × and

Ø. If m and n are as above,and k is small, then � �UÚ����!�"��Ü is

significantly smaller than �#� ù%$ �&�'� û .Substitutionof different value setsand specific binary operationsfor × and

Øresults in a wide

variety of different imagetransforms.Our prime exampleswill be the ring Ú)(¾÷#*b÷,+ Ü and the boundedl-groups Ú)(.-,/103240�560�7!0�798;: and <%=6>@?/ 0�260�540�AB0�A68 C�D Here we substitute =6>@?/ E =.FHGHIKJ@0ML"N for theboundedl-group <O= FP / 0�240�560�AQ0RA68�C discussedin Section3.12 by replacingthe symbol STL with 0.From a mathematicalperspective,this amountsonly to an interchangeof symbols. However, from apracticalstandpoint,this interchangeallowsfor themanipulationof non-negativereal-valuedimagesthatmay contain zero values.

Replacing U�V&0XW.0MY": by U)=&0#7!0,Z[: changes\ E^] WY`_ into\ Ea] 7Yb_40where \cU%d4: E ef�gih&j�k@lnm%o�p U ] Urq.:sZ3_itMU%qc:�:M0 (4.8.7)

]vu = h , and _ u <O=.wxCzy . The left productis definedin a similar fashion. In digital imageprocessingXandY areusuallyarraysof form I�U){0r|M:~}����"{6�"��0����`|~����N . In this casethe relationshipbetweenthe right and left productcan be statedin termsof transposes:] 7YH_ E <r_ 8 7Y ] 8 C 8 0where ] 8 U%{0%|@: E�] U�|�0{): .4.8.1 Example: (Local Averaging) Let a be a real-valuedimageon a rectangulararray ���a�,� and_ u <O=c�z�X�z� � the translationinvariant ����� neighborhoodtemplatedefinedby

t�y� =

1

1

11

1

1

1

1

1

179

Page 188: Image Algebra by Ritter

The image b obtainedfrom the code � �[������% ¢¡£`¤�¥representsthe imageobtainedfrom a by local averagingsincethe newpixel valueb(y) is givenby

��%¦ ¥ �§�� ¨©�ªi«9¬�­�®[¯r°R±   �³² ¥s´�¤�µ �O² ¥ �¶�� ¨©·ªK«&¬�­�®[¯%°�±   �%² ¥¹¸

Figure4.8.1 illustratesthe effect of local averaging.The sourceimagea is on the left and thelocally averagedimage is on the right.

Figure 4.8.1 Effect of local averaging. The sourceimageis displayedon the left and the averagedimageon the right.

It is important to distinguishbetweenthe mathematicalequality ºa»�¼�½¾H¿and the programcode

representationºHÀ[»"¼¢½¾Á¿. The former denotesequalityof two images,while the latter meansto replace

b by ¼¢½¾Á¿. In Example4.8.1, the image ÂÃ�Ä ¼¢½¾`¿·Å

is, by definition, an imageon all of Æ,Ç with zerovaluesoutsidethearray È�É"Æ Ç . This is not a problemif we representÂÃ¹Ä ¼v½¾H¿�Å

asa function. However,if we representÂÃ�Ä ¼v½¾H¿�Å

asa datastructure,suchasanarrayof numbers,thenwe run into theproblemofstoringaninfinite arrayona finite machine.Also, in practice,oneis only interestedin theimage ÂÃ Ä ¼v½¾H¿�Årestrictedto the arrayY (in our particularexampleÊ�»aÈ ) on which b is defined,that is ÂÃ Ä ¼¢½¾`¿·ÅÌË Í

.

This problem could be solved as follows: Let ÎbϧÐOÑ�ÒBÓ Ò be defined by ÎzÔ�Õ Ä ¿ Ô Å�Ë Ò for eachÖ Ï'È , where t is the templatedefinedin Example4.8.1. Then ÂÃ@Ä ¼¢½¾ Î Å providesthe desireddigitalimagesince ¼�½¾ Î1» Ä ¼¢½¾`¿·Å3Ë Ò . Thus we may ask “why not define t simply as a templatefrom X toX insteadfrom Æ Ç to Æ Ç ?” The answeris that by defining the local averagingtemplateas we did, thetemplatecanbeusedfor smoothingany two-dimensionalimage,independenton thedimensionof X. Thereasonfor this is that whendefining an imageb in a program,oneusuallyhasto declareits dimensions,i.e., the sizeof its underlyingarray. In particular,if b is declaredto be an imageon Y, then the imagealgebrapseudocode ºbÀ×»"¼v½¾`¿

meansto replaceb pointwiseby ¼v½¾`¿suchthat the valueof b at point

y is thevalueof ¼¢½¾Á¿at point y, where,of course,Ê�ÉaÆ Ç . In termsof algebraicequality,we thenhaveºØ» Ä ¼¢½¾H¿�Å3Ë Í

. As a result,a programmeris not facedwith the taskof redefiningt for different-sizedimagesas would havebeenthe caseif we had defined

¿ Ï Ð Ñ Ò Ó Ò .

Of course,the programstatementº�À×»�¼¢½¾Á¿will producea boundaryeffect. In particular, if a

and b are ÙÛÚbÜ imageswith underlyingcoordinateset ÈÝ»ÛÞ Ä)ßàrá ŠϢÆ,Ç�À�âäã ß ã"Ù à â�ã á ãaÜcå ,180

Page 189: Image Algebra by Ritter

then æ.ç3è�éièëêäìîíï ç%ð çXè·ézèëê,ñ`ð çÌè·éóò�ê#ñbð ç%ò¹ézèëê,ñHð,ç%ò¹éò·êê¹é which is not the averageof four points. Onemay either ignore this boundary effect (the most common choice) or use one of several schemesto prevent it. For instance, one may simply avoid boundary pixels by defining an array ô ìõ ç%öXér÷Mê4øvù,ú�û�è�ü"ö.üaý�é�è�ü`÷�ü"þcÿ and setting æ û[ì � íï çrð�ñ��� ê���� . Then b representsthe desiredç)ý�Hò·ê �'ç)þ�bò ê output image. Letting m and n be variablesallows the applicationof t to imagesof arbitrary size.

If, ontheotherhand,a trueaverageis desiredin theinterioraswell asalongtheimageboundary,thenanappropriatevarianttemplatecanbedefinedto accomplishthis task. Specifically,for �Áì�ç�� í é�� ú ê9øvù ú ,set �`ç��6ê�ì���ç�� í ñ öé�� ú ñ�÷@ê~û�öXé%÷�ø����è�é��@éiè���� and define t by

��� ç��cê.ì� ! "í# $&% �bø��·çÌè·ézèëêXé�ç3è�éÌþ êÌé�ç%ý ézèëê3é�ç%ý�éÌþ ê'�)(�*,+-�Hø.�Áç��6ê0/21í3 $&% � ø)��ç)öézèëê3é�çXè�é%÷�ê3é�ç%öXéÌþ êXé�ç%ý é%÷@ê~û�è�ü"ö6ü"ý�é�è�ü`÷�ü"þ4�(5*6+7�bø8�`ç��6ê9/21íï $&% � ø)��ç)öé ÷¹ê~û�è�ü"ö6ü"ý é è�ü`÷1ü"þ:��(5*;+<�`ø.�Áç��6ê,/=1� >�?'@6A�B�C $ED AGF

In Section4.5wehintedthatspatialtransformationsmayalsobeperformedusingtemplateoperations.This shouldcomeasno greatsurprisesincetemplatesoperateon both pixel valuesandpixel locations.We providean exampleof a spatialtransformin termsof a left image–templateproduct.

4.8.2 Example: (Image rotation) Let a be a real-valued image on a rectangulararray 1 ìõ ç�H í é�H ú ê9øvù,ú�û�èJI7H í I"ý é�èKILH ú I"þcÿ , M ì �ON'û�Bò5P�üLN�ü�ò�P4� , and Q û�M RS�TVUXW�Y UZWa parametrizedtemplatedefinedbyQ·ç�N·ê�[]\5^`_ \ W�a ç�� í é�� ú ê4ìcb è $&% ç'� í é�� ú ê ì ç�d]H ífehg5i NjkH ú i öOþlNXm�n�o]p;q�rOs`t,uwvxp6y�z�{5r�u5|~}� ���������'���E�'�

Then the image b obtainedby setting �-���7�5� u�}�v�k�representsa rotatedthroughanangle u usingnearestneighborinterpolation.In this examplethesymbol o]��| denotesthe roundingof a to the nearestinteger.

The boundedl-group

���G�l� nh�Gn���n�v�n�v���} providesfor two lattice products:��� � ��<� nwhere

� ��¡ } � ¢£¥¤O¦�§�¨�©Oª�«]¬`­f® o �

�°¯ },v ��± �`¯ }`|²n (4.8.8)

and��� � �� � n

where� �`¡ } � ³

£�¤5¦�§¥¨ ª «�¬ ­ ®9´¶µ9·`¸º¹4» ¼5½�¾6·`¸¿¹�ÀVÁ (4.8.9)

In orderto distinguishbetweenthesetwo typesof lattice transforms,we call theoperator Âà theadditivemaximumand Äà theadditiveminimum. It follows from our earlierdiscussionthat if ÅÇÆKÈ9É6Ê ·�½Z¾,¹¿Ë<Ì ,

181

Page 190: Image Algebra by Ritter

then the value of b(y) in Eq. 4.8.8 is ÍJÎ , the zero of ÏGÐlÑ under the operationof Ò . Similarly, ifÓÕÔ�Ö ÑØ×`Ù�Ú6Û�ÜÞÝ , then ß ×�à�ÛKÜ Î in Eq. 4.8.9.

The left additive max and min operationsare definedbyÙ Òá7â Üäãå æ ×�àGç ß ×�à�Û'Ûéè ß ×�à�ÛVÜ êë�ìXí�î�ï�ðZñ�ò�ó�ô�õ�ö Ù ë ×�à�Û,÷ â ×Eø ÛEù¥ç¿à�úüû<ý þÿ (4.8.10)

and Ù��á â Ü ãå æ ×`à�ç ß ×�à�Û'Ûéè ß ×�à�Û¿Ü �ë�ì5í�î¥ïOñ�ò�ó�ô�õ � Ù ë ×�à�Û,÷�� â ×�ø Û��¿ç�� �� ���� (4.8.11)

respectively.The relationshipbetweenadditivemax andmin is given in termsof lattice duality by�������������� �� � �"! � �wherethe image � � is definedby � � �$#%!��'& � �(#%!�) � , and the conjugate(or dual) of

� +*-,/.0214365 is the

template� � +*-, 5071 3 . definedby

� �8 � � !9�'& �":;��#!() �. It follows that

� �8 � � !<�>=��6?: �-#! .4.8.3 Example: (Salt and peppernoiseremoval) An imagemay be subjectto noiseand interference

from severalsources.Imagenoisearising from a noisy sensoror channeltransmissionerrorsusuallyappearsasdiscreteisolatedpixel variationsthat arenot spatiallycorrelated.Pixels thatare in error often appearmarkedlydifferent from their neighbors.In Booleanimagesthis typeof noiseappearsas isolatedblack andwhite pixels and is referredto assalt and peppernoise.The image a on the top left of Figure 4.8.2 providesan exampleof this type of noise. Thesilhouetteof the SR 71 spy planecontainssmall holeswhile the backgroundcontainsisolatedblack pixelsor small isolatedgroupsof black pixels. Oneway of removingthis typeof saltandpeppernoiseis by geometricfiltering using local maximaand minima.

Let @ denotethe 3–elementboundedsubgroup A =�B �DCE� BGF of , 071 , and� *-@IH�JK3 H�J be

definedby �MLONQP�R SUTWV�XZY;[]\QY_^"`ba>ced fhg XZY [ \QY ^ `9ikjMX-l [<mGn \Ql ^ `K\7XWl [ \Ql ^bmGn `Uop�q rMsut_vxwUy f{z v}|Pictorially, t can be representedas

t~y� = 0

�0� 0

�0�

wherethe cells outsidethe supportof �6� (everythingnot labelledzero)havevalue ��� .

If ���O������ � , then�%�W�]�]�Q�]�6�}� ����]��� �x�-���M�]�¡  ��¢U£¥¤ ��¦ ¤ �-§ �}¨ �2�-©ª�]�u©ª���2«¬� �O­K�W� ­U��� �W©ª�"�u©ª�"�(®� ���� � � � � ���M¯K�¥­ �-° � � ­ � �$�±��­ � � ­ �Z° � ��²7³ �´�-©;�]�Q©;���2«¬µ]¶�·�2�-�]�<«G¸M�K�]�"� � �2�-�]���¹¸M�K�]�6� � �2�-�]�]�Q�]�b«º¸"� � �2�-�]�]�Q�]�<�¹¸]�¼»182

Page 191: Image Algebra by Ritter

Figure 4.8.2 Exampleof salt andpeppernoiseremoval. The sequenceof imagesillustratesthe different stepsof the algorithm,startingwith the noisy sourceimageonthe left in the top row andendingwith the cleanedimageshownon the bottom right.

Thus,b(y) is the maximumof a restrictedto a von Neumannneighborhoodaboutthe point y.In particular,if ½7¾-¿À�Áàbut ½´¾$Ä%À9Á>Å for any 4–neighborx of y, then Æ%¾-¿bÀ9Á>Å . Therefore,in the transformedimageb, any small hole appearingin a will havebeenfilled in asillustratedby the top centerimageof Figure4.8.2. However,sincewe are taking local maxima,all blackobjectsin a havebecomeenlargedor dilated. To shrink black objectsbackto their former size,we convolveb with ÇxÈ using the additive minimum operator ÉÊ . The conjugateÇxÈ of t looksthe sameas t, the only differenceis that pixel valuesof Ë�Ì havebeenreplacedwith Ì . Theresultingimage ÍÏÎOÁÐÆÑÉÊ Ç È is shownon the top right of Figure 4.8.2.

In orderto removethe peppernoise,we needto apply theadditivemin operatoronemoretime.The image Ò�ÎOÁ>Í�ÉÊ Ç È is shownon the bottom left of Fig. 4.8.2. Unfortunately,the secondapplicationof the operator ÉÊ also erodedthe silhouetteof the SR 71. To dilate the erodedsilhouettebackto its former sizewe needto apply the additivemax operatorto d. This resultsin the final filtered image Ó4ÎOÁºÒkÔÊ Ç shownon the bottomright of Figure4.8.2. The completealgorithmresultingin f can be statedin one line of pseudo-code;namely,

ÓÕÎOÁ�¾U¾u¾(½ÖÔÊ Ç×ÀØÉÊ Ç È À/ÉÊ Ç È ÀÔÊ Ç}ÙTheboundedl-group Ú-ÛbÜ;ÝÞàß Ô ß É ß"áâßMáãOä alsoprovidesfor two latticeproducts.Specifically, we have

ÆÑÁº½ Ôå Ç ß183

Page 192: Image Algebra by Ritter

where æ%ç-èébê ëìMí]î}ïñðDò�ó�ôöõ×÷±ø ç(ùé}ú û"ü;ç�ùé(ýñþ (4.8.12)

and æÑê øÏÿ� û}þwhere æ%ç�èbéIê �ìMí]î9ï ð��bòOó ô õ � ø ç-ù%éIú��]û ü ç-ùé�� (4.8.13)

Here 0 is the zero of � ���� under the operationof � , so thatæ%ç-èbé ê��

whenever ����� ç�û ü éÖê��.

Similarly,æ%ç�èbé�ê��

whenever ����� � ç(û ü é4ê��.

The lattice products �� and ÿ� arecalled the multiplicativemaximumandmultiplicativeminimum,respectively.In analogywith Eqs. 4.8.10and 4.8.11,the left multiplicativemax and left multiplicativemin are definedasû �� ø ê! "# "$ ç-è<þuæ%ç(èbéZé&%Õæ%ç-èbéIê ëì×í¡î<ïñð'� ç ó)(ô é ÷ û ì ç-èbéIú ø ç(ù%é(ý×þè�*,+.- "/"0 (4.8.14)

and û ÿ� ø ê "# "$ ç-è<þQæ%ç$èbéZé1% æ%ç-èbéIê �ì×í¡î<ïñð � ç ó (ô é � û ì ç-èbéIú2� ø ç�ùé��Iþè�*,+ - "/"0 þ (4.8.15)

respectively.The duality relationbetweenthe multiplicative max andmin is given by

øÏÿ� û�ê ç�3û �� 3ø é;þwhere 4ø ç-ù%é ê ø ç(ùé and 4û ì ç�è}é ê ÷ û ü ç-ù%é(ý . Here 45 denotesthe additive conjugateof r in � �6�� and isdefinedby

45 ê # $87:9<; =?> 5 * �A@� =?> 5 êB�� =?> 5 ê.�8This is similar to the additive conjugatedefinedin Eq. 3.12.1(Section3.12).

4.8.4 Example: (Geometricedgefiltering.) Roughly speaking,a local edge in a digital image isa small areain the image where there is a sharppixel value transition betweenneighboringpixels. Local edgefiltering enhancesthesetransition zonesand suppressesvaluesof pixelswhoseneighboringpixels are of approximatelythe samevalue.

The basic idea underlyingmost simple edgedetectiontechniquesinvolves the computationofthe local derivativeoperator.This examplediffers from the standardgradienttechniquesin thatit computesdifferencesin local maximaand minima.

Let t and s be templatesmapping CEDGF HJI K�LMON�PRQ and definedby

2S

1 2S

1 2S

1t T

=yU s V =yU184

Page 193: Image Algebra by Ritter

Let WOXZYE[&\ YE[ be the reflection W]_^a`cbd^ [feGg ])^ [ bd^h` e and define ifj and klj by imj n g i n1o Wand k j n g k n o W , respectively. Then

2

1

2

1

1

2p

yqs r =yqt s =

The differencesbetweenthe local maxima and minima in both the horizontal and verticaldirectionsenhanceslocal edgesin thesedirectionswhile smoothinglocal areaswithout sharpedgecontrast. The particularalgorithm is given byt,uwvyxEz|{J}�~���c�Z� {�}�������_�������<� }�~���m�|�8�B� }�����m�|�m� �����<� ���wherea denotesthe sourceimageand e the edgeenhancedimage. Figure 4.8.3 illustratestheeffectsof this technique;the sourceimagea is shownon the left andthe edgeenhancedimagee on the right.

Figure 4.8.3 An exampleof geometricedgefiltering. Thesourceimage is on the left and the filtered imageon the right.

In both, thedefinition of theproductoperator �� aswell asthe four lattice image-templateproducts,we assumedthat X is a finite point set. Thereare various instanceswhere this restrictiveassumptioncan be lifted. For example,if a is continuous,�f� is continuous�h .¡£¢ , and ¤¦¥¨§h©'ªJ�f�¬« is compact�h .¡�¢ and the appropriatezero, then ­&®¯ �±°²­1³¯ ��°´­ ®� �±° and ­ ³� � all exist. Here we assumethatthe global reduceoperationsµ and ¶ denotethe sup and inf of the functions ­·�¸� � ° ­·�8¹±� � , etc. Incaseof the productoperator �� , Eq. 4.8.7 assumesthe formº ªJ 2«Z» ¼½�¾À¿ÀÁwÂJÃfÄAÅEÆ�ÇAÈ�ÉfÊfËhÆÌÇAÈ)Í�ÇÏÎ

Extensionsto the continuouscase are essentialfor modelling or computing continuousimagetransformations.

185

Page 194: Image Algebra by Ritter

4.9 The Algebra of Templates

Sincea templateis simply an imagewhosevaluesare images,the basicelementaryfunction theoryconceptsthat were applied to imagesare also applied to templates. For example, restrictionsandextensionshave analogousmeaningwhen applied to templates. If ÐÒÑ�ÓÌÔAÕ8Öf× and ØÚÙ£Û , then ÐÀÜ Ýdenotesthe templateÞßÑÚÓÌÔ Õ Ö Ý definedby ÞRàÏáOÐfà.â¬ã¸Ñ�Ø . If ä�ÙÚå , then ÐÀædç denotesthe templateÞGÑ Ó Ô ç Ö × definedby Þ à áOÐ à Ü ç âhã¸Ñ,Û . As in the caseof imagerestrictions,thesetwo conceptsoftemplaterestrictionscan be combinedinto a single,mutually inclusivedefinition.

4.9.1 Definition. If ÐGÑÚÓJÔÕ´ÖR× , ØèÙÚÛ , and ä�ÙÚå , then restrictionof t to Z and V is definedas

ÐÀÜêé Ýaë çíì á.îJÐ6Ü ÝEïRæ ç¨ðThus, ÐÀÜ é Ýaë Õ ì áñÐÀÜ Ý , ÐÀÜ é × ë çíì áÚÐ6æ ç , andif Þ²áOÐÀÜ é Ýaë ç ì , then ÞßÑOÓ�Ô ç Ö Ý and Þ à îJòAïAáÚÐ à î�ò�ïZâhãèÑ�Ø

and âhò�Ñyä .

In orderto definethecomplementarynotionsof templateextensions,let ÐóÑ Ó ÔÕ Ö × and ôóÑ Ó ÔÕ Öfõ .

The extensionof t to r is denotedby ÐÀÜ ö and is an elementof ÓÌÔ Õ Ö ×ø÷ õ definedby

ÐÀÜ ö áyù Ð à úüû ã¸Ñ,Ûô à úüû ã¸Ñ,ýÿþ'Û ðOn the otherhand,if Ð ÑÚÓJÔ Õ Ö × and Þ ÑÚÓJÔ õ Ö × , thenthe rangeextensionof t to s is denotedbyÐÀæ � and definedby îÌÐÀæ � ï à á Ð à Ü ��� . Thus, if ô&á ÐÀæ � , then ô ÑÚÓÌÔ�Õ ÷ õ ÖR× .

The commonunaryandbinary operationson templatescorrespondto thosedefinedon images.Forexample,if

����� Ô and Ð·Ñ Ó � Õ Ö × , then ô&á ��� Ð·Ñ Ó Ô�Õ Ö × is definedby

ô à á � îJÐ à ï� wheref is appliedpointwiseto the image Ð à asin Eq. 4.7.3. Similarly, if � ������� Ô , ÞGÑÚÓ � Õ ÖR× ,

and ÐóÑOÓ � Õ Ö × , thenthe inducedbinary operation� � Ó � Õ Ö × � Ó � Õ Ö × ÓÌÔ Õ Ö × is definedby

î)Þ��¬Ð'ï à á Þ à �¬Ð à âhã¸Ñ�Û ðThus,if ��á � á � á Ô , and Þ� ÐóÑOÓ�� Õ Ö × , thenthebasicbinaryoperationsof addition,multiplication,and maximum are given by

ô'à·á Þfà��¨Ðfà� ���� �"!#�¸ôGá Þ$�¨Ð&%ô à á Þ à(' Ð à ��)� �"!*� ô á Þ ' Ð&%ô à á Þ à�+ Ð à ��)� �"!#��ôGá Þ + Ð ð186

Page 195: Image Algebra by Ritter

4.9.2 Example: (Templatearithmetic.) Suppose,�- .�/10325476*8 4�6 arethe following translationinvarianttemplates:

1 12p 1

3

-1

s r =yq t s

=yq

Using the basicbinary operationsof templateaddition,multiplication,andmaximumwe obtainthe templates

691

1 15:-1

1

11 3y;( + ) =s< t=

y;( ) =s< t=. y;( v ) =

>s< t

=

If ?A@CBED�F is a (commutative)group,thenaccordingto Theorem4.4.1 G3@IH�B"DKJ is alsoa (commutative)group. Replacingthe group @ by the inducedgroup @LH in Theorem4.4.1 resultsin the conclusionthatG3@ H J"M is a (commutative)group. This provesthe following theorem:

4.9.3 Theorem. If ?N@$B"DOF is a (commutative)group, then P�G3@ H J�MQB"D�R is a (commutative)group.

If 0 denotesthe zero imageof G @ H BSD J , then the zero templateof P G @ HTJ M�BSD)R , denotedby U , is

definedby UWV�XZY\[�]^�_ . Thus, UWV�?a`bFcXZde[�`f^hg and [�]�^�_ , i�D�U(XjUkDi�Xli�[�i(^1G3@ H J�M ,and m�n7?AU V F�Xpo [�]�^�_ .

If ?q@$B"D(BsrtF is aring with multiplicativeidentity1, thenwecandefineamultiplicativeidentity templateu ^1G3@LHkJ"M byu V Xjvw[�]f^x_ , where1 denotesthe multiplicative identity imageof G3@LH�B"D(ByrtJ . Thus,u V�?�`zFKX|{\[�`}^xg and [�]f^~_ , iOr u X u r7i�X�i�[�i�^1G3@LHKJ M , and m n ? u V�FKX�g [�]�^~_ . The next

theoremis an easyconsequenceof Theorem4.4.2.

4.9.4 Theorem. If ?q@$B"D(B�rtF is a (commutative)ring (with unity), then PyG3@ H J�M�B"DQB�r�R is a (commu-tative) ring (with unity).

As canbe inferredfrom the last two theorems,the algebraof templatesbehavesvery muchlike thealgebraof the underlyingvalue set. In view of theorems4.4.1 and 4.4.2, and the fact that templatesare images,this shouldcomeasno greatsurprise.Of course,just as for imagesin general,the induced

187

Page 196: Image Algebra by Ritter

structure ���q�L�K���Q���(�y��� is, in general,weakerthantheoriginal structure�q�$�"�(���t� . For example,it easily

follows from ourearlierobservationsconcerningthealgebraicstructureof �5� thatif �A�C�S�(����� is adivision

ring, then ���3�L�K� � �"�(����� is a von Neumannring with zerodivisorsand,hence,not a division ring.

Thereis a naturalconnectionbetweenthealgebraof � –valuedtemplatesandthe algebraof matriceswith entriesfrom � . SupposethatX andY arefinite, say ���Z�7�I�L�����7�y����� � and ¡¢�Z��£I�L���7����� £�¤�� .Then there is a natural map ¥1¦ � � � � �Z§p¨ �&¤ �N�&�©Kª �a«N¬t­�� �T®�¤ (4.9.1)

definedby « ¬t­ � ©�¯�° ��� ¬ � . Anotherway of visualizing the map

¥is by usingthe image-to-vectormap± ¦ � � § � �² ª ± � ² �

definedby ± � ² �b��� ² �q� � ���s���7��� ² ��� � �*� . Then

¥ � © ��� � ± � © ¯´³ �qµ¶�����7��� ± � © ¯´· �qµ � , where ± � © ¯ ° � µ denotesthe transposeof the vector ± � © ¯ ° ���¸� © ¯ ° �q� � ���s�7����� © ¯ ° �3� � �N� .4.9.5 Example: Suppose¹xº»�3¼5½7¾*¿�À ¾ is definedby

1

1 1 1

1

s Á =yq

Let  ÃÅÄ�ÆAÇ�È�É�Ç�Ê7ËÍÌhÎ ÊÐÏÒÑ�Ó Ç�È Ó1Ô É Ñ�Ó Ç�Ê ÓÖÕ�× and ØZ̸ÙqÚLÛKÜ Û be the restriction ofs to the point set X in both its domain and range. More precisely, Ø1à ÝßÞ�à Û)á âäã�å so thatØ"æ�Æ�çzË�Ã�Ý"æ�ÆqçbËéèKê&É*ç�Ìf . In particular,the imagecorrespondingto ØWà È á È å hasthe followingappearance:

1

1

1

0ë0ë 0

ë0ë0ë0

ë 0ë

t =

=(1,1)ì

The region outlined in bold show the supportof t. If we use the usual row scanningorderíIî�ï�ðNñ òAó�ñ�ôöõÍ÷ùø~ïZú ðAû�üÖýWõ�þ ÿ for relabelingthe arrayX, then the vectorcorrespondingtothe image

������� ��is given bysð ���� õzïZð ���� ð�ý ó�ý7õ�ó ���� ð�ý ó���õ*ó�������ó ���� ð�� ó*ú�õNõïZð�ý ó�ý ó� ó�� ó�ý ó�� ó�� ó�� ó�� ó�� ó�� ó��Wõ��

188

Page 197: Image Algebra by Ritter

By definition, this vector forms the first columnof the matrix ���� �!#"%$'&��( �)+*�!�,.-0/�/�/�-1&2�( �)3*54�!',76 .Similarly, the secondcolumn is derivedfrom the vector&2�� �) 4 !8"9�' �) 4 ��:�-�:�!�-; �) 4 ��:�-�<+!�-�/�/�/�-= �) 4 ��>=-?@!!"9��:�-�:�-�:�-�A@-�A=-�:�-�A=-�A=-�A@-�A=-�A@-�A�!�Bwhere the image �) 4 "C �D�E�F GIH is given by

1

1

1

0J

0J

0J0J 0

J0J0J0

J 1

(1,2)Kt s

=

Continuingin this fashion,we obtain the symmetricmatrix

LNM(O�PRQ

STTTTTTTTTTTTTTTTTTTU

V V W W V W W W W W W WV V V W W V W W W W W WW V V V W W V W W W W WW W V V W W W V W W W WV W W W V V W W V W W WW V W W V V V W W V W WW W V W W V V V W W V WW W W V W W V V W W W VW W W W V W W W V V W WW W W W W V W W V V V WW W W W W W V W W V V VW W W W W W W V W W V V

X�YYYYYYYYYYYYYYYYYYYZ[

The relationshipbetweenmatrix algebraand the algebraof templatesis given by the followingtheorem.

4.9.6 Theorem.L]\�^1_�`8acb�dfe�gfe�hjilkmMnpo#q=M�`rP�e�gse�htP

is an isomorphism.

Proof: To showthatL

is one-to-one,let u eOfv _ ` a b d with uxwQyO . Then z+{}| v�~ suchthatO������������� . But this meansthat ���#��1�������1���c� ���������� ��������������'� and, therefore,� �t� �������� forsomepair of indices i, j. Thus, � � � � �� � ����� .For � ���� @������¡£¢;¤¦¥¨§ ¡R¤ �ª©«� , define ¬ ¥®­�©°¯�±�² by ¬ � � ���0���#�] =��� . Then � � ¬ �r� � . Thisprovesthat � is onto.

If ³ �y��´ � , � �����µ�]¶x�9�������·�(¡£¢3¤ , � � � �°�9¸¹�]� � ���·��¡º¢3¤ , and ¶º´l¸®�y»¼�]��½��¾���'¡£¢3¤ , then³ � � �'���'�µ�9��� � �'���'��´ � � � �����ª�R�y�����#´ � �¾��9½����À¿ � ¥ÂÁ�Ã�Ä�Å�Å�Å}Ä1Æ�Ç ��È1É ¿;ÊË¥ÂÁ�Ã3ÄÌÅ�Å�Å�Ä1Í0Ç�ÎTherefore, � �����Ï´ � � � �£�жѴҸÓ�Ô»®� � � ³ �£� � ���r´ � � .

189

Page 198: Image Algebra by Ritter

Similarly, Õ#Ö�×�ØrÙ�ÕNÖ�Ú�Ø�ÛÜÕcÖ�×�Ù�Ú�Ø .Q.E.D.

This showsthat for finite point sets,templatesare equivalentto matricesand the inducedbinaryoperationson Ý�Þàßcá�â areequivalentto theinducedbinaryoperationson ã�äRå@Ö�Þ«Ø ; e.g. templateadditioncorrespondsto matrix addition, andtemplatemultiplication correspondsto Hadamard(pointwise)matrixmultiplication.

4.10 Template Products

According to Theorem4.9.6, if Ö�Þçæè8æIéêØ is a ring (or semiring), then ë1Ý'Þ ß á â æ�è8æ�éíì is also a

ring (or semiring).Theoperationsè and é on Ý'Þ ß á â arepointwiseinducedoperations.In Section4.8we observedthat undercertainconditionsthe operationsè and é canbe combinedto inducethe morecompleximage–templateproductoperator èé . This notion extendsto templatesaswell.

Suppose׺î®Ý�ï8ð�á ß , ÚfîêÝ'ñ ß á â , éóò�ïõôpñ÷öøÞ , ÖÞ#æ�è0Ø a commutativesemigroup,andX a finite

point set. Then the templateproduct ùxÛú× èéõÚ , where ùËî9Ý'Þ8ð�á�â , is definedasù�û1Ö�ü@ØRÛyýþ�ÿ�� Ö�×��@Ö�ü=Ø�é Ú�û1Ö � Ø�ØÌæ ��� î� ��� � ü�î���� (4.10.1)

By definition, the operator èé is a functionèé ò�Ý�ï ð á ß ôyÝ'ñ ß á â ö Ý'Þ ð á â �Pictorially we can view ù�ÛÔ× èé¨Ú as a functional compositionwith t appliedas a ñ –valuedtemplatefrom Y to X, followed by the ï –valuedtemplates from X to Z asshownin Figure4.10.1.

Y X�

Z�

t�

r�

Figure 4.10.1 Illustration of templatecomposition.

Similar to the computationof the image–templateproduct,it is generallynot necessaryto apply theglobal reduceoperator � in Eq. 4.10.1to all of X but only over a certainsubsetof X. For illustrationpurposeswe againusethe primary value sets � , ����� , and ������ .

190

Page 199: Image Algebra by Ritter

If "!$#&%�'�(�) and *!+#&% ) (�, , then for a given -.!/ define0�13254�6�798;: !�<>= 4 ! 0�2 �? 6A@�B�CA: !ED 2 * 1�6�F.G�4 !IHJ (4.10.2)

It follows that K? 254L6NM * 1�2&:O6P7RQwhenever

:TS! 0�132U4L6 . Hence, in order to compute V 7 XWY * , wecan use the formula

V 1 2U4�6�7 Z?\[^]`_`acbed ?

254L6fM * 1 2U:g6Lh (4.10.3)

where i?j[j] _ akbld ? 2&4�6�M * 1 25:g6EmnQwhenever

0 1 254L6o7qp.

The lattice product V 7 srt * is defined in a similar manner. For I!q#&% ' u�v ( ) , *w!T#5% )u�v ( ,and -.!/ define0Ox v1 2&4�6�798`: !y<>= 4 ! 0 x v 2 ? 6z@�B�{P: !ED x v 2 * 1 6�F.G�4 !�HJ (4.10.4)

Then V�!|#5% 'u�v ( , can be definedusing the formula:

V 1 2U4L6g7 }?j[j]�~;�_ akbld

� ? 2U4�6 W�* 1 25:g6��jh (4.10.5)

where V 1 2U4�6�7���� whenever0 x v1 254�6P7�p

.

The dual operation � 7 s�t * can be computedin termsof the formula

� 1 254L6�7 �?j[j] �_ acbed

� ? 2&4�6 W���* 1 2&:O6U��h (4.10.6)

where0 v1 254L6�7n8�: !�<>= 4 ! 0 v 2 ? 6z@�B�{.: !�D v 2 * 1 6�FnG34 !�H .

It follows from Eqs. 4.10.5and 4.10.6that the duality relation

s�t * 792 *K�Nrt ;� 6 �is preserved.It is alsonot difficult to verify that thesupportof V 1 , where V 7 XWY * or V 7 �rt * , is givenby0�2 V 1�6�7�8`4 !�Hq= 0�13254L6NS7�p�F or

0 x v 2 V 136g7n�`4 !�Hq= 0 x v1 254�6�S7�p��, respectively.Similarly, if� 7 s�t * , then

0 v 2 � 1 6�7��`4 !�HT= 0 v1 254L6NS7�p�� .For A!���#5%����v9( '�  ) and *P!���#5%¡���v9(K)   , , the lattice product V 7 rY * is definedby

V 1 2U4L6�7 }?j[j] _ a¢bed

� ? 254�6�£ * 1 25:g6U�¤h (4.10.7)

where0 1 254L6

is as in Eq. 4.10.2and V 1 2U4�6o7¥Q whenever0 1 2&4�6o7np

. The dual operator �Y can bedefinedeither in terms of duality by

�Y * 7 # * rY `( hor by the formula

V 1 2&4�6�7 �?j[j] �_ a¦bld

� ? 2U4�6¡£ �;* 1 25:g65�§h (4.10.8)

where V 7 �Y * .For manytemplatesaneasyway of computingthetemplateproduct V 7 �¨Y * is to usethefollowing

fact:

191

Page 200: Image Algebra by Ritter

4.10.1 Theorem. If ©�ª+«3¬­¯® , then ©�°�ª±« ¬­¯® °³²\´�µ¥©`°3¶5·�¸�ª+«e¹º�» ® °½¼The theoremfollows from the observation

©`°�¶U·L¸gª¿¾À�Á` « ¹º ¶�Ãg¸ÅÄ ® °3¶5Ãg¸�ªn¾À¤Á^ « À ¶5·�¸ÅÄ ® °3¶5Ãg¸�ª9¶Æ«ÈÇ­w® °�¸É¶5·L¸�Êand ¾À¤Á^ « ¹º ¶5Ãg¸ÅÄ ® °Ë¶&ÃO¸OªÌ« ¹º » ® °�¼Thereis nothingspecialaboutusing the operator Ç­ , the argumentis identical whenusing the generalproduct ¬­ .

4.10.2 Example: Suppose«¤Ê ®oÍ9Î5Ï�ÐKÑeÒ ÐKÑ are the following translationinvariant templates:

1 12

1

3

-1

s Á =yÓ t �

=yÓ

Then the templateproduct ÔÖÕØ×�ÙÚIÛ is the templatedefinedby

r Ü =yÝ1 2 1

36Þ

3

-1 -2 -1

If ߤà�á½âäã5åOæKçèÈéAê æKç aredefinedasabovewith values ë�ì outsidethe support,thenthe templateproduct íyînß�ïð á is the templatedefinedby

r =yñ2ò

3 2ò

4 5ó

4

1 0ô

In this particular example, the templates õäö�÷�øù�ú and ûnö�÷�üù�ú have the property thatýÈþ�ÿ�� õ����Pö ýËÿ�� û��������� �� and

û � ��� �gö � õ�� ��� ����� � � ý�ÿ�� û����� ������ "!$# �&% ('

192

Page 201: Image Algebra by Ritter

Thus,at eachpoint ������� the templates����and �� ��

are identicalexceptoff their support.The reasonfor this is that ����� ����� � the set ������������� �!���"�#� �%$ � is either empty or consistsof a single point.

The templatet is not an &('*)� –valuedtemplate.To providean exampleof the templateproduct� �+ �, we redefine t as

t ,

=y-1

3

1

Then .0/2143506 is given by

r =y71 2

81

3 69

3

1 28

1

Again,asfor theproducts :; and <; , it is easyto seethatthetemplates=?>A@ :BDCand E!>A@ <B�C

are identical exceptoff their respectivesupports,and that FHG�=JI�KL>MF�NOGPE�IQK .In orderto obtainanexamplewhere @ :; C

and @ <; Carenot identicalon their supports,we need

to usetemplatess and t suchthat R�SUTWV"XYF�Z"N�G�@\[*K"]^F�Z"N#G C I"K`_ acb for somepair of pointsx andy. Let s be as before and define t by

t d

=ye1

3 1

Then f0g2hijlkis given by

r m =ye2 3 2

4n

5o

4n

while pMg2hqjlkis given by

u r =ye2 3 2

4n

2s

3

193

Page 202: Image Algebra by Ritter

According to Theorem4.9.4, if t`u�vxw�vzy|{ is a ring (or semiring), then }"~`u����\��vzw�v�y�� is also a

ring (or semiring). The operationsw and y on ~�u � � � are pointwise inducedoperations.Moreover,

if ���M��� �Wv��J���"v������ and ���M������v��J����v*���Q� , then } ~�u � � � vPw�v�y � is isomorphicto the matrix ringt��������Qt�u�{�vPw�vxy|{ , where y denotesHadamardmultiplicationin thering �������Qt�u�{ . Now if ���A� , thent�� �����¡t`u�{�v¢w�v wy£{ is also a ring undergeneralizedmatrix multiplication (Eq. 3.14.15). This follows

from Example3.5.6. Thus, it is natural to ask about the relationshipbetween } ~ u �¤� � v¢w�v wyD� andt�� ����� t`u�{�v¢w�v wy£{ . Since } ~�u��¥� � vPw � and t�� ����� t�u�{�v¢w¦{ are isomorphicunder the map § definedby Eq. 4.9.1, we only needto investigatethe relationshipbetweenthe generalizedmatrix productandthe templateproduct.

Suppose��ª© wy0« , where ©�vP«^¬­~�u � � � . Let tx®�¯±°²{ ����� �´³!�µ§t`©¶{ , t�·`¯±°²{ ����� �ª¸¹�ª§tº«¶{ , andt�»\¯±°�{ ����� �½¼¾��³ wy¿¸ . Then for À�ÁªÂzvÄÿÁ´� we have

¨�ÅWÆÇt`�¦¯`{��AÈÉPÊPË t�©\Å*t`�¦¯`{�yÌ«�ÅJÆ�t`�Í{x{Í�ÎÈÏÐ`Ñ�ÒPÓxÔÇÕ¶ÖJÓ�×�ØxÙ�Ú�Û�Õ²Ü\Óº× Ý�ÙxÙHÞàßáÖ�â ÒPã�ØäÝÚ½å�Ýzæ¤Þ�ç�رæéèTherefore, ê Ó`Ô�ëÚ0Û¶ÙÍÞ ê Óíì�Ù�ÞAîcÞðïñëÚóò£Þ ê Ó`Ô¶Ù¦ëÚ ê ÓºÛWÙQèThis showsthat

êpreservesthe multiplication operation ëÚ .

It now follows that if ì�ô�Ô�ôPÛ�õ½ö�÷�ø¤ù ø , then

ì¥ëÚ¿Ó�Ô�ëÚ0Û�ÙéÞ ê�ú"ûWü±ê Ó`ì¤ëÚ¿Ó�Ô�ëÚ0Û¶ÙPÙíýÞ ê ú"û üþê Ó`ì�Ù ëÚ ê Ó`Ô ëÚ0ÛWÙ�ýÞ ê ú"û üþê Ó`ì�Ù ëÚ£Ó ê Ó`Ô¶Ù ëÚ ê Ó�ÛWÙPÙ�ýÞ ê ú"û ü Ó ê Ó`ì�Ù�ëÚ ê Ó`Ô¶ÙPÙ¦ëÚ ê ÓºÛ¶Ù�ýÞ ê ú"û üþê Ó`ì ëÚ�Ô¶Ù ëÚ ê ÓºÛWÙ`ýÞ ê ú"û üþê ÓxÓ`ì ëÚ¿Ô²Ù ëÚDÛWÙ`ýÞcÓ�ì ëÚDÔ¶Ù ëÚ0ÛÿèTherefore, ëÚ is associativein ö ÷ ø¥ù ø .

Also, ì ëÚ¿ÓxÔ ë ÛJÙÍÞ ê ú�û ü ê Ó`ì ëÚ£Ó`Ô ë ÛWÙxÙ`ýÞ ê ú�û ü ê Ó`ì�Ù ëÚ ê Ó`Ô ë Û¶Ù`ýÞ ê ú�û ü ê Ó`ì�Ù ëÚ Ó ê Ó`Ô¶Ù ë ê Ó ÛWÙzÙ`ýÞ ê ú�û ü Ó ê Ó`ì�Ù¦ëÚ ê Ó`Ô¶ÙPÙ ë Ó ê Óxì�Ù ëÚ ê Ó`Û¶ÙPÙºýÞ ê ú�û ü ê Ó`ì�ëÚ¿ÔJÙ ë ê ÓÄì�ëÚ Û�Ù�ýÞ ê ú�û ü ê ÓxÓxì ëÚDÔWÙ ë Ó`ì ëÚ0Û¶ÙPÙ`ýÞðÓxì ëÚDÔWÙ ë Ó`ì ëÚ0Û�Ù�èSimilarly, Ó`Ô ë ÛWÙ ëÚ¿ì^Þ´Ó�Ô ëÚDì�Ù ë ÓºÛ ëÚ¿ì�Ù . Hence, ëÚ distributesover ë in ö ÷ ø�ù ø .

This establishesthe following theorem.

194

Page 203: Image Algebra by Ritter

4.10.3 Theorem. If������������ �������

, then ������������� � �! �"$#&% ')( �+*,� ' �.- �! �" - is a ringisomorphism.

Sincein generalmatrix multiplication is not commutative,we have,in contrastto Theorem4.9.4,that �/���0�1� � 2�! �"$#

is not a commutativering evenif' � �! " - is a commutativering. However,if �

hasan identity with respectto"

, then �3���1� � alsohasan identity with respectto�"

. If 1 denotesthe

identity of � with respectto"

, then the template 4657��� � � � definedby

4�8 ' � - ��9;: <>= �$�@?A B�C D/EGFIH <KJ EML (4.10.9)

is the identity of ���0�1� � with respectto the operation�"

. This templateis alsocalledthe unit template

of � � � � � .

The image-templateproduct is closely related to the template–templateproduct. In order toinvestigateits relationshipto matrix multiplication, let

�N����� � ��� ��O� � �, P �Q��? � R� ���ST?SU/�

, andlet VW�� � % � �

and XY���Z % � Udenotethe vector mapsdefinedby V '\[ - � '\[]' � � - R�����^ []' � � -I-

and X '`_ - � ')_a' ? � - R�����^ _a' ?]U - - , respectively.For bc5d�3� � � Z set'�e)fhg - �+* U �jik� � ' b�- , _ � [ �" b ,

and l � ' l � ��� �S l U - � V '3[ - �" � ' b�- . Then

l g �nmop�q�r3st�uv,wxzy)v){�|Y}~p�q�r st\u�v�wxz�G����t�u�v�wM|Y}���)� st\uawRxQ������t3u!w!|Y�at��S{�w/�Thus, � t\s��x$�,w0| � t��aw0|��Rt\sw��x���t\��w (4.10.10)

or, since�

is one-to-one,

s��x$��| �a�O� t)�St\s]w��x���t\��w wO�It now follows that

t3s � �]w��x���|�t3s��x$��w � t����xW��wO� (4.10.11)

If � |�� , then ��| �and Eq. 4.10.10has form

�St\s��x���wM|Y�St\s]w��x���t\��w^� (4.10.12)

Hence,whenevers��6 !¡ and ¢¤£ ����¥3 �¡1¦ ¡ , we have that

�Rt\s��x�t ¢ �x���w wM|Y�Rt\sw��x���t ¢ �x��¤w|Y�Rt\sw �x@t��1t ¢ w �x���t\�§w w|�t��Rt�s]w �x���t ¢ w)w �x���t3��w|Y�Rt\s �x ¢ w �x���t\�§w|Y�Rt)t�s��x ¢ w0�x��§w^�Therefore, s �x�t ¢¨�x��¤w!|�t�s �x ¢ w �xW�M� (4.10.13)

The next exampledemonstratesthe utility of Eq. 4.10.13.

195

Page 204: Image Algebra by Ritter

4.10.4 Example: Suppose©«ª­¬�®�¯^°�±²¯T³ ´Mµ�¶ ³�·¹¸;º ¯^° º¼» ± ¸�º ¯^³ º&½a¾ , ¿�µ�À�Á , and µÄÃ�À0Å�Æ�Ç Å�Æ is definedby

r =y-4È

4È6

É9Ê

-6

-4 -6

-4

Ë/Ì�ÍÏÎÐ. Then accordingto Eq. 4.10.13,

Ñ�ÒÓ�Ô�Õ Ñ�ÒÓ@Ö�× ÒÓ�Ø,Ù0ÕÚÖ Ñ�ÒÓ�ק٠ÒÓWØMÛwhere

t Ü

=y7s Ý =y7 2 3 -2

283

-2

The constructionof the new image ÞWß>à&á6âãåärequiresnine multiplicationsandeight additions

per pixel (if we ignore boundarypixels). In contrast, the computationof the image ÞÄß>àæ á6âã�ç�è âã�érequiresonly six multiplications and four additionsper pixel. For large images

(e.g., size ê�ë¤ì�í�î�ê ë¤ì§í ) this amountsto significantsavingsin computation.

Boundary problemswill occur when convolving imagesdefined on finite arrays with templatesdefinedover the whole discreteplane ïð . Equation4.10.13holds for images á�ñ�ò�ó and templatesç,ô é ñ&õ�ò ó1ö ó . In particular,the equality á6âã æ ç âãWé�è à æ á�âã�ç§è âã$é

in the lastexampleneednot hold for

arbitraryç,ô é ñ õ3÷0ø�ù ö ø ù . As an example,suppose

ç¤ôIé ñ õ\÷0ø�ù ö ø ù are two translationinvariant templatesdefined by

t d

=yes ú =ye1

2

3 1 1 1

2 1

1 1 1

1

196

Page 205: Image Algebra by Ritter

Then ûWüþý�ÿ��� is given by

r =y-3 3 3

385�

2�

1 3 8 5�

1 4È

3 2�

1 1 1

3

Let ����� with � ������������� andvaluesnear(1,n) asshownin Figure 4.10.2.

2�

1 2�

3�

2�

4�

2�

0�113

�2�1 1 0

�2�

Figure 4.10.2 Part of the imagea near the cornerpoint(1,n) with the shadedcell representingthe point (1,n).

Now if ���! #"%$&(' , then �*)�+-,/.�01 23!4�576 498;:=<�>@?BAC3ED/FHGJI KMLE: "�)ONJP�,QNSRT0VU ' 3 P 6 W�: )ONXP�,�NXRY0@ [ZB\ since

1

1

1 1 1

34]3 8

r^ (_ 1,n) |X` =

On the other hand, if a�bdcfe=g�hi(jTk hi�l , then ame�nBo�p k crqBs since

(_1,n) |

X=st

1

2

197

Page 206: Image Algebra by Ritter

and

(1,u

n) |Xv =

1

2�

1

1

t,

Therefore, w%xy{zO| xy~}-��� z wxy�|�� xy�} .However, if

|Q���/}Q�����;����� �are defined by

|�� � |;�H� ��� ���J� and}Q� � };��� ��� ���m� (i.e.,

|Q� � � | � � � and} � � � } � � ���J� �� ), then w%xy � | � xy�} � � � � wxy(| � � xy�} � . Note that if � � � | � xy~} � , then

1

1 1

4 =r¡ (¢ 1,n)

2

284

Thus, £¥¤@¦§ £©¨�ªH«�¬ ­�®J¯ (e.g.,equality fails for points in X that areon the boundaryof X).

4.11 Spatial Transformations of Templates

Spatial transformationsare appliedto a templatein the sameway as they are appliedto any otherimage; if °~±�²;³ «µ´Y¶ and ·¹¸@º¼» ½ , then

£ § °�¾¿·%± ² ³ « ´9À (4.11.1)

is defined by

£9Á § °9Â�ª Á ¯SÃwhere Ä~±{º . The correspondingdiagramis given in Figure 4.11.1.

F

X

Z Y

tr

Figure 4.11.1 The spatial transformationÆÈÇÊÉÌËµÍ of the templatet.

198

Page 207: Image Algebra by Ritter

It follows that every spatial transform Î[Ï1ÐrÑ Ò inducesa unary operation Ó=Ô*ÕµÖY×ØÑ Ó;Ô�ÕµÖ9Ùdefinedby ÚµÛÜÚÞÝÞÎ#Ó;Ô Õ Ö × ÑßÓàÔ Õ Ö Ù . If f is a transformationfrom Z to X insteadfrom Z to Y, then

f inducesa unary operation Ó Ô Õ ÖY× Ñ Ó Ô Ù Ö¥× definedby ÚáÛ â , where

âTãåäæÚYãáÝ¿ÎèçJé�êëÒ¼ì (4.11.2)

Thus, â ãJí7îSï äðÚ ãñí Î í;îSï/ï ç î êòÐ .

There are obvious differencesbetweenthe transformationsdefined by Eqs. 4.11.1 and 4.11.2.Computationally,4.11.2is far morecomplexsincefunctionalcompositionhasto be performedfor eachpoint y. However,as the examplebelow illustrates,for translationinvariant templateswe only needto composeonce.

Spatialtransformationscanbe a useful tool for redefiningtemplates.For instance,the templatesÚQóand ô ó in Example4.8.4 wereobtainedusingspatial transforms.The next exampleillustratesa similarapplication.

4.11.1 Example: (Edge maskdetermination.) Edge information conveys image information and,consequently,scenecontent. Edgedetectioncontributessignificantly to algorithmsfor featuredetection,segmentation,andmotionanalysis.In a continuousimage,a sharpintensitytransitionbetweenneighboringpixels as shownin Figure 4.11.2(a) would be consideredan edge. Suchsteepchangesin intensitiescanbedetectedby analyzingthederivativesof thesignalfunction. Insampledwaveformssuchasshownin Figure4.11.2(b), approximationsto thederivative,suchasfinite differencemethods,areusedto detectthe existenceof edges.However,dueto sampling,high frequencycomponentsare introduced,and every pair of pixels with different intensitiescould be consideredan edge.For this reason,smoothingbeforeedgeenhancementfollowed bythresholdingafter enhancementarean importantpart of manyedgedetectionschemes.

a xõ ( )

xö 0xö

(a) (b)

x0

a xõ ( )

Figure 4.11.2 (a) Continuousimagewith edgephenomenon.(b) Sampledimagefunction.

The gradientof an imagea is definedin termsof directionorientedspatialderivativesas

÷ùø�úüû*ýÿþ�� ø ú;û�ý� û þ�������� ��� ��������������� ����� ����

199

Page 208: Image Algebra by Ritter

Onediscreteapproximationof the gradientis given in termsof the centereddifferences������� �"!$# ��� �&%�' � �( �*) �,+ # ��� � + ' � �( ��)��- � ' �.� �and �/��� ) �"! # ����� ( � ) %�' � ) �0+ # ����� ( � ) + ' � ) �- � ' �.)�� 1The centereddifferences

�/��� � �and

�*��� ) �can be implementedusing the templates

1

1

t ,

=y- s 2 =y--1

-1

The pixel valuesat location 35476�8.9:;8�<�= of >@?ACBand >D?AFE

arethe centereddifferencesG/6�8�9 =and G/6�8 < = , respectively(seealso Example3.6.6). This conceptforms the basisfor extensionsto varioustemplatesusedfor edgedetection.Variantsof the centereddifferencetemplatesarethe HJIKH templates

t Ü

=y7 s Ý =y71

-1

1 1

-1 -11-1

1

1-1

-1

which form smoothenedor averagedcentraldifferenceoperators.

Thetemplatest ands areorthogonal;oneis sensitiveto verticaledgesandtheotherto horizontaledges.We may view t ands ascorrespondingto evaluatingthe averagedderivativesin the 0Land90L direction, respectively.Evaluationof the derivativein directionsother than0L or 90Lbecomesnecessaryif oneis interestedin detectingedgesthat areneitherhorizontalor vertical.One simple way of obtaininga templatethat can be usedfor evaluatingthe averagedcentraldifferencein a desireddirection M is to simply rotatethe image NPO�QSR Q;T throughthe angle M andusethe resultingimagevaluesfor the weightsof the new template.For example,applying therotationf definedby Eq. 4.5.4to theimageN OUQ�R QVT with M = 90L resultsin theimageN O�Q�R QWT�X*Y whichis identical to the image Z O[Q�R QWT . Sinces is translationinvariant, the image N OUQ�R QVT0X\Y completelydeterminess. However,for angles M other than 90L the resultingimage N O]Q�R QWT^X_Y may not bea satisfactoryapproximationof the averagedcentraldifferencein that direction; for M = 30L theimage N OUQ�R QVT`XaY is basicallythesameas N OUQ�R QWT . Thereasonfor this is thesmallsizeof thesupport

200

Page 209: Image Algebra by Ritter

of bc�d�e dWf andassociatedinterpolationerrors. In order to obtain a more accuraterepresentation,one schemeis to enlarge the image b cUd�e dWf to the image

-1 -1 0g

1 1

11

1 1

11

1 10g0g0g0g-1

-1

-1

-1-1

-1

-1

-1

and rotate this image using linear interpolation. For h = 30i the resulting image jkUl�m l;nporq isof form

1 1

11

1

1

1

0s-1

-1

-1-1

-1

-1

-1

-0.73 0.13s-0.37

-0.87

-0.5 0.37s0.87s-0.13 0.73

s0.5s

The final tvu@t templater is obtainedby restrictingits supportto a twuxt neighborhoodof thecenterpixel location y, namely

0y 1

-1 -0.5 0.37y

0.5y

-0.37

-0.87 0.87yr =yz

While t will result in maximal enhancementof vertical or 90{ edges,r will be moresensitiveto 120{ edges.Likewise, rotation throughan angleof 60{ resultsin the template

0y 1

-1

0.5y-0.37-0.87

-0.5

0.37y

0.87y

s | =yz201

Page 210: Image Algebra by Ritter

which is sensitiveto 150} edges.

4.12 Multivalued Images

Although eachvalue a(x) of an image ~@�@��� is a uniqueelementof � , a(x) may be composedof valuesfrom severalvalue sets. For example,if �����"� , then a(x) is a vector of form ~����"�����~.� ���"�V�0� � ���*~ � �����W� wherefor each ���$�P�^� � ���W� , ~*���������5� . Thus,with eachvector-valuea(x) thereareassociatedn real values~ � ����� . A real vectorvaluedimagerepresentsa specialcaseof a multivaluedimage.

4.12.1 Definition. If � is a value set and � can be written as a Cartesianproductof value sets��� ���]�a� � � with ���$� , then � is called a multivaluedset. If � cannotbe written as sucha

product, then � is called a single-valuedset.

If ��� ���]��� �p� is a multivaluedsetand �"���7�"���¡     *�7� � , then � is calleda homogeneous

multivaluedsetor simply a vector-valuedset. A multivaluedsetwhich is not a homogeneousmultivaluedsetis referredto asa non-homogeneousor heterogeneousor mixedmultivaluedset.

If ~@�@�p� and � is a multivalued set, then a is called a multivalued image. If � is ahomogeneousmultivaluedset, thena is alsocalleda vector-valuedimage.

If ��� ���]��� � � and ~@�@� � , then a is of form ~¢�£��~ � �^� � �.�*~ � � where for each �w�¤�P��� � �a�S� ,~ � �@�p�� is givenby ~ � ��������¥ � ��~0�¦����� . Thus,everymultivaluedimagecanbeviewedasa vectorwhosecomponentsare single-valuedimages.

Conversely, if for �¢� �§�^� � �a�S� there exists an image ~ �7¨5© ª � � , then the collection« ~ �¬¨ �­�®�P�^� � ���;�°¯ determinesa multivalued image ~ ¨_© ª ���]��� � � which is definedby ~^���"�±���~ � �����W�°� � ���*~ � �����W� (seealso 2.5.7). This meansthat we can constructa multivaluedimagefrom anyarray of imagesdefinedover the samepoint set.

Another methodof forming multivalued imagesis throughfunctions that map a single-valuedset

into a multivaluedset. More precisely,if ~5�5²p� , where ² is a single-valuedset,and ³ ¨ ² ª ���´��� � � ,then f inducesthe unary operation

³0��~0�­�µ³v¶&~J�$· �¸�´��� � �º¹ ��»For example,if ~@�@� � and ³ ¨ � ª �@¼�½ � is definedby ³0��¾§�&�À¿�¾��Áw Ã��¾§��Ä , thenthe image ÅD�7³0��~0�hasvalues Å����"�\� ¿ ~^�����;�VÁ Â�à ��~0���"�Æ� Ä . This exampleis, of course,a specialcaseof the generalunaryoperationdefinedby Eq. 4.7.3. Obviously, any unary operationon single or multivaluedimageson agiven spatialdomain X is a function of the type describedby Eq. 4.7.3.

202

Page 211: Image Algebra by Ritter

SupposeÇÉÈËÊ�ÌÎÍ , where ÊKÏ ÐÑÒ]ÓaÔ Ê Ò and ÍÕÏ×ÖÑØ Ó�Ô Í Ø . Then f generatesa sequenceof functionsÇ Ø È�Ê�Ì Í Ø definedby Ç Ø ÏÀÙ ØrÚ Ç . Thus, every function ÇÕÈ&Ê�Ì Í inducesa unary operationÇ5È*Ê�Û®ÌÎÍÜÛ anda family of unaryoperationsÇ Ø ÈÝÊ­Û¡ÌÎÍ�ÛØ (asdefined by Eq. 4.7.3).

Conversely,givena sequenceof functions Ç Ø ÈPÊKÌÞÍ Ø , thenwe obtaina sequenceof inducedunaryoperationsÇ Ø È.Ê Û ÌßÍ ÛØ and a unaryoperation ÇCÈ.Ê Û ÌàÍ Û which is definedbyÇpá�â^ã"Ï7á�Ç Ô á�â0ãVä^å å åaäSÇ Ö á�â0ãWã/æ (4.12.1)

Equivalently, Ç0á�â0ã­Ï7ç§á�è&äWé�á�è�ã�ãvÈêé�á�è�ã­Ï7á�Ç Ô á�â0á�è"ãÆãWä�å å å�ä;Ç Ö á�â^á�è�ã�ã/ã*ëìæInducedunaryoperationscanbeconstructedfrom anevenlower level of specification.Supposethat

for someindexing function í@È*ç�îPä^å å å.ä.ïxë¬ÌðçËî§ä°å å å�ä.ñpë thereexistsa sequenceof functionsòÇ Ø ÈËÊ"ó`ô ØWõ Ì¤Í Ø ä@övÏ®î§ä^å å å�ä;ï¡æThenthe sequenceof inducedunaryoperations

òÇ Ø ÈËÊ Ûó`ô ØVõ Ì£Í ÛØ inducesa sequenceof unaryoperationsÇ Ø ÈPÊ Û Ì£Í ÛØwhich is definedby Ç Ø Ï òÇ ØìÚ Ù.óô ØVõ , where Ù.ó`ô ØVõ denotesthe projection Ù�óô ØWõ ÈPÊ Û Ì¤Ê Ûóô ØVõ . Obviously,

the sequence÷ òÇ Ø È\öøÏùîPä^å å å.äSïÉú also inducesa unaryoperationÇ5ÈPÊ Û ÌûÍ Û which is definedbyÇ^á�â^ã"Ï7á�Ç Ô á�â0ãWä°å å åaäSÇ Ö á�â0ãWã/æ (4.12.2)

Equivalently, Ç0á�â0ã"ÏÀü òÇ Ô Ú Ù�óô Ô õ á�â0ãWä°å å å.ä òÇ Ö Ú Ù�óô Ö õ á�â0ãþýÏÀü òÇ Ô üþâ�óô Ô õ ý§ä°å å å�ä òÇ Ö üþâ�óô Ö õ ý ý­æ (4.12.2)

For homogeneousmultivalued sets we obtain a special class of unary operations. Suppose Êand Í are homogeneousmultivalued sets, ï ÏÎñ , í denotesthe identity function í�á]ö�ãxÏ�ö , andòÇ Ô Ï òǧÿ�Ï������*Ï òÇ Ð . Then the inducedoperationf is calleda homogeneousunary operation, otherwisef is called a heterogeneousor mixedunary operation. If f is a homogeneousunary operationthen welet the coordinatefunction

òÇ Ò representf.

4.12.2 Examples:

(i) If â � á�� Ð ã Û and for �rÏ î§äaå å å�ä;ñ òÇ Ò Ï����ñ È�¢Ì�� , then

����ñ0á�â0ã­Ï7á�����ñ0á�â Ô ã;äaå å å�ä ����ñ0á�â Ð ãWã/æSimilarly, if for ��Ï îPä^å å å�ä;ñ òÇ Ò Ï������ , then

����� á�â0ã­Ï�ü������ á�â Ô ãSä°å å å�ä������ á�â Ð ã�ý"æNote that � ��� á�â0ã is a booleanvector valued image. For a booleanvector valued imageé Ïßá�é Ô ä^å å å�äSé Ð ã � á�� Ð ÿ ã Û , the booleancomplementof b, denotedby é�� , is defined asé�� Ï$á�é��Ô ä^å å åaäSé��Ð ã , wherethe ith coordinateé��Ò is definedby Eq. 4.4.5.

203

Page 212: Image Algebra by Ritter

(ii) Supposen is an even positive integer and ��������� "! . For #�$&%�')(�(�(*' � + and ,-��� define./ +�0 ��,1 2$3, + and./ +�05476 �",1 8$3, . Then/ �9� :$<;=� 6 '>� ++ '(�(�(*'>� � 4 6 '?� +�A@CB

(iv) Define/ 6�D � +FE � by

/ 6 ��G'>HI J$LK�#"M)��G* ONQPSRTK�UV��HI and/ +WD � +FE � by

/ + ��G'XHI Y$PSRTKZ��GV [N�K�#9M*UV��HI . Then the inducedfunction/ D ; � + @ ! E ; � + @ ! given by

/ $\� / 6 ' / + .Applying f to an image �]��;9� + @ ! resultsin the image/ �"�) ^$`_A�"aC'>b[�"a[ � D b[�9a: ^$c�"K�#"M)��� 6 �9a: � *NdPSRTK�U*�9� + �"a[ > >'�PSRTKZ�"� 6 �"a[ > *NeK�#9M*U*��� + �9a: � ? X'faJ�hgji BThus,if we representcomplexnumbersaspointsin � + anda denotesa complexvaluedimage,then

/ �9� O$�K�#9M)�"�) , wheresin denotesthe complexsine function.

(v)Supposekl$ �m0on76 k 0 and p$ qmr n*6 k)s"t , where _vu 6 '9u + '*(�(�(*'9u q i2w`_x%1'zyI'(�(�( 'XM)i with u 6|{ u +|{}�}�} { u q and k s t denotesthe u r�~>� factor of k . Define� s>�os"������� s�� D k E pby � s � s � ����� s � ��, 6 'X, + '(�(�( 'X, � :$���,vs � 'X,�s � '(�(�(�'X,�s � 'where , 0 ��k 0 and ,�s=tY�ck)s"t .The map � s��5s=�z����� s�� deletes Md��� componentsfrom an elementof k . Since for � $ %� s � D k E k s � , the function � s � s � ����� s � generalizesthe notion of the ith projectionfunction.

The inducedunary operation� s���s"������� s�� D k ! E p ! deletesMY��� imagecomponentsfrom avector valued image ���ck ! .

The generalframework for binary operationson multivalued imagesis similar to that for unary

operations.Suppose� D��d� p E k , where � $ �m0on*6 � 0 , p�$ �m0on*6 p 0 , and kl$ qms n*6 k s . Then the binary

operation � generatesa sequenceof binary operations� s D:��� p E k s definedby � s $ � s�� � ;i.e., �f� s b`$ � s �9�2��b[ . Thus, every binary operation � D���� p E k inducesa binary operation� D�� ! � p ! E k ! and a family of binary operations

�-s DA� ! � p ! E k !s BConversely,given a sequenceof binary operations� s D7�l� p E k s , then this sequenceinduces

a sequenceof binary operations� s D*� ! � p ! E k !s and a binary operation � D� ! � p ! E k !which is definedby

�8��b-$��"��� 6 b�'>��� + b�'(�(�(�'>��� q b[ 7'� ��� � ! and� b3��p ! .

As for unary operations,binary operationscan also be induced from coordinate level binaryoperations. Supposethat for someindexing function � D _�%A'(�(�( ' �hi E _x%1'7(�(�(*' M)i � _�%A'7(�(�(*' �Iithere existsa sequenceof binary operations.� s DA��� �9� �Z��sz¡5¡ � p � �z� �Z��sz¡5¡ E k s B

204

Page 213: Image Algebra by Ritter

Then the sequenceof induced binary operations ¢£-¤]¥§¦�¨©�ª"«o¬T« ¤X­o­¯®]° ¨©X±?«²¬T« ¤z­5­´³ µ ¨¤inducesanother

sequenceof binaryoperations£ ¤ ¥A¦ ¨ ®¶° ¨ ³·µ ¨¤

, which is definedby ¸ £ ¤I¹-º ¸ © ª «o¬T« ¤z­o­ ¢£ ¤ ¹ © ± « ¬Z« ¤z­5­» ¸d¼ ¦ ¨ and» ¹ ¼ ° ¨ . This new sequencethen inducesthe binary operation

£ ¥*¦ ¨ ®e° ¨ ³½µ ¨which is defined by

¸ £ ¹-º�¾ ¸ £�¿ ¹�À ¸ £dÁ ¹�ÀÂ�Â�Â�À ¸ £�à ¹:Ä*ÅEquivalently, we have that

¸ £ ¹YºÇÆ ¸ ©�ª�«o¬T« ¿ ­È­ ¢£ ¿ ¹ ©S±�«o¬T« ¿ ­È­ ÀVÂ�Â�Â�À ¸ ©�ª"«²¬Z« à ­�­ ¢£ à ¹ ©�±?«²¬Z« à ­�­ÊÉ Å (4.12.3)

In analogy with unary operations,if Ë ºLÌͺLÎ,¦ À °

andµ

are homogeneousvalue sets,¢£eÏ º ¢£-¤ »VÐ ÀÊÑ ¼eÒÓÔ , and Õ ¾5Ñ�ÄÖº�¾�Ñ�À"ÑIÄ »7Ð À"Ñ ¼eÒ)ÓÔ , then the inducedoperation4.12.3is said to be ahomogeneousbinary operation.Otherwise

£is calleda mixedor heterogeneousbinary operation.If

£is a homogeneousbinary operation,thenwe let the coordinateoperation ¢£ ¤ representthe operation

£.

4.12.3 Examples:

(i) If ¸ ÀX¹ ¼ ¾�× Ô Ä ¨ and forÑJº3Ø1ÀÂ�Â� ÀXÌ ¢£Ù¤ ºÇÚ

, then

¸ Úe¹-º�¾ ¸ ¿ Úd¹ ¿ ÀÂ�Â�Â�À ¸ Ô Úe¹ Ô Ä ÅSimilarly,

¸fÛ ¹Yºc¾ ¸ ¿ Û ¹ ¿ À*Â�Â�Â7À ¸ Ô Û ¹ Ô ÄIÀ¸8Ü ¹-º�¾ ¸ ¿ Ü ¹ ¿ ÀVÂ�Â�Â*À ¸ Ô Ü ¹ Ô Ä7À

and ¸8Ý ¹-º�¾ ¸ ¿ Ý ¹ ¿ ÀVÂ�Â�Â*À ¸ Ô Ý ¹ Ô Ä7ÅIf Þ º�¾�ß ¿ ÀÂ�Â�Â7Àvß Ô Ä ¼ × Ô , thenaccordingto Eq. 4.3.3 we also have

Þ Ú ¸ º�¾�ß ¿ Ú ¸ ¿ ÀÂ�Â�Â*ÀXß Ô Ú ¸ Ô Ä ÀÞ|ÛS¸ º`¾�ß ¿ ÛS¸ ¿ ÀÂ�Â�Â�ÀXß Ô ÛS¸ Ô Ä À

etc.

In the special casewhere Þ ºà¾"ßTÀXßZÀ Â�Â�Â7ÀvßTÄ, we simply use the scalar

ß ¼ ×and defineß¯Ú ¸]áÇÞ Ú ¸ Àâß ÛT¸FáÇÞâÛT¸ , and so on. Of course,theseoperationscan be generalizedto

combinea scalarof any multivalueset Þ ºc¾"ß ¿ ÀÂ�Â� Àvß Ô Ä ¼ µ º ÔãÏoä ¿ µ Ï with an image ¸å¼ µ ¨ .

(ii) Supposethat forÑYº�ØAÀÂ�Â�Â*ÀXÌ

,£ ¤ ¥ × Ô ® × Ô ³ ×

is definedby¾�æ ¿ ÀÂ�Â�Â�ÀXæ Ô Ä £ ¤ ¾�ç ¿ ÀÂ�Â� ÀXç Ô ÄCº Ë´è æ*é�æ Ï Ü ç ¤ ¥ Ø�ê Ð êJÑ�ëCÅThen for ¸ Àv¹ ¼ ¾�× Ô Ä ¨ and ì º ¸ £ ¹

, the componentsof ì ¾"í[Ä�ºÇ¾ ì ¿ ¾"í[ÄXÀVÂ�Â� À ì Ô ¾9í:Ä�Ä havevalues ì ¤�¾"í[Ä^º ¸ ¾�í[Ä £ ¤^¹[¾"í[Ä^º Ë´è æVé ¸ Ï9¾"í[Ä Üf¸ ¤�¾�í[Ä ¥ Øâê Ð êeÑIëfor

ÑîºïØAÀÂ�Â�Â�ÀXÌ.

205

Page 214: Image Algebra by Ritter

(iii) Let ðeñ and ðdò be two binary operationsof ó òâô ó ò�õ ó definedby

ö"÷ ñTø ÷ ò�ù ð ñ ö�ú ñTø ú òSù:û ÷ ñ ú ñOü ÷ ò ú òand ö"÷ ñTø ÷ ò�ù ð ò ö"ú ñTø ú ò�ù:û ÷ ñ ú òþý ÷ ò ú ñ^ÿNow if � ø ����� ó ò��� representtwo complex valued images,then the product û �åð �representspointwisecomplexmultiplication, namely

ö�� ù:û ö � ñ ö � ù � ñ ö � ùü � ò ö�� ù � ò ö�� ù>ø � ñ ö � ù � ò ö�� ù*ý � ò ö�� ù � ñ ö�� ù�ù�ÿBasic operationson single and multivalued imagescan be combinedto form image processing

operationsof arbitrary complexity. Two such operationsthat have proven to be extremelyuseful inprocessingreal vector valued imagesare the winner take all jth-coordinatemaximum and minimumof two images. In order to define thesetwo special operations,let �����âó õ ó � be defined by� � ö�� ù:û ö�� ø � ø������ ø � ù . Now if � ø ��� ö ó � ù � , thenthe jth-coordinatemaximumof a andb is definedas

����� � � û �! ����#" $%� ��&('*) ö � ù ��+ ý � ����," $-� ��&�'�) ö � ù ��.�+ ø (4.12.4)

where /10�23054 .

The jth-coordinate minimum is definedas

��6�� � � û �! ����#" $-� �7&98*) ö � ù �+ ý � ����," $-� ��&�8�) ö � ù ��. + ø (4.12.5)

where /10�23054 .

An easyinterpretationof the imagesdefined by Eqs. 4.12.4and 4.12.5 is given by the followingequivalentstatements

�:�;� � � û=< ö�� ø ö�� ù>ù �9 ö�� ù^û � ö�� ù?>A@ �B� ö�� ùDC � � ö � ù>øFEHGJILKMJNO>QPRK ö � ù:û � ö�� ùTSand �:6�� � � ûU< ö�� ø ö�� ù>ù �9 ö�� ù^û � ö�� ùV>W@ � � ö � ù 0 � � ö � ù>øFEHGJIBKMJNO>QPTK ö � ù:û � ö�� ùJS[ørespectively.Sinceit is possiblethat for some

� �YXthe pixel value � � ö�� ùCû � � ö � ù , the operationsof

jth-coordinatemaximumand minimum are not commutative.

The next exampleillustratesan applicationof a jth-coordinatemaximum.

4.12.4 Example: (Directionaledgedetection). The outputof this directionaledgedetectiontechniqueis a two-valuededgeimagein which eachpixel hasan intensity valueas well as oneof eight

206

Page 215: Image Algebra by Ritter

possibledirectionalvalues.In this particularscheme,a gray scaleimageis convolvedwith thefour Z\[�Z translationinvariant templatesshownin Figure 4.12.1

t](0) =^

(1) =^

t]

(2) =^

t]

(3) =^

t]

1 1 1

-1 -1 -1

-1

-1

-1 1

1

1

1

1

1

-1

-1

-1

-1

-1 -1

1 1

1

Figure 4.12.1 The four directionaledgetemplates.

The resulting four imagesare then fused to form a single two-valuedimage e. Data fusionis accomplishedby assigningto the resultantpixel the value of the largest magnitude(i.e.the largestabsolutevalue) of the correspondingpixels in the four imagesand the direction _associatedwith the templatewhich yieldedthe largestmagnitudeif the pixel value is positive,or _a`cbdHeHfgihkj-lHmHenf if the value is negative.Thus,eachpixel locationof e hasboth an edgemagnitudeandanedgedirectionassociatedwith it. It is customaryto usetheintegers0 through7to representtheeightdirections0f through315f , respectively.Theaddition“ _V`�b�dne f gohkjplnmHe f ”then becomesaddition modulo eight, namely“ qr`tspgohkj-d .”The imagealgebratranslationof this algorithm is as follows. Let uwv�x1yzx1{}|�~ be definedby u������!����� �B���Jsk�(�*�����n�R� , then��� v�����eL��q���`�uV� � `��� �JqR�R� for qa��eL��bn���B��l , and� v����R�,��������W��� � � .Hereeach ��� is a vector valuedimageof form ��� ���D� �¡� ��� � � �F�J� ����¢ � �F�R� . More specifically,if£ � vA� � `��� ��qT� , then

� � ���D���¥¤ �� £ � ���D�����Ts¦`§q��©¨Wª £ � ���D�D«¬e� £ � ���D�J�­q � ¨Wª £ � ���D�D®¬e ¯Note alsothat ��eL��q ��`�u�� £ � � is simply the scalaradditionof a vectoranda vectorvaluedimageasdescribedin Example4.12.3(i). Since �R�O� � �������� ��� �=�J� � � �:� � � � �p�°� � �?¢ �p�:� � � � , it alsofollowsthat � ���F�±� ��² � �F� , where �³² � ���D�´® � � � � �F� for q¦�µbH���B��l and k denotesthe smallestintegerfor which � ² �����D�°® � � �����D� .

It shouldbeobviousby now thatmultivaluedimageoperationsarespecialcasesof imageoperationsbetweendifferent valuedimagesas discussedin earlier sectionsof this chapter. For example,suppose

207

Page 216: Image Algebra by Ritter

that for ¶1· ¸k¹Vº�º�º³¹J» , each ¼7½D¾�¹R¿-¾ À representsa commutativesemigroup. Let ½Á· ÂþWÄVÅ ½�¾ , andÆ ·Ç¼�È�Å�¹Vº�º�º�¹�È Â À and Éw·Ê¼�Ë�Åk¹Vº�º�º�¹�Ë Â À denotetwo arbitrary elementsof ½ . Then for finite pointsetsthe binary operation ¿cÌͽ�ÎϽÑÐ ½ definedbyÆ ¿VÉ ·c¼RÈ Å ¿ Å Ë Å ¹Vº�º�º�¹�È Â ¿ Â Ë Â Àinducesa global reduceoperation Ò=ÌV½FÓÔÐÕ½ defined byÒ³Öi·c¼RÒ-×pÖ�Åk¹Vº�º�º�¹�ÒnØVÖ Â À³¹where Ò%Ù9Ì�½�Ó¾ Ð ½ ¾ is definedby Eq. 4.3.12. If ½ is homogeneousand ¿U·Ú¼�¿ Å ¹?º�º�º³¹J¿  À is alsohomogeneous(i.e., ¿-¾9·Ú¿nÛÝÜ?¶J¹�Þ�ßÑàp¸H¹Vº�º�º�¹�»�á ), then Ò is called a homogeneousreduceoperation,otherwiseÒ is said to be a mixedor heterogeneousreduceoperation.If Ò is homogeneous,thenwe letÒ�¾ representÒ . For example,if ¼�½r¾R¹J¿-¾�À#·c¼�âO¹�ã(À for ¶D·3¸H¹Vº�º�º�¹�» , ÖYß�¼�â  À Ó , and ä\·æåç-ÈkèB¼7é}À , thenê Öi·=¼ ê Ö³Åk¹?º�º�º³¹ ê Ö Â À·ÇëìîíïÛTijŠֳż�ð�Û�ñ�¹Vº�º�º?¹òíïÛJÄ?Å Ö Â ¼�ð³Û�ñ�óôõßYâ ±öIn contrast,the summation Â÷¾WijŠÖ�¾,· Â÷¾WijÅHø ¾ ¼�Ö�ñ±ßÏâ Ó sinceeach Ö�¾ ßtâ Ó .

In order to providean exampleof a mixed reduceoperation,let ½1·câ1Î}â , ¿LÅa·=ã , and ¿-ùa·¡ú .Then for ÖU·Ú¼�Ö³Å�¹JÖ³ù�ñ!ß�û�â ù�ü Ó , we have

Ò�Öi·c¼ ê Ö Å ¹�ú�Ö ù ñ�·ÇëìîíïÛTÄ³Å Ö Å ¼ ð Û ñ�¹!íýÛJÄ?Å Ö ù ¼�ð Û ñ�óôÚß�â ù ö4.13 Multivalued Templates

A templateþ�ßcû ½rÓ üÿ is calleda multivaluedtemplateif ½ canbe written asa Cartesianproduct½Ç· ÂþWijŠ½r¾ with »�� ¸ . In this case t is of form þÑ· ¼�þ�Åk¹Vº�º�º�¹­þ  ñ , where þ¾Ïß©û ½ Ó¾ ü ÿ andþ��\·c¼�þ���� �?¹Vº�º�º�¹Jþ��� � ñ . If ½ is a homogeneousvalue set and þ�Å�·�þ�ù · ��\·�þ  , then t is calleda homogeneoustemplate,otherwiset is said to be a heterogeneoustemplate.

Since templatesare specialtypesof images,conceptsand propertiesof multivaluedimagesapplyto multivalued templatesas well. Specifically, operationson multivalued imagesare also operationson multivalued templates. The only operationnot discussedin the multivaluedsetting is the productoperator ¿ .

Templateproductsof multivalued templatesare governedby Eqs. 4.8.1 and 4.8.2. As for binaryoperationson multivalued images,an image-templateproduct of a multivalued image and templateinducesa sequenceof image-templateproductson the coordinatelevel, and productson the coordinatelevel induceproductsbetweenmultivaluedimagesand templates.More precisely,suppose¼R½,¹J¿�ñ is a

commutativesemigroup,where ½ · �ÃÛJÄ?Å ½�Û , and ¿ denotesthe operator ¿ Ì���ӥΠû��´Ó ü�ÿ Ð ½ ÿ208

Page 217: Image Algebra by Ritter

inducedby ������������� . Then � is of form �! #"$�&%('*)�)�)+'��-,/. and 01 #"�02%('*)�)�)�'$03,4. , where�-56�7���8���9�:5 and 0�5;�2�:5<���=5;�9�:5 . Thus 0� inducesa sequenceof products0� 5 ���>?�A@B�C>EDGFH��� F5 'where 0� 5 is inducedby � 5 and 0 5 .

Conversely,if for eachIJ LK'*)�)�)�'$MN"O� 5 'P0 5 . is a commutativesemigroupand � 5 ��Q���R�S� 5 ,then we obtain a sequenceof inducedproducts0� 5 ��T>R� @ �C> D FH��� F5QUThus, if VXW&� > and YZW @ � > D F , then the image [� LV 0� 5 Y is definedby[\"B]^.� `_ 5 "BVJ� 5 Y�a�.or, equivalently, by [\"B]^.b c"dV*"�e % .f�15:Y a "de % .$.d0�5-g�g�gh0�5�"BV:"Beji+.*�15=Y a "de*i2.P.k'where lm on�p3q(rk"ts�. .

If �u ivwyx % � w and �z {vwyx % � w , then productscan also be inducedfrom coordinatelevel products.

Following the methodusedfor obtaininginducedbinary operationson multivaluedimages,supposethatfor someindexing function |`�^}~K�'j)�)�)f'�M��8� }~K'*)�)�)�'+lT�J�A}K�'*)�)�)f'��k� there existsa sequenceofbinary operations �� 5 ��T���d����� 5���� ���������y�(� 5���� �N� 5 UThen we obtain the operators�0� 5 �~�b>���d����� 5���� �8"�� >�������(� 5���� . F �o�T>5 "yIJ LK'f)�)�)f'�M�.j' (4.13.1)0� 5 �~� > �8"�� > . F �o� >5 "yIJ LK'f)�)�)f'�M�.j' (4.13.2)

and 0���~� > �1"O� > . F �o� > U (4.13.3)

The operator

�0� 5 in Eq. 4.13.1 is inducedby

�� 5 and 0 5 as definedby Eq. 4.8.1. The operator0� 5 in Eq. 4.13.2 is definedby V 0� 5 YC `Vk� � �y�(� 5$��� �0� 5 Y�� � ����� 5���� ' (4.13.4)

and the operator 0� (Eq. 4.13.3) is definedbyV 0�-Y� c"dV 0� % Y'*)�)�)j'PV 0� , Y�.k' (4.13.5)

whereeach 0� 5 denotesthe operationdefinedin Eq. 4.13.4. Note that if [Q cV 0�1Y , then[\"B]^.� c"O_T%*"dVJ��%*Y�af.$'*)�)�)f'�_�,�"dVJ�X,�YGaj.�. @B_ % @ V � � ���(� % �y� �� % Y � � ���(� % �y��� a D 'f)�)�)f' _ , @ V � � �y�(� , ��� �� , Y � � �y�(� , ���t� a D�D 'where _ 5 @ V ���d����� 5���� �� 5 Y ���P�y�(� 5$���t� a D ���Vk� � �y�(� 5���� "�eT%�. �� 5 Y�� � ����� 5$����� a "de=%�.� �0 5 g�g�gh0 5 ��Vk� � �y�(� 5$��� "�e:¡(. �� 5 Y�� � ���(� 5��y�t� a "de=¡�.B  U

If �E'¢� , and � are homogeneoussets, M £l¤ 9� , and both 0¥ !"B0 % '*)�)�)f'$0 , . and

�� @ �� % '*)�)�)f' �� , D are homogeneousoperations,then 0� is called a homogeneousproduct operation,otherwise 0� is called a mixedor heterogeneousproductoperation. If 0� is a homogeneousproductoperation,then we represent 0� by

�0� 5 .Left productsandproductsbetweentwo multivaluedtemplatesaredefinedin a similar fashion.

209

Page 218: Image Algebra by Ritter

4.13.1 Examples:

(i) Suppose¦X§c¨R§`©X§«ª�¬�ª�­f® so that ¦^¯4§`¨/¯4§°©\¯4§°ª and ¦²±³§c¨/±´§«©�±�§`ª\­f® . Letµ¶ ¯Z· ¦�¯<¬X¨<¯¹¸º©�¯ andµ¶ ±Z· ¦�±/¬&¨/±J¸º©\± denotemultiplication and extendedaddition,

respectively. If we usethe semigroupstructure »B©³¼�½*¾ , where ½X§�»$¿6¼�À�¾ , then we obtain theheterogeneousimage–templateproductÁ ½¶- §c» Á ¯ ¿¶X ¯ ¼ Á ± Àà  ± ¾f¼where Á §#» Á ¯ ¼ Á ± ¾´ÄQ»OªX¬�ª ­f® ¾BÅ and

 §L»  ¯ ¼  ± ¾´ÄmÆ�»OªX¬�ª ­f® ¾dÅEÇ�È .

In particular, if

-1

-1

-1 1

1

1 0É0É

0É0

Ét]

2, yÊ =t]

1,yÊ =

then the first coordinateof ËZÌÍ-Î representsa vertical edge enhancementand the secondcoordinatea dilation or local maximization.

(ii) Supposethat Ë8Ï�ÐTÑ ,ÎXÒÔÓdÎ�Õ(Ö*×�×�×+Ö$Î�Ø2Ù Ï�Ú Ó Ð Ø Ù ÑEÛ�Ü , and

Í Ý ÐcÞ�Ð Ø�ß Ð Ø denotesthebinary operationof scalarmultiplication of n-dimensionalvectors. If

Ó�àhÖ Ì ÙáÒ#Ó Ð Ø Ö�â�Ù , where+ denotesvectoraddition, thenwe obtain the homogeneousimage–templateproductË âÍXÎ�ÒcÓ Ë âÍ1Î�ÕÖ*×�×�×�Ö Ë âÍXÎ�Ø+Ù Ï Ó Ð Ø Ù Üwhich turnsa single-valuedimageinto a vector-valuedimage.Thevalueof theimage ã Ò Ë âÍ&Îat a point ä&Ïæå is given byã Ó ä ÙbÒzçèé Ñ Ë ÓBê\Ù�ëGÎ�ìfÓ�ê�ÙÒzçèé Ñ Ë Ódê�Ù�ë�ÓBÎ�Õ�í ì+Ó�ê�Ù�Ö*×�×�×�ÖPÎ�Øí ì+ÓBê\Ù$ÙÒ çèé Ñ

î Ë Ó�ê�Ù�ë�Î Õ�í ì Ódê�Ù$Ö*×�×�×fÖ Ë Ó�ê�Ù=ë�Î Ø�í ì Ó�ê\ÙBïÒñðáçèé Ñ Ë ÓBê\Ù�ë�Î�Õ�í ì+ÓBê\Ù$Ö�×�×�×fÖ3çè�é Ñ Ë ÓBê\Ù�ë�Î�Øí ìfÓ�ê\Ùtò«ó

4.14 The Algebra of Lists

A commonactivity in computervision, and computersciencein general,is the arrangementandrepresentationof datain someorderedfashion.Theorderingusuallydependson both, theparticulartaskat handaswell asthepropertiesof thedata.Oneof themostutilitarian of suchordereddatastructuresare

210

Page 219: Image Algebra by Ritter

lists. In this sectionwe defineseveralbasicconceptsassociatedwith lists andshowhow theseconceptsfit into the larger frameworkof image algebra.

Given a set ô , a list over ô is a finite sequenceof elementsof ô . Suchlists aredenotedby anglebracketscontainingthe ordered,commaseparatedelements.For example,õ�ö÷$ø2÷�ù2÷�ú~÷$û3ürepresentsthe list over the integerscontainingelements1, 3, 5, 7, and 9 in that order. The emptylist,containingno elements,is denotedby

õ�ü.

More formally, a list over the set ô is an elementof the setô²ý�þºÿ������ ô���� ÷where we define � þ� so that ô � � þ�� õ�ü�� .

If ���Xô ý , then ����ô � � for some ����� and ���������&ô for �hþ � ÷�ö�÷"!#!$!f÷ �&% ö . It is customarytodenotethe elements�'�(�)� of L by �+* andto specifythe function l by enumeratingthe �+* ’s usingthe naturalorder of � . That is, we define �,*�-.�'�(��� and specify l by �^þ õ � � ÷ �,/ ÷0!$!#!f÷ � �21 / ü .

Since lists are images,namely functions from a point set to a value set (seeTheorem4.14.1),many of the conceptsdefined previously apply to lists as well. For example, the length of a list�³þ õ � � ÷ � / ÷0!#!$!j÷ � �31 / ü , which is denotedby 45�64 , is defined as the numberof elementsin the sequencedefining l. Hence 47�84 can be computedusing the following statement:45�84:9�þ<;>=@?#ACBDAFE�GH=F�(�I���'�KJ3LNote that if �^þ õ�ü , then 4 õ�ü 4<þM� , and if �^þ õ � � ÷ �K/ ÷0!#!#!+÷ � �31 / ü , then 45�84<þ.� .

The fundamentalbinary operationon ô ý is concatenation.The concatenationoperator N joins twolists together. If, for example,if l is the list �³þ õ � � ÷0!#!$!�÷ �+O ü and �+P denotesthe list �KP^þ õ �KP� ÷0!$!#!f÷ �QP� üthen �RN@� P denotesthe list õ � � ÷S!$!#!+÷ �KO ÷ �KO6T�/ ÷0!$!#!�÷ �KO6T � T�/ üj÷where � O>TC* þU� P* 1 / for �6þ ö�÷V!$!#!f÷ �XW ö . It follows that

õ�ü NF��þU�YN õ�ü þU� for any �Z�cô ý and that45��N7�KP'4-þ[45�64\W]45�KP�4 .Since concatenationis associativeand the empty list acts as an identity under the operationof

concatenation,we have the following result:

4.14.1 Theorem. �Oô ý ÷ N>� is a monoid.

4.14.2 Definition. Two lists � ÷ � P ��ô ý aresaidto be rangeequivalentwhenever?2=F�@^"_2���'�bþ`?2=a�"^b_c��� P � .Two lists l and � P are said to be equivalent if 45�84`þ 47� P 4 and there exists a permutationd 9eef�ghfjiklf(gmf such that �mnFo *,p þq�KP*�r �s�<lf(gmf .

Obviously,equivalenceimplies rangeequivalencewhile the converseneednot be true.

For a given string �t��ô ý andan arbitraryelementuX��ô , the occurrencenumberof x in l, denotedby �I��u ÷ ��� , is definedas �I�vu ÷ �w��þx;7=F?2A�ym� 1 / ��u��(z . Thusthe occurrencenumbertells the numberof timesan elementof L occursin a string l.

211

Page 220: Image Algebra by Ritter

4.14.3 Theorem. {|$}�~��I���I�v�'�j���7�8�I�Proof: If ������#� �C���c����� , then �I�)�I�6���\� � . Therefore�|2}2~ �I���I�6����� �|2}#�v�8�7�5�8����� �I���I�8���"�Let �����7�8� and � �" 2�"�"¡$�0¢$¢#¢��"�@£¥¤¦� �2� �"�b�c����� . If �C§¨��M�F© , then

�'ª   ��� § �S«&�'ª   ��� © ����¬��for otherwisethereexistsan integer ­ � � ª   ���@§'�S«&� ª   ����© � , which meansthat contraryto ourassumptionwe have � § �U�'� ­ �®�U� © .Since £¯§,°�  �'ª   �(�b§��l�<± � �it follows that ² � ª   ���b§(�¦³Z´R�¶µ3�"·@�0¢$¢#¢C�"¸º¹ is a partition of ± � . Therefore,

�5�8���<�X�x» �F�#¼ ��± � �Y�`» �F�2¼¾½ £¯§,°�  � ª   ���b§(�(¿�<» �F�2¼tÀ �'ª   ���" $��Á�Âû �F�2¼eÀ �'ª   ���C¡$��ÁÄÂUÅ$Å#ÅIÂÆ» �F�2¼eÀ �'ª   ���b£¨��Á� �|2}cÇ'|2È'É |#Ê�ÉÌËÌËÌË É |2ÍVÎ �I���I�6�w�"�Q.E.D.

The basicunary operationon lists is the projectionmap Ï § definedbyÏ §'�(�'�l�ÑÐ¦Ò �+§(Ó[Ô,ÕÆ�®Ö`´R׶�7�8�Ò Ó Ô,ÕÆ´YØ.�6�8�t� (4.14.1)

where ´ �ÑÙ .

List projectionsbelongto a classof importantunaryoperationson lists thatdo not increasetherangeof a list. Specifically,a function

� ³3Ú�Û�ÜÝÚÄÛ is calledrange-limitedif�2� �b�"�cÞ � �(�'�(ß0à �2� �b�"�c���'�qá\� � ÚÄÛ .

Range–limitedmaps can be conveniently defined in terms of a parameterizedprojection mapÏ ³ Ù ÛRâ Ú Û ÜãÚ Û which is definedasfollows: For each �(äå�6�'� �æÙ Û�â Ú Û , with ä¥� Ò ä7ç3�I¢#¢#¢C�6ä$è2Ó , defineÏ �(äå�8���l� Ï"é�ê �����SÅ ÏCé È �(�'�tÅRÅ#Å#ÅeÅ ÏCé(ë �(���b� (4.14.2)

It will be convenientto usethe notation � é , and ��ì é(ê É'ËÌËÌËwÉ é(ëví to denote Ï �(äå�8��� . Someconfusionmayarisewhenusingthe notation � é without specifyings; e.g., if s is a list, then � é � Ú Û , but if s represents

212

Page 221: Image Algebra by Ritter

an integer,then îðïsñ�ò . It is alsocommonpracticeto view óeô(õFö7÷mø as a unary operationon ò�ù , wherethe unary operationis denotedby ó ï , and definedbyó ï�ú ò ù�û ò ù ölüþý@ÿ��vÿó ï ô�î�ø��<ólô(õ3ö6î�ø�� (4.14.3)

Again, if s is not specified,thenit may not be clearwhether ó"ï refersto the mapdefinedby Eq. 4.14.1or to the mapdefinedby Eq. 4.14.3. Hopefully, the contentof discussionleavesno doubtas to whichof the two mapsan authoris referringto. For example,if we specifys asthe single integerlist õ�� ���and �� ����� î � , then it should be clear thatóCï ô�î'ø��xó������)ô�î'ø��<îKï��<î�������� � î � �<ó � ô�î'ø��

Since ó"ï is definedin termsof concatenation,variousrelationshipsbetweenóCï and concatenationexist. The following two propertiesare obvious:

1. î����! #"�$�$�$%" ��&'�(�qî���� )"%$�$�$�" �!*+�Y÷�î��,�!* -/.�"%$�$�$" �&)� , for any� �0�@ö213141"ö)57698

2. óCï#: ;�ô�î�ø<�qóCï>ô�î'ø�÷�ó�;�ô�î�øvö ü�ýbÿ��vÿ î�ñ�ò ù ö¨õæñ>= ù ö@?BA�CED ñ>= ùSuchpropertiescan be usedto manipulatestringsin a coherentandconcisefashion.

Lists are often viewed or definedas sequences.For instance,if FG� � î � , then l can be viewed as

an elementof HI�KJ�L ò . Thus, in additionto the abovedefined projections,we alsocanapply the standard

projections M � ú òONQP û òM � ú î2R î �to lists. The maps ó � and M � are distinct but similar in behavior. For example,if S ñ`ò and î¨ñ ò ùsuch that

� î � �TFU6V8 , thenó � ô � S ÷#î�øW� X � S Y[Z�� �\�� î �^]_L `YaZ � �>� � î � ü�ý YKb ÿ M � ô � S ÷$îwøc� X S Y�Z�� �9�î �d]_L Y�Z � �9� � î � �Theoperationsof concatenationandprojectionscanbeusedto definemoresophisticatedoperations

on lists. The next exampleprovidesan illustration of this.

4.14.4 Example: (Median filter). The median filter is a nonlinear techniquefor noise suppres-sion. It consistsof replacing each pixel value e2f%gWh of an image ejilk�m with the me-dian value of the pixels in a neighborhoodN of y. The filtered image, n , is given bynOfgch�oqpsrutwvdxzy{f)|�e{f}�h�~�}cil�Ef!gch#�wh , where ��~w�����Bm is a neighborhoodconfigurationfunction about the point g�i�� .

In order to provide an algorithm that expressesthe medianfilter in the languageof the listalgebra,let � be the set of lists with real valued elementsand define the binary operation� ~�kG���2��� � by � f����3v#hco��7� �/�����<v�o��� � ���<v�o��� 

213

Page 222: Image Algebra by Ritter

Define ¡ ¢�£G¤¥£G¦T£ recursivelyas follows:

¡2§)¨�©�ª%«c¬®­¯¯° ¯¯±¨ ²�³<ª{¬V´#µª ²�³¶¨·¬�´�µ´)¸#¹4µ�º�¡j§�¨z»%©¶ª%«¼²�³¶¨·¬�´#¸#¹4µ{º½¨z»%©�ª2¬q´)¸!¾4µjºwªd»^©W¿BÀ_Á¸!¹�Ãĸ!¾´)¸#¾4µ�º�¡j§�¨�©¶ª » «¼²�³¶¨·¬�´#¸#¹4µ{º½¨ » ©�ª2¬q´)¸#¾4µ�ºwª » ©W¿½À_Á7¸!¹�Åĸ!¾�Æ

The algorithm now proceedsas follows:

Let ÇÉÈ>ÊËjÌ<Í Ì be definedas

Ç�ÎϧÐ�«�¬�Ñ7Ò ²�³�ÐGÈ¥Ól§�ÔW«Õ ÖQ×'Ø_Ù�Ú)Û ²aÜ Ù ÆDefine the medianfunction for a list ª of length Ý�¬�Þàß'Þ by

á·â)ã�ädå Ý{§æª«�¬0ç�èWé�êBëì §æª�« ²�³<Ýí²îÜ Ö ÁïÁð éì/ñ^ò,ó�ô ð é ì êBë ñ^ò�ó¾ ²�³<Ýí²îÜ Ù4õwÙ À{ÆThen, the filtered image ö is given byöG¢[¬ á�âuã/ä^å Ý{§%÷ ¡ø Ç/«)Æ

The medianfilter definedin the aboveexampleshould not be confusedwith the meanor localaveragingfilter describedin Example4.8.1. While the local averagingfilter is generallymoreeffectivein suppressingsmoothlygeneratednoise,the medianfilter is muchmoreeffective in reducingthe effectsof discreteimpulsenoise.Figure4.14.1providesa comparativeexampleof the effectsof thesefilters onan imagecontaininga fair amountof discreteimpulsenoise.

214

Page 223: Image Algebra by Ritter

Figure 4.14.1 Exampleof meanvs. medianfilter. The top row showsthe noisy sourceimageon theleft and the meanfiltered imageusinga ùûú�ù local averagingtemplateis shownon the right. The

bottomrow showsthe effect of medianfiltering. The imageon the left is medianfiltered usinga ü�ú�üneighborhood,while the imageon the right is medianfiltered usinga ù�ú¥ù neighborhood.

Sincethe medianfilter representsan image-to-imagetransformation,we could haveusedpreviousmethodologiesfor an algebraicspecificationof the median filter algorithm. For example, if ýÿþ����representsa von Neumannneighborhood,then for ������� ïù � , let ��� be definedas follows:

t�

11 =

1

t =�4

t =2

1

1t =3

Note that if ������������������������� , then t is given by

215

Page 224: Image Algebra by Ritter

t�y = 1

1

1

1

If !#"%$'&(!*)+-, "/.%021435687 6:9;6=< > , thenthe medianimage ? of a canbe computedasfollows:!�@A$'&B!?C$'&�!D@2EF!�G�EH!JIKML�N 02$O&QPSR=TU7SV LWLAXK L�NZY $O&[0#)\5]R8T^9^V LWL_XK L�NF` $'& Y )\5]R8T^<^V LWL_X?a$'&cb�!#"dEe!#f]EF!gAh#ij?kml�n V LWL_Xkml�n V LWL_Xkml�n V LWLAXThis schemecan be generalizedby decomposingany size templateinto the appropriatenumberof

one-pointtemplates.However,the numberof convolutions(iterations)for`

single-pixeltemplates(withoodd) is p ` )Q5f:qJGI rts

Thisprovidesfor anextremelyinefficientalgorithmfor mostcomputers.For somecomputerarchitectures,however, this neighborhooddecompositioninto single-pixel templatesis a very efficient method forimplementingorder statistic filters [2, 1].

216

Page 225: Image Algebra by Ritter

Bibliography

[1] P.C. Coffield. An architecturefor processingimage algebraoperations.In Image Algebra andMorphological Image ProcessingIII , volume 1769 of Proceedingsof SPIE, pages178–189,SanDiego, CA, July 1992.

[2] P.C.Coffield. AnElectro-OpticalImageAlgebraProcessingSystemfor AutomaticTargetRecognition.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,andJ.N. Wilson. Beyondmathematicalmorphology.In Visual Commu-nication and ImageProcessingII , volume845 of Proceedingsof SPIE, pages260–269,Cambridge,MA, October1987.

[5] J. Serra.ImageAnalysisand MathematicalMorphology. AcademicPress,London,1982.

217

Page 226: Image Algebra by Ritter
Page 227: Image Algebra by Ritter

CHAPTER 5TECHNIQUES FOR THE COMPUTATION OF GENERAL LINEAR TRANSFORMS

This chapterpresentsmethodsfor the computationof discretelinear imagetransformations.Linearimagetransformationsrepresenta largeclassof fundamentalimageprocessingoperationsin which imagesaretransformedby the useof linear combinationsof pixels. Specialconsiderationis given to the linearoperator uv to representand optimize linear imageprocessingtransforms.

5.1 Image Algebra and Linear Algebra

In Sections4.9 and4.10we establishednaturalconnectionsbetweenmatrix algebraandthe algebraof templates. A consequenceof theseconnectionsis that for any given field w=x]yzuty�{}| , the ring~�� x������Uy�uty�uv�� is algebraicallythe sameas the matrix algebra w����2� ���2�Dw�x�|�y�uty{�| , where � ��z�W��� wd��| , �(� �z�W�A� w��4| , and { denotesboth (induced)matrix multiplication and multiplication in x .Sinceany linear algebraof dimensionmn is isomorphicto a subalgebraof �����M���2�Dw�x�| (Section3.9),linearalgebracanbeviewedasa specialcaseor asa subalgebraof imagealgebra.Thus,anyrelationshipwhich can be expressedusing the notation of finite-dimensionallinear algebracan also be expressedusingtheusualnotationof imagealgebra.Imagealgebranotation,however,differs from theconventionalmatrix/vectornotationin that it reflectsthe way computationsarecarriedout in digital imageprocessing.

In comparisonto imagealgebra,linearalgebrais anancientandwell-establishedareaof mathematicsencompassinga greatwealth of accumulatedknowledgein termsof theoremsand computationaltech-niques. The relationshipbetweenimagealgebraand linear algebraprovidesthe link to this knowledgeandoffersdirectmethodsfor optimizing andimplementinglinear imagetransformson digital computers.

Thepertinentlink betweenimagealgebraandlinearalgebrais thepairof isomorphisms�(� � x � � �\�� � �� w�x�| and �j��x � � x � definedin Section4.9. Theseisomorphisms,however,arenot unique.Theirdefinitions are basedon the orderingof the points of X. Distinguishingthe points of X by subscripts,say �¡��¢�£#¤Ay £%¥my#¦m¦�¦Jy £ � § , providesfor a linear orderingof X by useof the rule: £J¨2©\£Dª¬« ­]®�¯ .The isomorphism � is dependenton this linear ordering since by definition, ��w±°A|H�²wd³ ¨´ª | �M��� , where³ ¨´ª �µ°�¶�·�w±£ ¨ | . A similar commentappliesto the vector spaceisomorphism� . It follows that for eachdifferentorderingof X oneobtainsa differentisomorphism.Thenext theoremdescribestherelationshipbetweenthem.

5.1.1 Theorem. Suppose� ¤ �¸¢�£ ¤ y £ ¥ y#¦m¦�¦Dy £#� § and � ¥ �¹¢�º ¤ y º ¥ y#¦�¦�¦Dy º#� § are two differentorderings of � . Let ��¤»� � x � � � � � � �� w�x�| and ��¥�� � x � � � � � �M��� w=x�| be twoisomorphismsdefinedrelative to the ordering of � ¤ and � ¥ , respectively. Then there existsa permutationmatrix ¼¸½Q��� ���¾wdx�| suchthat

� ¤ w±°_|��Q¼S� ¥ w±°A|8¼Z¿À °�½ � x � � � .

Conversely,if thereexistsa permutationmatrix ¼�½����M���Dw�x�| andfor everytemplate°Á½ � x �Z� �a matrix Â�Ãt½����M���Jwdx�| with the property that � ¤ w±°A|Ä��¼SÂ�Ãz¼ ¿ , then there existsan ordering

219

Page 228: Image Algebra by Ritter

on Å suchthat if ƵÇ2ÈdÉ�Ê}Ë Ê�ÌÎÍBÏ�Ð�Ï Ñ É]Ò is definedrelativeto this ordering, then Æ Ñ�Ó Ò�Ô»Õ�Ö× Ó�Ø ÈdÉ Ê Ë Ê .

Proof: Let Ù Ø4Ú Ï be the permutationdefinedby Û¾ÜWÝ'Þàß�Ô\á Þ for â Øäã�åAæ#çmç�çJæ8èêé . Recall thatthe permutationmatrix ë Ü Ô ÑOì Þ´í Ò ÏMÐ�Ï is definedby

ì Þîí Ôðï å ñàòFó ÔQÙ Ñ â=Òô ñàòFó�õÔQÙ Ñ â=Ò æwhere0 and1 denotethe additiveandmultiplicative identity of É , respectively.

Let Æ�ö Ñ±Ó Ò^Ô Ñd÷ Þîí Ò Ï Ð�Ï and Æ�ø ÑdÓ Ò^Ô Ñ�ù Þîí Ò ÏMÐ�Ï . Then

ë Ü Æ�ö ÑdÓ Ò�ëÄúÜ ÔðÈ ÷ ÜÝàÞàßüû ÜÝîíýß Ë Ï ÐÏSþBut ù Þ´í Ô Ózÿ���Ñ á Þ Ò�Ô Ó������ ��� È Û Ü�Ý Þàß Ë Ô ÷ ÜÝàÞàß û ÜÝ í8ß . ThereforeÆ�ø Ñ�Ó Ò�Ô\ë Ü Æ�ö ÑdÓ Ò=ë úÜ or, equivalently,Æ ö ÑdÓ Ò�Ô[ëSÆ ø Ñ±Ó Òýë ú , where ë Ô ë öÜ . This provesthe first part of the theorem.

In order to prove the secondpart, let P be the permutationmatrix with the property Æ ö ÑdÓ Ò�ÔëSÕ Ö ë ú . SinceP is a permutationmatrix, thereexistsa permutationÙ Ø*Ú Ï suchthat ë�ÔQë Ü .Define an ordering ã á%ö æ á%ø æ#ç�ç�çJæ á Ï é on X by setting á Þ ÔCÛ#Ü��� ������ and an isomorphism����������� � �"!$#&%'#)( �+*

relativeto this ordering. By the first part of the theoremwe have

,.- �0/ (�1 * ,32 � (�1 *54 176 ��� � � �

and by the hypothesisof the secondpart of the theoremwe havethat

, - �8/ (�1 * ,92;:�< 4 1=6 � � � � �?>

Hence� (�1 * 2@: < 4 1A6 ��� � � �

.

Q.E.D.

Accordingto Theorem5.1.1, two isomorphismsdefinedin termsof distinctlinearorderingsof a pointsetdiffer only by a permutation.For this reasonwe shall usethe symbol

�to denotethe isomorphism� � � � � � !B#C%�#)( �D*

describedin Chapter4. The ordering on X will be understoodas given and nomentionof it will be madein general.The specialcasewhereX is an E@FHG array, I 29JLK F J # orI 29JNMK F JNM# , is of particularinterest. Unlessotherwisespecified,in thesetwo caseswe shall alwaysassumethe lexicographicalor row-scanningorder.

The isomorphismsO and�

allowed for the easyproofs of basicpropertiesgoverningthe generalconvolutionoperator PQ (Chapter4). We concludethis sectionby reformulatingthe most pertinentofthesepropertiesin termsof the field operationsR and F .

220

Page 229: Image Algebra by Ritter

SupposeS�TVU�WXU�Y+Z is a field, [�U]\_^`T�a , bcUed'U]fg^9hiT�akj a , and lg^HT . Thenm'n S�[gW`\oZpWq fsrtS�[$Wq f'ZuWvS�\AWq f�Zwxn S�l+yz[{ZpWq f|r}lDy�S�[BWq f�Z~ n [$Wq S�doWAf�Zpr Si[$Wq d�ZuWvSi[$Wq f�Z�)n [$Wq S�d=Wq f�Zpr S�[BWq d�ZpWq f� n bXWq S�d=Wq f�Zpr S�b7Wq d�ZpWq f� n bXWq S�d+W`f�ZDr Seb7Wq d�ZuWvSebWq f�Z� n Seb�W`d�Z+Wq f|r Seb7Wq f�ZNWvSed.Wq f�Z

(5.1.1)

Properties1 and 2 of Eq. 5.1.1 expressthe linearity of the convolutionoperator Wq . Specifically,thetransformation�{�k��T a9� T a , definedby �{�zS�[{Z8r_[BWq f is linear sinceit follows from Property1 that� � S�[gW`\oZkr�� � S�[{Z�W�� � Se\8Z and Property2 that � � Selpyz[{Zkr�l�y�� � S�[{Z .

The remaining five propertiesprovide the necessarytools for linear transform optimization andinversion.

5.2 Fundamentals of Template Decomposition

Templatedecompositionplays a fundamentalrole in image processingalgorithm optimization. Itprovides a method for reducing the cost in computationand, therefore, increasesthe computationalefficiency of imageprocessingalgorithms. This goal can be achievedin two ways, either by reducingthe numberof arithmeticcomputationsin an algorithm or by restructuringan algorithmso as to matchthe structureof a specialimageprocessingarchitectureoptimally.

Intuitively, the problemof templatedecompositionis that for a given templatet, oneneedsto finda sequenceof smallertemplatesf���U�f���UN�����&UCfz� suchthat convolvingan imagea with t is equivalenttothe sequenceof convolutions S�y�y�y�S]Si[��q f���Z��q f���Z&y�y�y8�q fz���&��Z��q fz� . In other words, t can be expressedin terms of the f�� ’s as fHr�f � �q y�y�y �q f � .

Oneof thereasonsfor templatedecompositionis thatsomecurrentimageprocessorscanonly handlevery small templatesefficiently. For example,ERIM’s Cytocomputer[17, 8], Martin Marietta’sGAPP[2], andtheNationalBureauof Standard’sPIPE[14] cannotdealwith templatesof sizelarger than

~ Y ~at eachpipelinestage.Thus,a large templatehasto be decomposedinto a sequenceof

~ Y ~ or smallertemplatesbefore it can be effectively processed.

A more importantmotivation for templatedecompositionis to speedup templateoperations.Forlarge convolution masks, that is templateswith large supports,the computationcost resulting fromimplementationcanbeprohibitive. However,in manyinstances,this costcanbesignificantlyreducedbydecomposingthe templatesinto a sequenceof smallertemplates.For instance,the linear convolutionofan imagewith a templatewhosesupportis an �7Y�� squarearrayat eachpoint requires� � multiplicationsand � �X� m additions in order to computeone new image pixel value; while the sameconvolutioncomputedwith a templatewhosesupport is a

m Y�� row, followed by a convolutionwith a templatehavingsupportconsistingof an �$Y m columnat eachpoint, takesonly

w � multiplicationsandw S�� � m Z

additionsfor eachnew pixel value (Example4.10.4 illustratesthis concept).This cost savingmay stillhold for meshconnectedarray processors,where the cost of a convolution is proportionalto the sizethe template’ssupport.

221

Page 230: Image Algebra by Ritter

The problem of templatedecompositionhas beeninvestigatedby severalresearchers.Ritter andGader[16] presentedsomevery efficient methodsfor decomposingFFT andgenerallinear convolutiontemplates. Wiejak and Buxton [20] proposeda method to decomposea 2-dimensional(or higherdimensional)Marr-Hildreth convolutionoperatorinto two one-dimensionalconvolutions. ZhuangandHaralick [22] gavean algorithm basedon a tree searchthat can find an optimal decompositionof anarbitrary morphologicalstructuringelementif such a decompositionexists. Wilson and Manseur[11]providedoptimal decompositionsof ����� templatesinto ����� templates,while Wei andLucas[21, 9]gavemethodsfor decomposingtemplateson hexagonalarrays.In this sectionwe discussnecessaryandsufficient conditionsfor decomposingseparablerectangulartemplates.

As mentionedin Section5.1, properties3 through7 of Eq. 5.1.1 provide the necessarytools forlinear transformoptimization. They canbe usedwhenexploringthe possibilitiesof computingtemplateoperationsin differentways. Forexample,if  e¡+¢u£�¢L¤¦¥ is afield, §=¨�©i¡0ªV« ª , andweknowthat §|¬;­£®�¯ ,thenby Property4, we could apply r ands sequentiallyto a insteadof computing °B£® § directly since,in general,r ands havemuchsmallersupportthan t. In practice,however,oneusuallydoesnot know rands for a given t. A programmermaystartwith a large templatet — i.e., a templatewith largesupport— and is facedwith the task of finding two smaller templatesr and s suchthat §±¬²­X£®v¯ . In manycases,the taskof decomposinga templateinto smallerpiecesmay be very difficult if not impossible.

5.2.1 Definition. A linear decomposition(or £® –decomposition) of a template §�¨"©�¡³ªk« ª is a

sequence§�´�¢C§�µ�¢N¶�¶�¶)¢C§�·¸¨¹©�¡ ª « ª suchthat §º¬¹§�´.£® ¤�¤�¤+£® §z· .A weak linear decomposition(or weak £® –decomposition) of t is a sequenceof templates§ ´ ¢N¶�¶�¶L¢c§¼»�½z¢L¶�¶�¶L¢�§�»�¾]¿�½�À ´ ¢{¶�¶�¶L¢c§�»�¾¸¨ © ¡³ª « ª suchthat

§|¬  �§ ´ £® ¤�¤�¤+£® § » ½ ¥N£� �§ » ½ À ´ £® ¤�¤�¤Á£® § »Ã ¥N£5¤�¤�¤{£Ä©Å§ » ¾]¿�½ À ´ £® ¤�¤�¤D£® § » ¾ «'Æ

For example,if °�¨�¡ ª and §$¨�©Ç¡ ª « ª hasa weak decomposition§±¬�§ ´ £® § µ £�§zÈ7£® §ÊÉ , thenaccordingto properties3 and 4 of Eq. 5.1.1, °B£® § can be computedas

 � i°$£® § ´ ¥p£® § µ ¥N£� � �°$£® §zÈ�¥p£® §zÉ�¥ËÆThus,whencomputing °B£® § onecancomputethe image Ìv¬¹ �°¸£® § ´ ¥p£® § µ andstoreit, thencomputethe image ÍX¬3 �°�£® §zÈ�¥p£® §zÉ , andfinally addb andc. In general,a lineardecompositionof t is preferredto a weak linear decompositionbecauseusually more time and spaceis involved in computingwithweak decompositions.

With the conceptof templatedecompositiondefined,we turn our attentionto the decompositionofsomecommonlyusedtemplates.Thesetemplatesbelongto the classof shift-invariant templateswithfinite support.

In the subsequentdiscussion,we assumethat ¡ is a field, ÎϬÄÐ µ , and §�¨3©�¡ ª « ª is a templatewith finite supportat somepoint Ñv¨¸Î . Since ÒD �§�Ó&¥ is finite, the following arewell defined:Ô  �ÑD¥ÖÕD× · ¬ Ô�ØNÙ{ÚÜÛ ´  �Ý0¥�Þ|ÝA¨¸ÒD �§zÓË¥�ß�¢ Ô  �ÑD¥�Õoà�áX¬;â�ã ÛLÚ�Û ´  �Ý8¥gÞ.ÝH¨¸Òp i§zÓ)¥]ßc¢ä  �ÑD¥ ÕD× · ¬ Ô�ØLÙ{ÚÜÛ µ  �Ý8¥�Þ|ÝA¨¸ÒD �§zÓË¥�ßc¢ ä  �Ñp¥ Õ+à]á ¬;â�ã ÛuÚÜÛ µ  iÝ0¥�Þ|ÝH¨¸ÒD �§zÓ)¥]ßcÆ (5.2.1)

Let å� �ÑD¥k¬ Ô  �ÑD¥ Õoà�á.æ Ô  �ÑD¥ Õp× · ¢ Ø  iÑD¥k¬ ä  �ÑD¥ Õ+à]á=æ ä  iÑD¥ Õp× · , and defineç  i§zÓ)¥8¬ Ú   Ô  �ÑD¥�Õp× · £ Ô ¢ ä  �ÑD¥�Õp× · £ ä ¥�Þ=èXé_ê0ë�ìBí�îDï]ðpñgëóò�ë�ô{íiîDïÜð8ê�ð�ògõBö7÷�ø222

Page 231: Image Algebra by Ritter

By definition, ù7ú�ûzü)ý is an úeþBú�ÿDý�����ý��óú��{ú�ÿDý�����ý rectangulararrayand it is the smallestrectangulararraycontaining �púiû ü ý . Figure 5.2.1 illustratesthe conceptof the smallestrectangulararraycontainingthe supportof û ü . As shownin this illustration, y neednot be containedin ù7ú�û üËý .

y

i y( )min

y 1

y 2

j�

y( )max

y( )max

i

y( )minj�

Figure 5.2.1 The rectangulararray �� ������ containing� ������ . Here� ������ is representedby the shadedregion.

5.2.2 Definition. Let ����������� � .

1. A template � � � � �!� � is said to havefinite supportif andonly if� ����"� is finite#%$ �'& .

2. A templatet with finite supportis calleda rectangular (*),+ template, or simplyan (-).+ template, if �/ ������ is of size (0).+ #%$ �1& .

3. An (2)3+ template t is called strictly rectangular if and only if� 4�����65�� ��7�"� #%$ �3& .

4. An (8)�+ templatet is called a row templatewhenever(95-: , and a columntemplatewhenever+;5': . If both (<5=: and +>5=: , then t is called a one-pointtemplate.

Part 2 of the definition saysthat (? $ �@5A( and +B $ �C5<+ #%$ �D& . In particular, it followsthat if t is a shift-invariant templatewith finite support, then t is a rectangular (E)F+ templatefor

223

Page 232: Image Algebra by Ritter

somepair of integersm and n. Thus t can be representedby an GIH�J matrix KML*N�O�PRQTS�UWVYX , whereO PZQ L\[�]�N�^_N�`aS U P X b N�^BcedfShg�i�N4`aS U P X b Nji/cFdkShS , and ^_N�`aS U P X and i�N4`aS U P X are as definedin Eq. 5.2.1.The matrix T is calledthe weightmatrix associatedwith t. Note that if t is a strictly rectangularG0HlJtemplatewith weight matrix mDLDN�O�PRQnS4U!VoX , then O�PRQ@pL3q for ^�L=dog�rsrTrtguG and ivL=dog�rsrTrtguJ .

Theweight matrix associatedwith t shouldnot be confusedwith the matrix wxN4[kS defined earlier. Infact, two distinct templatescan haveidenticalweight matrices.For example,the matrixm�L<y d z {| d q�}is a weight matrix associatewith the two shift-invarianttemplatess and t shownin Figure5.2.2.

1 3~

4�

2�

1

1 3~

4�

2�

1

= =t�

s�Figure 5.2.2 Two templateshaving identical weight matrix T.

It is clear that by choosing the smallest rectangular array of type ����� �E����� ��Y����������� ���'���%��� � �e� � ���l� � �e��� with the property that �!�� f¡£¢�¤ ¢h¥�¦¨§ �B�"�I�3����� , thenthe matrix

© � ª««««¬B­h® � ¤ ® � ¯T¯T¯ ­�® � ¤ ¢ ¯T¯T¯ ­h® � ¤ �¯T¯T¯ ¯T¯T¯ ¯T¯T¯ ¯T¯T¯ ¯T¯s¯­ ¢�¤ ® � ¯T¯T¯ ­ ¢�¤ ¢ ¯T¯T¯ ­ ¢�¤ �¯T¯T¯ ¯T¯T¯ ¯T¯T¯ ¯T¯T¯ ¯T¯s¯­ � ¤ ® � ¯T¯T¯ ­ � ¤ ¢ ¯T¯T¯ ­ � ¤ �°�±±±±² � (5.2.2)

definedby ­�³R´ �e f¡j¢7¤ ¢_¥ �µ�h����� for ���<� � �e� and ���l� � �e� , providesfor a one-to-onecorrespondencebetweenshift–invariant templatesand matricesdefinedthis way. For example,the templatess and tdefinedin Figure 5.2.2 have templaterepresentations

�.� ª¬·¶ ¶ ¶ ¶ ¶¶ ¶ ¸ ¹ º¶ ¶ » ¸ ¶ °² ¼f½�¾ © � ª¬·¶ ¶ ¸ ¹ º¶ ¶ » ¸ ¶¶ ¶ ¶ ¶ ¶ °² �respectively.The matrix T definedby Eq. 5.2.2 is called the centered weight matrix correspondingtot. In contrastto weight matrices,centeredweight matricesprovide for the location of the target pixel,which is always locatedat the centerof the matrix. For this reasonthe target pixel of a templateisoften referredto as the center pixel.

Among shift-invariant templates,rectangulartemplatesare the simplestand most commonlyusedtemplatesin imageprocessing.A first stepin varioustemplatedecompositionschemesof suchtemplates

224

Page 233: Image Algebra by Ritter

is to decomposethe templateinto the productof a row and a column template. In light of this, it isimportant to note that althoughevery templatewhosecorrespondingcenteredweight matrix is a rowor columnmatrix is a row or columntemplate,respectively,the converseneednot necessarilybe true.The templateshownin Figure 5.2.3 is a row templatebut its correspondingcenteredweight matrix isa ¿?Àe¿ matrix.

1-1

Figure 5.2.3 Exampleof a row template.

5.2.3 Definition. A templateis called linearly separable, or simply separable, if it canbe expressedas linear decompositionof a row templateand a column template.

Ideally, to speedup the templateoperations,we would like to decomposean arbitrary rectangulartemplateinto two one–dimensionaltemplates,namelya row templateanda columntemplate.Thus,for agivenstrictly rectangularÁ=Â@à template,thenumberof arithmeticoperationsrequiredfor eachtemplateoperationat eachpixel locationcanbe reducedfrom ÄCÅ�ÁÆÃÈÇ to ÄCÅ�Á=ÉFÃBÇ . The next theoremprovidesnecessaryandsufficient conditionsfor the separabilityof strictly rectangulartemplates.

5.2.4 Theorem. If Ê ËeÌ�ÍÈÎ%Ï Î is a strictly rectangularÁ*ÂÐà templatewith associatedweightmatrixÑMÒ Å�Ó�ÔRÕnÇ4Ö ×oØ , then t is linearly separableif and only ifÓ ÔRÕÓ�Ù Õ Ò Ó�Ô ÙÓ�Ù�Ù (I)

for all Ú.ÛÝÜÞÛÝÁ and Ú.Û'ßeÛÝÃ .

Proof: Supposethat t is separableand that Ê Ò3à Éá�â , wherer is a Ú Â>à row templatewithweights ãsÙfä�åTåså"äæã Ø ands is a ÁMÂlÚ columntemplatewith weights çsÙfä�åTåså�äæç Ö . By definitionof templateproducts,Ó�ÔRÕ Ò ç7Ô�èTãæÕ for Ü Ò Úéä�åsåTåtäuÁ and ß Ò Úoä�åTåTå�äuà . Therefore,Ó ÔRÕÓµÙ Õ Ò ç Ô èTã ÕçTÙêèTã Õ Ò ç7ÔçsÙ Ò ç7Ôëèsã ÙçTÙxèìãsÙ Ò Ó�Ô ÙÓµÙhÙ�íTo provesufficiency, supposethat Eq. (I) holds. Definea ÚWÂ>à row templater anda Á�Â1Úcolumn templates by ãìÕ Ò Ó Ù Õ-î4ïéð ß Ò Úoä�åsåTåtäuà (i)

225

Page 234: Image Algebra by Ritter

and ñ7ò·ó�ô òjõô õhõ2ö4÷éøúù ó3ûéü�ýsýTýtühþ'ü(ii)

respectively.Thus,ô òRÿúó=ñ�ò�� � ÿ and, therefore,

� ó ����� .Q.E.D.

Notethatcondition(I) is equivalentto sayingthat therankof T is 1. Thetheoremprovidesa straightforward methodfor testinganddecomposinglinearly separabletemplates.SinceEq. (I) is equivalenttoô òZÿ� ô õhõ�ó ô ò õ�� ô õ�ÿ

, it takes �� �� þ � û�� multiplicationsand � þ � û�� �� � û�� comparisonsin orderto checkwhethera rectangulartemplateof size

þ�� is separableor not. If it is separable,thenonecaneasilyconstructthe correspondingrow andcolumn templatesby using Eqs. (i) and (ii).

In many casesit is convenientto define large invariant templatesby a weight function w of twovariables. For example,the function� ��� ü � �aó ��� � � ����� � ��� � � � � � � � � ü (5.2.5)

whenevaluatedat the integers� ó � ûoü�! üTû and � ó � ûéü"! ühû , providesthe weightsof the # � # templatet shownin Figure 5.2.4. Note that if $ ó � ô òRÿ%� denotesthe centeredweight matrix correspondingto t,then

ô òRÿ ó � � ù ü'&(� . In practice,weight functionsarecommonlyrestrictedto rectangulardomainscenteredat the origin.

=t� 6

)4 2

3~

2�

1

-6 -4 -2

Figure 5.2.4 The templatet definedby *,+.-0/"132546-(781�9:�-(7<;=:�-(1�9?>3-@9A1�;: .The separabilityof a shift-invariant templatecan be reducedto the separabilityof its associated

weight function. The following result is obvious.

5.2.5 Theorem. SupposeBC4ED�7 and FHGJILK�MON M is an invariant templatewith finite supportandweight functionw. Then F is linearly separableif and only if *,+�-�/P1Q2R4TS�+.-U2V�WU+L1X2 for someK –valuedfunctionsf and g.

Note that this theoremis similar to Theorem5.2.4with the weight functionsf andg specifyingtherow and column templates.

5.2.6 Examples:

226

Page 235: Image Algebra by Ritter

(i) The templatet with weight function w definedby Eq. 5.2.5 is separablesinceY[Z�\�]"^`_�aEbc\�dfe=g�\ihkj8l�Z�^RhAg3_�anm�Z�\o_qpsrUZL^X_t]where m�Z�\o_5au\ d e=g�\@hvj and rUZL^`_wax^�h?g . Thus, y auz{e|?} , wherethe correspondingrowand column templatesare given by

r~ = s� =and�-2

-1

2

-3 -2 -1

(ii) Considerthe �L�����n���5��L�����k��� templatet defined by� �L���P�`��� ��0�U� � �5� �(�f�?���� � �������U�����L�U�"�c ¢¡ �L£ �� �� ��� � � �5� � �� � � � �X� � ¡ �.£ �¥¤�� �X� � ¡ �¦£ � � �� �0� � � �X� � ¡ �.£ � � �5� � �� � � � �Q� � ¡ �¦£ ��n§�¨©���o��§ � �.�`�U�?§�ª��L�U�.§ � ���`�`�where �[� «¬���"��«¬� . This templateis alsoknown asa Marr-Hildreth template.

Clearly t is not separablebut it still hasa very efficient weaklineardecompositionwhich is thesum of two separabletemplates,namely­ �®� ­ ¨ �¯ ­ � �0�k� ­ ª �¯ ­ �����where

­�°is definedby § ° for ±{�������`�Q²`�X³ .

5.3 LU Decompositionof Templates

The rank of a templatet is definedas the rank of its correspondingweight matrix T. It is easytoshow that every �´� � matrix T can be decomposedas a sum of at most n rank 1 matrices.Thus, if tis an �A�?� template,then t can be expressedas­ � ­ ¨ � ­ � � ¤�¤�¤ � ­8µ � (5.3.1)

where

­8°is a rank1 templatefor each±��6�����X�0¶�¶�¶��(� . Accordingto Theorem5.2.4, each

­8°canin turn

be decomposedinto a productof a row andcolumntemplate,namely

­8° �¸· ° �¯¹ ° . Therefore,­ �6�L· ¨ �¯=¹ ¨ �o�º�L· � �¯?¹ � �o� ¤�¤�¤ �k�L· µ �¯A¹ µ �`» (5.3.2)

This showsthat every invariant templatewith finite supporthas an effective weak linear decom-position. However, the computationalcost of replacingthe convolution ¼½�¯ ­ by the ��� convolutions�L¼½�¯ · ° ��¯A¹ ° is in most casesstill prohibitive. It is thereforedesirableto reducethe numberof termsappearingon the right-handside of Eq. 5.3.2. One effective methodfor accomplishingthis is the LUfactorizationtechniqueof standardnumericallinear algebra.

For the remainderof this sectionL will always denotea lower triangularmatrix and U an uppertriangularmatrix. A matrix T is said to havean LU factorizationwheneverT canbe written asa matrixproduct ¾C�À¿ÂÁ .

The next theoremprovidesa first stepin the reductionof the numberof termsin Eq. 5.3.2.

227

Page 236: Image Algebra by Ritter

5.3.1 Theorem. If ÃJÄÆÅLÇcÈÊÉ%ËÍÌ�Î�Ì hasan LU factorization,thenfor any ÏÀÄEÐ�Ñ(ÒXÑ0Ó�Ó�Ó�Ñ�Ô there existmatrices Ã0Õ�Ñ0Ó�Ó�Ó�ÑXÃUÖ eachof rank at most1 and a matrix ×ÂÖÆÄÆÅLØ ÈÙÉ Ë ÌXÎ�Ì with Ø ÈÛÚ ÄxØ Ú¦É ÄxÜfor ݸÄÞÐ�Ñ"ÒXÑ�Ó�Ó�ÓUÑ�Ï suchthat ìĺà Õ�ß�à�à�à à Öß × Ö á

Proof: SupposeìĬâ5ã . For ä�ÄxÐ�Ñ0Ó�Ó�Ó�Ñ(Ô define ã0È to be the ÔæåçÔ matrix whoseith rowis the ith row of U and whoseremainingrows havezero entries. For ÏèÄxÔ let é Ö denotethe ÔAå?Ô zero matrix and for Ï�êëÔ seté Ö Ä®ã Ö5ìUÕfßíà�à�à0ß ã Ì áThen ìÄvâ5ãîÄnâwÅ"ã Õ ßïà�à�à�ß ã Ö ß é Ö ËÄnâÂã Õ<ßíà�à�à�ß âÂã Öß âfé ÖÄkà Õfßíà�à�à0ß Ã Öß × Ö Ñwhere ÃUÈ�Ä�âÂã0È and × Ö Äíâfé Ö .

Q.E.D.

Thus, if the weight matrix T correspondingto the Ô åAÔ templatet hasan LU factorization,thenfor any ÏðÄñÐ�Ñ0Ó�Ó�Ó�Ñ"Ô , we can write t as the sumò Ä ò Õwß ò%ó ßïà�à�à�ß ò ÖkßAô�ÖĬÅ�õ Õ[ßö÷ Õ Ë ß�à�à�à©ß Å.õ Ö¬ßö?÷ Ö Ë ß?ô3Ö Ñ (5.3.3)

where ô�Ö is at most of size Å�Ô�ø?ϽË<å?Å.Ô@øAÏ½Ë . In particular,if ÏèÄëÐ , thenò ÄîÅ�õ ßöA÷ Ë ß?ô Ñ (5.3.4)

wheree is of size ÅLÔùøkÐ�Ë<å Å�Ô�økÐ�Ë ; i.e., any templatewhoseweight matrix hasan LU decompositioncanbe decomposedinto a productof a row anda columntemplateplus a templateof smallersize.

5.3.2 Definition. A templateis said to havean LU decompositionif its correspondingweight matrixhas a LU decomposition.

Usingcenteredweightmatricesin theLU decompositionof a templatet simplifiesthetaskof locatingthe supportof the templateô3Ö in relationto the locationof the target pixel úAÄxÅLû Õ Ñ"û ó Ë sinceü Å ô Öþý(Ë ÿ � Å��(Õ�Ñ�� ó Ë���� ó û�Õ�� �(Õ��ºû�Õ ß Å�Ôùø ÏçË"Ñû ó � � ó �ºû ó ß Å�Ô�ø?ÏçË����i.e, ô�Ö has form

en-m,n-m�,1n-me

,n-m�1ee1,1

. . .

. . .

. . .

.

.

.

.

.

.e� m =

228

Page 237: Image Algebra by Ritter

where �����������! #"%$'&!()"%*,+.-'/10�$'23()"54�+)-'/6/ for *70849�:-;0=<>0,?@?�?A0CB9+.DE(F- .This observationimplies that Eqs. 5.3.3and5.3.4arenot asgoodasthey seemat first glance;even

for templateswith centeredtarget pixels, the target pixel of � � will alwaysbe in the upperright handcornerandthusrequiring,in general,a shift of datain orderto mapthe templateoperationto a particulararchitectureor to achieveoptimal computationspeed.

5.3.3 Example: Considerthe GIH.G template

1 1 2 1 1

23~

5J

3~

2

3~

4�

7K

4�

3~2�

3~

5J

3~

2�1 1 2

�1 1

t�

=

The correspondingcentered(aswell as non-centered)weight matrix is given by

LFMNOOOOPQ Q R Q QR S T S RS U V U SR S T S RQ Q R Q Q

WYXXXXZ\[

and an LU decompositionof T is given by

L]MNOOOOPQ ^ ^ ^ ^R Q ^ ^ ^S Q ^ ^ ^R Q ^ ^ ^Q ^ ^ ^ ^

W XXXXZNOOOOPQ Q R Q Q^ Q Q Q ^^ ^ ^ ^ ^^ ^ ^ ^ ^^ ^ ^ ^ ^

W XXXXZ`_

For a M R,

L,b�Mdcfegb�MNOOOOPQ Q R Q QR R U R RS S h S SR R U R RQ Q R Q Q

WYXXXXZ [ L,i�Mjc�egikM

NOOOOP^ ^ ^ ^ ^^ Q Q Q ^^ Q Q Q ^^ Q Q Q ^^ ^ ^ ^ ^

WYXXXXZ [

229

Page 238: Image Algebra by Ritter

and l�monqpsrut%v@wuv .Thus,

1 1 2 1 1

2�

2�3~

3~2�

2�1 1 2 1 1

t�

= +x1 1 1

111

1 1 1

2�

4�

2�3~

6)

3~2�

4�

2�

Sinceeachof the templatesy@z and y@{ is of rank 1, t can be decomposedfurther as

+|+|1

2

3}2~1

1 1 2~

1 1

1

1

1

11 1=t�

+|

Although t is now a sumof productsof row andcolumntemplates,it is not a sumof productsof ����� or smallertemplateswhich arebettersuitedfor the typesof architecturesmentionedinSection5.2. However, it is not difficult to show that

+

1

1

1

1

2

3}2~1

=

1

1

1

and

+�1 1 2�

1 1 11 1= 1 1

Thus, t can be written asa weak decompositionof ���\� or smallertemplates.

230

Page 239: Image Algebra by Ritter

Thereare two noteworthyobservationsregardingExample5.3.3. First, since

+

1

1

1

11 1

1

1

1

1

1

1

1

1

1

11 1

1 1

1 1++

+x+x+x

=

,

the templatet can be expressedas

+|=t�

+|1

1

1

1

1

1

1

1

1 1

1

1 1

1

1

1

1

1 1

1

1 1

1

1

Therefore,�������� ���!���@� , wheres and �@� are ����� templatesand �@� is as in the aboveexample.In particular,the ����� rank 1 template�@� in Example5.3.3 is now expressedasa productof two �����templates;namely, � � �`���� � � . O’Leary showedthat this holds in general[14].

5.3.4 Theorem(O’Leary). If � is a �I��� templatesuchthat either � has rank 1 or � is a diagonaltemplate,then ���E���� � , where � and � are �I�\� templates.

As a secondobservationwe notethat the templatet in Example5.3.3doesnot satisfycondition(I)of Theorem5.2.4since,for example,�s�6�'�@� � ��¡�d�8�����@� �7� . In fact, t is a rank 2 templateand it is for thisreasonthat ��� ���¢���@� , where �@� and �@� are rank 1 templates.The relationshipbetweenthe numberoftermsin the expansionof t and the rank of t is given by the following corollary of Theorem5.3.1:

5.3.5 Theorem. If T is an £)�j£ matrix of rank r and T has an LU factorization, then for any¤ �¦¥'§#¨©§,ª�ª@ª«§#¬ , ­�­�3�¯®@®@®g�

­° �.± ° §

where each

­«²is an £\�£ rank 1 matrix, ± ° �´³%µ

²�¶@·¸©¹;¸ hasthe property that µ

²»º�`µ

º¼¶�¾½

for ¿�À¥Á§©¨©§,ª�ª@ª«§ ¤ , and ± ° is the zero matrix whenever¤ �¾¬ .231

Page 240: Image Algebra by Ritter

5.3.6 Example: Let t be the rank 3 templatedefinedby

=tÂ

-3 -3 -3 -3 -3

2 2 2

-2-2-2

1

An LU decompositionfor the correspondingweight matrix T is given by

Ä]ÅÆÇÇÇÇÈÉ Ê Ê Ê ÊÊ É Ê Ê ÊÊ Ê É Ê ÊÊ Ë,É Ê Ê ÊË,É Ê Ê Ê Ê

ÌYÍÍÍÍÎÆÇÇÇÇÈÏ Ï Ï Ï ÏÊ Ð Ð Ð ÊÊ Ê É Ê ÊÊ Ê Ê Ê ÊÊ Ê Ê Ê Ê

ÌYÍÍÍÍξÑ

For Ò Å Ðwe have

ÄÓÅ:Ä,ÔfÕ Ä«Ö�Õj×kÖ, where

Ä,ÔfÅÆÇÇÇÇÈÏ Ï Ï Ï ÏÊ Ê Ê Ê ÊÊ Ê Ê Ê ÊÊ Ê Ê Ê ÊË Ï Ë Ï Ë Ï Ë Ï Ë Ï

Ì ÍÍÍÍÎÙØ Ä,Ö�Å

ÆÇÇÇÇÈÊ Ê Ê Ê ÊÊ Ð Ð Ð ÊÊ Ê Ê Ê ÊÊ Ë#Ð ËCÐ Ë#Ð ÊÊ Ê Ê Ê Ê

Ì ÍÍÍÍÎÙØ

and

× Ö ÅÆÇÇÇÇÈÊ Ê Ê Ê ÊÊ Ê Ê Ê ÊÊ Ê É Ê ÊÊ Ê Ê Ê ÊÊ Ê Ê Ê Ê

ÌYÍÍÍÍξÑ

Thus,

+=t�

3}

3}

3}

3}

3}

-3 -3 -3 -3 -3

+ 1

2~

2~

2~

-2 -2 -2

232

Page 241: Image Algebra by Ritter

or Ú.ÛÜÚ�ÝkÞFÚ@ß�Þdà©ß . Since Ú@Ý is a á�âãá rank 1 template, Ú@Ý can be further decomposedinto Ú Ý ÛÙäåÞæãç , where r and s are èéâ�è templates.Therefore,the convolution ê�Þæ Ú can beaccomplishedusing only èIâ�è templates,namely

êÞæ Ú�Ûdèuësê�Þæ ä'ÝYì�Þæ.ç Ý3Þãí=ësê�Þæ ä'ßîìïÞ�ê�ðwhere

r~ 1 = , r~ 2 = ,sñ 1 = ,

1 aò 1

-1

1 bó

1

1 bó

1

1 1 1

-1-1-1-1-a

ô�õ÷ö ø«ù úû , and ü õ÷ö7ý©ù úû . The templatesþ ö and ÿ ö whereobtainedby first decomposingthetemplate þ õ÷ö��� ö , whosepictorial representationis given by

=

1 1 1 1 1

-1 -1 -1 -1 -1

r�

into the column and row templates

+

1

1

1

1 11 1++

=

1

-1

1 1 1 1 1+|

-1

a� b�

233

Page 242: Image Algebra by Ritter

and then recombiningthesetemplatesin the order

r~ 1 = +x1

-1

1 aò 1 sñ 1 = +x 1 1bó

1

1

and�

A primeassumptionin the LU decompositionof a templateis that theweightmatrix of the templatehasanLU decomposition.But given theweightmatrix T of a template,how do we know whetheror notT hasan LU decomposition?A well known fact of matrix algebrais that everymatrix T canbe writtenas ������ for somepermutationmatrix P. However,sincea permutationmatrix movesthe templateweightsto differentgeometriclocations,thusresultingin a differenttemplate,this fact is, in general,notdirectly applicableto the problemof templatedecomposition.Necessaryconditionsfor the existenceofan LU decompositionare given by the following theorem:

5.3.7 Theorem. Let ������������������ beof rank r andlet ��� denotetheleading "!# principal submatrixof T. If � � is nonsingularfor $&%�')(*',+-+-+,'/. , thenthere existsa lower triangular matrix L andan upper triangular matrix U suchthat �00�1 .

For a proof see[13] or [5].

5.4 Polynomial Factorization of Templates

Every template2$3�4�576�8 6 with centeredweight matrix �9�����:�;� as definedby Eq. 5.2.2 can berepresentedby a polynomial �<�>=?'A@)� in two variables,where

�<�>=B'C@D�E F �G�IH)J

F �G�KH)J7L �:�M= � @ � ' (5.4.1)

and L ��� 0� ��N �PO �CN � . The coefficients of �A�A=B'<@Q� define a matrix RST� L ��� � which correspondsto thematrix T shifted to the first quadrant.

The polynomial �<�>=B'<@D� definedby Eq. 5.4.1 is called the weight polynomial of t. The weightpolynomial shouldnot be confusedwith the weight function definedin Section5.2. However, just asfor weight functions,the factorizationof weight polynomialsis equivalentto the decompositionof thecorrespondingtemplates.Sincepolynomial factorizationresultsin polynomial factorsof lower degree,the correspondingtemplatedecompositionresultsin templatefactorsof smallersize.

The following polynomialdecompositiontheoremwasprovedby ManseurandWilson [11].

234

Page 243: Image Algebra by Ritter

5.4.1Theorem. If UWVX*Y[Z\VX , and ]<^>_?Ya`*bPc defhg)ikjel g)i�m f l _ f ` l , thenthere existsfive polynomials

u, v, p, q, and r such that

]A^n_?YC`obpc[q,^n_BY<`Qbsr-tD^>_BY<`Qb?uwvx^�_?YC`Dbsrzy�^>_BY<`Db?u|{�^n_?YC`ob,Ywhere q,^n_?YC`obpc }~ fhg/i }~l g/i q f l _ f ` l Y tD^>_BY<`Qb7c d1� }~ fhg/i j � }~l g)i t f l _ f ` l Y

v,^>_BYC`ob�c }~ fhg)i }~l g)i v f l _ f ` l Y y�^�_BYC`DbEc d�� }~ fIg)i j � }~l g)i y f l _ f ` l Yand {�^�_?YC`Db7c d����~ fhg �

j �/�~l g �{ f l _ f ` l��

Proof: If m ^>`Db|c jel g)i�m i l ` l , then by the FundamentalTheoremof Algebra, there exists

polynomialsm � and m } with �o�a�,^ m � bp��� , �o�M�,^ m } b���Z���� , andsuchthat m ^�`Db�c m � ^>`Db�r m } ^>`Db .Similarly, if ��^>`Db#c jel g)i�m d l `l, then there existspolynomials � � and � } with �o�a�,^�� � b���� ,

�o�a�,^�� } b��9Z���� , and suchthat ��^>`Db�c�� � ^n`*b�r�� } ^�`*b .Define q,^n_BY<`Qb�c m � ^>`Db�uk_ } � � ^>`DbDYtD^>_BY<`Qb7c m } ^>`Dbxuk_ d1� } � } ^�`Db)Yand � ^n_?YC`Qb�c�]<^>_BY<`Dbs��qx^>_BYC`*b?r-tD^>_BYC`ob � (i)

Multiplying u and v, we obtain� ^n_?YC`Db7c�]A^A_BYC`obs���n� m � ^>`Db?u�_ } � � ^n`Db���r/� m } ^>`Dbxu|_ d�� } � } ^n`Db>�M�c�]A^A_BYC`obs� � m ^�`Dbxuk_ } � � ^>`Db m } ^�`*bxu�_ d�� } m � ^>`Dbn� } ^n`Db,u|_ d ��^�`Db ��

But ]<^>_BYC`*b7c d~ fhg)i j~l g)i m f l _ f ` lc d1�/�~ fhg �

j~l g)i m f l _ f ` l u j~ l g)i m i l ` l u�_ d j~l g)i m d l `l

c d1�/�~ fhg �j~l g)i m f l _ f ` l u m ^n`*b?u�_ d ��^n`Db �

Thus, � ^>_BYC`ob�c d1�/�~ fhg �j~l g)i m f l _ f ` l ��_ } � � ^>`Db m } ^n`Db,�|_ d�� } m � ^>`Db>� } ^n`*bDY

235

Page 244: Image Algebra by Ritter

which meansthat  ;¡n¢?£A¤D¥ is of form

 ;¡A¢B£C¤o¥7¦[§1¨/©ª « ¬ ©­ª® ¬,¯  

« ® ¢«¤ ®E°

If ±�¡>¢x¥�¦ §�¨/©²« ¬)¯  « ¯ ¢«, thenc canbe decomposedas ±�¡�¢x¥�¦³¢$´-± © ¡�¢x¥ , where µ�¶¸·�¡�± © ¥º¹\»0¼|½ .

Similarly, if µD¡>¢x¥|¦ §�¨/©²« ¬)¯  « ­ ¢«, then d can be decomposedas µD¡�¢x¥¾¦¿¢À´/µ © ¡n¢,¥ , whereµo¶a·,¡�µ © ¥Á¹�»0¼k½ . Let Â,¡�¢B£C¤D¥º¦&¢ÄÃ�¢/¤oÅ , Æ�¡�¢B£<¤D¥Ç¦&± © ¡>¢x¥?Ãȵ © ¡>¢x¥>¤

­ ¨ Å , andÉ ¡�¢?£C¤D¥7¦[ Ê¡>¢B£<¤D¥s¼�Âx¡>¢B£<¤Q¥s´-Æ�¡>¢B£C¤o¥ ° (ii)

Again, by multiplying Â,¡n¢B£<¤Q¥ by Æ�¡>¢B£C¤o¥ andnoting that  Ê¡>¢B£<¤D¥ can be written as

 Ê¡>¢B£<¤Q¥�¦�§1¨D©ª « ¬ ©­ ¨/©ª® ¬ ©

 « ® ¢«¤ ® Ã|§1¨/©ª « ¬ ©

 « ¯ ¢«Ãk¤ ­ §�¨/©ª « ¬ ©

 « ­ ¢«£

it can be ascertainedthat É ¡�¢B£<¤D¥ is of form

É ¡>¢B£C¤o¥�¦�§1¨/©ª « ¬ ©­ ¨/©ª® ¬ ©

É « ® ¢«¤ ® °

It now follows from Eqs. (i) and (ii) thatË ¡>¢B£<¤D¥7¦[Ìx¡>¢B£C¤*¥?´-ÍD¡>¢B£C¤o¥?Ãk ;¡n¢?£C¤o¥¦[Ìx¡>¢B£C¤*¥?´-ÍD¡>¢B£C¤o¥?ÃÎÂ,¡�¢B£<¤D¥s´-Æ�¡�¢B£C¤D¥?Ã É ¡>¢B£<¤Q¥ °Q.E.D.

Let t be an arbitrary Ï�ÐkÏ template. According to Eq. 5.3.1, t can be decomposedinto a sumof five rank 1 templates Ñ

¦Ñ© Ã

ÑÅ Ã

Ñ Ò ÃÑ Ó Ã

Ñ Ô °It follows from O’Leary’s theorem(Theorem5.3.4) that for Õ�¦�Ö�£/½*£?×�×-×/£)Ï , eachtemplate

Ñ «can in

turn be decomposedinto a productof two Ø$Ð|Ø templates

Ñ «¦0Ù

«ÃÚ�Û«. Thus, t can be written as a

weak decompositionof ØÜÐ�Ø templatesѦ�¡nÙ © Ã

Ú|Û© ¥xÃÝ´-´-´BÃ�¡�Ù Ô ÃÚ|Û Ô ¥ °

Obviously, Theorem5.4.1 provides for a better result; the numberof Ø�ÐkØ templatesneededisactually half of the numberindicatedby the rank method,namelyÑ

¦�Þ�ÃÚ|ß Ã�àÀÃÚká Ã�ÙÇ£ (5.4.3)

whereu, v, p, q, and r areof size at most ØâÐ�Ø . Example5.6.18(iv) showsthat this result is the bestachievablefor certain ÏãÐ|Ï templates.

236

Page 245: Image Algebra by Ritter

Themethodsof Theorem5.4.1canbeappliedseveraltimesin orderto decomposetemplatesof sizelarger than ä$åkä into sumsand productsof æÜå|æ templates. For example,if t is a çèåÈç template,then t can be decomposedasé�ê�ë>ì;íPîï|ð í îïkñ í-ò?î�ë>ì-ó"îïkð ó îï�ñ ó�òxî�ë>ìzô�îï|ð ô òxîkënì-õ"îï|ð õ ò?î|ì�ö�÷whereeach

ì�ø>÷ ð ø, and

ñ øis a æÄåwæ template.By factoring the polynomials ù ë>úDòa÷ºû�ë�úDòC÷ºü�ë>ýxò and þ ë�ýxò

in the proof of Theorem5.4.1 into the productof quadratics,a generalë>ÿ�� î��;ò å ë>ÿ�� î��;ò templatet

can always be decomposedinto a sumé�ê�é í î|é ó î������Bî�é ó��/í ÷where

é ó���Díis a æâå�æ templateand,for � ê���÷/ÿ*÷� � � )÷������

, the templatesé ó ø /í

andé ó ø

areproductsof form é ó ø Dí ê\ì ø�� îï ì ø�� îï �����$îï ì ø����������� �!#"�$�% é ó ø ê ð ø�� îï|ð ø&� îï ������îïkð ø����'�(���� �! ÷whereeach

ì ø�)and

ð ø*)is a æ�åPæ template.In actualapplications,furthersavingscanbeachievedby noting

that in the proof of Theorem5.4.1, the polynomial + ë>ýB÷<úDòÇê ýÄî�ý/ú ó appearsin everydecomposition.Thus, the distributive law can be usedto further reducethe operationcount in templatesof size çâåÀçor larger.

5.5 The Manseur-Wilson Theorem

The decompositionmethodspresentedin the next sectionare basedon a remarkabletheoremfirstprovenby Z. ManseurandD. Wilson [11]. While thestatementof this theoremis somewhatlengthy,thekey idea(asnotedby ManseurandWilson) is asfollows: If the rootsof the four boundarypolynomials(Eq. (I) of Theorem5.5.1) of a templatecanbe rearrangedso that they match,thenthe templatecanbedecomposedinto a sum and productof threesmaller templates.

5.5.1Theorem (Manseurand Wilson). Suppose, ëAý?÷Cúoò�ê.-/ø&0�1 �/2 031 ù ø 2 ý ø ú 2 is a polynomialsuchthatù 1�1 ÷ ù 1 � ÷ ù - 1 , and ù - � are all nonzero. Define

ù ë>úDò7ê�42 031 ù 1 2 ú 2 ÷ û�ë>úDò7ê �42 031 ù - 2 ú 2 ÷

ü�ë>ýxòEê -4 ø�031 ù ø �Qý ø ÷ þ ë�ý,ò�ê -4 ø&0�1 ù ø*1 ý ø ÷(I)

and let 5 í ÷� � � ,÷ 5 � denotethe rootsof ù ë�úDò , 6 í ÷� � � )÷ 6 � denotethe rootsofû�ë�úDò

, 7 í ÷� � � /÷ 7 -denotethe rootsof

ü�ë�ý,ò, and let 8 í ÷� � � /÷ 8 - denotethe rootsof þ ë�ýxò .

If there existsan ordering of the rootssuchthat

5 í 5 ó 8 í 8 ó ê 6 í 6 ó 7 í 7 ó ù � þ 5 ô ����� 5 � 8 ô ����� 8 - ê 6 ô ����� 6 � 7 ô ����� 7 - (II)

237

Page 246: Image Algebra by Ritter

or such that

9;:<9>=@?A:B?A=DC�EF:BEF=HG<:<G<= IJLK 9NMPO�O�OA9�QR?MPO�O�OR?STC�E3MPO�O�ORE3QUGBMPO�O�OVGBSXW (III)

thenthere existspolynomialsYFZ\[ WB]A^�W`_ Z'[ W@]a^ , and b�Z�[ WH]^ suchthatc Z�[ WH]a^dC YFZ�[ WH]^>O�_ Z'[ W@]U^�e b�Z�[ WH]^�Wwhere

YFZ'[ WH]^fC=g hiFj

=gki3j Y

hlk[h]kW _ Z\[ WH]a^mC

SDn�=g hi3jQ�na=gki3j _

hlk[h]kW

and

b�Z\[ WH]a^dCSDn�:g hi :Q�n�:gki : b

h�k[h]ko

Conversely,ifc Z'[ WH]a^pC YqZ\[ WH]a^>Or_ Z�[ WH]U^>e b�Z\[ WH]a^ , where p, q, andr are definedas above,then

there existsan ordering of the rootsas describedin Eqs. (II) and (III).

Proof: Factor I Z ]a^�Wts Z ]A^BWtu Z\[ ^ , and K Z\[ ^ as follows:I Z ]a^mC�I j QLv ] Q ewO�O�ONe Z I j :yx I j Q ^�]ze Z I j�j x I j Q ^|{C�I j Qp} ] =f~ Z 9 : e�9 = ^\]zeX9 : 9 =H�F} ] Q�n�= e�O�O�ONe Z ~�� ^ Q 9 M O�O�OU9 Q�� W (i)

s Z ]A^fC�I�S�Q v ] Q ewO�O�ONe Z I�S�: x I�SfQ3^\]�e Z I�S j x I�SfQ3^�{C } ] =�~ Z E : e�E = ^']ze�E : E = �F} I S�Q ] QRn�= e�O�O�ONe Z ~�� ^ Q I SfQ E M O�O�OE Q � W (ii)

u Z\[ ^fC�I S�QLv [ S ewO�O�O�e Z I :�QAx I SfQ ^ [ e Z I j QAx I S�Q ^�{C } [ =p~ Z ? : e�? = ^ [ e�? : ? =@�F} I S�Q [ SDn�= ewO�O�ONe Z ~�� ^ S I SfQ ? M O�O�O? SD� W (iii)

and K Z\[ ^�C�IRS j v [ S e�O�O�O�e Z I: j x I�S j ^ [ e Z I j@j x I�S j ^\{C�IRS j } [ = ~ Z Gy:fe�G<=�^ [ e�G<:<Gy= �L} [ SDn�= e�O�O�ONe Z ~�� ^ S GBM�O�O�OAGBS � o (iv)

By substitutingappropriateroots in the aboveequations,oneobtainsthe relations

I j@j x I j Q�C Z ~�� ^ Q 9;:<9;=�O�O�OV9NQd� (v)

I S j x I SfQ C Z ~�� ^ Q E : E = O�O�OE Q W (vi)I j Q x I�SfQ�C Z ~�� ^ S ?A:B?A=tO�O�O?S�W (vii)

and I j�j x I�S j C Z ~�� ^ S G<:<G<=�O�O�OVG�S o (viii)

Now let

I: Z ]a^mC�?A:B?A=B] =p~ ?A:@?A= Z 9;:feX9;=�^']ze�?A:B?A=B9>:<9;=238

Page 247: Image Algebra by Ritter

and

�V���\�a�f�T�B�z���\��� ���R�V P¡�¡�¡��V� � �R¢ �¤£ ¡�¡�¡ £ �H�����\�p¥��A� �f�� ¦¡�¡�¡V���§N P¡�¡�¡V§N��¨SubstitutingEq. (vii) into Eq. (iii) showsthat �a���A�D�©�ª<���A� ¡ � � �'�a� . Next let

« ª��'¬F�d��­FªB­ � ¬ � �®­LªB­ � ��¯<ª £ ¯ � �'¬ £ ­FªB­ � ¯<ª<¯ �and « ���'¬q�m�°�H�������A� �f� ­  �¡�¡�¡ ­ � ¬ �D¢ ��£ ¡�¡�¡ �����(���p¥3�a� �f� ­  �¡�¡�¡ ­ � ¯  P¡�¡�¡ ¯ ��¨SubstitutingEq. (vi) into (iv) showsthat

« ��¬q�±� « ªy�'¬q� ¡ « � �'¬q� .Usinga similar argumentit canbeascertainedthatEqs. (ii) and(iii) canbewritten asproducts² �\�a��� ² ª �'�a� ¡ ² �y�'�a� and ³ ��¬F��� ³ ª ��¬F� ¡ ³ �<��¬F� , respectively.

The polynomial ´ �\¬�µH�a� is now definedby defining ´A¶¸· to be the coefficient of � · in � ª �'�a� ,´ � · the coefficient of � · in² ªy�'�a� , ´A¹ ¶ to the coefficient of ¬ ¹ in

« ª��\¬q� , ´A¹ � the coefficient of¬ ¹ in ³ ª<��¬F� , and ´ ª�ªº��» .In orderto definethepolynomial ¼ �'¬NµH�� , set ¼ ¶�· equalto thecoefficient of � · in � � �\�A� , ¼ �±¢ �y½ ·the coefficient of � · in

² � ���A� , ¼B¹ ¶ the coefficient of ¬ ¹ in« � �'¬q� , ¼B¹ ½ �R¢ � the coefficient of ¬ ¹ in³ � �'¬q� , and set all other coefficients equal to zero.

By defining ¾ �'¬NµH��¿�ÁÀ@�'¬Nµ@�U�p� ´ ��¬�µH�a� ¡ ¼ �'¬Nµ@�U� it follows from the conditionson the rootsthat the only indicesfor which the coefficients ¾ ¹ · of ¾ ��¬�µH�U� arepossiblynonzero,occurwhen�PÂÄÃD©ÅÆ��� and �PÂ�Ǻ©Ⱥ��� . That is, ¾ �\¬NµH�A� can be written as

¾ �\¬�µH�a�d� �D¢ªÉ

¹&Ê ª��¢ ªÉ· Ê ª ¾y¹ · ¬ ¹ � · ¨ (ix)

To prove the converse,observethat if À���¬�µH���� ´ �'¬NµH�A� ¡ ¼ ��¬�µH�U� £ ¾ �\¬NµH�A� , where ¾ �'¬NµH��is as in Eq. (ix), then Eqs. (i)—(iv) can again be usedto show that either § ª § �<¯ ª ¯<���­ ª ­ � � ª � � and §   ¡�¡�¡A§ � ¯   ¡�¡�¡ ¯ � � ­   ¡�¡�¡ ­ � �   ¡�¡�¡�� � or § ª § � � ª � � � ­ ª ­ � ¯ ª ¯ � and§   ¡�¡�¡A§ � �   ¡�¡�¡�� � �#­   ¡�¡�¡ ­ � ¯   ¡�¡�¡ ¯ � .

Q.E.D.

According to Eq. 5.4.3,any ËÍÌÎË templatecanbe decomposedinto a weakdecompositionof fiveÏ Ì Ï templates.However,given a ËÐÌ�Ë templatet which satisfiesthe hypothesisof Theorem5.5.1,then t hasa weak decompositionof only three

Ï Ì Ï templates

Ñ ��Ò £Ó�Ô £�Õ ¨239

Page 248: Image Algebra by Ritter

5.6 Polynomial Decompositionof SpecialTypes of Templates

Formanytemplates,theconditionslistedin thehypothesisof theManseur-WilsonTheorem(Theorem5.5.1) areoften difficult to establish.First the rootsof the boundarypolynomials ÖA×'ØaÙHÚ�Û�×\ØaÙHÚpÜ�×'ÝqÙ , andÞ ×'ÝqÙ haveto be determinedand thentheir orderedproducts(Eqs. (II) and(III) of Theorem5.5.1) mustbecomputed.Oncethis hasbeenaccomplished,the polynomials(templates)ßF×\ÝNÚ@ØaÙBÚ�à�×\ÝNÚHØaÙ and á�×'ÝNÚHØÙhaveto beconstructedasin the proof of Theorem5.5.1. Someof thesetaskscanbe simplified by usingcommerciallyavailablecomputeralgebrasoftwaretools. However,there is a large classof commonlyusedtemplateswhoseweak decompositioncan be ascertainedby simple inspection. Thesetemplatesexhibit specific symmetricproperties.

We begin our discussionby consideringpropertiesof symmetric and skew symmetric columntemplates.The treatmentof symmetricand skewsymmetricrow templatesis identical.

5.6.1 Definition. A polynomial ßF×'ÝqÙpâTÖRã�äXÖVå<ÝÍäXÖVæ<Ý æ ä�ç�ç�çNä�ÖèVÝ è is said to be symmetricwithrespectto n whenever ÖRéÍâêÖ èë é for ìÍâîíAÚ�ï�Ú�ð�ð�ð3Ú�ñ . A row templateis symmetricif itscorrespondingweight polynomial is symmetric.

Accordingto Eq. 5.4.1, the weight polynomialcorrespondingto a columntemplatet is of form

ò ×�ÝqÙmâ æ�óôé&õ ã Ö�éöÝ éU÷ (5.6.1)

Henceour interestwill be focusedon polynomialsthat are symmetricwith respectto an evenintegerñÆâùø�ú .

Another importantobservationis that Definition 5.6.1makesno provision for ßq×'ÝqÙ to be of degreen. For example,the polynomial ßq×\ÝqÙtâwûüÝÐä�ø�Ý æ û�Ýaý satisfiesthe symmetricpropertywith respectto ñ®âTþ since ßF×'ÝqÙpâ�í¿û�ÝPä�ø�Ý æ ûXÝ ý äXí¿ç�ÝAÿ . This also showsthat althoughn is even,the degreeof ßF×'ÝqÙ neednot be even.

Closelyassociatedwith the conceptof symmetryis the conceptof skewsymmetry.

5.6.2 Definition. A polynomial ßF×\ÝqÙfâ�Ö ã ä�Ö å Ý ä�Ö æ Ý æ äwç�ç�ç;ä�Ö è Ý è is said to be skewsymmetricwith respectto n wheneverÖ�é>âÄû�Ö è�ë é for ì�â�íAÚ�ï�ÚLð�ð�ðFÚ�ñ . A columntemplateis calledskewsymmetricif andonly if its correspondingweight polynomial is skewsymmetric.

Suppose���â í . If ßq×'ÝqÙ is symmetricwith respectto n, then

ï� è ßq× � Ùmâ Ö ã� è ä Ö å� èRë�å ä�ç�ç�ç�ä�Ö èâTÖ è ï� è ä�Ö èRë�å ï� è�ë�å äwç�ç�ç�äXÖ ãâXßF×�ï�� � Ù ÷

Similarly, if ßq×'ÝqÙ is skewsymmetricwith respectto n, then û å��� ßq× � ÙmâXßF×�ï� � Ù . Therefore,ßF× � Ùfâ�í�ßF×Bï�� � Ù;âTí for both symmetricandskewsymmetricpolynomials.This provesthe following theorem.

240

Page 249: Image Algebra by Ritter

5.6.3 Theorem. If �� ���� is a polynomialsatisfyingthe symmetricor skewsymmetricproperty withrespectto n, thena nonzero number� is a root of �� ���� if andonly if ����� is a root of �� ���� .

Suppose�� ���������� �"!#��$%!#�&��' . Since�� ������)(*!+(-,.�/!#��� ��!#�"$ !#���"'0!+(1,.��23!+(1,.��4 , �� ���� satisfiesthesymmetricconditionwith respectto 56��7 . Thepolynomial �� ���� canbefactoredas �� ������)���%�98� ���� ,where 8� ����:�;�<!>=$ �?!@� � . The factor �&� � hasdegreeA?�>5CBED�FHG� I�� ����J� , andleadingcoefficient equalto the leadingcoefficient of �� .��� . In addition, 8� ���� is of degreeD�F9G� K�� .���J�1BLA and is also symmetricwith respectto D�F9G� M�� ����N�*BLA . More generally,the following result holds:

5.6.4 Theorem. If �� ���� is a polynomialof degree k and �� .��� satisfiesthe symmetricproperty withrespectto n, then �� ������)O�P���Q98� ���� Rwhere SC�>5TB@U , O�P denotesthe leadingcoefficientof �� ���� , and 8� ���� is a polynomialof degreeUCB6S whichsatisfiesthe symmetric(skewsymmetric)propertywith respectto UCBVS .

Proof: Let �� .���:�)O�W3!CO = �X!Y,�,Z,�!CO P � P . If �� ���� is symmetric,then O Q �YO&[�\ Q �)O [�\-]^[�\ P`_ �O�P . If �� ���� is skewsymmetric,then O Q �aBbO�P . Thus, in eithercase O Q c��( . Therefore,�� ������YO Q � Q !LO Qed = � QNd = ,Z,Z,f!gO�P�� P�YO P � Q 8� ����"Rwhere 8� ����1�;hi�<! O Qed =O P �i! O QNd �O P � � !j,�,Z,f!g� P \ Q�Randwe usethe plus sign if �� ���� is symmetricandthe minussign if �� ���� is skewsymmetric.In either case, 8� ���� is of degree UTBkS .

Let 8� ����:�)l W !El = �m!n,Z,�,�!olJpq� p , where rs�)U?BTS and lJtu�YO QNd t���O�P for v*�)("R-�&R-wZw�w RHr .If �� ���� is symmetric, thenl9t-� O Qed tO�P � O ]x[&\ P`_ d tO�P � O [&\�] P \ tI_O�P � O P \ tO�P� O Qed ] P \ Q \ tK_O P ��lyP \ Q \ t*�)lHp \ t3zTherefore, 8� ���� is symmetricwith respectto r{�|U}B~S .

Similarly, if �� ���� is skew symmetric,thenl t � O Qed tO P � O [&\�] P \ tK_O P � O P \ tO P �;B�l p \ t zHence 8� ���� is skew symmetricwith respectto r��nU}B~S .

Q.E.D.

Note that this theoremis true for both evenand odd integersn.

241

Page 250: Image Algebra by Ritter

5.6.5 Theorem. Suppose������� is a polynomialwhich satisfiesthe symmetricpropertywith respecttoan evenintegern. If the degreeof ������� is k and �~���6�L� , then�������:�)�������Z�H���.�����Z�`�����b�Z���3��� �y� �J���N� �����"�where �H�.�����1� �+� ���a� �) � �<¡L¢ � � ¡ �£��� �i�V�T¤¥ E���-¦ �q§Y�1§a¨ � ��ª©

Proof: By Theorem5.6.4, ���.���m�«� � � � ���.��� , where ¦&¬y­��.���������®�«�T�E� . If k is even,then�T�V� is evensince �6�|�+�L� is even. If k is odd, then j is odd and,hence,�T�V� is even.Thus, in either case, �+�E� is divisible by 2.

Now if �1���i�)  , thenset �H�������:� � �>���.��� andtheresultfollows. If �X���¯¤°  , thenit followsfrom the FundamentalTheoremof AlgebraandTheorem5.6.3 that ������� canbe factoredas�������1�>���C�k±*���N�.�}� ��² ±*���N�.�}�E± � �N���¯� ��² ± � �b�Z�Z�1³��C�@± � �`� �´�K�J�´µ ³��}� �² ± � �`� �´�I�N�`µ� ³ � � ¡g¢ �H� ¡ � µ ³ � � ¡@¢ � � ¡ � µ ���Z� ³ � � ¡L¢ � �y� �´�I�J� � ¡ � µ �where ¢ �m�¶��±f��� ��² ±f� .

Q.E.D.

In contrast to Theorem5.6.4, the requirementfor n to be even is necessary. For example, if���������)·&�"¸ ¡V¹ �3º ¡V¹ � » ¡ ·��3¼ , then ������� is of evendegreebut symmetricwith respectto theodd integer�k�a½ . In this casewe have �������/��·�� ¸ ������� , where �������¾� � ¡ �¸ � ¡ �¸ � � ¡ � ¸ is of odd degreeandcan, therefore,not be factoredinto a sequenceof quadraticpolynomials.

Another observationis that in contrastto Theorem5.6.4, Theorem5.6.5 doesnot hold for skewsymmetricpolynomials. The polynomial ���.���¿�a� � � �

is skew symmetricwith respectto �g� ¹ , but� � � �ÁÀ�«� � ¡)¢ � ¡ �for any numberb. In fact, the polynomial � � � �

is a commonfactor of anypolynomial which is skew symmetricwith respectto an eveninteger.

5.6.6 Examples:

(i) Accordingto Eq. 5.4.1,the weight polynomialcorrespondingto a row templatet is of form

 ��Ã3�1� � ¨Ä�eÅ � � � à � © I.

If oneallows for complexroots,thenit follows from the FundamentalTheoremof Algebrathatt hasan exact factorization Æ+�ÈÇ ¡É@Ê

, wherep and q are of size at most�iË ��� ¡ � � since ��Ã"�}�Ì���.Ã"�/������Ã"� , where

���.Ã"�X� ¨Ä�NÅ � � � à � ����¦Í����Ã"��� ¨Ä

�eÅ � � � Ã � © II.

242

Page 251: Image Algebra by Ritter

For example,the row template

1 1 1 1=tÎ

1

hasweight polynomial Ï´Ð�Ñ3Ò¾ÓnԾեѯÕgÑ�Ö¾ÕLÑ&×�ÕLÑ&Ø which factorsasÏNÐ�Ñ"ÒXÓnÙNÔÚÕ~Û Ü´Ñ?Õ@Ñ Ö`Ý ÙNÔÚÕ@Þ`Ü�ÑqÕ@Ñ Ö`Ý&ßà¿á3âZãNâ Û%Ü¾Ó ÔÚÕgä åæ ç�è é>Þ`Ü�Ó Ô¾ê@ä åæ ëThus,

+ì 1 11 1=tí

pî qï1 1

(ii) If d is a diagonal template,then the weight polynomialof d is of formð"ñ�òfó´ô�õ1ö£÷�øù úIû%ü:ý úxú ò ú ô ú�þHowever,it is moreconvenientto representdiagonaltemplatesin termsof polynomialsof onevariable, namely ð"ñ�ò�õ�ö£÷�øù úMû%ü ð ú ò ú ówhere

ð ú ö ý úxú.

It follows from (i) abovethat suchtemplatescan alwaysbe factoredexactly into two diagonaltemplatesof smallersize (seealsoO’Leary’s Theorem(5.3.4)). For instance,a ÿ��~ÿ diagonaltemplatewill havedecompositionof form

+==d�

d�

d�

d�

d�

d�

pîpî

pîqï

qïqï

1

112

2 23

3 3

5�4

�243

Page 252: Image Algebra by Ritter

We turn our attentionto the decompositionof skewsymmetricrow or columntemplates.

5.6.7 Theorem. If ����� is a polynomialwhich satisfiesthe skewsymmetricproperty with respecttoan eveninteger n, then ��� ���������������������� �where ����� is a polynomialwhich is symmetricwith respectto !"�$# .

Proof: Let !%�&#�' and �����(��)�*,+�).-�/+1020�03+4)656 5 . Since ����� is skew symmetric,)�7��8�,)�5:9;7 for <=�?>@�A�:��B�B2B �C' . Also, since )�DE�8�,):D , )�DE�F> . Therefore,

���G�H�I� � DJ 7LKM* )�7N�DJ 7OKM* )�7�+ � DJ7LK�D )�7� DJ 7LKM* ) 7 �DJ 7OKM* ) 7 �F>�P

Thus, Q�8� is a root of ����� and ������ hasa commonlinear factor /��� .An analogousargumentshowsthat ���R�S�T�U�8> . Therefore,��� �� hasa commonlinear factorV+W� . Hence ���$�H�R��X+Y�T�Z�[ � �\� is a commonfactor of ������ and ������ canbe written as��� ���������������2�����M�where �����(�]�C*^+���-�/+1020�0Z+Y�C5:9 � 5:9 � . It remainsto be shown that ��� �� is symmetricwith respectto !\�Y# .Note that�����3�]� M�_�$�2�����C*_+$��-�`+a0�020.�C5�9 � 5�9 ����b�c� * �\� - /�\� � � �d0�020N�\� 5�9 � 5:9 � +e� * � +W� - gf�+d0�0�0h+W� 5�9 � 5�b�c�i*U�\��-�j+$��C*k�W� � � � +$��l-_�m� f �@f_+n020�0020�0h+$�� 5�9�o �W� 5�9 � � 5�9 �_+$� 5:9 f 5�9@- +W� 5:9 � 5�Y) * +W) - j+n0�020A+$) 5 5 PTherefore, �W� * �Y) * �E�c) 5 �p�,� 5�9 � ��W��-,�Y).-q�E�c)�5�9@-q�p�,�C5�9 f �rTs�t � 7u9 � �m� 7 �Y) 7mvxw:y <z�F#g��B�B2B��G!/�\#kPThus, we have �C*"�{�C5�9 � and �l-/�n�C5:9 f .We now proceedinductively. Assumethat �C7��?�2| 5:9 �C} 9g7 for some <�~E� . Since� 7u9�- �W� 7���- ��) 7L��- �?�,) 5:9 | 7L��- } �

244

Page 253: Image Algebra by Ritter

we have that �C�L�A�q�[�:�6��� �O���R��� �C� � ���� �2� ��� � �L���R�O� ����� � �:��� �L���R� � � �C� � ��[� ���:��� � � � �L���R� � ��� ��� � �L���R� � �C� � � ��[�2���:��� � � � �L���R� � ���C��� � �L���R� � �C�:��� �L���R� ��[� ���:��� � � � �L���R�since,by induction,

� � � � ���������@� � ��� � � �R� ���C��� � �L���R�.

Therefore

������is symmetricwith respectto � ���

.

Q.E.D.

Combining the precedingthree theorems,we obtain

5.6.8 Theorem. If � � ��� is a polynomialof degreek satisfyingtheskewsymmetricpropertywith respectto an evenpositiveintegern, thenthere existsan integerj suchthat� ����I�[�6�T�6� � � � ��� � ���T� ������2�����q 2 � g��¡£¢ � �����¤where

� �denotesthe leadingcoefficientof � � ��� , ¥ �E� ¦ �¨§ � �m�

, and

�C�������is of form�C��� �����8© � ªx«Eª �[¬� � �e­ ��� � �®ª «bª � � ¤A¯�¯2¯�¤ ¥±° ��²

Proof: Let k denotethe degreeof � ���� . Thenaccordingto Theorem5.6.4, � � �����[�6��� � ������,

where

§ � � � ¦,

�6�denotesthe leading coefficient of � ����� , and

������is a polynomial of

degree

¦ �³§which satisfiesthe skewsymmetricpropertywith respectto

¦ �Q§.

Sincen is even,

¦ �\§is even. Thus, we can apply the resultsof Theorem5.6.7 to

�������in

order to obtain ������I� � � � �%� � � �l����M¤where � � ����� is a polynomial of degree

�¦ �³§ � �E�which is symmetric with respectto¥ �´�¦ �³§ � �e�

. Since l is even,Theorem5.6.5 can be appliedto � �l���� . Since the degreeof � �2���� is l, � �2�����Z��� ¡ �C�T��������2� ���k 2 � g��¡£¢ � � ��� ¤where

�C��� ���^�8� � ��­ �µ� � �for

ª^¶]�. However,accordingto the proof of Theorem5.6.4,

the leadingcoefficient

� ¡ � �. Therefore,� ����I�F�6��� � � � � �%� � � �l�����F�6���;� � � � �%� � �C�T� ������2�����q � � g��¡·¢ � ���� ²

Q.E.D.

245

Page 254: Image Algebra by Ritter

Accordingto Theorem5.6.5, any symmetriccolumntemplatewhoseweight polynomial is given byEq. 5.6.1 can be decomposedinto a productof at most ¸ ¹�º¨»M¼R½�¾S¿YÀ templatesÁ^ÂFà ¿Ä Á�Å ¿Ä Á�Æ ¿ÄÈÇ�Ç2Ç ¿Ä Á:ÉOÊlË6ÌÎÍuÏ ÆzÐ

(5.6.4)

where s denotesthe one-pointtemplatedefinedby

ÃlÑ ¸�ÒZ¼ Â8Ó�Ô Ê ÕLÖ Ò Â�×Ø ÕÙÖ Ò%ÚÂ�× Ðand

Á�Ûis of form

1

1

=i

itÎ

for Ý=Þpß�àAá�á2á�à�â�ãXä"ågæèç�é . In particular,the convolution ê³ëì\ícanbe achievedin termsof at mostâã`ä"ågæèç�é convolutionsusing only î/ï%ß templates:

ê"ëìðí Þ?â ñmëì\í�ò æ3ëìmí�ó ëì®ô�ô2ô ëìmíTõLö�÷6øGùLú ó àwhere ñ´Þüû ö ô ê .

Similarly, if t is skew symmetric, then accordingto Theorem5.6.8, t is the product of at mostýó ë?é templates í Þ[þVëì$ÿ ëìmí ò ëìmí ó ëìÈô2ô�ô ëìðí ý ú ó à (5.6.5)

where s and�

are as aboveand

=

1

-1

r�

Therearecertainpolynomialswhich arealmostskewsymmetricandcanbe decomposedusing thedecompositionmethodfor skew symmetricpolynomials.

246

Page 255: Image Algebra by Ritter

5.6.9 Definition. A polynomial ������� ������������������ � ����������������� ��� is saidto beskewsymmetricwith respectto its pivot coefficient ��� if ��� "!����#�%$&� for ' )(&*+�*-,.,�,/*102!3+ . A columntemplateis skewsymmetricwith respectto its targetpoint if its correspondingweightpolynomialis skew symmetricwith respectto its pivot coefficient.

For example,the polynomial ��#���45� � �76���!3+ is not skew symmetricsince ����82!9�:�;$<� , but��#��� is skew symmetricwith respectto its pivot coefficient � � .If ��=���>3� � �?� � �@�A� � � � �B���.�C�?� ��� � �#� is skewsymmetricwith respectto its pivot coefficient��� , then �������D?�1���������?E�#��1*

where �/�.����� is skewsymmetricwith respectto 6�0 and E������DF����� � . Thus, �1�.�#�� canbe decomposedusingthe methodsof Theorem5.6.8. Therefore,if t is a columntemplatewhich is skewsymmetricwithrespectto its target point, then GHJIK�3L , whereu is the one point template

LM1�=N>�� O ��� PRQANS3T( PRQAN?83Tand v is the compositionof at most U� � 6 templatesgiven by Eq. 5.6.5. The convolution VS�W G can,therefore,be accomplishedin termsof at most U� � + convolutionsusingonly X@YA+ templates:VS�W G 5Z[�����[�\�=]^�WA_ �`�W G��a�1�����b�W G Udc ��e �gf%*where ]hi��jk��V and f7l���m��V .

Havinglaid thefoundationfor thedecompositionof symmetricandskewsymmetricrow andcolumntemplates,we now extendtheseideasto two-dimensionaltemplates.

5.6.10Definition. A polynomial of form ��#�C*�n<�o �p�Rq/�srpt q1� ��� t � � n t �p�Rq/� � � �<�#�=n<� , where �&����n<�orpt q/� � � t n t for '� (<*C+�*,�,.,u*/0 , is calledsymmetric(respectivelyskewsymmetric) with respectto

y if �&����n<� is symmetric(respectivelyskewsymmetric)with respectto n for all 'vw(<*u+�*C,�,.,u*&0 .

A template t is said to be symmetric(respectivelyskewsymmetric) with respectto y if itscorrespondingweightpolynomialis symmetric(respectivelyskewsymmetric)with respectto y.

A similar definition can be given for the variable x. However, one can always restrict thedecompositionmethodologyto the y variable by simply transposinga templatewhich is symmetricor skew symmetricwith respectto x and then taking the transposesof the resultingsmaller templateswhich are symmetricor skew symmetricwith respectto y.

5.6.11 Theorem. If ���=�x*[n<� is anypolynomialof twovariables,then�����x*[ny�`A�/�.�=�C*�n<��� �/�.�=�x*\n<� , where�1�.�=�x*�n<� is symmetricwith respectto y and �1�.�#�C*�n�� is skewsymmetricwith respectto y.

247

Page 256: Image Algebra by Ritter

Proof: Supposez{�|x}�~<�%�����R�/�?��� �1�1� � � | � ~ � . If one rewrites z{�|x}�~�� as

z�{�|x}�~��`� ��� �1� � � � ~ ��� | �� � �/� ��� � ~ �`� |/� �� � �/� � � � ~ �`�i�.���x� | � ��� �/� � � � ~ � }then it is easyto seethat eachterm | � ��� �/�u� � � ~ � can be decomposedas

| � ��� �/� � � � ~ � � | � ��� �/��� � � � � � ��� ��� �� � � � �b� � ��� ��� �� � ~ �� | � ��� �/��� � � � � � ��� ��� �� � ~ � � | � ��� �/�-� � � �b� � ��� ��� �� � ~ �� | � z � � {�~<� � | � z � � {�~<�<}

where z � � {#~<�>� ��� �/�-� � � � � � ��� ��� �� � ~ �7�.�� z � � {�~<�D� ��� �/�-� � � � � � ��� ��� �� � ~ �D�It follows from the definition of thesetwo polynomialsthat z � � {#~<� is symmetricwith resectto n and that z � � {�~<� is skewsymmetricwith respectto n for all ���F�&}C �}C¡�¡�¡/}1¢ . Therefore,the polynomial

z � {�|x}[~<��� �� �R�/� | � z � � {=~<�is symmetricwith respectto y and the polynomial

z � {�|x}[~<��� �� �R�/� | � z � � {=~<�is symmetricwith respectto y.

Obviously, z � {�|x}�~�� � z � {=|x}[~<�k�Jz�{�|x}[~y� .Q.E.D.

The theoremimplies that any templatet whoseweight polynomial is given by Eq. 5.4.1 can bedecomposedinto a sum £k�F£ � � £ � , where £ � is symmetricand £ � is skewsymmetric.

248

Page 257: Image Algebra by Ritter

5.6.12 Example: Let t be the templatedefinedby

=tÎ

1

2¤3¥4

6§7¨8

9©10

11

12

13

14

15

16

17

18

19

20

21¤22¤23¤24

25

and let ª«¬R­1® ª«¯ ­/®u° ¬ ¯;± ¬³² ¯ representthe weight polynomial of t.

Using the equations

´ ¬ ¯�µ ª¶ ¯ ­/®-· ° ¬ ¯¹¸ ° ¬�º »�¼ ¯½ ¾À¿.ÁÂÄà ¬ ¯%µ ª¶¯ ­1®Å· ° ¬ ¯¹Æ ° ¬�º »�¼ ¯½ ¾to computethe coefficientsof the templatesÇ�È and ÇÊÉ , respectively,we obtain

=tí

1 2Ëtí =

-10

-10

-10

-10

-10 -5

-5

-5

-5

-5 5Ì5Ì5Ì5Ì5Ì

10

10

10

10

10

11

12

13

14

15

11

12

13

14

15

11

12

13

14

15

11

12

13

14

15

11

12

13

14

15

andÍ

with Î�Ï Ð3Î�ÑÓÒÔÎ .249

Page 258: Image Algebra by Ritter

The templateÕ�Ö in the aboveexampleis skewsymmetricwith respectto y andcanbe decomposedinto the product Õ ÖÅ×mØÅÙÚ?Û , wherer ands are the row andcolumntemplatesgiven by

=

10

10

10

10

10

andÜ sÝ= 1-1 -1/2 1/2rÞ

respectively.

The row templater is skew symmetricwith correspondingweight polynomial given by ß�à�á<âäãá�å%æJçè�á�é%ê�çè�ákêìë . According to Theorem5.6.8, ß�à�á<â¹ãBí�á è êsë.î1í�á è ægï ç áÅæsë�î . Obviously, ï ç ãBçè .Hence,r can be factoredinto the product ðkãmð ç æñ ð è , where ð ç and ð è aredefinedby

r =1

r =2

andÍ-1 1 1 11/2

The templates on the other hand is symmetric,with correspondingweight polynomial given byòôó�õö9÷5øúù�õ<û%üFø�ù�õ<ý%üFø�ù�õ/þ`üFø.ù�õÿüFø.ù . Applying Theorem5.6.5, one obtainsòôó�õ�öD÷mø.ù����.ó�õ�ö�� þ ó�õ�öv÷mø.ù���õ þ ü���� õkü ø���õ þ ü�� þ õÿüsø� Since �=õ þ ü����úõkü ø���=õ þ ü�� þ õ@ü ø�4÷ õ û ü õ ý ü õ þ ü õ�ü�ø , it is not difficult to ascertainthat ����÷ ����� �þand � þ ÷ ��� � �þ satisfiesthis equation. It follows that � ÷ ø�ù�ó � � ü� � þ ö , where

s� =1

s� =2�andÍ1

1

1

1

1b�

2�b�

Thus, ���! #"$&%('*)!+, '*�-+,�. )-+,�. ��/ . By defining 01 2'*)3+,�. ) and 4� 2'*�3+,�. � , onemay write �� asa productof two 576�5 templates;namely � � 8"�$&%90:+, 4;/ , where

u< v= =+ +

-1 1

-1 1 1 1

1

1b>

2?b>

1

1b>

2?b> 2

?b> /2@

1/2

1/2

250

Page 259: Image Algebra by Ritter

The reasonfor theeasydecompositionof A�B into the productof two CEDFC templatesis that A�B is notonly skew symmetricwith respectto y, but alsosymmetricwith respectto x. In contrast,the templateA�G in Example5.6.12 is symmetricwith respectto y but hasno symmetrypropertywith respectto x.Hence,decomposingA�G into a productof a row and columntemplateA�GIH2JIKL�M , where

r = sÝ =andÜ1 1 1 1 1

11

12

13

14

15

then r is necessarilysymmetricwith respectto y, while s hasno symmetrypropertywith respectto x. Although r can be decomposedinto two NIO1P row templatesby useof Theorem5.6.5 (seealsoExample5.6.6for a decompositionof this template),we havenot exploredmethodsfor decomposingthenonsymmetriccolumntemplates into two PQOFN columntemplates.Thusthequestionarisesasto whetheror not R�S canbedecomposedinto a productof P!OTP templates.The next theoremanswersthis question.

5.6.13Theorem. If U�V�WYX�Z\[^] _`acb�d e`f b�dhg a f W a Z f is symmetricor skewsymmetricwith respectto y andg d�dFi]2j i] g _ d , thenthere existpolynomialskhV�WYXlZ&[�XnmoVpW�XlZ&[ , and qoV(WYX9Zr[ of form

ksV(W�XlZr[t] uv acb�duvf b�d k a f W a Z f X moV�WYX9Zw[t] _yx uv acb�d e x

uvf b�d m a f W a Z f X g{zY|qoV�WYXlZ\[t] _yx Sv acb S

e x Svf b S q a f W a Z fsuchthat U9V�WYXlZ\[I]}ksV�WYX9Zw[�~�moV�WYXlZ&[t��qoVpW�XlZ&[ .

Proof: Since U9V�WYX9Zw[ is eithersymmetricor skewsymmetricwith respectto y, it follows thatg d e i]�j and g _ e i]�j . Using the notation employedin the Manseur-Wilson Theorem,theboundarypolynomial g V(Z\[ is either symmetricor skew symmetric,dependingupon whetherU9V�WYX9Zr[ is symmetricor skew symmetric,respectively. In either case,accordingto Theorem5.6.3, eachroot of g V�Zr[ canbe pairedwith its reciprocalandwe canchooseg SVpZ\[ and g u VpZ\[such that � S � u ]2N��*��� ��� ~�~�~ � � ]�N (i)

Similarly, since �V(Zr[ is symmetricor skewsymmetric,we canchoose� S VpZ\[ and � u V�Zr[ suchthat� S � u ]2N��*��� � � ~�~�~ � e ]2N (ii)

251

Page 260: Image Algebra by Ritter

Combining (i) and (ii), we obtain�������3���h�9�����*��� ��������&�Y��������������r� (iii)

Also, since  l¡(¢�£�¤r¥ is symmetricor skewsymmetric, ¦¡(¢h¥ �¨§ª© ¡(¢s¥ . Therefore,« � « �¬�®­w�9­\�¯�°��� « ������ «�± ��­&�������­ ± (iv)

But (iii) and (iv) imply������� « � « �-���h�����9­\��­\�²�°��� �Y������{�Y³ « ������ «�± �������������³{­&������&­ ±Thus,the conditionsof the Manseur-Wilson Theoremaresatisfied andthe result follows.

Q.E.D.

The theoremshowsthat the ´�µ1´ template¶ � definedin Example5.6.12can be decomposedintoa weak sum of at most three ·Tµ�· templates.

Theproof of the next theoremprovidesa simplemethodfor decomposingrectangulartemplatesthatexhibit symmetryat their corners.

5.6.14Theorem. If  9¡�¢Y£l¤&¥ � ±¸¹»º�¼ ³¸½ º�¼�¾ ¹ ½ ¢ ¹ ¤ ½ hasthe property that ¾ ¼�¼ � ¾ ¼ ³T� ¾ ± ¼ � ¾ ± ³¿�¨À and¾ � ¼ � ¾ ¼ � , ¾ ±3Á ³�Â��7� ¾ ± Â�� Á ³ , ¾ ± Â�� Á ¼ � ¾ ±¬Á � , and ¾ ¼ Á ³�Â��Ã� ¾ �p³ , then there existpolynomialsÄ ¡p¢Y£9¤w¥l£�Åo¡p¢�£l¤r¥ , and Æo¡�¢Y£9¤w¥ suchthat �¡p¢�£l¤r¥ � Ä ¡p¢�£l¤&¥ � Åo¡�¢Y£9¤w¥�Ç�Æo¡p¢�£l¤&¥�£where Ä ¡�¢Y£l¤&¥ � �È ¹cº�¼

�Ƚ º�¼ Ä ¹ ½ ¢ ¹ ¤ ½ £ Åo¡(¢Y£l¤r¥ � ± Â��È ¹»º�¼³oÂr�Ƚ º�¼ Å ¹ ½ ¢ ¹ ¤ ½ £

and Æo¡(¢�£l¤r¥ � ± Â��È ¹cº �³oÂ��Ƚ º � Æ ¹ ½ ¢ ¹ ¤ ½�É

Proof: Let Ä ¡(¢Y£l¤\¥ � ¢TÇ®¤ÃÇ�¢�¤ � Ç�¢ � ¤ andÅo¡�¢Y£l¤&¥ �ËÊ ¾ ¼ � Ç ¾ ¼ � ¤!Ç ����� Ç ¾ ¼ Á ³oÂ�� ¤ ³oÂ���Ì Ç�Í ¾ �γ ¢�¤ ³oÂr� Ç ¾ ��³ ¢ � ¤ ³oÂr� Ç ���� Ç ¾ ± Â�� Á ³ ¢ ± Âr� ¤ ³�Â��lÏÇ Ê ¾ ± � ¢ ± Â�� Ç ¾ ± � ¢ ± Âr� ¤!Ç ���� Ç ¾ ±¬Á ³�Â�� ¢ ± Â�� ¤ ³oÂ\��Ì Ç Ê ¾ � ¼ ¢ÃÇ ���� Ç ¾ ± Â�� Á ¼ ¢ ± Â\�sÌ ÉDefining Æo¡�¢Y£l¤&¥ by Æo¡�¢Y£9¤w¥ �  9¡�¢�£l¤&¥�Ð Ä ¡p¢�£l¤&¥ � Åo¡�¢Y£9¤w¥ providesfor the desiredconclusion.

Q.E.D.

Thepolynomial ¦¡(¢s¥ � ¦ ¼ ÇT¦ � ¢nÇѦ � ¢ � , where ¦ ¼ � ¾ ¼ � £F¦ �y� ¾ ¼�¼ , and ¦ �y� ¾ � ¼ , is calledtheupperleft-handcornerpolynomialof t. Upperright-handcornerandlower cornerpolynomialsaredefinedin a

252

Page 261: Image Algebra by Ritter

likewisefashion.Thus,if all cornerpolynomialsof a templatet aresymmetricandtheirpivot coefficientsare zero, then t can be decomposedinto a weak decompositionof threesmallertemplatesp, q, and r ,where p is given by

pÒ =

1

1

1

1

andthe templatesq andr canbeconstructedusingthedescriptiongiven in theproof of the theorem.

Introducing sign changesÓ9Ô!Õ in the valuesof the templatesp and q providesmethodsthat areanalogousto thosegiven in the proof Theorem5.6.14 for decomposingtemplateswhoseboundaryandcornerpolynomialssatisfy varioussymmetryconditionsdifferent from thosegiven in the hypothesisofthe theorem.

5.6.15Theorem. If Ö9Ó�×�Ø�ÙrÕ¬ÚÜÛÝÞ»ß�àâáÝã ß�à�ä Þ ã × Þ Ù ã hasthe property that ä à�à Ú ä à á Ú ä Û à Ú ä Û á Ú¨å andÖ9Ó�×YØ9ÙrÕ satisfiesthe following conditions:

1. ä à ã7æ å and ä Û ãÑç å for è1Úéå\Øhê�Ø�ë�ëëhØ�ì2. ä Þíà ç å and ä Þ á æ å for î!Ú#å\Ø�êoØ�ë�ëë�Ø�ï3. the upper left-hand corner and lower right-hand corner polynomialsare skew

symmetric4. theupperright-handcornerandlower left-handcornerpolynomialsare symmetric,

thenthere existpolynomialsðhÓ�×YØlÙ&Õ�Ø:ñoÓ�×YØlÙ&Õ , and òoÓp×�ØlÙwÕ suchthatÖ�Óp×�ØlÙrÕtÚ�ðhÓp×�ØlÙ&Õ�óñoÓ�×YØ9ÙwÕ�ô�òoÓp×�ØlÙ&Õ�Øwhere ðhÓ�×YØlÙ&Õ�Ú õö Þcß�à õöã ß�à ð Þ ã × Þ Ù ã Ø ñoÓ(×YØlÙrÕ÷Ú Û¬ø õö Þ»ß�à á ø õöã ß�à ñ Þ ã × Þ Ù ã Øand òoÓ(×�ØlÙrÕtÚ Û¬ø�ùö Þcß ù á

ø�ùöã ß ù òÞ ã × Þ Ù ã�ú

Proof: Let ðhÓ(×YØlÙ\ÕIÚû׿üâÙ�ü�×�Ù õ ô�× õ Ù andñoÓ�×YØlÙ&Õ�ÚËý ä à ù ô ä à õ Ù!ôËó�ó�óYô ä à�þ á ørù Ù á ø õ�ÿ ô�� ä õ á ×�Ù á ø õ ô ä�� á × õ Ù á ø õ ô óó�óYô ä Û¬ø�ù þ á × Ûyørù Ù á ø õ �ü ý ä ÛQù × Ûyø õ ô ä Û õ × Ûyø õ Ù!ô ó�óó�ô ä Û þ á ø õ × Ûyø õ Ù á ø � ÿ ü ý ä õ à ×Ãô ó�óó�ô ä Ûyø õ þ à × Û¬ø � ÿ úDefining òoÓ�×YØlÙ&Õ by òoÓ�×YØ9ÙwÕ�Ú�Ö9Ó�×�ØlÙ&Õ�ü ðhÓp×�ØlÙ&Õ�óñoÓ�×YØ9ÙwÕ providesfor the desiredconclusion.

253

Page 262: Image Algebra by Ritter

Q.E.D.

Note that accordingto the aboveproof, the templatep is given by

pÒ =

-1

-11

1

This reflectsthe appropriatecornersymmetriesof t. It should also be apparenthow other cornersymmetriesand boundary conditions could be utilized in order to obtain analogousdecompositionschemes.For instance,if the cornersof t areall zeroand the following conditionsaresatisfied

1. ������� and �� ����� for ���������������������2. ��� � �� and ��� ���!� for "#�������$���%������&3. the upperleft-handcornerand lower right-handcornerpolynomialsaresymmetric4. the upperright-handcornerandlower left-handcornerpolynomialsareskewsymmetric,

then setting ')(+*,�.-0/1�324*2�-657*�-�8459*�8:- ,; (+*,�<-�/=��>?� �<@ 5A� � 8 -B5�C%C�C,5D� �:E �$F @ - �$F 8:G 2�HI� 8 �$*�- �$F 8 5D��JK�L* 8 - �$F 8 5�C�C%C�5M� F @NE �L* F @ - ��F 8PO2 > � Q@ * F 8 5A� 8 * F 8 -B5�C�C%C�5M� RE �$F 8 * F 8 - ��FSJ G 5 > � 8 � *T5UC�C%C�5A� F 8 E � * F�J G �and defining V�(+*,�<-�/ by V�(�*��<-�/W�YXZ(+*,�Z-0/[2�'\(+*,�Z-S/]C ; (+*,�Z-S/ results in the decompositionXZ(+*,�<-�/W�')(�*,�Z-S/^C ; (+*,�Z-0/=5_V�(`*,�<-0/ .5.6.16 Example: If t is definedby

ta

=

1 2b

1

1 2b

3c

2b

1

2 3c

4 3c

2

1 2 3c

2 1

1 2b

1

thenthe cornerpolynomialsof t aresymmetric.Accordingto the proof of Theorem5.6.14,d�e+f,gZhSi�jlk?m�n<o�pMm$nNq<h#pAm�nKr�h qKs ptk?m�q+u�f�h q pAm�rKu�f q h qNs ptk?m$uNo:f q pDm�u<qNf q h s p9vwm�q�n�f0xjlkzy{pA|$h}pDh qNs ptk~|$f�h q pMf q h qNs ptk?f q pM|$f q h s p�vw|$f0xj�y{pA|�fTpDf q pD|�hBpAh q pD|$f�h q pA|�f q hBpMf q h q��254

Page 263: Image Algebra by Ritter

Hence,q is given by

q� =

1 2 1

1 2¤

1

and ����D�by

p� q� =+�1 2 1

1 2 4 1

2b

2b

8 2b

2b14

�2b

4�

1

1 2b

1

4

Since �����T������A�, we have

r =

-2 1 -2

1 -4 1

-2 1 -2

and �����D��D� �_� .

In the aboveexample,the templatet is symmetricwith respectto both x and y. In addition, thecenteredweight matrix correspondingto t is a symmetricmatrix. It may thereforenot be surprisingthatthe templatefactorsp, q, andr exhibit the samesymmetricproperties.Thus,it is naturalto askwhetheror not this phenomenonis true in general.The next theoremanswersthis questionin the affirmative.

5.6.17Theorem. If �N�+�, K¡�¢£� ¤¥¦ §�¨ ¤¥© §�¨«ª ¦ © � ¦ ¡ ©

satisfiesthesymmetricpropertywith respectto bothx and

y and if the matrix ¬U��� ª ¦ © ¢ ¤0­�¤ is symmetric,then there exist polynomials®)���, Z¡S¢< D¯��`�, <¡0¢ ,and °��`�� <¡0¢ suchthat

�K���� <¡0¢��A®)���� <¡�¢²±%¯��+�, Z¡S¢��D°����� <¡�¢� 255

Page 264: Image Algebra by Ritter

where ³)´+µ ¶K·0¸=¹ º» ¼ ½)¾º»¿ ½�¾

³ ¼I¿ µ ¼·¿

¶ À ´`µ ¶<·0¸Á¹ÃÂLÄ º» ¼ ½�¾ Â$Ä º»¿ ½�¾ À¼I¿ µ ¼

·¿

¶and Å ´`µ ¶<·0¸�¹�Â$Ä«Æ» ¼ ½ Æ

Â�Ä�Æ»¿ ½ ÆÅ ¼Ç¿ µ ¼

·¿

ÈProof: If É ¾K¾Ëʹ_Ì , thenby symmetry É Â ¾Íʹ_Ì and the result follows from Theorem5.6.13.Thesymmetryof the polynomialfollows from thefact that thepolynomialsÉ ´ ·0¸N¶ÏÎ ´ ·0¸N¶ÏÐ ´+µ ¸ ,and Ñ ´+µ ¸ definedin the proofsof either Theorem5.6.13or the Manseur-Wilson Theoremallhave,in this case,the samecoefficientsand, therefore,the samedecomposition.If É ¾Z¾ ¹�Ì , then againby symmetrywe have that É ¾  ¹ É Â ¾ ¹ É Â% ¹ÒÌ . The result nowfollows from Theorem5.6.14and the definitionsof

³\´+µ ¶Z·S¸<¶ËÀ ´�µ ¶<·�¸ , and

Å ´+µ ¶<·�¸ in the proofof 5.6.14.

Q.E.D.

In contrastto Eq. 5.4.3, the numberof Ó1ÔÕÓ templatesneededto decomposea Ö×ÔÕÖ templateisat most 3 if the templatesatisfiesthe symmetricconditionsof Theorems5.6.13, 5.6.14, or 5.6.17. Ingeneral,the numberof ÓØÔÓ templatesneededto decomposea

´+Ù$Ú6Û9Ü ¸ Ô ´�Ù$Ú1Û�Ü ¸ templateexhibitingthe symmetryconditionsdescribedin Theorem5.6.17 is at most

Ú,´KÚ6Û9Ü ¸�Ý Ù.

5.6.18 Examples:

(i) The Laplace template

l =

-1

4-1

-1

-1

satisfiesthe conditionsof Theorem5.6.14andcan,therefore,be decomposedas

+ +

1

1

-1

-1

11 -1 -1

2

2Þ 8

2Þ2

256

Page 265: Image Algebra by Ritter

This representsthe decompositioninto templatesthat exhibit the samesymmetricbehavioras l.A simpler decompositionof l into diagonaltemplatesis given by

+ß +ß1

1

-1

-1

This shows that the theoremsdiscussedin this chapterneed not provide the most efficientdecompositions.

(ii) The template

=

-13 2 7â

2 -13

21722172

22ã

27ã

22ã

7â2ã

1722ã

172ã-13 2

ã7â

-13

usedby Haralick [6] satisfiesthehypothesisof Theorem5.6.17. Adopting theconstructionusedin the proof of the Manseur-Wilson Theorem,resultsin the following decompositionof h:

+ä +

-13 -13

-13-13

-19.73

-19.73 -19.73

-19.73

1 1

1 1

1.5411 -1.672

-1.672

-1.672

-1.672 8.39 -28.943

257

Page 266: Image Algebra by Ritter

(iii) The template

=

1 1

11

is symmetricwith respectto y, but doesnot satisfythe hypothesisof eitherthe Manseur-WilsonTheoremor thehypothesesof Theorems5.6.13, 5.6.14, or 5.6.17. It canbeshownthat t cannotbe decomposedas æ�çYè�éêDë é_ì , where eachp, q, and r is of size at most íïî�í [10].However,using LU factorization,t can still be decomposedas a weak decompositionof fouríïîDí templates.

(iv) Similar to example(iii), the template

ta

=

1 1

11

1 1 1

1 1

is symmetricwith respectto y, but doesnot satisfythe hypothesisof eitherthe Manseur-WilsonTheoremor the hypothesesof Theorems5.6.13, 5.6.14, or 5.6.17. Z. Manseurhasshownthat tcannotbe decomposedas ðTñóò`ð�ôBõö ð�÷%ø²õÃò`ð�ù}õö ð�ú%ø suchthat each ð:û is of sizeat most ü1ýWü[10]. Of course,employingthe constructivemethodusedin the proof of Theorem5.4.1, t canbe decomposedinto a weak sum ðWñþò`ð�ôBõö ð�÷%ø=õ7òÿð:ùØõö ð:ú ø=õ � such that each ð:û and r areüïýDü templates.

258

Page 267: Image Algebra by Ritter

5.7 Decompositionof Variant Templates

In this sectionwe shall be concernedwith decompositiontechniquesfor variant templatesthat areanalogousto the techniquesdiscussedin the precedingsections. We shall restrict our discussiontorectangulartemplates.

Rectangular����� variant templatescan be specifiedby a family of ����� matrices��� ������ �� �������������

, where! #"%$

,� �& �'���(��)�*+��,��-.� � � �0/ ��,%1324��5768�'.� � � ��/ �96:1;2<�=�

, and,>�'.� � � �

and68�' � � � �are definedby Eq. 5.2.1. The matrix

�0�� �is called the weightmatrix associatedwith t at y.

Whenevery is understood,we simply write T for��' �

and� ���

for� �-.� ���

.

In analogywith centeredweight matricesassociatedwith invariant templates,we also define thenotion centeredweight matricesfor rectangularvariant templates. In particular, if t is a rectangulartemplateand m and n are positive integerssuch that

"%? � � "@? � is the smallestrectangulararraycontaining ACB )EDGF�H FJI-K , then the centered weight matrix associatedwith t at

L�M�&N<O<5�N $ � is definedas��-.�P� � � �- � ��� � ? ��� ? � , where� �� � ��� �Q) * ��N<O / ,J5�N $ / 6R��5�1 �TS , SQ� , and

1 �3S 6 SQ� . Note

that since t is a rectangulartemplate,the array U ��N O / ,J5VN $ / 68�XW�1 �YS , SZ� 5[1 �\S 6 S;�%] is thesmallestrectangulararray which is centered at

��^�&N<O<5�N $ � and contains A ��) * � .Obviously,if

)�Z_ /`baand t is variant,then r ands cannotboth be invariant. However,it is often

possibleto decomposet into a pair of non-trivial smaller templatessuchthat one of the factors is aninvarianttemplate.Thus,again,thetransformcomputationcanbeoptimizedandtemplatescanbetailoredto fit particulararchitectures.Having onefactor invariantcanfurther enhancethe speedof computation.

As a first example,we decomposean arbitrary cd�ec template.

5.7.1 Theorem. If t is a cf�gc template,thenthere existtemplates) � 5.,h�Q2E5+iR5kj4jlj�5�m

, suchthat)�n�-) O /` ) $ � / �')lo /` )lp<� / �-)lq /` )�r<� / )lst5where

) O 5:)�oand

)lqare invariant uv�wu templates,and

) $ 5x)�ph5:)yr and)ls

are variant ud�wutemplates.

Proof: The centeredweight matrix��- �

associatedwith t atz�{��N<OE5�N $ � is of form

��- �|�}~~~~�� �- �>� $ H � $ � �-.�=� $ H � O � �� ��� $ H F � �� �J� $ H O � �-.��� $ H $� �� �=� O H � $ � �-.�=� O H � O � �� ��� O H F � �� �J� O H O � �-.��� O H $� �� � F�H � $ � �� � F�H � O � �� � F�H F � �- � F�H O � �� � F�H $� �� � O H � $ � �� � O H � O � �� � O H F � �- � O H O � �� � O H $� �� � $ H � $ � �� � $ H � O � �� � $ H F � �- � $ H O � �� � $ H $

�������^�

Define the threeinvariant ud�eu templates) O 5[) o

and) q

by

1

1

=1

1

1

3tå

=

1

1

1

15�tå =, , and

259

Page 268: Image Algebra by Ritter

Without loss of generalityset �������L�V���h� ��� and define

=24�tå =

t� -2,-2 t� -2,-1

t� -1,-2 t� 1,2

t� 2,1� t� 2,2

t� -2,1 t� -2,2

t� -1,2t� 1,-2

t� 2,-2 t� 2,-1

,

and

ta

=6

t� -2,0

t� 0,-2�

t� 2,0

t� 0,2�

Now let �l�f�^���Z�����l�P�� �l�4�%�������x�� �� <�%�;�'�¢¡P�� �l£l�-¤ . Then

���4�4�¦¥d�

§¨¨¨¨¨¨¨¨¨¨¨¨¨¨© ¨¨¨¨¨¨¨¨¨¨¨¨¨¨ª

«�¬ �V­ ¬ �®�(� «J¬ �V­ ¯®� « ¯�­ ¬ �4� °²±´³´�n�&µ<�®�3¶E·Vµ<�.�;¶<�« ¬ �V­ ¯ �z� « �¸­ � � « �V­ ¬ � � °¹±\³´�n�&µ � �3¶7·�µ � �«J¬ �V­ �[�z� «J¬ �V­ ¯®� « ¯�­ �4� °¹±\³´�n�&µ<�®�3¶7·�µ<�h�Z¶<�« ¯�­ ¬ �[�z� « �¸­ �.� «=¬ �V­ �<� °¹±\³´�n�&µ<�<·�µ<�®��¶<�« ¯�­ ¯[�(� «=¬ �¸­ ¬ � � « �V­ � � « ¯�­ � � «=¬ �¸­ ¯º� « ¯y­ ¬ � � « �V­ ¯4�»°¹±\³´�3¼« ¯�­ �®�(� « �V­ �h� «=¬ �V­ �4� °¹±\³´�n�&µ<�<·�µ<� �3¶<�« �V­ ¬ � �z� « ¯y­ ¬ � � « �V­ ¯ � °¹±\³´�n�&µ � �½¶7·�µ � �;¶<�« �V­ ¯[�(� «=¬ �¸­ �.� «=¬ �V­ ¬ �<� °¹±\³´�n�&µ<� �½¶7·�µ<���« �V­ �®�(� « �V­ ¯.� « ¯�­ �4� °¹±\³´�n�&µ<� �½¶7·�µ<�h�Z¶<�¾ ¿<ÀJÁ8Â�ÃJÄ °¹Å Â.ÆIt follows from thesedefinitions that

��n�-�l��� �l�4�%�3�'���:�� �� 7�k�3�-�l¡�� ��£<�%�w�l� ÆQ.E.D.

Theorem5.7.1 is void of any type of symmetry assumptions. If t satisfiescertain symmetricconditions,thenthenumberof computationscanbesignificantlyreduced.Thenext theoremis analogousto Theorem5.6.14.

260

Page 269: Image Algebra by Ritter

5.7.2 Theorem. If t is a Ç�ÈEÉËÊ3Ì<ÍÏÎ�Ç�ÈEÐÑʽÌ<Í templatewhoseassociatedweightmatrix Ò0Ç�Ó Í satisfiesthe following conditions

1. Ô�Õ×ÖÙØÚÕ�ÛzÜLÔ=Õ×Ö[Ø ÛzÜÝÔ-Ö[ØÚÕ×ÛzÜLÔ-Ö[Ø ÛzÜËÞ2. Ô Õ×Ö[ß%àVØÚÕ×Û ÜZÔ Õ×ÖÙØÚÕ�Û<ß�à.á Ô ÖÙØ ÛEÕ+à Ü3Ô ÖÙÕ+àVØ Û�á Ô ÖÙÕ+àVØÚÕ×Û ÜZÔ ÖÙØÚÕ×Û¢ß�à.á´â ÐkãzÔ Õ×Ö[Ø ÛEÕ+à ÜÔJÕ×Öºß�àVØ Û

then there exist three templatesp, q, and r suchthatä ÜnÇ&åbÊæbç Í%Êwè áwherep is a éêÎgé invariant templateand q and r are Ç�ÈEÉìë3ÌíÍ.ÎeÇ�ÈEÐXë;Ì<Í variant templates

Proof: Define q in termsof the centeredweight matrix ÒÇ�Ó Í as follows:

ç�î Ç&ï á'ð ÍhÜñòòòó òòòôÔ�õöÕ+àVØ ÷ øúùgïhÜ{ëÇ�Éìë3ÌíÍüû<ý+þTë(Ç�Ð�ë3Ì4ͺÿ ð ÿ3Ð�ë�ÌÔ�õúß�àVØ ÷ øúùgïhÜZÉìë3Ì\ûíý+þTë�Ç�Ð�ë�Ìíͺÿ ð ÿ3Ð�ë�ÌÔ õöØ ÷VÕRà øúù ð Ü{ëÇ�ÐXë3ÌíÍüû<ý8þ ë(Ç�É ëeÈ Í.ÿZïhÿ3É ëeÈÔ�õöØ ÷Jßkà øúù ð ÜZÐ�ë3Ì\ûíý+þTë�Ç�É ëeÈ Í.ÿ½ï ÿ3ÉìëwÈÞ ��������� ø�� ��

Note that the supportofç î

consistsof the non-zeroboundaryvaluesof ÒÇ'Ó Í and that theentriesof �êÇ�Ó Í (the matrix associatedwith

ç î) areall zeroexceptalongthe boundaryof the

matrix. Convolving q with

p� =

1

1

1

1

results in the template ������ which agreeswith t along the boundaryof ������� . Thus, thetemplate � �"!�#$������%� � is of size �'&�()#+*,�.-���&�/0#�*1�

Q.E.D.

The remarksand observationsthat followed the proof of Theorem5.6.14also apply here. Varianttemplateswhosecorner polynomialsexhibit specificsymmetrypropertiesand whoseboundaryvaluessatisfy certainsign �324� rulescan be decomposedinto weak sumsas �������� �5��� with appropriatesignchangesin the valuesof the templatesp andq definedin the proof of Theorem5.7.2.

In Sections5.2 and 5.3 we observedthat rank 1 invariant templatesare linearly separable.Thisobservationalso holds for invariant templates.

261

Page 270: Image Algebra by Ritter

5.7.3 Definition. A rectangulartemplatet has columnrank 1 if and only if there existsa columnvector u suchthat for every 687+9;: and for every column vector <�=>6@? in A�=�6�? , thereexistsscalars B�CEDGF�H suchthat <�=I6�?KJLB�CMDNF1H�OEP .

A similar definition can be formulated to define templateshaving row rank 1.Whenevery isunderstood,we write v for <�=�6�? and B C for B�CEDQF�H .5.7.4 Theorem. If t is a templatehavingcolumnrank1, thenthere existsan invariant columntemplate

s and a row templater suchthat R JTSVUW%X.YProof: Supposet is of size Z\[^]`_^6%7a9 : is arbitrary,and Ab=I6�? is the Zc[^] weightmatrixassociatedwith t at y. Let <5d,_E<5d,_;efegeh_�<;i denotethe columnvectorsof A�=I6�? . By hypothesisthereexistsa fixed columnvector PjJk='l d _ml : _;efegen_olEpb? andscalarsB Crq _hB C�s _;egefem_nB Crt suchthat <nu4JLB C�v O�Pw=3x`Jcy�_�z�_;efegem_h]`? .Therefore, A�=>6�?`J{=I<`d,_|< : _;efegen_�<ViE?J{='B C q O,P@_nB C s O,P@_;efegen_B C t O,P`?J{P0O,=�B C q _nB C s _;efegen_B C t ? Y (i)

Define the templatesr and s byX F =�}@?@J ~ B C v������ : =�}�?�J%�h=I6�? p u�i U�=�����y,?o_0yK�����+]`_��,��� � d =�}�?�J � d =I6�?� ���������� ��� � (ii)

and S F =>}@?@J ~ l u ���K� d =>}@?@JTx'=>6�? p u�i U�=3x;��y,?�_�y��$x@�+Zj_��1�m� � : =�}�?�J � : =�6�?� ���������� �I� � _ (iii)

respectively.

It now follows from (i), (ii), and (iii) thatR J$S4UW�X�YQ.E.D.

5.7.5 Example: Let  ¡J{9 : _�6�Jc=3¢,d,_o¢ : ?£7¤  , and letR 7{¥>¦`§£¨ § be given by

R F =I}�?�Jª©« ¬ z,­ v ��� }jJ8=�¢,d®�¤¯�_o¢ : U�='xnUTyf?�?o_°x�J{yr_mzz ­ vG± d ��� }jJ8=�¢ d �j²m_o¢ : U�='xnUTyf?�?o_°x�J{yr_mz�®³�Ogz ­ v ��� }jJ8=�¢,d®�¤³�_o¢ : U�='xnUTyf?�?o_°x�J{yr_mz Y262

Page 271: Image Algebra by Ritter

It is easyto verify that ´¶µ·�¸4¹�ºg»h¼ and that t is strictly rectangularand hascolumn rank 1.Figure 5.7.1 providesan illustration of t at location ´$½ ¹¿¾rÀ�ÁE¼ .

=(1,2)

2 4

4 8

-6 -12

Figure 5.7.1 The function Â,Ã�Ä�Å Æ�Ç with correspondingrectangleÈ0ÉIÂ1ÃÊÄËÅ Æ'Ç�Ì outlined in bold.

It is alsonot difficult to ascertainthat the row templater in the decompositionÂ�Í"Î4ÏÐ�Ñ isgiven by

rÒ =yÓ 2ã yÔ 12

ã yÔ2

while the column templates is given by

1

2

-3

yÓsÕ =

The notion of “column rank 1” hasthe following generalization.

263

Page 272: Image Algebra by Ritter

5.7.6 Definition. A rectangulartemplatehascolumnrankat mostk if andonly if thereexistk columnvectors Ö;×,ØhÖ5ÙgØVÚgÚgÚnØÛÖ�Ü such that for each ÝcÞ$ß Ù and every column vector v in à�á>Ý@â thereexists scalars ã�ähá�åhâ such that æ¤ç Üè é¿ê × ã�ähá�åhâVëfÖ

é�ì5.7.7 Theorem. If t is a templatehaving columnrank at mostk, then there exist k columnrank 1

templatesí × Ø�í Ù Ø;ÚgÚgÚhØ�í Ü suchthat í ç í ×.î í Ù�î ëgëfë î í Ü ìProof: Supposet is of size ïñð�ò , Ý%Þ�ß Ù arbitrary,andsupposeà�á>Ý�â is the ïñð�ò matrixassociatedwith t at y. Let

æ × Ø æ Ù Ø;ÚgÚgÚnØ æ�ó denotethecolumnvectorsof à�áIÝ�â . By hypothesis,there exist fixed column vectors Ö é ç áõô é�ö Ømô éõ÷ ØnÚgÚgÚnØmô é3ø â>ù�ؤå çûú ØmüýØ;ÚgÚfÚmØmþ , and scalarsã�ä�ÿIá åhâ such that æ � ç Üèé¿ê × ã ä�ÿ á åhâVëfÖ

é ìDefine the templatesí�� , whereby

� ç ú ØmüýØ;ÚgÚfÚmØmþ ,á�í � â��ná��@â ç ã�ä��á � â5ëgô � ÿ� ���� × á��@â ç�� áIÝ�â î ������ � Ù á���â ç åháIÝ�â î å� ���! #"�$&%('�)+*-,The weight matrix associatedwith .0/ at y is given by1 /32�46587�2!9;:=<>2&?�5A@�BA/�CD9#:�EF2+?�5G@HBA/�CAI0I�I�CD9#:�JK2&?�5A@�BA/�5 ,Since 1 / 2�485L7�B / @�2>9 : <!2&?�5!CD9 : EF2+?�5!CAI0I0IDCD9 : J�2+?�5#5for each 4NM�OAP , . / has rank 1.

Also, since QR /TSDU 1 /V2�485L7XW QR /YSDU 9#:�<!2&?&5G@�BA/�CQR /TSDU 9#:�EF2+?�5G@HBA/�CAI0I�I�C

QR /TSZU 9#:�J�2&?�5A@�BA/\[ ,7]2�^_U�C#^ P CAI�I0I�C`^Aa#5-7 1 2�485bCwe have that . 7 . Udc . P ce@0@�@Ac . Q ,

Q.E.D.

Sinceeachtemplate.\f in the abovetheoremhascolumnrank 1, it follows from Theorem5.7.4 thateachtemplate . f can be decomposedas . f 7hg f cikj f , where g f is an invariant column templateand

j fis a row template.The following corollary is, therefore,an immediateconsequenceof Theorems5.7.4and 5.7.7.

264

Page 273: Image Algebra by Ritter

5.7.8 Corollary. If t is a rectangulartemplatehavingcolumnrankat mostk, thenthereexistk invariantcolumntemplatesl0m�n�l�o0nqp0p0pDnFl\r and k invariant row templatess�m�n�s�o0nAp�p0pDnts�r suchthatuwv rx y�z m l y6{| s y=}

Similar resultscan, of course,be provedfor row rank k templates.

5.8 Local Decompositionof Templates

In orderto takeadvantageof thecapabilitiesof computerswith parallel,reconfigurable,or distributivearchitectures,thereis a needto understandthe processof computingglobal linear transformslocally. Inthis aswell asthe subsequentsectionwe discussnecessaryandsufficient conditionsfor the existenceoflocal decompositionsof linear transformationswith respectto directednetworksof processors.

For the remainderof this section let X be a finite set and ~ ��� � ��� a function such that��� ~�� �6������� � . We shall also assumethat � ����� n���� .We may view the elementsof X as processorsin a network. The assumptionthat ��� ~�� ��� can

be interpretedas meaningthat every processorin the network has direct accessto its own memory.Similarly, theinterpretationof � � ~�� �6� is thatprocessorx hasdirectaccessto thememoryof processory. Thus, ~�� ��� is a collection of processorsto which processorx has direct access. We call N aprocessorneighborhood configuration.

5.8.1 Definition. A templateu �e� � ��� � is said to be local with respectto N if and only if� � u0� ��� ~���� ��� � � � . If N is understood,thenwe say that t is a local template.

Ifu ��� �L� � � and t has a linear decomposition

u v�u m {| u o {|¢¡�¡0¡ {| u0£such that for each¤ �¥�=¦ nb�`nAp0p0pDn#§¨� u y is local with respectto N, then we say that the sequence� u y � £y�z m is a local

decompositionof t with respectto N. Again, if N is understood,then we say that t has a localdecompositionwheneversuch a sequenceexists.

Several conceptsfrom graph theory are essentialin our discussionof local decompositionoftemplates.The following list of definitionsdefinesthe necessaryconcepts.

5.8.2 Definition. A directedgraph, or digraph, is a pair © v �&ª(nb« � , where « � ª­¬®ª and Vis a finite set. The elementsof V are called the verticesof D. If �&¯qn!° �±� « , then �&¯qnt° � iscalledanarc (or edge) from x to y. If thereis need,we may write ª²�+© � v ª and «³��© � v «to emphasizethat V and E are the setsof verticesand arcs associatedwith the digraph D,respectively.

5.8.3 Definition. A graphG is a digraph ´ v ��ªdn#« � with thepropertythat �&¯qnt° �-� «¶µ·�+°¸nt¯ �¹�« . If �&¯qnt° ��� « , thenwe say that xy, or equivalentlyyx, is an edgeof G.

265

Page 274: Image Algebra by Ritter

5.8.4 Definition. Let º¥»¶¼&½8¾�¿±À be a digraphand Áq¾�ÂÄÃ�½ . An x-y walk in D, or a walk fromx to y, is a finite sequenceof vertices Á�»�Å�Æ�¾¸Å0Ç�¾AÈ�È0ÈD¾#Å0ÉKÊ�Ç�¾�Å\É�»� , suchthat ¼+Å\Ë+¾tÅÌËÎÍDÇ�À-Ã�¿for Ï�ÃÑÐ�Ò#¾AÓ�¾DÈ0È�ÈD¾�Ô�ÕÖÓ�× . An x-y walk is calleda closedwalk if Á�»¶Â .

5.8.5 Definition. Let ºØ»h¼�½(¾`¿ÙÀ be a digraphand ÁA¾�ÂÄÃ�½ . An x-y path in D, or a path fromx to y, is an x-y walk with distinct vertices,exceptpossiblyx and y.

5.8.6 Definition. Let ºØ»h¼�½(¾`¿ÙÀ be a digraphand ÁA¾�ÂÄÃ�½ . An x-y path in D, or a path fromx to y, is an x-y walk with distinct vertices,exceptpossiblyx and y.

A closedx-y path is an x-y path suchthat ÁÚ»Û .Thesequenceof verticesin anx-ywalk will bedenotedby Üݼ!ÁA¾tÂbÀ ; i.e., Üݼ&Áq¾tÂ;À-»]Ð�ÅÌÆ�¾`Å�Ç�¾AÈ0È�È�¾�ÅÌÉ¸× ,

where Å Æ »ÞÁ and Å É »ß .5.8.7 Definition. Let ºe»¶¼+½d¾b¿ÙÀ be a digraphand ÁA¾�ÂÄÃ�½ . We say that y is reachablefrom x

(in D) if thereexistsa path from x to y. If y is reachablefrom x and x is reachablefrom y,then we say that the pair Ð�ÁA¾tÂb× is mutually reachable(in D).

Note that if ර�¼+½d¾b¿ÙÀ is a graphand ÁA¾�³Ãá½ suchthat thereexistsan x-y pathin G, thenthereexistsa y-x path in G. Hencereachableandmutually reachableareequivalentnotionsin graphs.

5.8.8 Definition. Let ºe»¶¼+½d¾b¿ÙÀ be a digraph. We say that D is strongly connectedif andonlyif every pair of vertices Ð�Áq¾tÂ;×áâã½ is mutually reachable.If D is a graph that is stronglyconnected,then D is called a connectedgraph.

We nowsetupa connectionbetweentheprocessorneighborhoodconfigurationfunction äÞå;æç�è�éand digraphs.

5.8.9 Definition. Let ä å�æ ç è é be a neighborhoodconfiguration. For each êëÃhæ , let¿³¼�ä�¼�ê6À+Àá»ìÐ�¼�íd¾!ê¨ÀîåwíïÃÄä�¼�ê�À!× . The digraph of N, denotedby º�¼�ä�À , is the digraphdefinedby º�¼&ä�À�»N¼&æ�¾t¿³¼�ä�À+À , where ¿î¼�ä�À�» ðñ;ò é ¿î¼�ä�¼�ê6À>À .

A neighborhoodconfigurationN is called symmetric if and only if for every pair ê8¾=íóÃeæ ,ê�Ãkä�¼�í-À�ôõí�Ãöä�¼�ê�À . This notion hasthe following consequence.

5.8.10 Theorem. º�¼�ä�À is a graph ÷ N is symmetric.

Proof: Supposeº�¼&ä�À is a graph. Let êAÆ�¾#íqÆkÃNæ with êAÆÖÃãä�¼�íqÆ�À . By definition,¼�ê Æ ¾!í Æ À-Ãø¿î¼&ä�À . Since º�¼+ä�À is agraph, ¼�í Æ ¾!ê Æ ÀdÃø¿³¼�ä�À and,hence,¼�í Æ ¾!ê Æ À-Ãø¿³¼�ä�¼�ê Æ À!À .Therefore, í Æ Ã�ä�¼�ê Æ À and N is symmetric.

266

Page 275: Image Algebra by Ritter

Conversely,assumethatN is symmetricandthat ù�úqû�ü+ýAû0þdÿ��³ù���þ . Then úAûwÿ���ù�ýqû0þ and,bysymmetry, ý û ÿ���ù�ú û þ . Thus, ù�ý û ü!ú û þ�ÿ��³ù���ù�ú û þ!þ����³ù��þ . Therefore, ù�ý û ü!ú û þ�ÿ��îù��þand �ù���þ is a graph.

Q.E.D.

If N is symmetric,then we let �Ùù���þ denotethe graphof N.

The next theoremprovides necessaryand sufficient conditions for the local decompositionof atemplatewith respectto a givenprocessorneighborhoodconfiguration.Althoughthetheoremis disguisedin the languageof imagealgebra,it wasfirst statedandprovedby M. Tchuente[19, 18].

5.8.11 Theorem (Tchuente). If X is a finite point set and � �� �� ��� a symmetricneighborhoodconfiguration,thenevery � ÿ�������� � hasa local decompositionwith respectto N ���Ùù���þ isconnected.

Tchuente’stheoremis not asgeneralasonemight like. TheassumptionthatN is symmetricrestrictsthe type of multiprocessorsbeingmodeledto thosein which the datacan flow in both directionsalonganycommunicationlinks. In manyimportantcases,suchaspipelineandparallel-pipelinecomputers,andsystolicarrays,this assumptionis not valid [7, 12,15,3, 4]. In orderto providefor effectivecomputationsof linear transformsof thesetypes of architectures,P. Gaderproved the following generalizationofTchuente’stheorem[3, 4].

5.8.12 Theorem (Gader). SupposeX is a finitepointsetand ���� �� ��� a neighborhoodconfiguration.Theneverytemplate� ÿ!��� � � � hasa local decompositionwith respectto N �"�ù���þ is stronglyconnected.

Although Gader’sand Tchuente’sappearalmost identical, it happens— as is often true in graphtheory — that the casefor directed graphsis significantly different than for graphs[1]. There aretwo differencesbetweengraphsand digraphswhich emerge when one tries to use a straightforwardgeneralizationof Tchuente’sproof. Onedifferenceis thatanypermutationgraphcanbeaccomplishedbya sequenceof adjacenttranspositions.This is not necessarilytruefor digraphs(e.g.,considerthedirectedcycle). Another differenceis that for a connectedgraphthere is alwaysat leastone vertex which canbe removed,along with an edgeincident to it, suchthat the resultinggraphis still connected.This isnot necessarilytrue for digraphs(consideragain the directedcycle). Tchuenterelies on both of thesefacts in order to prove his theorem.

5.9 Necessaryand Sufficient Conditions for the Existenceof Local Decompositions

This sectionis devotedto the proof of Gader’stheorem.With the exceptionof someslight changes,we essentiallyfollow Gader’s proof by proving the theoremin stages. We first prove that strongconnectivityis a necessarycondition. We thenestablisha sequenceof theoremswhich showthat strongconnectivityis sufficient for permutationmatrices.Finally, we showhow certainmatrix decompositions

267

Page 276: Image Algebra by Ritter

can be usedin conjunctionwith the resultsfor permutationmatricesto deducethat strongconnectivityis sufficient in general.

5.9.1 Theorem. Let X be a finite point set and let #%$'&)( *�+ a neighborhood configuration. Ifevery ,.-0/�1�+�2 + hasa local decompositionwith respectto N, then 354�#76 is stronglyconnected.

Proof: Supposeto thecontrarythat 384�#�6 is notstronglyconnected,butthatevery ,.- / 1 +�2 +hasa local decompositionwith respectto N. Since 384�#�6 is not stronglyconnectedthereexistspoints 9�:<;=->& suchthat x is not reachablefrom y.

Let ?@- / 1A+ 2 + be definedby?CB�4EDF6�GIH5J KMLON G09QP�RTSUD�G0;V WYX[Z<\C]�^ K`_ \ :and let aQ-=1 + be definedby ab4cDF6�Ged J KML DfG0;V WYX[Z<\g][^ Kc_ \�hObservethat if b denotesthe image i>G�a�jk ? , thenb is given byil4 N 6mG noqp�rtsvucw[x ab4cDF6?yBy4�DF6AG H ab4�;z6'G J KvLON G09V W�X{Z<\|]{^ Kc_ \�hAccordingto our assumption,r canbe factoredas ?.G!?~}�jk ?���jk��C�y� jk ?�� suchthat each ?g�is local with respectto N.

Define ��4�9l6�G � N -�&�$�9 Kc_ ][\ P�� Z P��t� \ L ]{W�� N�� and for ��G J :T*�:��C�y�T:T� , let i��eGaFjk 4�? } jk ? � jk��y�C� jk ? � 6 . We shall showthat i � 4 N 6mG VF� N -���4�9l6 and� �OG J :T*<:��C�y��:T� .

Supposethat for some N -���4c9�6 , iA}y4 N 6��G V . Thenthereexists D�-�& suchthat ?�}{� B�4�DF6��G Vand ab4cDF6 �G V . Since ?�}¡� BC4EDF6 �G V , D¢-�£z4�?�}¡� B�6¥¤e#�4 N 6 . Hence,z is reachablefrom w.However, accordingto the definition of a, since ab4�DF6��G V , we must have D G"; . Butthis meansthat x is reachablefrom y, contradictingthe fact that x is not reachablefrom y.Therefore, i } 4 N 6¥G V¦� N -���4�9l6 .Using induction, supposethat the claim holds for iA}�:TiA��:§�y�C��:Ti��©¨T} and for some �ª-� J :T*<:��C�C��:T� � . If the claim does not hold for i�� , then there exists N -e��4�9l6 such thati��C4 N 6��G V . Thus, again, thereexists D -0& suchthat ?g�� By4�DF6��G V and i��¡¨�}y4EDF6��G V . Byinduction hypothesis,D��-U��4�9�6 . Since ? �� B 4cDF6¥�G V , D ->£m4�? �� B 6�¤�#@4 N 6 and, hence,z isreachablefrom w. Also, since N -U��4�9�6 , x is reachablefrom z. Thus, x is reachablefromw, which leadsto the contradictionthat D�-0��4c9�6 . Therefore, i��C4 N 6�G V>� N -0��4c9�6 and� ��-«� J :¬*�:��C�C��:T� � . Since i � G­i , we now have that il4 N 6 G V¯®T°�±=²�³�´�µ . But thiscontradictsthe fact that ¶ ³�´lµ¸·I¹ . Sincethis contradictionfollows from our assumptionthatr hasa local decompositionwith respectto N, our assumptionmustbe false. But this in turn

268

Page 277: Image Algebra by Ritter

contradictsthe hypothesisof the theorem. Hence,our original assumptionthat º8»¼@½ is notstrongly connectedmust be false.

Q.E.D.

5.9.2 Definition. If ¾À¿�Á�ÂAÃ�Ä Ã , then t is called a permutationtemplateif and only if Å�»c¾�½ is apermutationmatrix.

It follows from Theorem5.1.1 that if Å�Æy»�¾�½ is a permutationmatrix for someorderingof X, thenÅ�Çg»�¾�½ is alsoa permutationmatrix for any other orderingof X. Recall also that everypermutationcanbe factoredinto a product of transpositions(Section 3.3). Thus, every permutationtemplatecan befactoredinto a productof templatescorrespondingto transpositions.We identify thesetemplatesin thenext definition.

5.9.3 Definition. Let ÈQÉËÊÍÌ�Ê . For eachparameterÎÀÉQ»cÏmÐ�Ñz½l¿FÈ , define ¾ÓÒÔÈÖÕ�Á�Â�Ã�Ä Ã by

¾�»�ÏmÐ[ÑA½�×�»�ØF½�É�ÙÚ ÛÀÜyÝ »EØF½ßÞvàÀáâÉ0ÑÜyã »cØF½ßÞMàOáâÉ0ÏÜ × »cØF½ ä�å{æ<çCè[éêÞMëìç�í (5.9.1)

the template¾�»îÎ�½ is called the exchangetemplateassociatedwith p.

Observe that the exchangetemplate ¾�»�ÏzÐìÑl½ is the permutationtemplate correspondingto thetranspositionï�¿@ð à definedby ï7ÉQ»�ÏzÐ[Ñ�½ . That is, ï interchangesx with y andleavesthe remainingelementsof X fixed. This observationfollows from Eq. 5.9.1which saysthat ¾�»�ÏzÐ[Ñ�½ × »EØF½�É=ñ if Ï7É0Øand á5É�Ñ , or if ÑUÉ�Ø and á5É�Ï , or if á5É�Ø . Thus, if ò�¿�ÂAà and óUÉ�òFôõ ¾ , then

ól»Eá<½mÉ ÙÚ Û òb»cÏ�½¢ÞMàOáâÉ0Ñòb»cÑz½ßÞMàOáâÉ0Ïòb»cá<½ äYå[æ<çgè[éqÞcë�ç�í5.9.4 Theorem. Let ¼ Ò<Ê­Õ÷ö�à a neighborhoodconfigurationon X and ÏzÐÔÑ>¿�Ê . Supposethere

existsan x–y path ÈAÆ�ÒøÏ�É0Ï�ù�Ð<ÏAÆ�Ð�úCúCú�Ð[Ï�ûgü�ÆYÐtÏ'û�É>Ñand an y–x path È Ç Ò�ÑýÉ0Ñ ù Ð<Ñ Æ Ð�úCúyú§Ð{Ï�þ üTÆ Ð<Ï�þ�É0Ïin º8»¼�½ . If È�Ò.Ï7É0Ïbù�ÐÔÏAÆ�Ð�úCúCú�Ð[ÏAû|üTÆ�Ð<Ï'ûYÐ<Ñ'ÆyÐ�úCúyúTÐ[Ñ þ üTÆ�Ð<Ï þ É!Ïis a closedpath, thenthe exchangetemplate¾�»�ÏzÐìÑl½ is local with respectto N

269

Page 278: Image Algebra by Ritter

Proof: The proof is by construction.Relabelthe closedpathP asÿ������������� ������������� ���������sothat

������������ �! "�#�� , and

�����������$%�#�. Then&�' �()�+*+� &�' � � ,� *�-. &�' � ,��/0*1-.3242�2 -. &�' � �5�6 �� � *�-. &�' � �0� /�,� �5�� *�-.72�2�2 -. &�' � ,��/5*�-. &�' � � �� *�8

We shallshowthateachtemplate&9' �;: �� ��:<*

hasa local decompositionwith respectto N. It isinterestingto notethat the factorsof the decompositionarenot permutationtemplates.Figure5.9.1is helpful in understandingtheactionof thetemplateswe areaboutto describe.We beginby decomposing

&�' ���,�� 4*into a productof local templates

& = %-. & = / -.3242�2 -. & = / ���� .

For > �@?��A6!�4���B�CEDF?, define'G& H= $ *<I 'GJ *K�MLONQP R 'GJ *B- N�P�RTS�U 'GJ *WVYX�Z[��� $N I 'GJ * VYX�Z]\��� $ 8

For > �@C, define'^& = � *^I '^J *K� _` a N P�b^S�U '<J *cD N P�d 'GJ *WVYX�Z���� �N P�e 'GJ *;D N PQe S�U 'GJ * VYX�Z���� : gfK��Ah�i6;�������CjD#?N I '^J * k�l)m�n0o,p1Vrqsnt8

For > �@?��A6!�4���B�CED�i, define'<& = �u�6$ *<I 'GJ *K�ML N P Rwv4x 'GJ *;- N P Rwv9U '^J *WVYX�Z���� $y� /N I 'GJ * k�l)m6n0o)pzV{qyn+8

For > �|AQC}D�A, define'G& = / ��� /4*<I 'GJ *K�3_` a N P d 'GJ *cD N P b~S�U 'GJ *�V�X�Zj��� �N P e '<J *cD N P e S�U '^J * V�X�Zj���:s�f���iht��;���4�B�C�D�?N I 'GJ * kQl)mhn5o)pzV{qsnQ

and for >#�����}�F� , define�^��� � ���6���G���<�]� ���}����� �G�]�!� ����� �^�]�W�Y��� ��� �� � �G�]� �Y���] ��� �+¡By definition, each

� � � �is a local template. We need to show that

��� �;¢�£�� � � �� � � � �¤ � �H� ¥ �¤3¦�¦4¦ �¤ � � � ¥s��§��.

Let ¨ � ��© �¤ �G� � � � �¤ � � � ¥ �¤7¦�¦4¦ �¤ � � � ��§�� �andset ªt«���© � �« � . Then ¨ �

is given by

¨ � �^�6� �3¬­ ® �¯«Y°�¢ ª�« ����� ��� � £²±[��³6£;��£;´�´4´�£��µ�¶�© �^�h� ·�¸,¹hº�»s¼1�{½yº ¡If ¨ ¥ �¾¨ � �¤ � � � �

, then ¨ ¥is given by

¨ ¥4�G�h� � ¬¿¿¿¿­ ¿¿¿¿®�Q§��¯«Y° � ª « �Y��� ��� ¢ªQ¢ � ª � �Y��� ��� �¨ � �<�h� �Y��� ��� �µÀ�Á� ³  �ñ  �Ä�© �G�6� ·�¸,¹hº0»,¼1�^½sº ¡

270

Page 279: Image Algebra by Ritter

Let Å;ÆjÇ�Å�ÈÊÉË#Ì<Í�Î Ï Ð�ÑBÎ ÉËÃÍ4Î Ï ÐuÑ È�ÉË3Ò4Ò�Ò ÉËÃÍ4Î Ï È Ð�Ó Æ�Ô . Then

ÅÆ ÌGÕ Ô�Ç7Ö××Ø ××ÙÚÛÜYÝ È�Þ Ü ßáà Õ Ç�â Ú9ã�ä Çæå ã�ç6ã;è�è4è!ã�é�ê�ëÅ�È ÌGÕ Ô ß�à Õ Ç�â�ìîí�ï Õ Ç�â Îð Ì<Õ Ô í�ñ)ò�ó0ï)ô ß�õ ótö

Next set Å�÷]ÇøÅƲÉËùÍ�Î Ï È ÐQÓ È . Then

ÅÆ Ì^Õ Ô�Ç ÖØ Ù Þ Î ß�à Õ Ç�â ìÞ ì1É Þ Î ß�à Õ Ç�â Îð ÌGÕ Ô íQñ)òhó5ï)ô ß^õ ó�öFinally, let Å�úµÇøÅ÷²ÉËùÍ�Î Ï È ÐQÓ6Î . Then

Å ú Ì<Õ Ô�Ç ÖØ Ù Þ Î ß�à Õ Ç�âìÞ ì ß�à Õ Ç�â Îð Ì^Õ Ô3íQñ)òhó5ï)ô ß^õ ó�öSincewe also have Å�ú[Ç ð ÉË}Í9Ì âì ã â Î Ô , it follows thatÍ9Ì âì ã â Î Ô�Ç Í4Î Ï Î ÉËùÍ�Î Ï È%ÉË3Ò4Ò�Ò ÉË}Í�Î Ï È Ð�Ó�Î öTherefore,

Í9Ì â ì ã â Î Ô has a local decomposition.Using an identicalargument,we canconstructfor each ûgÇ�å ã�ç6ã;è�è4è�ã)üýê#ë a local decompo-sition þ Í Ü Ï Ú�ÿ È Ð�Ó�ÎÚ Ý Î of

Í�Ì â Ü Ó6Î ã â Ü Ô . We then have

Í�Ì�� ã�� Ô�Ç ���� ÜYÝ Î Í�Ì â Ü Ó�Î ã â Ü Ô�}ÉË � Î�ÜYÝ � Ó�Î Í9Ì â Ü Ó�Î ã â Ü Ô�Ç�� �� ÜYÝ Î� � È Ð�Ó�Î� Ú Ý Î Í Ü Ï Ú������ ÉË � Î�ÜYÝ � Ó6Î � È ÐQÓ�Î�Ú Ý Î Í Ü Ï Ú������ ö

Q.E.D.

Figure 5.9.1 below illustrates the action of the local decompositionofÍ�Ì âì ã â Î Ô on an arbitrary

input image a.

271

Page 280: Image Algebra by Ritter

� ��� ��� ��� ��� �! "$# "$# %$& �'(*) � " ( %+& �'(*) � " ( ",� ",�",� "$#.-/",� "$#.-/",� "+#0-/"1� "$#0-2",� "$#",� �'(*) # " ( ",� "1� ",� ",�"$� �'(*) # " ( "$� "1�3-/"+� "$� "$�...

......

......

..." %+& � %$& �'(*) # " ( " %+& � %+& �'(*) � " ( " %+& � " %+& �" %+& � %$& �'(*) # " ( " %+& � %+& �'(*) � " ( " %+& � " %+& ��547698 ��46:8 ��46:8 ��46:8 ��4698 ��47698

Figure 5.9.1 The mappingstagesof an input imagea in the local implementationof ; 4�<�#>=?<��@8 .5.9.5 Theorem. If A 4�B�8 is strongly connected,then ; 4�C3=�DE8 hasa local decompositionwith respect

to N.

Proof: Since A 4�B�8 is stronglyconnected,everypair 4C3=FDG8 is mutually reachablein A 4�BH8 .Thus, there existsx–y and y–x pathsI �KJKCMLN<�#O=P<��Q=�RSR@RT=?< %+& �Q=9C % LUDand I �KJKD�LWV5#+=PV��S=�R@RSR5=�VYX & �Q=YV5XNLZC\[IfI � and

I � haveonly verticesx and y in common,then the result follows from Theorem5.9.4. Otherwise,label the commonvertices < (^] =P< (*_ =�R@RSR5=�< (a` suchthat b �Kc b �Kced@dSdfc bg .For sakeof convenience,set b #hLWi and bjg?k �hLWl . Define m �Q= m �S=�R@RSR5= mOg by VYnjo�LW< ( o , where

272

Page 281: Image Algebra by Ritter

p0qsr+tYu9t5vSvSv5tPw. By our choiceof the x�y*z s, the closedwalks{M|K}K~ q x | t x!� t�v@vSvYt x y*� qN�:� � tP�T� ��� � t�v@vSv5t��Y��q ~{ � } x y � t x y � � � t�v@vSv5t x ya� qW� � � t9� � ��� � t�vSvSvYt�� � �

...{H��} x�y�� t x�y��?� � t�vSvSvYt x��+� � t x�� q��HqW� | tP� � t�vSv@vPt�� � �are all closedpaths. Furthermore,�+� ~ tF�G�Gq �>� ~ t x�y � �.�� �Q� x�y � t x�y � �0����S�S� �� �T� x�y ���Q� t x�y ��� �� �Q� x�y � tF���0�� �Y� x�y ���Q� t x�y ��� ����S�@��S�@� �� �Q� x�y � t x�y � �3�� �>� ~ t x�y � ���Sincefor each � qN�9t�r$t�vSv@vPtPw , each

{ y is a closedpath,eachof the templates� � x�y�z t x�y�z �Q�F�

has,accordingto Theorem5.9.4, a local decompositionforp�qW�:t�r+t�vSv@vPtPw0��r

. Hence�Q� ~ tF���

has a local decompositionwith respectto N.

Q.E.D.

If��� �j E¡ � ¡ is a permutationtemplate,thent canbefactoredinto a productof exchangetemplates.

Thus, if ¢ ��£ � is strongly connected,then accordingto the theoremeachof theseexchangetemplateshasa local decompositionwith respectto N. Therefore,t hasa local decompositionwith respectto N.This provesthe following corollary:

5.9.6 Corollary. If ¤�¥�¦H§ is stronglyconnectedand ¨�©Wª«E¬®­ ¬ is a permutationtemplate,thent hasa local decompositionwith respectto N.

It now follows that strong connectivity of ¤¯¥�¦�§ is a necessaryand sufficient condition for theexistenceof local decompositionsof all permutationtemplates.We now showthat this holds in general.

5.9.7 Lemma. Suppose°²±1³Q´:¥�µ¶§H·�¸º¹¼» and ¤¯¥�¦�§ is strongly connected. If for some ½¾·»+¿PÀ:¿TÁ@ÁSÁ5¿P¸¶Â�» there existstemplatesÃÅÄO¿PÆ�ÄÇ© ª «È¬ ­ ¬ suchthat

É ¥jÃÅÄŧG·ËÊÌÌÌÌÍÎ Ä�ÏPÐ ÑÓÒ Ñ ÒÂ Ô Â Ô Â Â ÂÒ Ñ ³?Ä Ñ ³?ÄFÕTÐ ÖSÖSÖ ³²×Â Ô Â Ô Â Â ÂÒ ÑÓÒ Ñ Î ×+Ï,Ä

زÙÙÙÙÚand

É ¥jÆ�ÄŧG· ÊÌÌÌÌÌÌÌÌÌÍÎ Ä�ÏPÐ Ñ Ò Ñ ÒÂ Ô Â Ô ÂÒ Ñ Û Ä Ñ ÒÂ Ô Â Ô ÂÑÜÛ�ÄÝÕ5Ð ÑÒ Ñ ... Ñ Î ×$Ï,ÄÑ Û × Ñ

Ø ÙÙÙÙÙÙÙÙÙÚ ¿273

Page 282: Image Algebra by Ritter

where eachO denotesa zero-matrix of the appropriate dimension,then ÞÅß and à?ß have localdecompositionswith respectto N.

Proof: We considerà ß first. Let áãâåä²æ!çQè9æ�çSè�é@éSé5è,æ�êYë denotethe orderingusedto defineì. If íUîZïGð and ñ�âòí¶óô à ß , then b is given byñEõjöG÷øâ�ùú û í�õö3÷ ü*ý\öWþâUæ5ßêÿ��� ß � ��� í�õjæ � ÷ ü*ý öHâUæ ß��

Since ��� õjá ÷���� and �¯õ���÷ is strongly connected,thereexists æ��ãîNä@æ ç è9æ ç è�éSé@éPè9æ ê ësuchthat æ � þâ æ ß and æ � î���õjæ ß ÷ . The idea of the proof is to first multiply í�õæ ß ÷ by � ßandleaveeverythingelsefixed. Each í�õjæ � ÷Çõ��\â��Kó��+è�é@éSéPè��È÷ is thenmovedto the locationæ�� , � � � í�õæ � ÷ is addedto the currentvalueat the location æ ß , and í�õjæ � ÷ is thenmovedbackto location æ � . All stepscan be carriedout locally.

We now definethe templatesfor the local decompositionof à?ß . Define ��ß byõ �?ßS÷ !�â "$# ! ü*ý öUþâZæ5ß� ß � #&%(' ü*ý ö�âZæ5ß �Obviously, � ß is local and if ñ�âåí óô � ß , then b is given byñEõ7ö3÷Èâ " í�õö3÷ ü*ý öUþâZæ5ß� ß � í�õæ ß ÷ ü ýÇö�âZæ ß��For each ��â�� ó)�+è*� ó,+9è5éSé@é5è�� definetemplates- � and � � byõ�- � ÷ ! â "$# ! ü*ý\ö�þâZæ ß#(% ' ó � � � #(%�. ü*ý\ö âZæ5ßand � � â,�Qõ�æ � èÝæ/�h÷øóô - � óô �Qõ7æ�� èFæ � ÷ �Since æ � î0��õ7æ ß ÷ , each - � is local with respectto N. Furthermore,by Theorem5.9.5, each�Qõ7æ � èFæ � ÷ and �Qõ7æ � èFæ � ÷ is local with respectto N. Therefore� � hasa local decompositionwith respectto N for each � â1� ó2�+è*� ó3+:è�éSé@éPè�� .

Now, if íHî ï ð and ñ â í¶óô � � for some �¶â���ó4�$è*��ó5+:èTé@éSé5è�� , thenñEõjö3÷Gâ " í�õö3÷ ü ýÇöUþâZæ5ß� �6� í�õæ � ÷ ü ýÇö�âWæ ß7�Hence,if ñNâ¾íMóô õ8��ß óô �?ß:9 ç óô �;�&� óô � ê ÷ , thenñEõjö3÷Èâ ùú û í�õö3÷ ü*ý\öWþâUæ ßêÿ��� ß � � � í�õjæ � ÷ ü*ý öHâUæ5ß �Therefore, à�ßZâ<�?ß óô �?ß�9 ç óô �&�;� óô � ê , which enablesus to concludethat à�ß has a localdecompositionwith respectto N.

274

Page 283: Image Algebra by Ritter

We now provethe lemmafor =?> . The conceptis the same;therearesomepointswhich mustbe modifiedto accountfor the transposition.Note that if @BA�CEDF = > , thenb is given by

@HGJILKHANMO P C�GJIQK RTSUIVA,W�X�YUZ[A1\]Y_^`Y�a;a&a_Y*bdce\f >hgC/G Wi>?K RjSkIVA,Wi>f X glC�GJWm>;K�D$C�G8W X KnRjSkIVA,WpoqYrZ[A�b�D3\]Ysb�Dt^uYva&a;amY_wyxNext define a local template zU{(|m} byG z~{s|m}�K��[A��$� � RTSUI,�A,W >f >hg ���;� RTSUI$A,Wi>�xAgain, since �� f(� G��0K���\ and ��G��BK is stronglyconnected,for every Z[A�b�D$\]Y*bLDE^uY�a;a;apY�wthereexistsan � XU�V� \*Y`^`Y�a&a;amY_w/� suchthat W/�h� � �BG W X K and W����[�A)W X .For ZBA)bdD)\*Y*bkD5^uY�a;a&a_Y�w definetemplates� X and z X byGJ�7X(K � A � � � RjSkIe�A3W X�(� � D f X g �(�]� � RjSkIBA3W Xand z X A,�(G W > Y�W � �K�DF � X DF �(GJW � �sY�W > KvxAs before,since � X is local andeachexchangetemplatehasa local decomposition,z X hasalocal decompositionfor each Z$A)bdD)\]Y*bdD,^`Y�a;a&a_Ylw . Furthermore,if @�A2C�DF z[X , whereb~D�\� ¡Z� ¡w , then b is given by@�GJIQK/A � C�G8IQK RTS¢Ie�A,W7XC�G8WyX(K�D f X6glC�GJWm>;K RTS¢IBA,W7XQxThus for every C �¤£y¥ ,C�DF =?>¦A,C�DF G8zk>:|m}§DF zd>�|v¨§DF g;g&g[DF z~{s|m}�KuxTherefore,=?>§A)zd>�|m}§DF zd>�|v¨§DF g;g&g[DF zU{(|v} and,hence,=?> hasa local decompositionwithrespectto N.

Q.E.D.

We needonemorelemmabeforeproving sufficiency. In the following, let ©ª> and «u> denotewr¬Ewmatricesof the form ­ªG�=?>?K and ­ªG ®l>;K , respectively,asgiven in the hypothesisof Lemma5.9.7.

5.9.8 Lemma. If ¯ ��°B{_±�²`³�´Qµ with ¶�·¡¸ , thenfor every ¹�º»¸]¼_½`¼�¾&¾;¾_¼l¶E¿�¸ there exist ¶BÀ�¶matricesÁªÂ and Ã` of the aboveform and ¶�À0¶ permutationmatrices Äi and ÅÆ suchthat

Ç ºnÈÉ ²*ÊvËÌÂ�ÍmË Äi¦ÎÁÏÂ:ÐÑ�ÎÒÓÓÓÓÓÔ Õ Ö× ²*Ê_Ë Õ ...Õ Ö¿ ¿ ¿ Ø ¿Ö Î&Î;Î Ö Õ Ù

ÚÛÛÛÛÛÜ Î6ÈÉ ²*Ê_ËÌÂ�ÍmË ÃuÂhÎ;ÅÆÂ:ÐÑ275

Page 284: Image Algebra by Ritter

for some Ý�Þàß .

Proof: We make use of the following observationmade by Tchuente[19]: Given áâÞãBäuå]äpæ ß�ç , then there exist permutationmatrices P and Q, constants è;é(êpè;ë(ê�ì&ì;ì_êpè ä andí é;ê í ë(êvì&ì;ìmê í ä , and anæ îðïeñ ç�ò æ�î¢ïeñ ç matrix C suchthat

á)ó�ôõööööö ÷ í é ø í ë ù;ù&ù í äï ú ï ï ïû ø

... ø ü ä]ý éû øþÿÿÿÿÿ�

õööööö÷ ñ ø û ù;ù&ù ûï ú ï ï ïû ø... ø �û ø

þÿÿÿÿÿ�õööööö÷ è é ø û ù;ù&ù ûï ú ï ï ïè ë ø

... ø ü ä*ý éè ä øþÿÿÿÿÿ��� (i)

The proof proceedsby inductionon n. Ifî ó�� , then the result follows from Eq. (i).

Now assumethat the result holds for ��ó��`ê�ì;ì&ìmê îðï�ñ. By Eq. (i), thereexist permutation

matrices ô é and � é , and anæ�îðï�ñ ç�ò æ�îðï�ñ ç matrix C suchthat

á�ó3ô é�§é ùõööööö÷ ñ ø û ù&ù;ù ûï ú ï ï ïû ø

... ø �û øþÿÿÿÿÿ� ù� é � é � (ii)

By inductionhypothesis,for every �~ó ñ êvì&ì;ìmê î�ï � , thereexistpermutationmatrices �ô�� , �� � ,matrices �� � and � � , and a constantÝðÞ,ß suchthat

� ó��� ä*ý ë���� é �ô�� ù��� ���� ùõööööö÷ ø ûü ä*ý ë ø ...ø ûï ï ï ú ïû ù;ù;ù û ø Ý

þÿÿÿÿÿ� ù �� ä]ý ë���� é � � ù��� ���� � (iii)

For �eó ñ êvì&ì;ìmê î�ï � , define

ô���� é óõööööö÷ ñ ø û ù;ù;ù ûï ú ï ï ïû ø

... ø �ô��û øþ ÿÿÿÿÿ� ê � ��� é ó

õööööö÷ ñ ø û ù&ù;ù ûï ú ï ï ïû ø... ø �� �û ø

þ ÿÿÿÿÿ� ê ��� é ó

õööööö÷ ñ ø û ù&ù;ù ûï ú ï ï ïû ø... ø � �û ø

þ ÿÿÿÿÿ� ê�� î! � ��� é óõööööö÷ ñ ø û ù&ù;ù ûï ú ï ï ïû ø

... ø �� �û øþ ÿÿÿÿÿ�

276

Page 285: Image Algebra by Ritter

Then

"$#�%'&)(+*,#-%.&!/ 0111112 3 4 5 (+(+(657 8 7 7 75 4...

4 9" #5 4:<;;;;;=0111112 3 4 5 (-(+(>57 8 7 7 75 4

...4 9* #5 4

:<;;;;;= /0111112 3 4 5 (+(-( 57 8 7 7 75 4

...4 9" # (?9* #5 4

:<;;;;;=A@and

B #-%.& (-C #+%.& / 0111112 3 4 5 (+(-(>57 8 7 7 75 4...

4 9B #5 4:<;;;;;=0111112 3 4 5 (-(+(D57 8 7 7 75 4

...4 9C #5 4

:<;;;;;= /0111112 3 4 5 (+(+( 57 8 7 7 75 4

...4 9B # ( 9C #5 4

:<;;;;;=FETherefore,

GIH &J#�K.L " # * # /01111112 3 4 5 (-(+( 57 8 7 7 75 4

...4 GMH LN#-K.& 9"$# 9*,#5 4

:<;;;;;;=PO+Q$R GIH&J#+KSL B # C # /

01111112 3 4 5 (-(+( 57 8 7 7 75 4...

4 GIH LN#+K.& 9B # 9C #5 4:<;;;;;;= (iv)

It now follows from Eqs. (iii) and (iv) that0111112 3 4 5 (+(+(>57 8 7 7 75 4...

4 T5 4: ;;;;;= /

01111112 3 4 5 (+(-( 57 8 7 7 75 4...

4 GMH LN#-K.& 9"$# 9*,#5 4:<;;;;;;=0111111111123 4 5 (+(+( 5 57 8 7 7 7 8 75 4 4 5...

4 U GIH L 4 ...5 4 4 57 8 7 7 7 8 75 4 5 (+(+( 5 4 V

:<;;;;;;;;;;=01111112 3 4 5 (-(+( 57 8 7 7 75 4

...4 GIH LN#-K.& 9B # 9C #5 4

:<;;;;;;=or, equivalently,W

XXXXXYZ [ \ ]^]_]`\a b a a a\ [...

[ c\ [deeeeefhg

ij<kIlnmop-q'r!s putvp�wxyzzzzz{

| }~�I�'� | ...| }� � � � �} �_�^� } | ���������� �M���op�qnr�� p���p�wx�� (v)

277

Page 286: Image Algebra by Ritter

SubstitutingEq. (v) into Eq. (ii) yields

��������$������� �   ��¡v��¢£¤¥¥¥¥¥¦

§ ¨© �I��� § ...§ ¨ª ª ª « ª¨ ¬^¬_¬ ¨ § ­®¯¯¯¯¯° ��±�M������� � ² �u³���¢£�´

Q.E.D.

We now show that strongconnectivity is sufficient in general.

5.9.9 Theorem. If µ·¶�¸º¹ is strongly connected,theneverytemplate»½¼¿¾�À,Á� Á hasa local decom-position with respectto N.

Proof: Let »Ã¼Ä¾ÅÀ�Á� Á . According to Lemma5.9.8,

Æ ¶Å»�¹ ���� �M������� �   �+¡���¢£¤¥¥¥¥¥¦

§ ¨© �I��� § ...§ ¨ª ª ª « ª¨ ¬^¬^¬ ¨ § ­®¯¯¯¯¯° �� �I������� � ² �u³��-¢£�Ç

where  � and ³�� are permutationmatrices,and ¡v� and

² � are matricesof the form givenin Lemma 5.9.7.

Set

È � Æ ��� �ÉÉÉÉÉ�¤¥¥¥¥¥¦

§ ¨© �I��� § ...§ ¨ª ª ª « ª¨ ¬^¬_¬ ¨ § ­® ¯¯¯¯¯°¢ËÊÊÊÊÊ£ Ç

and for Ì �>Í Ç�ÎÏÇ!Ð^Ð_Ð�Ç�Ñ ª Í letÒ � � Æ ��� ¶ ¡v� ¹ Ç È � � Æ ��� ¶ ² � ¹ ÇAÓ � � Æ ��� ¶   � ¹ ÇÕÔ×Ö�ØÚÙ � � Æ ��� ¶ ³Û� ¹ ´Since

Æ ¶ È ¹ is a diagonalmatrix, s is local with respectto N. By Lemma5.9.7, each Ò � and È �hasa local decompositionwith respectto N. By Corollary 5.9.6, each Ó � and Ù � hasa localdecompositionwith respectto N. Thus, since

» ���� �I���Ü ��� � ¶ Ó � «Ý Ò � ¹ ¢£ «Ý È «Ý �� �M���Ü��� � ¶ È � «Ý Ù � ¹ ¢£ Çit follows that t hasa local decompositionwith respectto N.

278

Page 287: Image Algebra by Ritter

Q.E.D.

In summary,the last sectionsshow how correspondencesbetweendirectedgraphs,neighborhoodconfigurations,network of processors,and matricescan be used to provide necessaryand sufficientconditionsfor the existenceof local decompositionsof linear transforms.In contrastto earlier sectionsof this chapter,the existencetheoremsof this sectiondo not readily suggestmethodsfor constructingefficient algorithmsfor decomposingtemplatesinto local factors. This topic will againbe addressedinthe next chapter.

279

Page 288: Image Algebra by Ritter

Bibliography

[1] M. Behzad,G. Chartrand,and L. Lesniak-Foster.Graphsand Digraphs. WadsworthInternationalGroup, Belmont, CA, 1979.

[2] E.L. Cloud and W. Holsztynski. Higher efficiency for parallel processors.In ProceedingsIEEESouthcon84, pages416–422,Orlando,FL, March 1984.

[3] P.D.Gader.ImageAlgebraTechniquesfor Parallel Computationof DiscreteFourier TransformsandGeneralLinear Transforms. PhD thesis,University of Florida, Gainesville,FL, 1986.

[4] P.D. Gader.Necessaryand sufficient conditionsfor the existenceof local matrix decompositions.SIAM Journal on Matrix Analysisand Applications, pages305–313,July 1988.

[5] G.H. Golub and C.F. van Loan. Matrix Computations. JohnHopkins University Press,Baltimore,MD, 1983.

[6] R. M. Haralick. Ridges and valleys on digital images.Computer Vision, Graphics, and ImageProcessing, 22:28–38,1983.

[7] R. Keown. An Introductionto GroupRepresentationTheory. AcademicPress,New York, 1975.

[8] R.M. LougheedandD.L. McCubbrey.The cytocomputer:A practicalpipelinedimageprocessor.InProceedingsof theSeventhInternationalSymposiumonComputerArchitecture, pages411–418,1980.

[9] D. LucasandL. Gibson.Templatedecompositionandinversionover hexagonalsampledimages.InImageAlgebraandMorphologicalImageProcessingII , volume1568of Proceedingsof SPIE, pages157–163,San Diego, CA, July 1991.

[10] Z.Z. Manseur.Decompositionand Inversionof ConvolutionOperators. PhD thesis,University ofFlorida, 1990.

[11] Z.Z. Manseurand D.C. Wilson. Invertibility of a specialclassof meanfilter operators.Journal ofMathematicalImaging and Vision, 1(2):137–144,1992.

[12] J.H. McClellan and edit. C.M. Rader.NumberTheory in Digital Signal Processing. Prentice-Hall,EnglewoodClif fs, NJ, 1979.

[13] C.L. Nikias, A.P. Chrysafis,and A.N. Venetssanopoulos.The lu decompositiontheoremand itsimplication to the realizationof two-dimansionaldigital filters. IEEE Transactionson AccousticsSpeechand Signal Processing, COM-26(3):694–711,1985.

[14] D.P. O’Leary. Some algorithms for approximatingconvolutions.ComputerVision Graphics andImageProcessing, 41(3):333–345,1988.

[15] W. Rheinboldt.Future Directionsin ComputationalMathematics,Algorithms,andSoftware. Societyfor Industrial and Applied Mathematics,Philadelphia,PA, 1985.

[16] G.X. Ritter and P.D. Gader.Imagealgebra:Techniquesfor parallel image processing.Journal ofParallel and Distributed Computing, 4(5):7–44,April 1987.

[17] S.R. Sternberg. Overview of image algebraand related issues.In S. Levialdi, editor, IntegratedTechnologyfor Parallel ImageProcessing. AcademicPress,London,1985.

[18] M. Tchuente.Parallelcalculationof a linear mappingon a computernetwork.Linear Algebra andIts Applications, 28:223–247,1979.

[19] M. Tchuente.Parallelrealizationof permutationsover trees.DiscreteMath., 39:211–214,1982.

280

Page 289: Image Algebra by Ritter

[20] J.S. Wiejak, H. Buxton, and B.F. Buxton. Convolution with separablemasks for early imageprocessing.ComputerVision, Graphics,and ImageProcessing, 32:279–290,1985.

[21] W. Zhang-Kitto. An IsomorphismTheorem betweenthe ExtendedGeneralizedBalancedTernaryNumbersand thep-adic Integers. Ph.D.dissertation,University of Florida, Gainesville,FL, 1991.

[22] X. ZhuangandR. M. Haralick.Morphologicalstructuringelementdecomposition.ComputerVision,Graphics,and ImageProcessing, 35:370–382,1986.

281

Page 290: Image Algebra by Ritter
Page 291: Image Algebra by Ritter

CHAPTER 6TECHNIQUES FOR THE COMPUTATION OF THE DISCRETE FOURIER TRANSFORM

In this chapterwe examinethediscreteversionof theFouriertransform.It is no exaggerationto saythat thediscoveryof efficient algorithmsfor computingthe discreteFouriertransformhasrevolutionizedthe practiceof digital signal processingand digital signal analysis. Collectively, thesealgorithmsareknownasFastFourier Transforms(or FFT’s) andtheyaresignificantfor severalreasons.Theyallow forreal-timeor nearreal-timespectralanalysisandfiltering. Efficient computationof manyspatialdomaincomputationscanbeachievedin the frequencydomainusingfastFouriertransformmethods.This is dueto the well knownresult that the convolutionof two waveformsin the spatialdomaincorrespondsto theequivalentoperationof multiplicationof their respectiveFouriertransformsin the Fourier(or frequency)domain.Justasimportantly,the studyof methodologiesof the variousfast Fouriertransformalgorithmshavestimulateda reformulationof manysignalprocessingconceptsandalgorithmsin termsof discretemathematics.This resultedin a shift awayfrom the notion that signalprocessingon a digital computeris merelyanapproximationto analogsignalprocessingtechniques.It becameevidentthatdiscretesignalprocessingis an importantfield of investigationin its own right, involving propertiesandmathematicalmethodsthatareexactin thedisrete-timedomainandindependentuponanycontinuityassumptions.Themethodsandtechniquesdiscussedin this chaptercanbeconsideredpartof this newfield of investigation.

6.1 Linear Separability and the Discrete Fourier Transform

The Fourier Transform (FT) was first introducedin Section3.8 (Example3.8.13). Although othertransformsarediscussedin somedetail, we placespecialemphasison the Fourier transformbecauseofits wide rangeof applicationsin imageand signal processing.One of the basicpropertiesof the two-dimensionalFouriertransformis its linear separability.This propertyis a key ingredientin the efficientcomputationof the discreteversionof the two-dimensionalFourier transform.For this reasonwe beginour discussionwith someobservationsconcerninglinear separability.

For theremainderof thissectionÞàßPá'â½ãÛá�ä and å will denotethering isomorphismåçæ!è�é,ê�ë êíìî âïäñðIâïä'ò�éôó discussedin Section5.1. Note that since X is finite, õ?ò�ö÷.ó is finite ø�öúùûè�é�ê�ë ê andø�üýùÃÞ . However,becausethe shapeof õ?òÅö÷'ó differs in mostcasesif y is on or nearthe boundaryofX from the shapeof õïòÅö ÷ ó when y is an interior point of X which is far removedfrom the boundary,we needto modify the definition of a row or column templateslightly.

6.1.1 Definition. If öúùþèÿé ê ë�� , then t is called a row templateon X if and only if for everyü ù ������� ùýá'â suchthat ö�÷�ò ��� ó�ß� whenever��ß �.

Similarly, t is called a columntemplateon X if and only if for every ü ù ����� ùýá�ä suchthatö ÷ ò� ��� ó�ß� whenever

� �ß �.

Observethat a row (column) templateas definedin Definition 5.2.2also satisfiesthis definition ofa row (column) templatewhen restrictedto the finite array X. Also, if t is both a row and a columntemplate,thent is a one-pointtemplateunlessõ?òÿö÷�ó?ß��hø�ü ùÃÞ , in which caset is thezerotemplate.

The most commonrow (or column) templatesused by algorithm designers,which are also thetemplateswe are concernedwith in this section, are those for which

� ß Þ and ö������ � �ÿò ��� óúß! 283

Page 292: Image Algebra by Ritter

whenever"$#%'& (or (*),+.- /1032�"54�687 %�9 whenever6:#%�; ). Therefore,unlessotherwisestatedall row andcolumntemplatesconsideredhenceforthareassumedto satisfy theselatter conditions.

Recall that if t is a row (column) template,then the weight matrix T associatedwith t is a row(column) matrix. The isomorphicimage <=2�(*7 , however,doesnot satisfy theseconditions.

6.1.2 Theorem. Suppose(�>'?�@BADC A .

1. If t is a row templateon X, then <=2�(E7 is a blockdiagonalmatrix consistingof F'GHF blocksand eachblock is an IJG�I matrix.

2. If t is a columntemplateon X, then <=2�(*7 is a block diagonalmatrix consistingof FKGLFblocksand eachblock is an IJG�I diagonalmatrix.

The proof is obviousas it follows directly from the definitionsof row and column templatesandthe definition of the map < .

6.1.3 Example: If

=r 2 1 3

and MONQPSR$TUPWV , then

X=Y[Z]\ N

^_______________________`

a b c c d c c c c d c c c ce a b c d c c c c d c c c cc e a b d c c c c d c c c cc c e a d c c c c d c c c cf f f f g f f f f g f f f fc c c c d a b c c d c c c cc c c c d e a b c d c c c cc c c c d c e a b d c c c cc c c c d c c e a d c c c cf f f f g f f f f g f f f fc c c c d c c c c d a b c cc c c c d c c c c d e a b cc c c c d c c c c d c e a bc c c c d c c c c d c c e a

h�iiiiiiiiiiiiiiiiiiiiiiij

k

If

=sl 2

1

3

284

Page 293: Image Algebra by Ritter

then

monp*qsr

tuuuuuuuuuuuuuuuuuuuuuuuv

w x x x y z x x x y x x x xx w x x y x z x x y x x x xx x w x y x x z x y x x x xx x x w y x x x z y x x x x{ { { { | { { { { | { { { {} x x x y w x x x y z x x xx } x x y x w x x y x z x xx x } x y x x w x y x x z xx x x } y x x x w y x x x z{ { { { | { { { { | { { { {x x x x y } x x x y w x x xx x x x y x } x x y x w x xx x x x y x x } x y x x w xx x x x y x x x } y x x x w

~�������������������������

It follows from Theorem6.1.2 that the matrixm=n��Eq

should be highly structuredwhenevert isthe product of a row and a column template. For example,if r and s are as in Example6.1.3, thenm=n��*q�rQm=n�� |� p�q�rQm=n��]q���m=n�pEq

has form

m=n�]q���m�n�p*q�r

tuuuuuuuuuuuuuuuuuuuuuuuv

w z x x y z � x x y x x x x} w z x y � z � x y x x x xx } w z y x � z � y x x x xx x } w y x x � z y x x x x{ { { { | { { { { | { { { {} � x x y w z x x y z � x x� } � x y } w z x y � z � xx � } � y x } w z y x � z �x x � } y x x } w y x x � z{ { { { | { { { { | { { { {x x x x y } � x x y w z x xx x x x y � } � x y } w z xx x x x y x � } � y x } w zx x x x y x x � } y x x } w

~�������������������������

� (6.1.1)

Equation6.1.1showsthateachblock ofm=n��*q

is a matrix which is void of zerorowsor zerocolumns.More generally,if r is a row templateon � r������� ���� , s is a columntemplateon X, and

��r�� |� p, then

m=n��]q���m=n�pEq�r tuuv����� � ����� �� �� 5  ����� �

......

. .....� � ����� � ���

~����tuuv

¡ �5� ¡ �5  �����¢¡ � �¡  5� ¡  5  �����¢¡   �...

.... ..

...¡ � � ¡ �   �����£¡ ���~����

r tuuv¤ �5� ¤ �5  ����� ¤ � �¤� 5� ¤� 5  ����� ¤�  �

......

.. ....¤ � � ¤ �   ����� ¤ ���

~���� r�m=n��*q¦¥285

Page 294: Image Algebra by Ritter

where §S¨1©«ª�¬«¨­¨�®8¨ ©�¯°±ª³²]´Wµ¶´�·�·�·W´8¸º¹*»W¼¾½�ª³²]´Wµ¶´S·�·�·¦´8¿�À , each ®W¨ © is a diagonal ¿�Á¿ matrix, andO denotesthe zero matrix.

SupposeÃ.¨ ©�¯Ä8À denotesthekth diagonalentryof ®W¨ © and Å�Æ Ç*¯°3À denotesthe ¯�È�´ÉÄÊÀ th entryof the ¿ËÁÌ¿matrix ¬ ¨­¨ . Then the kth column vectorÍ ¯�°5´�½ÎÀ Ç ªÐÏ�Ñ]Ò ©5Ó ÇÕÔ ¯°�´�²�ÀÉ´¶Ñ*Ò ©Ó ÇÕÔ ¯�°5´Éµ]À5´�·�·�·¦´ÊÑ*Ò ©�Ó ÇÕÔ ¯°�´É¿SÀÖ.×of § ¨ © ªØ¬ ¨­¨ ® ¨ © can be expressedasÍ ¯�°�´[½ÙÀ Ç ª�¯�Å�Ú5ÇE¯�°�ÀÕ´ÊÅ�Û5ÇE¯°3ÀÉ´�·�·�·W´WÅ.ÜÝÇ*¯�°�À�À ×ÙÞ Ã.¨1©*¯�Ä8À (6.1.2)

while the kth column vector Í ¯�°�´[½ × À Ç of §S¨ ©3ß hasformÍ Ï °�´�½ × Ö Ç ªà¯�Å�Ú5Ç*¯�°�À5´ÊÅ�Û5ÇE¯�°�ÀÕ´�·�·�·W´WÅ.ÜÝÇ]¯�°3À5À × Þ Ã.¨ © ß ¯�Ä8ÀWá (6.1.3)

From Eqs. 6.1.2 and 6.1.3 we obtain:Í Ïâ°�´[½ × Ö Ç ª Ã.¨ © ß ¯Ä8Àà ¨ © ¯�Ä8À Þ Í ¯�°�´[½ÙÀ Ç á (6.1.4)

Since j and ½ × werearbitrary, it follows that the kth columnvectorof §S¨ © is a scalarproductof the kthcolumn vector of § ¨�Ú for ½JªQ²]´Wµ¶´S·�·�·S´W¸ . Thus, if we form the ¿JÁJ¸ matrix ã ¨�Ç by defining thejth column of ã=¨�Ç to be the kth column of § ¨ © , where ½Jª£²]´ÙµÊ´�·�·�·S´W¸ , then ã=¨,Ç has rank 1 for all°�ª£²�´WµÊ´�·�·�·W´W¸ and all Ä䪣²]´Wµ¶´S·�·�·S´W¿ . Hence,a necessarycondition for linear separabilityof a

templatet on X is that eachmatrix ã ¨�Ç ªØå.æʯ�°5´ÉÄ8À Æ ©�ç ÜÙèÎé , where å�æʯ�°5´ÉĶÀ Æ ©Éç ª³Ñ Ò ©�Ó ÇÉÔ ¯°�´�È�À , hasrank 1.

This condition is also sufficient.

6.1.4 Theorem. If ÑÂêëÏ�ì±í�Ö í where îïª�ð�ñé ÁLð�ñÜ , then t is linearly separableif and only if for°=ªÐ²]´Wµ¶´S·�·�·S´W¸ and Ä�ªò²�´WµÊ´�·�·�·8´W¿ , eachmatrix ã ¨�Ç hasrank 1.

Proof: We have already shown that if t is linearly separable,then ã=¨�Ç has rank 1 for°�ªØ²�´Wµ¶´�·�·�·8´W¸ and ÄUªØ²�´WµÊ´�·�·�·W´W¿ .

In order to provesufficiency, supposethat ã ¨�Ç hasrank 1. Thenthereexistsa columnvectoró ¯�°5´ÉÄ8À of ã=¨�Ç suchthat eachcolumnvector of ã=¨�Ç is a multiple of ó ¯�°5´ÉÄÊÀ . Thus, if ó ¯�°5´ÉÄÊÀ ©denotesthe jth columnof ã=¨�Ç , then thereexistsa scalar Ã�¨ ©*¯Ä8À suchtható ¯�°5´ÉÄÊÀ © ª ó ¯�°5´ÉÄÊÀ Þ Ã ¨ © ¯�Ä8ÀWá (i)

Now, if

§S¨ ©oªôõõõö

Ñ Ò ©�Ó Ú5Ô ¯�°�´.²�À Ñ Ò ©�Ó Û5Ô ¯�°�´�²�À Þ�Þ�Þ Ñ Ò ©�Ó ÜEÔ ¯�°5´�²�ÀÑ Ò ©Ó Ú5Ô ¯�°5´Éµ]À Ñ Ò ©�Ó Û5Ô ¯�°�´Éµ]À Þ�Þ�Þ Ñ Ò ©�Ó ÜEÔ ¯�°5´Éµ]À...

.... ..

...Ñ Ò ©Ó Ú�Ô ¯°�´�¿�À÷Ñ Ò ©�Ó Û5Ô ¯°�´É¿øÀ Þ�Þ�Þ Ñ Ò ©�Ó Ü�Ô ¯°�´�¿øÀù�úúúû ´

286

Page 295: Image Algebra by Ritter

then by definition of ü=ý�þ ,ÿ���������� ������� �� þ�� ��������������� �� þ�� �����������! " # ����� �� þ�� ������$%��&�'�(In view of Eq. (i), we have��� � �� þ�� �����#�"����� � �� þ�� �������)���! " # ��� � �� þ�� ������$*��& ' � ÿ%�������+�-,#. ý ���/�!( (ii)

Define the $102$ matrices 3 ý ý and 48ý by

3 ý­ý �5�âÿ������#�"���¶ÿ��������)��� # # ��ÿ�������$���and

4Wý �6778. ý ���9� : ,#,", :: . ý ����� ,#,", :

......

. .....: : ,#,",;. ý ��$%�

<�==> (

Hence,by Eq. (ii),?ý � 3«ý­ý , 48ý A@CB�D �E�F�)�� # # /�HG I�JHKMLN�O��� # " !�/GO(

Let ? � 6778?P�P ?�P�Q ,",#, ?�P

R?�Q�P ?�Q�Q ,",#, ?�QR

......

. .....

?RP ?

RQ ,",#, ?

RSR< ==> � 3 � 677

83P�P T ,#,#, TT

3Q�Q ,#,#, T

......

.. ....

T T ,#,#, 3 RSR< ==> �

and

4 �67784P�P

4P�Q ,",#, 4

PR4

Q�P4Q�Q ,",#, 4

QR

......

.. ....4 R

P4 RQ ,",#, 4 RUR

<�==> (

Then V �W���X�? � 3 , 4 and, therefore,�Y� V[Z

P� 3 �]\^ V[Z

P� 4 � .

Q.E.D.

If t is a templateonX suchthateachof thematricesü=ý�þ hasranklessor equalto somepositiveintegerp, thenan argumentanalogousto the onegiven in the proof of Theorem6.1.4canbe usedto showthateachcolumnof ü=ý�þ is a linearcombinationof _a`cb columnvectors ��ÿ

P�������+���¶ÿ

Q�������+���� " # H��ÿHd��������+��& . If

wecontinueto reasonalongthesameline asin theproofof thetheorem,weobtainthefollowing corollary:

6.1.5 Corollary. If �ae ��fhg & g , thent can bewritten as the sumof _a`2b separabletemplatesif andonly if for �E�F���H�+�! " # �HG and �Y�F���H�+�! " # �H$ , eachmatrix ü ý�þ hasrank lessor equalto p.

287

Page 296: Image Algebra by Ritter

In Section 3.8 (Example 3.8.13) we introducedthe Fourier transform ikj�l�mon pq of a functionlOrOsutwvyx�z . Here we reformulatethe definition of the Fourier transformby defining ikj�l%m{n pq interms of the equation |lhj�}mSn ~�� ~

l�j��m�� �!���#���"�9� ��� (6.1.6)

Given pq , then f canbe recoveredby usingthe inverseFourier transformwhich is given by the equation

l%j��*mSn ~�� ~|l%j�}*m�� ���"������� }�� (6.1.7)

Equations6.1.6 and 6.1.7 are called the Fourier transformpair. This transformpair exists if f and|l

satisfy the conditionsgiven in Example3.8.13.

The readermust be warnedthat there is no single customarydefinition of the Fourier transformand its inverse. The variationsarise in the treatmentof the factor x��� and the sign of the exponential.For instance,in Example3.8.13, the term �)� is missingin the exponent.However,for eachdefinitionof the Fourier transform,there is only one reasonabledefinition of its inverse. The variousdefinitionshave the form |lhj�}myn���~�� ~

l%j��m�� ������� � � (6.1.8)

for someconstants� and � , with the correspondinginversetransformbeing

l�j��mSn � � ����%� ~�� ~|l%j�}*m�� ����������� }�� (6.1.9)

We havetaken ��nF� and ��nF����� . Otherdefinitionsusevariouscombinationsof �cn����S��n x��� �S��nx� ��� ����n �a�)�]�¡n¢���)� . The factor � � �¤£ �)��� is selectedso that the inverseFourier transformof f isactually equal to f for a generalclassof functions.

Suppose¥o¦¨§©Yª«v . The DiscreteFourier Transform, abbreviatedasDFT, of a is definedas

|¥j­¬/myn © � x®¯�°± ¥�j�²!m�� �+���´³¯ ��µ © � (6.1.10)

where ¬YnF¶+�����·#·#·�H¸¹�º� . The DiscreteInverseFourier Transform, or DIFT, is given by

¥%j�²/mSn �¸ © � x®³ °/± |¥�j�¬/m�� ���¯ ³��»µ © � (6.1.11)

where ²¼n½¶+������·"·#·H�/¸c�O� .In digital signalprocessing,a is usuallyviewedashavingbeenobtainedfrom a continuousfunctionl¾r;sAtwvyx�z by sampling f at some finite number of points ¿À� ± �H� x ��·#·"·!�/� © � x"Á¢Â v and setting

288

Page 297: Image Algebra by Ritter

Ã�Ä�Å/ÆNÇÉÈ%Ä�Ê/Ë)Æ so that Eqs. 6.1.10 and 6.1.11 representthe finite analoguesof Eqs. 6.1.6 and 6.1.7,respectively.As we areonly interestedin thecomputationalaspectsof theDFT andits inverse,we viewa as a vector of finite length ÃAÇ5Ä�Ã%ÄÍÌ�Æ�Î�Ã%Ä�Ï�Æ�Î�Ð"Ð#ÐÎ�Ã�Ä�ÑYÒºÏ9Æ�ÆHÓDefining the template ÔÖÕØ×�ÙÛÚ�Ü Ú , where Ý ÇßÞ*à , byÔWá Ä�Å/ÆâÇ5ã�äHå�æ Ë á�ç»è à Î (6.1.12)

we obtain equivalentimage algebraformulationéùÇ�ÃAêë Ô (6.1.13)

of Eq. 6.1.10.

The templatef definedby Eq. 6.1.12 is called the one-dimensionalFourier template. It followsdirectly from the definitionof f that Ô#ì Ç Ô and Ä Ô�í Æ ì Ç ÔÀí , where ÔÀí denotesthe complexconjugateof fdefinedby Ô íá Ä�Å/ÆSÇ�Ä Ô á Ä�Å!Æ�Æ í Ç�ã å�æ Ë á�ç»è à . Hence,the imagealgebraequivalentof the DIFT is given byÃkÇ ÏÑ Ä éÃAêë Ô í Æ!Ó (6.1.14)

The notion of the Fourier transformandits inversecanbe easilyextendedto functions È ÕuîA×Wï å Ü .In particular, the two-dimensionalFourier transformpair is given byéÈhÄ�ð%Î�ñ�ÆSÇ òóä ò

òóä òÈ%Ä�Ê%Î�ô+Æ�ã�äHå�æ çCõ�ö�÷#ø/ù�ú�ûwü Ê ü ô (6.1.15)

and È�Ä�Ê�Î�ô�ÆSÇ òóä òòóä òéÈ�Ä�ð�Î�ñ�Æ�ã å�æ ç�õ�÷�ö#ø/ú�ù#û ü ð ü ñýÓ (6.1.16)

For discretefunctions Ãuþ�Þÿ��ÖÞ*à�� ï we havethe two-dimensionaldiscreteFourier transforméÃ%Ä�ð�Î�ñ+ÆyÇ à ä���Ë�� ÿ ä��� á � Ã%Ä �¨Î�Å�Æ�ã�äHå�æ ç Ä á��� ø Ë��� Æ Î (6.1.17)

with the inversetransformspecifiedbyÃ%Ä��¨Î�Å+ÆSÇ ÏÑ�� à ä���ù � ÿ ä���ö � éÃ�Ä�ð%Î�ñ�Æ�ã å�æ ç Ä ö��� ø/ù��� Æ Ó (6.1.18)

The imagealgebraequivalentformulationof the transformpair 6.1.17and6.1.18is given byéùÇ�ÃAêë Ô (6.1.19)

and ÃkÇ ÏÑ�� Ä éÃAêë Ô í Æ!Î (6.1.20)

where Ô Õ × Ù Ú Ü Ú is defined by Ô õ�ö�� ù�û Ä���Î�Å/ÆyÇ�ã ä+å�æ ç Ä á �� ø Ë �� Æ Î (6.1.21)

and Ý Ç Þ*ÿ��ºÞ*à .The two-dimensionalFourier templatef definedby Eq. 6.1.21satisfiesthe conditionsof Theorem

6.1.4.

289

Page 298: Image Algebra by Ritter

6.1.6 Example: Suppose��� �"!$#%�& . Then')(+*-, .0/21 354768 �:9<; !2=?> 1A@5BC�D"EGFHI8 4where JLK 354�M KON and JLK 6�4�P K Q . The matrix RO�TS 1A'�8 , called the Fourier matrixcorrespondingto f, is given by

S 1U'�8 �:RV�WXXXXXXXXYN N N Z N N NN 9 ; C H =I> 9 ;�[H =\> Z N 9 ; C H =\> 9 ;][ H =I>N 9 ; [ H =I> 9 ; C H =\> Z N 9 ; [ H =\> 9 ; C H =I>^ ^ ^ _ ^ ^ ^N N N Z ^ N ^ N ^ NN 9 ; C H =I> 9 ; [ H =\> Z ^ N ^ 9 ; CH =I> ^ 9 ; [H =I>N 9 ; [ H =I> 9 ; C H =\> Z ^ N ^ 9 ; [H =I> ^ 9 ; CH =I>

`�aaaaaaaab � c Red7d Rfd)!R !7d R !)!�gihThe matrices j > E derivedfrom F are given byjkd)dl� WY N NN NN N

`b 4 jkd)!m� WY N N9 ; C H =I> 9 ; C H =\>9 ;][ H =I> 9 ;n[H =\>`b 4 jkdo&l� WY N N9 ;n[H =\> 9 ;][ H =I>9 ; C H =\> 9 ; C H =I>

`b 4jk!7dp� WY N ^ NN ^ NN ^ N

`b 4 jk!7!p� WY N ^ N9 ; CH =I> ^ 9 ; CH =I>9 ;n[H =I> ^ 9 ;n[H =I>`b 4 jkd2&q� WY N ^ N9 ;n[H =\> ^ 9 ;][H =I>9 ; CH =\> ^ 9 ; CH =I>

`b hClearly, each jp> E has rank 1. Choosingr 1 N 4 N 8 � r 1 Q 4 N 8 � WY NNN

`b 4 r 1 N 4 Q 8 � r 1 Q 4 Q 8 � WY N9 ; C H =9 ;][H =`b 4

and r 1 N 47s58 � r 1 Q 4)st8 � WY N9 ; [ H =9 ; C H =`b 4

then u > @ 1v68 �wN for x 4�3 �yN 4 Q 4z6 �yN 4 Q 4�s aslong as xm{�:Q wheneverx|� 3 , and u !7! 1o68 � ^ Nfor6 ��N 4 Q 4Gs .

Hence }�!)!i� ^�~ & and }�> @ � ~ & in the remainingcases.

Also, � d7dm� � !7!p� WY N N NN 9 ; C H = 9 ; [ H =N 9 ;][ H = 9 ; C H =`b h

According to the proof of Theorem6.1.4Rw� c � d)d �� � !7!gL� c } d7d ��d7!� !)d }�!7!�g��c � d)d �� � !7! g � c ~ & ~ &~ & ^p~ & g � � � } h290

Page 299: Image Algebra by Ritter

Setting �����p���I����� and ���V�p���I����� we obtain �����$�� � , where

s� =(0, )v s� =(1, )v

1

1

1

-1, ,

and �t���t  ¡0¢o£�¤5¥0¦§�¨T©<ª]«¬)­¯® ¡�° .In the aboveexample,therow templater doesnot dependon the variablesu and j andis, therefore,

equivalentto the one-dimensionalFourier template� ¡ £o¦§n¨±©<ªn«A²´³µ ¡0° £v¶·¨�¸5§ . This holds in generalandfollows from the law of exponents;i.e., ©º¹\»�¼�¨V©�¹i½?©º¼ . More precisely,since¾ �¯�-  ¡�¢ £�¤5¥0¦§z¨:© ª�¿2®\­ £�ÀÁ� »Äõ ° § ¨:© ª�¿o®I­ õ ° ½\© ªÅ¿2®\­ ÀÁ  ¨Æ� ¡ £�¦§e½\Ç � £È¤§7¥the templatet canalwaysbe written as the productof a row anda columntemplate,namely

¾ ¨:��ÉÊ Ç .Therefore, ËÌ ¨w£ Ì ÉÊ �<§�ÉÊ ÇzÍ (6.1.22)

Equation6.1.22saysthat the two-dimensionalFourier transformcan be computedin two stepsbysuccessiveapplicationsof the one-dimensionalFourier transform;first alongeachrow of a followed bya one-dimensionalFourier transformalong the columnsof the result. Observethat the roles of r andscan be reversed;the sameresult can be obtainedby first taking the one-dimensionalFourier transformalong the columnsof a and then along the rows of the result.

As a final observationwe note that Eq. 6.1.20 implies thatÌ ¨ ζÐÏ £ ËÌ�Ñ ÉÊ ¾ § Ñ Í (6.1.23)

This meansthat the inverseFourier transformcan be computedin termsof the Fourier transformandsimple conjugation.

6.2 Block Structur ed Matrices and the Fourier Matrix

The isomorphism Ò mapsmany commonlyusedtemplatesto matricesthat display highly regularstructures.Manyof thesehighly regularmatricescanbesubdividedinto blocksof submatricesthatexhibitsimilaritiesor commonpropertiesthat prove very useful in transformoptimization. The Fourier matrixis a particularly elegantand useful exampleof a block structuredmatrix. Due to the particularblockstructureand intrinsic propertiesof the Fouriermatrix, block structuredmatricesarisequite naturally inthe analysisand optimizationof the discreteFourier transform.

In this sectionwe digresstemporarilyto studya few conceptsfrom thetheoryof block matricesandinvestigatesomepropertiesof the Fourier matrix.

291

Page 300: Image Algebra by Ritter

Columnandrow partitioningof a matrix areexamplesof matrix blocking. The notation

Ó�ÔÖÕ××Ø ÓkÙ7Ù ÓpÙ)Ú ÛIÛ\Û ÓpÙÝÜ Þtß�ÚÓ ÚoÙ Ó Ú7Ú ÛIÛ\Û Ó ÚàÜ Þ�ß�Ú...

..... .

...ÓmápßÅÚÝÜ Ù Ópámß�ÚàÜ Ú ÛIÛ\ÛâÓpámß�ÚàÜ Þ�ß�Úã�ääå

is usedto denotean æèçêé block matrix, whereeachblockÓpë´ì

is an æ ë çêé ì matrix of scalars.Thespecialcasewhere æ Ôîí or é Ôîí providesfor row and column block vectors.

Themanipulationof block matricesis analogousto themanipulationof scalarmatrices.For example,ifÓïÔ�ð�Ó ë´ì\ñ

is a æòçôó block matrix and õ Ô�ð õ ë´ì\ñ is a ó�çöé block matrix, thenthe matrix ÷ Ô:ÓøÛ õis the æOçùé block matrix ÷ Ôúð ÷ ë´ìºñ definedby÷ ë�ì ÔÆû ß�Úüý�þ Ù Ó ë ý Û õ ý ì|ÿwhere the individual matrix pairs

Ó ë ý ÿ õ ý ì are assumedto have dimensionssuch that the productÓ ë ý Û õ ý ì exists.

One of the simplest type of block matrices are block diagonal matrices. Recall that if� Ô ð���Ù ÿ �5Ú ÿ ����� ÿ ��Þtß�Ú ñ�� � Þ, then the matrix

Ó Ô ���� �ð � ñ Ô ���� �ð��5Ú ÿ ��� ÿ ����� ÿ �tÞ�ß�Ú ñ isthe éwçyé diagonal matrix with diagonal entries

� Ù ÿ � Ú ÿ ����� ÿ � ÞtßÅÚ . This concept generalizestoblock vectors. If

ð�ÓpÙ ÿ ÓkÚ ÿ ����� ÿ Ó ý ß�Ú ñ is a block vector such that eachÓ ë���� Þ��tÞ�ð �kñ

, thenÓîÔ����� �ðvÓpÙ ÿ ÓkÚ ÿ ����� ÿ Ó ý ß�Ú ñ is the �Åé ç��Gé block diagonalmatrix

ÓïÔ Õ××Ø ÓpÙ � Û\ÛIÛ �� ÓkÚ Û\ÛIÛ �...

..... .

...� � Û\ÛIÛ�Ó ý ß�Úã�ääå��

This shouldnot be confusedwith���� �ðvÓ ñ

whenÓ ��� Þ��tÞ�ð �kñ

, in which case���� �ð Ó ñ

is a vector ofscalarsgiven by

���� �ðAÓ ñ Ôâð�� Ù7Ù ÿ � Ú)Ú ÿ ����� ÿ � Þ�ß�ÚàÜ ÞtßÅÚ ñ .A key role in the theoryof block matricesis playedby the tensorproductandwe shallmakeheavy

useof it in subsequentsections.For example,if � Þ denotesthe é ç é identity matrix, then � Þ! Ó isthe block diagonalmatrix

� Þ Ó�ÔÖÕ××Ø Ó � ÛIÛ\Û"�� Ó ÛIÛ\Û"�...

.... ..

...� � ÛIÛ\ÛTÓã�ääå �

More generally,we have

� ý ð � Þ Ó ñ Ô � ý Þ Ó � (6.2.1)

This follows from the evenmore generalpropertyðoÓ õ ñ ÛIð ÷ $# ñ ÔyðvÓÆÛ ÷ ñ ð õ Û # ñ ÿ (6.2.2)

wherewe assumethat the ordinary matrix productsare defined.

292

Page 301: Image Algebra by Ritter

Threeadditional facts abouttensorproductsthat we shall useareas follows:If A and B are matrices,then ������������� � � � ���

(6.2.3)

If A and B are nonsingularmatrices,then����� ���������� ��� ��� ��� �(6.2.4)

If A and B are permutationmatrices,then so is����� �(6.2.5)

Theseresultsarenot difficult to verify andwe leaveit to the readerto convincehimself of their validity.

We now turn our attentionto somebasicpropertiesof the Fouriermatrix. If � �������� denotestheFourier matrix correspondingto the Fourier templatef definedby Eq. 6.1.12,then the imagealgebraformulation of the DFT (Eq. 6.1.13)is equivalentto the vector-matrixproduct ! !#" � � (6.2.6)

The vector-matrixrepresentationof the DFT facilitates the analysisof the transform. In order torepresentEq. 6.2.6moreconcisely,we let �%$ &�('�)+*,� $.-�$ denotethe /102/ Fouriermatrix, where' )�* 3� * �(45�6�7 �98;:�<= )�*�>@?BADCE> 4 A /#F3G �ReplacingF by �%$ in Eq. 6.2.6specifiesthe sizeof both the transformmatrix andsignal length.

Therepresentationof Fouriermatricesis commonlysimplified by setting HI$ &7 �98J:�<= andnoting that'K)+*� H )+*$H9L$ H $$ H ) $$ GH $NM�O$ FPGH $KM�Q$ F�RHTS $NM�Q$ RH )VU $$ H )$Thus, � � &� G � > � O XW G GG FPG�Y >and �%Q [Z\\] G G G GG H^Q H OQ H SQG H OQ H QQ H9_QG H SQ H _Q H9`Q

aVbbc dZ\\] G G G GG FeR FfG RG FPG G FPGG R FfG FeRaVbbc �

293

Page 302: Image Algebra by Ritter

Similarly,

gihejkllllllllllllmn n n n o n n n nn p h prqh prsh o tPn tup h tuprqh tup9shn pTqh tPn prqh o n prqh tPn tuprqhn p sh tTp qh p h o tPn tup sh p qh tTp ht t t t v t t t tn tPn n tPn o n tfn n tPnn tTp h p qh tup sh o tPn p h tup qh p shn tup qh tPn p qh o n tup qh tPn p qhn tup sh tTp qh tup h o tPn p sh p qh p h

wVxxxxxxxxxxxxyz

The conjugateand the conjugatetransposeof a matrix { j}|(~����,�����T����� aredenotedby{e� j��~ ��������K��� {e� j��~ ��(�;���respectively.We saythat A is symmetricif {�� j { , Hermitian if { � j { , andunitary if { � j {P��� .6.2.1 Theorem.

g%�is symmetric.

Proof: This is obvioussince ��� �Pj p � �� j p � �� j � � � . Therefore,g �� j�g%� .

Q.E.D.

As aneasycorollarywe havethatg �� j�|�g �� � � j�g �� . Thus,

g �is not Hermitianif ����� . However,

sinceg%�

is a real-valuedmatrix for � j nor 2,

g%�is Hermitian whenever� j n

or 2.

6.2.2 Theorem.g ��¡  g � j �  £¢ � .

Proof: Let { j¤g ��   g �and considerthe

|�¥ �;¦ �th entry~¨§ ��j � �©�ª�¬«®­°¯V± p � §��² �   p � ��´³ j � �©�ª�¬«5­ p �¶µ � � §¸·� z

If¦ j�¥

, then~E§ �¹j � . If

¦�ºj&¥, then

p � � §� ºj n. Therefore,

p � � §� t�n ºj�». However,

± n�t¼p � � §�d² ~E§ ��j�~E§ � t¼p � � §� ~E§ ��j � ���ª�½«5­ p �Vµ � � §¸·� t �ª�¬« � p �¾µ � � §�·� j n�t�p µ � � §¿·À�� j�» zTherefore,

~E§ �@jX»whenever

¦&ºjX¥.

Thus, { j kllm � »  ¶ ,  »» �  ¶ ,  »...

..... .

...» »  ¶ ,  �wVxxy j � kllm n »  , ¶  »» n  , ¶  »

......

. .....» »  , ¶  nwVxxy z

Q.E.D.

294

Page 303: Image Algebra by Ritter

According to this theorem, ÁVÂÄÃÆÅÂ�Ç°ÈÂÊÉ Ç Â or, equivalently,ÇPË Å ÃÍÌÎ Ç ÈÂÐÏ (6.2.7)

Thus, Ç Â is almostunitary since it is a scaledunitary matrix.

Multiplying the Fourier transformequation ÑÒ Ã Ò É Ç Â by Ç Ë ÅÂ one obtainsÑÒ É ÇPË ÅÂ Ã Ò Ï (6.2.8)

Accordingly, a can be obtainedfrom ÑÒ using matrix inversion.

Using Eqns. 6.2.7 and 6.2.8 one obtainsÒ ÃÓÑÒ É Ç Ë Å à ÌÎ ÑÒ É Ç È à ÌÎ ÑÒ ÉKÔ ÇfÕÂ^Ö�× Ã ÌÎ ÑÒ É Ç¹ÕÂor Ò Ã ÌÎ ÑÒ É Ç Õ (6.2.9)

which is, of course,equivalentto the image algebraexpressionÒ ÃØÅÂ Ô ÑÒ1ÙÚ�Û Õ Ö . The significanceofEq. 6.2.9 is that the original signala may be recoveredfrom the transformedversionwithout the needfor matrix inversion. This property is especiallyuseful when computingtwo-dimensionaltransformswherethe transformationmatricesmaybequite largeand,therefore,the computationof generalinversesimpractical.

6.3 Shuffle Permutations and the Radix Splitting of Fourier Matrices

If p dividesn, thenit is possibleto relate Ç Â to Ç ÂÝÜ(Þ and Ç Þ . This relationship,knownasthe radix-psplitting of Ç Â , allows for the computationof an n-point DFT from DFTs of smallersize. Repetitionofthis processis the heartof today’s algorithmsfor the efficient computationof the DFT. The constructthatprovidesthe link betweenÇ Â andtheFouriermatricesof smallerdimensionsis a permutationmatrixthat shufflesor sorts the column (or rows) of a matrix in somedesiredorder.

SupposeÎ ÃÐß�à with ÌDá ß á à . LetâfãEä Þfå ä ÂKÜÞfæ ä ÂèçKé�ê�ë ã�ä Þ°å ä ÂKÜÞfæ ä Âdenotethe row and column scanningmapsdefinedbyâìã Ô(í®î�ï(Ö%ð í Îß Ù ïìñ Îiò ë ã Ô�í®î¬ïJÖóð ï ß Ù í°îrespectively.The Ô ß î Î Ö –shufflepermutationô Þ,õ  ã�ä  æ ä  is definedas ô Þ¶õ  à âeö ë Ë Å . Equivalently,ô�Þ,õ  Ô�÷+Ö Ã�øúù û Ô�í®î¬ïJÖýü ä Þ å ä ÂNÜÞÿþ Ï��¬Ï ë Ô�í®î¬ïJÖ Ã ÷ çÝé�ê â Ô�í®î¬ïJÖ Ã�ø Ï

An easy way of visualizing the Ô ß î Î Ö –shuffle permutationis to label the points of the array� Ã ä Þ å ä ÂNÜ(Þ in row scan order, then taking the transposeof X and listing the elementsof the

295

Page 304: Image Algebra by Ritter

transposedarray in row–scanorder. The mappingof the subscriptscorrespondsto the permutationofelementsof ��� by ��� � . Thus, if

� � ���������� ��� ��� ����� ������ �� �� � ��! � � ��! � �����"��� ���� ���� �� ��� ��! � ��� ��! � �����"�$# ���� �...

......

.. ....�&% � � �(' �� �)% � � �*' ��! � �&% � � �+' ��� � ����� � � � �

,-----.0/then�1�� � �32 �4� ��� ��� ����� � � � � 53� � � � � ����� ��� � � � 56�����758� � � � �����"� � � ��$� � �� ��� �� �����"� % � � �+' �� 53��� � ��! � �����"� % � � �(' ��! � 56�����759� ���� � �����"� � � ��:Equivalently, we have� �� � � 2�; < = �����?>A@ < 5B> >DC < ����� = >E@ < 5F�����75HGI@I> �����9GJ@ <; � � � �� ����� % � � �+' �� 5 < � � C < �����LKM>N@ <PO � � C < 5F�����75 � � @ < �����9GJ@ < :The horizontalbarsareaddedto emphasizethe structureof the shuffle permutation.

The permutationmatrix Q KR> / G OTSVU$W �YX � is called the modp perfectshuffle.

6.3.1 Examples:

(i) SupposeG � <�; and > � = . In this casewe have� � 2 �$� ��� ��� �$# �$Z�$[ �4\ ��] �$^ �$_ :D`Hence � � �*� � 2 � � � � 53� � � # 5a� Z � [ 53� \ � ] 59� ^ � _�4� ��[ 53��� �$\ 5a��� ��] 53�$# �4^ 59�$Z �4_ :�32b; < 5 = c 53d e 5af g 5ih j; e 5 < f 5 = g 5 c h 5ad j : `Since Q K = / <�;�O � U4Wlk X mRn � KR>porq O is defined by> orq �ts < uwv � � �*��Kyx O �{z; |~}*����(��u��*� /we have

Q K = / <�;�O �����������������

< ; ; ; ; ; ; ; ; ;; ; ; ; ; < ; ; ; ;; < ; ; ; ; ; ; ; ;; ; ; ; ; ; < ; ; ;; ; < ; ; ; ; ; ; ;; ; ; ; ; ; ; < ; ;; ; ; < ; ; ; ; ; ;; ; ; ; ; ; ; ; < ;; ; ; ; < ; ; ; ; ;; ; ; ; ; ; ; ; ; <

,--------------.`

296

Page 305: Image Algebra by Ritter

(ii) If ���H��� and ����� , then� ������$� ��� ��� ��� �$���� �$� ��� ��� �$����*� ���+� ���(� ���*� ���*� ¡0¢

and£�¤ �+� �3¥ �4� ��� ��� ¦a�4� �$� ��� ¦3�4� ��� �4� ¦3�4� ���*� ���(� ¦"���+� ���§� ���*��$� ��� ���*� ¦a��� �$� ���+� ¦3��� ��� ���+� ¦3�4� �4� ���§� ¦ �4� �$� ���*� ¨� ¥�© � ª ¦ � « � ¦�¬ ­ ® ¦a¯ � © �~� ¦ ��ª ��� �«© � � © ¦ � ¬ �~� ¦ ª ­ ��ª ¦ � ® ��� ¦ « ¯ �« ¨ ¢

SupposeA is a °²±{� © matrix and ³µ´M¶b· denotesthe jth columnof A. Thenaccordingto the aboveexample, ³¹¸�º»´*ª1¼�� © ·&�½´y³»´ © ·¾¼¾³»´+�!·¾¼À¿�¿�¿�¼¾³»´ ¯ ·+·4¸�º»´*ªp¼�� © ·�½´y³»´ © ·¾¼¾³»´Áª�·¾¼¾³»´Â«p·+¼¾³»´ ¬ ·+¼¾³»´ ® · ¦ ³»´+�P·¾¼(³»´Á�1·¾¼¾³»´Á��·+¼(³»´ ­ ·+¼¾³»´ ¯ ·*· ¢Thus, ³�¸�º»´*ªp¼�� © · is just A with its even-indexedcolumnsgroupedfirst. In general,if �Ã�Ī~Å , then³¹¸�º»´yªÆ¼(�4·&�½´*³»´ © ·Ç¼(³»´Áª�·+¼$¿�¿�¿�¼Ç³»´Á�ÉÈ0ª1· ¦ ³»´+�P·+¼(³»´y�1·+¼�¿�¿�¿�¼¾³»´Á�IÈÊ�!·+· ¢ (6.3.1)

This is the reasonthat º»´*ªp¼¾��· is referredto as the even-oddsort permutationmatrix. It is customarytodenotethe even-oddsort permutationmatrix º»´*ªp¼¾��· by ºÌË .

As mentioned,the shuffle permutationmatrix plays a key role in linking Í4Ë with Í Ë~ÎÂÏ . Considerthe case ���a« . Here we have

ºÑÐ� ¸�Í � � �ÒÒ� � © © ©© © � ©© � © ©© © © � ÓÓ¡ �ÒÒ� � � � �� ÈÌÔ Èµ� Ô� ȵ� � ȵ�� Ô Èµ� ÈTÔ

 ÓÓ¡ � �ÒÒ� � � � �� ȵ� � È��� ÈÌÔ Èµ� Ô� Ô Èµ� ÈÌÔ ÓÓ¡ � �ÒÒ� Í � ´ © ·Í � ´*ª�·Í � ´Ç�!·Í � ´*��·

 ÓÓ¡ ¼where Í � ´R¶b· denotesthe jth row of Í � . Thus, º Ð� ¸+Í � is just Í � with its even-indexedrowsgroupedfirst.Of course,since ´yº Ð� ¸�Í � · Ð �½Í Ð� ¸!´*º Ð� · Ð �½Í � ¸�º � ¼ this observationalsofollows from Eq. 6.3.1.

Note that in our case(i.e., �Õ�"« )ºÖÐ� ¸�Í � � �ÒÒÒÒ�

� � ¦ � �� ȵ� ¦ � ȵ�È È × È È� ÈÌÔ ¦ ȵ� Ô� Ô ¦ ȵ� ÈÌÔ ÓÓÓÓ¡ � ¥ Í � Í �Í � ¸�Ø � ÈÌÍ � ¸�Ø � ¨ ¼ (6.3.2)

Where Ø � � ¥ � ©© ÈTÔ ¨ �ÄÙ�ÔÁÚ!Û�´+��¼ÁÜ � · ¢Thuseachblock of º Ð� ¸�Í � is either Í � or a diagonalscalingof Í � . Furthermore,the right-mostmatrixin Eq. 6.3.2 factors as ¥ Í � Í �Í � ¸�Ø � ÈTÍ � ¸�Ø � ¨ � ¥ Í � ÝÝ Í � ¨ ¥ÑÞ � Þ �Ø � ÈÌØ � ¨ ¼

297

Page 306: Image Algebra by Ritter

where ß�à denotesthe áµâÉá identity matrix. Hence,multiplying Eq. 6.3.2by ãµä�åæèç ãÖéæ ç ã æ we obtainê æ ç ã æ�ë ê à ìì ê àÀí ë ß�à ß�àî à ï î à�íñðTherefore,if ò ç9ó ò óyô�õ¾ö ò ó§÷Põ¾ö ò ó á õ¾ö ò óÁø�õ*õ , thenòNù ê æ ç òEù�ã æ ë ê à ìì ê àÀí ë ß�à ß�àî à ï î àpíçÕó ò ó*ô�õ+ö ò ó á õÇö ò ó+÷!õ¾ö ò óÁø1õ*õ ë ê à ìì ê à í ë ß à ß àî à ï î à íçVúró ò óÁô�õ¾ö ò ó á õ+õ ù ê à ö�ó ò ó+÷!õÇö ò óÁø1õ+õ ù ê àû ë ß à ß àî à ï î à�í ù (6.3.3)

This showshow a four-pointDFT canbecomputedin termsof two two-pointDFTs. As thenext theoremshows,this holds in general;i.e., if ü ç á�ý , then

ê4þcanbe split into two half-sizedDFT matrices.

Theorem. If ü ç á~ý andî�ÿ ç���������(÷~ö� þ ö �����Àö� ÿ ä�åþ �

, thenã éþ ù ê4þ ç ë ê ÿ ê ÿê ÿ ù î ÿ ï ê ÿ ù î ÿ í ðProof: Let ã éþ ù ê4þ ç ë � �� � í öwhereA, B, C, and D are ýLâ{ý matrices. Since

ê4þ ù~ã þ is justê4þ

with its even-indexedcolumnsgroupedfirst and ã éþ ù ê4þ ç ó ê4þ ù�ã þ õ é , ã éþ ù ê4þ is just

ê4þwith its even-indexedrows

groupedfirst. Thus, if � çÕó������Põ with ô������ ý and ô �"!#� ý , then ���$�µç% à �&�þ .

But since àþ ç' ÿ , à �$�þ ç( �$�ÿ . Therefore, � ç ê ÿ .

Similarly, if � ç ó*) �$� õ , then ) �$� ç+ à ��,-�/. ÿ10þfor ô �2��� ý and ô �"!#� ý . Since à ��,3��. ÿ40þ ç5 �6,7�6. ÿ80ÿ ç5 �&��.9� ÿÿ ç5 �&�ÿ ù � ÿÿ ç: �$�ÿ ö� ç ê ÿ

.

Sinceî ÿ

is a diagonalmatrix,ê ÿ ù î ÿ ç<;6 �&�ÿ ù �þ>= , where ô?�%�@� ý and ô��'!A� ý .

Now if � çHó�B �&� õ , then B �$� ç5 , à �$. å 0 �þ ç: à �$�þ ù �þ ç5 �&�ÿ ù �þ ðTherefore, � ç ê ÿ ù î ÿ .

298

Page 307: Image Algebra by Ritter

Finally, let CEDGF�H�I$J�K . Using the fact that LNMO DQPSR , we obtainH I&J D5L4T3U I$VXW&Y T J6V M YO D5L1U I$JO Z L JO[Z L\U M IO Z L MO D]P8L I&JM Z L JO_^and, hence, C`DaP4b M Zdc M .

Q.E.D.

It now follows that egfO b O Dih b M jj b M?k h1l M l Mc M P c Mmkon (6.3.4)

If we multiply this equationby

e O we obtainb O D e O Z h b M jj b M?k h\l M l Mc M P c M�k n (6.3.5)

Hence,if pqDrF�psFut�K ^ psF&R�K ^ v�v�vw^ psF�x�P%R�K*K , thenp Z b O D(FypsF�t�K ^ p F�z�K ^ v�v�vX^ psF{x�P�z>K ^ psF&R�K ^ p F�|�K v�v�vw^ p F�x�P+R�K}K h b M jj b M k h l M l Mc M P c M k n (6.3.6)

This establishesthe following corollary:

6.3.3 Corollary. If x~Diz�� and p"��� O , thenp Z b O D�F�p�� Z b M ^ p W Z b M K h l M l Mc M P c Mmk ^ (6.3.7)

where p � DGFypsF�t�K ^ p F�z�K ^�v�v�v�^ psF�x�P2z�K&K and p�W�D'F�psF&R�K ^ p F�|�K ^�v�v�vX^ psF�x�P%R�K*K .The ideaof splitting the DFT canbe appliedagainif m is even,relating p � Z b M to p �&� Z b M8� U andp � W Z b M1� U , and pXW Z b M to pXW � Z b M\� U and p�W}W Z b M\� U . In casen is a power of 2, we can divide and

conquerall the way down to a sequenceof one-pointDFTs.

In casen is not a powerof 2, thenthe radix-2 divide-and-conquerprocessbreaksdown. However,as long as n is not a prime number,it is still fairly easyto expressb O as a function of smallerDFTmatrices.Specifically,if x�D���� with Ro�2�A��� , then b O can be expressedasa function of the DFTmatrices b M and bX� . The key is to usetensornotation. Note thatH������XF l M ^�c M K&F*b UN� l M K�D h l M jj l M k�� h R RR P�R k � l Mg�Drh�l M �� c M?k h9l M l Ml M P l M�kDrh\l M l Mc M P c M?k�nThus, Eq. 6.3.4 can be rewritten asegfO b O D�F l U � b M K Z Hd�����XF l M ^}c M K Z F�b U � l M K (6.3.8)

and Eq. 6.3.7 as p Z b O D�F�p � Z b M ^ p W Z b M K Z�� O ^ (6.3.9)

where � O D�H������XF l M ^}c M K Z F�b U�� l M K .The generalformulation of Eq. 6.3.8 is given by the next theorem.

299

Page 308: Image Algebra by Ritter

6.3.4 Theorem. If �: "¡w¢ and £1¤�¥ ¦§ G¨�©�ª�«N¬&­>®�¯±°�®s²�²�²�®�¯ ¦4³X´° µ , then¶¸·º¹ ¡ ®��s»±¼/½ °   ¹�¾ ¤4¿ ½ ¦ »s¼�¨d©�ª�« ¬ ¾ ¦ ®}£ ¤�¥ ¦ ® ²�²�²�®6£ ¤�³9´¤�¥ ¦ µ ¼ ¹ ½ ¤4¿ ¾ ¦ »wÀ (6.3.10)

Proof: Let¹�Á4Â&à »o  ¶ · ¹ ¡s®}�s»N¼�½ ° and¹�ĸÂ&à »�  ¹�¾ ¤8¿ ½ ¦ »±¼�¨�©�ª�« ¬ ¾ ¦ ®}£ ¤�¥ ¦ ® ²�²�²X®�£ ¤�³w´¤�¥ ¦ µ ¼ ¹ ½ ¤8¿ ¾ ¦ »w®

where ÅAÆ]Ç�®wÈ�Éq¡ and eachÁgÂ&à ® ÄÊÂ&à is an ¢ÌËÍ¢ matrix suchthat

¹�ÁgÂ&à » and¹*ĸÂ&à » are¡�Ë@¡ block matrices.

Let Î Á Â&Ã&ÏÑÐ$Ò and Î Ä Â&Ã*ÏÑÐ$Ò denotethe¹ÔÓ ®&Õ�» th entry of

Á Â&Ãand

Ä Â&Ã, respectively. we needto

show that Î Á Â&Ã Ï Ð$Ò  ÖÎ Ä Â&Ã Ï Ð&Ò .By definition of

ÄÊÂ$Ã,ΠĸÂ&Ã Ï Ð&Ò  ]Î×½ ¦ Ï Ð&Ò ¼sØ-£ ¤�¥ ¦4Ù Ò�Ò ¼}¯ Â&ä  5¯ Ð$Ò¦ ¼6¯  Ұ ¼6¯ Â&ä À

Since¶ · ¹ ¡s®}�s»±¼�½ ° is just ½ ° with its rows sortedmod p, we also have¹*ÁgÂ&à »N  ¹ ½ ° ¹ Å�»6®}½ ° ¹ ¡�»&®�²�²�²X®�½ ° ¹ � Ú?¡�»�Û&½ ° ¹ ­�»�®�½ ° ¹ ¡oÜ+­�»6®�²�²�²�®�½ ° ¹ ��Ú�¡ÝÜ+­�»XÛ�²�²�²²�²�²sÛ$½ ° ¹ ¡ÞÚ%­�»�®�½ ° ¹�ß ¡àÚ+­�»&® ²�²�²X®�½ ° ¹ ��Ú+­�»*» · ®

where ½ ° ¹áÓ » denotesthe jth row of ½ ° . Thus,if â�ã/ä denotesthe¹�å ®&æ9» th entry of ½ ° , thenÎ Á Â&Ã Ï Ð$Ò  �â Â$ç Ð ¤�¥ à ¦ ç Ò  5¯4è Â&ç Ð ¤êé è à ¦ ç Ò é°  %¯ ¤ Ð&Ò° ¼6¯  Ұ ¼6¯ Â$à ¦° ¼6¯ ¦�¤ Рð À

Since ¯ ¦ë¤ Рð   ¹ ¯ ¦�¤°Ì» Ð Ã   ¹ ¯ °° » Ð Ã  G­ , ¯ Â&à ¦°  q¯ Â$ä , and ¯ ¤ Ð$Ò°  q¯ Ð$Ò¦ , we haveÎ Á Â&Ã*ÏÑÐ&Ò  5¯ Ð&Ò¦ ¼6¯  Ұ ¼6¯ Â&ä ÀQ.E.D.

In analogywith the radix-2 splitting, radix-p splitting can be usedto obtain an n–point DFT bygluing togetherp DFTs of length ¢` i�íì�¡ .6.3.5 Corollary. If �~ G¡w¢ and î�ï"ð ° , thenî�¼�½ °   ¹ îwñ4¼�½ ¦ ®�î ´ ¼ê½ ¦ ® ²�²�²w®&î ¤�³w´ ¼�½ ¦ » Ä ¤�¥ ° ®

where î Ð   ¹ î ¹3Ó »&®�î ¹ ¡[Ü Ó »6®�²�²�²X®&î ¹ ��Ú#¡oÜ Ó »&» andÄ ¤�¥ °  "¨�©�ª�« ¬ ¾ ¦ ®}£ ¤�¥ ¦ ® ²�²�²X®�£ ¤�³w´¤�¥ ¦oµ ¼ ¹ ½ ¤_¿ ¾ ¦ »wÀProof: Multiply both sidesof Eq. 6.3.10by î�¼ ¶�¹ ¡s®}�s» .

Q.E.D.

The matrixÄ ¤�¥ ° is known as the radix-p butterflymatrix and derivesits namefrom the graphical

representationof its actionon an input vector(Section6.5, Fig. 6.5.1). Note that for ¡�  ß , Ä ¤�¥ °   Ä ° ,where

Ä ° is the radix-2 butterfly matrix definedby Eq. 6.3.9.

300

Page 309: Image Algebra by Ritter

6.4 Radix-2 Factorization, Perfect Shuffles,and Bit Reversals

According to Theorem6.3.4 and its corollary,ò�ó/ôíõàö%ò�ó�÷�øÔù ú&ûsü±ó�ø�ý6þ4ÿ�ô��Sü±ó��_þ�� õàö~ø�ò��4ó/ô��oú�ò�Nó�ô��[ú���wú}ò�þ� ��\ó�ô���ü±ó��gþ�� õ_ú (6.4.1)

where � öGû���ù and ��� ù ��� . Now if � �Ýö � , ù��àö�ù , and thereexist integers ��� and ù � suchthat � �¸ö2ù ����� with ��� ù ������� , thenwe canreapplyEq. 6.4.1to eachof the expressionsò��4ó�ô���� ,replacingeachDFT of length ù�� by DFTs of length ù � . This procedurecan alwaysbe employeduntilfor someindex k, �� cannotbe factoredfurther.

In order to betterunderstandactual implementationof the split-and-merge process,we restrict ourattentionto the simple casewhere û5ö"! and ù�ö#! . The methodologyderivedfrom the analysisofthis casecanthenbe generalizedto deriveimplementationsof the generalformulationexpressedby Eq.6.4.1(e.g., [6, 10]). This approachis analogousto our derivationof Eq. 6.3.10from Eq. 6.3.8.

For ùqö$! , Eq. 6.4.1 becomesò ó�ô õ ö+ò�ó�÷ õ ó�øyý � ÿ�ô � ü�ó�� õ ö�ø�ò � ó�ô � ú�ò � ó�ô � üsó�� õ&% (6.4.2)

Assuming û#ö'! , the split-and-mergeprocedurecanbe replacedby applyingCorollary6.3.3to ò � ó6ô �ø)(Ýö'*�ú � ü which splits each ò+�Sódô�� intoò+�1ó�ô���ö",yò-�.�4ó�ô �0/ � ú9ò+�1�Nó�ô �2/ ��3 ó��4� % (6.4.3)

Merging Eq. 6.4.3 with Eq. 6.4.2 results inò�ó�ô õ ö657,áò �1� ó/ô �0/ � ú�ò �8� ó�ô �0/ ��3 ó�� � ú9,yò �7� ó�ô �0/ � ú�ò �1� ó�ô �2/ ��3 ó�� �;: ó�� õ % (6.4.4)

Using tensornotation,we may rewrite Eqs. 6.4.2 and 6.4.4 asòàó�ôsõ�ö , ò��1ó�ô õ</ � ú�ò=��ó�ô õ>/ ��3 ó�ø�ý���ÿ?�Êõ�ü (6.4.5)

and ò�ó�ôsõàö",uò��1�1ó�ô õ</1@ ú9ò��8��ó�ô õ>/A@ ú�ò�7�\ó�ô õ>/7@ ú�ò�1�Nó�ô õ>/7@ 3 ó�,uý � ÿB� õ</ � 3 ó�øyý���ÿ?�Êõ�ü�ú (6.4.6)

respectively.

Since ô � ö(ø � ü , continuationof the split-and-mergeprocessCEDGF moretimesleadsto the followingformulation of the DFT:ò�ó/ôsõ�ö , ò-�IH/ú�ò-� � ú���Xú�ò-�.J1K � 3 ó , ý õ>/ � ÿL� � 3 ó�ó�ó , ý � ÿB� õ>/ ��3 ó�øyý���ÿ?�¸õ9ü9ú (6.4.7)

whereeachof the subscripts(�M is somebinary sequenceof length k.

For N ö ø N ��ú N ��ú���Xú N -� ü&O -�PQSR �UT � , let ø N ü � denotethe base2 expansionof s; i.e.,ø N ü � ö N �0V N ��!4V ó�ó�ó�V N -��! �� %301

Page 310: Image Algebra by Ritter

Using induction on k, it can be shown that W�X1Y[Z\W�]7])^�_�`.a�` for bcZed-f�ghf�i�i�i�f�jlkmg (e.g., Theorem6.4.3). This implies thatn W+Xpo�f�W-X.q8f�i�i�if+W-X.r1s<q1t4Zu]vW�]xwzy�]pd�`{`8f|W�]xw�y+]}g<`7`8f~i�i�i�f{W�]xw�y+]7j�k�g<`{`7`=f (6.4.8)

where wzyc�=�~yl���y is the permutationdefinedby w�y+].b�`&Z�])^�_�` a .Equivalently, we have n W-X o f+W-X q f�i�i�i=f-W+X r1s<q t�Z�W�����y&f (6.4.9)

where ��y is the permutationmatrix defined by ��y����U�}r . This meansthat the DFT of W��G� y consistsof a permutationof the componentsof a followed by a productof k sparsematrices.

Since ��y playsa centralrole in theefficient computationof the DFT, we providea formal definitionand an image algebraspecificationfor its implementation. The following examplewill provide thenecessaryinsight into understandingthe actionof ��y on the coordinatesof a vector.

6.4.1 Example: Supposej�Z"�<� and W������7� . Then

W���� �A� Zu]vW��������>f+W � �����<`���]p� ���?�E�7� `�fwhere W � Zu]pW�]pd�`}f|W�]p��`8f+W�]x�+`}fzW�].��`1f+W�].��`1f+W�]1g�d�`}f|W�]1g���`1f|W�]8g���`1`and W � Zu]pW�]1g<`}f|W�]I |`8f+W�]p¡�`1f+W�]1¢h`1f+W�]I£|`8f+W�]1g�g<`}f|W�]1g� �`8f|W�]1g�¡�`1`-¤Using the butterfly matrix � � , we can synthesizeeach8–point DFT, W-X¥�h��� , from a pair of4–point DFTs as follows:

]pW��0�����hf+W � �����<`9Zu]vW��1�2��� � f+W�� � ��� � f+W � �0��� � f+W �1� ��� � `��<]p� a �B� �<`-fwhere

W��1��Z¦]pW�]pd�`8f+W�]x�-`8f|W�]p�|`8fzW�]}g���`{`8f§W�� � Zu]vW�]p�|`8f|W�]p�|`8f|W�]1g�d|`1f|W�]}g���`{`8fW � � Zu]vW�]1g¨`8f|W�]p¡|`8f|W�]p£�`1f+W�]}g� �`{`8fª©<«�¬�W �1� Z¦]pW�]. �`1f+W�]7¢�`8f|W�]1g�g<`1f|W�]8g�¡�`1`8¤Repeatingthis process,we obtain

]pW��1�0��� � f|W�� � ��� � fzW � �0��� � f|W �1� ��� � `Zu]vW �{�1� ��� a f+W �1� � ��� a f+W � � � ��� a f+W � �1� ��� a f|W � �1� ��� a f|W � � � ��� a f+W �{� � ��� a f+W �{�1� ��� a `���]p� � �L� � `8fwhere

W��1�1��Zm]xW�]7d�`1f|W�]p�|`1`8f­W��1� � Zu]pW�]x�+`1f+W�]}g���`{`8f®W�� � ��Zu]vW�]p�|`8f|W�]1g�d|`7`8fW � �1� Zm]xW�]7��`1f|W�]1g��+`1`}f¯W � �1� Z°]xW�]8g¨`1f|W�]p£|`1`}f®W � � � Zu]vW�]p¡|`8f|W�]1g� |`7`8fW �1� � Zu]pW�]p �`}f|W�]1g�g<`{`1fª©<«�¬�W �1�1� Zu]xW�]1¢h`1f+W�]}g�¡�`{`+¤302

Page 311: Image Algebra by Ritter

The final stageis now given by±x²�³1³1³2´�µ�¶<·+²�³1³A¸2´�µ�¶�·z²�³8¸7³0´�µ�¶<·|²�³8¸1¸�´�µ�¶h·z²¸7³1³2´�µ�¶<·+²=¸A³8¸9´�µ�¶h·�²=¸{¸7³0´�µ�¶<·+²¸1¸1¸�´�µ�¶<¹º ±v²�³1³{³1³�·+²�³{³1³8¸�·+²�³1³8¸7³�·+²�³1³}¸1¸�·+²�³8¸7³1³�·+²�³8¸7³}¸�·+²�³}¸1¸7³�·+²�³8¸1¸1¸�·+²=¸7³{³1³�·1²¸7³1³8¸�·+²=¸7³}¸7³�·+²¸7³8¸1¸�·² ¸1¸7³{³ ·+² ¸{¸7³8¸ ·+² ¸1¸1¸7³ ·�² ¸1¸{¸1¸ ¹�´�±p»�¼2½L¾ ¶ ¹º ±p²�±I¿�¹}·+²�±pÀ�¹1·+²�±pÁ+¹1·+²�±1Â�Ã|¹8·+²�±pÃ|¹8·z²�±8Â�¿�¹8·|²�±IÄ|¹8·+²�±1Â�Á-¹8·z²�±}Â<¹1·|²�±.Å�¹1·+²�±IÆ|¹8·+²�±1Â�Ç|¹8·²�±pÇ�¹}·|²�±1Âh¨¹1·|²�±1È�¹1·|²�±1Â�Æ�¹|¹�´<±v» ¼ ½?¾�¶�¹�É

Thus,²�´�Ê�¸7Ë º ±v²�±p¿|¹1·|²�±pÀ�¹8·+²�±xÁ-¹8·+²�±1Â�Ã�¹1·|²�±.Ã|¹1·|²�±1Â�¿|¹8·|²�±pÄ�¹8·z²�±8Â�Á�¹8·|²�±1¨¹8·A²�±xÅ�¹8·+²�±pÆ|¹8·+²�±1Â�Ç�¹1·²�±pÇ�¹8·z²�±8Â�Â�¹8·|²�±7È�¹8·|²�±1Â�Æ|¹|¹º ±x²�±pÌ+¸7Ë�±p¿|¹1¹}·|²�±xÌ+¸AË�±}Â<¹7¹8·|²�±xÌ+¸7Ë�±7Ã�¹7¹}·Í�Í�Í·�²�±vÌ+¸7Ë�±1Â�Ç�¹{¹8·�²�±xÌ+¸7Ë�±8Â�Á�¹1¹8·|²�±xÌ+¸AË�±}Â�Æ�¹1¹{¹+É

Expressingi andÌ+¸7Ë�±.ÎA¹

in termsof binary notation elucidatesthe action ofÊ�Ï

. Specifically,we have the following relationship:

Î Ì+¸7Ë�±7Î7¹binary

Îbinary

Ì+¸7Ë�±.ÎA¹0 0 0000 0000

1 8 0001 1000

2 4 0010 0100

3 12 0011 1100

4 2 0100 0010

5 10 0101 1010

6 6 0110 0110

7 14 0111 1110

8 1 1000 0001

9 9 1001 1001

10 5 1010 0101

11 13 1011 1101

12 3 1100 0011

13 11 1101 1011

14 7 1110 0111

15 15 1111 1111

Figure 6.4.1 The permutationÌ ¸7Ë

and its correspondingbinary evaluation

It follows from the table thatÌ+¸7Ë�±7Î7¹

is obtainedfrom i by reversingthe order (readingfromright-to-left) of the four bits in the binary expressionof i.

303

Page 312: Image Algebra by Ritter

Becauseof its actionon the indicesof a vector, the permutationmatrix Ð�Ñ is commonlyknown asthe bit-reversingpermutationmatrix.

For the formal specification of Ð�Ñ , let ÒcÓÕÔ�Ö and for ׯÓ"ØhÙ�Ô+ÙÚ�Ú�ÚÙ�Û setÜ¥Ý Ó�Þ�ß1àAá�âUã?ä4ß â�åDefine Ð Ñ Ó Ü Ö4æ Ü Ö�ç�èéæ�æ�æ Ü ß æ Ü è å (6.4.10)

Thus, Ð�Ñ is composedof copiesof the perfect shuffle permutationmatrices ä ß Ù8ä�ê<Ù�Ú�Ú�ÚÙ9äëÑ which,accordingto Eq. 6.2.5, makes Ð�Ñ a permutationmatrix.

Note that if Û¦ÓìØ , then

Ð ß Ó Ü è Ó�Þ è ãLä ß Ó'ä ß Ùwhile for ÛmÓìÔ ,

Ð ê Ó Ü ß æ Ü è ÓuípÞ è ãBä ê<î æ ípÞ ß ãBä ß î Ó'ä ê æ ívÞ ß ãBÐ ß î åThis suggeststhe following theorem:

6.4.2 Theorem. If Ò�Ó\Ô Ö and ïðÓ\Ò�ñ<Ô , then

Ð�Ñ[Ó'äëÑ æ íxÞ ß ã?Ð�ò î åProof: Let óôÓõÛ�öuØ . Then ï÷ÓøÔhù and

Ð�òuÓðúÜ ù æ úÜ ù ç�è æ�æ�æ úÜ ß æ úÜ è Ùwhere úÜ¥Ý Ó�Þ ß1û á�â ã?ä ßAâ åUsing Eq. 6.2.1, we obtain Þ ß ã úÜ Ý Ó'Þ ß ãLívÞ ß1û á�âUã?ä4ß7â îÓ'Þ ß ãLívÞ�ß àAá>üýá�â ãBä4ß â îÓ'Þ ß à7á�â ãBä ß âÓ Ü¥Ý åHence,using Eq. 6.2.2, we can factor Þ ß ã�Ð�ò asÞ ß ã?Ð ò Ó�Þ ß ã úÜ ù æ úÜ ù ç-èþæ�æ�æ úÜ ß æ úÜ èÓ ÿ�Þ ß ã úÜ ù � æ�æ�æ ÿ�Þ ß ã úÜ ß � æ ÿ�Þ ß ã úÜ è �Ó Ü Ö�ç�è æ�æ�æ Ü ß æ Ü è åSince

Ü Ö Ó Þ ß�� ã'ä4ß à ÓõäëÑ , we now have

äëÑ æ ípÞ ß ã?Ð�ò î Ó Ü Ö4æ Ü Ö�ç�èþæ�æ�æ Ü ß æ Ü è åQ.E.D.

The recursivecharacterizationof Ð�Ñ given by this theoremmakesit easyto provethe bit-reversingaction of Ð�Ñ .

304

Page 313: Image Algebra by Ritter

6.4.3 Theorem. If ����� and � � is thepermutationmatrixdefinedbyEq. 6.4.10,thenthepermutation� � definedby � ������� ����� ��� ������ �! has the property that � � ���"�$#%&�$'(%*)+),)-%�� /. ' �"0+� � �1� /. ' %&� /. 0 %*),),)2%&�3#,�1054

Proof: If 67�8 , then � 0 �:9 0 and, therefore,� � �;���3#,� 0 � � ���3#,� 0 .We now proceedby using induction, assumingthe result to hold for all integersless than6�<= , where 6!>?� .Let �@�:� %BADC�E � %GF �:� H. ' , and IJ� ALK � � . We mustshow thatI ���1� /. ' %M� H. 0 %*),)+)&%&�3#(� 0 � � A �1���3#N%&�"'(%*)+),)2%&� /. ' � 0 �&4By Theorem6.4.2,I@� AOK � �P� AOK,Q � K(� 9 0SR � T � � �"A2#N%�A-'H�UKV� 9 0SR � T � � �$A&#BK � T %�A-'WK � T �M%where A # �"�1� � A � � ��� and A ' ���X� � A � � �&Y � for � �:Z % %-),)+)[%2F <\ .Let � � ��� # %M� ' %*),),)2%&� H. ' � 0 . Supposei is even. Then Q � maps A*�1�1� to A # �1�"] � � . Since i iseven, �3# �^Z . Hence,�X] �_� ��'-Y`� 0 � Y�K,K+Ka� H. ' � H. 0 and A*�"�X� mapsto A&#(�1�1�"'(%b� 0 %*),)+)&%&� /. '+� 0 � .By induction hypothesis,� Tc���"� ' %M� 0 %*)+),)2%&� /. ' �"0+� � �"� /. ' %b� H. 0 %*),),)2%&� ' �10U4But since �$# �=Z , ��� H. ' %&� H. 0 %*),)+)-%b��'+� 07� �1� /. ' %&� /. 0 %*),),)2%&��'(%&�$#+� 0 . Therefore,I ���1� /. '(%M� H. 0 %*),)+)&%&� # � 0 � � A �1��� # %&� ' %*)+),)2%&� /. '+� 0 �&4If i is odd, then �3# �8 and Q � maps A*�"�X� to A['ed � . '07f , where��� <J ��] �_�8ga Y���' � YhK+K,Ka� /. ' � /. ' <i kj ] �_� ����'(%b� 0 %*),)+)&%&� /. '+� 0 4By induction hypothesiswe againhave� T ���"��'(%M� 0 %*)+),)2%&� /. '(� 0 � � �"� /. 'l%b� H. 0 %*),),)2%&��'H� 0 4However,the coordinateposition ��� H. ' %&� H. 0 %*),)+)-%b� ' ��0 in the vector A ' K � T correspondstothecoordinateposition �"� H. ' %�� /. 0 %*)+),)&%2�"'/��0-Y`F in thevector I@� ��A&#mK � T %�A-'WK � T � . Thus,since �3# �n ,��� /. ' %&� H. 0 %*)+),)-%&��'H�10WY�F � g � H. ' Yo� H. 0 � YhK+K,K Yo��' � H. 0 j Y��$# � H. '� ��� H. '(%&� /. 0 %*),)+)[%2�"'+%&�$#+� 0 4Therefore, I ���1� /. '(%M� H. 0 %*),)+)&%&�3#(� 0 � � A �1���3#N%&�"'(%*)+),)2%&� /. '+� 0 �&4

Q.E.D.

Reversingan index bit twice results in the original index. Thus, ApK � � K � �=� A and, hence,� � K � �`�!9H� . Therefore,� ���:� . '� ���cq� . This provesthe following corollary.

305

Page 314: Image Algebra by Ritter

6.4.4 Corollary. r s is symmetric.

Having examinedthe structureof r s , we turn our attentionto the computationof tOuNr s .The following algorithm computesthe permutationfunction ves .

6.4.5 Algorithm (Evaluating ves�w�x�y )For zi{}|(~ and x�{}���*�l�*�,�,�2�&z7�\� define ves�w1x1y as:

begin ��� {��� � {�xfor � := 0 to �$�/�a�/w�z y��\� loop� � {��;� � ��J� {�| ��� w � �D| � y� � { �end loopreturn j

end

For t��`� s , the computationof t�uHr s cannow be accomplishedby usingthe simpleimagealgebraspecification: � � {8t��Gves

Of course,by specifyingthe template�@{��m�[ +w"r s2y , we could just aswell computetOu,r s in termsof the convolution product t �¡ � .

In view of Eq. 6.4.7, the DFT of tJ�J� s can be obtainedby first computing tLur s followed bya sequenceof k computationsof type ¢£{!¤}ulw"¥§¦m¨�© � y , whereeachcolumnof ¥§¦B¨ª© � hasexactlytwo nonzeroentries. Since eachevaluationof ves�w§u«y involves ¬­w1�$�/�a�kz y integer operations,Algorithm6.4.5 requires ¬­w�zLu,�$�/�a�§z y integer operations. Thus, the amount of integer arithmetic involved incomputing t7�®ves is of the sameorder of magnitudeas the amount of floating point arithmetic incomputing ¤}uVw"¥ ¦ ¨�© � y . Hencethe overheadassociatedwith bit reversalis nontrivial with respecttothe computationof tOu,¯ s , often amountingfor 10% to 30% of the total computationtime.

6.5 The Fast Fourier Transform

Thevector-matrixproductt°u±¯ s involves ¬`²�z �´³ complexcomputations.TheFastFourier Transform,or FFT, is a methodthatdrasticallyreducesthenumberof computationswhenforming theproduct tGu"¯ s .

Using the resultsof the previoussection,we can write tLu¯ s astOu,¯ sµ{itPu,r s¶u,·   u,·¸��u,u,u�· ~ � (6.5.1)

where ·º¹_{8¥§¦G¨�© � �oz�{h| ~ �£x_{���&|M�[�+�,�-�&»-� � {h| ¹ , and� {hz5¼ � . Thus, we may use the

following algorithm for computing t½ue¯ s :306

Page 315: Image Algebra by Ritter

6.5.1 Algorithm (Radix-2 FFT)¾À¿«Á¾`ÃBÄeÅ (Algorithm 6.4.5)for Æ ¿«Á�Ç to È loop¾!¿«Á8¾7ÉaʺËend loop

Sinceeach ÊºË hasonly two nonzeroentriesper columnandeachcomplexaddinvolvestwo floatingpointoperations,or flops, while eachcomplexmultiply involvessix flops,it is notdifficult to ascertainthatthis algorithmrequiresonly Ì�Í3Î É,ÏÑÐ/ÒaÓ Î Ô flops if the sparsityof the ÊºË s is exploited.This is theprimaryreasonwhy sparsefactorizationsof Õ Å form themathematicalframeworkfor theefficient computationofthe DFT. Thesealgorithmsarecollectively called Fast Fourier Transforms. Algorithm 6.5.1 representsa high-level versionof the Cooley-Tukeyradix-2 FFT algorithm [1, 4, 3].

TheFFTranksasoneof thegreatcomputationaldevelopmentsof this Century.AlthoughCooleyandTukey are,deservedly,given credit for the moderndevelopmentof the FFT asrepresentedby Algorithm6.5.1, Carl Friedrich Gausshad developedidentical as well as more generalmethodsfor the efficientcomputationof the Fourier transformmore than 150 yearsearlier [7]. Consequently,much time andeffort couldhavebeensavedduringthe1950sand’60s hadresearchersbeenfamiliar with Gauss’swork.In addition,the generalcomputationalframeworkfor the FFT could havebeenestablishedmuchearlier.

DifferentFFT algorithmscorrespondto differentfactorizationsof Õ Å and,hence,to differentfactor-izationsof theFouriertemplateÖ . While templateoperationsprovidea highly structuredenvironmentforstudyingimagetransformtheory, templatefactorizationsprovidea generalframeworkfor studyingkeyaspectsof advancedimagetransformcomputation;e.g., vectorization,localization,and parallelization.Someof theseissueshavealreadybeendiscussedin previoussectionswhile otherswill be discussedin more detail in subsequentsections. In this section we focus our attention on the image algebraspecificationof Algorithm 6.5.1.

The imagealgebraequivalentof Eq. 6.5.1 is given by¾7×Ø Ö Á Í ¾PÃWÄ Å Ô ×Ø�Ù Í Ç Ô ×ØpÙ Í�ÚeÔ ×Ø É+É,ÉO×Ø@Ù Í�È[Ô2Û (6.5.2)

whereÙ Í�ÆXÔ Á\ÜBÝ&Þ Í ÊºË Ô . Herewe usethe notation

Ù Í�ÆXÔ insteadofÙ Ë to denotea sequence

Ù Þ Û Ù Ó Û*ß,ß+ß&Û Ù(àof templates.As will be shownsubsequently,the sequence

Ù Í Ç Ô�Û Ù Í�ÚbÔkÛáß+ß,ß2Û Ù Í�È[Ô can be representedbya singleparametrizedtemplate

Ù ÍÑâ-Ô , wherep is of form Ú Ë . Thus, the notationÙ Í1Æ1Ô will accustomus to

the idea thatÙ Í�ÆXÔ is a parametrizedtemplate.

To computeEq. 6.5.2,we may usethe following algorithmwhich looks very much like Algorithm6.5.1.

6.5.2 Algorithm¾À¿«Á¾`ÃBÄ Å (Algorithm 6.4.5)for Æ ¿«Á�Ç to È loop¾!¿«Á8¾D×ØDÙ Í1Æ1Ôend loop

307

Page 316: Image Algebra by Ritter

To completethe specification of this algorithm, we needto examinethe parametersdefining thetemplatesã(ä1å1æOçéèmê[ë+ä"ì¸í�æ .

Supposeîpç=ïlð and ñ�ç=ò . In this casewe needto specify ã(äkó(ækômã(ä1ïeæ , and ã(ä�òbæ correspondingtothe matricesì ë ôWì¸õ , and ìºö , respectively.Using the tensorrepresentationof thesematrices,we obtainì ë çi÷Hømùoú õ ç£÷Hømù}û ÷ ë ÷ ëü ë ý ü ë&þ ç£÷HømùÂû ó óó ý ó þ

çÿ�����������ó ó � � � � � �ó ý ó � � � � � �� � ó ó � � � �� � ó ý ó � � � �� � � � ó ó � �� � � � ó ý ó � �� � � � � � ó ó� � � � � � ó ý ó

������������� ô

ì õ ç\÷ õ ùJú ø ç£÷ õ ù û ÷,õ ÷,õü õ ý ü õ þ ç£÷ õ ùÿ��� ó � ó �� ó � óó � ý ó �� � ø � ý � ø

� ���çÿ�����������ó � ó � � � � �� ó � ó � � � �ó � ý ó � � � � �� � ø � ý � ø � � � �� � � � ó � ó �� � � � � ó � ó� � � � ó � ý ó �� � � � � � ø � ý � ø

� ����������� ôand ìºöGç\÷ ë ùJú�Gçi÷ ë ù û ÷ ø ÷ øü ø ý ü ø þ

çÿ�����������ó � � � ó � � �� ó � � � ó � �� � ó � � � ó �� � � ó � � � óó � � � ý ó � � �� �� � � � ý ��� � �� � � õ� � � � ý � õ� �� � � � ö� � � � ý � ö�

� ����������� �At the ith stageof the loop in Algorithm 6.5.2 we computethe product í ç� í ê&ë��� ã(ä�å1æ , where ���ç������ � . By definition of the productoperator �� , the value í ä��2æ is given by í ä��2æ5ç �� �"! ä$#&% í('�) æ í ê&ë ä+*�æ-,Hã(ä�åXæ/.,ä+*�æ � (6.5.3)

308

Page 317: Image Algebra by Ritter

The cardinalityof 021436587:9/;=< is two sincethe templateimage 3>5:7:9?; correspondsto the jth columnof@BA. Thus, using Eq. 6.5.3, the computationof eachvalue C A 5EDF9 involves two multiplicationsand one

additionwhich showsthat the imagealgebraformulation GIH JKGILM 3>5:7:9 exploits the sparsityof@BA

.

To completethe specificationof the template 3>5:7:9 , we need to define the weights 3>5:7:9 ; 5+N$9 . LetC A JOC A�PRQ LM 3>5:7:9 , where C-SJOGUTWVYX . By carefully consideringthe columnsof the matrices@BA

, it is notdifficult to seethat C A 5�DF9 and C A4Z D[L]\ A^P_Q�`

canbe computedin termsof the following two-dimensionalvector product

Z C A 5�DF9bacC A Z DdLe\ A^PcQ `f` J Z C A^PcQ 5�DF9&a_C A^PcQ Z D[L]\ A^PcQ `f`hg�ikj jl mlon a (6.5.4)

where l JKp ;:qsr:t&u4vxw>yu v . Equation6.5.4canbe representedgraphicallyas illustratedin Figure6.5.1.

b b wb

bz

b wb

.

.

.

.

(j) (j)

(j + 2i-1

i-1

i-1 ) (j + 2

(j + 2+

- i-1

i-1

(j)

i-1

i-1 i-1

i-1){){w|

Figure 6.5.1 Graphicalrepresentationof the butterfly operation.

With a little imagination,the term “butterfly” becomesevidentwhen viewing this schematicrep-resentationof Eq. 6.5.4. The completeset of butterfly computationsin the eight–pointCooley-TukeyFFT is shownin Fig. 6.5.2. Here we exploitedthe symmetriesof }W~:���:�&�����"�� � in order to expresseachbutterfly weight w in terms of }�� .

309

Page 318: Image Algebra by Ritter

. . ...

. . ...

.

.. .. .

.. . .

...

.

.

....

.

. .

a� (0)

a� (2)

a� (7)

a� (3)

a� (5)

a� (1)

a� (6)

a� (4)

a� (6)

a� (7)

a� (5)

a� (4)

a� (3)

a� (2)

a� (1)

a� (0)^

^

^

^

^

^

^

^

ω

ω

ω

ω

ω

ω

ω

ω

ω

ω

ω

ω

0

0

0

0

0

0

0

8

8

8

8

8

8

8

8

8

8

8

2

2

2

8

1

3

Figure 6.5.2 The Cooley-Tukey dataflow graph for ����� .

Equation6.5.4 is the key for representingthe templates�>�=�>�=�����+��� , and �>�+��� in termsof a singleparametrizedtemplate�>����� . Specifically,let �����>�> �¡[¢��¤£_�-�¥�c�F¦ andfor �¨§I� , define �>�^��� by

�>�^���/©f�+ª$�W� «¬¬¬¬­ ¬¬¬¬® � ¯E°�±x²F³=�6´h¯¶µ¸·�¹¥·�º¼»>ºc½�ª¾�]²¿ ��²��?�F� ¯E°�±x²F³��6´s¯¶µ¸·�¹¥·�º¼»>ºF½Àª¾�]²�ÁI� ¿ �E²��?�Ã�įE°�±x²F³��6´s¯¶µ¸Å�½_½À»�ºc½¼ª��]²� ¯E°�±x²F³��6´s¯¶µ¸Å�½_½À»�ºc½¼ª��]²  �£ Å¥Æ&ÇÈ·�É&Ês¯¶µb·¸� (6.5.5)

where ¿ �^²Y�8�F�o�ÌË ©+Í�Î:Ï$ÐÑ Ð . Using the convention ¿ ��²��f�Ò�o�Ó£ÕÔY² and simple inspectionverifies thatfor the parameters�Ö�×��Ø¥���¥Ù , and � Ñ

, the templatesgeneratedby ������� correspondto the templatesÚ�Û Ù��?Ü Ù ��� ÚBÛ ÙÝ�+Ü Ñ � , andÚBÛ ÙÒ�+ÜhÞ>� , respectively.

The eight-pointradix-2 FFT caneasilybe generalized.In the generalcasewe have Ü   �Kß ©�àâádÍ ,where ãä���   and ²å�æ��³"ãÄ�æ�¥ç Û   . Thus, Ü   is the �¥ç Û  �è �¥ç Û   block matrix with blocks of sizeã è ã given by

Ü   �êéëëì á Í í îfîÒî íí ádÍ îfîÒî í...

.... ..

...í í îfîÒî á Íï�ððñ �

310

Page 319: Image Algebra by Ritter

where òóõô÷ö�ø ó�ùûú ø ó�ù&úü ó�ù&ú ý ü ó�ù&úÈþô ÿ��������������

� � ����� � � � � ����� �� � ����� � � � � ����� �...

..... .

...� ...

..... .

...� � ����� � � � � ����� �ý ý ý ý � ý ý ý ý� � ����� � � ý � � ����� �� ó ����� � � � ý ó ����� �...

..... .

...� ...

..... .

...� � ������� ����ó � � � ����� ý �� ����ó

�����������������

Sincethe numberof zerosbetweenthe two nonzeroentriesin eachcolumnof

ò óis ��� ��� ý �

, thespacingof the two nonzeroentriesin eachcolumnof � � is exactly � � ��� . But the nonzeroentriesin thejth columnof � � correspondsto thenonzeroweightsof the templateimage � � ����! � �#"#$&% . Thus,Eq. 6.5.5

also defines ' !)( " for (+*+,ô.-

� �0/21ô ��34�5376�6�683�9 ý �;:

.

With the specificationof ' !)( " completed,we are now able to formulatethe Cooley-Tukey radix-2FFT using the languageof image algebra.

6.5.3 Algorithm (Radix-2 FFT). If < *>=@? 3BA ô�5C , and ' !)( " is specifiedby Eq. 6.5.5, then the

following algorithm computes<�DFE

.< /ô

<HGJI ?for KBLNM.O to PRQTSVU�W loopX LYM X[Z\[]�^`_�aRbdcfeend loop

The appealingaspectof the image algebraversion of the FFT is that even though it completelyspecifies the computationof the FFT, it retainsthe samehigh level appearanceasAlgorithm 6.5.1.

Although we are only interestedin general algebraicand computationalframeworks,we needtoremind the readerthat many important issuesarisewhen trying to obtain highly optimizedversionsofAlgorithm 6.5.3 for specific implementations.We briefly discusstwo of theseissues.

Note that as i increases,the spacingsbetweenthe nonzerovaluesof]�^`_ aRb�c e

increasesby a factorof

_ aRb�c. This spacingis called the stride of the butterfly operationat the ith stagein the loop of

Algorithm 6.5.3. More generally,stridesrefer to the spacingsof vector componentsthat are namedina vector reference.In many advancedcomputerarchitectures,large power-of-twostridescan severelydegradeperformance. Machineswith interleavedmemoriesserveas good examplesof this problem.The stride issue can often be resolvedby reorderingthe algorithm in order to achieveunit stride.However, this reorderingtypically results in algorithms having a high level of redundantarithmetic.This representsthe typical dilemma of many currenthigh performancecomputingenvironments:one

311

Page 320: Image Algebra by Ritter

procedureis arithmeticallyefficient but hasnonunit stride, thus severelydegradingperformancedue tomemoryaccessing,while thealternativehasattractivestridepropertiesbutanexcessof arithmetic[2, 8, 9].

Languagesas well as computerarchitecturesposeproblemsfor achievingoptimizedFFTs. SomelanguagessuchasFORTRAN storecomplexvectorsin stride-2fashion.For example,an n-dimensionalcomplexvector gihkjml is storedasanarrayof length2n of realnumbersnpo�q5r�s�q5r�o�t�r�s�t�r7u�u�u4r�o�v5w�t�r�s�v5w�t�x .Thus,theextractionof eithertherealor imaginaryvectorcomponentsinvolvesstride-2access.Algorithmsinvolving complexvectorsinherit, therefore,all the problemsassociatedwith this access.In addition,an algorithmdescribingthe butterfly operation(Eq. 6.5.4) that needsto explicitly referencethe real andimaginarypartsusingstride-2accesswill obviouslydestroythe simplicity of Eq. 6.5.4andobscurethekey algorithmic point.

A secondissueconcernson-lineversusoff-line computations.Wemayeitherprecomputethetemplateweights yznY{;r#|}x onceandfor all sothatat executiontime theymayberecalledby simplelook-up. This isthe off-line paradigm. However,the off-line paradigmrequiresvectorworkspace.Thevectorworkspacerequirementcanbegreatlyreducedsincetheweights associatedwith ~��#��� w�t�� area subsetof theweightsassociatedwith ~��p� � � . This follows from the observationthat ���������� �i���� , where | � � � � and | t � � � w�t .

If not sufficient workspaceis available, it may be necessaryto use the on-line paradigm whichassumesthat the weights for ~��p��� w�t�� are generatedby direct call during the ith stageof the loop. Ofcourse,on-line computationwill increasethe total computationtime of Algorithm 6.5.3.

We concludethis sectionwith the imagealgebraversionof the two-dimensionalFFT andits inverse.

In our observationfollowing Eq. 6.1.22(Section6.1) we notedthat the two-dimensionalDFT canbe computedin two stepsby successiveapplicationsof the one-dimensionalDFT; first alongeachrowfollowed by a one-dimensionalDFT along eachcolumn. Thus, to obtain a fast Fourier transformfortwo-dimensionalimages,we needto apply Algorithm 6.5.3 in simplesuccession.However,in order toperformtheoperations�����;v and ��h� ~�nR|4x specified by thealgorithm,it becomesnecessaryto extendthefunctions �;v and ~�nR|4x to two-dimensionalarrays. For this purpose,supposethat � ���4����� v , where� � �5� and � � �5� , and assumewithout loss of generalitythat ��� � .

Let   �¢¡ �£�0¤2j �¦¥ r7§Vrdu�u�u4r�¨R©�ª � �¬« §V­ and for |+®¯  define the parameterizedrow template~�nR|4x°¤±� ² ³@´ by

~£n)|4x&µ ¶�· ¸8¹pn�º»r&¼�x �½¾¾¾¾¿ ¾¾¾¾À

§ ÁÃÂ�ÄRo7Åf|5ƱÁÈÇiÉ�Ê5É�ËÍÌ£Ë�ÎÏn�º»r8¼�x � n�o»r8s;xyznpo7r#|�x ÁÐÂ�ÄRo4Åf|;ÆÑÁÈÇiÉ�ÊVÉ�ËÒÌ£Ë�ÎÏn�º»r8¼�x � n�oBh�|7r8sÓx« yzn#o»rm|4x¬ÁÐÂ�ÄRo4Åf|;ÆÑÁÈÇiÔ�Î�Î�Ì�Ë�ÎÕn#º7r8¼�x � n�o»r8s;x§ ÁÐÂ�ÄRo4Åf|;ÆÑÁÈÇiÔ�Î�Î�Ì�Ë�ÎÕn#º7r8¼�x � n�o « |7rfs;x¥ Ô5ÖØ×�É�ÙpÚ@ÁÈÇpÉÛr(6.5.6)

Note that for each|[®F  , ~�n)|}x is a row templatewhich is essentiallyidentical to the templatedefinedby Eq. 6.5.5.

The permutation� is extendedto a function �ܲ¢� in a similar fashionby restrictingits actionsto the rows of X. In particular, define Ý � ¤Þ�²¢�ßÞà Ý � n�jØr#{;x � nÈ� � npjpx&r#{�x4áWith the definitions of r and t completed,we are now in a position to specify the two-dimensionalradix-2 FFT in termsof imagealgebranotation.

312

Page 321: Image Algebra by Ritter

6.5.4 Algorithm (2–D FFT). If â�ã@ä�å and t arespecifiedasaboveand æ°ç�è@é , then the followingalgorithm computesthe two-dimensionalFourier transform æ�êëFì

.æîí ïðæHñ2ä åfor òBí ïðó to ôÈõTöV÷�ø loopæ¯íYïùæ[êë[ú�û`ü�ýRþdÿ��end loopæ�í ï æ��4ñ2ä��for òBí ïðó to ôÈõTö ÷�� loopæ¯íYïùæ[êëFú�û`ü ýRþ�ÿ �end loop�æ íYï æ �

Following Eq. 6.1.23 (Section6.1) we also observedthat the inverseFourier transformcan becomputedin termsof the Fourier transformby simple conjugation. The next algorithm computestheinverseFFT,

ÿå�� �æ�êëFì��� , of

�æ ç è é .

6.5.5 Algorithm (2–D inverseFFT).æ íYï �æ �Algorithm 6.5.4æ íYï û ÿå�� æ � �

Whenusingparallelmachines,it maybeadvantageousto implementthe forwardproductin ordertogeneratethedatathatis broadcastto otherprocessors[5, 11]. In this case,thestatementæHí ï+æ�êëFú û ü�ýRþ�ÿ �in the precedingalgorithmsis replacedby æ+íYï ú � û#ü ý)þ�ÿ � êë æ .

6.6 Radix-4 Factorization

According to Theorem6.3.4 and its corollary,æ������Íï�æ���� �� ã � � ������ �»å ��� ��� ��ï æ! ����»åBãÓæ ÿ �"�»å0ã$#�#"#�ãØæ � þ�ÿ ���»å ��� �"� � ã (6.6.1)

where ø ï �% � and ó'& � &Üø .

Now, we considerthe casewhere � ï)(+* and � ï)( . The factorizationis very similar to theradix-2 case.

For � ï)( , Eq. 6.4.1 becomesæ,��� � ï+æ��"��- � � � .� - � � å �"�/- � �ï æ0 1���»åBã�æ ÿ ���»åBã&æd÷2���»åBã�æ�3����»å ��� - � �54 (6.6.2)

Assuming � ï6(7* , the split-and-mergeprocedurecanbe replacedby applyingCorollary6.3.3to æ98:���»å�; ï=<�ã7óVã ü ã?> which splits each æ�8@�A�»å intoæ 8 �"� å ï û æ 8B ��� å1C&÷ ã�æ 8 ÿ ��� åDC&÷ ã&æ 8&÷ ��� å1CØ÷ ãÓæ 8B3 ��� åDC&÷ � ��� - � å 4 (6.6.3)

313

Page 322: Image Algebra by Ritter

Merging 6.6.3 with Eq. 6.6.2 results in

E�F�G�HJILK.MNE0OPO1F"G$Q�R�SAT�E0OVUDF�G�QDR?SATPE0OBWDF�G�Q1RVSATXE0O?Y�F�G�QDR?S�Z�F�[ S�\ Q TMNE]U?O1F"G Q1R?S T�E]UPU�F�G QDR?S TPE]UPW2F�G Q1RVS TXE]U?YDF�G QDR?S Z�F�[ S�\ Q TMNE]W?O1F"G Q1R?S T�E]WPU�F�G QDR?S TPE]WPW2F�G Q1RVS TXE]W?YDF�G QDR?S Z�F�[ S�\ Q TMNE YPO F"G�Q1R?SAT�E Y�U F�G�QDR?SATPE Y�W F�G�Q1RVSATXE YPY F�G�QDR?S�Z�F�[ S�\ Q�^ F"[ S�\ H�_

(6.6.4)

Using tensornotation,we may rewrite Eqs. 6.6.2 and 6.6.4 as

E�F�G�HJI`MaE!O1F"G H R?S T�E]U�F�G H R?S TPEbW�F�G H RVS TXE0Y1F"G H R?S Z�Fdc�e�U�fg[ S�\ H�h (6.6.5)

and E,F�G�HJIic�E!OPODF�G H R?S�j T9E!O�U�F�G H RVS�j TPE0O�W�F�G H R?S�j T�E0OPY1F"G H R?S�j TE U?O F�G H R?S j T9E UPU F�G H RVS j TPE UPW F�G H R?S j T�E U?Y F"G H R?S j TE W?O F�G H R?S j T9E WPU F�G H RVS j TPE WPW F�G H R?S j T�E W?Y F"G H R?S j _E0YPODF�G H R?S j T9E!Y�U�F�G H RVS j TPE0Y�W�F�G H R?S j T�E0YPY1F"G H R?S j hkF0MNe S fg[ Sl\ H R?S Z�Fdc.e"U�fg[ S�\ H�h�T

(6.6.6)

respectively.

Since GU�ILcVmnh , continuationof the split-and-mergeprocessoqpsr moretimesleadsto the followingformulation of the DFT:

E�F�G�H�ItMNE�u.v�T�E9uBw�T$x�x"x!T�E9uByPzdwPZ�F!Mae H R?S f{[ S�\ S ZJF�F"FkMae S f|[ Sl\ H R?S Z�F"c.e�U�f|[ S�\ H7hbT (6.6.7)

whereeachof the subscripts}�~ is length k sequenceof base4 numbers.

For � I�c � OAT � UdT$x�x�x]T �"��� U h5� �l�U���� O2� S , let c � h S denotethe base4 expansionof s; i.e.,

c � h S I � O1� � U��@� F�F�F � � �l� U � ��� U _Using induction on k, it can be shown that E9uB��I�E�c?c }"~ h S h for � I��9T$mAT]x�x"xbT0� p m . Defining� S�\ H{� � H{� � H by � S�\ H�c � h�I)c }"~ h S , we have

M�E�u v T7E�u w T$x"x�x]T�E9u yPzdw Z/I6E�F"� S�\ H5T (6.6.8)

where � Sl\ H is the permutationmatrix definedby � S�\ H�� �2�P�a� y . This meansthat the DFT of E��i� Hconsistsof a permutationof the componentsof a followed by a productof k sparsematrices.

The following examplewill provide the necessaryinsight into understandingthe action of � S�\ H onthe coordinatesof a vector.

6.6.1 Example: Suppose��I � W and E��6� UB� . Then

E�F�G UV� Iic�E O F"G S TXE U F�G S TPE W F�G S T�E Y F�G S hkFdc.e U fg[ Sl\ U?� h!Twhere E O Iic.E�c.�7h�TXE�c � h�T�E$c. 7h�T�E$cPm�¡¢hPh�T

EbU£Iic.E�cPmdh�TXE�ca¤7¥�¦�§]¨B©7¥�¦�§$¨Pª�«¢¥P¥�¦314

Page 323: Image Algebra by Ritter

¬!­/®°¯.¬�¯a±7²�³9¬$¯.´7²P³�¬�¯�µ�¶X²�³�¬�¯Pµ�·9²P²P³and ¬�¸@®°¯.¬�¯a¹7²�³�¬$¯?ºA²P³�¬�¯�µ¢µ"²�³X¬�¯Pµl»X²P²P¼Repeatingthis process,we obtain

¯.¬�½�¾�¿�ÀA³�¬bÁ�¾�¿�ÀA³�¬]­1¾�¿�À7³+¬0¸Â¾"¿�Àd²®i¯�¬!½P½D¾�¿Ád³�¬!½�Á�¾�¿ÁA³+¬0½�­�¾�¿Ád³�¬!½P¸D¾�¿Ád³¬0½P½1¾"¿Ád³X¬0½�Á�¾�¿Ád³�¬!½�­�¾�¿Ád³�¬!½Ã¸1¾�¿Ád³¬0½P½1¾"¿Ád³X¬0½�Á�¾�¿Ád³�¬!½�­�¾�¿Ád³�¬!½Ã¸1¾�¿Ád³¬0½P½1¾"¿Ád³X¬0½�Á�¾�¿Ád³�¬!½�­�¾�¿Ád³�¬!½Ã¸1¾�¿Á"²k¾"¯.Ä�ÀDÅ|ÆÇÀ�È Àd²

®i¯�¬ ½P½ ³�¬ ½�Á ³�¬ ½�­ ³�¬ ½P¸ ³¬]Á?½d³�¬bÁPÁ"³�¬]ÁP­�³�¬]Á?¸�³¬ ­?½ ³�¬ ­PÁ ³�¬ ­P­ ³�¬ ­?¸ ³¬ ¸P½ ³�¬ ¸�Á ³�¬ ¸�­ ³�¬ ¸P¸ ²k¾n¯.Ä À Å|Æ À�È À ²

®i¯�¬$¯.¶X²�³+¬$¯�·�²P³�¬$¯BÉX²P³X¬�¯Pµ"±7²�³¬�¯Pµd²�³X¬�¯.»7²�³�¬$¯.Ê7²�³�¬$¯Pµ"¹¢²�³¬�¯.±7²�³X¬�¯.´7²�³�¬$¯Pµ"¶7²P³X¬�¯�µl·7²�³¬�¯.¹7²�³X¬�¯?ºA²�³�¬$¯Pµ¢µd²P³X¬�¯�µ"»¢²P²�¾n¯.Ä À Å{Æ À�È À ²�¼

Thus, ¬,¾�Ë�À�È Á?Ì5®L¯.¬�¯.¶7²P³�¬$¯N·9²�³X¬�¯.ÉX²�³X¬�¯Pµ�±X²P³¬]¯�µd²�³+¬�¯B»X²P³X¬�¯BÊX²P³X¬�¯Pµ�¹X²�³¬]¯?±7²�³+¬�¯B´X²P³X¬�¯�µ"¶¢²�³X¬�¯Pµ�·9²�³¬]¯?¹7²�³+¬�¯Pº¢²P³X¬�¯�µ¢µ"²�³X¬�¯Pµ�»X²P²

®L¯.¬�¯�Í À�È ÁVÌ ¯B¶X²?²�³X¬�¯NÍ À�È Á?Ì ¯Pµd²Ã²�³X¬$¯NÍ À�È ÁVÌ ¯B±X²P²P³X¬$¯�Í À�È Á?Ì ¯?¹7²?²�³¬�¯NÍ7À�È Á?Ì�¯�·�²P²�³¢¬�¯.Í7À�È Á?Ìl¯B»7²?²�³7¬�¯NÍ7À�È Á?Ì"¯B´X²?²�³X¬$¯NÍ7ÀlÈ Á?Ì�¯?º¢²P²�³¬�¯NÍ7À�È Á?Ì�¯?É7²P²�³¢¬�¯.Í7À�È Á?Ìl¯BÊ7²?²�³7¬�¯NÍ7À�È Á?Ì"¯�µ"¶¢²P²�³7¬�¯NÍ7À�È Á?Ì�¯�µAµd²Ã²P³¬�¯NÍ7À�È Á?Ì�¯�µ�±7²Ã²P³7¬�¯.Í7À�È ÁVÌ�¯�µ"¹¢²P²�³X¬$¯NÍ7ÀlÈ Á?Ì�¯�µl·�²Ã²P³7¬�¯.Í7À�È Á?Ìl¯�µ�»¢²Ã²P²�¼

Expressingi and Í7À�È Á?Ì�¯BÎV² in terms of base4 representationselucidatesthe action of Ë�À�È Ï .Specifically,we have the following relationship:

Î Í+ÀlÈ Á?Ì�¯BÎV² Î (base4 ) Í7À�È Á?Ì"¯BÎV² (base4)

0 0 00 00

1 4 01 10

2 8 02 20

3 12 03 30

4 1 10 01

Figure 6.6.1 The permutationÍ7À�È ÁVÌ andits correspondingbinary evaluation (Continued). . .

315

Page 324: Image Algebra by Ritter

Ð ÑAÒ�Ó Ô�ÕdÖ Ð?× Ð(base4 )

Ñ7Ò�Ó Ô?Õ"Ö ÐV×(base4)

5 5 11 11

6 9 12 21

7 13 13 31

8 2 20 02

9 6 21 12

10 10 22 22

11 14 23 32

12 3 30 03

13 7 31 13

14 11 32 23

15 15 33 33

Figure 6.6.1 The permutationÑ Ò�Ó Ô?Õ

and its correspondingbinary evaluation

It follows from the table thatÑ Ò�Ó Ô?Õ Ö Ð?×

is obtainedfrom i by reversingthe order (readingfromright-to-left) of the digits in the base4 expressionof i.

The following algorithm computesthe permutationfunctionÑ7Ò�Ó Ø

.

6.6.2 Algorithm (EvaluatingÑ7Ò�Ó Ø7Ö Ð?×

)

For Ù�ÚÜÛ+Ý andÐ ÚßÞ9à$áAà$â"â�â!à0Ùäã=á define

Ñ7Ò�Ó Ø7Ö ÐV×as:

begin å°æ ÚçÞè æ Ú Ðfor é := 0 to éNêlë Ò"Ö Ù × ã�á loopì æ Ú�íÃî Òïå{æ ÚßÛ åñð Ö è ãòÛ ì ×è æ Ú ìend loopreturn j

end

For ósôsõ Ø , thecomputationof ó5ö?÷ Ò�Ó Ø cannow beaccomplishedby usingthesimpleimagealgebraspecification: ø æ Úùóûú Ñ Ò�Ó Ø

Of course,by specifyingthe template ü°ÚþýÂÿ Ô Ö ÷ Ò�Ó Ø × , we could just as well compute ósöA÷ ÒlÓ Ø interms of the convolution product ó ð� ü .

316

Page 325: Image Algebra by Ritter

6.7 Radix-4 FFT Algorithm

Using the resultsof the previoussection,we can write ������� as

������� ��������� ����������������������� (6.7.1)

where � �"! � and �$#%�'&(��)+*-,.�(� �/)0� 1��32��545��6�667�98 . Thus, we may use the following algorithmto compute�:�;�� :6.7.1 Algorithm (Radix-4 FFT)

�=<>�?�@����(� � (Algorithm 6.6.2)for 1�<>�A2 to 8 loop�B<>�"�@��� #end loop

Sinceeach� # hasonly four nonzeroentriespercolumnandeachcomplexaddinvolvestwo floatingpoint operations,or flops, while eachcomplexmultiply involvessix flops, it is not difficult to ascertainthat this algorithmrequiresonly CEDF���GIH/J����K flops if the sparsityof the � # s is exploited.

The imagealgebraequivalentof Eq. 6.7.1 is given by

�MLNPO �QDR��SUT �(� � KULN:V D(2WKULNPV DX4;KYLN �����LNZV DX89K[� (6.7.2)

whereV D\1\K��^]�_ � D\� # K .

To computeEq. 6.7.2,we may usethe following algorithmwhich looks very much like Algorithm6.7.1.

6.7.2 Algorithm

�=<>�?�`S�Ta�(� � (Algorithm 6.6.2)for 1�<>�A2 to 8 loop�B<>�"�PLNPV D\1\Kend loop

To completethe specificationof this algorithm, we needto examinethe parametersdefining thetemplates

V DX1bK��^]c_ � DF� # K .317

Page 326: Image Algebra by Ritter

Supposedfehg and ije?k�l . In this casewe needto specify mWnpoWq and mWnrg;q correspondingto thematricess.t and s�u , respectively.Using the tensorrepresentationof thesematrices,we obtain

s t e=v(w�xZy.w(z w.e v(w�xf{}|F~��Y��v t��� w(z t��p� uw(z t �p���w(z t��$� n��w�xZv t qe=v(w�x

���� o � � �� o � �� � o �� � � o�(��� ����� o o o oo �.| ��o |o �%o o �%oo | ��o �.|

�(���

e

�����������������������������

o o o o � � � � � � � � � � � �o ��| ��o | � � � � � � � � � � � �o �%o o �%o � � � � � � � � � � � �o | ��o �.| � � � � � � � � � � � �� � � � o o o o � � � � � � � �� � � � o ��| �%o | � � � � � � � �� � � � o �%o o ��o � � � � � � � �� � � � o | �%o �.| � � � � � � � �� � � � � � � � o o o o � � � �� � � � � � � � o �.| �%o | � � � �� � � � � � � � o �%o o ��o � � � �� � � � � � � � o | �%o �.| � � � �� � � � � � � � � � � � o o o o� � � � � � � � � � � � o �.| �%o |� � � � � � � � � � � � o �%o o �%o� � � � � � � � � � � � o | �%o �.|

�(����������������������������and

s u e v t xZy.w/z tF� e v t xZ{a|R~�� � v tW��� w(z w �p� uw(z w �p���w(z w � � nX�w�xPv(wWq

�����������������������������

o � � � o � � � o � � � o � � �� o � � � o � � � o � � � o � �� � o � � � o � � � o � � � o �� � � o � � � o � � � o � � � oo � � � �.| � � � �%o � � � | � � �� �/��� � � � �.|�� t\� � � � ��� t\� � � � |0� t\� � �� � � ut\� � � � �.|0� utb� � � � ��� utb� � � � |0� ut\� �� � � � �tb� � � � ��|0� �t\� � � � ��� �t\� � � � |0� �t\�o � � � ��o � � � o � � � �%o � � �� � ut\� � � � ��� ut\� � � � � utb� � � � ��� ut\� � �� � � wt\� � � � ��� wt\� � � � � wt\� � � � ��� wt\� �� � � � �tb� � � � ��� �t\� � � � � �t\� � � � ��� �t\�o � � � | � � � �%o � � � �.| � � �� � �t\� � � � |0� �t\� � � � ��� �t\� � � � �.|I� �t\� � �� � � �t\� � � � |I� �t\� � � � ��� �tb� � � � �.|0� �t\� �� � � �U�tb� � � � |0�U�t\� � � � �����t\� � � � �.|I���t\�

�(����������������������������

318

Page 327: Image Algebra by Ritter

At the ith stageof the loop in Algorithm 6.7.2 we computethe product �� .¡?� I¢[£.¤¥:¦}§X¨R© , where�ª�¡Q«�¬�­�®(¯ £R° . By definition of the productoperator ¤¥ , the value �   §²±9© is given by

�  §²±9© ¡ ³´>µ·¶ §R¸r¹  �º�» © � I¢7£ §X¼R©�½(¦W§X¨b©¿¾§X¼R©7À (6.7.3)

The cardinalityof Á� ¦W§\¨\© ¾Äà is four sincethe templateimage¦�§X¨b© ¾

correspondsto the jth columnofÅ   . Thus,usingEq. 6.7.3, the computationof eachvalue �  §I±9© involves four multiplicationsand threeadditionswhich showsthat the imagealgebraformulation «@Æ>¡ «@¤¥P¦W§\¨\© exploits the sparsityof

Å   .To completethe specificationof the template

¦W§\¨\©, we need to define the weights

¦W§\¨\© ¾ §X¼X©. Let� �¡'� I¢7£�¤¥P¦W§X¨b© , where � ª ¡"«M¬$­ ®(¯ £\° . Let

Ç §XÈÉ© ¡ÊËËÌÍ Í Í ÍÈ Î�¨RÈ Î.È ¨FÈÈ.Ï Î.È.Ï È.Ï Î.È.ÏÈcÐ ¨FÈcÐ Î.ÈcÐ Î.¨FÈcÐ

Ñ(ÒÒÓ:Ô (6.7.4)

whereÈ ¡ÖÕ ¾;×$Ø\Ù ®�ÚÜÛ}Ý® Ú . By carefully consideringthe columnsof the matrices

Å   , it is not difficult toseethat �  §Þ±9© , � Äß ± ¤Zà  I¢á£(â , � Äß ± ¤Zã.äUà  I¢á£(â , and � Äß ± ¤Zå.äUà  I¢á£(â can be computedin termsof thefollowing vector product

ßR�  §I±9© Ô � Äß ± ¤Pà  I¢7£ â Ô � pß ± ¤Zã.ä�à  I¢7£ â Ô � (ß ± ¤æå.äUà  I¢7£ â�â ¡ßR�  I¢7£ §²±9© Ô �  I¢7£ ß ± ¤Pà  I¢7£ â Ô �  I¢7£ ß ± ¤ZãçäUà  I¢7£ â Ô �  I¢7£ ß ± ¤æå.äUà  ²¢7£ â�â ½ Ç §XÈÉ©áÀ (6.7.5)

319

Page 328: Image Algebra by Ritter

. . ...

. . ...

.

.. .. .

.. . .

...

.

.

....

.

. .

aè (0)

aè (2)

aè (7)

aè (3)

aè (5)

aè (1)

aè (6)

aè (4)

aè (6)

aè (7)

aè (5)

aè (4)

aè (3)

aè (2)

aè (1)

aè (0)^

^

^

^

^

^

^

^

ω

ω

ω

ω

ω

ω

ω

ω

ω

ω

ω

ω

0

0

0

0

0

0

0

8

8

8

8

8

8

8

8

8

8

8

2

2

2

8

1

3

Figure 6.7.1 The Cooley-Tukey dataflow graphfor éjêìëí .Equation6.7.5is thekey for representingthetemplatesîWï�ëWð and îWïXñað in termsof asingleparametrized

templateîWï²òóð . Specifically,let ôõêìö·ñW÷�ø�ùYê-ú5û�ë;ü and for ò:ýZô , define îWï¿òóð by

îWïIòóð¿þïXÿRð ê �������� þ� �������� ������� � ��� ÿ��! #"@ò%$ �'& þ�)(+*-,�.0/ � ê-úáûFò�ûpñ/ò�û214365(òú 1�798;:3�< �>= :�û (6.7.6)

320

Page 329: Image Algebra by Ritter

where ?A@CBED;FG�HJILK FG)M#N-O�PRQTS and UV@ K FG)MWN-O�PXQ . Using the conventionY[Z�\^]_�`R@badc)\ andsimple

inspectionverifies that for the parametersef@ QTg and QTh , the templatesgeneratedby i�Z�ej` correspondtothe templatesk D h Zml h ` and k D h Zmlonp` , respectively.

The 16-point radix-4 FFT can easily be generalized.

With the specificationof i�Z�ej` completed,we are now able to formulatethe Cooley-Tukey radix-4FFT using the languageof image algebra.

6.7.3 Algorithm (Radix-4 FFT). If qsrstvuw]yxs@ Q)z , and i�Z�ej` is specifiedby Eq. 6.7.6, then thefollowing algorithm computesq H{}| .qb~E@�q!�#�T��� ufor �y~�@�_ to � O�� � x loopq�~E@�q H{ i�� QT� D h�end loop

321

Page 330: Image Algebra by Ritter

Bibliography

[1] E.O. Brigham.TheFast Fourier Transform. Prentice-Hall,EnglewoodClif fs, N.J., 1974.

[2] P. Budnik and D.J. Kuck. The organizationand use of parallel memories.IEEE TransactionsonComputers, C-20:1566–1569,1971.

[3] J.W. Cooley, P.A. Lewis, and P.D. Welch. The fast Fourier transformand its applications.IEEETransactionson Education, E-12(1):27–34,1969.

[4] J.W. Cooley andJ.W. Tukey. An algorithmfor the machinecalculationof complexFourier series.Mathematicsof Computation, 19:297–301,1965.

[5] G.R.FischerandM.R. Rowlee.Computationof disparityin stereoimagesontheConnectionMachine.In ImageAlgebraandMorphologicalImageProcessing, volume1350of Proceedingsof SPIE, pages328–334,1990.

[6] P.D.Gader.ImageAlgebraTechniquesfor Parallel Computationof DiscreteFourier TransformsandGeneralLinear Transforms. PhD thesis,University of Florida, Gainesville,FL, 1986.

[7] M.T. Heideman,D.H. Johnson,andC.S.Burrus.Gaussandthe history of the fast fourier transform.Arch. Hist. Exact Sci., 34:265–277,1985.

[8] D.H. Lawrie. Accessandalignmentof datain anarrayprocessor.IEEE Transactionson Computers,C-24:99–109,1975.

[9] D.H. Lawrie and C.R. Vora. The prime memory systemfor array access.IEEE TransactionsonComputers, C-31:1435–1442,1982.

[10] G.X. Ritter and P.D. Gader.Imagealgebra:Techniquesfor parallel image processing.Journal ofParallel and Distributed Computing, 4(5):7–44,April 1987.

[11] J.N. Wilson, G.R. Fischer,andG.X. Ritter. Implementationanduseof an imageprocessingalgebrafor programmingmassivelyparallel computers.In Frontiers ’88: The SecondSymposiumon theFrontiersof MassivelyParallel Computation, pages587–594,Fairfax, VA, 1988.

322

Page 331: Image Algebra by Ritter

CHAPTER 7TRANSLATION INVARIANT TEMPLA TES ON FINITE DOMAINS

In this chapterwe areconcernedwith two importantclassesof templates,translationinvariant andcirculanttemplates.Thesetemplatesareusedto implementvariousconvolutionsandoccurfrequentlyindigital imageprocessing.As we shall show, thesetemplatesare closely relatedto the discreteFouriertransformand its efficient computation.However,the main emphasisof this chapteris on the algebrasassociatedwith translationinvariant templateson finite domains.

7.1 Translation Invariant Templatesand Toeplitz Matrices

It follows from earlierchaptersthat translationinvarianttemplatesoccurnaturally in imageprocess-ing. Translationinvariancewas definedin termsof a group �m�����#� (Section4.1) suchas �2��������[� .However,in most imageprocessingtaskstakeplaceon finite subsetsof the discreteplane ����� whichare not closedsetsunderaddition. For example,if ���b�������� �¡��¢��� , then defining £%¤¦¥2§©¨«ª ¨to be translationinvariant if £­¬®�°¯��6�±£�¬³²�´��µ¯¶�}·;�d¸w¯6��¹v�9·%¤!� makeslittle sensesince ¯-��· or ¹-�}·may not be points in X. This posesthe questionasto the meaningof the term “translationinvariant” or“shift invariant” in casethe underlyingpoint setX is not closedwith respectto addition.

7.1.1 Definition. If �2º}��X� is a group and �»¡¼º , then £�¤ ¥ §'¨ ª ¨ is said to be translation

invariant on X if and only if thereexistsa translationinvariant template ½£�¤ ¥ §'¾ ª ¾ suchthat ¿£;ÀÂÁ ¨0à ÄTÅwÆ ��£ .

Thus,translationinvarianttemplateson X arerestrictionsof translationinvarianttemplateson Y. Itfollows that translationinvariant templateson X look very muchlike translationinvariant templatesonY. For example,if ºÇ�¼�ÉÈ and Ê�¤ ¥µË ¾ ª ¾ denotesthe unit template,then Ê®ÀÌÁ ¨Rà ÍÎÅwÆ is also the unit

templatefor the set ¥µË ¨ ª ¨ . However, the comment“look very much like” should not be taken too

literally. Suppose�Ï�Ð��Ñy����Ò and ½ £!¤ ¥µË'ÓÎÔ9Õ�Ö�× is definedbyØÙ�Ú�Û�ÜmÝ Û ×µÞ�ßmà®á�â�à;ãpä�åÐæ�ç è>é ßmà á â�à ã ä�å�ßmê á â�ê ã äë è>é ßmà á â�à ã ä�å�ßmê áíì ç­î â�ê ã äLï�ðRßmà á â�à ã ä�å�ß�ê á â�ê ã6ì çpî äî ï4ñ9ò;óð9ô èöõ óT÷If we restrictØÙ

to ø2ù âûú'ü Õ , then clearly ýÙ^þ Ú ü Ý ÿ�� Þ å � þ Ú ü Ý ÿ�� Þ .It thereforefollows thatifÙ�� ø ú ü Õ ü is a translationinvarianttemplate,where ù��� ã is finite, then

thereexistsinfinitely many templatesin ø ú Ö × Õ�Ö × whoserestrictionsto ø°ù â�ú ü Õ equalt. It is possible,however,to identify a translationinvariant templatewith a unique translationinvariant template

ØÙon

Y which has essentiallythe samesupporton X as on Y (except,possibly, near the boundaryof X).Specifically,for eachtranslationinvariant template

Ù� ø�� ü Õ ü , let ß Ù ä6å ��� � ø�� ü Õ���� � è õ ñ ð���� õ � �³ñ è ï�� è �����³ð è ���^ñ������! #"%$%&(' )�*�+-,./10

and 2�3.054�6

, 78:9<; $>=?+2@3 <A6�0B4DCFEHG

323

Page 332: Image Algebra by Ritter

Supposewithout loss of generality that t is not the zero templateon X. Then for some IKJML ,NPORQTS�UDVWYX and , therefore,N@ORQ�Z I U[VWKX . Since each \]J_^ O`Q�U is translationinvariant, we have

thatNPO�Q�Z I UaVWbX c IdJfe .

Now chooseanarbitrarytemplate\gJB^ O`Q�U andnotethat if hiJ N@O`Q�Z I U , thensinceN@ORQ�Z I Ukj]NPO \ S U ,\ S O h UaVWml . Define nQ Jpo`qsrut r bynQ S O h U WHv \ SwO h Uyx{z hiJ NPO�Q�Z I Ul |�}:~����5� x�� ���

It follows that nQ J�^ O`Q�U , �Q������(� ����� W Q , and thatN o��Q S t j�N@O \ S U c I�J�e ����� c \gJB^ O�Q�U � (7.1.1)

If t is the zero templateon X, then the unique template nQ correspondingto t is the zero elementof o`q r t r . This showsthat we canalwaysidentify a translationinvariant templateon X with a uniquetranslationinvariant template nQ on Y, namelythe onewith smallestsupportasdefined by Eq. 7.1.1.

Invariant templatescan just as well be definedin termsof spatial transformations.IfO e Z���U is a

groupunderpoint (vector)addition, thena function �D��e���e is called a translation (or shift) if andonly if thereexistsa point  FJBe suchthat � O I U W I �   c I�Je . Thus,for each  FJBe , thereexistsa translation �w¡¢�weY�Ye which is definedby �w¡ O I U W I �   c I£J¤e .

If IHJ¥e andO e Z��¦U is an abeliangroup, thenO �w¡(§¨�w© U:O I U W �w¡ O �w© O I U?U W �w¡ O I � h U W O I � h Uª�   W I �¥O h �   U W �w©�«�¡ O I U �

Sincey was arbitrarily chosenand   � h W h �   , this showsthat� ¡ §-� © W � ©�«�¡ W � ¡�«w© W � © §¨� ¡ � (7.1.2)

As a trivial consequenceof this equationwe havethe following result:

7.1.2 Theorem. IfO e Z��uU is an abeliangroup and ¬ Wd­ �w¡��u ¢JFe¤® , then ¬ is an abeliangroup

under the operationof composition.

Proof: �w¡(§ O �w©�§¨� S U W �w¡¯§¨�w©�« S W � ¡�« � ©�« S �W � � ¡�«w© � « S W � ¡�«w© §¨� S W O � ¡ §¨� © U §¨� S �This provesassociativity. Commutativity follows from Eq. 7.1.2.

Since � ¡ §°�²± W � ¡�« ± W � ¡ , ��± is the identity of ¬ .

Finally, since �w¡(§(�´³�µg¶£· µ�¸s¹{º�µ�» ¶¼·�½ , eachelementof ¾ hasan inverse.

Q.E.D.

For ¿ ÀMÁ , define ¾u Ã]¶HÄ�·�Å�·�¶a·wµ� ¹%Ã(Æ ÃP»�Ç ·wµ�Ȥ¾uÉ�ÊNote that if ·�È�¾u à , then ·�ÅsË�Ì�ÍFÎ�Ï`ÐsÑ`·´ÒgÓ ¿ , where Ë�Ì�Í�Î�Ï�дÑÔ·´Ò�¶pÕ<Ö×È¿ØÅD·´Ñ`Ö-Ò-ÈB¿ÙÚÀd¿ .Thus, in general, ·]È�¾¦Â à is not a function from X to X.

We arenow in a positionof classifyingtranslationinvarianttemplatesin termsof elementsof ¾¦Â à .

324

Page 333: Image Algebra by Ritter

7.1.3 Theorem. ÛÝÜ�Þ�ßsà°á à is translation invariant â ã²äpÜdåuæ à and ã²çPè�éêÜdë�ì�íî�ïRðsñ?äªò ,Û�ó�ñRç�òõômÛ�ö�÷ ó�ø ñÔä´ñ`ç-ò5ò .Proof: Supposethat t is translationinvariant. Let ä�Ü�å¦æ à and çPè�é�Ü]ë�ì�í�î�ï`ð´ñ?ä´ò . Bydefinition of åuæ à , thereexists ùÚÜiú suchthat ä´ñ5ûsò°ôHûü×ù¥ãªûÜ×ë�ì�í�î�ï`ð´ñ?ä´ò . Sincet istranslationinvariant on X, we now haveÛ ó ñ`ç�ò�ôÝÛ ó�ýwþ ñRçFüDù�òPô¥Û ö�÷ ó�ø ñÔä´ñ�ç�ò?ò#ÿTo prove the converse,let çPè�é�Ü[ú and define� ñ�çPè5ésòPô��<ù¢ÜFú �iç��ÚùõÜ��Yî�ð�ë×é��Úù¢Ü���PÿNote that if

� ñ�çPè5é�ò�ô�� , then� ñ`çFü� Úè?éFü� ò�ô�� ã� Ü�ú . Suppose Û×Ü Þ ß à°á à

satisfies Û ó�� ñRç���òFôMÛ<ö�÷ ó � ø ñÔä´ñ�ç��Tò5ò�ã²äHÜ å¦æ à and ã�ç���è é��×ÜHë�ì�íFî�ï�ð´ñÔä´ò . Observethat ifû�è��dÜ � ñ`ç@è5ésò , thenç�� ûiÜ��Úègé�� ûaÜ��Úè ç����×Ü��Úè��! �"[é����×Ü�� ÿ (i)

Thus, if ùFô�û��#� , then ä�ôaäwþ�æ ÷ à%$ à ø ܤå¦æ à and the following equationshold:ä´ñ�ç��[ûsò�ôÝç&���'�! ("ä´ñ`é��[ûsòPôé����¢ÿ (ii)

In particular, we haveÛ�ó�)�*wñ`ç��DûsòPôÛTö�÷ ó+)�*�ø ñÔä´ñ�ç��Dûsò5òPôÛ ó+)�,wñ`ç&���@ò�ÿ (iii)

Now define -ÛDÜØÞ�ß/.uá . by- Û ó ñ`ç�ò�ô 0 Û�ó1)�*wñ`ç��[ûsò è3254�68796ÚûiÜ � ñ�çPè5ésò;:=<>�!79?1:A@B7C�!7EDªèF:HG � ñ�çPè5ésòIôJ�K :LG � ñ`çPè5é-ò�ôJ�!ÿIt follows from our observation(Eqs. (i), (ii), and (iii)) that -Û is well defined.

Let çPè�ékè�ù[Ü]ú . If� ñ`ç@è5ésò ôM� , then

� ñRçFü×ùwè5éFüDù�ògôN� and , hence, -Û ó ñ�ç�ò�ô K ôOÛ�ó�ýwþ�ñ�ç üiùwò . If� ñ`ç@è5ésòPôQ� , let ûÝÜ � ñ�çPè5ésò , ��Ü � ñ`çFüiù�è:éBüiùwò , bô¼ù����Úü]û , andä�ôaä(R�æ%÷ àS$ à ø . Then çT�¤ûiÜ�� and ä´ñ`ç&�[ûsòPô�ñ�ç�� ûsò²ü� pô�ñ�çFüiùwòU���DÜ�� . Likewise,

we have ä´ñ`é�� ûsòPô�ñ`é�� ûsò�üV dô�ñ�éFü×ù#ò+���×Ü�� . Thus, çW�Fû�è�é¤ô�ûiÜBë�ì�íFî�ï�ð´ñÔä´ò and-Û ó ñ�ç�ò�ôÛ ó1)�* ñRç��[ûsò�ô]Û<ö�÷ ó1)X* ø ñ`ä´ñ`ç��[ûsò5ò�ôÛ�÷ ó�ýwþ�øY)�, ñ:ñ`çFü×ù�ò/���@ò�ô OÛ ó�ý�þ ñRçFü×ù�ò�ÿTherefore, - Û is translationinvariant on Y.

Clearly, if çPè�é�ÜZ� , then -Û ó ñRç�òuô�Û ó ñ`ç�ò . Hence,OÛ#æ ÷ à5$ [�\�]_^'` . Thereforet is translation

invariant on X.

Q.E.D.

Translationinvarianttemplateson a finite point setX canalsobeclassifiedin termsof specialtypesof Toeplitz matrices.

325

Page 334: Image Algebra by Ritter

7.1.4 Definition. Let aQbQcedgfih8jlk�mgk . We say that A is a Toeplitzmatrix if and only if for everypair n9ogprqts k and for every integer k with the property nvuxwyozp>u{wZqJs k it follows thatdgfih�b|d fH}�~�� h�}y~ .

According to this definition, Toeplitz matricesareconstantalong their diagonals.

7.1.5 Definition. An �&�����&� matrix a�b'ced fih j is said to be block Toeplitzwith Toeplitzblocksif and only if A is of form

a�b����� a5� a_� �8���3a5�_���a �X� a � �8���3a �5�U�...

..... .

...a �����5���C� a �U�H�5���9� �8��� a ������ o

wherefor each n_q�s�� ���S����� a5f denotesa Toeplitz matrix.

For the remainderof this sectionlet ��bxs��x�&s k . ConsideringExamples4.9.5and6.1.3, the nexttheoremshould not be very surprising.

7.1.6 Theorem. � qt¡£¢¥¤I¦ ¤ is translationinvariant §©¨5c£�ªj is block Toeplitzwith Toeplitzblocks.

Proof: Supposet is translationinvariant on X. Since ¨5cl�ªj is an �&�����&� matrix, we canwrite ¨5c£�!j in termsof a block structuredmatrix

¨5c£�!j«b ���� a5�B� a5�C� ���8� a5��� �S���a ��� a �9� ���8� a ��� �S���...

..... .

...a5�S����� � a5�5�X�¬� � ���8�­a5�S����� �5�X������ o (i)

whereeach a fih is an �#��� matrix. Our first goal is to show that for eachpair nBo�p�q®s � ,a5fih is a Toeplitz matrix.

Let a5fih�b¯cld+°²±Ej , where ³go�´ q®s k . It follows from the definition of the isomorphism thatd1°£±;bµ� ��hE� ±H� cenBoC³�j . Fix s and t, and let k be an integersuch that ³¶urwyo�´«urw®qZs k . Since tis translationinvariant,d1°Y±¥br� �ihe� ±A� cln9oC³ªj¥br� �ihe� ±A}y~�� cln9oC³%u®w(j¥b{d1°²}U~�� ±A}y~%owhich implies that a5fih is a Toeplitz matrix.

To show that ¨5c£�!j is block Toeplitz, let k be any integer such that n¥uxw�ozp�uxwtqtsy� . Ifa5fih·bQcld1°£±Bj and a5f¸}y~�� h�}y~&bQce¹�°Y±Ej , then for ³zo(´;q�s k we haved+°Y±/bt� �ihe� ±º� cenBoB³ªj¥br� �ih�}y~�� ±=� clnyu�wyoC³ªj¥bx¹�°Y±�»This showsthat a5fih�bNa5fH}U~�� h�}y~ .

326

Page 335: Image Algebra by Ritter

Conversely,supposethat ¼%½²¾z¿ is block Toeplitz with Toeplitz blocksand written in termsofEq. (i). Let À®Á'½AÂ1ÃEÄB¿CÃ�Å�Á'½eÆBÃ�Ǫ¿SÈ�ÉyÊÌË�ÉyÍ andsupposethat Î&Á'½eÏ�Ã�Ðe¿ÑÈ�É�Ë�É suchthatÀ�Ò�Î�È�É Ê Ë�É Í and Å�Ò�Î�È�É Ê Ë�É Í . By definition of ¼5½£¾ª¿ , ¾!Ó�ÔEÕ ÖH×E½eÆBÃCÇ�¿SÁÌØ1Ù Ö , where Ø1Ù Öis the ½lÇzÃ9Ä�¿ entry of Ú5Û Ô .Since ¼5½£¾!¿ is block Toeplitz with Toeplitz blocks, Ø Ù Ö Á'Ü�ÙlÝ�Þ Õ Ö ÝyÞ , where Ü�Ù²ÝyÞ Õ Ö ÝyÞ denotesthe½eÇÑÒ�ÐEÃ9ÄyҮв¿ entry of Ú5ÛHÝUß Õ Ô Ýyß . Therefore,¾8à(½£Å¥¿«ÁtØ Ù Ö ÁxÜ Ù²ÝUÞ Õ Ö ÝyÞ Ár¾!ÓiÔ Ýyß Õ Ö ÝyÞ ×E½eÆyÒ�Ï�ÃCÇ%ҮУ¿áÁr¾�à Ýyâ ½lÅ&Ò�Î(¿�ã

Q.E.D.

Since ¼ is an isomorphism,a template ¾äÈtålæFçIè ç hasan inverseif andonly if the corresponding

matrix ¼5½£¾ª¿ has an inverse. The inverseof ¾�ÈQå²æ ç è ç (if it exists) will be denotedby ¾!éUê . Thus,

if t hasan inverse,then ¾ é�ê Áë¼ éXêXì ¼5½£¾!¿ é�êBí . Obviously, if T is an î&ï�Ë�î&ï block Toeplitz matrix

with Toeplitz blocks,then ¼ é�ê ½lð;¿ is an invarianttemplateon X. However,sincethe inversematrix of ablock Toeplitz matrix with Toeplitz blocks is not necessarilya Toeplitz matrix (seefor example[4, 9]),Theorem7.1.6 has the following implication:

7.1.7 Corollary. Theinverseof a translationinvarianttemplateis notnecessarilytranslationinvariant.

7.2 Cir culant Templates

Implementationof many translationinvariant transformationsoften involve circular convolutionssincecircularconvolutionscanbecomputedusingfast transformmethods.Circulanttemplates,the topicof this section,are usedto implementcircular convolutions.

Unless otherwise specified, for the remainderof this section ñ ÁòÉ Ê ËxÉ ÍNó É�Ë{É . ForÅZÁô½lÆBÃlÂX¿õÈ�É�Ë�ÉöÁ�É�÷ we define ÅFî�ø!ùX½lî�ÃCï�¿IúQ½lÆ�½eî�ø!ù+î�¿CÃYÂ(½=î�ø!ù+ïû¿E¿ .7.2.1 Definition. A function ütý�ñÿþ ñ is calleda circulant translation if and only if

� Î�È�ñsuchthat üá½lÅv¿¶ÁM½£Å&Ò�ÎX¿eî�ø!ùX½eî�ÃBïy¿���Å'Èrñ

Note that if Î È É ÷ and Î �È ñ , then Î+î&ø!ùX½Eî�ÃBï�¿©È ñ and ½lÅ&Ò�Î�¿eî�ø!ùX½lî�ÃBï�¿�Á½lÅ&Ò�Àá¿lî�ø!ùX½eî�ÃBï�¿��(ÅôÈ'ñ , where ÀQÁ­Î1î&ø!ùX½eî Ã9ï�¿ . Therefore,we shall sometimesdefine circu-lant translationsin terms of ÎtÈÌÉ�÷���ñ .

7.2.2 Theorem. If �W½lñ�¿ Á!üQý ü�ƲÇIØ���Æ� ����(УØ1ï(ÄûÄ� !Ø+ï�Ç8УØgÄEÆlø!ï�ø!ï�ñ�� and ½Eñ�ÃyÒ;¿ is the additivegroup of vectoraddition î�ø!ùX½eî�ÃBï�¿ , then ½��W½eñ�¿9Ã��z¿ is isomorphic ½eñ Ã�ÒW¿ .

Proof: For each ίÈ|ñ , let üFâ denote the circulant translationdefined by üFâ!½lÅv¿�Á½lÅ&Ò�Î(¿lî�ø!ùX½eî�ÃBï�¿��(Å È'ñ . Note that ü¯È��W½lñ�¿�� ü�Áÿüûâ for some ÎJÈ'ñ . Thus,

327

Page 336: Image Algebra by Ritter

if we define �������! �"#�%$ by �&"�'($*),+.- , then h is onto. Also, since +/-10)2+43 whenever'50)�6 , �7"8'($90):�&"�6;$ . Therefore,h is one-to-one.

By definition of h, �7"8'*<�6;$�)=+4-�>?3 . But+ -�>?3 "�@A$A)CBD@E<F"8'�<G6;$�HJIEK�L("�INMPO/$)CBQ"8@E<G6R$�I%K�LS"#ITMPOU$.<G'VHWI%K�L("�ITMPOU$)X+4-YBZ"�@E<G6R$�I%K�LS"#ITMPOU$�H)X+4-�"�+43?"�@[$#$)\"#+/-^]^+/3_$`"�@[$a @cbX� . Therefore, �&"�'*<�6[$d)=+4-*]e+43 .Q.E.D.

7.2.3 Definition. A template f,b!g�hAikj i is said to be circulant if and only if f�37"l@[$5)fnmVo 3Yp "#+^"l@A$`$ a @;Mq6rb=� anda +sbt u"���$ . We denotethe set of all h –valued circulant

templateson X by vw"�hxMS�N$ .Supposef�b1v�"�hxMS�N$ and yzbz{*| i . If @RMV6�b�L}K�IE~(�8OU"�yU$ , thenthereexistsa point '9b1�U� suchthat@u<�'�)XyU"�@[$[b1� and 6w<E'�)�yU"�6;$[b1� . Since @u<E'9b1� and 6w<E'9b�� , "8@E<�'($�IEK�LS"�IzMPO&$R)5@u<E'

and "l61<�'($#I%K�LS"#ITMPO&$^)�61<�' . Thus,using the circulant translation+ - bG u"���$ , we havethatf�37"�@[$/)�f m���o 3Yp "#+/-�"�@[$�$[)5f�3Y>?-Y"8@9<�'S$R)5f�� o 3Yp "8@A$_�This provesthe following theorem:

7.2.4 Theorem. Everycirculant templateon X is translation invariant on X.

7.2.5 Definition. An O���O matrix v�)"#�����n$ is said to be a circulant matrix of order n if andonly if for every integer k, � ��� )X��o � >.��p��^�����V� o � >7��pJ�x�#��� �

It follows from this definition that if C is a circulantmatrix of ordern, thenC is of form

v2) ���� ��� ��� �n�n�r� �¡  ����¡  � � � �n�n�r���¡  �......

.. ....� � � � �n�n� � �¢�££¤ �

Thus,we canusethe simplernotation v¥)\���l¦���"#� � M_� � M�§�§n§7M_���¡  � $ to uniquelyrepresentthe matrix C.

328

Page 337: Image Algebra by Ritter

7.2.6 Definition. An ¨E©�ª�¨%© matrix A is saidto be blockcirculantwith circulantblocksof type« ¨z¬�©.­ if and only if A can be expressedas a block matrix

®�¯±°²²³ ®µ´ ®*¶ ·�·n·r®¹¸µº_¶® ¸¹º_¶ ® ´ ·�·n·r® ¸¹º�»...

..... .

...®k¶ ®k» ·�·n· ®µ´¼�½½¾ ¬

suchthat each®¹¿k¯=À�ÁlÂ�À(Ã�Ä¡¿ZÅ ¬ Ä¡¿WÆ ¬.ÇnÇ�Ç_¬ Ä¡¿ÉÈPÊ�Æ�Ë .

We shall alsousethe notation®Ì¯CÀ�Á�Â�À « ®µ´ ¬ ®k¶ ¬.Ç�ÇnÇ_¬ ®µ¸¹º_¶ ­ to representa block circulantmatrix

with circulantblocks. The next theoremshowsthat circulant templatesdeservetheir name.

7.2.7 Theorem. If Í�ÎGÏ «#Ð ¬_Ñ�­ , then Ò « Í�­ is block circulant with circulant blocks.

Proof: Sincet is translationinvariant (Theorem7.2.2), Ò « ÍÓ­ is block Toeplitz with Toeplitzblocks (Theorem7.1.6)

Let

Ò « Í�­ ¯ °²²³ ®µ´ ®k¶ ·n·n·r®µ¸µºS¶®Ôº_¶ ®µ´ ·n·n·r®µ¸µºS»...

.... ..

...® º7ÕÖ¸µºS¶`× ® º7ÕQ¸¹º_»P× ·n·n· ® ´¼ ½½¾GØ

We shall show that for each ÙeÎFÚ.Û ÕQ¸¹º_¶P× , ®eÜ is circulant.

Since ÙuÎCÚUÛ ÕÖ¸µºS¶`× , ® Ü is of form

® Ü ¯ °²²²²²²²²³Í ÕQÝ�Þ ´P× « Á ¬PßV­ Í Õ�Ý�Þ ¶P× « Á ¬�ß¡­ ·n·�· Í Õ�Ý#Þ à�× « Á ¬�ß¡­ ·n·n· Í Õ�Ý#Þ á¡ºS¶`× « Á ¬�ß¡­Í ÕQÝ�Þ ´P× « Á ¬�â�­ Í Õ�Ý�Þ ¶P× « Á ¬nâ�­ ·n·�· Í Õ�Ý#Þ à�× « Á ¬nâ�­ ·n·n· Í Õ�Ý#Þ á¡º_¶P× « Á ¬nâ�­

......

.. ....

. .....Í ÕãÝ�Þ ´�× « Á ¬  ­ Í ÕãÝ�Þ ¶P× « Á ¬  ­ ·n·�· Í Õ�Ý�Þ à�× « Á ¬  ­ ·n·n· Í Õ�Ý#Þ á¡º_¶�× « Á ¬  ­

......

.. ....

. .....Í Õ�Ý#Þ ´�× « Á ¬�©åäFâ�­!Í Õ�Ý#Þ ¶P× « Á ¬�©åäFâ�­ ·n·�· Í ÕQÝ�Þ à�× « Á ¬`©�ä5âÓ­ ·n·n· Í Õ�Ý�Þ áYº_¶�× « Á ¬�©åäFâ�­

¼�½½½½½½½½¾ ¬where Ù ¯,æ ä Á and

Á ¬ æ Î\Ú ¸ .

Let çéè:ê[ë\ì¥íïî�ð(ëPñ7ò , and considerthe circulant translation ó.ô�õ*ö ÷ ö definedbyó4ô�î�ø[ò¹í,î�øEù�ì(ò#úEû�üSî�úzë�ýUò . If øFí�î�þ�ÿ�ë�þ���ò*è�ö , then ó/ô�îløAòeí,î�þ_ÿ�ë�þ��Aù�ñ&ò�úEû�üSî�úzë`ýUò¹íî#þ?ÿ�ë�î�þ��Rù�ñ?ò�úEû�üVý/ò . Let���

be denotedby��� íCî���� ò . Sincet is circulant,we have� �� í ������ �� î��`ë��¡òRí ����������� �� î#ó ô î��Pë���ò�òRí���������� ��! "�$#&%('*)+� î��Pë�î��µù ñ�ò#úEû�üVýUò/í,�-� ���. /�0#1%�'�) ��� ��. /�0#1%�'�)32

Therefore,� �

is circulant

329

Page 338: Image Algebra by Ritter

We now showthat 4&5�6�7 is block circulant. Let 8:9<;=>@?A>!BCB�B�>@DFEG=�H and I3JLKM5(NPO*QR7 . Since8�SUT and 4V5W6�7 is block Toeplitz, we have that

I J K XYZ 6P[ J]\ ^�_ 5�TA>�TP7 `�`C` 6+[ Ja\ bPced�_ 5�TA>�TP7...

.. ....6 [ J]\ ^�_ 5�TA>*fgE�=�7 `�`C`h6 [ Ja\ bc@d"_ 5(TA>�fgE =C7

i/jkmlThus, NPO�Q�Kn6�[ J]\ Qo_ 5�TA>*pP7 . We needto show that I�JqKUI c [sr c-J]_ .Let I c []r c@J]_ Kt5�u"O�Q"7">wvnKt5�8�>�TP7 , and define the circulant translation xzyM{�| } | byx:y�5�~�7�K�5o~��mv@7�D����-5�D�>�fz7 . ThenuRO*Q�K 6+[ ^/\ Qo_ 5�D�E�8�>�pC7qK�6����"[ ^/\ Q�_ 5(x�y�5�DFEm8�>"p�7�7�K 6+[ J]\ Q�_ 5�TA>�p+7qK�NPO�Q l

Q.E.D.

The set ��5�D�>�fz7 of all block circulant matriceswith circulant blocks of type 5(D�>�fz7 forms acommutativering with unity [6]. Since 4�{���5(�&>�|�7�} ��5(D�>�fz7 is an isomorphism,Theorem7.2.7implies the following corollary:

7.2.8 Corollary. 5���5���>�|�7">��� >.��7 is a commutativering with unity.

As mentionedpreviously,circulant templatesareusedto implementcircular convolutions. In fact,if 6�9���5(��>�|�7 , then the mapping ��  ¡�¢£¥¤ is the circular convolution of the two-dimensionalsequences¦§a¨�©�¡!ª(«�¬o­A® and ¯o§°¨�© ¤�±]²"³ ²�´�µ ª�¶�«�¬·¶�­¸®�¹�º»-ª�¹�¬�¼z®�½ . Thesecircular convolutionscan be usedfor approximatingtranslationinvariant templateoperations[1, 14]. The simplesttechniques,which areadequatefor smallconvolutions(i.e., templateswith smallsupport),areeitherto padthearraywith zerosor to ignore the boundaryeffects.

Circular templatesare closely related to the discrete Fourier transform and the theory of fastconvolutions.The next setof definitionsand theoremshelp to establishthis relationship.

If ¾¿©ÁÀLÂ�ÃGÀ�Ä and ÅGÆÈÇoÉ&Ê�Ë Ê denotesthe two-dimensionalFourier template,then the two-dimensionalFourier matrix of order ¹hÌM¼ is denotedby ÍzÂ1Î�Ä and definedby ÍzÂ&Î�Ä ©ÈÏVªWÅ® . Weuse the tensornotation ¹ÁÌw¼ in order to avoid confusionwith the one-dimensionalFourier matrixÍzÂqÄ definedin Section6.2. Note that in general ÍzÂ1Î�Ä�ЩUÍzÂqÄ . The relation betweenÍzÂ&Î�Ä and theone-dimensionalFourier transformmatrix is given by the following equation:ÍzÂ1Î�ÄÑ©�ÍzÂ�ÌÒÍzÄ�©Mª�Í!Â�Ì¥Ó/ÄA®�ª�Ó/ÂGÌÒÍzÄ�®*Ô (7.2.1)

This relation correspondsto our previousobservation(Eq. 6.1.22) that the two-dimensionalFouriertransformcanbe computedin two successiveapplicationsof the one-dimensionalFourier transform.

For each ÕÈ©�Ö/«W×�ÖCª(Ö ² ¬@Ö/Ø�¬!Ù�ÙCÙ@¬@Ö"ÄPÚ-ØC® , let Û�Ü�ª�Ý.®�©�Ö ² ¢ Ö/Ø/Ýg¢ Ö/Þ/Ý Þ ¢àß�ßCßá¢�Ö"ÄPÚ@Ø/Ý ÄPÚ-Ø . Thus, ifâ ©wÖ/«o×�ÖCªäãA¬!å¬@ã-¬!Ù�ÙCÙ@¬@ãæ® is of size ¼�Ã�¼ , then Û�Ü�ª â ®&©wÖ ² â ² ¢çÖ·Ø â ¢�ß�ßCß:¢ÒÖ"ÄPÚ@Ø â ÄÚ@Ø ©wÕ , whereâ ²�è Ó Ä . Furthermore,since ÄPÚ@Øé¨*ê ².ë ¨*ìÄ ©îí ¼ ïsðmñ è ãP¹�º�»¸¼ã òôó�õ@ö/÷�ø�ï0ù*öú¬330

Page 339: Image Algebra by Ritter

it is easyto showthat û�üMýzþæÿVý��þ , where ÿ�ü ���������� þ�� with �gü������������������ �!� . It now follows that" ü�ý þ$# ý �þ � (7.2.2)

where # ü ���%��� �&�'( � þ �)� ��ü*�+�����������,�-�.�/� .Equation7.2.2representsthe matrix formulationof the circular convolutiontheorem.Similarly, for

eachblock circulantmatrix C with circulantblocksof type 021.�3�)4 we candefineapolynomial&5' 076)�98�4 by& ' 076)�38�4�ü�:�;<;>=?:�;<@A8B=DC�C�C)=?:E;AF þ�G @A8 þ�G @ =H6JI%:A@2;K=H:A@<@�8L=*C�C�C�=H:M@�F þ�G @A8 þ�G @�N =DC�C�CC�C�C)=H6+O G @ I%: O G @�F ; =P: O G @�F @ 8(=*C�C�C�=P: O G @�F þ�G @ 8 þ�G @�N � (7.2.3)

such that " ü/0�ý O?Q ý þ 47RS0�ý OTQ ý þ 4 � � (7.2.4)

where Rtü ���%�5�K & 'U�� O � �WVþ �,� . Thus, circulant and block circulant matricesare diagonalizableby

Fouriermatrices.In the languageof imagealgebrathis saysthat if XZY " 0�[K�3\]4 and ^_Y.[a` , thenthereexistsa template bcYdI%[a` e ` suchthat f>07b�g,4�hji�k�lnm-koYP\ and^.=p X üq0<0�^!=pHr 4>=p b54=psr G @5t (7.2.5)

Note that the computationof u?=p b can be implementedusingpointwisemultiplication. Equation7.2.5showsthat the FFT can be usedto facilitate the computationof convolutions.

The Fourier templatef inducesan isomorphism" 07v(�3\S4Uw vK` . This correspondsto the image

algebraversion of the convolution theorem.

7.2.9 Theorem. Thefunction xzy " 02vB�3\S4{w|vK` definedby x�0}X�4�ü~X�� ;AF ;<� =p�r is a ring isomorphism.

Proof: If b��+�cY " 0�v(��\S4 suchthat X�ü�b�=T� , then X � ;AF ;<� ü�b � ;AF ;3� =T� � ;AF ;<� . Using this andEq. 5.1.1 we obtainx�0�bK=H��4áü�x�0}X�4�ü I b � ;AF ;<� =?� � ;AF ;<� e =psr ü I b � ;MF ;9� =psr e = I � � ;MF ;9� =p�r e ü�x�0�b�4�=?x�0���4 tFrom the definition of the Fourier templatewe obtainx�0���4�ü�� � ;AF ;�� =psr üo� tNext supposethat X ü�bL=p � , ��ü�0 � ����4��_�Gü�0�6��38�4 YP\ , and �a�50%��43ü�0��_�.��4�1c� � 021.�3�)4 .Since

" 02vB�3\S4 is a commutativering, bL=p �gü��L=p b . Hence,X � ;AF ;<� 0��W4�ü���A���z������� �3�9� ��¡£¢�¤ � ��¥�¡�¦�§�M���z���¨�A� �<�2�}�+¡{¢A¤5©5ª�� � �9�7« � �}¥W¡<¡¦ §�­¬®� ¯<� �5� � �­�A� �<� �7°�±}²+¡£¢�¤ �³�A� �3� �<�7´¶µH°9¡¸·c¹�º�·»±-�7¼Lµ_²�¡7·c¹5º$½)¡�¾

331

Page 340: Image Algebra by Ritter

Therefore, ¿5À¨Á� Á3Ã2Ä}Å�Æ can be representedas the cyclic convolution of the two-dimensionalsequencesÇ�È À¨ÁA Á<à Ä�É+ÆAÊ�ËAÌ5Í and Ç�Î À­ÁA Á<à Ä}É�Æ�Ê�ËMÌ�Í (seealso Section3.6 and Example3.10.3(ii)).By the ConvolutionTheoremwe now have¿ À¨ÁA Á<Ã�ÏÐsÑBÒÔÓ È À¨ÁA Á<Ã�ÏÐ�Ñ�Õ×Ö+Ó Î À¨ÁA Á<Ã�ÏÐØÑ�Õand, hence, Ù Ä�È ÏÐ Î�Æ Ò Ù Ä�È5Æ Ö Ù Ä�Î�Æ�Ú (7.2.6)

Thus,

Ùpreservesthe ring operations.

To seethat

Ùis onto, let Û�ÜnÝ Í . Set Þ Ò Û ÏÐ�Ñ�ß,à and define ¿sÜoáâÄ7ÝBã<ä!Æ by setting¿ À¨ÁA Á<à Ä%Å�Æ Ò Þ)Ä}ÅWÆ]å-Å�ÜPä and extendingt circularly by defining¿Aæ�Ä�ÅWÆ Ò ¿5ÀçÁA Á<Ã2è¨Ä�Å_é.ê>Æ7ëcì5í�Ä�ë.ã3î)Æ�ïdå-êHÜ!ädÚ

Then

Ù Ä}¿5Æ Ò ¿ À¨ÁA Á<ÃJÏÐsÑcÒ Þ ÏÐØÑðÒñÓ Û ÏÐsÑ ß-à Õ ÏÐsÑðÒ Û .

To showthat

Ùis one-to-one,supposethat

Ù Ä�È5Æ Ò Ù Ä�Î�Æ . Then È5À­ÁM Á9à ÏÐsÑUÒ Î�À³ÁA Á<à ÏÐsÑ and,sincef is invertible, È�À­ÁA Á<Ã Ò Î�À¨ÁA Á<à . However,circulant templatesaredeterminedby their valuesatone point. Therefore, È Ò Î .

Q.E.D.

One of the most useful propertiesof the Fourier transform is that it convertsconvolutionsintopointwise multiplications, a fact which is expressedby Eq. 7.2.6. Becauseof this, local algorithmsfor computingconvolutionscan be derivedby deriving local algorithmsfor computingdiscreteFouriertransforms.

For ¿òÜ Ó�ó Í Õ Í , define Þ)Ä}¿5ÆôÜ ó Í by Þ�Ä%¿5Æ Òdõ ¿ . Note that if ÈòÜ Ó�ó Í Õ Í is a one-pointtemplatewith ö>Ä�ÈMæ-Æ Òø÷ ê�ù*å�êÔÜoä , then Þ)Ä�È�Æ<Ä�ÅWÆ Ò ÈAú�Ä}Å�Æ and Û ÏÐ È Ò Þ)Ä�È�Æ Ö Û å�Û�Ü ó Í . In addition,û Ä�È�Æ is a diagonal template.

One-point templates and invertible templates provide a structure which is essentiallythe same as the ring áâÄ�ÝBã3äSÆ . Suppose ¿ Ü Ó Ý Í Õ Í is invertible. Define üSÄ%¿�ã3ä!Æ Òý ¿ ß�à ÏÐ È ÏÐ ¿HþUÈBÜ Ó Ý Í Õ ÍPÿ��������� é� �5ÿ�� ������� �� ����� � . The structure of üSÄ}¿�ã3ä!Æ is revealed bythe following theorem:

7.2.10 Theorem. üSÄ�¿�ã3äSÆ is a commutativering which is isomorphicto Ý Í .

Proof: The proof, which proceeds in two steps, is routine and we leave thedetails to the reader. The first step consists of showing that

û Ä�üSÄ�¿�ã�äSÆ<Æ Òý û Ä%¿5Æ ß-à Ö ö Ö û Ä}¿5Æzþòö ÿ�������ÿ���������� � ����� �9ÿ"!#�is a commutative ring (this is trivial),

and thatû þBüSÄ}¿�ã3ä!Æ%$ û Ä�üSÄ�¿�ã�äSÆ�Æ is an isomorphism. This shows that üSÄ�¿�ã�äSÆ is a

commutativering.

332

Page 341: Image Algebra by Ritter

The secondstep consistsof verifying that the function &('�)+*-, .�/1032 465 defined by&7*�890�:<;=*?>�0 , where >@:A,CBD 8EBD ,�F�G , is an isomorphism.This is alsostraightforward. Forsuppose8�.�HJIK)+*L,�.M/10 with 8N:O,�F�G�BDQP G BD , and HR:O,�F�G�BDSPUT BD , . If 8 G :V,WBD 8EBD ,�F�Gand H G :(,WBD HSBD ,�F�G , then 8 G :(,XBD<Y ,�FZG[BD3P G BD ,]\WBD ,�F�G^: P G and, similarly, H G : P_T

.Thus, &`*�890aBS&`*�>�0#:J;=*b8 G 0aBR;c*-H G 0:Ode8 G BJd�H G:Od P G Bfd P_T

:Ode* P G B P T 0:Od�,XBDhgbY , F�G BDRP G BD ,U\iB Y , F�G BD3P T BD ,�\kj�BD , Fcl:Od�,XBD *�8�BRH�0iBD , Fml:V&`*�8�B3>�0ZnTherefore,&7*�890mBQ&7*b>�0#:V&`*�8^BS>�0 . Note that we usedEq. 5.1.1 to establishthis equality. Ina similar fashionone can show that &7*�890�op&`*q>�0r:s&7*�8EBD >�0 .The verification that & is one-to-oneand onto is just as routine.

Q.E.D.

Thus, if methodscan be found for implementinginvertible transformslocally, then thesemethodscan be usedto implementa larger classof linear transformslocally.

7.3 Cir culant Templatesand Polynomials

In the precedingtwo sectionswe definedtranslationinvariant and circulant templatesandoutlinedtheir relationshipto the matrix algebraassociatedwith the discreteFourier transform. In this sectionwe describea family of relationshipsbetweencirculant templatesand the quotientrings of polynomialrings. Theserelationshipsshow that the problem of finding decompositionsof circulant templatesisequivalentto factoringmultivariatepolynomials.For separablecirculant templates,the problemreducesto the single variablecaseand is, therefore,equivalentto finding roots of polynomialsin one variable.This is analogousto the polynomial factorizationmethodologiesdevelopedin Chapter5. However,theunderlyingtechniquesaredifferent. For circulant templateswe useshifts andthe FundamentalTheoremof Algebra in order to obtain minimal local decompositions.

Throughoutthis section,x, y, andz will denoteelementsof /t:OuwvOxyuwz , {|:A*L}�.M}�0 , x andy willdenoteindeterminates,and 4�~��=.���� thering of polynomialsin two variableswith coefficientsin 4 . We let4[~��=.����-��*L� vV�J� .�� z��J� 0 denotethe quotientring of polynomials �^���Z*q� v��f� 0 and �^���Z*q� z��3� 0 (seeSection3.6). The circulant von Neumannconfigurationis the function ��' /�2�� 5 definedby

�N*L��.-�0�:A��*q��.?�Z0�.w*�*b�w� � 0q�+���7�K.?��0�.w*b��.w*"�W� � 0L�+�����#0q�7nIn this section,the term “local” shall meanlocal with respectto N.

333

Page 342: Image Algebra by Ritter

7.3.1 Definition. Foreach���1� , define�U�W���C�q�� ��^¡�¢���£¥¤= M¦�§©¨��q¤�ªJ«f¬� M¦�­C«J¬_¡ by �]���L®�¡�¯3°�±-² ,where ° ±L² �q¤= M¦Z¡�¯ ª´³mµ¶ ·"¸�¹ ­�³�µ¶º ¸¹ ® � �q»� -¼Z¡q¤

·¦º½

� � �-®�¡ or, equivalently,° ± ² is called the polynomialrepresentativeof t.

Note that by defining ¾ ·¿ºÁÀ ®����q»� ?¼`¡ we obtain°Z± ² �L¤= M¦Z¡#¯Â¾ ¹�¹ià ¾ ¹ µ ¦ÃÅÄUÄ_Äcà ¾ ¹MÆ ­�³�µ ¦ ­�³�µ

à ¤�ÇL¾ ¹�¹�à ¾ ¹ µ ¦ÃÅÄUÄ_Äcà ¾ ¹�Æ ­�³�µ ¦ ­�³�µ�È

ÃÉÄUÄ_ÄÄ_ÄUÄ=à ¤ ª´³�µ Ç ¾ ª´³�µÆ ¹ià ¾ ªe³Zµ

Ƶ ¦

Ã�Ä_ÄUÄ=à ¾ ª´³�µÆ­�³Zµ ¦ ­�³�µ�È (7.3.1)

which is identical to Eq. 7.2.3

7.3.2 Example: Let ®Ê�Â�C�b�� M�+¡ be given by

=

1 2 3

2 4 6

3 6 9

ThenÌ�ÍÏÎ�Ð Î�ÑÓÒLÔ�Õ�ÖJ×�ØQÙ�Ú�Ø3Û�Ú�Ü�Ý�Þ�ØQÙ�ßàØQá�ßÚ�ØSâ�ß�Ú�Ü�ÝZÞiØQÛ�ßZã´Ý�Þ�Ø3â�ßZã´Ý�Þ�Ú�ØQßZã´Ý�Þ�Ú�Ü�ÝZÞ�äwhile

Ì Í Þ Ð Þ Ñ ÒÓÔ�Õ�Ö<åiØQÛ�Ú�ØSâ�Ú æ�ØQÛ�ßCØS×7ßÚ�ØSÙ�ßÚ7æ�ØQâ�ß�æ�ØSÙ�ßæ�Ú�ØQá�ßæMÚ7æ�ç

The following propertiesare easyto ascertain:

7.3.3 Properties of

ÌUè.

1. If

Ì ÍÏÎ�Ð Î�Ñ ÒLÔ�ÕrÖéßÁØ�êor

Ì ÍÏÎ�Ð Î�Ñ Ò-Ô�Õ�ÖsÚCØJê, then t is local.

2. If

Ì Í"Î�Ð Î�Ñ ÒÓÔ�ÕëÖ<ê Î ØQê Þ ß@Ø3ê æ ß æor

Ì ÍÏÎ�Ð Î�Ñ ÒÓÔ�ÕëÖOê Î ØQê Þ ÚWØQê æ Ú æ, then t is local.

3. If

Ì ÍìÎ�Ð Î�Ñ ÒLÔ�Õ´Ö<ß�í-Ú�î, then the circulant transform ï%ð ï Øñ Ô

shifts all pixel valuesi unitsvertically and j units horizontally.

7.3.4 Theorem. If ò�ó�ô^õ3öà÷qø�ó�ù1ú , then ûpü�÷bò�ýþ ô�ú ÿsû_ü7÷Lô�ú � ûUü`÷qò�ú .Proof: For � õ ù , let ��� denote the circulant translation defined by ����÷���ú ÿ÷�� � ú�� ���Z÷��Kó��=ú . If �Jÿ�ò[ýþ ô , then �Uü7÷��Zú%ÿ ������ ò � ÷��Zú � ô�ü�÷ � ú . Since s is circulant,ò � ÷��Zú ÿhò������ ��� ÷�� � ÷���ú�ú�ÿ(òUü�÷�÷ �! � ú"�#���Z÷"�Kó$�wú�ú . Thus,�Uü7÷��Zú�ÿ&%����� ô�ü�÷ � ú � ò_ü�÷�÷�� � ú�� ���Z÷"�Eó'�=ú�ú)( (I)

334

Page 343: Image Algebra by Ritter

By definition of polynomialproductsin *,+.-�/'0�132�4�-6587:9�/�0<;7=9?> (seeSection3.6), the num-bers @�A<4�B6> , for BDCFE , given by Eq. (I) areexactly the coefficientsof the polynomialproductGIH�J 4�-K/�06>ML G)N�J 4�-K/�06> .

Q.E.D.

7.3.5 Theorem. For every B OP4"QR/'S�>TCUE , V�W is one-to-oneand onto. Moreover,if X</IYDC[Z\4�*,/�E#> ,then 9<]^V_W�4"XM`UY<>aObV_W�4"X?>c`UV�W<4"Y<>d ]^V W 4"Y<>�O8-Ie�0gfhViAj4�Y<>k ]^-lei0jfmV W 4�X`n Y<>�O8V W 4"Y<>oLiV W 4"X?>�]

Proof: It is not difficult to checkthat V W is one-to-oneandonto,andwe leavethedetailsto thereader.Similarly, Eq. 1 follows from the fact that additionof templatesis definedpointwise.

To prove Eq. 2, let p W be the circulant translationdefinedby p W 4�qr>sO&4�q `[Bl>�t u�v)4�tw/yx�> ,andnotethat p W 4"zo>aO8B . Now, if Y\CwZ\4�*{/$E#> , thensince -65|O}9{O~0<; , we havethat

V W 4"Y<>rO 5��)�� � �I� ;<�I��� �l� Y W 4"�$/��)>"-�0 �

O 5T�I�� � �I� ;<�I��� �l� Y�W�4'4��R`UQl>"t#u�vjtw/�4m�`:S >�t u�vjxK>�-���

e�0 ��f

Ob- e 0 f L 5T�I�� � �l� ;��I��� �l� Y A 4"�$/��j>"-�0 �

Ob-Ie�0jf6L G6��J 4�-c/�0)>rOb-le�0jfmV A 4�Y<>)]To prove Eq. 3, observethat since V A 4�X,`n Y<>�O�V A 4"Y<>�LjV A 4"X?> and V W 4 @�>�O�- e 0 f V A 4�@?> , wehave that

V W 4"X{`n Yg>�Ob-lei0jfhViAj4�X�`n Y<>Ob-lei0jfhViAj4�Y<>RL�ViAj4�X�>Ob-lei0jf���- 5T� e�0 ;�� f�V W 4�Y<>KL�- 5T� e�0 ;�� fmV W 4"X?>��Ob- 5T� e�0 ;�� f�V W 4"Y<>�L�V W 4"X?>)]The desiredresult now follows by multiplying the equationby - e 0 f .

Q.E.D.

335

Page 344: Image Algebra by Ritter

7.3.6 Example: If t denotesthe circulant templatefrom Example7.3.2, then ���m��� ������ �¡£¢~¤R¥j�?�§¦�� ¦'���  �¡ .Also,  U¢�¨{©ª¬«

, where

r­ =s® = and¯ 1 2 3

1

2

3

Thus, °?±³²�´ ²"µy¶"·?¸º¹¼»º½}¾�»l¿À½}Á�»l¿g and °?±³²�´ ²�µy¶"Ã<¸[¹Ä¿#½}¾<»l¿F½}Á<»lÂ�¿ . Simple polynomialmultiplication showsthat° ±m²�´ ²�µ ¶�Ã<¸oÅi° ±³²�´ ²"µ ¶"·?¸�¹b»l¿j° ±³²�´ ²�µ ¶�Æ�¸�¹8»I¿j° ±³²�´ ²"µ ¶"·,½Ç Ã?¸lÈ

The following facts are direct consequencesof Theorems7.3.4 and 7.3.5.

7.3.7 Corollary. °�É is an isomorphism.

7.3.8 Corollary. Let ÆËÊÍÌζ"Ï,Ð'Ñ͸ , Ò:¹|¶"Ó'Ð Ôl¸ , and Õ#¹Ö¶"×RÐ'Ø�¸ . If Ù6Ú�Û<¶�»cÐ�¿)¸M¹=Ù ² ¶"»KÐ$¿)¸�Å�Ù Â ¶"»KÐ�¿6¸ , thenÙ6Ú�Ü�¶"»KÐ�¿j¸a¹ÞÝ ² ¶�»cÐ�¿j¸rÅiÝ Â ¶�»KÐ�¿6¸ , where Ý ² ¶�»cÐ�¿j¸£¹~»lß�àIá ¿jâ�àjã"Ù ² ¶�»KÐ$¿ä¸ and Ý Â ¶�»cÐ�¿)¸a¹UÙ Â ¶"»KÐ$¿ä¸ .7.3.9 Corollary. If ÆËÊ[Ìζ"Ï{Ð$Ñ#¸ , Ò:¹å¶�Ó$Ð�Ô6¸ , and Ù6Ú Û ¶"»KÐ�¿j¸T¹=Ùo¶"»KÐ�¿j¸�Å�Ý<¶"»KÐ�¿j¸ , then Æ˹ÞÆ ² ½Ç Æ Â ½Ç · ,

where Æ ² ¹æ° à ²ç ¶�Ùo¶"»KÐ$¿ä¸'¸ , Æ Â ¹æ° à ²ç ¶�Ý<¶"»KÐ$¿ä¸'¸ , and s representsa circular shift èêéÞÓ unitshorizontally and ëìé:Ô units vertically. Moreover, s can be replacedby a template í· whichrepresentsa circular shift i units horizontallyand j units vertically.

Thecollection î�°�ïsð,Õ�ÊFÑÀñ constitutesa classof mappingsbetweenimagealgebraandpolynomialalgebrathat are almost isomorphisms. For Õóò¹õô , the operationof multiplication is not preserved(Theorem7.3.5Eq. 3). However,for ÕFò¹Þô , they differ from the isomorphism°�É only by shifts. Thus,if any polynomial representativeÙ Ú Ü of a templatet can be factored,then the templatet can also befactored.It follows that the templatedecompositionproblemfor circulant templatesis equivalentto theproblemof factoringmultivariablepolynomials.We will usethis fact in orderto showhow anyseparablecirculanttemplatecanbe implementedlocally with respectto thevon Neumannconfiguration.Sincethevon Neumannrestrictionsimulatesa nearestneighbormesh-connectedarray of è÷öUë processors,themethodswe developcan be usedon such machines.Additionally, we shall provide upperboundsonthe numberof parallel stepsrequired.

7.3.10Definition. If Ùo¶"»KÐ$¿ä¸¹óø à ²ùá³úlû

ü à ²ùã'úlû�ý áþã » á ¿ ã , then

1. ÿ����R¶mÙR¶�»KÐ$¿j¸$¸��&è ý »oî�Ó ½FÔ8ð ý á ã ò¹��äñ ,2. ÿ����j¶�Ùo¶�»cÐ�¿)¸�¸��&è ý »oî�ÓÎð ý á ã ò¹��jñ , and3. ÿ������¶mÙo¶"»KÐ$¿ä¸'¸ � è ý »oî�Ô ð ý á ã ò¹��jñ .

336

Page 345: Image Algebra by Ritter

7.3.11 Definition. If ����� ��������� and �������! #"�$%�'&(�*)+�-,/.0�1���2�3 #"�45��&(�6)7�8�:9<;=��� , thenwe say thaty is a minimal point for t.

Since >5? is an isomorphism,�@�0�A�8���6�B� is separableif and only if thereexists polynomialspand q suchthat "DC �8&E�6)7�GF� H�'&H��IKJ%��)7� . It follows from the precedingcorollariesthat if t is separable,then for every ;=�@� thereexistspolynomials 7L and J�L suchthat " 4 �'&(�6)��MF� 7LN�'&H��IKJ�LN�')7� . We shallusethis observationto providea systematicmethodfor factoringany separablecirculant transformintolocal transformswith respectto 4–connectedprocessorarraysandgive upperboundsfor the numberofparallel stepsrequired.

7.3.12 Theorem. Suppose�O�P�A�����6�B� is separableand QRF �'SH�*T'� is a minimal point for t.Additionally, let U FV�����W � "�$ �'&(�6)7� , and XYFV�����Z � "[$ ��&E�6)7� , . If \]FV^BU�_(`KS2�<^ba@Sdc ande Ff^BU�_(`NT8��_Ba�T[c , then the circulant transform gih g=jk � can be computedin at most\lj e j�UmjnX jpo local parallel steps. Moreover,

1. \qj e of thesestepsconsistsof horizontalor verticalshiftsof theentire array byonelocation,2. Uj�X of thesestepsconsistsof at mostoneadditionandonemultiplication(possiblycomplex)

per pixel, and3. oneof thesestepsconsistsof at mostonemultiplication per pixel.

Proof: Sincet is separable,thereexistspolynomialsp andq suchthat " $ �8&E�6)r�sF@ 2�8&H�%I�J%��)7� .By the FundamentalTheoremof Algebra 2��&H�sF�t7�'&uav <wx�8�'&uav <yx�zI5IxI#�8&ua= #{[�}|N~<�]J%�')7��F��x�')�anJ�wx�8�')�anJ�yx�zI5IxId��)�a�J��5�6�where td�<�N�� <wN�N <yN�E�x�5�2�N #{��#J�w��2�5�x�2�<J��=��� .

Define circulant templates���<���<�mwN�2�5�x�+���({'�#�EwN�E�x�5�<�d�d� suchthat >5?�������F� 2�8&H�6��>5?�������FJ%�')7����> ? �8���x�sF��'&ua� d�5� for � Fpo%�<�#�E�x�5�<�dU and > ? �'�(�5��F0�8)�a@J��5� for � Fpo%�<�#�2�5�x�+�%X . Byproperty7.3.3(1), eachof the templates�mwN�E�5�x�<�6�({8�<�Ewx�E�5�x�<�<�+� is a local template. In fact,it shouldbe obviousthat thesetemplateshavethe following geometricrepresentations:

ζp� ζq� ζ-q ζ-p= =

1

1

By our choiceof p and q, �x�d���N�M���x���8���m�N�x���' �� . Furthermore,by Theorem7.3.4, �x���'���M�¡£¢¥¤¦§�¨2© � � ��� § �[ª , which implies that �Y� ¡£¢«¤¬§�¨2© � § ª . Similarly,  l�p­ ¢�®¬§�¨+©   § ª . Hence,by

Corollary 7.3.9, ��� ¡ ­G¯°m±²´³µ ¶�·2¸E¹ ¶�º»´¼½¿¾²OÀµ ¶�·2¸�Á ¶�º»¿¼½ÃÂ�ÄÅzÆ337

Page 346: Image Algebra by Ritter

This equationexpressest as a productof local templates.The numberof stepsrequiredtoimplementthecircularconvolutiontransformÇ�ÈÉÇvÊË�Ì is alsogivenby thisequation;namely,Í Ê@Î/ÊpÏ multiplication stepsand ÐlÊÒÑ shifts.

Q.E.D.

To provide a specific example,supposethat X representsa Ó7Ï�ÔBÕÃÓ7Ï5Ô array and t a rectangularÖ�× Õ Ö%× separablecirculant template. Then ØÚÙiÛ�Ï�ÜdÝ5Ï�Ü�Þ and Ð�ÙbÑ0ÙßÏ�Ü . Hence,if Çáà�âGã , thenÇÒÈ Ç=ÊËnÌ can be computedlocally in 60 parallel stepsconsistingof at most one multiplication andadditionper pixel, one stepconsistingof onemultiplication per pixel, anda total of 28 unit vertical orhorizontal circular shifts. Since the computationin its original form required900 multiplications perpixel, it is clear that the decompositionis far more efficient with respectto the numberof arithmeticoperationsas well as parallelism. Nontrivial examplesof such templatesare the discretizationof theMarr-Hildreth edgeoperators[16].

Anothersystematicmethodfor decomposingseparablecirculant transformsinto local transformsisgiven by the next theorem.This theoremalso avoidscomplexmultiplications.

7.3.13 Theorem. SupposeÌ àpäAÛ-åæÝ6çvÞ is separableand è#éëê5Û�ì(Ý6í7ÞuÙ«è#î�Û�ìHÞ is a polynomial in one

variable ï2ð@àáç . Let Û�ñ8Ý × Þ be a minimal point for t.

1. If ò�ó�ôsõöè2÷ùøùú û6ü[Û'ìHÞ'ýÒÙPÔ�þ for some þ«à]ÿ�� and ÐOÙ�� Í���� ��� þ��@ñ Ý� þ���ñ��� , then thetransform Ç�ÈÉÇvÊËlÌ canbecomputedin Ð Ê@þ ÊáÏ local parallel steps.Furthermore, Ð ofthesestepsconsistof vertical, circular unit shiftsof theentire array, k of thesestepsconsistof at most two real multiplicationsand additionsper pixel, and one of stepconsistsof atmostone real multiplication per pixel.

2. If ò�ó�ôsõöè ÷ùøùú û�ü Û'ìHÞ'ý�Ù¥Ô�þ/ÊpÏ for someþnàáÿ � , thenthe conclusionof part (1) holdswith kreplacedby þ Ê«Ï .

Proof: We canwrite �÷ùøùú û�ü8Û Ì Þ as �N÷3øöú û�ü*Û Ì ÞsÙ�� ������� è � Û'ìHÞ , whereeachè � Û�ìHÞ is a monicquadratic

polynomialwith real coefficientsand � à�å . For eachÍ à�ÿ �� , define � � Ù����! " �# $&% ')(+*,'.-0/�/ . By

property7.3.3(2), each 1 * is a local template. Furthermore,243 ',56/87�-:9<; 2 " ; # $&% '=56/>7�?@-:9A;CBD*�E 2 " F# $G% ' 1 *,/H7�?I- B 9A;CBD*�E 2J3 ' 1 *,/<KTherefore,

5L7M?0N BO*�E 1 *QPSRTVU, wheres is a shift template.

If WYX�Z , thenwe canchooses to be a shift of [ 7]\_^=`�a WcbdZ�e \ b ' W�bdZ /Gf units. If W_ghZ ,then we can let s be a shift of [ 7i\Y^�`�a Z!bjW0e \ b ' ZAbdW /Gf units. In either case,the shiftcan be executedin [ steps.

If the secondhypothesisof our theoremholds,write2 " ; # $&% '=56/ as

2 " ; # $ % '�56/>7�?�k Bl*�E ( * '�-:/Qmon=(0'.-:/ ,whereeach(+*,'.-:/

is a monic quadraticpolynomial with real coefficients,?�pVq

, and(:'�-0/

is

338

Page 347: Image Algebra by Ritter

a monic linear polynomialwith real coefficients. Define local templatesr�s as beforeandsetrutwvyxAz{S|)}0|.~:��� . Then

v { |��6� t�� ~ x<�y�o��s�� z v�� z�� �&� | r�s �Q�_� v { | r � t]� ~ � xA�y����s�� z v { | r�s ���Y� v { | r �<�The remainderof the proof is now identical to the latter part of the proof of part 1.

Q.E.D.

Obviously,an analogoustheoremholdsfor ������|.���F�Y� with }+���@|�~��G�<� t]�@� |��<� �0¡_�¢� .

If £ �V� , let ¤)£I¥ denotethe smallestintegergreaterthan or equal to r. The following is an easyconsequenceof Theorem7.3.13.

7.3.14 Corollary. Supposet is a separablecirculant templateand ¡ t |�¦0�&§¨� is a minimal point for

t. If ©�t ª�«­¬�®°¯²±y³&´ �@µ ¯ � ¶&�· ¸0¹ � º t ª�«y¬F® ¶ ±y³&´ �@µ ¯ � ¶F�· ¸0¹ �>» t½¼_©=¾�¿À¼ÂÁÄÃÅ©�Á ¦ à � à ©�Á ¦ Ã�Æ , andÇ tw¼Y©�¾�¿6¾ÈÁhà º Á § à � à º Á § Ã�Æ , then the circulant transform É]Ê Ë�ÌÍjÎ can be computedinÏ ÌVÐ�ÌÒÑ�ÌÔÓ�Ì]Õ local parallel steps.Moreover, Ï ÌVÐ of thesestepsconsistof vertical andhorizontal circular unit shifts of the entire array, ÑÖÌÒÓ of thesestepsconsistof at most twomultiplicationsand additionsper pixel, and one of stepconsistsof at mostone multiplicationper pixel.

The templatescorrespondingto the quadraticpolynomialsthat result from the decompositionof t asgiven by Theorem7.3.13or its corollary are depictedin Figure 7.3.1.

p� = q� = 1

1

a× 0Ø

a× 1i i a× 0Ø a× 1

Figure 7.3.1 The quadratictemplatesresulting from thedecompositiontechniqueusedin Theorem7.3.13and its corollary.

The rationalefor establishingthe relationshipbetweencirculant templatesand the quotientring ofpolynomials in two variables Ù_ÚÀÛ<Ü�ÝßÞÒàÒá6âAãåäcàÄá6æ is the sameas that for establishingthe relation-ship betweentemplatesandpolynomialsdiscussedin Chapter5; the relationshipprovidesa methodfordecomposingseparablecirculant templatesby factoring (or finding the roots)of correspondingpolyno-mials in one variable. Although finding roots of polynomialscan be a numericallyunstableprocedure,many computerizedtechniqueshavebeendevelopedthat are capableof factoring polynomialsexactly[5, 10, 13]. Thesetechniquescanbe appliedin our methodologyfor developingparallelalgorithmsforcomputingconvolutions.

339

Page 348: Image Algebra by Ritter

7.4 G-Templates

In this sectionwe generalizethe notion of a circulant templateby introducing the conceptof G-templates.The conceptof G-templateswas first introducedby P. Gader[7]. Gader’sgeneralizationofcirculant templatesgrew out of an awarenessof the possibleusesof Cayley networksas modelsforparallel computerarchitecturesand the importanceof translationinvariant transformationsin parallelprocessing;thesegeneralizationswerealsoinfluencedby observationsthat the discreteFouriertransformis relatedto the theory of group representations[2].

G-templatesare translationinvariant with respectto Cayley networks,which are networkswhoseunderlying graphsare the group graphsof some finite group G. Since Cayley networks have beeninvestigatedas possiblemodels for parallel computerarchitectures[15], G–templateshave potentialapplicationsin the field of parallel image processing.

Roughly speaking,a G-template is a templatewhich is translation invariant with respectto adigraph inducedby a neighborhoodconfigurationwhich admits a group structure. In the casewerethe configuration is the von Neumannconfiguration,the groupturnsout to be çéè�ê0ëhì_ê0í andthe setof all G-templateswill be the set of all circulant templateson X. For generalconfigurations,the setofcomplex-valuedG-templatesis a linear algebraover î .

The detailsof this sectionreflectmuchof Gader’sinitial work. For the remainderof our discussionon G-templateswe let X be a finite point set,N will denotea neighborhoodconfigurationon X, G willdenotea finite group (written multiplicatively), and imageswill be complexvalued.

7.4.1 Definition. Let ï�èðIñåòJóyñ­ô6ó�õJõ4õAó�ñåö�÷ be a set of generatorsfor the group G. The Cayleycolor graph, or group graph, of G with respectto ï is the graph ø�ùßú.û�ü�èýú.þ�óGÿ ü , whereþ è û and ú � ó��<ü��Vÿ � � ñ�� ï suchthat � ñ� è�� .

If ú � ó��<ü�� ÿ and � ñ � è � , thenwe saythat ú � ó��<ü is coloredby ñ � , or that ú � ó��<ü hasthecolor ñ � .7.4.2 Definition. An automorphismof a digraph ø èuú.þ�ó&ÿcü is a permutation���0þ�� þ with

the property that ú � ó��<ü��Òÿ � ú�� ú � üFó���ú��<ü�ü��Òÿ .

A color-preservingautomorphismof a Cayleycolor graph ø�ùßú.û ü è]ú�þ�ó&ÿ ü is anautomorphism� of the digraph ø ùAú�û�ü with the additional property that for every edge ú � ó��yü , ú � ó��yü andú�� ú � ü&ó�� ú��+ü�ü have the samecolor.

It is not difficult to ascertainthat the set of color-preservingautomorphismsof ø ùßú.û ü is a groupundercompositionwhich is isomorphicto G. Suchan isomorphismcanbedefinedby usingthemappingrule ñ�� ��� , where ñ��Ôû and ��� is the automorphismof ø�ùßú.û ü definedby �����]ñ � . Note that thisimplies that the groupof color-preservingautomorphismsis the samefor everygroupgraphconstructedusing the generatingsetsof G [3].

7.4.3 Definition. Let ø ò and ø ô be digraphs. We say that ø ò is isomorphicto ø ô if and onlyif thereexists a one-to-oneand onto function � �>þ�ú�ø�òJü!� þ�ú�ø ôIü with the property thatú � ó��yü��hÿ�ú�ø òIü"� ú#�6ú � ü&ó��6ú$�<üGü���ÿ ú�ø ôJü .

340

Page 349: Image Algebra by Ritter

In Section5.8 we defined the digraph %'&�(*) of a neighborhoodconfigurationN on X. If %'&�(�)is isomorphic(as a digraph) to %,+-&�.!) for somegroup G and generatingset / , then the isomorphismbetweenthe digraphsinducesa groupstructureon X which is isomorphicto G. In order to demonstratethis we shall needthe following definition:

7.4.4 Definition. Thepair &�0 12( ) is saidto simulatethegroupG if andonly if %'&�(�) is isomorphicto %!+3&�.!) for somegeneratingset / .

If &�0 1�( ) simulatesG, then we assignto eacharc in %'&�(*) the samecolor as the associatedarcin %!+4&�.!) .7.4.5 Theorem. If &�0 1�(5) simulatesG, thenthere existsa binary operation 6 on X suchthat &�0 1-6)

is a group which is isomorphicto G.

Proof: Since &#0 1�(7) simulates G, there exists a one-to-oneand onto function 8 9: &�%'&�(�)�)<; : &�%!+3&#.!)#) for somegeneratingset / of G. By definition of the respectivedigraphs,

: &#%'&�(�)=)?>@0 and: &�%!+3&#.!)=)A>@. . Hence, 8B9C0D;E. .

Definingthedesiredbinaryoperation6 by FG6�HJIK8MLCNO&#8M&PFM)RQS8�&�HT)#) , we havethat 8�&�FU6VH�)M>8�&�F�)�Q�8�&$HT) . To checkthat &#0 1C6) is indeeda groupis a routinematterand,therefore,omitted.

Q.E.D.

Unless otherwisementioned,we shall identify X with G whenever &�0 1�(5) simulatesG. Also,wheneverwe write X asa linearly orderedset 0W>YXZF\[]1^F N 1\_S_Z_314Fa` L3NZb , we shall assumethat F\[c>ed&$f�gihgj1V8�&�F [ )M>Kdk) , whereedenotestheidentityof G. Finally, notethatif lm9�.n;o. is anyone-to-oneandonto function, thenthereexistsa correspondingfunction plm90q;r0 definedby pl�&�F�)s>K8 L3N &$l�&�8�&#FM)#)�) .Conversely,givena one-to-oneandontofunction plJ90�;r0 , thenthereexistsa correspondingfunctionlt9V.u; . defined by l�&$vw),>x8Gy ply�8 L3N &zvw)z{Z{ . Pictorially we have the following two commutativediagramsrepresentingthesecases:

X|

X|

G G

G G

X X

and} α

β

α-1

β

αβ

α-1

β

For this reasonwe shall use ~ to denoteeither map.

7.4.6 Definition. Suppose��� ��� � simulatesG. A template�,�������?� � is calleda G-templateif andonly if for everycolor-preservingautomorphism~m������� , theequation�O������P��~M�P�M���s��� � �����holds. We denotethe set of all G-templateson X by �!�������'� .

341

Page 350: Image Algebra by Ritter

The setof G-templatesis, in a sense,the sameas the setof templatesthat are translationinvariantwith respectto the group graph �!�3���c� or �'����� sincecolor-preservingautomorphismsare essentiallytranslationswithin the group.

The next theoremshowsthat G-templatesare indeedgeneralizationsof circulant templates.

7.4.7 Theorem. If ���K a¡<¢G C£ andN denotesthevonNeumannconfiguration,then ���7¤��¥� simulatesthe group �¦�e C¡n¢¥ a£ (written additively). Furthermore, �!��§G¤��'���e¨!��§G¤��'� .

Proof: Let ©B��ªk��«¤=¬��2¤w��¬^¤S«Z��¤C��­¯®°«¤�¬k�=¤C��¬^¤²±'®³«´�=µ , and ¶n·\�o¸¹� the identity map.Thus, ¶�·�º��#�'�����#�»¸ º¼�#�,�-���!�=� is one-to-oneand onto. Hencewe needto show that��½T¤�¾���¿BÀ¼���'�����#�xÁ �P½V¤=¾���¿�À¼�#�,�4�#�!�=� .Let ¾��¹��Â�¤ÄÃ^��¿W� and ��½T¤=¾Å�Æ¿WÀ¼���'�#�¥�#� . Then ½�¿Ç�*�$¾T� or, equivalently, ½o¿ª����ÂCÈK«´��­<É´Ê�­ ¤´Ã-��¤C��Â=¤C�ËÃGÈK«Ì��­UÉ´Ê�±Í��µ . Therefore, �P¾5® ½���­'É´Ê4��­¥¤=±Í�U¿e© . But this saysthat ¾n�W��½UÎ�Ï-��­'É´Ê^��­ ¤�±Í� for some Ïп © . This implies that �$½V¤=¾��!¿BÀ¼���!�3�#�!�=� . Theconverseis just as easyto show. Therefore, ���¥¤��7� simulatesG.

To verify that �!��§�¤��'�Ñ�t¨!��§�¤��'� , recall that the set of all circulant translationson X is agroup undercompositionwhich is isomorphicto �W�Ò��� ¤-Î�� (Theorem7.2.2). Also, G isisomorphicto the groupof color-preservingautomorphismsof �!�3�#�!� for any © ; this followsfrom the assertionmadeimmediatelyfollowing Definition 7.4.2. Therefore,

�=Óc���7�2¤wÔ�MÕ ���¥¤wÎ��V�K�nÕ �,�^���!��¤where the symbol Õ is interpretedas “is isomorphicto.” Thus, a mapping Ö¯·M�׸ � isa color-preservingautomorphismif and only if Ö is a circulant translation. By definition,Ø ¿ ¨!��§G¤����¥Á ØSÙ�ÚÜÛÝ ��ÖT�$½��=�s� Ø Û �P½M� holds Þ-½V¤4¾³¿<� . Therefore,�!�#§G¤��'�V�K¨!��§G¤��'� .

Q.E.D.

The theoremestablishesthe algebraicstructureof the setof G–templatesfor the specialcasewhereN is thevon Neumannconfigurationon  C¡�¢� a£ . In this case�!��§�¤��'� is identicalto thering of circulanttemplates.Thenext theoremrevealsthealgebraicstructureof thesetof G-templatesfor thegeneralcase.

7.4.8 Theorem. �,��§�¤��'� is a linear algebraover § .

Proof: Let ßk¤ Ø ¿ �!��§�¤��'� . Since templateaddition is definedpointwise, it is clear thatßÎ Ø ¿��!��§�¤��'� . The zero template à�¿��!��§�¤��'� . Hence,using Theorem4.9.3, we havethat ���!��§�¤��'�=¤CÎc� is a commutativegroup.

Sincescalarmultiplication is alsodefinedpointwise,we havethat á Ø ¿��,�#§G¤��'�UÞwá,¿�§ . Itnow routine to checkthat �!��§�¤��'� is a vectorspaceover § . This showsthat the first axiomof a linear algebrais satisfied(Section3.9).

342

Page 351: Image Algebra by Ritter

Let âTã4ä�ãæåUç è , é a color-preservingautomorphismof êUë#ì í , and îcï ð�ñò�ó . Note that

ó]ô�õ÷öæø ë�â�ísï ó öVù éTú3ûZë�â�ízü�ýÌþwÿYð��-ë�éTëPå4í�í�ïKð ô ��� õ � ø ëPå4í��Thus, since é ú3û is onto, we have

î ô�õ�öø ë�éTëPå4í�íÅï ���� ð��4ë�é ë�å4í�í ó ô�õ öø ë�â�íÅï ���� ð ô �� õ � ø ë�å^í ó ö ù é ú3û ë�âMí üï �� � ð � ë�å^í ó ö ë� 7íMï"î ö ë�å4í��

Therefore, î»ïtðcñòJó ç��!ë��Gã�è'í , which showsthat �!ë��Gã�è'í is closedundermultiplication.According to Eqs. 5.1.1, template multiplication is associativeand both left and rightdistributive over templateaddition. This provesthat the secondand third axiomsof a linearalgebraare satisfied.

The one-pointunit template �*ç ù � ü is clearly an elementof �!ë���ã�è'í . In view of thepointwise multiplication of a templateby a scalar,it is also a simple routine to check thatë�� ó íVñò ð ï ó ñò ë��OðÌí�ï��Zë ó ñò ðÌí���� ç�� . This verifies that the remainingtwo axioms of alinear algebraare also satisfied.

Q.E.D.

This establishesthe fundamentalalgebraicstructureof generalizedcirculant templates.In the nextsectionwe shall delve deeperinto the algebraof thesetemplates.

7.5 Group Algebras and G-Templates

Group algebraswere first discussedin Section 3.10. In this sectionwe will show that the setof all G-templatesfor someconfiguration N is isomorphic to the group algebraover � of the groupcorrespondingto N.

Group algebrasarise quite naturally in the study of linear representationsof groups. Theserepresentationsfurnish anotherdescriptionof the set of G-templates.They also provide necessaryandsufficient conditionsfor determiningthe invertibility of G-templates.

The topic of group representationshasbeenin existencesincebeforethe turn of the centurywhenFroboeniusfirst definedgroupcharacters[12]. Sinceits earlyformulation,this topic hasseenapplicationsin physicsandchemistryaswell as in grouptheory. It is fascinatingto realizethat a subjectdevelopedat the turn of the centuryhasnow applicationsin the theoryof parallel computing.

Let X bea finite point setthathasa multiplicativeoperationwhich providesX with anabeliangroupstructure.Let G denotethis groupand let � ï������ 4ë�è5í . The elementsof the group algebra � ë��!í areformal sumsof the form ! ï#" ú3û� $ %'& � $ â $ ã (7.5.1)

343

Page 352: Image Algebra by Ritter

where (*),+�- and ./)0+�1 (seeSection3.10).

The map 2�34165�708:9 1<; definedby2=5�>?84@�5�./A�BC.EDB*FGFGF'BC. ;GH DI8�Bwhere > is given by Eq. 7.5.1, is clearly one-to-oneand onto. Also, ifJ @ ;GH DK )ML'AON )P(*)and Q�+R1 , then 2=5�>TS J 8U@�2WV ;GH DK )PL'A . ) ( ) S ;GH DK )PL'A4N ) ( )YX@�2WV ;GH DK )PL'A 5Z./)�S N )Z8[(\) X@]5Z. A S N A BC. D S N D B\FGFIF^BC. ;GH D S N ;GH D 8@]5Z.�A�BC.�DB\FGFIFCBC. ;GH DI8\S_5 N AB N DGB\FIFGF^B N ;IH D�8@�2^5�>?8=S`2=5 J 8and QOaG2=5�>?84@bQOaI5�./A�BC.EDB\FIFGF'BC. ;GH DI8@�5ZQ�./A�BcQ�.EDB\FIFGFCB'Q�. ;GH DI8@b2WV ;GH DK )ML'A 5�Q�./)�8Z(*) X@b2WV^QOa ;GH DK )PL'A ./)�(\) X@b2^5�Q�>?8cdThis showsthat h is a vector spaceisomorphism.According to Theorem4.4.3, the vector space1 ; isalso isomorphicto 1fe . We have,therefore,establishedthe following result:

7.5.1 Theorem. 1g5�-h8 and 1 e are isomorphicvectorspaces.

We let i�3'1g5�-h8f9j1 e denotethe naturalvector spaceisomorphismso that if > is given by Eq.7.5.1, then i*5�>?86@lk�+m1 e is given by k*5Z( ) 86@n. )po�q @srtB^u�B\FIFGF^BvTw#u . For the remainderof thissectionwe shall write imagesin termsof their vectorrepresentationkx@y5�k*5Z( A 8zB{k\5�( D 8�B=FIFGF^B�k\5[( ;GH D 8|8 .

Clearly, 165�-}8 and 1 e are not isomorphic as algebras;image multiplication, which is definedpointwise,doesnot correspondto groupconvolutionsunder f. However,we can definea new producton 1 e that will turn 1 e into an algebrawhich is isomorphicto 1g5�-h8 . Considerthe groupconvolution>h~ J @ ;IH DK )ML'Ap�� K���� ��� L ��� ./� N��I�� ( ) @m�0d

344

Page 353: Image Algebra by Ritter

The element � is of form �����G�����P�^��� ���\� , where � � � ��G��� ��� � ���¡ £¢¡¤�¥ , while ¦\§[�\¨,�R©pªm«O¬ is given by©�§ � � ¨­� � � . But� � � ®�G�|� �� � ���  £¢¡¤ ¥ � ®�G�|� �� � ����¯ § � ¢ ¨�°?§ � ¥ ¨±�²®�G��³ ¬ ¯ § � ¢ ¨Z°µ´ �\��¶�� �C�¢�·¹¸since � ¢ ¶I� ¥ � �\�»º � ¥ � � �c�¢ ¶I�\� � �\�^¶G� �c�¢ . By definingthe convolutionproductof two elements¯ ¸ °¼ª­« ¬ by ©0� ¯0½ ° suchthat ©�§ �*� ¨?� �¾{³ ¬ ¯ §|¿À¨Á°W �\��¶ ¿ �C�Gà , we havethat ¦*§�Ä ½4Å ¨4�b¦*§�Ä?¨ ½ ¦*§ Å ¨ .It now follows that the algebra  « ¬ ¸CÆ0¸ ½ à is isomorphicto the groupalgebra«6§[ÇȨ . This isomorphismprovidesus with the convenienceof letting the elementsof «f¬ representthe elementsof «g§�Ç0¨ .7.5.2 Example: Let G denotethe group ÉÊ�RË^ÌlÍ»Ë^Î with the operationof addition ÏTÐ�Ñc§ZÏ ¸ÓÒ ¨ .

We makeX into a multiplicative group by defining�\�^¶z� ¢ � � ¥ º § �\� Æ � ¢ ¨�ÏTÐÑc§�Ï ¸|Ò ¨4� � ¥4ÔIf ¯ ¸ °lª#«f¬ , then ©Õ� ¯h½ ° is given by©{§ �*� ¨4� ®�G��� ��� � �/� ¯ § � ¢ ¨�°?§ � ¥ ¨±� ®�G��³ ¬ ¯ § � ¢ ¨�° ´ �\��¶z� �C�¢ · ¸where � � ¶G� �c�¢ �Ö§ � �^× � ¢ ¨�ÏxÐÑc§�Ï ¸|Ò ¨ . Equivalently,©{§ �*� ¨4� ®¾�³ ¬ ¯ §�¿À¨�°U§�§ � × ¿À¨ZÏxÐÑt§�Ï ¸�Ò ¨|¨ ÔThus, ¯h½ ° is a circular convolution.

7.5.3 Lemma. Suppose§�É ¸ÓØ ¨ simulatesG, Ù*Ú,ÛEÉÖÜÝÉ denotesthecolor-preservingautomorphismcorrespondingto Þmª�É , and ¯ ª�« ¬ . If ߧ ¯ ¨ÈªàÂ[« ¬ à ¬ denotesthe parametrizedtemplatedefinedby ߧ ¯ ¨âá^§ � ¨±�Rã ¯ § � ¨ ä[¦måÕ� � �¯ Â[Ù �C�á § � ¨ à ä[¦må_æ� � � ¸where �\� representsthe identity of X, then ߧ ¯ ¨ is a G-template.

Proof: Let � ¸ å ¸ ÞçªpÉ . Sincethe map ÞÈè éÀê is a groupisomorphism,we havethaté?ë�ìíîzïñð�ò�ó é±ê óÁôÀõ�õ4ö é ï÷í î ï÷ð�òYò�øù ó éÀê óZô?õ�õ'úTherefore, é ëCìíî�ïûð�ò ó é ê óZô?õ|õ±ö�ó é ê óÁüýõ�õ ëcìOþ é ê ó[ôUõ±öÿó���ü?õ ëCì ��ô»ömü ëCì ô}ö é ëCìð ó�ôUõ��and � ó��*õ íî�ïûð�ò ó é ê ó�ô?õ|õÀö�� � é ëCìíî|ï÷ð�ò ó é ê ó�ôUõ�õ�pö��� é ëCìð ó[ôUõ ö � ó��\õ ð ó[ôUõcú

Q.E.D.

345

Page 354: Image Algebra by Ritter

7.5.4 Theorem. If ��������� simulatesG, then ����������� is isomorphic(as an algebra)to ������� .Proof: Let � �!�����"�#��� and define $&%'�����"�#���)(*������� by

$+���,�.-/�0�21435�7698,���+�:1432�06<;2���'=>=2='�?�:1435��6A@>B�;2�C�EDFor each FG- �0F9��6 8 �H�IFJ�06 ; �H�K=>=2='�LF9��6 @>B�; �C�M�N�O�P��� , let �,�PF9� denote the correspondingparametrizedG-template guarantiedby Lemma 7.5.3. By definition of $ we have that$+���Q��F9�P�R-SF . This showsthat $ is onto. In order to show that $ is one-to-one,supposethat $+���Q�)-T$+��U,� . Again by definition of $ , � 1 35��6JV��W-/U 1 3:��6JV0� for each XY-[Z?�J\]�J=>=>=A�_^R`a\ .Let bN�c� and d a color-preservingautomorphismwith the property d.��6 8 �e-fb . Then�:g'�0d.��6JV��C�h-/U5g���d.��69V��P� for each Xi-jZk�E\]�J=>=>=A�_^R`a\ . Since d is an automorphism,we havethat �:g'��6.��-/U5g?��6.�ml�6!�&� . Sincey wasarbitrarily chosenthis showsthat �n-/U .We have left to show that $ preservesthe algebraicoperations. Since addition and scalarmultiplication are definedpointwise on both �o���"�#��� and ������� , the equations$+��UYpq�]�o-$+��UQ�<p$+���,� and rts,$+���,��-c$+��rYs:�,� follow immediately.

Let U]�?�o�u�����"�#��� , F�-a$+�PU,� , vw-x$+���,� , yn-�opz U , {|-$+�Py]� , and }w-x$+��UQ�K~i$+���,� . Since

�>�A��6.�.-� 1 3:�����L�,�C��6.�#��-� 1 3L�6us,� B�;�� -avO�6�sQ� BK�>�and U 1 3 �#����-�F9�P��� , we have that

{+��6.��-ay 1 3 ��6.�.-G��+�2� �>�A��6.��U 1 3 �#����-���+�,� v � 6us,� B�;:� FJ�C�������+�>�R� �P�����)��u�,�����:  �a¡ ���.�£¢Thus, ¤+��¥m¦§!¨ � � ¤+� ¨ �L©J¤+��¥,� . However,sinceG is a commutativegroup,we haveby Theorem3.10.1 that ¤+� ¨ �J©Y¤+��¥,� � ¤+��¥,�<©Y¤+� ¨ � and, therefore,¤+��¥m¦§ª¨ � � ¤+��¥,�<©Y¤+� ¨ � .

Q.E.D.

7.5.5 Corollary. If s and t are G-templates,then¨ ¦§ ¥ � ¥9¦§¨ .

Note that if « �/¬'­[®&¬K¯ , then ¤ is identical to the map °2± definedin Section7.3.

At theendof Section3.4 we mentionedthateveryfinite groupG is isomorphicto somesubgroupof² ¯ or, equivalently,to somesubgroup«�³ of²E´

, the groupof all permutationsof G. This fact, knownasCayley’sTheorem,allows for the representationof G in termsof « ³ . Thestudyof grouprepresentationshasbecomea formal theory in its own right. The theoryof representationsis closely connectedwiththe theory of algebras.It dealswith the problemof mappingan abstractgroup, ring, or group algebrahomomorphically(i.e.,without destroyingthealgebraicstructure)into themoreconcretegroupor ring ofmatricesor (equivalently)lineartransformationsof a vectorspace.For our purposes,this theoryprovidesanotherdescriptionof G-templatesin termsof the representationof the groupalgebraµ���«�� .

346

Page 355: Image Algebra by Ritter

7.5.6 Definition. A linear representationof a group G over ¶ is a group homomorphism·¹¸�ºS» ¼!½,¾+½]¿ ¶OÀ for someinteger Á�ÂNà . A linear representationof the group algebra¶ ¿�º À over ¶ is an algebrahomomorphism·[¸.ºÄ» ¼Å½4¾+½]¿ ¶�À ; that is, · preservessums,products,and scalarmultiplication.

Suppose· is a representationof G and e denotesthe identity of G. If ¼ ƪÇ,È+ÉAÊIËQ¿�· À and ÊÌÆźsuch that ·�¿0Ê À Í ¼ , then

¼*Î>·�¿PË À�Í ·�¿0ÊÏÎ>Ë À.Í ·�¿0Ê À�Í ¼ Í ·�¿PËWÎHÊ À�Í ·�¿�Ë À Î:·�¿�Ê À<Í ·�¿�Ë À Î>¼ÑÐTherefore, Ò ½ Í ·�¿�Ë À . Similarly,

Ò:ÓRÍ ·�¿PË À�Í ·OÔÕÊÏÎHÊ�Ö�×:Ø Í ·�¿0Ê À Î>·OÔÊ'Ö�×�Ø�Ù?ÊeÆuºÚwhich showsthat ·OÔ7Ê Ök× Ø ÍfÛ ·�¿�Ê À7Ü Ö�× . This essentiallyshowsthat Ç,È+ÉkÊ�Ë,¿P· À is a group. The groupÇ,È+ÉkÊ�Ë,¿P· À is referredto as the k-dimensionallinear representationof G.

The map · is only a homomorphism.We now turn our attentionto isomorphicrepresentations.Asbefore,we let G denotethe multiplicative abeliangroup Ý�ÍßÞ>àJá Ú à × ÚJâ2â>â�Ú àAã Ö�×2ä with identity à9á . Foreach Á Æ�å ã , let æ ½ Æwç ã denotethe permutationdefinedby the rule æ ½ ¿�è À�Íêéìë àAí Î à ½ ÍxàJî .7.5.7 Definition. A right regular representationof º Í/Ý is a representation·¸+º¹»ï¼ ã ¾ ã ¿ ¶�À

of the form ·�¿ à ½ ÀaÍ ðJñPò . A right regular representationof ¶ ¿�º À is a representation·�ó�¸ ¶ ¿�º À » ¼ ã ¾ ã ¿ ¶�À of the form

· ó ¿7ô9¿ à á À ÚIô9¿ à × À ÚKâ2â>â'Ú?ô9¿ à ã Ök× ÀPÀ�Í ã Ö�×õ î÷ö á ôJ¿ à9î�À ·�¿ à9î0À Úwhere · is a right regular representationof G.

Notethat for a right regularrepresentationof a groupG thecardinalityof G equalsthedimensionalityof therepresentation.In fact, right regularrepresentationsareisomorphisms.Notethatthereis a differentright regularrepresentationof G for every different orderingof G [8].

According to our definition, · ó ¿�ô ÀÏÍ ã Ö�×øîùö á ôJ¿ à î À ·�¿ à î À�Íã Ök×øî÷ö á ô9¿ à î ÀPð ñCú . Thus, it is clear that any

representation· of G can be extendedto a representation· ó of ¶ ¿Pº À . In fact, G canbe consideredtobe embeddedin ¶ ¿�º À via the map àJîWû ü+î÷ý × , where ü+îùý × representsthe ith elementof the standardbasis. Hencewe candefine · ó ¿ ü+îùý × ÀhÍ ·�¿ àJî0À andextendlinearly. It canbe shownthat multiplicationis preserved[11]. Henceforth,we usethe samenamefor eitherrepresentation;that is, we take · ó Í · .

7.5.8 Theorem. Let ÝþÍìÞ2à á Ú à × ÚJâ>â2â�Ú à ã Ö�× ä and ÿ ¸Eº�¿ ¶ Ú Ý�À » ¼ ã ¾ ã ¿ ¶OÀ be definedrelative tothis ordering. If · is a right regular representationof ¶ ¿Pº À , then ÿxÍ · ��� .

The function ÿ ¸'º�¿ ¶ Ú Ý�À »*¼ ã ¾ ã ¿ ¶�À denotesthe restrictionof the isomorphismÿ ¸hÔ ¶�������� ��� ������definedin Section4.9. The conclusionof the theoremis that the diagram

347

Page 356: Image Algebra by Ritter

G(X,C) C(�

G)

M�

(C)p � x p

ξ�

α�ψ�

Figure 7.5.1

is a commutativediagram.

Proof: Let ���! �"�#%$ , &('*),+-".�/$ , 01"2�3$�)547698:";�/$ , and <=">01".�/$.$?)@">A.BDCE$ . Then

A2BFCG)H01"2�3$>IKJ";L/B;$M)N01";�/$>IKOQP2R 6S8 ">L3B2$2TU)H��VEL/B9WL 6S8C5XZYNow let &['%)5"�\]BDCE$ , ^/_�`=) VbadcfegBDC X , andsupposethat ahciegBFC )@j for sometriple "�kml>n7lpoh$ . Thenq e "�kp$r)sn and LdCSWtL3u%)HL3v . If we alsohaveadcfwFgBDC )xj for somel, then LdCSWtL9y/)zL/v and,therefore,L{u|)HL 6d}~ W�L/v�)�L w . This implies that o()�� . Since

+-";�/$r)N� 6S8� Bf��� �/">L B $�^ _p� )5& ' lwe have \]BDC�)x�/";L e $,� a cfegBDC )�j�� LhC�WEL e )�L3B . Therefore,

\]BDC�)H�=V�L3B9W�L 6�8C X )z0�";�/$ IEJ "2L3B2$r)�A;BDCand <=">01"2�3$.$-)N&['�)z+-"2�3$M)z+�P243P>4 6S8 "2�3$;T�T=)5+���47"201";�/$.$ Y

Q.E.D.

This concludesour algebraiccharacterizationof generalizedcirculanttemplates.In the next chapterwe shall examinesomepracticalapplicationsof thesetheoreticalconsiderations.

348

Page 357: Image Algebra by Ritter

Bibliography

[1] H.C. Andrews.ComputerTechniquesin ImageProcessing. AcademicPress,New York, 1970.

[2] L. Auslander and R. Tolmieri. Is computing with the finite fourier transform pure or appliedmathematics?Bulletin of the AMS, 2(6):847–894,November1979.

[3] M. Behzad,G. Chartrand,and L. Lesniak-Foster.Graphsand Digraphs. WadsworthInternationalGroup, Belmont, CA, 1979.

[4] R. Blahut. FastAlgorithmsfor Digital SignalProcessing. Addison-Wesley,Reading,MA, 1985.

[5] J.H. Davenport,Y. Siret, andE. Tournier.ComputerAlgebra. AcademicPress,1988.

[6] P.J.Davis. Circulant Matrices. JohnWiley and Sons,New York, NY, 1979.

[7] P.D.Gader.ImageAlgebraTechniquesfor Parallel Computationof DiscreteFourier TransformsandGeneralLinear 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, andM. Morf. The factorizationandrepresentationof operatorsin thealgebrageneratedby toeplitz operators.SIAM J. Appl. Math., 37(3):467–484,December1979.

[10] E. Kaltofen.Polynomialtimereductionfrom multivariateto bivariateto univariateintegerpolynomialfactorization.SIAM J. Comput, 14:469–489,1985.

[11] R. Keown. An Introductionto GroupRepresentationTheory. AcademicPress,New York, 1975.

[12] W. Ledermann.Introductionto GroupCharacters. CambridgeUniversity Press,Cambridge,1977.

[13] D.R. Musser. Multivariate polynomial factorization. Journal of the Association for ComputingMachinery, 22(2):291–308,April 1975.

[14] A.V. OppenheimandR.W. Schafer.Digital SignalProcessing. Prentice-Hall,EnglewoodClif fs, NJ,1975.

[15] H.B. Sexton.Cayleynetworksasparallelcomputerarchitectures.In CooperativeResearchAssociate-shipstenableat theNavalOceanSystemsCenter. NationalResearchCouncil,Washington,DC, 1986.

[16] S. Winograd.On computingthediscretefourier transform.Math.Comp., 32:175–199,January1978.

349

Page 358: Image Algebra by Ritter
Page 359: Image Algebra by Ritter

CHAPTER 8INVERSION OF TRANSLATION INVARIANT TEMPLA TES

Inverseproblemshavecometo play a centralrole in modernappliedmathematicssuchasmathemat-ical physics,in imagingareassuchas computerizedtomography,seismicimaging, remotesensing,andimagerestoration.The importanceof the Fourier transformwould be drasticallyreducedwere it not forits invertibility. In this chapterwe are concernedwith the inversionof transformsof form ��� ����!� ,wheret belongsto theclassof generaltranslationinvarianttemplates.RosenfeldandKak [17] explainedthe equivalencebetweenthe Wiener filter, leastsquaremethods,and the problemof inverting a blockcirculantmatrix with circulantblocks. In 1973,Trapp[18] showedhowthediscreteFouriertransformcanbeusedto diagonalizeandinvert a matrix that is eithercirculantor block circulantwith circulantblocks.While the algebraicrelationshipbetweencirculantmatricesandpolynomialswascompletelyformulatedby Davis[2], it wasGaderandRitter [5, 16] who establishedtheconnectionbetweenpolynomials,circu-lant templates,andG-templates.A consequenceof this connectionis that a circulant templatet definedon an ����� arrayis invertible if andonly if its correspondingpolynomial ������ /¡b¢�£ hasthe propertythat� ��¤¥M¦§ ¡ ¥�¨©�ª5«¬®­ for all ­�¯z°�¯@±�²N³ and ­�¯@´!¯ � ²z³ (Section8.2).

8.1 The Radon Transform

Our interestin the Radontransformstemsfrom the role this transformplays in the invertibility ofG-templates.Prior to examiningthis role, we providea brief overviewof somebasicconceptsassociatedwith this transform.

In the classicalsetting, the Radon transform involves the evaluationof integrals of real-valuedfunctionsof n variablesover ��� ²H³ £ –dimensionalhyperplanes.Techniquesfrom Radontransformtheoryhavebeensuccessfullyemployedin medicalimaging(particularlycomputeraidedtomography),in radioastronomy,and in non-destructivetesting. Less well-known are applicationsin representationof Liegroupsand applied statistics[6, 10, 1, 4].

For functionsof two variables— which areof major interestin imageprocessingapplications— theRadontransformreducesto a line integral. For a continuousfunction ��µ�¶�·�¸¹¶ , the Radontransformof a, denotedby º��.�/£ , canbe found by integratingalonga line L given by the normalequation

» ¬  �¼½Q¾S¿*�À¢�¾2ÁÃÂ�¿%¡ (8.1.1)

where ¿ denotesthe anglebetweenthe x–axis and the line perpendicularto L , and »!Ä ­ denotesthedistancefrom the origin to L . Figure 8.1.1 illustratesthe normal form of L .

351

Page 360: Image Algebra by Ritter

ρ

φÇ

L

Figure 8.1.1 The normal-formrepresentationof L .

The parametricequationsfor L are given by

È%É�ÊÌË!Í�Î2ÏÃÐ�ÑÒÓ ÎSÑ É�ÔZË!Í ÒÓ ÎÕÑË�Î2ÏtÐÖÑ (8.1.2)

Solving for x and y, we obtain

Ô É Í ÒÓ ÎÕÑ]Ë È Î2ÏtÐ�ÑÊ É Í×Î2ÏtÐÖÑ*Ø È?ÒÓ ÎSÑ (8.1.3)

Therefore,the Radontransform Ù�Ú;ÛdÜ is given by the integral

Ý ÙÞÚ;Û/Üàß>Ú Í9áÑ Ü É âãä âÛ/Ú Í ÒÓ ÎÕÑ]Ë È Î2ÏtÐÖÑåá�Í×Î2ÏtÐÖÑ]Ø È?ÒÓ ÎSÑ Ü�æ È (8.1.4)

8.1.1 Example: Let Û5çMèMé�ê è be definedby

Û/Ú;ëMÜ É®ì�í Ïïî!ð ë ð=ñ íò Ïïî!ð ë ð=ó í352

Page 361: Image Algebra by Ritter

Graphically,a representsa disk of radius1 (Figure 8.1.2.)

xÆyÅ

1

1

1

Figure 8.1.2 The graph of a.

Since õ/ö;÷åø�ù@ú for all pointsx outsidethe circle of radius1 we have

û ü ö;õ/øþýtö;ÿ�� � ø�ù ��� � õ/ö;ÿ���� � ��� ���� � ��ÿ����� ����� ��� � ø�� �ù � � ��� ��� � � ��� �

� � ù"!$# % � ÿ'&(�where ú*) ÿ+),% .The limits of integrationarefound by substitutingthe right sideof Eq. 8.1.3 for x andy in theequation -÷.- & ù0/ & �"1 & ù2% . Substitutionyields ÿ & �"� & ù3% and, hence,

� ù54 # % � ÿ'&(seeFigure 8.1.3).

353

Page 362: Image Algebra by Ritter

ρ

φÇ

L

1- ρ2

1- ρ26

O

-

Figure 8.1.3 The limits of integrationon the line L .

In practice,the Radontransformof an imagea is givenempiricallyby sensors.Thesesensorscountthe numberof photonsthat areemittedfrom an x-ray sourceandpassthroughsomematerialbody suchas humantissue. Different tissuedensitieswill absorbdifferent amountsof photons. By knowing theamountof photonenergy emittedby the sourceversusthe amountof energy receivedby the sensor,anapproximationof 798;:=<?>A@B:ACED F?> is obtainedfor afixed positionof thex-ray sourceandsensor.Specifically,

7G8H:A<?>=@=:=C�DIF�>KJ"L=M�NPO�LQMERSD (8.1.5)

whereA representsthe numberof photonsthat aredetectedby the sensorandC denotesthe numberofphotonswhich areemittedfrom the source;i.e., C correspondsto the numberof photonsthat would bereceivedby the sensorif no obstructionwere present. In actual tomographicimaging, the value C isusually precalibrated.The typical methodby which data is collectedfor transversesectionimaging incomputertomographyis indicatedin Figure 8.1.4.

The goal in computertomographyis to reconstructthe imagea from the measurementsOTL=M?:ARVUWNX> .Since 7G8H:�<Y>=@Q:AC�D FZ> representsthe amountof energy absorbedalongthe line L , it follows from Eq. 8.1.4that <Y:A[\> correspondsto the absorptioncapacityof the tissueat location x. This absorptioncapacitycorrespondsto the tissuedensity at location x.

354

Page 363: Image Algebra by Ritter

ρ

φÇ

z = a]z = b]

source^

sensor^

region to be_reconstructed_

Figure 8.1.4 Datacollectionfor computertomography.The imagea to be reconstructedis rectangularand containsthe areaof obstruction(shadedarea)suchasa crosssectionof the human

body. The supportof the imageto be reconstructedcorrespondsto the areaof obstruction.

In the formulationof Eq. 8.1.4 thereis an importantdifferencebetweenthe domainsof the imagefunctiona andthefunction `Ha�bYc . In polarform, theimagefunctiona is definedfor pairsof realnumbersa�dfe g�c which representthe polar coordinatesof points in the a�h?ejikc –plane(Figure8.1.5). The pair of realnumbersaAl�e m?c in the domainof `HaAb?c on the otherhand,is not to be interpretedaspolar coordinatesinthe anhYeoipc –plane.Roughlyspeaking,theoperator associateswith a functiona over a�dqeogrc –spaceanotherfunction `saAb?c over aAl�eomZc –space,whereeachpoint aAl�eomZc in aAl�eomZc –spacecorrespondsto a uniqueline L(determinedby a�lEeomZc ) in a�h?eoi�c –space.The basicrelationbetweena�dreogqc and a�l�eom�c is given by

lutvdxwy�z�aAm|{Sg}c (8.1.6)

355

Page 364: Image Algebra by Ritter

ρ

φÇ

LO

(r, θ)

θr

Figure 8.1.5 The relationshipbetween ~A�q� ��� and ~���� �?� .It is easilyverified that ~��q�o�r������� ���K���}�q�����S�o�f�Y���x~A�k���'�A� . Hencethe polar form of the Radon

transform is given by

��� ~A�?���Q~=���I�?�������  ��¡¢£� ¢ � ��� �'�K���¤�q��� �¥��q� ��� ~��p���k� �Z¦ � §A¨©�;ª�"«¢£� ¢ �?~A�'��� ��¬x�W­p� ¦ � §A¨©� �"«.® (8.1.7)

Reconstructingthe imagea correspondsto inverting the Radontransform� ~��Y� . This problemwas

solved in 1917 by Radon[15]. Radonproved that

�?~A�q�o�q��� ¯­¤¬ �±°³²�´µ�¶T· ¢¸ µ ¯¹ ��º¸ ·¼»�½½ �� ~��Y��¾�~n�À¿Á�Â$~n�ÄÃS���Y� ¹ ���À� ¦ � ¦ ¹ � (8.1.8)

where ¹�ÅÇÆ�È . Note that the integral�jº¸ · ¨?~n�(¿Á�Â�~�� Ã��}�Y� ¹ ���?� ¦ � ¦ ¹ �where ¨S� ÉÉËÊ � ~n�Y� , is an integral over a circle of radiusq with center ~��r�o�}� .

Althoughtheexactdetailsof 8.1.8mayseema bit obscure,theimplication is clear: thevalue �Y~A�r�I�r�is uniquelydeterminedby the setof all its line integrals;the integrationis with respectto all valuesof�Ì~A«�ÍÎ�;Í©­¤¬À� and the partial derivativeis with respectto the variable � .

In computertomographyonedealswith only a finite numberof receivers.It is, therefore,impossibleto calculateall the line integrals.The basicgeometryfor datacollection is shownin Figure8.1.6. Thesourceand sensorsare on oppositesidesof the object to be reconstructed.The sensorsresideon a

356

Page 365: Image Algebra by Ritter

detectorstrip andthe sourceanddetectorstrip movein unisonarounda commoncenterof rotation. Thex-ray sourceassumesm distinct positionsduring a stepwiserotation (indicatedby ÏfФÑ�Ï�ÒqÑÔÓ�Ó�ÓKÑ�ÏfÕ±Ö�Òin Figure 8.1.6). The detectorstrip contains פØHÙÛÚ sensorsspacedequally on an arc whosecenterscorrespondsto the sourcepositionasshown. For eachpositionof the source,×}Ø�Ù*Ú measurementsareobtained.The total numberof measurements(i.e., the numberof line integrals)is, therefore,ÜHÝA×}Ø ÙÎÚqÞ— which is not the infinite numberof measurementsrequiredby Eq. 8.1.8. Hence,there is no hopefor exact reconstruction.

xÆφÇ

s1s2s0ß

si

sm-1à

r0ß

rjárnâ

r-n

source^ sensor^

detector stripã

rjá

Figure 8.1.6 Fan beamwith spinningscannerfor datacollection using a single sourceand multiple sensors.

Thereareotherproblemsaswell. Accordingto Eq. 8.1.5,theactualmeasurementsonly approximatethe correspondingline integrals. The left sideof the equationcorrespondsmore to a sum(countof thenumberof photonsabsorbed)than to an integral. Moreover,by using digital computers,only finitelymany valuesof a can be reconstructed.Theseproblemslead to the discretetreatmentof the Radontransformandits inversion. The formulationof the discreteRadontransformprovidedbelow is the onemost suitablefor our subsequentdiscussions.

8.1.2 Definition. Let ä¼å,æqç.è�éTê , G a finite multiplicative group, ëíìïî , and ëPð�ñ0òæWóÔð�ñ ôõóõåöë�ê , where ñ÷å�î . If ø�ô�î5ùúä , then the discreteRadontransformof a basedon S is definedas û�üHý øYþ�ÿ ý ñ'þ�ò �������� � ø ý� þ� (8.1.9)

Note that in this definition the integralof Eq. 8.1.4 hasbeenreplacedby a sum andthe line L bythe set ë�ð�ñ . In the casewhere G is the group î,ò �ïò���������� (with the operationof addition����� ý � è��?þ ) and ë�ì�� a digital line, the value

û�üsý ø?þ=ÿ ý�� þ representsthe sumover the line ë;ð � . This

357

Page 366: Image Algebra by Ritter

showsthat Eq. 8.1.9 doesindeedrepresenta simplified discreteversionof the Radontransform. Thissimpleversionhasfoundapplicationsin appliedstatistics.For example,Diaconis[3] appliedthis versionto the analysisof syllablecountsin Plato’sRepublic. For eachsentencein the book, the syllablepatternin the last five syllableswas recorded.This provideda binary vector in "!$# . A function %'&� (!$#*),+was definedwhich countsthe numberof sentencesfor eachpattern. The function a was thenanalyzed(characterized)by consideringthe Radontransformfor variouschoicesof S.

It is naturalto inquireaboutthechoicesof S thatcharacterizethe functiona whenthe only availabledataconsistsof sumsover the translatesof S. We exploretis topic in the next section.

8.2 Invertibility of the Radon Transform and G-Templates.

The fundamentalquestionthat arisein connectionwith the discreteRadontransformis whetherornot it is possibleto invert it; i.e., whetherone can recover(in principle) the function a from the dataprovidedby -/.10%�23 . This questionis closely relatedto the invertibility of G-templates.In this sectionwe presentnecessaryandsufficient conditionsfor the invertibility of both, the discreteRadontransformand G-templates.

8.2.1 Lemma If 4�57680�9*:<;=2 , then there existsa set >@?A; suchthat >'BDCFEG>H0I4KJL27M�C@57; .Conversely,givena non-emptyset >N?�; , then there existsa G-templatet suchthat >�B�COE>P0Q4 J 2RM�C�5F; .

Proof: Let 4S5T680U9V:W;=2 , X"YZ5[; the identity of G, anddefine >'\7>P0Q4^]`_a2 . Then>bBaC[Edc^efB<C@&Veg5T>PhEdciXj5T;k&*XTElefBmCn:oeg5T>PhE�p�X[5q;k&*X1BmCHr�stE�e�:ueg5j>H0Q4 ] _^2<vE�p�X[5q;k&*4 ] _�wQX�BmC r�smxfyE{z|vEdciXj5T;k&*4mJL0X}2 yE~z�hEd>P04 J 2|�To prove the converse,supposethat >l?d; is non-empty.Define %[5b9n� by

%(0X}2�E���� ��� X�5T>z ��� X y5T>g�Accordingto Lemma7.5.3, thereexistsa G-templatet suchthat 4 ] _ E~% . Hence, >H0I4 ] _ 2uEO>and by the first part of our proof, >[B�C�E�>P04mJL2�M�Cd5';

Q.E.D.

358

Page 367: Image Algebra by Ritter

Note that the image � definedin the proof of the Lemmais just the characteristicfunction on � .Hence,in view of Theorem7.5.8, the template� definedin termsof the parameter� hasthe property��� ���u�{� ���� ���$��{���Q�m�D� ��(� ���W�m�D� �I��� �$�^�^�i���W�m�` I¡�� ��L¢^£�� �U¤� ¢^£��¥ ¦¨§ � � �Q� ¦ �©� �I� ¦ �� ¥ªm«D¬ � �­ ���which correspondsto the discreteRadontransformbasedon � . Since � is determinedby � and � isdefinedin termsof � , we refer to � as the templateinducedby � .

The relationshipbetweenthe template� inducedby � andthe discreteRadontransformis revealedby the next theorem.

8.2.2 Theorem. Suppose�U® �$¯T� simulates° , ��±l° , and �³²q° �I´Vµ$¶1· is inducedby ¸ . Thediscrete

Radontransformbasedon ¸ is invertible if and only if ¹ is invertible.

Proof: We identify¶

with º . Let »T¼q½n¾ and ¿ÁÀ~»1Âà ¹ . Then ÄÆÅ1Ç» ·ÉÈ ÇÊ · À ËÌDÍDÎ�Ï Ð »"ÇÑ · ÀËÌDÍDÎ�ÒÔÓÕmÖ »(ÇÑ · À�¿}ÇÊ · . Thus, Å1Ç» · is invertible if and only if the map »l× ¿ØÀ »qÂà ¹ is

invertible. This will be the caseif and only if ¹ is invertible.

Q.E.D.

Invertibility of theRadontransformis closelylinked to irreduciblematrices.A matrix ÙÚ¼1Û�ÜDÝ�ÜÞǽ ·is said to be reducible if there exists a partition of ß"àÜ into two non-emptysubsetsáãâ and áãä (i.e.á â�å á ä ÀGæ and á â�ç á ä À�ß àÜ ) such that èDéÆêqÀ�ë wherever ìf¼7á â and íl¼Øá ä . Otherwise, Ù issaid to be irreducible.

8.2.3 Example: Let î be a matrix of form

îOïðññññòuó ô ô ó óó ó ó ó óó ó ó ó óó ô ô ó óó ô ô ó ó

õmöööö÷[øIf ùãúûïAüãý�þ$ÿLþ���� and ù�� ï ü�� þ���� , then ùãú[ù�� ï��� � , ù�ú��[ù��ûï�� , and �����gï ô wherever��� ù ú and � � ù � . Therefore,î is irreducible. On the otherhand,the matrixðññññò ó ô ó ó óô ó ô ó óó ó ó ô óô ó ô ó óô ó ó ó ó

õmöööö÷ ø359

Page 368: Image Algebra by Ritter

is irreducible.

Note that if � denotesthe permutationmatrix formedby interchangingthe first and the third rowsof the identity matrix � � and ! is the matrix of the aboveexample,then

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

*,++++-and

�"!.�0/21.#%&&&&&&'( ( 3 ( ( (( ( 3 ( ( (4 4 5 4 4 4) ) 3 ( ( () ) 3 ( ( () ) 3 ( ( (

* ++++++-76In general,it canbe shownthat !$8:9<;>=�;@?BADC is reducibleif andonly if thereexistsa permutation

matrix � such that �"!.� /21 is of form EGF H) IKJML (8.2.1)

where

Fand I aresquarematrices[13]. Thus,an equivalentdefinition of reducibility of a matrix ! is

to simply require ! to havethe form expressedin Eq. 8.2.1.

We now turn our attention to the collection of matricesof a N –dimensionalrepresentationOP#Q�R ?TSUCWV�XY8:ZM[:\]9<;�=�;�?TA.C of the group Z . If the collection O^#�_>`�acbed>? R C is reducible,then eachmatrix

R ?fXGC may (by choiceof an appropriatepermutation)be presentedin the formR ?BXgCh# E R 1 ?BXgC ij?fXGC) Rlk ?TXgC JmLwhere

R 1 ?BXgC is an n]opn matrix,Rqk ?BXgC is a ?fN 4 nYC�or?fN 4 nYC matrix, ij?TXgC is an nsot?BN 4 nuC matrix,

and ) denotesthe ?TN 4 nvCwoxn zeromatrix. Since y�d,z{? R ?fXgC�Cw#|y�d,z{? R 1 ?TXGC~} Rqk ?BXgC�C , the non-singularityof

R ?BXgC assumesus of the non-singularityof bothR 1 ?BXgC and

Rqk ?fXGC for every Xx8:Z . Furthermore,R ?BX L�� Cw# R ?BXgC~} R ? � CW# E R 1 ?TXgC~} R 1 ? � C R 1 ?BXgC~} ij? � C 5 ij?TXgCl} Rqk ? � C) R k ?BXgC~} R k ? � C Jso that

R 1 ?TX L{� C$# R 1 ?BXgC�} R 1 ? � C andR k ?�X L�� C�# R k ?BXgC�} R k ? � C . Hence, the collection ` 1 #Q�R 1 ?fXGChV�XY8:Z�[ and ` k # Q>Rqk ?BXgChV�Xr8xZ�[ furnish n and ?fN 4 nYC –dimensionalrepresentationsof

our group Z , respectively.

The following definitionsare expressedin termsof group representationsbut can just as easily beexpressedin termsof representationsof group algebras.

8.2.4 Definition. LetR V2Z���9 ;>=�; ?BADC be a representationof Z . We say that

Ris reducibleif

and only if thereexistsa non-singularmatrix 9 879 ;>=�; ?TADC suchthatR ?BXgCw#|9 E R 1 ?BXgC ij?BXgC) Rqk ?BXgC J 9 /21 6If

Ris not reducible,then we say that

Ris irreducible.

360

Page 369: Image Algebra by Ritter

8.2.5 Definition. Two � –dimensionalrepresentations� and � of � are said to be similar if andonly if thereexistsaninvertiblematrix � �:�<�����>�B�D� suchthat �h�B�G���|���h�B�g�B�s�2�h�c�x�:� .

It is well-known [9, 11] that if ���W��� � ����� �B�D� is a right regular representationof � , thenthereexistsa non-singularmatrix � and irreduciblerepresentations� �>� �q  �j¡ ¡ ¡{� �~¢ of � suchthat forevery �����

�h���g�w�|�¤£¥¥ ¦ � � �B�g� § ¨ ¨j¨ §§ �q j�T�g� ¨ ¨j¨ §...

.... ..

...§ § ¨ ¨j¨©� ¢ �B�g�ª,««¬ � �2�@­

Moreover, if � is any irreduciblerepresentationof � , then � is similar to �~® for some ¯m�±°~²¢ . Thesamestatementholds true for �.�f�M� as well.

The next result relatesthe invertibility of the Radontransformto irreduciblerepresentations.

8.2.6 Theorem. Let ³�´µ� and supposethat ¶·�$���B� �¹¸ � is inducedby ³ . The discrete Radontransform basedon ³ is invertible if and only if �h�Tº��T¶>�{� is invertible for every irreduciblerepresentation� of �D�T��� .

Proof: Let º��»¶>�D�½¼ and � be an irreduciblerepresentationof �D�T��� . If the discreteRadontransformbasedon ³ is invertible, thenaccordingto Theorem8.2.2 ¶ is also invertible. Let� be a right regular representationof � and ¾��.¿T��ÀÂÁ À � �và � Ã��B�D� be the isomorphismdefinedrelativeto thesameorderingof � as � . by Theorem7.5.8, �h�T¼~�w�|¾Â�T¶>� . Since ¾�Ķ>� isinvertible,we now know that �h�T¼~� is alsoinvertible. By our observationfollowing Definition8.2.5, there exists a non-singularmatrix � �Å� à � à �f�.� and irreducible representations� � � �   � ¡ ¡ ¡{� � ¢ of �.�f�M� such that

�h�T¼~�w���Æ£¥¥¦ � � �ļ�� §�q j�»¼��.. .§ � ¢ �ļ~�

ª,««¬ � �2�and �K�½�ÈÇÉ�gÇÉ� �2�Ç for some Êu�<° ²¢ . Since �h�T¼~� is invertible, � ® �T¼~� is invertible for each¯.�·° ²¢ . Therefore,�U�»º��T¶>�{��$�U�T¼~�Â�Ë�vÇÉ�gÇ��»¼��T� �2�Ç is invertible.

Conversely,supposethat �U�»º��T¶>�{� is invertible for every irreduciblerepresentation� of �.�f�M� .According to our observation

¾�Ķ>�W�|�h�Tºe�T¶>���W�|� £¥¥¦ � � �Tº��»¶>��� §�q j�Tº��T¶Ì���.. .§ � ¢ �»º��T¶>�{�

ª,««¬ � �2� �where � is non-singularand each � ® is an irreduciblerepresentationof �.�f�M� . Thus, each� ® �Tº��T¶Ì��� is invertible, which implies that ¾�ĶÌ� is invertible. Since ¾ is an isomorphism,we

361

Page 370: Image Algebra by Ritter

havethat Í is invertible. Therefore,by Theorem8.2.2 the discreteRadontransformbasedonÎis invertible.

Q.E.D.

Note that theproof of Theorem8.2.6yields themoregeneralresultgivenby the following corollary:

8.2.7 Corollary. ͱÏ�ÐMÑBÒ�Ó�ÔYÕ is invertible if and only if ÖhÑT×�ÑTÍ>Õ{Õ invertible for every irreduciblerepresentationÖ of ÒDÑTÐ�Õ .

8.2.8 Definition. If Ø is a representationof Ð , then the contragredientrepresentationof Ø is therepresentationÙØ definedby ÙØ�ÑTÚGÕmÛÆÜÝØÂÞ»ÚGßcà,áãâ�ä .

It follows from the definition that ØhÑBÚgÕWÛµÜjÙØ"ÞÄÚ ß2à áãâ ä andthat everyrepresentationis the contragre-dient representationof somerepresentation.

8.2.9 Theorem. SupposeØ is an irreduciblerepresentationof ÒDÑBÐ�Õ , Îså Ð , and Í7Ï|Ð�ÑBÒ�Ó{ÔtÕ isinducedby

Î. Thematrix ØhÑT×�ÑTÍÌÕ�Õ is invertible if and only if æç>èÌé ÙØ.ÞTÚ ß2à á is invertible.

Proof: Let ê]ÛÅ×�ÑÄÍ>Õ . In view of our observationfollowing Lemma 8.2.1 we can writeØhÑTê~ÕpÛ�ë ß2àæìîíGï ê~Ññð ì ÕfØhÑTð ì Õ . Furthermore,since êËò�Ô ó Ò correspondsto the characteristic

functiononÎ

, ØhÑ»ê�ÕUÛôæç>èÌé ØhÑ�ÚgÕ . Therefore,ØhÑT×�ÑTÍÌÕ�ÕwÛõØhÑTê~Õ is invertible if andonly æç>è�é ØhÑBÚgÕis invertible. Moreover, æç>èÌé ØhÑfÚGÕ is invertible if andonly if æç>è�é Ü ÙØ Þ Úgß2à á,â ä Ûôö æç>è�é ÙØ Þ ÚGß2à áø÷ äis invertible. However, ö æç>è�é ÙØ.Þ»Ú ßùà á ÷ ä is invertible if andonly if æç>èÌé ÙØ.ÞTÚ ß2à á is invertible.

Q.E.D.

As an immediateconsequence,we now havethe following result:

8.2.10 Corollary. IfÎ|å Ð , thenthe discreteRadontransformbasedon

Îis invertible if and only if

for everyirreduciblerepresentationØ of Ð , the matrix æç>è�é Ø.ÞTÚ ß2à á is invertible.

Proof: By Theorem8.2.6,thediscreteRadontransformbasedonÎ

is invertibleif andonly iffor every irreduciblerepresentationÙØ of Ð , the matrix ÙØhÑT×eÑTÍ>Õ�Õ is invertible. But by Theorem8.2.9 this will happenif and only if æç>è�é Ø.ÞfÚGß2à,á is invertible.

Q.E.D.

This corollary wasfirst provedby DiaconisandGrahamusingdifferent techniques[4].

362

Page 371: Image Algebra by Ritter

The resultsdevelopedin this sectionshow that the invertibility of the discreteRadontransformis closely linked to the invertibility of ú –templates.In the caseof circulant templatesthe irreduciblerepresentationsof abeliangroupsare all one-dimensional.As an exampleconsiderthe group algebraûýüõþ ÿ � þ��

over�

. If ����� � �øû�� and � is a right regularrepresentation,thenaccordingto Theorem7.5.8 and Eqs. 7.2.4 and 7.3.1, ������� ���wü�� �� �wü��~ÿ������ ��!ÿ"��� � (8.2.2)

where� ü$#&%�')(�*,+�-�./*1032ÿ �40�5�76/6

. Thus,the irreduciblerepresentationofû

over�

arethe 8�9 elements

of the set : 032ÿ 0 5��;=< �1> � þ@?.

If�¤üA#�%�')( #7BC�1#7DC�=EFEGEH�1#FI7� and

�is invertible, then

�KJ B üL#M%�')("* BNHO � BN,P �GEFEGE,� BN,Q 6 . Therefore,�R�S�� � ��ûK� is invertible if and only if+ - .�* 0 2ÿ �T0 5��6�UüWV

for every<

and>.

8.2.11 Example: If X denotesthe circulant Moore template

tY

=

1 1 1

1 1 1

1 1 1

,

then Z\[�]C^`_ba,c�dfehg"ijckilc&mMn�ofip_@q�g"ijckilc7m&n�oGr"ip_�stn�o�q�g"ijckijckilc&m7n�oGreuq,g"ip_vil_\stn�oGr�q�g�ilcwilc&m7n�oFr7xLetZ/^`_ydze{g|i�_ i�_ m7n�o

and } ^`c\d e~g|i�cvi�c m&n�o . ThenZ"�H�3�s�� e������ �H�������T� �s � e� o� ��� s ���p�

. Similarly, } q �f�m r e��A��� m ���S�. Therefore, � is invertible if and only

if � and � are not divisible by 3. Hence,the invertibility of the averagingtemplatedependson the dimensionof the array � !

The inverseof the circulantaveragingtemplategiven in the aboveexamplecanbe found explicitlyusing the following method:

Let � s denotethe setof �A��� circulantmatriceswith each � e��=�� C�F^��1¡7aH� o aG¢F¢G¢Ha1� s£n\o d associatea polynomial

�¤^�_/d@e��H¡bi�� o _|il¢G¢F¢Ti�� s£n\oT¥C¦�§&¨ . Now define ©«ª7¬"­¯®±°t²´³�µ·¶7¸`³ ­º¹º»C¼ by ©/¸T¬ ¼3½�¾ ¸`³ ¼ .It is not difficult to show that © is a ring isomorphism. Thus,©b¿�ÀF¸ÂÁ/¸�³ ¼,¼@½ ©y¿\À�à »"Ä ³ Ä ³ ­ ¿�À=Å�Ƭǭ�ÈThe inverse ¾HÉ�ÊC¾ ¸ ¾HË7Ì1¾ À Ì=ÍGÍFÍ1ÌH¾ ­ ¿�À ¼�½ÏÎ © ¿�À à »�Ä ³ Ä ³ ­ ¿�À Å=Ð ¿�À is given by¾�Ñ�½uÒ`ÓÂÔ ¸ÂÕ�Ö ¼×Ä Ò�Ó·Ô ²Ø¸�Ù ¹ Õ ¼ ÖFµÚ Ò�ÓÂÔ Ö&¸ »t¹lÛHÜ Ò ¸TÙ�Ö ¼�¼ Ì

363

Page 372: Image Algebra by Ritter

where ÝßÞÏàTáâ [2]. For example,if ãäÞæå/çvèlåyç , thené\ê�ëCì`íbî,ï�ð Þæñ,ò"ó í ó í âGô ñ�ò"ó ï ó ï âGôand õ÷öyøúù ñ ò"ó í ó í â ô=û ø�ù Þ�ü1ý�þCü/ÿ ò� î ò� î�� �� î ò� ���Therefore,

ö£õ ü=ý�þCü ñ ùâ î ùâ î�� àâ î ùâ ô û Þ ùâ ñ ò"ó í�� � í à ó í â ô andé ê��ë ì�íbî1ï�ð Þ ù ñ ò"ó í�� � í à ó í â ô ñ ò"ó ï�� � ï à ó ï â ô . The template� ø�ù is shownin Fig. 8.2.1.

t =0�-1 1 1 -2 1

1 1 -2 1

-2 -2 4 -2

1 1 -2 1

Figure 8.2.1 The inverseof the circulant ����� averagingtemplatet.

Let ����������� ��� be definedby ���"!$#�%'&(#*)+-, . If,

is invertible, then since� �/. #*)+0,21�3�4 & . #*)+-,21�3"4 )+�, &5#6&7!8#*)+-, %')+-,21�3 &9� �;:2< !8#*)+0, %>=we obtain the commutativediagramshown in 8.2.2.

+a t?

a

aFt@

Ft@

+aA t-1

FBt@ -1 F

Bt@ -1

Figure 8.2.2 RecoveringC from C*DE�F and C6DE-F2G�H .Figure 8.2.3 provides an exampleof this commutativeproperty. Here, I JLKNM;OQPRKSMO with

Fcorrespondingto the TUP�T circulantaveragingtemplate.It maybesomewhatsurprisingthat theextremelynoisy looking image CVDE-F2G�H (lower left hand imageof Fig. 8.2.3), when locally averaged,resultsinthe imageof the SR71spy plane.This surprisedissipatesin view of the fact that C*DE�F2G�H containsbothpositive and negativevalues. In order to display C6DE0F2G�H , the pixel valueshavebeenlinearly shifted

364

Page 373: Image Algebra by Ritter

by the amount WYX[Z\W . Thus, the imagedisplayedin the lower left handcorneris not really Z6]^`_2aSb , butZ6]^�_ acb ]dWYXeZfW .

Figure 8.2.3 Inversionof a locally averagedimage.

Supposeg is a circulant hei –valued template. According to Theorem8.2.2, the transformationj�kmlon�p n6qr g is invertible if andonly if the Radontransform s6t neu basedon v-w7vxt$g�y u is invertible.Furthermore, z s{t neu}| t�~ u w �������� � n t}� u w ��o�o��� k$�"� n t�� u g � t$� u�� ~R�*�V�As we haveseenin Example8.2.11, if v{��~ denotesthe Moore neighborhoodof ~ , then the inversionif fairly straightforward. In general,however,proving invertibility can be rathercomplicatedevenforsimpleneighborhoodconfigurationfor averagingan image,the invertibility is not as easilyestablished.Specifically, if

t =y� 1

1 1

1

1 ,

then � k$� t����;� u w�� q � q �o���c� q � q ��� ��� . For ¡¢w¤£-w¤¥ , we have� k8�§¦}¨f© � ¨ i©�ª w(� q ¨ i© q ¨¬«© q ¨\© q ¨U­©w(� q ¨ i© q ¨¬®© q ¨ ©xq ¨U­©w°¯��365

Page 374: Image Algebra by Ritter

More generally, ±�² ³�´¶µ¸·¹�º»µ¸¼½/¾À¿(Á¬ÂÄÃ2Å"ÆoÇ�È ÃoÉ�ÊËÍÌ Â`Ã�Å>Æ/ÇcÈ ÃoÉSÎÏÐÌ�ÑThus,

±�² ³ ´}µ ·¹ º»µ ¼½ ¾Ò¿9Ó(ÔÖÕ Å>Æ�Ç È ÃoÉcÊË Ì ÂÄÅ×Æ/Ç È Ã�ÉeÎÏ Ì ¿ÙØ Áà ÑTherefore,if Ë ¿ Ï ¿ÛÚ , then

±c² ³ ´Üµ\ÝoºÞµ\ßÝ ¾à¿ÛÓ . It follows from thoseobservationsthat if Ë ¿ Ï and5 or 6 divides Ë , then the transformis not invertible.

Theobviousquestiononemay askis: “Does it follow thatwhenever

±�² ³�áâµ ·¹ º»µ'ã¹ ä ¿9Ó , then5 or 6divides Ë ?” This questionwasansweredin the affirmative by Z. ManseurandD. Wilson [12]. In Fact,Wilson andManseurprovedinvertibility for a moregeneralclassof von Neumannneighborhoodbasedtemplates.They consideredthe template å6æÄçàè�é ºÞê6ë definedby

å"ìíè$î ë ¿ðïñ òôó õÜö î ¿5÷ø õÜöÀù î Ø�÷ ù ¿úÁ¬Æoû Ë Ø5ÁÓ Æ�ü;ý�þ"û;ÿ õ Ç»þ º (8.2.3)

where ó º ø æ�� withø��¿úÓ and ê ¿�� ¹�� � ¹ . Pictorially, å hasrepresentation

t =y� b

b

b

b

a .

Their resultsare summarizedby the following theorem:

8.2.12 Theorem. (ManseurandWilson) Let � ��������� and ������������ � bedefinedby Eq. 8.2.3.

1. If ! #"$&% , then t fails to be invertible if and only if either5 or 6 divides ' .2. If !(&) and "+*&) , then � is invertible ,.-/' is odd.3. If 00 1 2 0043 5 , then � is invertible.

The proofs of statements2 and3 follow the argumentusedto prove the invertibility of the Mooretemplate. However,the proof of statement1 is ratherinvolved. Note also that the hypothesisrequiresa squarearray. It is still an openquestionwhetheror not similar resultshold for rectangular(i.e. notnecessarilysquare)arrays.

Another requirementin the abovetheoremis the symmetryof the pixel valuesabout the centerpoint 6 . The invertibility of von Neumanntemplateshavingnon-symmetricpixel valuesremainsanotheropen question.

366

Page 375: Image Algebra by Ritter

8.3 Determinants and Inversion

Determinantscanbe usedto establishthe invertibility of a template.Specifically,if 798#:<;�=(:�>and ?�@BA�CEDGF D , then t is invertible if and only if HJILKNM�OPMQ?SRTR�U8WV . Determinantscan also be usedtoprovide explicit expressionsfor the inverseof a given template.

If XB@ZY ;[>]\^;_> M�C[R , then the determinantHJI`KTMaX bZcJd ;_> R is given byM�b�efR ;_> c ;_>�gihNj c ;_>Sk j g9lmlmlngih ;_>Sk j c gih ;[>.8 Vpo (8.3.1)

The termh ;_> is obtainedby setting c�8WV and is, therefore,equal to HJILKqMrX$R . Multiplying Eq. 8.3.1

by MTb�esR ;_> results in the polynomialt Mac<Ru8�c ;[>�giv ;[>Sk j c ;_>^k j gwlmlxlygZvLj c givqz_{ (8.3.2)

wherevNz 8|MTb�efR ;_> HJI`KTMTX$R andv ;_>Sk j 8}KT~f� v IsM�X$R�8�b$Mr� jTj�g �J�T� gwlxlmlng �^;_>^� ;_>�R�o

The polynomial t Mqc�R correspondsto the characteristicpolynomial of A (Section3.8).

8.3.1 Theorem. Suppose?�@ A C D F D and X�8�OPMQ?fR . If HJI`KTMaX$R�U8�V , then t is invertibleand? k j 8�b ev z A�? ;_>^k j g�v ;_>^k��L? ;[>Sk�� gwlmlxlEg�vLj�� F {where ?m��8 ����� z ? and ? z 8 � .

Proof: It follows from the Cayley-HamiltonTheorem[8] that A satisfiesits characteristicpolynomial. Therefore,t MrX$R_8 X ;[> giv ;[>Sk j X ;_>^k j g�lmlxlyg�v`j X giv�z dL;[>�8 ��;_>GoSince HJI`KTMaX$R U8wV , v z U8wV . Hence,dL;[>.8 X lE� b evNz A�X ;_>^k j g�v ;_>^k j X ;_>^k���g9lmlmlngiv`j dL;[>�FN� {and X k j 8�b evNz A�X ;_>^k j gZv ;_>^k j X ;_>Sk��4g9lmlmlngiv j d ;[> F�o (8.3.3)

Since O is an isomorphism,O k j A�X k j F�8}? k j and O k j A�X���F$8}?m� for ��8 V { e {y m m �{�¡£¢ bZe .The result now follows immediatelyby applying O k j to Eq. 8.3.3.

Q.E.D.

In contrastto Section8.2, the templatesconsideredhereare translationinvariant but not circulant.Accordingto Corollary7.1.7, the inverseof a translationinvarianttemplateis not necessarilytranslation

367

Page 376: Image Algebra by Ritter

invariant. Translationvarianttemplateoperationsrun notoriouslyslow on currentcomputerarchitectures.The above theoremprovidesa way to write the inverseof a translationinvariant templatein termsof invariant templates. However, speed-upin performancecan generallynot be achievedby simplyreplacing ¤+¥¦¨§^©�ª with «�¬­N®u¯ ¤(¥¦�§L°_± ©�ªm² ¥ ­ °_± ©]³ ¯ ¤�¥¦¨§L°[± ©�³�² ¥w´m´x´y¥ ­ ª ´L¤due to the increasein the numberof convolutionsthat must be performed. Fortunately,it is oftenpossibleto decomposethe polynomial representationof a templateinto fewer products. For example,using polynomial factorization,the polynomialµ�¶ §f·�¸¹§Lº ¥ ­ ³ § ³ ¥ ­ ª § ¥ ­ ®can be factoredas µ<¶ §f·_¸}§S»¼§ ¶ § ¥ ­ ³ · ¥ ­ ª�½ ¥ ­ ®u¾Thus, the numberof convolutionproductscan be reducedby one-half,from 6 to 3.

A classicalmethodof evaluatingdeterminantsof large matricesis by cofactorexpansion.The nexttheoremis a consequenceof the useof cofactorexpansionon certaintypesof block Toeplitz matrices.

8.3.2 Theorem. If A andB are ¿£À�¿ matricesand Á ° is an £¿�À£Â£¿ blockToeplitzmatrix of form

Á ° ¸ÃÄÄÄÄÄÄÄÄÅÆ Ç Æ Æ ´m´x´ Æ ÆÈ Æ Ç Æ ´m´x´ Æ ÆÆ È Æ Ç ´m´x´ Æ ÆÆ Æ È Æ ´m´x´ Æ Æ...

......

..... .

......Æ Æ Æ Æ ´m´x´ Æ ÇÆ Æ Æ Æ ´m´x´ È ÆÉLÊÊÊÊÊÊÊÊ˨Ì

then ÍJÎLÏ ¶ Á ° ·�¸ ¶ « ¬ · ± ÍJÎLÏ ¶ Ç · ´SÍJÎ`Ï ¶ È · ´SÍJÎLÏ ¶ Á ° ©]³ · .Proof: ÍJÎ`Ï ¶ Á ° ·_¸ ¶ « ¬ · ± ÍÐÎ`Ï ÃÄÄÅ È Æ Ç Æ ´m´x´ ÆÆ Ç Æ Æ ´m´x´ ÆÆ È Æ Ç ´m´x´ Æ

......

......

......

ÉLÊÊ˸ ¶ « ¬ · ± ÍÐÎ`Ï ¶ È · ´mÍJÎ`Ï ÃÄÄÅ Ç Æ Æ Æ ´m´m´ ÆÈ Æ Ç Æ ´m´m´ ÆÆ È Æ Ç ´m´m´ Æ

......

......

......

ÉLÊÊËÑ ÒmÓ Ô° ©�ªÖÕQ×ÙØaÚQÛLܸ ¶ « ¬ · ± ÍÐÎ`Ï ¶ È · ´mÍJÎ`Ï ¶ Ç · ´mÍJÎ`Ï ÃÄÄÅ Æ Ç Æ Æ ´x´m´ ÆÈ Æ Ç Æ ´x´m´ ÆÆ È Æ Ç ´x´m´ Æ...

......

......

...

É ÊÊËÑ ÒxÓ Ô° ©�³ÖÕQ×ÝØaÚQÛNÜ368

Page 377: Image Algebra by Ritter

Q.E.D.

8.3.3 Corollary. If ÞPß is an à�á�à tridiagonal matrix of form

Þ ß.âãääääääääåæ ç æ æ èmèxèéæ æê æ ç æ èmèxèéæ ææ ê æ ç èmèxèéæ ææ æ ê æ èmèxèéæ æ...

......

.... ..

......æ æ æ æ èmèxèéæ çæ æ æ æ èmèxè ê æëLììììììììí¨î

then ïJðLñNò�Þ ß�ó.âõô ç ê è ïJðLñqòrÞ ßSöø÷xó .Applying the reductionformula given by the abovecorollary to the matrices

Þ�ù â ò æ ó î Þ�÷ âwúæ çê æ�û î Þ�ü â

ãå æ ç æê æ çæ ê æ ëí î�ýfþ�ÿ Þ�� âãääå æ ç æ æê æ ç ææ ê æ çæ æ ê æ

ë ììíwe obtain ïJð`ñTòaÞ ù óuâ æ î ïJð`ñTòaÞ ÷ ó�â�ô ç ê î ïJð`ñTòaÞ ü óEâéô ç ê è ïJðLñqòrÞ ù ó�â æ îand ïJðLñqòrÞ � ó�â�ô ç ê è ïJð`ñTòaÞ ÷ ó�â ò ç ê ó ÷ , respectively.

More generally,we have thatïJð`ñTòTÞ ß ó_â � æ ��� à ���� ÿ�ÿò ô ç ê ó ß�T÷ ��� à ��� ��� þ�� (8.3.4)

The abovediscussionprovidesa quick methodfor the determinationof the invertibilty of certaintemplates.For example,considerthe template ����������� � shownin Figure 8.3.1.

a by�r� =Figure 8.3.1 A templatewhich is invertible on an arraywith an evennumberof columns.

If �! #"%$'&("*) , thenthe matrix +�,�-/. is the 0213&4021 block Toeplitz matrix given by

+�,5-/.6 8799: ; ) < =>=�= << ; ) =>=�= <...

.... ..

...< < =>=�= ; )?�@@A3B (8.3.5)

369

Page 378: Image Algebra by Ritter

where C�D is the EGFHE matrix

C DJIKLLLLLLLLMN O N N P>P�PQN NR N O N P>P�PQN NN R N O P>P�PQN NN N R N P>P�PQN N...

......

..... .

......N N N N P>P�PQN ON N N N P>P�P R NS�TTTTTTTTU3V

Since W�X�Y[Z\C�D^]`_I N if andonly if n is evenand WaX�Y[Zcb�Zed/]5] Igf WaX�Y[ZhC�Di]ej�k , the templater is invertible ifand only if

OJP R _I N and the numberof columnsof the array X is even.

An analogousargumentwill showthat the templates definedin Figure8.3.2is invertible if andonlyifO�P R _I N and the numberof rows of X is even.

a

b

sl =y�Figure 8.3.2 A templatewhich is invertible on an arraywith an evennumberof rows.

Using the samereasoningalsoshowsthat the templatesshownin Figure8.3.3areneverinvertible.

v =

a

b

u = a b andy� y�Figure 8.3.3 Two non-inveritible templates.

As anotherexample,considerthe Sobeledgetemplate

tmyn =

1

-2-1

2 1

-1

Now oqpsrutvxw , where

1 1yyrz = 2{

370

Page 379: Image Algebra by Ritter

and s is the templateshown in Figure 8.3.2 with |G}s~ and ��}s�u~ . The matrix ���5��� is given byEq. 8.3.5, where

��� }����������� ~ � � ���>�!� �~ � ~ � ���>�!� �� ~ � ~ ���>�!� �� � ~ � ���>�!� �...

......

.... ..

......� � � � ���>� � ~� � � � ���>��~ ������������3�

It is well-known that� �

has n distinct eigenvaluesstrictly between0 and 4 ([14], p. 101). Thus,�a��� � ��� ���}�� for all n and, hence,�a��� �\�`�\�/�5��}�� �a��� � ��� �e��� �}�� for all m and n. Therefore,r is

alwaysinvertible. Sinces is invertible wheneverthe numberof rows of X is even,the Sobeltemplateis invertible if and only if the numberof rows of X is even.

Thematrix �`���/� in the abovediscussionis almostdiagonallydominant.Recall thatan ¡�¢�¡ matrix� }��\|/£¥¤>� is diagonallydominantif andonly if ¦�|�£§£[¦©¨«ª£�¬­ ¤ ¦�|�£¥¤�¦ for all ®�}#~�¯ � ¯%°>°>°%¯^¡ . Sincediagonally

dominantmatricesarealwaysinvertible,templateswhosecorrespondingmatricesarediagonallydominantmust also be invertible. In particular, the template

1 1y�t± = 3²

is invertible.

Our next result is alsoa consequenceof straightforward cofactorexpansionandinduction.

8.3.4 Theorem. If ³�´ is an µ·¶xµ tridiagonal matrix of form

³�´J¸¹ºººººººº»¼¾½ ¿ ¿ À>À�ÀÁ¿ ¿Â ¼Ã½ ¿ À>À�ÀÁ¿ ¿¿  ¼Ã½ À>À�ÀÁ¿ ¿¿ ¿  ¼ À>À�ÀÁ¿ ¿...

......

.... ..

......¿ ¿ ¿ ¿ À>À�ÀļŽ¿ ¿ ¿ ¿ À>À�À  ¼Æ�ÇÇÇÇÇÇÇÇÈ3É

then ÊaË�Ì[Íh³�´iÎϸÐÊaËÑÌhÍ5³�´/Ò^Ó�ÎÕÔ ½  À ÊaË�Ì[Í\³�´/Ò×Ö�Î .Note that if ³�´ is asabove,then ÊaË�Ì[Í\³�Ó�Îظ ¼ , ÊÙËÑÌ[Í\³�Ö�Îظ ¼ Ô ½  , and ÊaË�Ì[Í\³�Ú>Î�¸ ¼ ÔxÛ ½  .

8.3.5 Theorem. SupposeÜݸgÞ%ßÁ¶3Þ ´ , àâáäãæåèç`é ç is definedby

a byêr = 1

and ë�ì is as in Theorem8.3.4. Thenr is invertible if and only if íaîÑïhð5ë�ì^ñóòôäõ .371

Page 380: Image Algebra by Ritter

Proof: The matrix ö�÷\øúù is an û2ü�ý�ûâü block Toeplitz matrix of form

ö`÷�ø/ù6þ8ÿ��� ��� � ����� �� �� ����� �...

..... .

...� � �������� �����

The resultnow follows from the fact that ��� �[÷hö�÷�ø/ù5ù�þ��������h÷ �� ù������þ �"! ��� �[÷ �� ù�þ#� .Q.E.D.

As an easyconsequencewe have:

8.3.6 Corollary. Suppose$ þ&% � ý'% � .1. If ø)(&*,+.-0/ - is defined by

1 1y1r� = 1

then r is invertible if and only if 24357698;:=<?> .2. If @BADCFEHG0I G is definedby

tm

=

1 1 1

1 1 1

1 1 1

,

then t is invertible if and only if JLKMON9P;Q=R�S and P KMONTPUQ=R�S .Proof: (1) By Theorem8.3.5, R�V�WYX[ZXF\9]Y] KM_^a` R�V�WYX[bcd] KMe^ , where

b c Mfggggggh

i i ^ j�j�jk^ ^i i i j�j�jk^ ^^ i i j�j�jk^ ^...

......

.. ....

...^ ^ ^ j�j�j i i^ ^ ^ j�j�j i i

l mmmmmmn�o

Let p cqM4R�V�WYX[bcd] . Then by Theorem8.3.4, p cqM p c�rtsvu p cTrtw , where p sxM i , p wxM_^ , andp�y Mzu i .372

Page 381: Image Algebra by Ritter

It follows by induction that {�|~}��t���O� , {�|~}U�7��{�|~}~��� , and {�|~};���x� with {�|~}��&� if � isevenand { |�} ����� if k is odd. For supposethe result holds for someintegerk. Accordingto Theorem8.3.4,

{ | ��}����Y� �#{ | ��}~���Y���d� �){ | ��}����~���t� �#{�|�}~���v�){�|~}~�����L�[{�|~}��t���B{�|�}=���B{�|�}~�����e��{�|~}T�Thus, { | ��}��t��� �����[����� . Similarly,

{ | ��}��t������� �L{ | ��}��t��� ��{ | ��}��t�����d� � �,{ | ��}~���Y���d� �){ | ��}����Y�F¡ ��{ | ��}����~�¢�£� �"�0{ |���}����Y�Y¤and { |���}����Y���d� �#{ |���}����Y���d� �B{ |���}~�������¥| ����{�|~}��d�v�#�£�Therefore, {�¦§�7� ¨ ©ª�&«T¬;­=®?¯ .(2) A similar argumentshowsthat the template

1

1

sl =y1 1

is invertible if and only if ° ±²7³ °;´=µ�¶ .Since · ²¹¸�º»B¼ , and µ9½�¾�¿ÁÀ¿�·=Â� ² µ�½ ¾�¿ÁÀ0¿ ¸ ÂYÂ�Ãdµ�½ ¾�¿YÀ¿ ¼ Â[ , t is invertible if and only if° ±²³ °;´=µ�¶ and Ä�±²&³ °;´=µ�¶ .

Q.E.D.

The techniquesdiscussedin this sectioncan be usedto determinewhethera templateis invertible.However,with the exceptionof Theorem8.3.1, they do not suggesta methodfor finding the inverseofa template. Methodsfor inverting templatesare discussedin the next section.

8.4 A Class of Easily Invertible Templates

The precedingsectionssuggestthe obvious: template inversion is — in general— a difficultand computationallyinefficient process. Furthermore,the inverseof a translationinvariant templateis generallytranslationvariant. Themainobjectiveof this sectionis to describea largeclassof templatesthatcanbeeasilyinvertedandhavetheadditionalpropertythat their inversescanbefactoredinto a smallnumberof invariant templates. Moreover, the supportof eachtemplatewill have the samegeometricconfigurationas the original template.

In order to establishthe main goal of this sectionit will be useful to recall someelementaryfactsfrom linear algebra.

373

Page 382: Image Algebra by Ritter

8.4.1 Definition. Let ÅxÆ�ÇtÈ�ÉdÇËÊ=ÉÍÌ�Ì�ÌdÉdÇ£Î?Ï be a polynomial ring. The polynomial Ð ÑÅxÆÒÇ È ÉÓÇ Ê ÉÍÌ�Ì�Ì�ÉdÇ Î Ï is said to be symmetricif and only ifÐ�ÔÁÇËÈ�ÉdÇËÊ=ÉÍÌ�Ì�ÌdÉdÇ£ÎdÕ×Ö§ÐÙØ�ÇËÚTÛ È[Ü ÉdÇ£ÚTÛ ÊYÜ ÉÍÌ�Ì�ÌËÉdÇ¥Ú9Û Î=ÜFÝfor every permutation Þ"ß×àÍáÎ�â àÍáÎ .

Therearen specialsymmetricpolynomialswith integercoefficients,calledtheelementarysymmetricfunctionsof degree k:

ÐãÔFÇdÈ=ÉdÇdÊ=ÉÍÌ�Ì�ÌËÉdÇ¥ÎËÕ×Ö ÇËÈ×ä§ÇdÊåä&æ�æ�æçä'Ç£ÎèÖ Îé ê�ë È Çê

Ð�Ô[ÇdÈ=ÉdÇdÊ=ÉÍÌ�Ì�ÌËÉdÇ¥ÎËÕ×Ö#ÇËÈ ÇdÊåä'ÇËÈ~ÇËìåäæ�æ�æçäBÇ¥Î�ídÈ Ç¥ÎèÖ é ê�î�ï Ç ê Ç ïÐ�Ô[ÇdÈ=ÉdÇdÊ=ÉÍÌ�Ì�ÌËÉdǥΣÕÙÖ#ÇËÈ ÇdÊ Ç£ìðäBÇËÈ Ç£ì�ÇÓñ�äDæ�æ�æçä'Ç£ÎTídÊ�Ç¥Î9ídÈ Ç¥ÎòÖ éê�î�ï~î�ó Ç ê Ç ï Ç ó

...ÐãÔÁÇËÈ=É£ÇËÊ=ÉtÌ�Ì�Ì�ÉdǣΥÕÙÖ#ÇËÈ ÇËÊ Ç¥ìèæ�æ�æ�Ç¥ÎIn particular,the elementarysymmetricfunction of degreeôqÖ õTÉ¥ö¥ÉÍÌ�Ì�Ì�É¥÷ is of formÐãÔÁÇËÈ=É£ÇËÊ�ÉÍÌ�Ì�Ì�ÉdǣΥÕÙÖ éÈ�ø êúù,î¥êúû[î�ü�ü�ü�î¥ê�ý ø¥Î Ç

ê�ù Ç ê�û æ�æ�æ?Ç ê�ý×þIf ÿ È�Édÿ ÊòÑ�� and A is an ÷��B÷ matrix, then the equationÔ�� Î ä§ÿ È�� Õ�Ô�� Î äBÿ Ê� ÕÙÖ� Î ä ÔÁÿ È ä'ÿ Ê Õ � äBÿ È ÿ Ê�� Ê (8.4.1)

is an immediateconsequenceof the associativeand distributive laws of matrix multiplication. Equiv-alently, we have Ê�ê�ë È Ô � Î ä'ÿ

ê� ÕÙÖ� Î ä ÐËÈ�ÔÁÿ È�Édÿ Ê Õ � ä ÐËÊ�ÔÁÿ È�Édÿ Ê�Õ � Ê É (8.4.2)

where ÐdÈ and ÐdÊ areelementarysymmetricfunctionsof degree1 and2, respectively.An easyextensionof Eq. 8.4.2 provesthe following fact:

8.4.2 Theorem. If ��ÿ È=Édÿ Ê�ÉÍÌ�Ì�Ì�Édÿ�Î������ and A is an ÷���÷ matrix, thenÎ�ê�ë È Ô�� Î ä§ÿê� ÕÙÖ��Î ä ÐdÈ�Ô[ÿ È�ÉãÌ�Ì�ÌdÉËÿ�ÎdÕ � ä ÐdÊ�Ô[ÿ È�ÉãÌ�Ì�Ì�Édÿ�Î¥Õ � Ê ä&æ�æ�æçä ХΣÔÁÿ È�ÉãÌ�Ì�Ì�Édÿ�Î£Õ � Î É

where Ð ó ÔFÿ È=ÉÍÌ�Ì�ÌËÉdÿ�Î¥Õ is an elementaryfunctionof degreek for ôqÖOõ9ÉÓö£ÉÍÌ�Ì�ÌtÉË÷ .An ÷���÷ matrix � Ö�Ô�� êÒï Õ Î��9Î is called upper triangular if �

êÒï Ö�� whenever����� and strictlyuppertriangular �

êÒï Ö � whenever�"!#� . The matrix A is said to be nilpotent if thereexistsan integerk suchthat �

óÖ%$ Î . If k is the smallestsuchinteger,then A is said to be nilpotentof order k. With

thesenotionsin mind, the next theorembecomesa routine exercise.

374

Page 383: Image Algebra by Ritter

8.4.3 Theorem. If A is a strictly uppertriangular &('�& matrix,thenA is nilpotentof ordern. Moreover,the productof any n strictly uppertriangular &)'�& matricesis the zero matrix.

The next result follows immediatelyfrom this theorem.

8.4.4 Corollary. If A is a block matrix with strictly uppertriangular &*')& blocks,thenA is nilpotentof order n.

8.4.5 Theorem. If +-,/.0+21/.435363�.7+98 denotes the list of the distinct nth roots of unity, then:�;=< +2,/.7+>1/.435353?.7+98�@#ACB for DEAGFH.�I�.436353�.J&LK�F , where :�; denotesthe elementarysym-metric function of degree k.

Proof: For DMANFO.�I�.436353J.�& , + ; is a root of the polynomial :?<�P @QA P 8 KF . Thus,:?<�P @2A <�P K*+2,6@ <RP K)+216@TS6S5S <�P KU+V8J@A P 8 K#W , P 8=X�,ZY W 1 P 8HX[1 K\S6S5S Y < K]F6@ 8 W 8 .where W , A^+ , Y + 1 Y S5S6S Y + 8 A : , < + , ._35363?.7+ 8 @W`1�A^+2,a+>1 Y +>,a+2b Y S6S5S Y +V8HX[,c+V8dA : 1 < +2,/.435353J.7+V8J@W 1 A^+ , + 1 + b Y + , + b +Ve Y S5S6S Y + 8OX�1 + 8HX[, + 8 A : b < + , .435363_.H+ 8 @

...W 8 AL+ , + 1 S5S5SH+ 8 A : 8 < + , .f36353J.7+ 8 @But :f<�P @gA P 8 K�F . Therefore, W , A�W 1 AhS6S5S�A�W 8OX�, A�B .

Q.E.D.

Thesepreliminaryresultsprovidethenecessarymeansfor provingthecentraltheoremof this section.

8.4.6 Theorem. SupposeA is a nilpotentmatrix of order n. If + , .7+ 1 .436353?.7+ 8 denotesthe list of thedistinct nth roots of unity, then<�i Y + ,cj @ <�i Y + 1j @TS5S6S <�i Y + 80j @QA i�kIn particular, for D)A\FH.�I�.435363�.�&*K�F , the inverseof the matrixl A <�i Y +>, j @ <�i Y +21 j @(S6S5S <�i Y + ; j @is given by l X�, A < i Y + ;�m ,j @ <�i Y + ;�m 15j @TS5S6S < i Y + 8�j @ k

Proof: By Theorems8.4.2 and 8.4.5,< i Y + ,5j @ <�i Y + 1j @(S6S5S <�i Y + 8�j @2A i Y : 8 < + , .`+ 1 .435363_.0+ 8 @ j 8 k375

Page 384: Image Algebra by Ritter

But n(o#p\q sinceA is nilpotent of order n.

For the secondpart supposethatr pts�u]v�w2xnzy{s�u|v�w2}nzyT~5~5~Js u|v�w2�/nzy��By the first part, r ~H��s�u]v�w2��� x nzy{s�u]v�w>��� } nzyT~5~6~�s u]v�w o nzy��?pu��Therefore,by the uniquenessof inverses,r|� x p�s u]v�w2��� x n�yRs�u]v�w>��� } nzyT~5~6~�s u]v)w o n�y��

Q.E.D.

A particularconsequenceof this theoremis that if w is a primitive nth root of unity, then

s u|v�w�nzy���u]v�w } n|��~6~5~[s�u]v)w o nzyQpu?�Thus, if

r p\u�v�n , where n o p�q , thenr|� x pts�u]v)w�n�y5��uzv�w } n���~5~5~9��u�v�w o � x n|�>�8.4.7 Example: Suppose��p��?�)�|� o , w is a primitive nth root of unity, and �]�� �9�T� � is givenby

1 a t =

Let U and V denotethe ����� uppertriangularmatricesdefinedby

��� ¡¡¡¡¡¡¢

£ ¤ £ ¥5¥5¥¦£ ££ £ ¤ ¥5¥5¥¦£ ££ £ £ ¥5¥5¥¦£ £...

......

.. ....

...£ £ £ ¥5¥5¥¦£ ¤£ £ £ ¥5¥5¥¦£ £

§¨¨¨¨¨¨©¤ �4ª�« �

 ¡¡¡¡¡¡¢

¬ ¤ £ ¥5¥6¥¦£ ££ ¬ ¤ ¥5¥6¥¦£ ££ £ ¬ ¥5¥6¥¦£ £...

......

. .....

...£ £ £ ¥5¥6¥ ¬ ¤£ £ £ ¥5¥6¥¦£ ¬

§¨¨¨¨¨¨©�­®�¯�#°

Thus, if ± ��²(³�´Hµ , then

± � ¡¡¢« ¶ ¥5¥6¥ ¶¶ « ¥5¥6¥ ¶...

..... .

...¶ ¶ ¥5¥6¥ «§¨¨© �

 ¡¡¢­ ® ¶ ¥6¥5¥ ¶¶ ­ ® ¥6¥5¥ ¶...

.... ..

...¶ ¶ ¥6¥5¥ ­ ®§¨¨© ¯

 ¡¡¢� ¶ ¥5¥6¥ ¶¶ � ¥5¥6¥ ¶...

..... .

...¶ ¶ ¥5¥6¥ �§¨¨© �­¸· ® ¯#¹»º

376

Page 385: Image Algebra by Ritter

where ¼N½�¾7¿�ÀHÁ�Â�ÃQÄÅÃQÄ4Æ6Æ5Æ�ÄÅÃ|Ç and È denotesthe É)Ê)É zeromatrix. According to Corollary8.4.4, A is nilpotentof ordern. Hence, Ë|Ì�Í�½�Ë Í"Î Ë4Ï Î5Î5Î Ë?Ð Ì�Í , whereeach Ë?Ñ is an Ò�É)ÊÓÒMÉblock matrix, consistingof ÒÔÊ#Ò blocks. Specifically,

Ë?ÑŽÕÖÖ×Ø Ñ È Î6Î5Î ÈÈ Ø Ñ Î6Î5Î È...

.... ..

...È È Î6Î5Î Ø ÑÙÚÚÛ Ä

where È denotesthe É)ÊÓÉ zeromatrix andØ Ñ is the É)Ê)É uppertriangularmatrix of form

Ø Ñ ½ÕÖÖÖÖÖÖ×

Ü Ý Ñ À Þ Î6Î5Î Þ ÞÞ Ü Ý Ñ À Î6Î5Î Þ ÞÞ Þ Ü Î6Î5Î Þ Þ...

......

. .....

...Þ Þ Þ Î6Î5Î Ü Ý Ñ ÀÞ Þ Þ Î6Î5Î Þ Ü

Ù ÚÚÚÚÚÚÛàß

Therefore, á Ì�Í ½ á Ízâã á Ï âã Î6Î5Î âã á Ð Ì�Í Äwhere

á Ñ ½¦ä(Ì�ÍÂ Ë Ñ Ç is of form

1 ω aitå =i ..

Thus, each æç is invariant and has the samegeometricconfigurationas t. Furthermore,thenumberof factors in the decompositionof æ=è[é is one lessthan the numberof columns. Notealsothat the primitive nth root of unity canbe chosenin the field êJë , wherep is a large prime.This meansthat all calculationscan be accomplishedusing only integer arithmetic, thereforeavoiding round-off errorsand dealingwith complexnumbers.

The aboveexamplehas the following generalizations:

8.4.8 Theorem. Supposeìîíïê?ðNñòê?ó and æ)ô�õ ö�÷Tø ÷ is translation invariant. If ù(ú�æ=û is uppertriangular and æü?úþý"û�í ÿ , then æ è�é can be factored into a product of at mostmn invarianttemplates.Furthermore, thesupportof eachtemplatein the factorizationwill be identical to thesupportof t.

Proof: By hypothesis,ù(ú�æ/û�í � ð"ó���� , whereA is a strictly upper triangular ���òñ��matrix. Therefore,A is nilpotentof order � ���� . Hence,by Theorem8.4.6, the inverseofù(ú�æ/û canbe factoredinto a productof at mostmn matricesof form

� ðQó � � ç � , where � ç is aroot of unity for �(í ÿ���������������� . Thus, æ è�é can be factoredas

æ è�é í�æ é �� æ����������� �� æ� !�where æ ç í¦ù è�é ú � ðQó �"� ç �zû .

Q.E.D.

377

Page 386: Image Algebra by Ritter

8.4.9 Theorem. Suppose# $ %'&)(*%�+ and ,.- /103254 2 is translation invariant. If 67$8:9<;=8?><;�@�@�@A;�8 + is a list of the nth rootsof unity and t hasfactorization

,�$B, 9DCE , >�CEGF�F�F CE ,IH ;such that

tå =i

1 ω bi.

ω fi. ω ei

.

ω ai.

ω ci. ω di

.

then JLK�MONPJ�QSR MDTU J�QSR'V TU�W�W�W TU JYX[Zwhere

ω f ω e

ω d ω c

ω b ω a 1

j\

j\

j\

j\

j\

j\

t] =j\

..

..

..

for ^P_.`ba*c�d�`ba�e�d�f�f�f'dhg .

Proof: Let i7_ jk=lSmonqpsr�t1uwv xYy!z|{ . Thus A is a block matrix with strictly upper triangularg"}~g blocks and, by Corollary 8.4.4, nilpotent of order n. According to Theorem8.4.6 wenow have that the inverseof

n�p�r<u _ n�p�r j uw��n�p�r���uA������n[p�r��<u_ psx�y�z a � j i u�p�x�y�z a"� � i uA������psx�y�z a"� � i uis given by

mon�p�r�us{�� j _ p1xYy�z a � ��� j i u�p1xYy�z a � ��� � i u�������psx�y�z a�� z i uS�Therefore,r � j _ r��S� j a� r���� � a� ����� a� rYz where r�� _ n � j p�xYy�z a�� � i u for^P_�`a*c�d�`ba�e�d�f�f�f�d�g .

378

Page 387: Image Algebra by Ritter

Q.E.D.

NotethatTheorem8.4.9is valid for a muchwider classof templatesthanindicatedby thehypothesis.In particular,if �q�s�Y���Y�[�Y�!� is astrictly uppertriangularblock Toeplitzmatrixwith strictly uppertriangularToeplitz blocks, then the conclusionof the theoremstill holds.

Identical results could also have beenobtainedusing lower triangular matricesinsteadof uppertriangularmatrices. Furthermore,by Schur’sTheorem[7] every matrix with real eigenvaluesis equalto the sum of a diagonalizablematrix and a nilpotent matrix. Thereforewe could havestatedmanyofthe results in this more generalsetting. However, the benefitsof doing so do not warrant the addedcomplications.

8.4.10 Example: Let ����� �¡  � � , ¢¤£¦¥¨§ , andr , s, t, andu beparameterizedreal-valuedtemplatesdefinedby

, and u(i) =

s© (i) =rª (i) =

tå(i) =

,

i d.

i b. i a.

i c.

i a.

i a.

i a.

i d.

i d.

i d.

i b.

i b.

i b. i c.

i c.

i c.

1

1

1

1

where i, a, b, c, and d are integers.

Considerthe transform«¡¬®­B¯¦°±³²�´�µ<¶ °±G·�·�· °±¡²�´1¸A¶ °±¹�´Sµ�¶ °±G·�·�· °±º¹�´»¸A¶ °±¡¼<´�µ<¶ °±G·�·�· °±¡¼<´�¸�¶ °±B½¨´Sµ�¶ °±G·�·�· °±P½¨´�¸�¶¿¾This transformis invertiblewheneverthehypothesesof thetheoremspresentedin thissectionaresatisfied.Observethatpartsof thehypothesesaresatisfiedsinceÀ ´s²�´»Á¶�¶�Ã�ÄYÅ!Æ and À ´�¼<´�Á�¶�¶�ÃDÄYÅ�Æareblock matriceswith strictly uppertriangular Ç~ÈÉÇ blocks,

²�´sÁ¶»Ê�´sË!¶ ­ µand

¼<´�Á¶�Ê�´1Ë!¶ ­ µ.

Similarly, À ´s¹�´�Á¶�¶?ÃÌÄ Å�Æ and À ´�½w´�Á�¶�¶ÍÃ¡Ä Å�Æ are block matriceswith strictly lower triangularÇ È¤Ç blocks. Now supposethat a is a Î�Ï�ÈÉÎ�Ï imagewith pixel valuesbetween0 and31. Asnotedearlier, the theoremshold for the finite field Ð�Ñ , wherep is a prime. This lets us avoidcomplexarithmeticandround-off errors.To invert thetransformexactly,we needonly chooseaprimenumberp which is larger thanboth the numberof columnsandthe maximumpixel value(assuming

�ÒºÓ). Thus, the most reasonableprime in this casewould be the integer

Ó ­ Î=Ô .Sincethe integers

µLÕ�Ö¿Õ�×�×�×�Õ Î�Î are all the roots of unity in the field Ð�ØSÙ , it follows from theresultsof this sectionthat the transformis invertible if we set Ú¨Û ­ Á for

Á ­ µLÕ�Ö¿ÕA×�×�×'Õ Î�Î and¸ºÒ�Ó. Furthermore,the inversetransformis given by¯¤¬Ü­�«¡°±P½¨´�¸ ° µ�¶ °±�·�·�· °±B½¨´ ÎLÎ ¶ °±¼�´�¸ ° µ<¶ °±G·�·�· °±¡¼<´ Î�Î ¶ °±³¹�´s¸ ° µ<¶ °±G·�·�· °±º¹<´ Î�Î ¶ °±³²|´s¸ ° µ<¶ °±G·�·�· °±

Figure 8.4.1 showsthe result of this transformand its inversionfor¸ ­ µ

and¸ ­ÞÝ�Ý

. Notethat for

¸ ­ßÝLÝthe transformcompletelydisguisesthe airplane. Having usedonly integer

379

Page 388: Image Algebra by Ritter

arithmetic à�áIâ=ã�ä providesfor anexactinversionof the transformin bothcasesandthusallowsthe recoveryof the original image.

Figure 8.4.1 Masking and inversiontransform. The top row showsthe input imageonthe left and the resultingimagefor breakvalue å æèç on the right. The lowerrow showsthe effect when settingthe breakvalue at å~æ*éLé (left image)andthe invertedimagewich is identical to the sourceimagefor both breakvalues.

The foregoingexampleindicateshow imagescan be encryptedanddecrypted.Using large primes,the choice of combinationsbecomesextremely large, thus making the decodingtask computationallyprohibitive unlessthe basictemplateconfigurations,values,and k are known. Of course,messagesaswell as imagescan be encryptedusing thesetechniques.One may simply equatethe letter A with theinteger 1, the letter B with 2, etc. If the messageis enteredinto an array with 80 columns,then theinteger83 will be the smallestprime that will encodeand recoverthe messageexactly.

380

Page 389: Image Algebra by Ritter

Bibliography

[1] E. Bolker.Thefinite radontransform.In Proc.AMSSummerConferenceon IntegralGeometry, 1984.

[2] P.J.Davis. Circulant Matrices. JohnWiley and Sons,New York, NY, 1979.

[3] P. Diaconis. Projection pursuit for discrete data. Technical Report 148, Stanford University,Departmentof Statistics,1983.

[4] P. DiaconisandR.L. Graham.The discreteradontransformon z2k . PacificJournalof Mathematics,118(2):323–345,June1985.

[5] P.D.Gader.ImageAlgebraTechniquesfor Parallel Computationof DiscreteFourier TransformsandGeneralLinear Transforms. PhD thesis,University of Florida, Gainesville,FL, 1986.

[6] I.M. Gelfand,M.I. Graev,andN. Y. Vilenkin. GeneralizedFunctions. AcademicPress,New York,NY, 1966.

[7] K. Hoffman andR. Kunze.Linear Algebra. Prentice-Hall,EnglewoodClif fs, New Jersey,1971.

[8] T.W. Hungerford.Algebra. Springer-Verlag, New York, 1974.

[9] R. Keown. An Introductionto GroupRepresentationTheory. AcademicPress,New York, 1975.

[10] J. Kung. The radontransformof a combinatorialgeometry.Journalof CombinatorialTheory, SeriesA:97–102, 1974.

[11] W. Ledermann.Introductionto GroupCharacters. CambridgeUniversity Press,Cambridge,1977.

[12] Z.Z. ManseurandD.C. Wilson. Decompositionmethodsfor convolutionoperators.ComputerVision,Graphics,and ImageProcessing, 53(5):428–434,1991.

[13] F.D. Murnaghan.TheTheoryof GroupRepresentations. DoverPublications,Inc., New Yorck, 1963.

[14] J.M. Ortega.NumericalAnalysis:A secondcourse. AcademicPress,New York, London,1972.

[15] J.Radon.Ueberdiebestimmungvonfunctionendurhintegralwertelangsgewissermannigfaltigkeiten.Ber. Verb. der SaechischenAkademieder Wissenschaften, Math. Phys.Kl.(69):262–277,1917.

[16] G.X. Ritter and P.D. Gader.Imagealgebra:Techniquesfor parallel image processing.Journal ofParallel and Distributed Computing, 4(5):7–44,April 1987.

[17] A. Rosenfeldand A.C. Kak. Digital Picture Processing. Academic Press,New York, NY, 2ndedition, 1982.

[18] G. E. Trapp.Inversesof circulantmatricesandblock circulantmatrices.KyungpookMath. Journal,13(1):11–20,1973.

381

Page 390: Image Algebra by Ritter
Page 391: Image Algebra by Ritter

CHAPTER 9DECOMPOSITION AND INVERSION OF TEMPLA TES

OVER HEXAGONALL Y SAMPLED IMAGES

Most digitally sampledimage representationsemployedin digital image processingare basedonplacementsof pixels in a rectangulargrid form thatcorrespondsto tiling theplanewith squares.Reasonsfor interestin hexagonalgrids in imageprocessingarethat digital scenesin low resolutionimagesoftenlook morenatural whenpixelsarepresentedin hexagonalratherthanrectangulararrangement,hexagonscanbe groupedinto naturalaggregatesfor fast addressing,andsinceeachpoint in a hexagonalgrid hassix equal-distanceneighbors,the 4–neighbor/8–neighborproblemdoesnot exist.

Hexagonalgrids havebeenexaminedandusedby variousresearchersfor severaldecades.In 1963,B.H. McCormick proposedhexagonalgrids asa possiblearrayrepresentationfor planarimages[11]. in1969,M.J.E. Golay proposeda parallel computerfor hexagonalarrayprocessinganddevelopeda basictheoryfor hexagonalpatterntransformations[5]. Kendall Prestondevelopeda specialpurposecomputerarchitecturein 1971which wasbasedonhexagonalpatterntransformationsin orderto achievehigh-speedimageprocessingroutines[12]. In the early 1980’s, D. Lucasand L. Gibsonexploitedthe geometricadvantagesof the hexagonalrepresentationin applicationsto automatictarget recognition[2, 3, 4, 8, 9].NarendraAhuja investigatedpolygonaldecompositionsin 1983for hierarchicalimagerepresentationsintriangular,square,andhexagonallattices[1]. In 1983,D.K. ScholtenandS.G.Wilson showedthat thehexagonallatticeoutperformsthe rectangularlattice asa basisfor performingchaincodequantizationofline drawings[13]. Informativesummariesof thepropertiesof hexagonalarrayswith emphasison imageanalysisin the morphologicaldomaincanbe found in J. Serra’swork on mathematicalmorphology[14,15].

The main emphasisof this chapteris on the problemof templatedecompositionand inversionoverhexagonalarrays.Hexagonsorganizethemselvesnaturally into a hierarchyof snowflakeshapedregions.Thesetile the planeand consequentlyyield a simpler definition of circulancy. Unlike the circulancyof rectangulartiling of the plane,which yields a toroidal topology, the hexagonalanalogueyields thetopology of a circle. As a result, circulant templatesare mappedisomorphicallyinto a quotientof thering of polynomialsin onevariable. Thesepolynomialsareproductsof linear factorsover the complexnumbers. A polynomial will be invertible in the quotient ring whenevereachof its linear factors isinvertible. This resultsin a simple criterion for templateinvertibility.

9.1 Generalized Balanced Ternary

Balancedternaryis an addressingsystemproposedby D.E. Knuth for locating integersusing threesymbols[6]. Taking thesesymbolsto be the integers ê , ë , and ì , the needto addressnegativeintegersrequiresthat 2 will beusedin the role of the negativeinteger íîë . The resultingnotationfor the integersis shown in Figure 9.1.1. A look at this figure suggestshow to constructaddition and multiplicationtablesfor thesesymbolswhich, whenappliedsequentiallyin themannerof decimaloperations,will yieldstandardarithmetic. In order to makethings work analogousto integerarithmeticon the discretelinewe must have ë�ïðëñ�ë�ì , ëOï�ì"ñòê , ìôóLì"ñ.ë , etc.

383

Page 392: Image Algebra by Ritter

212 210 211 22 20 21 2 0õ 1 12 10 11 122 120 121

Figure 9.1.1 Balancedternarynotationfor integerscloseto 0.

GeneralizedBalancedTernary,abbreviatedGBT, extendsthe algebraicand geometricpropertiesofbalancedternary to higher dimensions[7]. The 2–dimensionalgeneralizedbinary ternary numbers,abbreviatedöø÷îùAú , wheredevelopedby L. GibsonandD. Lucasasa methodfor addressinga hexagonaltiling of Euclidean2–space[2, 3, 8, 9, 4]. They describethe hexagonaltiling as a hierarchyof cells,where at eachlevel in the hierarchynew cells are constructedaccordingto a rule of aggregation.Ahexagonand its six neighborsform the first level in this hierarchy(Fig. 9.1.2). Note that a first levelaggregatecan also tile 2–spaceand hasthe sameuniform adjacencypropertythat the hexagonaltilingpossesses.A first level aggregateandits six first level aggregateneighborsform a secondlevel aggregate(Fig. 9.1.3). The hierarchycontinuesin the obviousway. Figure9.1.4showsa third level aggregate.

Figure 9.1.2 The first level aggregate.

Figure 9.1.3 The secondlevel aggregate.

384

Page 393: Image Algebra by Ritter

Figure 9.1.4 The third level aggregate.

The û�üîýÿþ addressingmethodof the hierarchicaltiling is basedon the following scheme.A firstlevel aggregate��� is chosenand labeledwith the integers � through � as shownin Figure 9.1.5. Thecenterhexagonlabeled � is consideredas the origin.

Figure 9.1.5 The GBT addressof the first level aggregate.

The six first level aggregatesneighboring ��� are labeledwith the digits shownin Figure 9.1.6andform a secondlevel aggregate��� ; eachdigit is someintegerfrom � . Readingthesedigits from rightto left, the first digit correspondsto wherethe labeledhexagonis in its first level aggregate��� and theseconddigit correspondsto where ��� is in the secondlevel aggregate� � .

385

Page 394: Image Algebra by Ritter

Figure 9.1.6 The GBT addressof the secondlevel aggregate.

Figure 9.1.7 illustratesthe labeling schemeof the third level aggregatecentered at �� . Continuingin this manner,everyhexagonin the tiling will correspondto a uniquefinite sequence(an address)with

Figure 9.1.7 The GBT addressof the third level aggregate.

386

Page 395: Image Algebra by Ritter

entriesan integerfrom �� . Thus, the ������� systemcan be thoughtof as a set of all finite sequenceswith entriesfrom the set � � .9.2 GBT2 Arithmetic

The rationalefor using the ������ addressingschemedescribedin the previoussectionis rootedingeometryanda desirefor an efficient addressingsystemfor hexagonalarrayprocessing.The geometricbasisbecomesclear if one considersFigure 9.2.1 and the parallelogramlaw of vector addition. If thehexagonwith address0 is centeredat the origin of the plane,thenthe resultantof additionof the vectorwith terminalpoint at the centerof thehexagonlabeled1 with thevectorwhoseterminalpoint is locatedat the centerof the hexagonlabeled2 is the vectorwhoseterminalpoint is at the centerof the hexagonlabeled3; i.e., ��������� .

Figure 9.2.1 Addition of first level aggregate�� �!" addresses.

A quick checkshowsthat wheneverthe resultantof two vectorswhoseinitial points and terminalpointsarethe origin andthe centerof oneof the hexagonsin the first aggregate,respectively,is anothervectorin the first aggregate,thenthe �� �! " addressadditionthatyields the correspondingcorrectvectoraddition is simply addition #%$'&)( . In particular, *,+.-0/�1 , 2,+3-0/54 , and 16+.20/87 .

Proceedingto the secondlevel aggregate,we note that if we usevector additionwe shouldobtain9 +:2;/<2'1 . By examiningthe first aggregateand its surroundinghexagons(Fig. 9.2.2), oneobtainsasimple mechanismfor defining a new addition on the set =?> .

387

Page 396: Image Algebra by Ritter

Figure 9.2.2 The first level aggregateand its surroundinghexagons.

Theadditiontablecorrespondingto thevectoradditionin thefirst level aggregateis shownin Figure9.2.3. We mayview theadditiondefinedby this tablemuchin thesamemannerasadditionin thedecimalsystem.The sumof any two digits yields a remainderdigit and,potentially,a nonzerocarry digit. Forexample @BA:C0D5CFE hasa remainderof 4 anda carry of 3. Note that the remaindercorrespondsto theaddition GH@IAJCLKNM%OQPSR , while the carry is one of the two digits to be added.

+ 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 T�U�VXW addition table.

Thedigitwiseadditiondecomposestheadditiontableinto a remainderanda carrytableasillustratedin Figure 9.2.4. The digitwise arithmeticallows for the vectorially correctaddition of any two T�U�VW

388

Page 397: Image Algebra by Ritter

addresses.For example,the additionof the Y�Z�[\ addresses416 and346 is given by]_^L`a]cbL`d e bf5g d b^ dJhwhere(x) denotesthe carry digit x. Note that nonzerocarry digits in singledigit addition indicatethatthe vector sum lies in a different first level aggregate.

+ 1 2 3 4 5 6 + 1 2 3 4 5 6

1 2 3 4 5 6 0 1 1 0 3 0 1 0

2 3 4 5 6 0 1 2 0 2 2 0 0 6

3 4 5 6 0 1 2 3 3 2 3 0 0 0

4 5 6 0 1 2 3 4 0 0 0 4 5 4

5 6 0 1 2 3 4 5 1 0 0 5 5 0

6 0 1 2 3 4 5 6 0 6 0 4 0 6

Figure 9.2.4 Digitwise operationon Y�Zi[ \ with remaindertableon the left andcarry tableon theright.

Negationof GBT addressesis accomplishedon a digit by digit basis. The negativeof 0 is 0. Thenegativeof any other GBT digit d is the integer differencebetween7 and d; i.e., j�kml . Looking atFigure 9.1.5, one can easily infer that the negativeof a given digit lies on the oppositeside of 0. Toform the negativeof any other Y�Z�[\ addressone simply takesthe negativeof eachof its digits. Forinstance,the negativeof 123 is 654.

Subtraction is defined in terms of addition combined with negation in the usual way. Thusn k:oqp n f ]_rtsvuxwzya{}|LsI~Q� o ` . In particular,b h k d g p b h f.g d p�� .

Multiplication of Y�Zi[ \ addressesis similar to addition in that it is a digitwise operation. Themultiplication table (Figure hexa12) shows that the GBT product of two digits is just their integerproductmodulo 7. Multidigit multiplication in Y�Z�[\ is bestexplainedby example. To multiply 254by 62 we proceedas follows: � h�d� b �d g e ] p�� � � h�d `h � g ] p b � � h'd `h � b e ] p�Y�Zi[ \ o���� `Similarly, � hzh � � h p bz^ d

. Note that the multiplication of two Y�Z�[\ addressescan be viewed as� 1 2 3 4 5 6

1 1 2 3 4 5 6

2 2 4 6 1 3 5

Figure 9.2.5 Y�Z�[\ multiplication table. (Continued). . .

389

Page 398: Image Algebra by Ritter

3 3 6 2 5 1 4

4 4 1 5 2 6 3

5 5 3 1 6 4 2

6 6 5 4 3 2 1

Figure 9.2.5 ������ multiplication table.

multiplication of vectorsin 2–dimensionalspace;it is identicalwith multiplication of complexnumbers.That is, it addsanglesand multiplies magnitudes. In particular, it is commutative,associative,anddistributesover ������ addition. As a result, we a commutativering structurewhich is isomorphictoa subring of the complex numberswith addition correspondingto vector addition and multiplicationcorrespondingto complex multiplication.

9.3 Images on Hexagonal Arrays and Polynomial Rings

Let ��� denotethe subsetof ����� � addressesconsistingof all sequenceswhosefirst rightmost kentriesareequalto zero. Theset � � is closedunderadditionandmultiplication. Therefore,� � is an idealof the quotientring ������ . If ��� denotesthe correspondingquotientring ��������F��� , then ��� consistsof � � equivalenceclassesof addressesand theseaddressesare in one-to-onecorrespondencewith thehexagonsof the kth level aggregate��� [10, 17]. The effect of the quotient ring structureon ������arithmeticoperationsin a level k aggregateis to ignoreany carriesbeyondthe k leastsignificantdigits.This causesthe aggregateto wrap on itself in a toroidal fashion; i.e., any arithmeticoperationwhichwould normally result in a departurefrom the aggregateto anotherlevel will now reenterthe aggregateat someother location. For example, �����5�%���'�z� in the full ������ ring. In �%� the carry into thethird position is ignored so that �����8������� .

Addition of two images��� m¡£¢¥¤§¦ is definedas the usualpointwiseaddition:�0�: ¨�5©'ªc«��­¬xªc«§®a®°¯±¬xªc«¥®¥���ª}«¥®X�J ¥ªc«¥®­²�³Multiplication canalsobedefinedpointwise,yielding a commutativering structureon ¢ ¤ ¦ . Anotherringstructureon ¢ ¤ ¦ , which is pertinentto this chapter,is a convolutionring. Addition in this ring is againpointwiseaddition. However,multiplication is definedin termsof convolutionas

�µ´¶ ·� ¸ ªc«��¹¬xª}«§®N®°¯º¬Lª»«§®§�½¼¾�¿ ¤�À �?ªcÁ)®ÃÂ� ¥ªc«ÅÄÆÁÇ®�ÈÆ�where «ÅÄ·Á denotesthe subtractionin the quotientring �%���5������É�F��� . This multiplication links thepropertiesof the ring Ê»¢Ë¤ ¦ �t�µ��´QÌ closely to the structureof the � � elementring � � .

Another ring having � � elementsis ÍÎ À . An isomorphismÏ%¯±ÍÎ ÀÑÐ � � canbe definedby settingÏǪcÒL®§��Ò , ÏǪa��®��5� , and ÏǪ_Ó­®Ô� ÕÖØ× ÏǪa��® . Thus, ÏǪc�L®��5�B���I�.�,�5��� , ÏǪc�S®Ô�5�I�m�I���B�.�6�.��� , etc.

The fact that Ï is an isomorphismcan be showndirectly [10] but it is also a consequenceof a deeperisomorphismtheoremlinking the 7–adicintegerswith an extendedversionof the ������ which allowsinfinite strings of nonzerodigits [16].

390

Page 399: Image Algebra by Ritter

The inverseof the isomorphismÙ , Ú�ÛÜÙSÝSÞ;ß�à%áqâäãåaæ providesfor an elegantcorrespondencebetweenimageson the hexagonalarray à á and polynomials. With each image ç�è�é¥ê§ë , one canassociatea polynomial ì)í definedby ì)íLîcïtð�ÛòñóÉô ê æ ç?îöõSð_ï�÷¹ø óúù�ûFor two imagesa and b we have ì)íLîcïXð?ü¹ì�ýÇî_ïXðÔÛþñóÉô ê æ)ÿ î»õ)ð_ïS÷úø óHù��where ÿ Û<ç ��� by definition of polynomial multiplication. Also,ìSízî_ïXð�� ì ý îcïXð�ÛòñóÉô ê æ � çî}õSð�� � î»õ)ðØï ÷Hø óHù ûTherefore,the ring �cé ê�ë � � � � � is isomorphicto the quotientring of polynomials é � ï������ï å æ������

.

391

Page 400: Image Algebra by Ritter

Bibliography

[1] N. Ahuja.Onapproachesto polygonaldecompositionfor hierarchicalimagerepresentation.ComputerVision, Graphicsand ImageProcessing, 24:200–214,1983.

[2] L. GibsonandD. Lucas.Spatialdataprocessingusinggeneralizedbalancedternary.In Proceedingsof the IEEE Conferenceon ComputerVision andPatternRecognition, pages566–571,June1982.

[3] L. Gibson and D. Lucas. Vectorizationof raster imagesusing hierarchical methods.ComputerGraphicsand ImageProcessing, 20:82–89,1982.

[4] L. Gibson and D. Lucas. Pyramidalalgorithms for automatedtarget recognition.In Proceedingsof the IEEE National Aerospaceand Electronics Conference—NAE-CON, pages215–219,Dayton,Ohio, 1986.

[5] M.J.E. Golay. Hexagonalparallel pattern transformations.IEEE Transactionson Computers, C-18(8):733–740,August 1969.

[6] D.E. Knuth. TheArt of ComputerProgramming,SortingandSearching, volume3. Addison-Wesley,Reading,MA, 1973.

[7] D. Lucas.A multiplication in n-space.In ProceedingsAMS, number74, pages1–8, 1979.

[8] D. LucasandL. Gibson.Imagepyramidpartitions.In SeventhInternationalConferenceon PatternRecognition, pages230–233,Montreal, Canada,July 1984.

[9] D. LucasandL. Gibson.Techniquesto exploit the relationbetweenpolynomialrepresentationsandmomentsof pictures.In ProceedingsIEEE Conferenceon ComputerVision andPatternRecognition,pages183–143,San Francisco,CA, July 1985.

[10] D. LucasandL. Gibson.Templatedecompositionandinversionover hexagonalsampledimages.InImageAlgebraandMorphologicalImageProcessingII , volume1568of Proceedingsof SPIE, pages157–163,San Diego, CA, July 1991.

[11] B.H. McCormick. The Illinois patternrecognitioncomputer— ILLIAC III. IEEE TransactionsonElectronic Computers, 12:791–813,1963.

[12] K. Preston.Feature extraction by golay hexagonalpattern transforms. IEEE Transactions onComputers, C-20(9):1007–1014,September1971.

[13] D.K. ScholtenandS.G.Wilson.Chaincodingwith a hexagonallattice.IEEETransactionsonPatternAnalysisand MachineIntelligence, PAMI-5(5):526–533,1983.

[14] J. Serra.ImageAnalysisand MathematicalMorphology. AcademicPress,London,1982.

[15] J. Serra.ImageAnalysisandMathematicalMorphology,Volume2: Theoretical Advances. AcademicPress,New York, 1988.

[16] W. Zhang-Kitto. An IsomorphismTheorem betweenthe ExtendedGeneralizedBalancedTernaryNumbersand thep-adic Integers. Ph.D.dissertation,University of Florida, Gainesville,FL, 1991.

[17] W. Zhang-KittoandD.C. Wilson.An isomorphismtheorembetweenthe7–adicintegersandtheringassociatedwith a hexagonallattice. Journal of ApplicableAlgebrain Engineering,Communication,and Computation, pages269–285,April 1992.

392