Formal Introduction to Digital Image Processing
Total Page:16
File Type:pdf, Size:1020Kb
MINISTÉRIO DA CIÊNCIA E TECNOLOGIA INSTITUTO NACIONAL DE PESQUISAS ESPACIAIS INPE–7682–PUD/43 Formal introduction to digital image processing Gerald Jean Francis Banon INPE São José dos Campos July 2000 Preface The objects like digital image, scanner, display, look–up–table, filter that we deal with in digital image processing can be defined in a precise way by using various algebraic concepts such as set, Cartesian product, binary relation, mapping, composition, opera- tion, operator and so on. The useful operations on digital images can be defined in terms of mathematical prop- erties like commutativity, associativity or distributivity, leading to well known algebraic structures like monoid, vector space or lattice. Furthermore, the useful transformations that we need to process the images can be defined in terms of mappings which preserve these algebraic structures. In this sense, they are called morphisms. The main objective of this book is to give all the basic details about the algebraic ap- proach of digital image processing and to cover in a unified way the linear and morpholog- ical aspects. With all the early definitions at hand, apparently difficult issues become accessible. Our feeling is that such a formal approach can help to build a unified theory of image processing which can benefit the specification task of image processing systems. The ultimate goal would be a precise characterization of any research contribution in this area. This book is the result of many years of works and lectures in signal processing and more specifically in digital image processing and mathematical morphology. Within this process, the years we have spent at the Brazilian Institute for Space Research (INPE) have been decisive. This second edition contains many small improvements which are the result of our teaching experience at INPE during the years of 1998, 1999 and 2000. The major of them are the intoduction of poset graphs which give a better foundation to the Hasse diagram in Chaper 1 and the introduction of two types of window operators in Chapter 4. São José dos Campos, July 2000. Gerald Jean Francis Banon i Content Figure list v 1 Digital image 1.1 Image definition . 1. 1.2 Image characterization. 5 1.3 Some mathematical definitions and properties. 13 2 Image moments 2.1 Image as a vector . 31. 2.2 Image as a random variable. 34 2.3 Principal component analysis. 41 2.4 Some mathematical definitions and properties. 48 3 Pointwise enhancement 3.1 Look–up–table . 61. 3.2 Spatially invariant pointwise operator. 71 3.3 Spatially invariant pointwise morphism. 78 3.4 Enhancement technique. 87 3.5 Some mathematical definitions and properties. 89 4 Filtering 4.1 Measure. 111 4.2 Spatially invariant window operator. 129 4.3 Spatially invariant window morphism. 137 4.4 Linear and morphological window operators. 163 4.5 Some mathematical definitions and properties. 168 Bibliography 173 Index 175 iii Figure list 1.1 – A set of squares. 2 1.2 – A gray–scale. 2 1.3 – Cartesian product of a set of squares and a gray–scale. 2 1.4 – A pixel. 2 1.5 – An image. 3 1.6 – An image as a subset of a Cartesian product. 3 1.7 – A Cartesian product subset which is an image. 4 1.8 – A Cartesian product subset. 4 1.9 – A Cartesian product subset. 4 1.10 – A Cartesian product subset. 4 1.11 – A numerical array. 5 1.12 – Image characterization in terms of mapping. 6 1.13 – Four squares in a set of squares. 6 1.14 – The poset–isomorphism for an image domain. 8 1.15 – The poset–isomorphism for a gray–scale. 8 1.16 – Two composites used in the image characterization. 9 1.17 – Image characterization in terms of matrix. 9 1.18 – A scanner and a display device. 10 1.19 –Relationship between an image and an array of natural numbers. 12 1.20 – Two binary relations. 14 1.21 – A mapping. 15 1.22 – Image of a set through a mapping. 15 1.23 – Image inverse of a set through a mapping. 16 1.24 – Composite of two mappings. 17 1.25 – Composition of mappings. 17 1.26 – Composition associativity. 18 1.27 – Left and right inverses of a mapping. 19 1.28 – Graph–of–a–mapping characterization. 21 1.29 – Partial ordering characterizations. 28 1.30 – Hasse diagrams of four posets. 29 1.31 – Hasse diagram of the direct product of a two–elements chain. 29 1.32 – Partial order and covering. 29 1.33 – Poset–isomorphism and none poset–isomorphism. 30 2.1 – Real extension of an image. 32 2.2 – Operations on images. 33 2.3 – Multiplication on images. 33 2.4 – Two images with different means. 35 2.5 – The decomposition of an image. 36 2.6 – Two images with different variances. 37 v 2.7 – An image and one of its binary component. 39 2.8 – The histogram of an image. 40 2.9 – Optimal solution for the best contrast problem. 42 2.10 – Principal component construction. 43 2.11 – Pixel values of an image. 46 2.12 – Image transform. 46 2.13 – Pixel value rotation. 47 2.14 – Mapping restriction. 48 2.15 – Nullary, unary and binary operations. 49 2.16 – Commutativity and associativity of a binary operation. 49 2.17 – Unit element for a binary operation. 50 2.18 – Distributivity of a binary operation over another one. 50 2.19 – Operations on vectors of the plane. 52 2.20 – Operation extensions. 56 3.1 – Two linear luts. 64 3.2 – Some elementary morphological luts. 65 3.3 – Some compagnion luts. 67 3.4 – Sum of two linear luts and product of a linear lut by a scalar.. 69 3.5 – Supremum and infimum of two luts. 70 3.6 – Two constant luts. 70 3.7 – An image operator. 71 3.8 – A spatially invariant pointwise operator.. 75 3.9 – Internal and external binary operations on image operators. 75 3.10 – Morphism between luts and operators. 77 3.11 – Isomorphism. 81 3.12 – Two equivalent implementations when the lut is a morphism. 82 3.13 – Two equivalent implementations when the luts are morphisms. 82 3.14– Operations on images. 84 3.15 – An enhancement operator. 87 3.16 – An analog to digital converter. ..