没有合适的资源?快使用搜索试试~ 我知道了~
首页Digital Image Processing Using Matlab (Gonzalez).pdf
Digital Image Processing Using Matlab (Gonzalez).pdf
需积分: 49 474 浏览量
更新于2023-05-24
评论
收藏 70.57MB PDF 举报
数字图像处理冈萨雷斯英文原版,仅用于学习交流及研究,祝各位能在图像处理领域越走越远
资源详情
资源评论
资源推荐

Con
tents
I
1
Preface
xi
I
Ack~zowledglnents
xii
t
About the Authors
xiii
Inf~oducfion
1
Previezv
1
Background
1
What Is Digital Image Processing?
2
Background on MATLAB and the Image Processing Toolbox
4
Areas of Image Processing Covered in the Book
5
The Book Web Site
6
Notation
7
The MATLAB Working Environment
7
1.7.1 The MATLAB Desk top 7
1.7.2 Using the
MATLAB Editor to Create M-Files
9
1.7.3 Getting Help
9
1.7.4 Saving and Retrieving a Work Session 10
How References Are Organized in the Book
11
Summary
11
!
c
2
Fundamentals
12
5
Preview
12
d
2.1
Digital Image Representation
12
i
2.1.1 Coordinate Conventions 13
2.1.2 Images as Matrices 14
9.2
Reading Images
14
'
2.3
Displaying Images
16
2.4
Writing Images
18
!
2.5
Data Classes
23
2.6
ImageTypes
24
j
2.6.1 Intensity Images 214
t
2.6.2 Binary Images 25
)i
2.6.3 A Note on Terminology 25
;
2.7
Converting between Data Classes and Image Types
25
:
2.7.1 Converting between Data Classes 25
I
2.7.2 Converting between Image Classes and Types 26
;
2.8
Array Indexing
30
2.8.1 VectorIndexing 30-
2.8.2 Matrix Indexing 32
I
2.8.3 Selecting Array Dimensions 37

a%l
Contents
iay
Contents
vii
2.9
Some Important Standard Arrays
37
2.10
Introduction to M-Function Programming
38
2.10.1 M-Files 38
2.10.2
Operatclrs 40
2.10.3 Flow Control 49
2.10.4 Code Optimization 55
2.10.5 Interactive 1/0 59
2.10.6 A Brief [ntroduction to Cell Arrays and Structures 62
Summary
64
3
Intensity Tmnsforma tions
and Spatial Filtering
65
Preview
65
3.1
Background
65
3.2.
Intensity Transformation Functions
66
3.2.1 Function irnad
j
ust
66
3.2.2 Logarithmic and Contrast-Stretching
T~ansformations 68
3.2.3 Some Utility M-Functions for Intensity Transformations 70
3.3
Histogram Processing and Function Plotting
76
3.3.1 Generating and Plotting Image Histograms 76
3.3.2 Histogram Equalization 81
3.3.3 Histogram Matching (Specification) 84
3.41
Spatial Filtering
89
3.4.1 Linear !Spatial Filtering 89
3.4.2
Nonlin12ar Spatial Filtering 96
:3.Ei
Image Processing Toolbox Standard Spatial Filters
99
3.5.1 Linear !Spatial Filters 99
3.5.2 Nonlinear Spatial Filters 104
Summary
107
4
Frequency Domain Processing
108
Preview 108
4.Z
The
2-D
Discirete Fourier Transform
108
4.2
Computing aind Visualizing the
2-D
DFT in MATLAB
112
4.3
Filtering in the Frequency Domain
115
4.3.1 Fundamental Concepts 115
4.3.2 Basic Steps in
DFT
Filtering 121
4.3.3 An M-function for Filtering in the Frequency Domain 122
4.4
Obtaining Frequency Domain Filters from Spatial Filters
122
4..5
Generating Filters Directly in the Frequency Domain
127
4.5.1
Creating Meshgrid Arrays for Use in Implementing Filters
in the
Izrequency Domain 128
4.5.2
Lowpass Frequency Domain Filters 129
4.5.3
Wireframe and Surface Plotting 132
1
4.6
Sharpening Frequency Domain Fillers
136
i
Y
4.6.1 Basic Highpass Filtering 136
t
4.6.2 High-Frequency Emphasis Filtering 138
Summary
140
I,
r
i
;
Image Restoration
141
f
Preview
141
i
5.1
A Model of the Image DegradationIRestoration Process
142
;
5.2
Noise Models
143
<
i
5.2.1 Adding Noise with Function
lrnnoise
143
5.2.2 Generating Spatial Random Noise with a Specified
7'
Distribution 144
$
5.2.3 Periodic Noise 150
3
5.2.4 Estimating Noise Parameters 153
,
5.3
Restoration in the Presence of Noise Only-Spatial Filtering
158
i
5.3.1 Spatial Noise Filters 159
5.3.2 Adaptive Spatial Filters 164
j
5.4
Periodic Noise Reduction by Frequency Domain Filtering
166
5
5.5
Modeling the Degradation Function
166
5.6
Direct Inverse Filtering
169
1
5.7
Wiener Filtering
170
1
5.8
Constrained Least Squares (Regularized) Filtering
173
'
5.9
Iterative Nonlinear Restoration Using the Lucy-Richardson
I
Algorithm
176
5.10
Blind Deconvolution
179
r
5.11
Geometric Transformations and Image Registration
182
5
5.11.1 Geometric Spatial Transformations 182
1
5.11.2 Applying Spatial Transformations to Images 187
'*
t
5.11.3 Image Registration 191
I
Summary
193
4
i
6
cozov
Image Pvocessing
I
94
Preview
194
6.1
Color Image Representation in
MATLAB
194
i
6.1.1
RGB
Images 194
t
E
6.1.2 Indexed Images 197
i
6.1.3 IPT Functions for Manipulating RGB and Indexed Images 199
6.2
Converting to Other Color Spaces
204
i
i
6.2.1 NTSC Color Space 204
'r
6.2.2 The YCbCr Color Space 205
i
t
6.2.3 The HSV Color Space 205
6.2.4 The CMY and CMYK Color Spaces 206
1
6.2.5 The HSI Color Space 207
6.3
The Basics of Color Image Processing
215
'
6.4
Color Transformations
216

.3
Contents
6.5
Spatial Filtering of Color Images
227
6.5.1 Color Image Smoothing 227
6.5.2 Color Image Sharpening 230
6.6
Working Directly in RGB Vector Space
231
6.6.1 Color Edge Detection Using the Gradient 232
6.6.2 Image Segmentation in RGB Vector Space 237
Summary
241
7
/
Wavelets 242
Preview 242
7.1
Background
242
7.2
The Fast Wavelet Transform
245
7.2.1 FWTs Using the Wavelet Toolbox 246
7.2.2
FWTs without the Wavelet Toolbox 252
7.3
Working with Wavelet Decomposition Structures
259
7.3.1
Editing Wavelet Decomposition Coefficients without
the Wavelet Toolbox 262
7.3.2 Displaying Wavelet Decomposition Coefficients 266
7.4
The Inverse Fast Wavelet Transform
271
7.5
Wavelets in Image Processing
276
Summary
281
8
Image Compression 282
Preview 282
8.1
Background
283
8.2
Coding Redundancy
286
8.2.1 Huffman Codes 289
8.2.2
Huffman Encoding 295
8.2.3
Huffman Decoding 301
8.3
Interpixel Redundancy
309
8.4
Psychovisual Redundancy
315
8.5
JPEG Compression
317
8.5.1 JPEG 318
8.5.2 JPEG 2000 325
Summary
333
9
Morphological Image Processing
334
Preview 334
9.1
Preliminaries
335
9.1.1 Some Basic Concepts from Set Theory 335
9.1.2 Binary Images, Sets, and Logical Operators 337
9.2
Dilation and Erosion
337
9.2.1 Dilation 338
9.2.2 Structuring Element Decomposition 341
9.2.3 The st
re1
Function 341
9.2.4 Erosion 345
P
Contents
ix
Combining Dilation and Erosion
347
9.3.1 Opening and Closing 347
9.3.2
The Hit-or-Miss Transformation 350
9.3.3 Using Lookup Tables 353
9.3.4
Functionbwrnorph 356
Labeling Connected Components
359
Morphological Reconstruction
362
9.5.1 Opening by Reconstruction 363
9.5.2 Filling Holes 365
9.5.3 Clearing Border Objects 366
Gray-Scale Morphology
366
9.6.1 Dilation and Erosion 366
9.6.2 Opening and Closing 369
9.6.3 Reconstruction 374
Summary
377
1
0
Image Segmentation
378
Preview 378
10.1
Point, Line, and Edge Detection
379
10.1.1 Point Detection 379
10.1.2 Line Detection 381
10.1.3 Edge Detection Using Function
edge
384
1
10.2
Line Detection Using the Hough Transform
393
I
10.2.1 Hough Transform 13eak Detection 399
10.2.2 Hough Transform Line Detection and Linking 401
j
10.3
Thresholding
404
10.3.1 Global Thresholding 405
10.3.2 Local Thresholding 407
10.4
Region-Based Segmentation
407
10.4.1 Basic Formulation 407
10.4.2 Region Growing 408
4
t
10.4.3 Region Splitting and Merging 412
1
10.5
Segmentation Using the Watershed Transform
417
t
10.5.1 Watershed Segmentation Using the Distance Transform 418
h
10.5.2 Watershed Segmentation Using Gradients 420
i
10.5.3 Marker-Controlled Watershed Segmentation 422
I
Summary
425
i
I
I
Representation and Description 426
11.1
Background
426
I
11.1.1 Cell Arrays and Structures 427
I
11.1.2 Some Additional MATLAB and IPT Functions Used
in This Chapter 432
11.1.3 Some Basic Utility M-Functions 433

U
Contents
311.2
Representation
436
11.2.1 Chain Codes 436
11.2.2 Polygonal Approximations Using Minimum-Perimeter
Polygons 439
11.2.3 Signatures 449
11.2.4
Boundary Segments 452
11.2.5 Skeletons 453
l1.3
Boundary Descriptors
455
11.3.1 Some Simple Descriptors 455
11.3.2 Shape Numbers 456
11.3.3 Fourier Descriptors 458
11.3.4 Statistical Moments 462
11.4
Regional Descriptors
463
11.4.1 Functic~n regionprops 463
11.4.2 Texture 464
11.4.3 Moment Invariants 470
11.5
Using Principal Components for Descriptio~n
474
Summary
403
1
2
Object Recognition
484
Preview
484
12.1
Background
484
12..2
Computing Distance Measures in MATLAB
485
12..3
Recognition Based on Decision-Theoretic Methods
488
12.3.1 Forming Pattern Vectors 488
12.3.2
Pattern, Matching Using Minimum-Distance Classifiers
489
12.3.3 Matching by Correlation 490
12.3.4 Optimum Statistical Classifiers 492
12.3.5 Adaptive Learning Systems 498
12Y.4
Structural Recognition
498
12.4.1 Working with Strings in MATLAB
499
12.4.2 String Matching 508
Summary
513
Appendix
A
Function Summary
514
Appendix
B
ICE and
MATLAB
Graphical
User Interfaces
527
Appendix
C
M- unctions
552
Bibliography
594
Index
597
Preface
Solutions to problems in the field of digital image processing generally require
extensive experimental work involving software simulation and testing with large sets
of sample images. Although algorithm development typically is based on theoretical
underpinnings, the actual implementation of these algorithms almost always requires
parameter estimation and, frequently, algorithm revision and comparison of candidate
solutions. Thus, selection of a flexible, comprehensive, and well-documented software
development environment is a key factor that has important implications in the cost,
development time, and portability of image processing solutions.
In spite of its importance, surprisingly little has been written on this aspect of the
field in the form of textbook material dealing with both theoretical principles and soft-
ware implementation of digital image processing concepts. This book was written for
just this purpose. Its main objective is to provide a foundation for implementing image
processing algorithms using modem software tools.
A
complementary objective was to
prepare a book that is self-contained and easily readable by individuals with a basic
background in digital image processing, mathematical analysis, and computer pro-
gramming, all at a level typical of that found in a
junior/senior curriculum in a techni-
cal discipline. Rudimentary knowledge of
MATLAB also is desirable.
To achieve these objectives, we felt that two key ingredients were needed. The
first was to select image processing material that is representative of material cov-
ered in a formal course of instruction in this field. The second was to select soft-
ware tools that are well supported and documented, and which have a wide range
of applications in the "real" world.
To meet the first objective, most of the theoretical concepts in the following chapters
were selected from
Digital Image Processing
by Gonzalez and Woods, which has been
the choice introductory textbook used by educators
all over the world for over two
decades.'Ihe software tools selected are from the MATLAB Image Processing Toolbox
(R),
which similarly occupies a position of eminence in both education and industrial
app1ications.A basic strategy followed in the preparation of the book was to provide a
seamless integration of well-established theoretical concepts and their implementation
using state-of-the-art software tools.
The book is organized along the same lines as
Digital Image Processing.
In this way,
the reader has easy access to a more detailed treatment of all the image processing
concepts discussed here, as well as an up-to-date set of references for further reading.
Following this approach made it possible to present theoretical material in a succinct
manner and thus we were able to maintain a focus on the software implementation as-
pects of image processing problem solutions. Because it works in the
MATLAB com-
puting environment, the Image Processing Toolbox offers some significant advantages,
not only in the breadth of its computational tools, but also because it is supported
under most operating systems in use
t0day.A unique feature of this book is its empha-
sis on showing how to develop new code to enhance existing
MATLAB and
IPT
func-
tionality. This is an important feature in an area such as image processing, which, as
noted earlier, is characterized
by
the need for extensive algorithm decreloprnent and
experimental work.
After an introduction to the fundamentals of
MATLAB functions and program-
ming, the book proceeds to address the mainstream areas of
image processing. The

a
Preface
major areas covered include intensity transformations, linear and nonlinear spatial fil-
tering, filtering in the frequency domain, image restoration and registration, color
image processing, wavelets image data compression, morphological image processing,
image segmentation, region and boundary representation and description, and object
recognition. This material is complemented by numerous illustrations of how to solve
image processing problems using
MATLAB and
IPT
functions. In cases where a func-
tion did not exist, a new function was written and documented as part of the instruc-
tional focus of the book. Over 60 new functions are included in the following chapters.
These functions increase the scope of
IPT by approximately 35 percent and also serve
the important purpose of further illustrating how to implement new image processing
software solutions.
The material is presented in textbook
format, not as a software manual. Although
the book is self-contained, we have established a companion Web site (see Section 1.5)
designed to provide support in a number of areas. For students following a formal
course of
studv or individuals embarked on a program of self study, the site contains
tutorials and reviews on background material, as well as projects and image databases,
including all images in the book. For instructors, the site contains classroom presenta-
tion materials that include
Powerpoint slides of all the images and graphics used in the
book. Individuals already familiar with image processing and
IIT fundamentals will
find the site a useful place for up-to-date references, new implementation techniques,
and a host of other support material not easily found elsewhere. All purchasers of the
book are eligible to download executable files of all the new functions developed in
the text.
As is true of most writing efforts of this nature, progress continues after work on the
manuscript stops. For this reason, we devoted significant effort to the selection of ma-
terial that we believe is Fundamental, and whose value is likely to remain applicable in
a rapidly evolving body of knowledge. We trust that readers of the book will benefit
from this effort and thus
find the material timely and useful in their work.
Acknowledgments
We are indebted to a number of individuals in academic circles as well as in industry
and
government who have contributed to the preparation of the book.Their contribu-
tions have been important in so many different ways that we find it difficult to ac-
knowledge them in any other way but alphabetically. We wish to extend our
appreciation to Mongi
A.
Abidi, Peter
J.
Acklam, Serge Beucher, Emesto Bribiesca,
Michael
W. Davidson, Courtney Esposito, Naomi Fernandes, Thomas R. Gest, Roger
Heady, Brian Johnson, Lisa Kempler, Roy
Lurie, Ashley Mohamed, Joseph E.
Pascente, David.
R.
Pickens, Edgardo Felipe Riveron, Michael Robinson. Loren Shure,
Jack
Sklanski, Sally Stowe, Craig Watson, and Greg Wolodkin. We also wish to ac-
knowledge the organizations cited in the captions of many of the figures in the book
for their permission to use that material.
Special thanks go to Tom Robbins, Rose
Kernan, Alice Dworkin, Xiaohong
Zhu, Bruce Kenselaar, and Jayne Conte at Prentice Hall for their commitment to
excellence in all aspects of the production of
the book.Their creativity, assistance,
and patience are truly appreciated.
RAFAEL
C.
GONZALEZ
About the Authors
Rafael
C.
Gonzalez
R.
C.
Gonzalez received the B.S.E.E. degree from the University of Miami in 1965
and the M.E. and Ph.D. degrees in electrical engineering from the University of
Florida. Gainesville, in 1967 and 1970, respectively. He joined the Electrical and
Computer Engineering Department at the University of Tennessee, Knoxville
(UTK) in 1970, where he became Associate Professor in 1973, Professor in 1978.
and Distinguished Service Professor in 1984. He served as Chairman of the de-
partment from 1994 through 1997'. He is currently a Professor Emeritus of Electri-
cal and Computer Engineering at UTK.
He is the founder of the Imagt:
&
Pattern Analysis Laboratory and the Robot-
ics
&
Computer Vision Laboratory at the University of Tennessee. He also found-
ed
Perceptics Corporation in 1982 and was its president until 1992. The last three
years of this period were spent
under a full-time employment contract with West-
inghouse Corporation, who acquired the company in 1989. Under his direction,
Perce~tics became highly successful in image processing, computer vision, and
laser disk storage technologies.
In its initial ten years, Perceptics introduced a se-
ries of innovative products, including: The world's first commercially-available
computer vision system for
autonlatically reading the license plate on moving ve-
hicles; a series of large-scale image processing and archiving systems used by the
U.S. Navy at six different manufacturing sites throughout the country to inspect
the rocket motors of missiles in the Trident
I1 Submarine Program; the market
leading family of imaging boards
for advanced Macintosh computers; and a line of
trillion-byte laser disk products.
He is a frequent consultant to industry and government in the areas of pattern
recognition, image processing, and machine learning. His academic honors for work
in these fields include the 1977
UTK
College of Engineering Faculty Achievement
Award; the 1978
UTK Chancellor's Research Scholar Award; the 1980 Magnavox En-
gineering Professor Award; and the 1980 M.
E.
Brooks Distinguished Professor
Award. In 1981 he became an
IBh4 Professor at the University of Tennessee and in
1984 he was named a Distinguished Service Professor there. He was awarded a Dis-
tinguished Alumnus Award by the University of Miami in 1985, the Phi Kappa Phi
Scholar Award in 1986, and the University of Tennessee's Nathan
W. Dougherty
Award for Excellence in Engineering in 1992. Honors for industrial accomplishment
include the 1987 IEEE Outstanding Engineer Award for Commercial Development
in Tennessee: the 1988 Albert Rose National Award for Excellence in Commercial
Image Processing; the 1989 B. Otto
Wheeley Award for Excellence in Technology
Transfer: the 1989 Coopers and
Lybrand Entrepreneur of the Year Award; the 1992
IEEE Region 3 Outstanding Engineer Award; and the 1993 Automated Imaging As-
sociation National Award for Technology Development.
Dr. Gonzalez is author or co-author of over 100 technical articles, two edited
books, and five textbooks in the fields of pattern recognition, image processing,
and robotics. His books are used
in over 500 universities and research institutions
throughout the world. He is listed in the prestigious Marquis
Who's Who in Amer-
ica,
Marquis
Who's Who in Engineering,
Marquis
Who's Who in the World,
and in
10 other national and international biographical citations. He is the co-holder of
two U.S. Patents. and has been an associate editor of the IEEE
Transactions on
. .
.
Xlll
剩余301页未读,继续阅读






安全验证
文档复制为VIP权益,开通VIP直接复制

评论0