Digital image Processing Second edition Rafael C. gonzalez University of Tennessee Richard e woods MedData interactive Prentice Hall Prentice hall Upper Saddle River, New jersey 07458
Digital Image Processing Second Edition Rafael C. Gonzalez University of Tennessee Richard E. Woods MedData Interactive Prentice Hall Upper Saddle River, New Jersey 07458 GONZFM-i-xxii. 5-10-2001 14:22 Page iii
Library of Congress Cataloging-in-Pubblication Data Gonzalez. Rafael C. Digital Image Processing Richard E Woods N0-201 1. Digital Imaging. 2. Digital Techniques. I. Title. TA1632G662001 2001035846 Vice-President and Editorial Director. ECS: Marcia. Horton Publisher: tom robbins Associate Editor: Alice Dworkin Editorial Assistant: Jody McDonnell Vice President and director of production and manufacturing ESM: David w riccardi Executive Managing Editor: Vince O Brien Managing Editor: David A. George Production editor: rose kernan Composition: Prepare, Inc. Director of Creative Services: Paul Belfanti Creative Director: Carole anson Art Director and cover designer: heather scott Art Editor: Greg Dulles Manufacturing Manager: Trudy Pisciotta Manufacturing Buyer: Lisa McDowell Senior Marketing Manager: Jennie Burger Prentis o 2002 by Prentice-Hall Inc. Upper Saddle River, New Jersey 07458 All rights reserved. No part of this book may be produced, in any form or by any means, without permission in writing from the publisher include the development, research, and testing of the theories and programs to determine thel o The author and publisher of this book have used their best efforts in preparing this book. These efforts effectiveness. The author and publisher make no warranty of any kind, expressed or implied, with regard to these programs or the documentation contained in this book. The author and publisher shall not be liable in any event for incidental or consequential damages in connection with, or arising out of, the furnishing, performance, or use of these programs. Printed in the united States of america 10987654321 IsBN:口-己01-1吕075-吕 Pearson Education ltd. London Pearson Education Australia Ptv, Limited, Sydney Pearson Education Singapore, Pte. Ltd Pearson Education North Asia Ltd, Hong Kong Pearson Education Canada Ltd, Toronto Pearson Education de mexico. s.A. de C.v. Pearson Education--Japan, Toky Pearson Education Malaysia, Pte Ltd Education, Upper Saddle River, New Jersey
Library of Congress Cataloging-in-Pubblication Data Gonzalez, Rafael C. Digital Image Processing / Richard E. Woods p. cm. Includes bibliographical references ISBN 0-201-18075-8 1. Digital Imaging. 2. Digital Techniques. I. Title. TA1632.G66 2001 621.3—dc21 2001035846 CIP Vice-President and Editorial Director, ECS: Marcia J. Horton Publisher: Tom Robbins Associate Editor: Alice Dworkin Editorial Assistant: Jody McDonnell Vice President and Director of Production and Manufacturing, ESM: David W. Riccardi Executive Managing Editor: Vince O’Brien Managing Editor: David A. George Production Editor: Rose Kernan Composition: Prepare, Inc. Director of Creative Services: Paul Belfanti Creative Director: Carole Anson Art Director and Cover Designer: Heather Scott Art Editor: Greg Dulles Manufacturing Manager: Trudy Pisciotti Manufacturing Buyer: Lisa McDowell Senior Marketing Manager: Jennie Burger © 2002 by Prentice-Hall, Inc. Upper Saddle River, New Jersey 07458 All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher. The author and publisher of this book have used their best efforts in preparing this book. These efforts include the development, research, and testing of the theories and programs to determine their effectiveness. The author and publisher make no warranty of any kind, expressed or implied, with regard to these programs or the documentation contained in this book. The author and publisher shall not be liable in any event for incidental or consequential damages in connection with, or arising out of, the furnishing, performance, or use of these programs. Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 ISBN: 0-201-18075-8 Pearson Education Ltd., London Pearson Education Australia Pty., Limited, Sydney Pearson Education Singapore, Pte. Ltd. Pearson Education North Asia Ltd., Hong Kong Pearson Education Canada, Ltd., Toronto Pearson Education de Mexico, S.A. de C.V. Pearson Education—Japan, Tokyo Pearson Education Malaysia, Pte. Ltd. Pearson Education, Upper Saddle River, New Jersey GONZFM-i-xxii. 5-10-2001 14:22 Page iv
Preface When something can be read without effort, great effort has gone into its writing Enrique Jardiel Poncela This edition is the most comprehensive revision of Digital Image Processing since the book first appeared in 1977. As the 1977 and 1987 editions by gonzalez and Wintz, and the 1992 edition by Gonzalez and Woods, the present edition was prepared with students and instructors in mind. Thus, the principal objectives of the book continue to be to provide an introduction to basic concepts and methodologies for digital image processing, and to develop a foundation that can be used as the basis for further study and research in this field. To achieve these objectives, we again focused on material that we believe is fundamental and has a scope of application that is not limited to the solution of specialized prob- lems. The mathematical complexity of the book remains at a level well within the grasp of college seniors and first-year graduate students who have intro- ductory preparation in mathematical analysis, vectors, matrices, probability, sta- tistics, and rudimentary computer programming. so The present edition was influenced significantly by a recent market survey 1. A need for more motivation in the introductory chapter regarding the spec- trum of applications of digital image processing 2. A simplification and shortening of material in the early chapters in order to"get to the subject matter"as quickly as possible. 3. A more intuitive presentation in some areas, such as image transforms and restoration 4. Individual chapter coverage of color image processing, wavelets, and image morphology. 5. An increase in the breadth of problems at the end of each chapter The reorganization that resulted in this edition is our attempt at providing a reasonable degree of balance between rigor in the presentation, the findings of the market survey, and suggestions made by students, readers, and colleagues since the last edition of the book. The major changes made in the book are as Chapter 1 was rewritten completely. The main focus of the current treatment is on examples of areas that use digital image processing. While far from ex- haustive, the examples shown will leave little doubt in the reader's mind re garding the breadth of application of digital image processing methodologies. Chapter 2 is totally new also. The focus of the presentation in this chapter is on how digital images are generated, and on the closely related concepts of
Preface When something can be read without effort, great effort has gone into its writing. Enrique Jardiel Poncela This edition is the most comprehensive revision of Digital Image Processing since the book first appeared in 1977.As the 1977 and 1987 editions by Gonzalez and Wintz, and the 1992 edition by Gonzalez and Woods, the present edition was prepared with students and instructors in mind.Thus, the principal objectives of the book continue to be to provide an introduction to basic concepts and methodologies for digital image processing, and to develop a foundation that can be used as the basis for further study and research in this field.To achieve these objectives, we again focused on material that we believe is fundamental and has a scope of application that is not limited to the solution of specialized problems. The mathematical complexity of the book remains at a level well within the grasp of college seniors and first-year graduate students who have introductory preparation in mathematical analysis, vectors, matrices, probability, statistics, and rudimentary computer programming. The present edition was influenced significantly by a recent market survey conducted by Prentice Hall. The major findings of this survey were: 1. A need for more motivation in the introductory chapter regarding the spectrum of applications of digital image processing. 2. A simplification and shortening of material in the early chapters in order to “get to the subject matter” as quickly as possible. 3. A more intuitive presentation in some areas, such as image transforms and image restoration. 4. Individual chapter coverage of color image processing, wavelets, and image morphology. 5. An increase in the breadth of problems at the end of each chapter. The reorganization that resulted in this edition is our attempt at providing a reasonable degree of balance between rigor in the presentation, the findings of the market survey, and suggestions made by students, readers, and colleagues since the last edition of the book. The major changes made in the book are as follows. Chapter 1 was rewritten completely.The main focus of the current treatment is on examples of areas that use digital image processing. While far from exhaustive, the examples shown will leave little doubt in the reader’s mind regarding the breadth of application of digital image processing methodologies. Chapter 2 is totally new also.The focus of the presentation in this chapter is on how digital images are generated, and on the closely related concepts of xv GONZFM-i-xxii. 5-10-2001 14:22 Page xv
xVI■ Preface sampling, aliasing, Moire patterns, and image zooming and shrinking. The new material and the manner in which these two chapters were reorganized address directly the first two findings in the market survey mentioned above Chapters 3 though 6 in the current edition cover the same concepts as Chap- ters 3 through 5 in the previous edition, but the scope is expanded and the pre sentation is totally different. In the previous edition, Chapter 3 was devoted exclusively to image transforms. One of the major changes in the book is that image transforms are now introduced when they are needed. This allowed us to begin discussion of image processing techniques much earlier than before, fur- ther addressing the second finding of the market survey. Chapters 3 and 4 in the current edition deal with image enhancement, as opposed to a single chapter Chapter 4)in the previous edition. The new organization of this material does not imply that image enhancement is more important than other areas. Rather we used it as an avenue to introduce spatial methods for image processing Chapter 3), as well as the Fourier transform, the frequency domain, and image filtering( Chapter 4). Our purpose for introducing these concepts in the context of image enhancement(a subject particularly appealing to beginners) was to in- crease the level of intuitiveness in the presentation, thus addressing partially the third major finding in the marketing survey. This organization also gives in- structors flexibility in the amount of frequency-domain material they wish to cover Chapter 5 also was rewritten completely in a more intuitive manner. The coverage of this topic in earlier editions of the book was based on matrix theory. Although unified and elegant, this type of presentation is difficult to follow, particularly by undergraduates. The new presentation covers essentially the same ground, but the discussion does not rely on matrix theory and is much easier to understand, due in part to numerous new examples. The price paid for this newly gained simplicity is the loss of a unified approach, in the sense tha in the earlier treatment a number of restoration results could be derived from one basic formulation On balance, however, we believe that readers(especial ly beginners)will find the new treatment much more appealing and easier to fol- low Also, as indicated below the old material is stored in the book Web site for easy access by individuals preferring to follow a matrix-theory formulation. Chapter 6 dealing with color image processing is new. Interest in this area has increased significantly in the past few years as a result of growth in the use of digital images for Internet applications. Our treatment of this topic represents a significant expansion of the material from previous editions. Similarly Chap- ter 7, dealing with wavelets, is new. In addition to a number of signal process ing applications, interest in this area is motivated by the need for more sophisticated methods for image compression, a topic that in turn is motivated by a increase in the number of images transmitted over the Internet or stored in Web servers. Chapter 8 dealing with image compression was updated to in- clude new compression methods and standards, but its fundamental structure remains the same as in the previous edition. Several image transforms, previously d in Chapter 3 and whose principal use is compression, were moved to chapter
sampling, aliasing, Moiré patterns, and image zooming and shrinking. The new material and the manner in which these two chapters were reorganized address directly the first two findings in the market survey mentioned above. Chapters 3 though 6 in the current edition cover the same concepts as Chapters 3 through 5 in the previous edition, but the scope is expanded and the presentation is totally different. In the previous edition, Chapter 3 was devoted exclusively to image transforms. One of the major changes in the book is that image transforms are now introduced when they are needed.This allowed us to begin discussion of image processing techniques much earlier than before, further addressing the second finding of the market survey. Chapters 3 and 4 in the current edition deal with image enhancement, as opposed to a single chapter (Chapter 4) in the previous edition.The new organization of this material does not imply that image enhancement is more important than other areas. Rather, we used it as an avenue to introduce spatial methods for image processing (Chapter 3), as well as the Fourier transform, the frequency domain, and image filtering (Chapter 4). Our purpose for introducing these concepts in the context of image enhancement (a subject particularly appealing to beginners) was to increase the level of intuitiveness in the presentation, thus addressing partially the third major finding in the marketing survey.This organization also gives instructors flexibility in the amount of frequency-domain material they wish to cover. Chapter 5 also was rewritten completely in a more intuitive manner. The coverage of this topic in earlier editions of the book was based on matrix theory. Although unified and elegant, this type of presentation is difficult to follow, particularly by undergraduates. The new presentation covers essentially the same ground, but the discussion does not rely on matrix theory and is much easier to understand, due in part to numerous new examples.The price paid for this newly gained simplicity is the loss of a unified approach, in the sense that in the earlier treatment a number of restoration results could be derived from one basic formulation. On balance, however, we believe that readers (especially beginners) will find the new treatment much more appealing and easier to follow.Also, as indicated below, the old material is stored in the book Web site for easy access by individuals preferring to follow a matrix-theory formulation. Chapter 6 dealing with color image processing is new. Interest in this area has increased significantly in the past few years as a result of growth in the use of digital images for Internet applications. Our treatment of this topic represents a significant expansion of the material from previous editions. Similarly Chapter 7, dealing with wavelets, is new. In addition to a number of signal processing applications, interest in this area is motivated by the need for more sophisticated methods for image compression, a topic that in turn is motivated by a increase in the number of images transmitted over the Internet or stored in Web servers. Chapter 8 dealing with image compression was updated to include new compression methods and standards, but its fundamental structure remains the same as in the previous edition. Several image transforms, previously covered in Chapter 3 and whose principal use is compression, were moved to this chapter. xvi ■ Preface GONZFM-i-xxii. 5-10-2001 14:22 Page xvi
XVII Chapter 9, dealing with image morphology, is new. It is based on a signifi- cant expansion of the material previously included as a section in the chapt on image representation and description. Chapter 10, dealing with image seg mentation, has the same basic structure as before, but numerous new examples were included and a new section on segmentation by morphological watersheds was added. Chapter 11, dealing with image representation and description, was shortened slightly by the removal of the material now included in Chapter 9 New examples were added and the Hotelling transform( description by princi pal components), previously included in Chapter 3, was moved to this chapter Chapter 12 dealing with object recognition was shortened by the removal of topics dealing with knowledge-based image analysis, a topic now covered in considerable detail in a number of books which we reference in Chapters l and 12. Experience since the last edition of Digital Image Processing indicates that the new, shortened coverage of object recognition is a logical place at which to conclude the book Although the book is totally self-contained, we have established a co nAn on web site(see inside front cover)designed to provide support to users of the book For students following a formal course of study or individuals embarked on a program of self study, the site contains a number of tutorial reviews on background material such as probability, statistics, vectors, and matrices, pre pared at a basic level and written using the same notation as in the book Detailed solutions to many of the exercises in the book also are provided. For instruction, the site contains suggested teaching outlines, classroom presentation materials, laboratory experiments, and various image databases(including most images from the book ). In addition, part of the material removed from the pre- vious edition is stored in the Web site for easy download and classroom use, at the discretion of the instructor a downloadable instructor ' s manual containing sample curricula, solutions to sample laboratory experiments, and solutions to all problems in the book is available to instructors who have adopted the book for classroom use This edition of Digital Image Processing is a reflection of the significant progress that has been made in this field in just the past decade. As is usual in a project such as this, progress continues after work on the manuscript stops. One of the reasons earlier versions of this book have been so well accepted through- out the world is their emphasis on fundamental concepts, an approach that, among other things, attempts to provide a measure of constancy in a rapid evolving body of knowledge. We have tried to observe that same principle in preparing this edition of the book RCG R.E.. W
Chapter 9, dealing with image morphology, is new. It is based on a significant expansion of the material previously included as a section in the chapter on image representation and description. Chapter 10, dealing with image segmentation, has the same basic structure as before, but numerous new examples were included and a new section on segmentation by morphological watersheds was added. Chapter 11, dealing with image representation and description, was shortened slightly by the removal of the material now included in Chapter 9. New examples were added and the Hotelling transform (description by principal components), previously included in Chapter 3, was moved to this chapter. Chapter 12 dealing with object recognition was shortened by the removal of topics dealing with knowledge-based image analysis, a topic now covered in considerable detail in a number of books which we reference in Chapters 1 and 12. Experience since the last edition of Digital Image Processing indicates that the new, shortened coverage of object recognition is a logical place at which to conclude the book. Although the book is totally self-contained, we have established a companion web site (see inside front cover) designed to provide support to users of the book. For students following a formal course of study or individuals embarked on a program of self study, the site contains a number of tutorial reviews on background material such as probability, statistics, vectors, and matrices, prepared at a basic level and written using the same notation as in the book. Detailed solutions to many of the exercises in the book also are provided. For instruction, the site contains suggested teaching outlines, classroom presentation materials, laboratory experiments, and various image databases (including most images from the book). In addition, part of the material removed from the previous edition is stored in the Web site for easy download and classroom use, at the discretion of the instructor.A downloadable instructor’s manual containing sample curricula, solutions to sample laboratory experiments, and solutions to all problems in the book is available to instructors who have adopted the book for classroom use. This edition of Digital Image Processing is a reflection of the significant progress that has been made in this field in just the past decade. As is usual in a project such as this, progress continues after work on the manuscript stops. One of the reasons earlier versions of this book have been so well accepted throughout the world is their emphasis on fundamental concepts, an approach that, among other things, attempts to provide a measure of constancy in a rapidlyevolving body of knowledge. We have tried to observe that same principle in preparing this edition of the book. R.C.G. R.E.W. ■ Preface xvii GONZFM-i-xxii. 5-10-2001 14:22 Page xvii
Digital image Processing Second edition Rafael C. gonzalez University of Tennessee Richard e woods MedData interactive Prentice Hall Prentice hall Upper Saddle River, New jersey 07458
Digital Image Processing Second Edition Rafael C. Gonzalez University of Tennessee Richard E. Woods MedData Interactive Prentice Hall Upper Saddle River, New Jersey 07458 GONZFM-i-xxii. 5-10-2001 14:22 Page iii
Library of Congress Cataloging-in-Pubblication Data Gonzalez. Rafael C. Digital Image Processing Richard E Woods N0-201 1. Digital Imaging. 2. Digital Techniques. I. Title. TA1632G662001 2001035846 Vice-President and Editorial Director. ECS: Marcia. Horton Publisher: tom robbins Associate Editor: Alice Dworkin Editorial Assistant: Jody McDonnell Vice President and director of production and manufacturing ESM: David w riccardi Executive Managing Editor: Vince O Brien Managing Editor: David A. George Production editor: rose kernan Composition: Prepare, Inc. Director of Creative Services: Paul Belfanti Creative Director: Carole anson Art Director and cover designer: heather scott Art Editor: Greg Dulles Manufacturing Manager: Trudy Pisciotta Manufacturing Buyer: Lisa McDowell Senior Marketing Manager: Jennie Burger Prentis o 2002 by Prentice-Hall Inc. Upper Saddle River, New Jersey 07458 All rights reserved. No part of this book may be produced, in any form or by any means, without permission in writing from the publisher include the development, research, and testing of the theories and programs to determine thel o The author and publisher of this book have used their best efforts in preparing this book. These efforts effectiveness. The author and publisher make no warranty of any kind, expressed or implied, with regard to these programs or the documentation contained in this book. The author and publisher shall not be liable in any event for incidental or consequential damages in connection with, or arising out of, the furnishing, performance, or use of these programs. Printed in the united States of america 10987654321 IsBN:口-己01-1吕075-吕 Pearson Education ltd. London Pearson Education Australia Ptv, Limited, Sydney Pearson Education Singapore, Pte. Ltd Pearson Education North Asia Ltd, Hong Kong Pearson Education Canada Ltd, Toronto Pearson Education de mexico. s.A. de C.v. Pearson Education--Japan, Toky Pearson Education Malaysia, Pte Ltd Education, Upper Saddle River, New Jersey
Library of Congress Cataloging-in-Pubblication Data Gonzalez, Rafael C. Digital Image Processing / Richard E. Woods p. cm. Includes bibliographical references ISBN 0-201-18075-8 1. Digital Imaging. 2. Digital Techniques. I. Title. TA1632.G66 2001 621.3—dc21 2001035846 CIP Vice-President and Editorial Director, ECS: Marcia J. Horton Publisher: Tom Robbins Associate Editor: Alice Dworkin Editorial Assistant: Jody McDonnell Vice President and Director of Production and Manufacturing, ESM: David W. Riccardi Executive Managing Editor: Vince O’Brien Managing Editor: David A. George Production Editor: Rose Kernan Composition: Prepare, Inc. Director of Creative Services: Paul Belfanti Creative Director: Carole Anson Art Director and Cover Designer: Heather Scott Art Editor: Greg Dulles Manufacturing Manager: Trudy Pisciotti Manufacturing Buyer: Lisa McDowell Senior Marketing Manager: Jennie Burger © 2002 by Prentice-Hall, Inc. Upper Saddle River, New Jersey 07458 All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher. The author and publisher of this book have used their best efforts in preparing this book. These efforts include the development, research, and testing of the theories and programs to determine their effectiveness. The author and publisher make no warranty of any kind, expressed or implied, with regard to these programs or the documentation contained in this book. The author and publisher shall not be liable in any event for incidental or consequential damages in connection with, or arising out of, the furnishing, performance, or use of these programs. Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 ISBN: 0-201-18075-8 Pearson Education Ltd., London Pearson Education Australia Pty., Limited, Sydney Pearson Education Singapore, Pte. Ltd. Pearson Education North Asia Ltd., Hong Kong Pearson Education Canada, Ltd., Toronto Pearson Education de Mexico, S.A. de C.V. Pearson Education—Japan, Tokyo Pearson Education Malaysia, Pte. Ltd. Pearson Education, Upper Saddle River, New Jersey GONZFM-i-xxii. 5-10-2001 14:22 Page iv
Contents Preface xu Acknowledgements xviii About the authors xix Introduction 15 1.1 What Is Digital Image Processing? 1.2 The Origins of Digital Image Processing 17 1.3 Examples of Fields that Use Digital Image Processing 21 1.3.1 Gamma-Ray Imaging 22 1.3.2 X-ray Imaging 23 1.3.3 Imaging in the Ultraviolet Band 2 1.3.4 Imaging in the Visible and Infrared Bands 26 1.3.5 Imaging in the Microwave Band 32 1.3.6 Imaging in the Radio Band 34 1.3.7 Examples in which Other Imaging Modalities Are Used 34 1.4 Fundamental Steps in Digital Image Processing 39 1.5 Components of an Image Processing System 42 References and Further Reading 45 Digital Image Fundamentals 34 2.1 Elements of Visual Perception 34 2.1.1 Structure of the Human Eye 35 2.1.2 Image Formation in the Eye 37 2.1.3 Brightness Adaptation and Discrimination 38 2.2 Light and the Electromagnetic Spectrum 42 2.3 Image Sensing and Acquisition 45 2.3.1 Image Acquisition Using a Single Sensor 47 2.3.2 Image Acquisition Using Sensor Strips 48 2.3.3 Image Acquisition Using Sensor Arrays 49 2.3.4 A Simple Image Formation Model 50 2.4 Image Sampling and Quantization 52 2.4.1 Basic Concepts in Sampling and Quantization 52 2.4.2 Representing Digital Images 54 2.4.3 Spatial and Gray-Level Resolution 57 2.4.4 Aliasing and Moire Patterns 62 2.4.5 Zooming and Shrinking Digital Images 64 vI
Contents Preface xv Acknowledgements xviii About the Authors xix 1 Introduction 15 1.1 What Is Digital Image Processing? 15 1.2 The Origins of Digital Image Processing 17 1.3 Examples of Fields that Use Digital Image Processing 21 1.3.1 Gamma-Ray Imaging 22 1.3.2 X-ray Imaging 23 1.3.3 Imaging in the Ultraviolet Band 25 1.3.4 Imaging in the Visible and Infrared Bands 26 1.3.5 Imaging in the Microwave Band 32 1.3.6 Imaging in the Radio Band 34 1.3.7 Examples in which Other Imaging Modalities Are Used 34 1.4 Fundamental Steps in Digital Image Processing 39 1.5 Components of an Image Processing System 42 Summary 44 References and Further Reading 45 2 Digital Image Fundamentals 34 2.1 Elements of Visual Perception 34 2.1.1 Structure of the Human Eye 35 2.1.2 Image Formation in the Eye 37 2.1.3 Brightness Adaptation and Discrimination 38 2.2 Light and the Electromagnetic Spectrum 42 2.3 Image Sensing and Acquisition 45 2.3.1 Image Acquisition Using a Single Sensor 47 2.3.2 Image Acquisition Using Sensor Strips 48 2.3.3 Image Acquisition Using Sensor Arrays 49 2.3.4 A Simple Image Formation Model 50 2.4 Image Sampling and Quantization 52 2.4.1 Basic Concepts in Sampling and Quantization 52 2.4.2 Representing Digital Images 54 2.4.3 Spatial and Gray-Level Resolution 57 2.4.4 Aliasing and Moiré Patterns 62 2.4.5 Zooming and Shrinking Digital Images 64 vii GONZFM-i-xxii. 5-10-2001 14:22 Page vii
vil■ Contents 2.5 Some Basic Relationships Between Pixels 66 5.1 Neighbors of a Pixel 5.2 Adjacency, Connectivity, Regions, and Boundaries 66 2.5.3 Distance Measures 68 2.5.4 Image Operations on a Pixel Basis 69 2.6 Linear and Nonlinear Operations 70 eferences and Further Reading 70 Problems 71 Image enhancement in the spatial domain 75 3.1 Background 76 3.2 Some Basic Gray Level Transformations 78 3.2.1 Image Negatives 78 3.2.2 Log Transformations 79 3.2.3 Power-Law Transformations 80 3.2.4 Piecewise-Linear Transformation Functions 85 3.3 Histogram Processing 88 3.3.1 Histogram Equalization 91 3. 2 Histogram Matching(Specification) 94 3.3.3 Local Enhancement 103 3.3.4 Use of Histogram Statistics for Image Enhancement 103 3.4 Enhancement Using Arithmetic/Logic Operations 108 3.4.1 Image Subtraction 110 3.4.2 Image Averaging 112 3.5 Basics of Spatial Filtering 116 3.6 Smoothing Spatial Filters 119 3.6.1 Smoothing Linear Filters 119 3.6.2 Order-Statistics Filters 12 3.7 Sharpening Spatial Filters 125 3.7.1 Foundation 125 3.7.2 Use of Second Derivatives for Enhancement- The Laplacian 128 3.7.3 Use of first Derivatives for enhancement--The gradient 1 Combining Spatial Enhancement Methods 137 41 References and Further reading 142 Problems 142 Image enhancement in the Frequency Domain 147 4.1 Background 148
2.5 Some Basic Relationships Between Pixels 66 2.5.1 Neighbors of a Pixel 66 2.5.2 Adjacency, Connectivity, Regions, and Boundaries 66 2.5.3 Distance Measures 68 2.5.4 Image Operations on a Pixel Basis 69 2.6 Linear and Nonlinear Operations 70 Summary 70 References and Further Reading 70 Problems 71 3 Image Enhancement in the Spatial Domain 75 3.1 Background 76 3.2 Some Basic Gray Level Transformations 78 3.2.1 Image Negatives 78 3.2.2 Log Transformations 79 3.2.3 Power-Law Transformations 80 3.2.4 Piecewise-Linear Transformation Functions 85 3.3 Histogram Processing 88 3.3.1 Histogram Equalization 91 3.3.2 Histogram Matching (Specification) 94 3.3.3 Local Enhancement 103 3.3.4 Use of Histogram Statistics for Image Enhancement 103 3.4 Enhancement Using Arithmetic/Logic Operations 108 3.4.1 Image Subtraction 110 3.4.2 Image Averaging 112 3.5 Basics of Spatial Filtering 116 3.6 Smoothing Spatial Filters 119 3.6.1 Smoothing Linear Filters 119 3.6.2 Order-Statistics Filters 123 3.7 Sharpening Spatial Filters 125 3.7.1 Foundation 125 3.7.2 Use of Second Derivatives for Enhancement– The Laplacian 128 3.7.3 Use of First Derivatives for Enhancement—The Gradient 134 3.8 Combining Spatial Enhancement Methods 137 Summary 141 References and Further Reading 142 Problems 142 4 Image Enhancement in the Frequency Domain 147 4.1 Background 148 viii ■ Contents GONZFM-i-xxii. 5-10-2001 14:22 Page viii
4.2 Introduction to the Fourier Transform and the Frequency Domain 149 4.2.1 The One-Dimensional Fourier Transform and its Inverse 150 4.2.2 The Two-Dimensional DFT and Its Inverse 154 4.2.3 Filtering in the Frequency Domain 15 4.2.4 Correspondence between Filtering in the Spatial and Frequency domains 161 4.3 Smoothing Frequency-Domain Filters 167 4.3.1 Ideal Lowpass Filters 167 4.3.2 Butterworth Lowpass Filters 173 4.3.3 Gaussian Lowpass Filters 175 4.3.4 Additional Examples of Lowpass Filtering 4.4 Sharpening Frequency Domain Filters 180 4.4.1 Ideal Highpass Filters 182 4.4.2 Butterworth Highpass Filters 183 4.4.3 Gaussian Highpass Filters 184 4.4.4 The Laplacian in the Frequency Domain 185 4.4.5 Unsharp Masking, High-Boost Filtering and High-Frequency Emphasis Filtering 18 4.5 Homomorphic Filtering 191 4.6 Implementation 194 4.6.1 Some Additional Properties of the 2-D Fourier Transform 194 4.6.2 Computing the Inverse Fourier Transform Using a Forward Transform Algorithm 198 4.6.3 More on Periodicity: the Need for Padding 199 4.6.4 The Convolution and Correlation Theorems 205 4.6.5 Summary of Properties of the 2-D Fourier Transform 208 4.6.6 The Fast Fourier Transform 208 4.6.7 Some Comments on Filter Design 213 Summary 214 References 214 Problems 215 Image Restoration 220 5.1 A Model of the Image Degradation/Restoration Process 221 5.2 Noise models 222 5.2.1 Spatial and Frequency Properties of Noise 222 5.2.2 Some Important Noise Probability Density Functions 222 5.2.3 Periodic Noise 227 5.2.4 Estimation of Noise Parameters 227 5.3 Restoration in the Presence of Noise Only-Spatial Filtering 230 5.3.1 Mean Filters 231 5.3.2 Order-Statistics Filters 233 5.3.3 Adaptive Filters 237
4.2 Introduction to the Fourier Transform and the Frequency Domain 149 4.2.1 The One-Dimensional Fourier Transform and its Inverse 150 4.2.2 The Two-Dimensional DFT and Its Inverse 154 4.2.3 Filtering in the Frequency Domain 156 4.2.4 Correspondence between Filtering in the Spatial and Frequency Domains 161 4.3 Smoothing Frequency-Domain Filters 167 4.3.1 Ideal Lowpass Filters 167 4.3.2 Butterworth Lowpass Filters 173 4.3.3 Gaussian Lowpass Filters 175 4.3.4 Additional Examples of Lowpass Filtering 178 4.4 Sharpening Frequency Domain Filters 180 4.4.1 Ideal Highpass Filters 182 4.4.2 Butterworth Highpass Filters 183 4.4.3 Gaussian Highpass Filters 184 4.4.4 The Laplacian in the Frequency Domain 185 4.4.5 Unsharp Masking, High-Boost Filtering, and High-Frequency Emphasis Filtering 187 4.5 Homomorphic Filtering 191 4.6 Implementation 194 4.6.1 Some Additional Properties of the 2-D Fourier Transform 194 4.6.2 Computing the Inverse Fourier Transform Using a Forward Transform Algorithm 198 4.6.3 More on Periodicity: the Need for Padding 199 4.6.4 The Convolution and Correlation Theorems 205 4.6.5 Summary of Properties of the 2-D Fourier Transform 208 4.6.6 The Fast Fourier Transform 208 4.6.7 Some Comments on Filter Design 213 Summary 214 References 214 Problems 215 5 Image Restoration 220 5.1 A Model of the Image Degradation/Restoration Process 221 5.2 Noise Models 222 5.2.1 Spatial and Frequency Properties of Noise 222 5.2.2 Some Important Noise Probability Density Functions 222 5.2.3 Periodic Noise 227 5.2.4 Estimation of Noise Parameters 227 5.3 Restoration in the Presence of Noise Only–Spatial Filtering 230 5.3.1 Mean Filters 231 5.3.2 Order-Statistics Filters 233 5.3.3 Adaptive Filters 237 ■ Contents ix GONZFM-i-xxii. 5-10-2001 14:22 Page ix