Digital Image Processing
Rafael C. Gonzalez
University of Tennessee
Richard E. Woods
Interapptics
330 Hudson Street, New York, NY 10013
Senior Vice President Courseware Portfolio Management: Marcia J. Horton
Director, Portfolio Management: Engineering, Computer Science & Global Editions:
Julian Partridge
Portfolio Manager: Julie Bai
Field Marketing Manager: Demetrius Hall
Product Marketing Manager: Yvonne Vannatta
Marketing Assistant: Jon Bryant
Content Managing Producer, ECS and Math: Scott Disanno
Content Producer: Michelle Bayman
Project Manager: Rose Kernan
Operations Specialist: Maura Zaldivar-Garcia
Manager, Rights and Permissions: Ben Ferrini
Cover Designer: Black Horse Designs
Cover Photo: MRI image—Author supplied; Rose—Author supplied; Satellite image of
Washington, D.C.—Courtesy of NASA; Bottles—Author supplied; Fingerprint—
Courtesy of the National Institute of Standards and Technology; Moon IO of Jupiter—
Courtesy of NASA
Composition: Richard E. Woods
Copyright © 2018, 2008 by Pearson Education, Inc. Hoboken, NJ 07030. All rights
reserved. Manufactured in the United States of America. This publication is protected by
copyright and permissions should be obtained from the publisher prior to any prohibited
reproduction, storage in a retrieval system, or transmission in any form or by any means,
electronic, mechanical, photocopying, recording, or otherwise. For information regarding
permissions, request forms and the appropriate contacts within the Pearson Education
Global Rights & Permissions department, please visit www.pearsoned.com/
permissions/.
Many of the designations by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in this book, and the publisher
was aware of a trademark claim, the designations have been printed in initial caps or all
caps. 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 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 with, or
arising out of, the furnishing, performance, or use of these programs.
Pearson Education Ltd., London
Pearson Education Singapore, Pte. Ltd
Pearson Education Canada, Inc.
Pearson Education Japan
Pearson Education Australia PTY, Ltd
Pearson Education North Asia, Ltd., Hong Kong
Pearson Education de Mexico, S.A. de C.V.
Pearson Education Malaysia, Pte. Ltd.
Pearson Education, Inc., Hoboken
MATLAB is a registered trademark of The MathWorks, Inc., 1 Apple Hill Drive, Natick,
MA 01760-2098.
Library of Congress Cataloging-in-Publication Data
Names: Gonzalez, Rafael C., author. | Woods, Richard E. (Richard Eugene), author.
Title: Digital Image Processing / Rafael C. Gonzalez, University of Tennessee, Richard
E. Woods, Interapptics.
Description: New York, NY : Pearson, [2018] | Includes bibliographical references and
index.
Identifiers: LCCN 2017001581 | ISBN 9780133356724
Subjects: LCSH: Image processing--Digital techniques.
Classification: LCC TA1632 .G66 2018 | DDC 621.36/7--dc23
LC record available at https://lccn.loc.gov/2017001581
1 16
ISBN-10: 0-13-335672-8
ISBN-13: 9780133356724
www.pearsonhighered.com
Contents
Cover
Title Page
Copyright
Dedication
Preface ix
Acknowledgments xiii
The Book Website xiv
The DIP4E Support Packages xiv
About the Authors xv
1 Introduction 1
What is Digital Image Processing? 2
The Origins of Digital Image Processing 3
Examples of Fields that Use Digital Image Processing 7
Fundamental Steps in Digital Image Processing 25
Components of an Image Processing System 28
2 Digital Image Fundamentals 31
Elements of Visual Perception 32
Light and the Electromagnetic Spectrum 38
Image Sensing and Acquisition 41
Image Sampling and Quantization 47
Some Basic Relationships Between Pixels 63
Introduction to the Basic Mathematical Tools Used in Digital Image
Processing 67
3 Intensity Transformations and Spatial Filtering 133
Background 134
Some Basic Intensity Transformation Functions 136
Histogram Processing 147
Fundamentals of Spatial Filtering 177
Smoothing (Lowpass) Spatial Filters 188
Sharpening (Highpass) Spatial Filters 199
Highpass, Bandreject, and Bandpass Filters from Lowpass Filters 212
Combining Spatial Enhancement Methods 216
Using Fuzzy Techniques for Intensity Transformations and Spatial Filtering
217
4 Filtering in the Frequency Domain 249
Background 250
Preliminary Concepts 253
Sampling and the Fourier Transform of Sampled Functions 261
The Discrete Fourier Transform of One Variable 271
Extensions to Functions of Two Variables 276
Some Properties of the 2-D DFT and IDF 286
The Basics of Filtering in the Frequency Domain 306
Image Smoothing Using Lowpass Frequency Domain Filters 318
Image Sharpening Using Highpass Filters 330
Selective Filtering 342
The Fast Fourier Transform 349
5 Image Restoration and Reconstruction 365
A Model of the Image Degradation/Restoration process 366
Noise Models 366
Restoration in the Presence of Noise Only—Spatial Filtering 375
Periodic Noise Reduction Using Frequency Domain Filtering 388
Linear, Position-Invariant Degradations 396
Estimating the Degradation Function 400
Inverse Filtering 404
Minimum Mean Square Error (Wiener) Filtering 406
Constrained Least Squares Filtering 411
Geometric Mean Filter 415
Image Reconstruction from Projections 416
6 Wavelet and Other Image Transforms 451
Preliminaries 452
Matrix-based Transforms 454
Correlation 466
Basis Functions in the Time-Frequency Plane 467
Basis Images 471
Fourier-Related Transforms 472
Walsh-Hadamard Transforms 484
Slant Transform 488
Haar Transform 490
Wavelet Transforms 492
7 Color Image Processing 529
Color Fundamentals 530
Color Models 535
Pseudocolor Image Processing 550
Basics of Full-Color Image Processing 559
Color Transformations 560
Color Image Smoothing and Sharpening 572
Using Color in Image Segmentation 575
Noise in Color Images 582
Color Image Compression 585
8 Image Compression and Watermarking 595
Fundamentals 596
Huffman Coding 609
Golomb Coding 612
Arithmetic Coding 617