Tải bản đầy đủ (.pdf) (815 trang)

image processing, 2nd edition

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (16.81 MB, 815 trang )

Image Processing: The Fundamentals
Image Processing: The Fundamentals, Second Edition Maria Petrou and Costas Petrou
© 2010JohnWiley&Sons,Ltd. ISBN: 978-0-470-74586-1
www.it-ebooks.info
Image Processing: The Fundamentals
Maria Petrou Costas Petrou
A John Wiley and Sons, Ltd., Publication
www.it-ebooks.info
This edition first published 2010
c
 2010 John Wiley & Sons Ltd
Registered office
John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom
For details of our global editorial offices, for customer services and for information about how to apply for
permission to reuse the copyright material in this book please see our website at www.wiley.com.
The right of the author to be identified as the author of this work has been asserted in accordance with the
Copyright, Designs and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or
transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise,
except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of
the publisher.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not
be available in electronic books.
Designations used by companies to distinguish their products are often claimed as trademarks. All brand
names and product names used in this book are trade names, service marks, trademarks or registered
trademarks of their respective owners. The publisher is not associated with any product or vendor
mentioned in this book. This publication is designed to provide accurate and authoritative information in
regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in
rendering professional services. If professional advice or other expert assistance is required, the services of a
competent professional should be sought.
Library of Congr ess Cataloging-in-Publication Data


Petrou, Maria.
Image processing : the fundamentals / Maria Petrou, Costas Petrou. – 2nd ed.
p. cm.
Includes bibliographical references and index.
ISBN 978-0-470-74586-1 (cloth)
1. Image processing–Digital techniques.
TA1637.P48 2010
621.36

7–dc22
2009053150
ISBN 978-0-470-74586-1
A catalogue record for this book is available from the British Library.
Set in 10/12 Computer Modern by Laserwords Private Ltd, Chennai, India.
Printed in Singapore by Markono
www.it-ebooks.info
This book is dedicated to our mother and grandmother
Dionisia, for all her love and sacrifices.
www.it-ebooks.info
Contents
Preface xxiii
1 Introduction 1
Whydoweprocessimages? 1
Whatisanimage? 1
Whatisadigitalimage? 1
Whatisaspectralband? 2
Why do most image processing algorithms refer to grey images, while most images
wecomeacrossarecolourimages? 2
Howisadigitalimageformed? 3
If a sensor corresponds to a patch in the physical world, how come we can have more

than one sensor type corresponding to the same patch of the scene? . . . . . 3
What is the physical meaning of the brightness of an image at a pixel position? . . 3
Why are images often quoted as being 512 × 512, 256 × 256, 128 × 128 etc? . . . . 6
Howmanybitsdoweneedtostoreanimage? 6
Whatdeterminesthequalityofanimage? 7
Whatmakesanimageblurred? 7
Whatismeantbyimageresolution? 7
Whatdoes“goodcontrast”mean? 10
Whatisthepurposeofimageprocessing? 11
Howdowedoimageprocessing? 11
Doweusenonlinearoperatorsinimageprocessing? 12
Whatisalinearoperator? 12
Howarelinearoperatorsdefined? 12
What is the relationship between the point spread function of an imaging device
andthatofalinearoperator? 12
Howdoesalinearoperatortransformanimage? 12
Whatisthemeaningofthepointspreadfunction? 13
Box1.1.Theformaldefinitionofapointsourceinthecontinuousdomain 14
Howcanweexpressinpracticetheeffectofalinearoperatoronanimage? 18
Canweapplymorethanonelinearoperatorstoanimage? 22
Does the order by which we apply the linear operators make any difference to the
result? 22
Box 1.2. Since matrix multiplication is not commutative, how come we can change
theorderbywhichweapplyshiftinvariantlinearoperators? 22
vii
www.it-ebooks.info
viii Contents
Box1.3.Whatisthestackingoperator? 29
What is the implication of the separability assumption on the structure of matrix H?38
Howcanaseparabletransformbewritteninmatrixform? 39

What is the meaning of the separability assumption? . . . 40
Box1.4.Theformalderivationoftheseparablematrixequation 41
Whatisthe“takehome”messageofthischapter? 43
What is the significance of equation (1.108) in linear image processing? . 43
Whatisthisbookabout? 44
2 Image Transformations 47
Whatisthischapterabout? 47
Howcanwedefineanelementaryimage? 47
Whatistheouterproductoftwovectors? 47
Howcanweexpandanimageintermsofvectorouterproducts? 47
How do we choose matrices h
c
and h
r
? 49
Whatisaunitarymatrix? 50
Whatistheinverseofaunitarytransform? 50
Howcanweconstructaunitarymatrix? 50
How should we choose matrices U and V so that g can be represented by fewer bits
than f? 50
What is matrix diagonalisation? 50
Can we diagonalise any matrix? . 50
2.1 Singular value decomposition 51
How can we diagonalise an image? . 51
Box2.1.Canweexpandinvectorouterproductsanyimage? 54
How can we compute matrices U, V and Λ
1
2
needed for image diagonalisation? . . 56
Box 2.2. What happens if the eigenvalues of matrix gg

T
arenegative? 56
Whatisthesingularvaluedecompositionofanimage? 60
Canweanalyseaneigenimageintoeigenimages? 61
HowcanweapproximateanimageusingSVD? 62
Box2.3.WhatistheintuitiveexplanationofSVD? 62
WhatistheerroroftheapproximationofanimagebySVD? 63
Howcanweminimisetheerrorofthereconstruction? 65
Are there any sets of elementary images in terms of which any image may be expanded? 72
Whatisacompleteandorthonormalsetoffunctions? 72
Arethereanycompletesetsoforthonormaldiscretevaluedfunctions? 73
2.2 Haar, Walsh and Hadamard transforms 74
HowaretheHaarfunctionsdefined? 74
HowaretheWalshfunctionsdefined? 74
Box 2.4. Definition of Walsh functions in terms of the Rademacher functions . . . 74
HowcanweusetheHaarorWalshfunctionstocreateimagebases? 75
How can we create the image transformation matrices from the Haar and Walsh
functionsinpractice? 76
WhatdotheelementaryimagesoftheHaartransformlooklike? 80
Can we define an orthogonal matrix with entries only +1 or −1? 85
Box2.5.WaysoforderingtheWalshfunctions 86
WhatdothebasisimagesoftheHadamard/Walshtransformlooklike? 88
www.it-ebooks.info
Contents ix
What are the advantages and disadvantages of the Walsh and the Haar transforms? 92
WhatistheHaarwavelet? 93
2.3 Discrete Fourier transform 94
WhatisthediscreteversionoftheFouriertransform(DFT)? 94
Box2.6.WhatistheinversediscreteFouriertransform? 95
HowcanwewritethediscreteFouriertransforminamatrixform? 96

Is matrix U usedforDFTunitary? 99
Which are the elementary images in terms of which DFT expands an image? . . . 101
Why is the discrete Fourier transform more commonly used than the other
transforms? 105
Whatdoestheconvolutiontheoremstate? 105
Box 2.7. If a function is the convolution of two other functions, what is the rela-
tionshipofitsDFTwiththeDFTsofthetwofunctions? 105
HowcanwedisplaythediscreteFouriertransformofanimage? 112
What happens to the discrete Fourier transform of an image if the image
isrotated? 113
What happens to the discrete Fourier transform of an image if the image
isshifted? 114
What is the relationship between the average value of the image and its DFT? . . 118
WhathappenstotheDFTofanimageiftheimageisscaled? 119
Box2.8.WhatistheFastFourierTransform? 124
WhataretheadvantagesanddisadvantagesofDFT? 126
CanwehavearealvaluedDFT? 126
CanwehaveapurelyimaginaryDFT? 130
CananimagehaveapurelyrealorapurelyimaginaryvaluedDFT? 137
2.4 The even symmetric discrete cosine transform (EDCT) 138
Whatistheevensymmetricdiscretecosinetransform? 138
Box2.9.Derivationoftheinverse1Devendiscretecosinetransform 143
Whatistheinverse2Devencosinetransform? 145
What are the basis images in terms of which the even cosine transform expands an
image? 146
2.5 The odd symmetric discrete cosine transform (ODCT) 149
Whatistheoddsymmetricdiscretecosinetransform? 149
Box2.10.Derivationoftheinverse1Dodddiscretecosinetransform 152
Whatistheinverse2Dodddiscretecosinetransform? 154
What are the basis images in terms of which the odd discrete cosine transform

expandsanimage? 154
2.6 The even antisymmetric discrete sine transform (EDST) 157
Whatistheevenantisymmetricdiscretesinetransform? 157
Box2.11.Derivationoftheinverse1Devendiscretesinetransform 160
Whatistheinverse2Devensinetransform? 162
What are the basis images in terms of which the even sine transform expands an
image? 163
What happens if we do not remove the mean of the image before we compute its
EDST? 166
2.7 The odd antisymmetric discrete sine transform (ODST) 167
Whatistheoddantisymmetricdiscretesinetransform? 167
www.it-ebooks.info
x Contents
Box2.12.Derivationoftheinverse1Dodddiscretesinetransform 171
Whatistheinverse2Doddsinetransform? 172
What are the basis images in terms of which the odd sine transform expands an
image? 173
Whatisthe“takehome”messageofthischapter? 176
3 Statistical Description of Images 177
Whatisthischapterabout? 177
Whydoweneedthestatisticaldescriptionofimages? 177
3.1 Random fields 178
Whatisarandomfield? 178
Whatisarandomvariable? 178
Whatisarandomexperiment? 178
Howdoweperformarandomexperimentwithcomputers? 178
Howdowedescriberandomvariables? 178
What is the probability of an event? . . . 179
Whatisthedistributionfunctionofarandomvariable? 180
What is the probability of a random variable taking a specific value? . 181

What is the probability density function of a random variable? 181
Howdowedescribemanyrandomvariables? 184
What relationships may n randomvariableshavewitheachother? 184
Howdowedefinearandomfield? 189
How can we relate two random variables that appear in the same random field? . . 190
How can we relate two random variables that belong to two different random
fields? 193
If we have just one image from an ensemble of images, can we calculate expectation
values? 195
Whenisarandomfieldhomogeneouswithrespecttothemean? 195
When is a random field homogeneous with respect to the autocorrelation function? 195
Howcanwecalculatethespatialstatisticsofarandomfield? 196
How do we compute the spatial autocorrelation function of an image in practice? . 196
Whenisarandomfieldergodicwithrespecttothemean? 197
When is a random field ergodic with respect to the autocorrelation function? . . . 197
Whatistheimplicationofergodicity? 199
Box 3.1. Ergodicity, fuzzy logic and probability theory 200
How can we construct a basis of elementary images appropriate for expressing in an
optimalwayawholesetofimages? 200
3.2 Karhunen-Loeve transform 201
WhatistheKarhunen-Loevetransform? 201
Why does diagonalisation of the autocovariance matrix of a set of images define a
desirablebasisforexpressingtheimagesintheset? 201
How can we transform an image so its autocovariance matrix becomes diagonal? . 204
What is the form of the ensemble autocorrelation matrix of a set of images, if the
ensembleisstationarywithrespecttotheautocorrelation? 210
How do we go from the 1D autocorrelation function of the vector representation of
animagetoits2Dautocorrelationmatrix? 211
How can we transform the image so that its autocorrelation matrix is diagonal? . . 213
www.it-ebooks.info

Contents xi
HowdowecomputetheK-Ltransformofanimageinpractice? 214
How do we compute the Karhunen-Loeve (K-L) transform of an ensemble of
images? 215
Istheassumptionofergodicityrealistic? 215
Box 3.2. How can we calculate the spatial autocorrelation matrix of an image, when
itisrepresentedbyavector? 215
Isthemeanofthetransformedimageexpectedtobereally0? 220
HowcanweapproximateanimageusingitsK-Ltransform? 220
What is the error with which we approximate an image when we truncate its K-L
expansion? 220
What are the basis images in terms of which the Karhunen-Loeve transform expands
animage? 221
Box 3.3. What is the error of the approximation of an image using the Karhunen-
Loevetransform? 226
3.3 Independent component analysis 234
WhatisIndependentComponentAnalysis(ICA)? 234
Whatisthecocktailpartyproblem? 234
Howdowesolvethecocktailpartyproblem? 235
Whatdoesthecentrallimittheoremsay? 235
What do we mean by saying that “the samples of x
1
(t) are more Gaussianly dis-
tributed than either s
1
(t)ors
2
(t)” in relation to the cocktail party problem?
Are we talking about the temporal samples of x
1

(t), or are we talking about
all possible versions of x
1
(t)atagiventime? 235
Howdowemeasurenon-Gaussianity? 239
Howarethemomentsofarandomvariablecomputed? 239
Howisthekurtosisdefined? 240
Howisnegentropydefined? 243
Howisentropydefined? 243
Box 3.4. From all probability density functions with the same variance, the Gaussian
hasthemaximumentropy 246
Howisnegentropycomputed? 246
Box 3.5. Derivation of the approximation of negentropy in terms of moments . . . 252
Box3.6.Approximatingthenegentropywithnonquadraticfunctions 254
Box 3.7. Selecting the nonquadratic functions with which to approximate the ne-
gentropy 257
How do we apply the central limit theorem to solve the cocktail party problem? . . 264
HowmayICAbeusedinimageprocessing? 264
Howdowesearchfortheindependentcomponents? 264
Howcanwewhitenthedata? 266
Howcanweselecttheindependentcomponentsfromwhiteneddata? 267
Box3.8.HowdoesthemethodofLagrangemultiplierswork? 268
Box3.9.Howcanwechooseadirectionthatmaximisesthenegentropy? 269
HowdoweperformICAinimageprocessinginpractice? 274
HowdoweapplyICAtosignalprocessing? 283
Whatarethemajorcharacteristicsofindependentcomponentanalysis? 289
What is the difference between ICA as applied in image and in signal processing? . 290
Whatisthe“takehome”messageofthischapter? 292
www.it-ebooks.info
xii Contents

4 Image Enhancemen t 293
Whatisimageenhancement? 293
Howcanweenhanceanimage? 293
Whatislinearfiltering? 293
4.1 Elements of linear filter theory 294
Howdowedefinea2Dfilter? 294
How are the frequency response function and the unit sample response of the filter
related? 294
Whyareweinterestedinthefilterfunctionintherealdomain? 294
Are there any conditions which h(k, l) must fulfil so that it can be used as a convo-
lutionfilter? 294
Box 4.1. What is the unit sample response of the 2D ideal low pass filter? . . . . . 296
Whatistherelationshipbetweenthe1Dandthe2Dideallowpassfilters? 300
How can we implement in the real domain a filter that is infinite in extent? 301
Box 4.2. z-transforms 301
Canwedefineafilterdirectlyintherealdomainforconvenience? 309
Can we define a filter in the real domain, without side lobes in the frequency
domain? 309
4.2 Reducing high frequency noise 311
Whatarethetypesofnoisepresentinanimage? 311
Whatisimpulsenoise? 311
WhatisGaussiannoise? 311
Whatisadditivenoise? 311
Whatismultiplicativenoise? 311
Whatishomogeneousnoise? 311
Whatiszero-meannoise? 312
Whatisbiasednoise? 312
Whatisindependentnoise? 312
Whatisuncorrelatednoise? 312
Whatiswhitenoise? 313

What is the relationship between zero-mean uncorrelated and white noise? . . . . 313
Whatisiidnoise? 313
Isitpossibletohavewhitenoisethatisnotiid? 315
Box 4.3. The probability density function of a function of a random variable . . . 320
Whyisnoiseusuallyassociatedwithhighfrequencies? 324
Howdowedealwithmultiplicativenoise? 325
Box4.4.TheFouriertransformofthedeltafunction 325
Box4.5.Wiener-Khinchinetheorem 325
IstheassumptionofGaussiannoiseinanimagejustified? 326
Howdoweremoveshotnoise? 326
Whatisarankorderfilter? 326
Whatismedianfiltering? 326
Whatismodefiltering? 328
HowdowereduceGaussiannoise? 328
Canwehaveweightedmedianandmodefilterslikewehaveweightedmeanfilters? 333
CanwefilteranimagebyusingthelinearmethodswelearntinChapter2? 335
Howdowedealwithmixednoiseinimages? 337
www.it-ebooks.info
Contents xiii
Canweavoidblurringtheimagewhenwearesmoothingit? 337
Whatistheedgeadaptivesmoothing? 337
Box4.6.Efficientcomputationofthelocalvariance 339
Howdoesthemeanshiftalgorithmwork? 339
Whatisanisotropicdiffusion? 342
Box4.7.Scalespaceandtheheatequation 342
Box4.8.Gradient,DivergenceandLaplacian 345
Box4.9.Differentiationofanintegralwithrespecttoaparameter 348
Box4.10.Fromtheheatequationtotheanisotropicdiffusionalgorithm 348
Howdoweperformanisotropicdiffusioninpractice? 349
4.3 Reducing low frequency interference 351

Whendoeslowfrequencyinterferencearise? 351
Can variable illumination manifest itself in high frequencies? . 351
Inwhichothercasesmaywebeinterestedinreducinglowfrequencies? 351
Whatistheidealhighpassfilter? 351
Howcanweenhancesmallimagedetailsusingnonlinearfilters? 357
Whatisunsharpmasking? 357
Howcanweapplytheunsharpmaskingalgorithmlocally? 357
Howdoesthelocallyadaptiveunsharpmaskingwork? 358
Howdoestheretinexalgorithmwork? 360
Box 4.11. Which are the grey values that are stretched most by the retinex
algorithm? 360
How can we improve an image which suffers from variable illumination? . 364
Whatishomomorphicfiltering? 364
Whatisphotometricstereo? 366
Whatdoesflatfieldingmean? 366
Howisflatfieldingperformed? 366
4.4 Histogram manipulation 367
Whatisthehistogramofanimage? 367
Whenisitnecessarytomodifythehistogramofanimage? 367
Howcanwemodifythehistogramofanimage? 367
Whatishistogrammanipulation? 368
Whataffectsthesemanticinformationcontentofanimage? 368
How can we perform histogram manipulation and at the same time preserve the
informationcontentoftheimage? 368
Whatishistogramequalisation? 370
Why do histogram equalisation programs usually not produce images with flat his-
tograms? 370
Howdoweperformhistogramequalisationinpractice? 370
Canweobtainanimagewithaperfectlyflathistogram? 372
Whatifwedonotwishtohaveanimagewithaflathistogram? 373

Howdowedohistogramhyperbolisationinpractice? 373
Howdowedohistogramhyperbolisationwithrandomadditions? 374
Why should one wish to perform something other than histogram equalisation? . . 374
Whatiftheimagehasinhomogeneouscontrast? 375
Can we avoid damaging flat surfaces while increasing the contrast of genuine tran-
sitionsinbrightness? 377
www.it-ebooks.info
xiv Contents
How can we enhance an image by stretching only the grey values that appear in
genuinebrightnesstransitions? 377
Howdoweperformpairwiseimageenhancementinpractice? 378
4.5 Generic deblurring algorithms 383
Howdoesmodefilteringhelpdebluranimage? 383
Canweuseanedgeadaptivewindowtoapplythemodefilter? 385
Howcanmeanshiftbeusedasagenericdeblurringalgorithm? 385
What is toboggan contrast enhancement? . . 387
How do we do toboggan contrast enhancement in practice? 387
Whatisthe“takehome”messageofthischapter? 393
5 Image Restoration 395
Whatisimagerestoration? 395
Whymayanimagerequirerestoration? 395
Whatisimageregistration? 395
Howisimagerestorationperformed? 395
Whatisthedifferencebetweenimageenhancementandimagerestoration? 395
5.1 Homogeneous linear image restoration: inverse filtering 396
Howdowemodelhomogeneouslinearimagedegradation? 396
Howmaytheproblemofimagerestorationbesolved? 396
How may we obtain information on the frequency response function
ˆ
H(u, v)ofthe

degradationprocess? 396
If we know the frequency response function of the degradation process, isn’t the
solutiontotheproblemofimagerestorationtrivial? 407
What happens at frequencies where the frequency response function is zero? . . . . 408
Will the zeros of the frequency response function and the image always
coincide? 408
Howcanweavoidtheamplificationofnoise? 408
Howdoweapplyinversefilteringinpractice? 410
Can we define a filter that will automatically take into consideration the noise in
theblurredimage? 417
5.2 Homogeneous linear image restoration: Wiener filtering 419
How can we express the problem of image restoration as a least square error esti-
mationproblem? 419
Can we find a linear least squares error solution to the problem of image
restoration? 419
What is the linear least mean square error solution of the image restoration
problem? 420
Box5.1.Theleastsquareserrorsolution 420
Box 5.2. From the Fourier transform of the correlation functions of images to their
spectraldensities 427
Box5.3.DerivationoftheWienerfilter 428
WhatistherelationshipbetweenWienerfilteringandinversefiltering? 430
Howcanwedeterminethespectraldensityofthenoisefield? 430
How can we possibly use Wiener filtering, if we know nothing about the statistical
propertiesoftheunknownimage? 430
HowdoweapplyWienerfilteringinpractice? 431
www.it-ebooks.info
Contents xv
5.3 Homogeneous linear image restoration: Constrained matrix inversion 436
If the degradation process is assumed linear, why don’t we solve a system of linear

equations to reverse its effect instead of invoking the convolution theorem? . 436
Equation (5.146) seems pretty straightforward, why bother with any other
approach? 436
IsthereanywaybywhichmatrixH canbeinverted? 437
Whenisamatrixblockcirculant? 437
Whenisamatrixcirculant? 438
Whycanblockcirculantmatricesbeinvertedeasily? 438
Whicharetheeigenvaluesandeigenvectorsofacirculantmatrix? 438
How does the knowledge of the eigenvalues and the eigenvectors of a matrix help in
invertingthematrix? 439
How do we know that matrix H that expresses the linear degradation process is
blockcirculant? 444
How can we diagonalise a block circulant matrix? . 445
Box 5.4. Proof of equation (5.189) 446
Box5.5.WhatisthetransposeofmatrixH? 448
Howcanweovercometheextremesensitivityofmatrixinversiontonoise? 455
Howcanweincorporatetheconstraintintheinversionofthematrix? 456
Box5.6.Derivationoftheconstrainedmatrixinversionfilter 459
What is the relationship between the Wiener filter and the constrained matrix in-
versionfilter? 462
Howdoweapplyconstrainedmatrixinversioninpractice? 464
5.4 Inhomogeneous linear image restoration: the whirl transform 468
How do we model the degradation of an image if it is linear but inhomogeneous? . 468
How may we use constrained matrix inversion when the distortion matrix is not
circulant? 477
What happens if matrix H is really very big and we cannot take its inverse? . . . . 481
Box5.7.Jacobi’smethodforinvertinglargesystemsoflinearequations 482
Box 5.8. Gauss-Seidel method for inverting large systems of linear equations . . . . 485
Does matrix H as constructed in examples 5.41, 5.43, 5.44 and 5.45 fulfil the condi-
tionsforusingtheGauss-SeidelortheJacobimethod? 485

What happens if matrix H does not satisfy the conditions for the Gauss-Seidel
method? 486
Howdoweapplythegradientdescentalgorithminpractice? 487
What happens if we do not know matrix H? 489
5.5 Nonlinear image restoration: MAP estimation 490
WhatdoesMAPestimationmean? 490
How do we formulate the problem of image restoration as a MAP estimation? . . . 490
How do we select the most probable configuration of restored pixel values, given the
degradationmodelandthedegradedimage? 490
Box 5.9. Probabilities: prior, a priori, posterior, a posteriori, conditional . . . . . . 491
Istheminimumofthecostfunctionunique? 491
How can we select then one solution from all possible solutions that minimise the
costfunction? 493
Can we combine the posterior and the prior probabilities for a configuration x? . . 493
Box5.10.Parseval’stheorem 496
www.it-ebooks.info
xvi Contents
How do we model in general the cost function we have to minimise in order to restore
animage? 499
What is the reason we use a temperature parameter when we model the joint prob-
ability density function, since its does not change the configuration for which
the probability takes its maximum? 501
How does the temperature parameter allow us to focus or defocus in the solution
space? 501
How do we model the prior probabilities of configurations? . 501
Whathappensiftheimagehasgenuinediscontinuities? 502
Howdoweminimisethecostfunction? 503
Howdowecreateapossiblenewsolutionfromthepreviousone? 503
Howdoweknowwhentostoptheiterations? 505
Howdowereducethetemperatureinsimulatedannealing? 506

How do we perform simulated annealing with the Metropolis sampler in practice? . 506
How do we perform simulated annealing with the Gibbs sampler in practice? . . . 507
Box 5.11. How can we draw random numbers according to a given probability
densityfunction? 508
Whyissimulatedannealingslow? 511
How can we accelerate simulated annealing? 511
Howcanwecoarsentheconfigurationspace? 512
5.6 Geometric image restoration 513
Howmaygeometricdistortionarise? 513
Whydolensescausedistortions? 513
Howcanageometricallydistortedimageberestored? 513
Howdoweperformthespatialtransformation? 513
Howmaywemodelthelensdistortions? 514
Howcanwemodeltheinhomogeneousdistortion? 515
Howcanwespecifytheparametersofthespatialtransformationmodel? 516
Whyisgreylevelinterpolationneeded? 516
Box5.12.TheHoughtransformforlinedetection 520
Whatisthe“takehome”messageofthischapter? 526
6 Image Segmen tation and Edge Detection 527
Whatisthischapterabout? 527
Whatexactlyisthepurposeofimagesegmentationandedgedetection? 527
6.1 Image segmentation 528
Howcanwedivideanimageintouniformregions? 528
What do we mean by “labelling” an image? 528
Whatcanwedoifthevalleyinthehistogramisnotverysharplydefined? 528
Howcanweminimisethenumberofmisclassifiedpixels? 529
Howcanwechoosetheminimumerrorthreshold? 530
What is the minimum error threshold when object and background pixels are nor-
mallydistributed? 534
What is the meaning of the two solutions of the minimum error threshold

equation? 535
How can we estimate the parameters of the Gaussian probability density functions
that represent the object and the background? 537
www.it-ebooks.info
Contents xvii
Whatarethedrawbacksoftheminimumerrorthresholdmethod? 541
Is there any method that does not depend on the availability of models for the
distributionsoftheobjectandthebackgroundpixels? 541
Box6.1.DerivationofOtsu’sthreshold 542
ArethereanydrawbacksinOtsu’smethod? 545
How can we threshold images obtained under variable illumination? 545
If we threshold the image according to the histogram of ln f(x, y), are we
thresholding it according to the reflectance properties of the imaged
surfaces? 545
Box 6.2. The probability density function of the sum of two random variables . . . 546
Since straightforward thresholding methods break down under variable
illumination, how can we cope with it? . . 548
Whatdowedoifthehistogramhasonlyonepeak? 549
Arethereanyshortcomingsofthegreyvaluethresholdingmethods? 550
How can we cope with images that contain regions that are not uniform but they
are perceived asuniform? 551
Can we improve histogramming methods by taking into consideration the spatial
proximityofpixels? 553
Are there any segmentation methods that take into consideration the spatial prox-
imityofpixels? 553
Howcanonechoosetheseedpixels? 554
Howdoesthesplitandmergemethodwork? 554
Whatismorphologicalimagereconstruction? 554
How does morphological image reconstruction allow us to identify the seeds needed
forthewatershedalgorithm? 557

Howdowecomputethegradientmagnitudeimage? 557
What is the role of the number we subtract from f to create mask g in the morpho-
logical reconstruction of f by g? 558
What is the role of the shape and size of the structuring element in the morphological
reconstruction of f by g? 560
How does the use of the gradient magnitude image help segment the image by the
watershedalgorithm? 566
Are there any drawbacks in the watershed algorithm which works with the gradient
magnitudeimage? 568
Isitpossibletosegmentanimagebyfiltering? 574
Howcanweusethemeanshiftalgorithmtosegmentanimage? 574
Whatisagraph? 576
Howcanweuseagraphtorepresentanimage? 576
Howcanweusethegraphrepresentationofanimagetosegmentit? 576
Whatisthenormalisedcutsalgorithm? 576
Box6.3.Thenormalisedcutsalgorithmasaneigenvalueproblem 576
Box6.4.HowdoweminimisetheRayleighquotient? 585
Howdoweapplythenormalisedgraphcutsalgorithminpractice? 589
Is it possible to segment an image by considering the dissimilarities between regions,
asopposedtoconsideringthesimilaritiesbetweenpixels? 589
6.2 Edge detection 591
Howdowemeasurethedissimilaritybetweenneighbouringpixels? 591
www.it-ebooks.info
xviii Contents
Whatisthesmallestpossiblewindowwecanchoose? 592
Whathappenswhentheimagehasnoise? 593
Box6.5.Howcanwechoosetheweightsofa3× 3maskforedgedetection? 595
What is the best value of parameter K? 596
Box6.6.DerivationoftheSobelfilters 596
In the general case, how do we decide whether a pixel is an edge pixel or not? . . . 601

Howdoweperformlinearedgedetectioninpractice? 602
AreSobelmasksappropriateforallimages? 605
How can we choose the weights of the mask if we need a larger mask owing to the
presenceofsignificantnoiseintheimage? 606
Can we use the optimal filters for edges to detect lines in an image in an
optimalway? 609
What is the fundamental difference between step edges and lines? 609
Box6.7.Convolvingarandomnoisesignalwithafilter 615
Box 6.8. Calculation of the signal to noise ratio after convolution of a noisy edge
signalwithafilter 616
Box6.9.Derivationofthegoodlocalitymeasure 617
Box6.10.Derivationofthecountoffalsemaxima 619
Canedgedetectionleadtoimagesegmentation? 620
Whatishysteresisedgelinking? 621
Doeshysteresisedgelinkingleadtoclosededgecontours? 621
WhatistheLaplacianofGaussianedgedetectionmethod? 623
Isitpossibletodetectedgesandlinessimultaneously? 623
6.3 Phase congruency and the monogenic signal 625
Whatisphasecongruency? 625
Whatisphasecongruencyfora1Ddigitalsignal? 625
Howdoesphasecongruencyallowustodetectlinesandedges? 626
Why does phase congruency coincide with the maximum of the local energy of the
signal? 626
Howcanwemeasurephasecongruency? 627
Couldn’t we measure phase congruency by simply averaging the phases of the har-
moniccomponents? 627
Howdowemeasurephasecongruencyinpractice? 630
Howdowemeasurethelocalenergyofthesignal? 630
Why should we perform convolution with the two basis signals in order to get the
projectionofthelocalsignalonthebasissignals? 632

Box6.11.SomepropertiesofthecontinuousFouriertransform 637
If all we need to compute is the local energy of the signal, why don’t we use Parseval’s
theoremtocomputeitintherealdomaininsidealocalwindow? 647
How do we decide which filters to use for the calculation of the local energy? . . . 648
Howdowecomputethelocalenergyofa1Dsignalinpractice? 651
How can we tell whether the maximum of the local energy corresponds to a sym-
metricoranantisymmetricfeature? 652
Howcanwecomputephasecongruencyandlocalenergyin2D? 659
Whatistheanalyticsignal? 659
HowcanwegeneralisetheHilberttransformto2D? 660
HowdowecomputetheRiesztransformofanimage? 660
www.it-ebooks.info
Contents xix
Howcanthemonogenicsignalbeused? 660
Howdoweselecttheevenfilterweuse? 661
Whatisthe“takehome”messageofthischapter? 668
7 Image Processing for Multispectral Images 669
Whatisamultispectralimage? 669
Whataretheproblemsthatarespecialtomultispectralimages? 669
Whatisthischapterabout? 670
7.1 Image preprocessing for multispectral images 671
Why may one wish to replace the bands of a multispectral image with other
bands? 671
Howdoweusuallyconstructagreyimagefromamultispectralimage? 671
How can we construct a single band from a multispectral image that contains the
maximumamountofimageinformation? 671
Whatisprincipalcomponentanalysis? 672
Box7.1.Howdowemeasureinformation? 673
Howdoweperformprincipalcomponentanalysisinpractice? 674
What are the advantages of using the principal components of an image, instead of

theoriginalbands? 675
What are the disadvantages of using the principal components of an image instead
oftheoriginalbands? 675
Is it possible to work out only the first principal component of a multispectral image
ifwearenotinterestedintheothercomponents? 682
Box 7.2. The power method for estimating the largest eigenvalue of a matrix . . . 682
Whatistheproblemofspectralconstancy? 684
What influences the spectral signature of a pixel? . . 684
Whatisthereflectancefunction? 684
Does the imaging geometry influence the spectral signature of a pixel? . . 684
How does the imaging geometry influence the light energy a pixel receives? 685
HowdowemodeltheprocessofimageformationforLambertiansurfaces? 685
How can we eliminate the dependence of the spectrum of a pixel on the imaging
geometry? 686
How can we eliminate the dependence of the spectrum of a pixel on the spectrum
of the illuminating source? . 686
What happens if we have more than one illuminating sources? . . . 687
How can we remove the dependence of the spectral signature of a pixel on the
imaging geometry and on the spectrum of the illuminant? 687
What do we have to do if the imaged surface is not made up from the same
material? 688
Whatisthespectralunmixingproblem? 688
Howdowesolvethelinearspectralunmixingproblem? 689
Canweuselibraryspectraforthepurematerials? 689
How do we solve the linear spectral unmixing problem when we know the spectra
ofthepurecomponents? 690
Is it possible that the inverse of matrix Q cannotbecomputed? 693
What happens if the library spectra have been sampled at different wavelengths
fromthemixedspectrum? 693
www.it-ebooks.info

xx Contents
What happens if we do not know which pure substances might be present in the
mixedsubstance? 694
How do we solve the linear spectral unmixing problem if we do not know the spectra
ofthepurematerials? 695
7.2 The physics and psychophysics of colour vision 700
Whatiscolour? 700
Whatistheinterestincolourfromtheengineeringpointofview? 700
What influences the colour we perceive for a dark object? 700
Whatcausesthevariationsofthedaylight? 701
Howcanwemodelthevariationsofthedaylight? 702
Box 7.3. Standard illuminants 704
Whatistheobservedvariationinthenaturalmaterials? 706
Whathappenstothelightonceitreachesthesensors? 711
Is it possible for different materials to produce the same recording by a sensor? . . 713
Howdoesthehumanvisualsystemachievecolourconstancy? 714
Whatdoesthetrichromatictheoryofcolourvisionsay? 715
Whatdefinesacoloursystem? 715
Howarethetristimulusvaluesspecified? 715
Can all monochromatic reference stimuli be matched by simply adjusting the inten-
sitiesoftheprimarylights? 715
Doallpeoplerequirethesameintensitiesoftheprimarylightstomatchthesame
monochromaticreferencestimulus? 717
Whoarethepeoplewithnormalcolourvision? 717
Whatarethemostcommonlyusedcoloursystems? 717
What is the CIE RGB coloursystem? 717
What is the XY Z coloursystem? 718
Howdowerepresentcoloursin3D? 718
Howdowerepresentcoloursin2D? 718
Whatisthechromaticitydiagram? 719

Box7.4.Someusefultheoremsfrom3Dgeometry 721
What is the chromaticity diagram for the CIE RGB coloursystem? 724
Howdoesthehumanbrainperceivecolourbrightness? 725
How is the alychne defined in the CIE RGB coloursystem? 726
How is the XY Z coloursystemdefined? 726
What is the chromaticity diagram of the XY Z coloursystem? 728
How is it possible to create a colour system with imaginary primaries, in practice? 729
Whatifwewishtomodelthewayaparticularindividualseescolours? 729
If different viewers require different intensities of the primary lights to see white,
howdowecalibratecoloursbetweendifferentviewers? 730
Howdowemakeuseofthereferencewhite? 730
How is the sRGB coloursystemdefined? 732
Doesacolourchangeifwedoubleallitstristimulusvalues? 733
How does the description of a colour, in terms of a colour system, relate to the way
wedescribecoloursineverydaylanguage? 733
Howdowecomparecolours? 733
Whatisametric? 733
Can we use the Euclidean metric to measure the difference of two colours? . . . . . 734
www.it-ebooks.info
Contents xxi
Whicharetheperceptuallyuniformcolourspaces? 734
How is the Luv colourspacedefined? 734
How is the Lab colourspacedefined? 735
How do we choose values for (X
n
,Y
n
,Z
n
)? 735

How can we compute the RGB values from the Luv values? 735
How can we compute the RGB values from the Lab values? 736
Howdowemeasureperceivedsaturation? 737
Howdowemeasureperceiveddifferencesinsaturation? 737
Howdowemeasureperceivedhue? 737
Howistheperceivedhueangledefined? 738
Howdowemeasureperceiveddifferencesinhue? 738
Whataffectsthewayweperceivecolour? 740
Whatismeantbytemporalcontextofcolour? 740
Whatismeantbyspatialcontextofcolour? 740
Whydistancematterswhenwetalkaboutspatialfrequency? 741
Howdoweexplainthespatialdependenceofcolourperception? 741
7.3 Colour image processing in practice 742
How does the study of the human colour vision affect the way we do image
processing? 742
How perceptually uniform are the perceptually uniform colour spaces in practice? . 742
How should we convert the image RGB values to the Luv or the Lab colour
spaces? 742
Howdowemeasurehueandsaturationinimageprocessingapplications? 747
How can we emulate the spatial dependence of colour perception in image
processing? 752
What is the relevance of the phenomenon of metamerism to image processing? . . 756
How do we cope with the problem of metamerism in an industrial inspection appli-
cation? 756
WhatisaMonte-Carlomethod? 757
Howdoweremovenoisefrommultispectralimages? 759
Howdowerankvectors? 760
Howdowedealwithmixednoiseinmultispectralimages? 760
Howdoweenhanceacolourimage? 761
Howdowerestoremultispectralimages? 767

Howdowecompresscolourimages? 767
Howdowesegmentmultispectralimages? 767
How do we apply k-meansclusteringinpractice? 767
Howdoweextracttheedgesofmultispectralimages? 769
Whatisthe“takehome”messageofthischapter? 770
Bibliographical notes 775
References 777
Index 781
www.it-ebooks.info
www.it-ebooks.info
Preface
Since the first edition of this book in 1999, the field of Image Processing has seen many
developments. First of all, the proliferation of colour sensors caused an explosion of research
in colour vision and colour image processing. Second, application of image processing to
biomedicine has really taken off, with medical image processing nowadays being almost a
field of its own. Third, image processing has become more sophisticated, having reached out
even further afield, into other areas of research, as diverse as graph theory and psychophysics,
to borrow methodologies and approaches.
This new edition of the book attempts to capture these new insights, without, however,
forgetting the well known and established methods of image processing of the past. The book
may be treated as three books interlaced: the advanced proofs and peripheral material are
presented in grey boxes; they may be omitted in a first reading or for an undergraduate course.
The back bone of the book is the text given in the form of questions and answers. We believe
that the order of the questions is that of coming naturally to the reader when they encounter
a new concept. There are 255 figures and 384 fully worked out examples aimed at clarifying
these concepts. Examples with a number prefixed with a “B” refer to the boxed
material and again they may be omitted in a first reading or an undergraduate
course. The book is accompanied by a CD with all the MatLab programs that produced
the examples and the figures. There is also a collection of slide presentations in pdf format,
available from the accompanying web page of the book, that may help the lecturer who wishes

to use this material for teaching.
We have made a great effort to make the book easy to read and we hope that learning
about the “nuts and bolts” behind the image processing algorithms will make the subject
even more exciting and a pleasure to delve into.
Over the years of writing this book, we were helped by various people. We would par-
ticularly like to thank Mike Brookes, Nikos Mitianoudis, Antonis Katartzis, Mohammad Ja-
hangiri, Tania Stathaki and Vladimir Jeliazkov, for useful discussions, Mohammad Jahangiri,
Leila Favaedi and Olga Duran for help with some figures, and Pedro Garcia-Sevilla for help
with typesetting the book.
Maria Petrou and Costas Petrou
xxiii
www.it-ebooks.info
Plates 771
(a) (b)
Plate I: (a) The colours of the Macbeth colour chart. (b) The chromaticity diagram of the
XY Z colour system. Points A and B represent colours which, although further apart than
points C and D, are perceived as more similar than the colours represented by C and D.
(a) One eigenvalue (b) Two eigenvalues (c) Three eigenvalues
(d) Four eigenvalues (e) Five eigenvalues (f) Six eigenvalues
Plate II: The inclusion of extra eigenvalues beyond the third one changes the colour appear-
ance very little (see example 7.12, on page 713).
Plate III: Colour perception depends on colour spatial frequency (see page 740).
Image Processing: The Fundamentals, Second Edition Maria Petrou and Costas Petrou
© 2010JohnWiley&Sons,Ltd. ISBN: 978-0-470-74586-1
www.it-ebooks.info
772 Plates
Plate IV: Colour perception depends on colour context (see page 740).
(a) 5% impulse noise (b) 5% impulse + Gaussian (σ = 15)
(c) Vector median filtering (d) α-trimmed vector median filtering
Plate V: At the top, images affected by impulse noise and mixed noise, and at the bottom

their restored versions, using vector median filtering, with window size 3 ×3, and α-trimmed
vector median filtering, with α =0.2 and window size 5 × 5 (example 7.32, page 761).
www.it-ebooks.info
Plates 773
(a) Original (b) Seen from 2m
(c) Seen from 4m (d) Seen from 6m
Plate VI: (a) “A Street in Shanghai” (344 ×512). As seen from (b) 2m, (c) 4m and (d) 10m
distance. In (b) a border of 10 pixels around should be ignored, in (c) the stripe affected by
border effects is 22 pixels wide, while in (d) is 34 pixels wide (example 7.28, page 754).
(a) “Abu-Dhabi building” (b) After colour enhancement
Plate VII: Enhancing colours by increasing their saturation to its maximum, while retaining
their hue. Threshold= 0.04 and γ =1/

6 were used for the saturation (see page 761).
www.it-ebooks.info
774 Plates
(a) “Vina del Mar-Valparaiso” (b) After colour enhancement
Plate VIII: Enhancing colours by increasing their saturation to the maximum, while retaining
their hue. Threshold= 0.01 and γ =1/

6 were used for the saturation (see page 761).
(a) Original (184 × 256) (b) 10-means (sRGB)
(c) Mean shift (sRGB)(d)Meanshift(CIE RGB)
Plate IX: “The Merchant in Al-Ain” segmented in Luv space, assuming that the original
values are either in the CIE RGB or the sRGB space (see example 7.37, on page 768).
(a) From the average band (b) From the 1st PC (c) From all bands
Plate X: The edges superimposed on the original image (see example 7.38, on page 769).
www.it-ebooks.info

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×