Pierre Soille Morphological Image Analysis Springer-Verlag Berlin Heidelberg GmbH Pierre Soille Morphological Image Analysis Principles and Applications Second Edition Corrected second printing With 260 Figures , Springer Dr. Pierre Soille EC Joint Research Centre Via Enrico Fermi 1, T.P.262 21020 Ispra (Va) ltaly e-mail: [email protected] Library of Congress Cataloging-in-Publication Data SoiIle, Pierre. (Morphologische Bildverarbeitung. English) Morphological image analysis: principles and applications 1 Pierre SoiIle.--md ed ISBN 978-3-642-07696-1 ISBN 978-3-662-05088-0 (eBook) DOI 10.1007/978-3-662-05088-0 1. Image analysis. 2. Image processing--Mathematics. 3. Morphisms (Mathematics) I. Title TA1637.S6513 2002 621.36'7--dc21 2002030513 ISBN 978-3-642-07696-1 This work is subject to copyright. AII rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcast ing, reproduction on microfilm or in other ways, and storage in data banks. Duplication ofthis publica tion or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained hom Springer-Verlag Berlin Heidelberg GmbH. Violations are liable to prosecution under German Copyright Law. springeronline.com © Springer-V erlag Berlin Heidelberg 2003 and 2004 Origina11y published by Springer-V erlag Berlin Heidelberg N ew York in 2004 Softcover reprint of the hardcover 2nd edition 2004 The use of general descriptive names, registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. Typesetting: Digital data supplied by author Cover-Design: deblik, Berlin Printed on acid-free paper 62/3020 Rw 543210 To the memory of my father, Andre Soille (1923-2002) Preface to the second edition Following the success of the first edition, recent developments in the field of morphological image analysis called for an extended second edition. This was not an easy task because any single modification and extension had to be care fully evaluated for preserving a coherent structure. The text has been fully revised with the goal of improving its clarity while introducing new concepts of interest to real image analysis applications. The skeleton of the book en joys one additional bone in the form of a chapter devoted to texture analysis. Flesh around the initial bones has grown by more than 20 percent leading to a total of 391 pages (including 39 additional figures, 3 new tables, 93 extra bibliographical references, as well as 1 supplementary index). This increase has been distributed more or less evenly across all chapters. Main extensions include: discussion about multichannel images and their morphological pro cessing, ordering relations on image partitions, connected operators and level lings, homotopy for grey tone images, translation-invariant implementations of erosions and dilations by line segments, reinforced emphasis on rank-based morphological operators, grey tone hit-or-miss, ordered independent homoto pic thinnings and anchored skeletons, self-dual geodesic transformation and reconstruction, area based self-dual filters, anti-centre, watershed-based tex ture segmentation, texture models, and a series of new scientific and industrial applications. Chapters on erosions/dilations and openings/closings have been made more concise by moving notions such as the morphological covariance and granulometries to the texture analysis chapter. The first edition in English has been published in 1999 while I was with the Silsoe Research Institute (SRI) located in Silsoe, England. I am indebted to all members of the image analysis group led by Robin Tillett for intro ducing me to the captivating world of computer vision applied to agri-food industries. John Marchant from this group deserves special thanks for sug gestions he made on a draft of the revised 'background notions' chapter. In December 1999, I joined the Space Applications Institute of the EC Joint Research Centre (JRC) established in Ispra, Italy. This opened an avenue for the application of mathematical morphology (MM) to Pan-European geospa tial data sets. I am very grateful to all JRC staff I have been in contact with since my arrival and especially to all members of the advanced methods sec tor led by Joannis Kanellopoulos. Martino Pesaresi deserves a special thank Vlll for sparkling ideas and great enthusiasm for applying MM to earth obser vation imagery. I have also the pleasure to acknowledge Philippe Caperan, Daniele Ehrlich, and Jurgen Vogt for their interest in the application of MM to their projects. Beyond my colleagues at work, I wish to thank all people interested in image analysis I have been in touch with since the last edition of this book. Their encouragements, suggestions, or simply eager to learn and apply morphological image analysis to real problems have been a constant source of motivation and inspiration for the completion of this second edition. Feedback from readers has always been very much appreciated. In particular, I would like to credit Michel Kocher for regular correspondence and sugges tions. Special thanks to Dietrich Stoyan for his interest to the first edition of this book including his comments on the first edition in German. The chapter on texture analysis is based on a paper published in a volume of the Lecture Notes in Physics co-edited by Dietrich Stoyan and Klaus Mecke. I am thank ful to them for their comments and suggestions on the early version of the paper. Many thanks also to Robert Magerle for his openness and interest in applying morphology to atomic force microscopy images, Henk Heijmans for many fruitful discussions at the JRC and CWI, Christian Ronse for his advices, Hugues Talbot for his visit to SRI and the collaborative work we did on directional morphology, Vincent Ranwez for the joint work on order in dependent thinnings, Laurent Misson for the tree ring project, Paul Whelan for the watermark project, Gunilla Borgefors, Vito Di Gesu, Joachim Ohser, Pramod Rastogi, Gerald Sommer, Michela Spagnuolo, Cesare Valenti, and Rein van den Boomgaard for inviting me to give lectures in conjunction with seminars, conferences, or postgraduate courses. Finally, the greatest change since the last edition is the arrival of my son Simon in March 2000. He and my wife Sabine motivated me to speed up the production of this second edition during the many sacrificed evenings and holidays. I am enormously thankful to them for their understanding and support. I hope you will appreciate this new edition and find it useful. In any case, I will be very grateful to hear from you for further comments and suggestions. Preface to the first edition In 1992, by the time I was finishing my doctorate thesis jointly at the Ecole des Mines de Paris and the Universite catholique de Louvain, my former colleague Jean-Franc;ois Rivest and I have had the opportunity to organise a tutorial course about morphological image processing during an interna tional conference held in The Hague. The success of this course as well as others organised later in Sydney, Delft, Quebec City, and Brisbane rapidly convinced me that there was a need for an application-oriented book present ing the principles and latest developments of morphological image analysis. The intent of the present book is to fulfil this need. The book is self-contained in the sense that it is accessible to engineers, scientists, and practitioners having no prior experience with morphology. In addition, most necessary background notions about digital image processing are covered. The emphasis being put on the techniques useful for solving prac tical problems rather than the theory underlying mathematical morphology, no special knowledge about set theory and topology is required. Neverthe less, the book goes well beyond an introduction to mathematical morpho logy. Indeed, starting from the fundamental transformations, more elaborate methods which have proved their practical usefulness are explained. This is achieved through a step by step process pursued until the most recent ad vances. The successful completion of this book has been very challenging because there are now many teams around the world participating to the fruitful de velopment of morphology and working on a wide variety of topics ranging from the definition of new filters to the design of novel algorithmic tech niques. Inevitably, some subjects are more detailed than others due to my own experience and research activities. Bibliographical notes and references are included at the end of each chapter to help the reader finding further readings on a specific theme. The total number of distinct references equals 364. Each chapter dealing with a well defined topic, only 30 of references appear on more than one chapter. Acknowledgements are due to all people involved with image analysis and whom I met since 1988 when I begun my research activities in this fascinating field. Their dedication to both applied and theoretical research has been a constant source of inspiration for the writing of this book. Naming all these x people would be a very difficult and dangerous exercise since I would surely forget some of them. Nevertheless, I wish to express my deep acknowledge ments to Jean Serra's group of the Centre de Morphologie Mathematique of the Ecole des Mines de Paris which I worked with during four years. This book would never have been published without the very fruitful discussions and joint research projects I have had with the group members and the many people who visited the Centre during my stay. Mark Berman's image analysis group of the Commonwealth Scientific and Industrial Research Organisation, Mathematical and Information Sciences (Sydney) which I visited in 1992- 1993 and September 1997 also deserves special thanks. The comments and suggestions of all group members concerning preliminary versions of this book helped me a lot. Moreover, their constant interest in my book project motiv ated me to pursue it. The pattern recognition department of the Fraunhofer Institut fur Produktionsanlagen und Konstruktionstechnik (Berlin) which I visited in 1993 and 1995 has been a real chance for me to be confronted with the many technical aspects regarding the application of image analysis to industrial applications. Thanks a lot to Bertram Nickolay and all members of his department. I am also indebted to Tilman Jochems for many advises and helpful discussions following the reading of a draft copy of this book. Piero Zamperoni from the Technische Universitiit Braunschweig deserves my deep gratitude for its kind encouragements, the very careful reading of the German version of this book, and the many discussions and thorough sugges tions. Thanks are also due to Bernd Jiihne from the Universitiit Heidelberg and Paul Whelan from the Dublin City University for their interest in my book project. In addition, I wish to acknowledge the Ecole des Mines d'Ales and its Laboratoire de Genie Informatique et d'Ingenierie de la Production, site EERIE (Nimes) where I have been lecturing and pursuing my research activities during the period 1995-1998. I would like to conclude in gratitude to Sabine Miiller who shared with me the necessary motivation for successfully achieving this book. In addition, the former German version of this book would never have been written without her help. For comments and suggestions aiming at improving and extending the present book, I would like to thank all readers in advance. Contents 1. Introduction.............................................. 1 1.1 Origin of mathematical morphology. . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Scope of morphological image analysis .................... 4 1.2.1 Image filtering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.2 Image segmentation .............................. 6 1.2.3 Image measurements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.2.4 Some other tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3 Book organisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 11 1.4 Bibliographical notes and references ...................... 12 2. Background Notions.. . . . . . .. .. .. . . .. . . .. . . .. .. .... .. . .. .. 15 2.1 From continuous to discrete spaces ....................... 15 2.2 Discrete images ........................................ 17 2.2.1 Binary image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 17 2.2.2 Grey tone image ................................. 18 2.2.3 Multichannel image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 21 2.3 Image to image transformations . . . . . . . . . . . . . . . . . . . . . . . . .. 22 2.3.1 Point image transformations. . . . . . . . . . . . . . . . . . . . . .. 23 2.3.2 Neighbourhood image transformations. . . . . . . . . . . . .. 24 2.4 Set operators applied to images .......................... 26 2.5 Ordering relations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 29 2.5.1 On pixel intensity values .......................... 29 2.5.2 On images and image transformations.. . . . . . . . . . . . .. 30 2.5.3 On set partitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 31 2.5.4 Links to lattice theory ............................ 32 2.6 Discrete geometry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 32 2.6.1 Graphs.......................................... 32 2.6.2 Grids and connectivity. . . . . . . . . . . . . . . . . . . . . . . . . . .. 35 2.6.3 Discrete boundaries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 38 2.6.4 Discrete lines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 40 2.6.5 Convexity....................................... 43 2.7 Discrete distances and distance functions. . . . . . . . . . . . . . . . .. 45 2.7.1 Definitions ...................................... 45 2.7.2 Computation.................................... 47 2.8 Image transformation properties. . . . . . . . . . . . . . . . . . . . . . . . .. 49 2.9 Bibliographical notes and references ...................... 57