100% found this document useful (1 vote)
34 views

Image Processing The Fundamentals Second Edition Maria Petrou pdf download

The document provides information on the second edition of 'Image Processing: The Fundamentals' by Maria and Costas Petrou, published in 2010. It includes details such as the ISBN, file format, and a brief overview of the book's content, which covers fundamental concepts in image processing. Additionally, it lists various related ebooks available for download on the same website.

Uploaded by

awdehjmayik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
34 views

Image Processing The Fundamentals Second Edition Maria Petrou pdf download

The document provides information on the second edition of 'Image Processing: The Fundamentals' by Maria and Costas Petrou, published in 2010. It includes details such as the ISBN, file format, and a brief overview of the book's content, which covers fundamental concepts in image processing. Additionally, it lists various related ebooks available for download on the same website.

Uploaded by

awdehjmayik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

Image Processing The Fundamentals Second Edition

Maria Petrou pdf download

https://ebookfinal.com/download/image-processing-the-
fundamentals-second-edition-maria-petrou/

Explore and download more ebooks or textbooks


at ebookfinal.com
Here are some recommended products for you. Click the link to
download, or explore more at ebookfinal

Image processing and mathematical morphology Fundamentals


and applications 1st Edition Frank Y. Shih

https://ebookfinal.com/download/image-processing-and-mathematical-
morphology-fundamentals-and-applications-1st-edition-frank-y-shih/

Optical and Digital Image Processing Fundamentals and


Applications 1st Edition Gabriel Cristóbal

https://ebookfinal.com/download/optical-and-digital-image-processing-
fundamentals-and-applications-1st-edition-gabriel-cristobal/

Software Engineering for Image Processing Systems Image


Processing Series 1st Edition Philip A. Laplante

https://ebookfinal.com/download/software-engineering-for-image-
processing-systems-image-processing-series-1st-edition-philip-a-
laplante/

The Image Processing Handbook Sixth Edition John C. Russ

https://ebookfinal.com/download/the-image-processing-handbook-sixth-
edition-john-c-russ/
Digital Image Processing 1st Edition S.K. Ghosh

https://ebookfinal.com/download/digital-image-processing-1st-edition-
s-k-ghosh/

Field Guide to Image Processing Khan Iftekharuddin

https://ebookfinal.com/download/field-guide-to-image-processing-khan-
iftekharuddin/

Feature extraction image processing 2nd Edition Mark Nixon

https://ebookfinal.com/download/feature-extraction-image-
processing-2nd-edition-mark-nixon/

Digital Color Image Processing 1st Edition Andreas Koschan

https://ebookfinal.com/download/digital-color-image-processing-1st-
edition-andreas-koschan/

Digital image processing for medical applications


Dougherty G.

https://ebookfinal.com/download/digital-image-processing-for-medical-
applications-dougherty-g/
Image Processing The Fundamentals Second Edition
Maria Petrou Digital Instant Download
Author(s): Maria Petrou, Costas Petrou(auth.)
ISBN(s): 9781119994398, 111999439X
File Details: PDF, 16.16 MB
Year: 2010
Language: english
Image Processing: The Fundamentals

Image Processing: The Fundamentals, Second Edition Maria Petrou and Costas Petrou
© 2010 John Wiley & Sons, Ltd. ISBN: 978-0-470-74586-1
Image Processing: The Fundamentals

Maria Petrou Costas Petrou

A John Wiley and Sons, Ltd., Publication


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 Congress 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
This book is dedicated to our mother and grandmother
Dionisia, for all her love and sacrifices.
Contents

Preface xxiii

1 Introduction 1
Why do we process images? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What is an image? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What is a digital image? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What is a spectral band? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Why do most image processing algorithms refer to grey images, while most images
we come across are colour images? . . . . . . . . . . . . . . . . . . . . . . . . 2
How is a digital image formed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
How many bits do we need to store an image? . . . . . . . . . . . . . . . . . . . . . 6
What determines the quality of an image? . . . . . . . . . . . . . . . . . . . . . . . 7
What makes an image blurred? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
What is meant by image resolution? . . . . . . . . . . . . . . . . . . . . . . . . . . 7
What does “good contrast” mean? . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
What is the purpose of image processing? . . . . . . . . . . . . . . . . . . . . . . . 11
How do we do image processing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Do we use nonlinear operators in image processing? . . . . . . . . . . . . . . . . . 12
What is a linear operator? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
How are linear operators defined? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
What is the relationship between the point spread function of an imaging device
and that of a linear operator? . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
How does a linear operator transform an image? . . . . . . . . . . . . . . . . . . . 12
What is the meaning of the point spread function? . . . . . . . . . . . . . . . . . . 13
Box 1.1. The formal definition of a point source in the continuous domain . . . . . 14
How can we express in practice the effect of a linear operator on an image? . . . . 18
Can we apply more than one linear operators to an image? . . . . . . . . . . . . . 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
the order by which we apply shift invariant linear operators? . . . . . . . . . 22

vii
viii Contents

Box 1.3. What is the stacking operator? . . . . . . . . . . . . . . . . . . . . . . . . 29


What is the implication of the separability assumption on the structure of matrix H? 38
How can a separable transform be written in matrix form? . . . . . . . . . . . . . 39
What is the meaning of the separability assumption? . . . . . . . . . . . . . . . . . 40
Box 1.4. The formal derivation of the separable matrix equation . . . . . . . . . . 41
What is the “take home” message of this chapter? . . . . . . . . . . . . . . . . . . 43
What is the significance of equation (1.108) in linear image processing? . . . . . . 43
What is this book about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

2 Image Transformations 47
What is this chapter about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
How can we define an elementary image? . . . . . . . . . . . . . . . . . . . . . . . 47
What is the outer product of two vectors? . . . . . . . . . . . . . . . . . . . . . . . 47
How can we expand an image in terms of vector outer products? . . . . . . . . . . 47
How do we choose matrices hc and hr ? . . . . . . . . . . . . . . . . . . . . . . . . . 49
What is a unitary matrix? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
What is the inverse of a unitary transform? . . . . . . . . . . . . . . . . . . . . . . 50
How can we construct a unitary matrix? . . . . . . . . . . . . . . . . . . . . . . . . 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
Box 2.1. Can we expand in vector outer products any image? . . . . . . . . . . . . 54
1
How can we compute matrices U , V and Λ 2 needed for image diagonalisation? . . 56
Box 2.2. What happens if the eigenvalues of matrix gg T are negative? . . . . . . . 56
What is the singular value decomposition of an image? . . . . . . . . . . . . . . . . 60
Can we analyse an eigenimage into eigenimages? . . . . . . . . . . . . . . . . . . . 61
How can we approximate an image using SVD? . . . . . . . . . . . . . . . . . . . . 62
Box 2.3. What is the intuitive explanation of SVD? . . . . . . . . . . . . . . . . . 62
What is the error of the approximation of an image by SVD? . . . . . . . . . . . . 63
How can we minimise the error of the reconstruction? . . . . . . . . . . . . . . . . 65
Are there any sets of elementary images in terms of which any image may be expanded? 72
What is a complete and orthonormal set of functions? . . . . . . . . . . . . . . . . 72
Are there any complete sets of orthonormal discrete valued functions? . . . . . . . 73
2.2 Haar, Walsh and Hadamard transforms . . . . . . . . . . . . . . . . . . 74
How are the Haar functions defined? . . . . . . . . . . . . . . . . . . . . . . . . . . 74
How are the Walsh functions defined? . . . . . . . . . . . . . . . . . . . . . . . . . 74
Box 2.4. Definition of Walsh functions in terms of the Rademacher functions . . . 74
How can we use the Haar or Walsh functions to create image bases? . . . . . . . . 75
How can we create the image transformation matrices from the Haar and Walsh
functions in practice? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
What do the elementary images of the Haar transform look like? . . . . . . . . . . 80
Can we define an orthogonal matrix with entries only +1 or −1? . . . . . . . . . . 85
Box 2.5. Ways of ordering the Walsh functions . . . . . . . . . . . . . . . . . . . . 86
What do the basis images of the Hadamard/Walsh transform look like? . . . . . . 88
Contents ix

What are the advantages and disadvantages of the Walsh and the Haar transforms? 92
What is the Haar wavelet? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
2.3 Discrete Fourier transform . . . . . . . . . . . . . . . . . . . . . . . . . . 94
What is the discrete version of the Fourier transform (DFT)? . . . . . . . . . . . . 94
Box 2.6. What is the inverse discrete Fourier transform? . . . . . . . . . . . . . . . 95
How can we write the discrete Fourier transform in a matrix form? . . . . . . . . . 96
Is matrix U used for DFT unitary? . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
What does the convolution theorem state? . . . . . . . . . . . . . . . . . . . . . . . 105
Box 2.7. If a function is the convolution of two other functions, what is the rela-
tionship of its DFT with the DFTs of the two functions? . . . . . . . . . . . . 105
How can we display the discrete Fourier transform of an image? . . . . . . . . . . . 112
What happens to the discrete Fourier transform of an image if the image
is rotated? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
What happens to the discrete Fourier transform of an image if the image
is shifted? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
What is the relationship between the average value of the image and its DFT? . . 118
What happens to the DFT of an image if the image is scaled? . . . . . . . . . . . . 119
Box 2.8. What is the Fast Fourier Transform? . . . . . . . . . . . . . . . . . . . . . 124
What are the advantages and disadvantages of DFT? . . . . . . . . . . . . . . . . . 126
Can we have a real valued DFT? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Can we have a purely imaginary DFT? . . . . . . . . . . . . . . . . . . . . . . . . . 130
Can an image have a purely real or a purely imaginary valued DFT? . . . . . . . . 137
2.4 The even symmetric discrete cosine transform (EDCT) . . . . . . . . 138
What is the even symmetric discrete cosine transform? . . . . . . . . . . . . . . . . 138
Box 2.9. Derivation of the inverse 1D even discrete cosine transform . . . . . . . . 143
What is the inverse 2D even cosine transform? . . . . . . . . . . . . . . . . . . . . 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
What is the odd symmetric discrete cosine transform? . . . . . . . . . . . . . . . . 149
Box 2.10. Derivation of the inverse 1D odd discrete cosine transform . . . . . . . . 152
What is the inverse 2D odd discrete cosine transform? . . . . . . . . . . . . . . . . 154
What are the basis images in terms of which the odd discrete cosine transform
expands an image? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
2.6 The even antisymmetric discrete sine transform (EDST) . . . . . . . 157
What is the even antisymmetric discrete sine transform? . . . . . . . . . . . . . . . 157
Box 2.11. Derivation of the inverse 1D even discrete sine transform . . . . . . . . . 160
What is the inverse 2D even sine transform? . . . . . . . . . . . . . . . . . . . . . . 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
What is the odd antisymmetric discrete sine transform? . . . . . . . . . . . . . . . 167
x Contents

Box 2.12. Derivation of the inverse 1D odd discrete sine transform . . . . . . . . . 171
What is the inverse 2D odd sine transform? . . . . . . . . . . . . . . . . . . . . . . 172
What are the basis images in terms of which the odd sine transform expands an
image? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
What is the “take home” message of this chapter? . . . . . . . . . . . . . . . . . . 176

3 Statistical Description of Images 177


What is this chapter about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Why do we need the statistical description of images? . . . . . . . . . . . . . . . . 177
3.1 Random fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
What is a random field? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
What is a random variable? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
What is a random experiment? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
How do we perform a random experiment with computers? . . . . . . . . . . . . . 178
How do we describe random variables? . . . . . . . . . . . . . . . . . . . . . . . . . 178
What is the probability of an event? . . . . . . . . . . . . . . . . . . . . . . . . . . 179
What is the distribution function of a random variable? . . . . . . . . . . . . . . . 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
How do we describe many random variables? . . . . . . . . . . . . . . . . . . . . . 184
What relationships may n random variables have with each other? . . . . . . . . . 184
How do we define a random field? . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
When is a random field homogeneous with respect to the mean? . . . . . . . . . . 195
When is a random field homogeneous with respect to the autocorrelation function? 195
How can we calculate the spatial statistics of a random field? . . . . . . . . . . . . 196
How do we compute the spatial autocorrelation function of an image in practice? . 196
When is a random field ergodic with respect to the mean? . . . . . . . . . . . . . . 197
When is a random field ergodic with respect to the autocorrelation function? . . . 197
What is the implication of ergodicity? . . . . . . . . . . . . . . . . . . . . . . . . . 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
optimal way a whole set of images? . . . . . . . . . . . . . . . . . . . . . . . . 200
3.2 Karhunen-Loeve transform . . . . . . . . . . . . . . . . . . . . . . . . . . 201
What is the Karhunen-Loeve transform? . . . . . . . . . . . . . . . . . . . . . . . . 201
Why does diagonalisation of the autocovariance matrix of a set of images define a
desirable basis for expressing the images in the set? . . . . . . . . . . . . . . . 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
ensemble is stationary with respect to the autocorrelation? . . . . . . . . . . 210
How do we go from the 1D autocorrelation function of the vector representation of
an image to its 2D autocorrelation matrix? . . . . . . . . . . . . . . . . . . . 211
How can we transform the image so that its autocorrelation matrix is diagonal? . . 213
Contents xi

How do we compute the K-L transform of an image in practice? . . . . . . . . . . 214


How do we compute the Karhunen-Loeve (K-L) transform of an ensemble of
images? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Is the assumption of ergodicity realistic? . . . . . . . . . . . . . . . . . . . . . . . . 215
Box 3.2. How can we calculate the spatial autocorrelation matrix of an image, when
it is represented by a vector? . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Is the mean of the transformed image expected to be really 0? . . . . . . . . . . . 220
How can we approximate an image using its K-L transform? . . . . . . . . . . . . . 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
an image? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Box 3.3. What is the error of the approximation of an image using the Karhunen-
Loeve transform? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
3.3 Independent component analysis . . . . . . . . . . . . . . . . . . . . . . 234
What is Independent Component Analysis (ICA)? . . . . . . . . . . . . . . . . . . 234
What is the cocktail party problem? . . . . . . . . . . . . . . . . . . . . . . . . . . 234
How do we solve the cocktail party problem? . . . . . . . . . . . . . . . . . . . . . 235
What does the central limit theorem say? . . . . . . . . . . . . . . . . . . . . . . . 235
What do we mean by saying that “the samples of x1 (t) are more Gaussianly dis-
tributed than either s1 (t) or s2 (t)” in relation to the cocktail party problem?
Are we talking about the temporal samples of x1 (t), or are we talking about
all possible versions of x1 (t) at a given time? . . . . . . . . . . . . . . . . . . 235
How do we measure non-Gaussianity? . . . . . . . . . . . . . . . . . . . . . . . . . 239
How are the moments of a random variable computed? . . . . . . . . . . . . . . . . 239
How is the kurtosis defined? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
How is negentropy defined? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
How is entropy defined? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Box 3.4. From all probability density functions with the same variance, the Gaussian
has the maximum entropy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
How is negentropy computed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Box 3.5. Derivation of the approximation of negentropy in terms of moments . . . 252
Box 3.6. Approximating the negentropy with nonquadratic functions . . . . . . . . 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
How may ICA be used in image processing? . . . . . . . . . . . . . . . . . . . . . . 264
How do we search for the independent components? . . . . . . . . . . . . . . . . . 264
How can we whiten the data? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
How can we select the independent components from whitened data? . . . . . . . . 267
Box 3.8. How does the method of Lagrange multipliers work? . . . . . . . . . . . . 268
Box 3.9. How can we choose a direction that maximises the negentropy? . . . . . . 269
How do we perform ICA in image processing in practice? . . . . . . . . . . . . . . 274
How do we apply ICA to signal processing? . . . . . . . . . . . . . . . . . . . . . . 283
What are the major characteristics of independent component analysis? . . . . . . 289
What is the difference between ICA as applied in image and in signal processing? . 290
What is the “take home” message of this chapter? . . . . . . . . . . . . . . . . . . 292
xii Contents

4 Image Enhancement 293


What is image enhancement? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
How can we enhance an image? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
What is linear filtering? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
4.1 Elements of linear filter theory . . . . . . . . . . . . . . . . . . . . . . . . 294
How do we define a 2D filter? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
How are the frequency response function and the unit sample response of the filter
related? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Why are we interested in the filter function in the real domain? . . . . . . . . . . . 294
Are there any conditions which h(k, l) must fulfil so that it can be used as a convo-
lution filter? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Box 4.1. What is the unit sample response of the 2D ideal low pass filter? . . . . . 296
What is the relationship between the 1D and the 2D ideal lowpass filters? . . . . . 300
How can we implement in the real domain a filter that is infinite in extent? . . . . 301
Box 4.2. z-transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Can we define a filter directly in the real domain for convenience? . . . . . . . . . 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
What are the types of noise present in an image? . . . . . . . . . . . . . . . . . . . 311
What is impulse noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
What is Gaussian noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
What is additive noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
What is multiplicative noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
What is homogeneous noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
What is zero-mean noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
What is biased noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
What is independent noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
What is uncorrelated noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
What is white noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
What is the relationship between zero-mean uncorrelated and white noise? . . . . 313
What is iid noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Is it possible to have white noise that is not iid? . . . . . . . . . . . . . . . . . . . 315
Box 4.3. The probability density function of a function of a random variable . . . 320
Why is noise usually associated with high frequencies? . . . . . . . . . . . . . . . . 324
How do we deal with multiplicative noise? . . . . . . . . . . . . . . . . . . . . . . . 325
Box 4.4. The Fourier transform of the delta function . . . . . . . . . . . . . . . . . 325
Box 4.5. Wiener-Khinchine theorem . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Is the assumption of Gaussian noise in an image justified? . . . . . . . . . . . . . . 326
How do we remove shot noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
What is a rank order filter? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
What is median filtering? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
What is mode filtering? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
How do we reduce Gaussian noise? . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Can we have weighted median and mode filters like we have weighted mean filters? 333
Can we filter an image by using the linear methods we learnt in Chapter 2? . . . . 335
How do we deal with mixed noise in images? . . . . . . . . . . . . . . . . . . . . . 337
Contents xiii

Can we avoid blurring the image when we are smoothing it? . . . . . . . . . . . . . 337
What is the edge adaptive smoothing? . . . . . . . . . . . . . . . . . . . . . . . . . 337
Box 4.6. Efficient computation of the local variance . . . . . . . . . . . . . . . . . 339
How does the mean shift algorithm work? . . . . . . . . . . . . . . . . . . . . . . . 339
What is anisotropic diffusion? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Box 4.7. Scale space and the heat equation . . . . . . . . . . . . . . . . . . . . . . 342
Box 4.8. Gradient, Divergence and Laplacian . . . . . . . . . . . . . . . . . . . . . 345
Box 4.9. Differentiation of an integral with respect to a parameter . . . . . . . . . 348
Box 4.10. From the heat equation to the anisotropic diffusion algorithm . . . . . . 348
How do we perform anisotropic diffusion in practice? . . . . . . . . . . . . . . . . . 349
4.3 Reducing low frequency interference . . . . . . . . . . . . . . . . . . . . 351
When does low frequency interference arise? . . . . . . . . . . . . . . . . . . . . . . 351
Can variable illumination manifest itself in high frequencies? . . . . . . . . . . . . 351
In which other cases may we be interested in reducing low frequencies? . . . . . . . 351
What is the ideal high pass filter? . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
How can we enhance small image details using nonlinear filters? . . . . . . . . . . . 357
What is unsharp masking? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
How can we apply the unsharp masking algorithm locally? . . . . . . . . . . . . . . 357
How does the locally adaptive unsharp masking work? . . . . . . . . . . . . . . . . 358
How does the retinex algorithm work? . . . . . . . . . . . . . . . . . . . . . . . . . 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
What is homomorphic filtering? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
What is photometric stereo? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
What does flatfielding mean? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
How is flatfielding performed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
4.4 Histogram manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
What is the histogram of an image? . . . . . . . . . . . . . . . . . . . . . . . . . . 367
When is it necessary to modify the histogram of an image? . . . . . . . . . . . . . 367
How can we modify the histogram of an image? . . . . . . . . . . . . . . . . . . . . 367
What is histogram manipulation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
What affects the semantic information content of an image? . . . . . . . . . . . . . 368
How can we perform histogram manipulation and at the same time preserve the
information content of the image? . . . . . . . . . . . . . . . . . . . . . . . . . 368
What is histogram equalisation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Why do histogram equalisation programs usually not produce images with flat his-
tograms? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
How do we perform histogram equalisation in practice? . . . . . . . . . . . . . . . 370
Can we obtain an image with a perfectly flat histogram? . . . . . . . . . . . . . . . 372
What if we do not wish to have an image with a flat histogram? . . . . . . . . . . 373
How do we do histogram hyperbolisation in practice? . . . . . . . . . . . . . . . . . 373
How do we do histogram hyperbolisation with random additions? . . . . . . . . . . 374
Why should one wish to perform something other than histogram equalisation? . . 374
What if the image has inhomogeneous contrast? . . . . . . . . . . . . . . . . . . . 375
Can we avoid damaging flat surfaces while increasing the contrast of genuine tran-
sitions in brightness? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
xiv Contents

How can we enhance an image by stretching only the grey values that appear in
genuine brightness transitions? . . . . . . . . . . . . . . . . . . . . . . . . . . 377
How do we perform pairwise image enhancement in practice? . . . . . . . . . . . . 378
4.5 Generic deblurring algorithms . . . . . . . . . . . . . . . . . . . . . . . . 383
How does mode filtering help deblur an image? . . . . . . . . . . . . . . . . . . . . 383
Can we use an edge adaptive window to apply the mode filter? . . . . . . . . . . . 385
How can mean shift be used as a generic deblurring algorithm? . . . . . . . . . . . 385
What is toboggan contrast enhancement? . . . . . . . . . . . . . . . . . . . . . . . 387
How do we do toboggan contrast enhancement in practice? . . . . . . . . . . . . . 387
What is the “take home” message of this chapter? . . . . . . . . . . . . . . . . . . 393

5 Image Restoration 395


What is image restoration? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Why may an image require restoration? . . . . . . . . . . . . . . . . . . . . . . . . 395
What is image registration? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
How is image restoration performed? . . . . . . . . . . . . . . . . . . . . . . . . . . 395
What is the difference between image enhancement and image restoration? . . . . 395
5.1 Homogeneous linear image restoration: inverse filtering . . . . . . . . 396
How do we model homogeneous linear image degradation? . . . . . . . . . . . . . . 396
How may the problem of image restoration be solved? . . . . . . . . . . . . . . . . 396
How may we obtain information on the frequency response function Ĥ(u, v) of the
degradation process? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
If we know the frequency response function of the degradation process, isn’t the
solution to the problem of image restoration trivial? . . . . . . . . . . . . . . 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
How can we avoid the amplification of noise? . . . . . . . . . . . . . . . . . . . . . 408
How do we apply inverse filtering in practice? . . . . . . . . . . . . . . . . . . . . . 410
Can we define a filter that will automatically take into consideration the noise in
the blurred image? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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-
mation problem? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
Box 5.1. The least squares error solution . . . . . . . . . . . . . . . . . . . . . . . . 420
Box 5.2. From the Fourier transform of the correlation functions of images to their
spectral densities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Box 5.3. Derivation of the Wiener filter . . . . . . . . . . . . . . . . . . . . . . . . 428
What is the relationship between Wiener filtering and inverse filtering? . . . . . . 430
How can we determine the spectral density of the noise field? . . . . . . . . . . . . 430
How can we possibly use Wiener filtering, if we know nothing about the statistical
properties of the unknown image? . . . . . . . . . . . . . . . . . . . . . . . . 430
How do we apply Wiener filtering in practice? . . . . . . . . . . . . . . . . . . . . . 431
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
Is there any way by which matrix H can be inverted? . . . . . . . . . . . . . . . . 437
When is a matrix block circulant? . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
When is a matrix circulant? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
Why can block circulant matrices be inverted easily? . . . . . . . . . . . . . . . . . 438
Which are the eigenvalues and eigenvectors of a circulant matrix? . . . . . . . . . . 438
How does the knowledge of the eigenvalues and the eigenvectors of a matrix help in
inverting the matrix? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
How do we know that matrix H that expresses the linear degradation process is
block circulant? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
How can we diagonalise a block circulant matrix? . . . . . . . . . . . . . . . . . . . 445
Box 5.4. Proof of equation (5.189) . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
Box 5.5. What is the transpose of matrix H? . . . . . . . . . . . . . . . . . . . . . 448
How can we overcome the extreme sensitivity of matrix inversion to noise? . . . . . 455
How can we incorporate the constraint in the inversion of the matrix? . . . . . . . 456
Box 5.6. Derivation of the constrained matrix inversion filter . . . . . . . . . . . . 459
What is the relationship between the Wiener filter and the constrained matrix in-
version filter? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
How do we apply constrained matrix inversion in practice? . . . . . . . . . . . . . 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
Box 5.7. Jacobi’s method for inverting large systems of linear equations . . . . . . 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-
tions for using the Gauss-Seidel or the Jacobi method? . . . . . . . . . . . . . 485
What happens if matrix H does not satisfy the conditions for the Gauss-Seidel
method? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
How do we apply the gradient descent algorithm in practice? . . . . . . . . . . . . 487
What happens if we do not know matrix H? . . . . . . . . . . . . . . . . . . . . . 489
5.5 Nonlinear image restoration: MAP estimation . . . . . . . . . . . . . . 490
What does MAP estimation mean? . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
degradation model and the degraded image? . . . . . . . . . . . . . . . . . . . 490
Box 5.9. Probabilities: prior, a priori, posterior, a posteriori, conditional . . . . . . 491
Is the minimum of the cost function unique? . . . . . . . . . . . . . . . . . . . . . 491
How can we select then one solution from all possible solutions that minimise the
cost function? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493
Can we combine the posterior and the prior probabilities for a configuration x? . . 493
Box 5.10. Parseval’s theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
xvi Contents

How do we model in general the cost function we have to minimise in order to restore
an image? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
What happens if the image has genuine discontinuities? . . . . . . . . . . . . . . . 502
How do we minimise the cost function? . . . . . . . . . . . . . . . . . . . . . . . . 503
How do we create a possible new solution from the previous one? . . . . . . . . . . 503
How do we know when to stop the iterations? . . . . . . . . . . . . . . . . . . . . . 505
How do we reduce the temperature in simulated annealing? . . . . . . . . . . . . . 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
density function? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
Why is simulated annealing slow? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
How can we accelerate simulated annealing? . . . . . . . . . . . . . . . . . . . . . . 511
How can we coarsen the configuration space? . . . . . . . . . . . . . . . . . . . . . 512
5.6 Geometric image restoration . . . . . . . . . . . . . . . . . . . . . . . . . 513
How may geometric distortion arise? . . . . . . . . . . . . . . . . . . . . . . . . . . 513
Why do lenses cause distortions? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
How can a geometrically distorted image be restored? . . . . . . . . . . . . . . . . 513
How do we perform the spatial transformation? . . . . . . . . . . . . . . . . . . . . 513
How may we model the lens distortions? . . . . . . . . . . . . . . . . . . . . . . . . 514
How can we model the inhomogeneous distortion? . . . . . . . . . . . . . . . . . . 515
How can we specify the parameters of the spatial transformation model? . . . . . . 516
Why is grey level interpolation needed? . . . . . . . . . . . . . . . . . . . . . . . . 516
Box 5.12. The Hough transform for line detection . . . . . . . . . . . . . . . . . . . 520
What is the “take home” message of this chapter? . . . . . . . . . . . . . . . . . . 526

6 Image Segmentation and Edge Detection 527


What is this chapter about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
What exactly is the purpose of image segmentation and edge detection? . . . . . . 527
6.1 Image segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
How can we divide an image into uniform regions? . . . . . . . . . . . . . . . . . . 528
What do we mean by “labelling” an image? . . . . . . . . . . . . . . . . . . . . . . 528
What can we do if the valley in the histogram is not very sharply defined? . . . . . 528
How can we minimise the number of misclassified pixels? . . . . . . . . . . . . . . 529
How can we choose the minimum error threshold? . . . . . . . . . . . . . . . . . . 530
What is the minimum error threshold when object and background pixels are nor-
mally distributed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
Contents xvii

What are the drawbacks of the minimum error threshold method? . . . . . . . . . 541
Is there any method that does not depend on the availability of models for the
distributions of the object and the background pixels? . . . . . . . . . . . . . 541
Box 6.1. Derivation of Otsu’s threshold . . . . . . . . . . . . . . . . . . . . . . . . 542
Are there any drawbacks in Otsu’s method? . . . . . . . . . . . . . . . . . . . . . . 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
What do we do if the histogram has only one peak? . . . . . . . . . . . . . . . . . 549
Are there any shortcomings of the grey value thresholding methods? . . . . . . . . 550
How can we cope with images that contain regions that are not uniform but they
are perceived as uniform? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551
Can we improve histogramming methods by taking into consideration the spatial
proximity of pixels? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
Are there any segmentation methods that take into consideration the spatial prox-
imity of pixels? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
How can one choose the seed pixels? . . . . . . . . . . . . . . . . . . . . . . . . . . 554
How does the split and merge method work? . . . . . . . . . . . . . . . . . . . . . 554
What is morphological image reconstruction? . . . . . . . . . . . . . . . . . . . . . 554
How does morphological image reconstruction allow us to identify the seeds needed
for the watershed algorithm? . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
How do we compute the gradient magnitude image? . . . . . . . . . . . . . . . . . 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
watershed algorithm? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
Are there any drawbacks in the watershed algorithm which works with the gradient
magnitude image? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
Is it possible to segment an image by filtering? . . . . . . . . . . . . . . . . . . . . 574
How can we use the mean shift algorithm to segment an image? . . . . . . . . . . . 574
What is a graph? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
How can we use a graph to represent an image? . . . . . . . . . . . . . . . . . . . . 576
How can we use the graph representation of an image to segment it? . . . . . . . . 576
What is the normalised cuts algorithm? . . . . . . . . . . . . . . . . . . . . . . . . 576
Box 6.3. The normalised cuts algorithm as an eigenvalue problem . . . . . . . . . . 576
Box 6.4. How do we minimise the Rayleigh quotient? . . . . . . . . . . . . . . . . . 585
How do we apply the normalised graph cuts algorithm in practice? . . . . . . . . . 589
Is it possible to segment an image by considering the dissimilarities between regions,
as opposed to considering the similarities between pixels? . . . . . . . . . . . 589
6.2 Edge detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
How do we measure the dissimilarity between neighbouring pixels? . . . . . . . . . 591
xviii Contents

What is the smallest possible window we can choose? . . . . . . . . . . . . . . . . 592


What happens when the image has noise? . . . . . . . . . . . . . . . . . . . . . . . 593
Box 6.5. How can we choose the weights of a 3 × 3 mask for edge detection? . . . . 595
What is the best value of parameter K? . . . . . . . . . . . . . . . . . . . . . . . . 596
Box 6.6. Derivation of the Sobel filters . . . . . . . . . . . . . . . . . . . . . . . . . 596
In the general case, how do we decide whether a pixel is an edge pixel or not? . . . 601
How do we perform linear edge detection in practice? . . . . . . . . . . . . . . . . 602
Are Sobel masks appropriate for all images? . . . . . . . . . . . . . . . . . . . . . . 605
How can we choose the weights of the mask if we need a larger mask owing to the
presence of significant noise in the image? . . . . . . . . . . . . . . . . . . . . 606
Can we use the optimal filters for edges to detect lines in an image in an
optimal way? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
What is the fundamental difference between step edges and lines? . . . . . . . . . . 609
Box 6.7. Convolving a random noise signal with a filter . . . . . . . . . . . . . . . 615
Box 6.8. Calculation of the signal to noise ratio after convolution of a noisy edge
signal with a filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
Box 6.9. Derivation of the good locality measure . . . . . . . . . . . . . . . . . . . 617
Box 6.10. Derivation of the count of false maxima . . . . . . . . . . . . . . . . . . 619
Can edge detection lead to image segmentation? . . . . . . . . . . . . . . . . . . . 620
What is hysteresis edge linking? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
Does hysteresis edge linking lead to closed edge contours? . . . . . . . . . . . . . . 621
What is the Laplacian of Gaussian edge detection method? . . . . . . . . . . . . . 623
Is it possible to detect edges and lines simultaneously? . . . . . . . . . . . . . . . . 623
6.3 Phase congruency and the monogenic signal . . . . . . . . . . . . . . . 625
What is phase congruency? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
What is phase congruency for a 1D digital signal? . . . . . . . . . . . . . . . . . . 625
How does phase congruency allow us to detect lines and edges? . . . . . . . . . . . 626
Why does phase congruency coincide with the maximum of the local energy of the
signal? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626
How can we measure phase congruency? . . . . . . . . . . . . . . . . . . . . . . . . 627
Couldn’t we measure phase congruency by simply averaging the phases of the har-
monic components? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
How do we measure phase congruency in practice? . . . . . . . . . . . . . . . . . . 630
How do we measure the local energy of the signal? . . . . . . . . . . . . . . . . . . 630
Why should we perform convolution with the two basis signals in order to get the
projection of the local signal on the basis signals? . . . . . . . . . . . . . . . . 632
Box 6.11. Some properties of the continuous Fourier transform . . . . . . . . . . . 637
If all we need to compute is the local energy of the signal, why don’t we use Parseval’s
theorem to compute it in the real domain inside a local window? . . . . . . . 647
How do we decide which filters to use for the calculation of the local energy? . . . 648
How do we compute the local energy of a 1D signal in practice? . . . . . . . . . . . 651
How can we tell whether the maximum of the local energy corresponds to a sym-
metric or an antisymmetric feature? . . . . . . . . . . . . . . . . . . . . . . . 652
How can we compute phase congruency and local energy in 2D? . . . . . . . . . . 659
What is the analytic signal? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
How can we generalise the Hilbert transform to 2D? . . . . . . . . . . . . . . . . . 660
How do we compute the Riesz transform of an image? . . . . . . . . . . . . . . . . 660
Contents xix

How can the monogenic signal be used? . . . . . . . . . . . . . . . . . . . . . . . . 660


How do we select the even filter we use? . . . . . . . . . . . . . . . . . . . . . . . . 661
What is the “take home” message of this chapter? . . . . . . . . . . . . . . . . . . 668

7 Image Processing for Multispectral Images 669


What is a multispectral image? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
What are the problems that are special to multispectral images? . . . . . . . . . . 669
What is this chapter about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
How do we usually construct a grey image from a multispectral image? . . . . . . 671
How can we construct a single band from a multispectral image that contains the
maximum amount of image information? . . . . . . . . . . . . . . . . . . . . . 671
What is principal component analysis? . . . . . . . . . . . . . . . . . . . . . . . . . 672
Box 7.1. How do we measure information? . . . . . . . . . . . . . . . . . . . . . . . 673
How do we perform principal component analysis in practice? . . . . . . . . . . . . 674
What are the advantages of using the principal components of an image, instead of
the original bands? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
What are the disadvantages of using the principal components of an image instead
of the original bands? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
Is it possible to work out only the first principal component of a multispectral image
if we are not interested in the other components? . . . . . . . . . . . . . . . . 682
Box 7.2. The power method for estimating the largest eigenvalue of a matrix . . . 682
What is the problem of spectral constancy? . . . . . . . . . . . . . . . . . . . . . . 684
What influences the spectral signature of a pixel? . . . . . . . . . . . . . . . . . . . 684
What is the reflectance function? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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
How do we model the process of image formation for Lambertian surfaces? . . . . 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
What is the spectral unmixing problem? . . . . . . . . . . . . . . . . . . . . . . . . 688
How do we solve the linear spectral unmixing problem? . . . . . . . . . . . . . . . 689
Can we use library spectra for the pure materials? . . . . . . . . . . . . . . . . . . 689
How do we solve the linear spectral unmixing problem when we know the spectra
of the pure components? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690
Is it possible that the inverse of matrix Q cannot be computed? . . . . . . . . . . . 693
What happens if the library spectra have been sampled at different wavelengths
from the mixed spectrum? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693
xx Contents

What happens if we do not know which pure substances might be present in the
mixed substance? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694
How do we solve the linear spectral unmixing problem if we do not know the spectra
of the pure materials? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695
7.2 The physics and psychophysics of colour vision . . . . . . . . . . . . . 700
What is colour? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700
What is the interest in colour from the engineering point of view? . . . . . . . . . 700
What influences the colour we perceive for a dark object? . . . . . . . . . . . . . . 700
What causes the variations of the daylight? . . . . . . . . . . . . . . . . . . . . . . 701
How can we model the variations of the daylight? . . . . . . . . . . . . . . . . . . . 702
Box 7.3. Standard illuminants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
What is the observed variation in the natural materials? . . . . . . . . . . . . . . . 706
What happens to the light once it reaches the sensors? . . . . . . . . . . . . . . . . 711
Is it possible for different materials to produce the same recording by a sensor? . . 713
How does the human visual system achieve colour constancy? . . . . . . . . . . . . 714
What does the trichromatic theory of colour vision say? . . . . . . . . . . . . . . . 715
What defines a colour system? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
How are the tristimulus values specified? . . . . . . . . . . . . . . . . . . . . . . . . 715
Can all monochromatic reference stimuli be matched by simply adjusting the inten-
sities of the primary lights? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
Do all people require the same intensities of the primary lights to match the same
monochromatic reference stimulus? . . . . . . . . . . . . . . . . . . . . . . . . 717
Who are the people with normal colour vision? . . . . . . . . . . . . . . . . . . . . 717
What are the most commonly used colour systems? . . . . . . . . . . . . . . . . . . 717
What is the CIE RGB colour system? . . . . . . . . . . . . . . . . . . . . . . . . . 717
What is the XY Z colour system? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718
How do we represent colours in 3D? . . . . . . . . . . . . . . . . . . . . . . . . . . 718
How do we represent colours in 2D? . . . . . . . . . . . . . . . . . . . . . . . . . . 718
What is the chromaticity diagram? . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
Box 7.4. Some useful theorems from 3D geometry . . . . . . . . . . . . . . . . . . 721
What is the chromaticity diagram for the CIE RGB colour system? . . . . . . . . 724
How does the human brain perceive colour brightness? . . . . . . . . . . . . . . . . 725
How is the alychne defined in the CIE RGB colour system? . . . . . . . . . . . . 726
How is the XY Z colour system defined? . . . . . . . . . . . . . . . . . . . . . . . . 726
What is the chromaticity diagram of the XY Z colour system? . . . . . . . . . . . 728
How is it possible to create a colour system with imaginary primaries, in practice? 729
What if we wish to model the way a particular individual sees colours? . . . . . . . 729
If different viewers require different intensities of the primary lights to see white,
how do we calibrate colours between different viewers? . . . . . . . . . . . . . 730
How do we make use of the reference white? . . . . . . . . . . . . . . . . . . . . . . 730
How is the sRGB colour system defined? . . . . . . . . . . . . . . . . . . . . . . . 732
Does a colour change if we double all its tristimulus values? . . . . . . . . . . . . . 733
How does the description of a colour, in terms of a colour system, relate to the way
we describe colours in everyday language? . . . . . . . . . . . . . . . . . . . . 733
How do we compare colours? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
What is a metric? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
Can we use the Euclidean metric to measure the difference of two colours? . . . . . 734
Contents xxi

Which are the perceptually uniform colour spaces? . . . . . . . . . . . . . . . . . . 734


How is the Luv colour space defined? . . . . . . . . . . . . . . . . . . . . . . . . . . 734
How is the Lab colour space defined? . . . . . . . . . . . . . . . . . . . . . . . . . . 735
How do we choose values for (Xn , Yn , Zn )? . . . . . . . . . . . . . . . . . . . . . . . 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
How do we measure perceived saturation? . . . . . . . . . . . . . . . . . . . . . . . 737
How do we measure perceived differences in saturation? . . . . . . . . . . . . . . . 737
How do we measure perceived hue? . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
How is the perceived hue angle defined? . . . . . . . . . . . . . . . . . . . . . . . . 738
How do we measure perceived differences in hue? . . . . . . . . . . . . . . . . . . . 738
What affects the way we perceive colour? . . . . . . . . . . . . . . . . . . . . . . . 740
What is meant by temporal context of colour? . . . . . . . . . . . . . . . . . . . . 740
What is meant by spatial context of colour? . . . . . . . . . . . . . . . . . . . . . . 740
Why distance matters when we talk about spatial frequency? . . . . . . . . . . . . 741
How do we explain the spatial dependence of colour perception? . . . . . . . . . . 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
How do we measure hue and saturation in image processing applications? . . . . . 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
What is a Monte-Carlo method? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
How do we remove noise from multispectral images? . . . . . . . . . . . . . . . . . 759
How do we rank vectors? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760
How do we deal with mixed noise in multispectral images? . . . . . . . . . . . . . . 760
How do we enhance a colour image? . . . . . . . . . . . . . . . . . . . . . . . . . . 761
How do we restore multispectral images? . . . . . . . . . . . . . . . . . . . . . . . . 767
How do we compress colour images? . . . . . . . . . . . . . . . . . . . . . . . . . . 767
How do we segment multispectral images? . . . . . . . . . . . . . . . . . . . . . . . 767
How do we apply k-means clustering in practice? . . . . . . . . . . . . . . . . . . . 767
How do we extract the edges of multispectral images? . . . . . . . . . . . . . . . . 769
What is the “take home” message of this chapter? . . . . . . . . . . . . . . . . . . 770

Bibliographical notes 775

References 777

Index 781
Discovering Diverse Content Through
Random Scribd Documents
2 . mischief hither in Bell, who, however, prints
3

from Ritson.
2 . as: at in Scott, who had his copy, as printed
4

in 1792, from Ritson’s nephew. at also in Bell.


9 , 29 . Corbyl, it is thought, should be Corbyt,
3 3

which is a northern name. Both Corbyl and


Carrick were new to Surtees.
10 . Bell reads would, not understanding that
3

could means did.


11 . Scott, wrongly, have for is: Bell, who aims
1

at grammar, are.
17 . He had, Bell, for improvement again.
3

23 . The reciter, from his advanced age, could


4

not recollect this line: Ritson.


25 . Bell, land for hand.
2

30 . Bell, in for to.


3

Ritson’s emendations, indicated by ’ ‘, have


necessarily been allowed to stand.
180

KING JAMES AND BROWN

‘Kinge James and Browne,’ Percy MS., p. 58; Hales


and Furnivall, I, 135.

As the minstrel is walking by himself, he hears a


young prince lamenting. The prince says to him,
Yonder comes a Scot who will do me wrong. Douglas
comes with armed men, who beset the king with
swords and spears. Are you lords of Scotland, come
for council, asks the king, or are you traitors, come
for my blood? They say that they are traitors, come
for his blood. Fie on you, false Scots! exclaims the
king; you have slain my grandfather, caused my
mother to flee, and hanged my father. [About nine
stanzas are lost here.] Douglas offers Brown his
daughter in marriage to betray the king; Brown will
never be a traitor. Douglas is making off fast, but
Brown takes him prisoner and conducts him to the
king. Douglas prays for pardon. The king replies that
Douglas has sought to kill him ever since he was
born. Douglas swears to be a true subject if
pardoned. The king pardons him freely, and all
traitors in Scotland, great and small. Douglas mutters
to himself (we may suppose), If I live a twelvemonth
you shall die, and I will burn Edinburgh to-morrow.
This irredeemable traitor hies to Edinburgh with his
men, but the people shut the gates against him.
Brown is always where he is wanted, and takes
Douglas prisoner again; the report that Douglas is
secured goes to the king, who demands his taker to
be brought into his presence, and promises him a
thousand pound a year. So they call Brown; we may
imagine that the distance is no greater than
Holyrood. How often hast thou fought for me,
Brown? asks James. Brown’s first service was in
Edinburgh; had he not stood stoutly there, James
had never been king. The second was his killing the
sheriff of Carlisle’s son, who was on the point of
slaying his Grace. The third was when he killed the
Bishop of St Andrews, who had undertaken to poison
the king. James had already made the faithful
Englishman (for such he is) knight; now he makes
him an earl, with professions of fidelity to the English
queen.
This third service of Brown is the subject of a
poem by William Elderton, here given in an
appendix. The bishop is about to give the king (then
a child) a poisoned posset. The lady nurse calls for
aid. Brown, an Englishman, hears, goes to help,
meets the bishop hurrying off with the posset in his
hand, and forces him to drink it, though the bishop
makes him handsome offers not to interfere. The
venom works swiftly, the bishop’s belly bursts. The
king knights Brown, and gives him lands and livings.
John Hamilton, Archbishop of St Andrews, must be
the person whom Brown slays in the ballad for an
attempt to poison the young king. He was, however,
hanged by his political enemies, April 7, 1571. This
prelate was credited with being an accomplice to the
murder of Darnley and to that of the Regent Murray.
His elder brother was heir to the throne after the
progeny of Mary Stuart, and both of these persons
were more or less in the way. Mary Stuart’s son was
a step on which the Hamiltons must “fall down or
else oerleap,” and the archbishop is said to have
sneered at the Duke of Chatelheraut for letting an
infant live between him and the throne. A report that
the archbishop had undertaken to poison this infant
would readily be believed. Sir William Drury thought
it worth his while to write to Cecil that Queen Mary
[287]
had done the same before her son was a year old.
Of Browne’s two previous performances, his
standing stoutly for the king at Edinburgh, st. 26,
and his killing the son of the sheriff of Carlisle, st. 27,
we are permitted to know only that, since these
preceded the killing of the bishop, they occurred at
some time before James was five years old. The
epoch of the adventure with Douglas, which is the
principal subject of the ballad, could be determined
beyond question if we could ascertain when Brown
was made an earl. It falls after the murder of the
1
Regent Lennox, 8 , that is, later than September,
1571, and the king is old enough to know something
of the unhappy occurrences in his family, to forget
and forgive, and to make knights and earls. There
are correspondences between the ballad and the
proceedings by which the Earl of Morton, after his
resignation of the regency, obtained possession of
the young king’s person and virtually reëstablished
himself in his former power. This was in April, 1578,
when James was not quite twelve years old. Morton
was living at Lochleven “for policie, devysing the
situation of a fayre gardene with allayis, to remove
all suspicion of his consavit treason.” James was in
the keeping of Alexander Erskine, his guardian, at
Stirling Castle, of which Erskine was governor; and
the young Earl of Mar, nephew of the governor, was
residing there. This young man became persuaded,
perhaps through Morton’s representations, that he
himself was entitled to the custody of the castle, and
incidentally of the king. Early in the morning of the
26th of April, before the garrison were astir, Mar
(who was risen under pretence of a hunting-party),
supported by two Abbot Erskines, his uncles, and a
retinue of his own, demanded the castle-keys of the
governor. An affray followed, in which a son of
Alexander Erskine lost his life. The young king,
wakened by the noise, rushed in terror from his
chamber, tearing his hair. Mar overpowered
resistance and seized the keys. Shortly after this, he
and his uncle the governor came to terms at the
instance of the king, Mar retaining Stirling Castle and
the wardenship of the king, and the uncle being
made keeper of the castle of Edinburgh. Morton was
received into Stirling Castle, and resumed his sway.
All this did not pass without opposition. The citizens
of Edinburgh rose in arms against Morton (cf. sts 21,
22), and large forces collected from other parts of
the country for the liberation of the king. A civil war
was imminent, and was avoided, it would seem,
chiefly through the influence of the English minister,
Bowes, who offered himself as peacemaker, in the
[288]
name of his queen (cf. sts 31, 32).
The Douglas of this ballad is clearly William
Douglas of Lochleven, who joined Mar at Stirling as
Morton’s intermediary. He was afterwards engaged in
the Raid of Ruthven.
It may be added that Robert Brown, a servant of
the king’s, played a very humble part, for the
defence of his master, in the Gowrie Conspiracy, but
that was nearly twenty years after Andrew Brown
was celebrated by Elderton, and when James was no
young prince, but in his thirty-fifth year.

1
As I did walke my selfe alone,
And by one garden greene,
I heard a yonge prince make great moane,
Which did turne my hart to teene.

2
‘O Lord!’ he then said vntou me,
‘Why haue I liued soe long?
For yonder comes a cruell Scott,’
Quoth hee, ‘that will doe me some ronge.’
3
And then came traitor Douglas there,
He came for to betray his king;
Some they brought bills, and some they brought bowes,
And some the brought other things.

4
The king was aboue in a gallery,
With a heauy heart;
Vnto his body was sett about
With swords and speares soe sharpe.

5
‘Be you the lordes of Scotland,’ he said,
‘That hither for councell seeke to me?
Or bee yoe traitors to my crowne,
My blood that you wold see?’

6
‘Wee are the lords of Scottland,’ they said,
‘Nothing we come to craue of thee;
But wee be traitors to thy crowne,
Thy blood that wee will see.’

7
‘O fye vpon you, you false Scotts!
For you neuer all trew wilbe;
My grandfather you haue slaine,
And caused my mother to flee.

8
‘My grandfather you haue slaine,
And my owne father you hanged on a tree;
And now,’ quoth he, ‘the like treason
You haue now wrought for me.

9
‘Ffarwell hart, and farwell hand!
Farwell all pleasures alsoe!
Farwell th . . . my head
. . . . . . .

10
. . . . . . .
. . . . . . .
‘If thou wilt . . . .
And soe goe away with mee.’

11
‘Goe marry thy daughter to whome thou wilt,’
Quoth Browne; ‘thou marrys none to me;
For I’le not be a traitor,’ quoth Browne,
‘For all the gold that euer I see.’

12
This Douglas, hearing Browne soe say,
Began to flee away full fast;
‘But tarry a while,’ saies lusty Browne,
‘I’le make you to pay before you passe.’

13
He hath taken the Douglas prisoner,
And hath brought him before the king;
He kneeled low vpon his knee,
For pardon there prainge.

14
‘How shold I pardon thee,’ saith the king,
‘And thou’le remaine a traitor still?
For euer since that I was borne,’
Quoth he, ‘thou hast sought my blood to spill.’

15
‘For if you will grant me my pardon,’ he said,
‘Out of this place soe free,
I wilbe sworne before your Grace
A trew subiect to bee.’

16
‘God for-gaue his death,’ said the king,
‘When he was nayled vpon a tree;
And as free as euer God forgaue his death,
Douglas,’ quoth he, ‘I’le forgiue thee.

17
‘And all the traitors in Scottland,’
Quoth he, ‘both great and small;
As free as euer God forgaue his death,
Soe free I will forgiue them all.’

18
‘I thanke you for your pardon, king,
That you haue granted forth soe plaine;
If I liue a twelue month to an end,
You shall not aliue remaine.

19
‘Tomorrow yet, or ere I dine,
I meane to doo thee one good turne;
For Edenborrow, that is thine owne,’
Quoth he, ‘I will both h[arry] and [burne].’

20
Thus Douglas hied towards Edenborrow,
And many of his men were gone beffore;
And after him on euery side,
With him there went some twenty score.

21
But when that they did see him come,
They cryed lowd with voices, saying,
‘Yonder comes a false traitor,
That wold haue slaine our king.’

22
They chaynd vp the gates of Edenborrow,
And there the made them wonderous fast,
And there Browne sett on Douglas againe,
And quicklye did him ouer cast.

23
But worde came backe againe to the king,
With all the speed that euer might bee,
That traitor Douglas there was taken,
And his body was there to see.

24
‘Bring me his taker,’ quoth the king,
‘Come, quickly bring him vnto me!
I’le giue a thousand pound a yeere,
What man soeuer he bee.’

25
But then they called lusty Browne;
Sayes, ‘Browne, come thou hither to mee.
How oft hast thou foughten for my sake,
And alwayes woone the victory?’

26
‘The first time that I fought for you,
It was in Edenborrow, king;
If there I had not stoutly stood,
My leege, you neuer had beene king.

27
‘The second time I fought for you,
Here I will tell you in this place;
I killd the sheriffs sonne of Carlile,’
Quoth he, ‘that wold haue slaine your Grace.

28
‘The third time that I fought for you,
Here for to let you vnderstand,
I slew the Bishopp of St Andrew[s],’
Quoth he, ‘with a possat in [his hand].’

29
. . . . . quoth hee,
‘That euer my manhood I did trye;
I’le make a vow for Englands sake
That I will neuer battell flee.’

30
‘God amercy, Browne,’ then said the king,
‘And God amercy heartilye!
Before I made thee but a knight,
But now an earle I will make thee.

31
‘God saue the queene of England,’ he said,
‘For her blood is verry neshe;
As neere vnto her I am
As a colloppe shorne from the fleshe.

32
‘If I be false to England,’ he said,
‘Either in earnest or in iest,
I might be likened to a bird,’
Quoth he, ‘that did defile it nest.’

3
5 . yoe bee.
5 . by my: cf. 6 .
4 4
1
6 . are they.
8 . mother for father.
2

9 . Half a page torn away.


4

3
18 . a 12.
4
20 . 20 score.
3
24 . a 1000.
1
28 . the 3d:.

28 . possat? MS. rubbed: Hales.


4
APPENDIX

THE KING OF SCOTS AND ANDREW BROWNE

A new Ballad, declaring the great treason


conspired against the young King of Scots, and how
one Andrew Browne, an Englishman, which was the
king’s chamberlaine, preuented the same. To the
tune of Milfield, or els to Greenesleeues.
This piece, which is contained in a collection of
ballads and proclamations in the library of the
Society of Antiquaries, London, is signed W. Elderton,
and was “imprinted at London for Yarathe Iames,
dvvelling in Nevvgate Market, ouer against Christes
Church.” It was licensed to James, May 30, 1581:
Arber II, 393. Reprinted by Percy, Reliques, 1765, II,
204; here from the original. There is an imperfect
and incorrect copy in the Percy MS., p. 273; Hales
and Furnivall, II, 265.
Morton was beheaded only three days after these
verses were licensed, and had been in durance for
several months before at the castle of Edinburgh.
Elderton cannot be supposed to have the last news
from Scotland, and he was not a man to keep his
compositions by him nine years. The exhortation of
Morton to his confederate, Douglas, in the last stanza
but one is divertingly misplaced. The fictions of the
privie banket and the selling of the king beyond seas
are of the same mint as those in the ballad.
Jesus, God! what a griefe is this,
That princes subiects cannot be true,
But still the deuill hath some of his
Will play their parts, whatsoeuer ensue;
Forgetting what a greeuous thing
It is to offend the annointed kinge.
Alas for woe! why should it be so?
This makes a sorowfull heigh ho.

In Scotland is a bonie kinge,


As proper a youthe as neede to be,
Well giuen to euery happy thing
That can be in a kinge to see;
Yet that vnluckie countrie still
Hath people giuen to craftie will.
Alas for woe! etc.

On Whitson eue it so befell


A posset was made to give the kinge,
Whereof his ladie-nurse hard tell,
And that it was a poysoned thing.
She cryed, and called piteouslie,
‘Now helpe, or els the king shall die!’
Alas for woe! etc.

One Browne, that was an English man,


And hard the ladies piteous crye,
Out with his sword, and besturd him than
Out of the doores in haste to flie;
But all the doores were made so fast,
Out of a window he got at last.
Alas for woe! etc.

He met the bishop comming fast,


Hauing the posset in his hande;
The sight of Browne made him agast,
Who bad him stoutly staie and stand
Who bad him stoutly staie and stand.
With him were two that ranne away,
For feare that Browne would make a fray.
Alas for woe! etc.

‘Bishop,’ quoth Browne, ‘what hast thou there?’


‘Nothing at all, my freend,’ sayde he,
‘But a posset to make the king good cheere.’
‘Is it so?’ sayd Browne, ‘that will I see.
First I will haue thy selfe begin,
Before thou goe any further in;
Be it weale or woe, it shall be so.’
This makes a sorrowfull heigh ho.

The bishop saide, Browne, I doo know


Thou art a young man poore and bare;
Liuings on thee I will bestowe;
Let me go on, take thee no care.
‘No, no,’ quoth Browne, ‘I will not be
A traitour for all Christiantie.
Happe weal or woe, it shall be so:
Drinke now, with a sorrowfull heigh ho.’

The bishop dranke, and by and by


His belly burst and he fell downe:
A iust reward for his traytery.
‘This was a posset in deede!’ quoth Browne.
He serched the bishop, and found the keyes
To come to the kinge when he did please.
Alas for woe! etc.

As soone as the king gat word of this,


He humbly fell vppon his knee,
And praysed God that he did misse
To tast of that extremity:
For that he did perceaue and know
His clergie would betray him so.
Al f ! t
Alas for woe! etc.

‘Alas,’ he said, ‘vnhappy realme!


My father and godfather slaine,
My mother banished, O extreame
Vnhappy fate, and bitter bayne!
And now like treason wrought for me.
What more vnhappy realme can be!’
Alas for woe! etc.

The king did call his nurse to his grace,


And gave her twentie pound a yeere;
And trustie Browne to, in like case,
He knighted him, with gallant geere,
And gaue him . . . liuings great,
For dooing such a manly feat
As he did sho[w]e, to the bishops woe,
Which made, etc.

When all this treason don and past


Tooke not effect of traytery,
Another treason at the last
They sought against his Maiestie;
How they might make their kinge away
By a priuie banket on a daye.
Alas for woe! etc.

Wherat they ment to sell the king


Beyonde the seas, it was decreede:
Three noble earles heard of this thing,
And did preuent the same with speede.
For a letter came, with such a charme,
That they should doo they[r] king no harme,
For further woe, if they did so;
Which made a sorrowfull heigh ho.

The Earle Mourton told the Douglas then,


‘Take heede you doo not offend the kinge:
But shew your selues like honest men,
Obediently in euery thing;
For his godmother will not see
Her noble childe misvsde to be
With any woe; for if it be so,
She will make a sorrowfull heigh ho’

God graunt all subiects may be true,


In England, Scotland, and euerie where,
That no such daunger may ensue,
To put the prince or state in feare;
That God, the highest king, may see
Obedience as it ought to be.
In wealth or woe, God graunt it be so!
To auoide the sorrowfull heigh ho.
181

THE BONNY EARL OF MURRAY

A. ‘The Bonny Earl of Murray,’ Ramsay’s Tea-Table


Miscellany, 11th ed., London, 1750, p. 356 (vol.
iv).
B. ‘The Bonnie Earl o Murray,’ Finlay’s Scottish
Ballads, II, 11.

A is not in the ninth edition of the Tea-Table


Miscellany, 1733, but may be in the tenth (1736?
1740?), which I have not seen. It is printed in Percy’s
Reliques, 1765, II, 210, and in many subsequent
collections: Herd’s Scots Songs, 1769, p. 32; Ritson’s
Scottish Songs, 1794, II, 29; Johnson’s Museum, No
177; etc.
James Stewart, son of Sir James Stewart of Doune,
became Earl of Murray in consequence of his
marriage with the oldest daughter and heiress of the
Regent Murray. “He was a comely personage, of a
[289]
great stature, and strong of body like a kemp.”
There was a violent hostility between Murray and the
Earl of Huntly. The occurrence which is the subject of
the ballad may be narrated in the least space by
citing the account given by Spottiswood. After his
assault on Holyrood House in December (or
September), 1591, “Bothwell went into the north,
looking to be supplied by the Earl of Murray, his
cousin-german; which the king suspecting, Andrew
Lord Ochiltrie was sent to bring Murray unto the
south, of purpose to work a reconcilement betwixt
him and Huntly. But a rumor being raised in the
mean while that the Earl of Murray was seen in the
palace with Bothwell on the night of the enterprise,
the same was entertained by Huntly (who waited
then at court) to make him suspected of the king,
and prevailed so far as he did purchase a commission
to apprehend and bring Murray to his trial. The
nobleman, not fearing that any such course should
be used, was come to Donibristle, a house situated
on the north side of Forth, and belonging to his
mother the lady Doune. Huntly, being advertised of
his coming, and how he lay there secure,
accompanied only with the Sheriff of Murray and a
few of his own retinue, went thither and beset the
house, requiring him to render. The Earl of Murray
refusing to put himself in the hands of his enemy,
after some defence made, wherein the sheriff was
killed, fire was set to the house, and they within
forced by the violence of the smoke and flame to
come forth. The earl staid a great space after the
rest, and, the night falling down, ventured among his
enemies, and, breaking through the midst of them,
did so far outrun them all as they supposed he was
escaped; yet searching him among the rocks, he was
discovered by the tip of his head-piece, which had
taken fire before he left the house, and unmercifully
slain. The report went that Huntly’s friends, fearing
he should disclaim the fact (for he desired rather to
have taken him alive), made him light from his horse
and give some strokes to the dead corpse.... The
death of the nobleman was universally lamented,
and the clamors of the people so great ... that the
king, not esteeming it safe to abide at Edinburgh,
removed with the council to Glasgow, where he
remained until Huntly did enter himself in ward in
Blackness, as he was charged. But he staid not there
many days, being dimitted, upon caution, to answer
before the justice whensoever he should be called.
The corpses of the Earl and Sheriff of Murray were
brought to the church of Leith in two coffins, and
there lay divers months unburied, their friends
refusing to commit their bodies to the earth till the
slaughter was punished. Nor did any man think
himself so much interested in that fact as the Lord
Ochiltrie, who had persuaded the Earl of Murray to
come south; whereupon he fell afterwards away to
Bothwell, and joined with him for revenge of the
murder.”
This outrage was done in the month of February,
1592. Huntly sheltered himself under the king’s
commission, and was not punished. He was no doubt
a dangerous man to discipline, but the king, perhaps
because he believed Murray to be an abettor of
Bothwell, showed no disposition that way.
According to Sir James Balfour, “the queen, more
rashly than wisely, some few days before had
commended” Murray, “in the king’s hearing, with too
many epithets of a proper and gallant man.” Balfour
may have had gossip, or he may have had a ballad,
for his authority (see A 5); the suggestion deserves
[290]
no attention.
In B the Countess of Murray is treated as the sister
of Huntly.
A is translated by Grundtvig, Engelske og skotske
Folkeviser, No 8, p. 52; by Herder, II, 71. B by Arndt,
Blütenlese, p. 196.
A
Ramsay’s Tea-Table Miscellany, 1763, p. 356.
1
Ye Highlands, and ye Lawlands,
Oh where have you been?
They have slain the Earl of Murray,
And they layd him on the green.

2
‘Now wae be to thee, Huntly!
And wherefore did you sae?
I bade you bring him wi you,
But forbade you him to slay.’

3
He was a braw gallant,
And he rid at the ring;
And the bonny Earl of Murray,
Oh he might have been a king!

4
He was a braw gallant,
And he playd at the ba;
And the bonny Earl of Murray
Was the flower amang them a’.

5
He was a braw gallant,
And he playd at the glove;
And the bonny Earl of Murray,
Oh he was the Queen’s love!

6
Oh lang will his lady
Look oer the castle Down,
Eer she see the Earl of Murray
Come sounding thro the town!
Eer she, etc.
B
Finlay’s Scottish Ballads, II, 11; from recitation.
1
‘Open the gates,
and let him come in;
He is my brother Huntly,
he’ll do him nae harm.’

2
The gates they were opent,
they let him come in,
But fause traitor Huntly,
he did him great harm.

3
He’s ben and ben,
and ben to his bed,
And with a sharp rapier
he stabbed him dead.

4
The lady came down the stair,
wringing her hands:
‘He has slain the Earl o Murray,
the flower o Scotland.’

5
But Huntly lap on his horse,
rade to the king:
‘Ye’re welcome hame, Huntly,
and whare hae ye been?

6
‘Whare hae ye been?
and how hae ye sped?’
‘I’ve killed the Earl o Murray,
dead in his bed.’

7
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like