Rafael C. Gonzalez
University of Tennessee
Richard E. Woods
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
Includes bibliographical references
1. Digital Imaging. 2. Digital Techniques. I. Title.
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
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
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.
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 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
4. Individual chapter coverage of color image processing, wavelets, and image
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
GONZFM-i-xxii. 5-10-2001 14:22 Page xv
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 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
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 (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
covered in Chapter 3 and whose principal use is compression, were moved to
xvi ■ Preface
GONZFM-i-xxii. 5-10-2001 14:22 Page xvi
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 chapter
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 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 compan-
ion 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 rapidly-
evolving body of knowledge. We have tried to observe that same principle in
preparing this edition of the book.
GONZFM-i-xxii. 5-10-2001 14:22 Page xvii