100% found this document useful (11 votes)
149 views

Image Processing Dealing With Texture 1st Edition Maria Petrou 2024 Scribd Download

ebook

Uploaded by

rhmatematlo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (11 votes)
149 views

Image Processing Dealing With Texture 1st Edition Maria Petrou 2024 Scribd Download

ebook

Uploaded by

rhmatematlo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 84

Full download ebook at ebookname.

com

Image Processing Dealing With Texture 1st Edition


Maria Petrou

https://ebookname.com/product/image-processing-dealing-with-
texture-1st-edition-maria-petrou/

OR CLICK BUTTON

DOWLOAD NOW

Download more ebook from https://ebookname.com


More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Image Processing The Fundamentals 2nd 2nd Edition Maria


Petrou

https://ebookname.com/product/image-processing-the-
fundamentals-2nd-2nd-edition-maria-petrou/

Fuzzy Image Processing and Applications with MATLAB 1st


Edition Tamalika Chaira

https://ebookname.com/product/fuzzy-image-processing-and-
applications-with-matlab-1st-edition-tamalika-chaira/

Multivariate Image Processing 1st Edition Jocelyn


Chanussot

https://ebookname.com/product/multivariate-image-processing-1st-
edition-jocelyn-chanussot/

Fundamentals of digital image processing a practical


approach with examples in Matlab 1st Edition Breckon

https://ebookname.com/product/fundamentals-of-digital-image-
processing-a-practical-approach-with-examples-in-matlab-1st-
edition-breckon/
Image Processing for Cinema 1st Edition Marcelo
Bertalmío

https://ebookname.com/product/image-processing-for-cinema-1st-
edition-marcelo-bertalmio/

Digital Image Processing and Analysis Human and


Computer Vision Applications with CVIPtools Second
Edition Umbaugh

https://ebookname.com/product/digital-image-processing-and-
analysis-human-and-computer-vision-applications-with-cviptools-
second-edition-umbaugh/

Biosignal and Medical Image Processing 1st Edition


Yukihiko Hara

https://ebookname.com/product/biosignal-and-medical-image-
processing-1st-edition-yukihiko-hara/

Dealing with d4 Deviations 1st Edition John Cox

https://ebookname.com/product/dealing-with-d4-deviations-1st-
edition-john-cox/

The image processing handbook 6ed. Edition Russ J.C.

https://ebookname.com/product/the-image-processing-handbook-6ed-
edition-russ-j-c/
Image Processing

Image Processing: Dealing with Texture M. Petrou and P. Garcı́a-Sevilla


c 2006 John Wiley & Sons, Ltd. ISBN: 0-470-02628-6
Image Processing
Dealing with Texture

Maria Petrou
Imperial College, London, UK
Pedro Garcı́a Sevilla
Jaume I University, Castellon, Spain
c 2006
Copyright  John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester,
West Sussex PO19 8SQ, England

Telephone (+44) 1243 779777

Email (for orders and customer service enquiries): [email protected]


Visit our Home Page on www.wiley.com

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, scanning or otherwise, except under
the terms of the Copyright, Designs and Patents Act 1988 or under the terms of a licence issued by the Copyright
Licensing Agency Ltd, 90 Tottenham Court Road, London W1T 4LP, UK, without the permission in writing of the
Publisher. Requests to the Publisher should be addressed to the Permissions Department, John Wiley & Sons Ltd,
The Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ, England, or emailed to [email protected], or
faxed to (+44) 1243 770620.

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.

Other Wiley Editorial Offices

John Wiley & Sons Inc., 111 River Street, Hoboken, NJ 07030, USA

Jossey-Bass, 989 Market Street, San Francisco, CA 94103-1741, USA

Wiley-VCH Verlag GmbH, Boschstr. 12, D-69469 Weinheim, Germany

John Wiley & Sons Australia Ltd, 42 McDougall Street, Milton, Queensland 4064, Australia

John Wiley & Sons (Asia) Pte Ltd, 2 Clementi Loop #02-01, Jin Xing Distripark, Singapore 129809

John Wiley & Sons Canada Ltd, 22 Worcester Road, Etobicoke, Ontario, Canada M9W 1L1

Wiley also publishes its books in a variety of electronic formats. Some content that appears
in print may not be available in electronic books.

British Library Cataloguing in Publication Data

A catalogue record for this book is available from the British Library

ISBN-13: 978-0-470-02628-1
ISBN-10: 0-470-02628-6

Produced from files supplied by the author


Printed and bound in Great Britain by Antony Rowe Ltd, Chippenham, Wiltshire
This book is printed on acid-free paper responsibly manufactured from sustainable forestry
in which at least two trees are planted for each one used for paper production.
Maria Petrou wishes to dedicate this book to her grand-
mother Maria Pyrrou Voziki, who having never been to
school, managed to teach herself the three Rs. Due to
her own unquenched thirst for education and knowledge,
she started teaching her granddaughter the letters of the
alphabet when she was only 18 months old!

Pedro Garcı́a Sevilla wishes to dedicate this book to all


his family for their love and support and especially to his
parents, Francisco and Marı́a, for all the sacrifices they
made for the education of their children, and to his wife
Isabel for her infinite love, patience and energy.
Contents

Preface ix

1 Introduction 1
What is texture? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Why are we interested in texture? . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
How do we cope with texture when texture is a nuisance? . . . . . . . . . . . . . . 3
How does texture give us information about the material of the imaged object? . . 3
Are there non-optical images? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
What is the meaning of texture in non-optical images? . . . . . . . . . . . . . . . . 4
What is the albedo of a surface? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Can a surface with variable albedo appear non-textured? . . . . . . . . . . . . . . 4
Can a rough surface of uniform albedo appear non-textured? . . . . . . . . . . . . 4
What are the problems of texture which image processing is trying to solve? . . . . 4
What are the limitations of image processing in trying to solve the above problems? 5
How may the limitations of image processing be overcome for recognising textures? 6
What is this book about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Box 1.1. An algorithm for the isolation of textured regions . . . . . . . . . . . . . 6

2 Binary textures 11
Why are we interested in binary textures? . . . . . . . . . . . . . . . . . . . . . . . 11
What is this chapter about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Are there any generic tools appropriate for all types of texture? . . . . . . . . . . . 12
Can we at least distinguish classes of texture? . . . . . . . . . . . . . . . . . . . . . 12
Which are the texture classes? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Which tools are appropriate for each type of texture? . . . . . . . . . . . . . . . . 12
2.1 Shape grammars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
What is a shape grammar? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Box 2.1. Shape grammars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
What happens if the placement of the primitive pattern is not regular? . . . . . . . 21
What happens if the primitive pattern itself is not always the same? . . . . . . . . 22
What happens if the primitive patterns vary in a continuous way? . . . . . . . . . 22
2.2 Boolean models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
What is a 2D Boolean model? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Box 2.2. How can we draw random numbers according to a given probability density
function? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
viii Contents

Box 2.3. What is a Poisson process? . . . . . . . . . . . . . . . . . . . . . . . . . . 28


How can we use the 2D Boolean model to describe a binary texture? . . . . . . . . 31
How can we estimate some aggregate parameters of the 2D Boolean model? . . . . 31
How can we estimate some individual parameters of the 2D Boolean model? . . . . 37
Box 2.4. How can we relate the individual parameters to the aggregate parameters
of the 2D Boolean model? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
What is the simplest possible primitive pattern we may have in a Boolean model? 44
What is a 1D Boolean model? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
How may the 1D Boolean model be used to describe textures? . . . . . . . . . . . 45
How can we create 1D strings from a 2D image? . . . . . . . . . . . . . . . . . . . 45
Box 2.5. Hilbert curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
How can we estimate the parameters of the 1D Boolean model? . . . . . . . . . . . 49
Box 2.6. Parameter estimation for the discrete 1D Boolean model . . . . . . . . . . 52
What happens if the primitive patterns are very irregular? . . . . . . . . . . . . . . 53
2.3 Mathematical morphology . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
What is mathematical morphology? . . . . . . . . . . . . . . . . . . . . . . . . . . 54
What is dilation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
What is erosion? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Is there any way to lose details smaller than a certain size but leave the size of larger
details unaffected? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
What is opening? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
What is closing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
How do we do morphological operations if the structuring element is not symmetric
about its centre? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Since the structuring element looks like a small image, can we exchange the roles of
object and structuring element? . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Is closing a commutative operation? . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Can we use different structuring elements for the erosion and the dilation parts of
the opening and closing operators? . . . . . . . . . . . . . . . . . . . . . . . . 61
Can we apply morphological operators to the white pixels of an image instead of
applying them to the black pixels? . . . . . . . . . . . . . . . . . . . . . . . . 63
Can we apply more than one morphological operator to the same image? . . . . . 63
Is erosion an associative operation as well? . . . . . . . . . . . . . . . . . . . . . . 64
How can we use morphological operations to characterise a texture? . . . . . . . . 66
Box 2.7. Formal definitions in mathematical morphology . . . . . . . . . . . . . . . 68
What is the “take home” message of this chapter? . . . . . . . . . . . . . . . . . . 79

3 Stationary grey texture images 81


What is a stationary texture image? . . . . . . . . . . . . . . . . . . . . . . . . . . 81
What is this chapter about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Are any of the methods appropriate for classifying binary textures useful for the
analysis of grey textures? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
3.1 Image binarisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
How may a grey image be analysed into a set of binary images by thresholding? . 83
How may a grey image be analysed into a set of binary images by bit-slicing? . . . 83
Is there any relationship between the binary planes produced by thresholding and
the bit planes? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Contents ix

3.2 Grey scale mathematical morphology . . . . . . . . . . . . . . . . . . . . 90


How does mathematical morphology generalise for grey images? . . . . . . . . . . . 90
How is the complement of an image defined for grey images? . . . . . . . . . . . . 92
What is a non-flat structuring element? . . . . . . . . . . . . . . . . . . . . . . . . 92
What is the relationship between the morphological operations applied to an image
and those applied to its complement? . . . . . . . . . . . . . . . . . . . . . . . 96
What is the purpose of using a non-flat structuring element? . . . . . . . . . . . . 98
How can we perform granulometry with a grey image? . . . . . . . . . . . . . . . . 99
Can we extract in one go the details of a signal, peaks or valleys, smaller than a
certain size? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
How can we use the pattern spectrum to classify textures? . . . . . . . . . . . . . . 104
3.3 Fractals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
What is a fractal? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
What is the fractal dimension? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Which statistical properties remain the same at all scales in non-deterministic fractals?117
Box 3.1. What is self-affine scaling? . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Box 3.2. What is the relationship between the fractal dimension and exponent H? 118
Box 3.3. What is the range of values of H? . . . . . . . . . . . . . . . . . . . . . . 119
What is a fractional Brownian motion? . . . . . . . . . . . . . . . . . . . . . . . . . 121
Box 3.4. Prove that the range of values of H for a fractional Brownian motion is
(0, 1). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Box 3.5. What is the correlation between two increments of a fractional Brownian
motion? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Box 3.6. What is the power spectrum of a fractal? . . . . . . . . . . . . . . . . . . 127
Box 3.7. Robust line fitting using the Ransac method . . . . . . . . . . . . . . . . 152
Box 3.8. What is the autocorrelation function of a fractal? . . . . . . . . . . . . . 152
Is fractal dimension a good texture descriptor? . . . . . . . . . . . . . . . . . . . . 164
Is there a way to enrich the description of textures offered by fractal models? . . . 164
What is lacunarity? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
3.4 Markov random fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
What is a Markov random field? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Which are the neighbouring pixels of a pixel? . . . . . . . . . . . . . . . . . . . . . 169
How can we use MRFs to characterise textures? . . . . . . . . . . . . . . . . . . . 169
What is texture synthesis by analysis? . . . . . . . . . . . . . . . . . . . . . . . . . 169
How can we apply the Markov model to create textures? . . . . . . . . . . . . . . . 172
Can we apply the method discussed in the previous section to create images with
256 grey levels? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
What is the auto-normal Markov random field model? . . . . . . . . . . . . . . . . 180
How can we estimate the Markov parameters of a texture? . . . . . . . . . . . . . . 182
What is maximum likelihood estimation? . . . . . . . . . . . . . . . . . . . . . . . 182
What is the log-likelihood? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Box 3.9. What is the relationship between maximum likelihood estimation and
Bayesian estimation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
How can we apply maximum likelihood estimation to estimate the parameters of a
Markov random field? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
How do we know which parameter values to try when we apply MLE to estimate
the Markov parameters? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
x Contents

How can we estimate the Markov parameters with the least square error estimation
method? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Box 3.10. Least square parameter estimation for the MRF parameters . . . . . . . 190
Is a Markov random field always realisable given that we define it arbitrarily? . . . 196
What conditions make an MRF self-consistent? . . . . . . . . . . . . . . . . . . . . 196
What is a clique in a neighbourhood structure? . . . . . . . . . . . . . . . . . . . . 196
3.5 Gibbs distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
What is a Gibbs distribution? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
What is a clique potential? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Can we have a Markov random field with only singleton cliques? . . . . . . . . . . 201
What is the relationship between the clique potentials and the Markov parameters? 211
Box 3.11. Prove the equivalence of Markov random fields and Gibbs distributions
(Hammersley–Clifford theorem). . . . . . . . . . . . . . . . . . . . . . . . . . 215
How can we use the Gibbs distribution to create textures? . . . . . . . . . . . . . . 220
How can we create an image compatible with a Gibbs model if we are not interested
in fixing the histogram of the image? . . . . . . . . . . . . . . . . . . . . . . . 226
What is the temperature of a Gibbs distribution? . . . . . . . . . . . . . . . . . . . 230
How does the temperature parameter of the Gibbs distribution determine how dis-
tinguishable one configuration is from another? . . . . . . . . . . . . . . . . . 230
What is the critical temperature of a Markov random field? . . . . . . . . . . . . . 238
3.6 The autocorrelation function as a texture descriptor . . . . . . . . . . 246
How can we compute the autocorrelation function of an MRF? . . . . . . . . . . . 246
Can we use the autocorrelation function itself to characterise a texture? . . . . . . 246
How can we use the autocorrelation function directly for texture characterisation? 250
How can we infer the periodicity of a texture from the autocorrelation function? . 252
How can we extract parametric features from the autocorrelation function? . . . . 253
Box 3.12. Least square fitting in 2D and 1D . . . . . . . . . . . . . . . . . . . . . . 257
3.7 Texture features from the Fourier transform . . . . . . . . . . . . . . . 260
Can we infer the periodicity of a texture directly from its power spectrum? . . . . 260
Does the phase of the Fourier transform convey any useful information? . . . . . . 265
Since the phase conveys more information for a pattern than its power spectrum,
why don’t we use the phase to describe textures? . . . . . . . . . . . . . . . . 270
Is it possible to compute from the image phase a function the value of which changes
only due to genuine image changes? . . . . . . . . . . . . . . . . . . . . . . . 270
How do we perform phase unwrapping? . . . . . . . . . . . . . . . . . . . . . . . . 271
What are the drawbacks of the simple phase unwrapping algorithm? . . . . . . . . 273
3.8 Co-occurrence matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Can we use non-parametric descriptions of texture? . . . . . . . . . . . . . . . . . . 275
How is a co-occurrence matrix defined? . . . . . . . . . . . . . . . . . . . . . . . . 277
How do we compute the co-occurrence matrix in practice? . . . . . . . . . . . . . . 281
How can we recognise textures with the help of the co-occurrence matrix? . . . . . 281
How can we choose the parameters of the co-occurrence matrix? . . . . . . . . . . 283
What are the higher-order co-occurrence matrices? . . . . . . . . . . . . . . . . . . 294
What is the “take home” message of this chapter? . . . . . . . . . . . . . . . . . . 294
Contents xi

4 Non-stationary grey texture images 297


What is a non-stationary texture image? . . . . . . . . . . . . . . . . . . . . . . . . 297
What is this chapter about? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Why can’t we use the methods developed in the previous chapter here? . . . . . . 297
How can we be sure that the texture inside an image window is stationary? . . . . 297
4.1 The uncertainty principle and its implications in signal and image
processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
What is the uncertainty principle in signal processing? . . . . . . . . . . . . . . . . 298
Box 4.1. Prove the uncertainty principle in signal processing . . . . . . . . . . . . 302
Does the window we choose in order to extract local information influence the result?305
How can we estimate “what is happening where” in a digital signal? . . . . . . . . 315
How can we deal with the variability of the values of a feature? . . . . . . . . . . . 318
How do we know which size window we should use? . . . . . . . . . . . . . . . . . 323
How is the uncertainty principle generalised to 2D? . . . . . . . . . . . . . . . . . . 326
4.2 Gabor functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
What is a Gabor function? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Why are Gabor functions useful in analysing a signal? . . . . . . . . . . . . . . . . 330
How can we use the Gabor functions in practice? . . . . . . . . . . . . . . . . . . . 336
How is a Gabor function generalised in 2D? . . . . . . . . . . . . . . . . . . . . . . 341
How may we use the 2D Gabor functions to analyse an image? . . . . . . . . . . . 345
Can we have alternative tessellations of the frequency domain? . . . . . . . . . . . 353
How can we define a Gaussian window in polar coordinates in the frequency domain?354
What is an octave? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
How do we express a frequency in octaves? . . . . . . . . . . . . . . . . . . . . . . 356
How may we choose the parameters of the Gaussian window in the frequency space? 357
4.3 Prolate spheroidal sequence functions . . . . . . . . . . . . . . . . . . . 380
Is it possible to have a window with sharp edges in one domain which has minimal
side ripples in the other domain? . . . . . . . . . . . . . . . . . . . . . . . . . 380
Box 4.2. Of all the band-limited sequences one can define, which sequence has the
maximum energy concentration between a given set of indices? . . . . . . . . 381
Box 4.3. Do prolate spheroidal wave functions exists in the digital domain? . . . . 384
What is the relationship of two band-limited functions, the Fourier transforms of
which are given by the real functions F (ωx , ωy ), and F (−ωx , −ωy ), respectively?393
How can we construct a filter which is band-limited in two bands which are sym-
metrically placed about the origin of the axes in the frequency domain? . . . 394
Box 4.4. How may we generalise the prolate spheroidal sequence functions to 2D? 403
Could we construct the 2D prolate spheroidal sequence filters as separable filters? . 425
What is the advantage of using separable filters? . . . . . . . . . . . . . . . . . . . 428
4.4 Wavelets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Is there a way other than using Gabor functions to span the whole spatio-frequency
space? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
What is a wavelet? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
How can we use wavelets to analyse a signal? . . . . . . . . . . . . . . . . . . . . . 440
Box 4.5. How should we choose the mother wavelet? . . . . . . . . . . . . . . . . . 442
Box 4.6. Does the wavelet function minimise the uncertainty inequality? . . . . . . 448
How is the wavelet transform adapted for digital signals? . . . . . . . . . . . . . . 460
How do we compute the wavelet coefficients in practice? . . . . . . . . . . . . . . . 463
xii Contents

Why is the continuous wavelet transform invertible and the discrete wavelet trans-
form non-invertible? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
How can we span the part of the “what happens when” space which contains the
direct component of the signal? . . . . . . . . . . . . . . . . . . . . . . . . . . 475
Can we span the whole “what is where” space by using only the scaling function? . 477
What is a Laplacian pyramid? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
Why is the creation of a Laplacian pyramid associated with the application of a
Gaussian function at different scales, and the subtraction of the results? . . . 477
Why may the second derivative of a Gaussian function be used as a filter to estimate
the second derivative of a signal? . . . . . . . . . . . . . . . . . . . . . . . . . 477
How can we extract the coarse resolution content of a signal from its content at a
finer resolution? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
How can we choose the scaling function? . . . . . . . . . . . . . . . . . . . . . . . . 481
How do we perform the multiresolution analysis of a signal in practice? . . . . . . 485
Why in tree wavelet analysis do we always analyse the part of the signal which
contains the low frequencies only? . . . . . . . . . . . . . . . . . . . . . . . . 486
Box 4.7. How do we recover the original signal from its wavelet coefficients in practice?494
How many different wavelet filters exist? . . . . . . . . . . . . . . . . . . . . . . . . 500
How may we use wavelets to process images? . . . . . . . . . . . . . . . . . . . . . 500
How may we use wavelets to construct texture features? . . . . . . . . . . . . . . . 507
What is the maximum overlap algorithm? . . . . . . . . . . . . . . . . . . . . . . . 507
What is the relationship between Gabor functions and wavelets? . . . . . . . . . . 518
4.5 Where Image Processing and Pattern Recognition meet . . . . . . . . 521
Why in wavelet analysis do we always split the band with the maximum energy? . 521
What is feature selection? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
How can we visualise the histogram of more than one feature in order to decide
whether they constitute a good feature set? . . . . . . . . . . . . . . . . . . . 523
What is the feature space? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523
What is the histogram of distances in a feature space? . . . . . . . . . . . . . . . . 523
Is it possible that the histogram of distances does not pick up the presence of clusters,
even though clusters are present? . . . . . . . . . . . . . . . . . . . . . . . . . 525
How do we segment the image once we have produced a set of features for each pixel?527
What is the K-means algorithm? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
What is deterministic annealing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
Box 4.8. Maximum entropy clustering . . . . . . . . . . . . . . . . . . . . . . . . . 529
How may we assess the quality of a segmentation? . . . . . . . . . . . . . . . . . . 535
How is the Bhattacharyya distance defined? . . . . . . . . . . . . . . . . . . . . . . 535
How can we compute the Bhattacharyya distance in practice? . . . . . . . . . . . . 535
How may we assess the quality of a segmentation using a manual segmentation as
reference? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
What is a confusion matrix? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
What are the over- and under-detection errors? . . . . . . . . . . . . . . . . . . . . 538
4.6 Laws’ masks and the ‘‘what looks like where’’ space . . . . . . . . . . . 539
Is it possible to extract image features without referring to the frequency domain? 539
How are Laws’ masks defined? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
Is there a systematic way to construct features that span the “what looks like where”
space completely? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548
Contents xiii

How can we expand a local image neighbourhood in terms of the Walsh elementary
images? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
Can we use convolution to compute the coefficients of the expansion of a sub-image
in terms of a set of elementary images? . . . . . . . . . . . . . . . . . . . . . . 562
Is there any other way to express the local structure of the image? . . . . . . . . . 573
4.7 Local binary patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
What is the local binary pattern approach to texture representation? . . . . . . . . 574
How can we make this representation rotationally invariant? . . . . . . . . . . . . . 574
How can we make this representation appropriate for macro-textures? . . . . . . . 575
How can we use the local binary patterns to characterise textures? . . . . . . . . . 576
What is a metric? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
What is a pseudo-metric? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576
Why should one wish to use a pseudo-metric and not a metric? . . . . . . . . . . . 577
How can we measure the difference between two histograms? . . . . . . . . . . . . 577
How can we use the local binary patterns to segment textures? . . . . . . . . . . . 579
How can we overcome the shortcomings of the LBP segmentation? . . . . . . . . . 580
4.8 The Wigner distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
What is the Wigner distribution? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
How is the Wigner distribution used for the analysis of digital signals? . . . . . . . 591
What is the pseudo-Wigner distribution? . . . . . . . . . . . . . . . . . . . . . . . 591
What is the Kaiser window? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
What is the Nyquist frequency? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
Why does the use of the pseudo-Wigner distribution require signals which have been
sampled at twice their Nyquist frequency? . . . . . . . . . . . . . . . . . . . . 595
Should we worry about aliasing when we use the pseudo-Wigner distribution for
texture analysis? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
How is the pseudo-Wigner distribution defined for the analysis of images? . . . . . 597
How can the pseudo-Wigner distribution be used for texture segmentation? . . . . 597
What is the “take-home” message of this chapter? . . . . . . . . . . . . . . . . . . 605

Bibliographical notes 607

References 609

Index 613
Preface

It is often said that everybody knows what texture is but nobody can define it. Here is
an unconventional definition: texture is what makes life beautiful; texture is what makes
life interesting and texture is what makes life possible. Texture is what makes Mozart’s
music beautiful, the masterpieces of the art of the Renaissance classical and the facades of
Barcelona’s buildings attractive. Variety in detail is what keeps us going from one day to the
next and the roughness of the world is what allows us to walk, communicate and exist. If
surfaces were smooth, friction would not exist, the Earth would be bombarded by asteroids
and life would not have developed. If surfaces were smooth, pencils would not write, cars
would not run, and feet would not keep us upright.
Texture is all around us, and texture is also on the images we create. Just as variation
in what we do allows us to distinguish one day in our life from another, texture allows us
to identify what we see. And if texture allows us to distinguish the objects around us, it
cannot be ignored by any automatic system for vision. Thus, texture becomes a major part
of Image Processing, around which we can build the main core of Image Processing research
achievements.
This book is exactly trying to do this: it uses texture as the motivation to present some of
the most important topics of Image Processing that have preoccupied the Image Processing
research community in the recent years. The book covers the topics which have already been
well established in Image Processing research and it has an important ambition: it tries to
cover them in depth and be self-contained so that the reader does not need to open other
books to understand them.
The book is written on two levels. The top, easy level, is for the reader who is simply inter-
ested in learning the basics. This level is appropriate for an undergraduate or Master’s level
course. The second level goes in depth, demonstrating and proving theorems and concepts.
This level is appropriate for research students. Examples that refer to the advanced
level are marked with a B and the theory of this level is presented in boxes with
a grey background. In a sense, the book is an interlacing of mainstream material and
appendices that cover advanced or even peripheral issues.
The book aspires to be a classical textbook on Image Processing and not an account of
the state of the art. So, the reader who hopes to find here the latest algorithms proposed,
will be disappointed.
A large part of this book was written when the first co-author was on sabbatical at the
Informatics and Telematics Institute in Thessaloniki, Greece. The support of the Institute
as well as the support of our home institutions, namely the University of Surrey for the first
co-author when writing this book, and the University Jaume I, throughout this endeavour is
gratefully acknowledged.
xvi Preface

We would also like to thank the Media Lab of the Massachusetts Institute of Technology
for allowing us to use five images from the VisTex database, the Signal and Image Processing
Institute of the University of Southern California for allowing us to use three images from
their USC-SIPI Image database, and Dr Xavier Llado who supplied the images shown in
figures 1.5 and 1.6.
For the accompanying website please visit www.wiley.com/go/texture.

Maria Petrou and Pedro Garcı́a Sevilla


Chapter 1

Introduction

What is texture?

Texture is the variation of data at scales smaller than the scales of interest. For example, in
figure 1.1 we show the image of a person wearing a Hawaiian shirt. If we are interested in
identifying the person, the pattern on the shirt is considered as texture. If we are interested in
identifying a flower or a bird on the shirt, each flower or bird of the pattern is a non-textured
object at the scale of this image, as we can hardly see any details inside it.

Figure 1.1: Costas in bloom.

Why are we interested in texture?

We are interested in texture for two reasons:


• Texture may be a nuisance in an automatic vision system. For example, if we were to
recognise an object from its shape, texture would create extra lines in the edge map of
Image Processing: Dealing with Texture M. Petrou and P. Garcı́a-Sevilla
c 2006 John Wiley & Sons, Ltd. ISBN: 0-470-02628-6
2 Image Processing: Dealing with Texture

the object and the shape recognition algorithm would be confused. This is demonstrated
in figure 1.2.
• Texture may be an important cue in object recognition as it tells us something about
the material from which the object is made. For example, in the image of figure 1.3 we
may discriminate the city from the woods and the fields, from the type of variation the
image shows at scales smaller than the objects we are talking about.

(a) (b) (c)

Figure 1.2: (a) An original image. (b) Manually extracted edge map. (c) The automatic edge
extraction algorithm is confused by the presence of texture on the box.

(a) (b)

Figure 1.3: (a) Bluebury from an aeroplane. (b) Edge map where the urban area has been
annotated. Other texture patches correspond to woods.
Introduction 3

How do we cope with texture when texture is a nuisance?

There are algorithms which can isolate the texture regions irrespective of the type of texture.
The texture regions then may be identified and treated separately from the rest of the image.
Since texture manifests itself as image intensity variation, it gives rise to many edges in the
edge map of the image. A trivial algorithm that can isolate texture regions is to consider
a scanning window and count inside the window the number of edgels. Any window with
number of edgels higher than a certain threshold is considered as belonging to a textured
region. Figure 1.4 demonstrates the result of this algorithm applied to the image of figure
1.3. In Box 1.1 a more sophisticated algorithm for the same purpose is presented.

(a) (b)

Figure 1.4: (a) Pixels that exceed a threshold in the number of edgels that fall inside a
scanning window centred on them. (b) Boundaries of the textured areas.

How does texture give us information about the material of the imaged object?

There are two ways by which texture may arise in optical images:
• Texture may be the result of variation of the albedo of the imaged surface. For example,
the image in figure 1.2a shows the surface of a box on which a coloured pattern is printed.
The change of colours creates variation in the brightness of the image at scales smaller
than the size of the box, which in this occasion is the object of interest.
• Texture may be the result of variation of the shape of the imaged surface. If a surface is
rough, even if it is uniformly coloured, texture in its image will arise from the interplay
of shadows and better illuminated parts. The textures in the image of figure 1.3 are
the result of the roughness of the surfaces of the town and the woods when seen from
above.
4 Image Processing: Dealing with Texture

Are there non-optical images?

Yes, there are. They are the images created by devices that measure something other than the
intensity of reflected light. For example, the grey value in Magnetic Resonance Images
(MRI) used in medicine may indicate the proton density of the imaged tissue. Another
example concerns images called seismic sections which are created by plotting data collected
by seismographs.

What is the meaning of texture in non-optical images?

Texture in non-optical images indicates variation of a certain physical quantity at scales


smaller than the scales of interest. For example, in a proton weighted MRI image of the
brain, the presence of texture indicates variation of the proton density from one location to
the next. Such variation will manifest itself in the image in the same way as variation of the
albedo or surface roughness does in an optical image. From the image processing point of
view, texture is treated in the same way in optical and non-optical images. So, in this book
we shall talk about images irrespective of the sensor with which they have been captured.

What is the albedo of a surface?

The albedo of a surface is a function that characterises the material from which the surface is
made. It gives the fraction of incident light this material reflects at each wavelength. When
we say that a surface is multicoloured, effectively we say that it has an albedo that varies
from location to location.

Can a surface with variable albedo appear non-textured?

Yes, if it is imaged by a single band sensor and the intensity of reflected light by the different
coloured patches within the sensor sensitivity band yields constant accumulated recording.

Can a rough surface of uniform albedo appear non-textured?

Yes, if the roughness of the surface and the direction of incident light are such that no part
of the surface is in shadow and the surface is mat (ie the material it is made from reflects
equally in all directions, irrespective of the direction from which it is illuminated).

What are the problems of texture which image processing is trying to solve?

Image processing is trying to solve three major problems concerned with texture:

• Identify what a surface represents by analysing the texture in an image of a sample


from it: this is the problem of texture classification.
• Divide an image into regions of different textures: this is the problem of texture
segmentation.
• Decide whether a texture is as it is expected to be or contains faults: this is the problem
of texture defect detection.
Introduction 5

What are the limitations of image processing in trying to solve the above prob-
lems?

The most important limitation is that image processing, if applied in the strict sense of the
word, implies that it is dealing only with the images of the surfaces. However, the same surface
may appear totally differently textured when imaged under different conditions. Figure 1.5
shows the same surface imaged from different distances. Its appearance changes dramatically
and pure image processing without any extra information would never recognise these two
images as depicting the same object. Another example is shown in figure 1.6 where the same
surface is imaged from the same distance, but with the illuminating source being at two
different positions. Again, pure image processing would never recognise these two images as
depicting the same object. These two examples illustrate two important properties of texture:
• Texture is scale-dependent.
• Image texture depends on the imaging geometry.

Figure 1.5: A surface imaged from two different distances may create two very different image
textures.

Figure 1.6: A surface imaged under different illumination directions may give rise to two very
different image textures.
6 Image Processing: Dealing with Texture

How may the limitations of image processing be overcome for recognising tex-
tures?

Image processing which makes use of additional information, eg information concerning the
imaging geometry, may be able to deal with both the scale-dependence of texture as well as its
dependence on the imaging geometry. An alternative way is to use computer vision techniques
which allow us to recover the missing information suppressed by the imaging process. For
example, a rough surface exists in 3D. However, when it is imaged on a 2D medium, the
information concerning the third dimension is lost. This information is independent of the
imaging process. If one could recover it from the available image, then one would have had a
scale-invariant description of the roughness of the surface. The recovery of such information
is possible if one uses extra information, or more than one image.

What is this book about?

This book is about the methods used to deal with the first two problems related to texture,
namely texture classification and texture segmentation. The various methods will be pre-
sented from the point of view of the data rather than the approach used: we shall start from
the simplest image textures, ie 2D binary images, and proceed to composite grey texture
images.

Box 1.1. An algorithm for the isolation of textured regions

Texture in an image implies intensity variation at scales smaller than the image size. It
is well known that intensity variation gives rise to edgels in the edge map of the image.
High density of edgels, therefore, characterises textured regions.
Let us imagine that each edgel is a person standing in a flat landscape. The person sees
the world around her through the other individuals who might surround her and obscure
her view. Suppose that we define the field of view of each individual as the maximum
angle through which she can see the world through her neighbours who stand within
a certain distance from her. Individuals who are standing in the middle of a textured
region will have their views severely restricted and therefore their fields of view will not
have large values. On the other hand, individuals standing at the borders of textured
regions will be able to see well towards the outside of the textured region and they will
enjoy high values of field of view.
The trouble is that even edge pixels that simply separate uniformly coloured regions
will enjoy equally high values of the field of view. So, we need to devise an algorithm
that will distinguish these two types of edgels: those that delineate textured regions
and those that simply form edges between different uniformly shaded regions.
These are the steps of such an algorithm demonstrated with the help of the image of
figure 1.7a:
Introduction 7

(a) (b)

(c) (d)

(e) (f)

Figure 1.7: (a) Original image of size 256 × 256 showing a town. (b) The edge map of
the image obtained by using a Sobel edge detector. (c) The edgels that have field of
view larger than 90o within a local neighbourhood of size 9 × 9 (ie n = 9). (d) The edge
map of panel (b) without the edgels of panel (c) and any edgel in a neighbourhood of
size 7 × 7 around them (ie m = 7). (e) The edgels of panel (d) plus all edgels from panel
(b) that are in a neighbourhood of size 7 × 7 around them (ie δm = 0). (f) The final
result keeping only the edgels of panel (e) that have field of view larger than 90o within
a neighbourhood of 9 × 9.
8 Image Processing: Dealing with Texture

• Identify the edgels in the image using an edge filter which does very little or no
smoothing (eg Sobel filters). The result is shown in figure 1.7b.

• Consider a neighbourhood of size n × n around each edgel. Sort the neighbours


of the edgel in a clockwise (or anti-clockwise) order around it. Find the angle
between any two successive neighbours with the vertex of the angle being the
edgel of interest. The largest of these angles is the field of view of the edgel of
interest. This process is demonstrated in figure 1.8.

• In the edge map keep only those edgels that have a field of view larger than d
degrees. This result is shown in figure 1.7c.

• Around each edgel you have kept in figure 1.7c, consider a window of size m × m.
Delete all edgels of figure 1.7b that are inside this window. The result you will
get is shown in figure 1.7d. Note that this in way you have eliminated all those
edgels with high viewing angles which do not delineate texture regions. However,
at the same time the texture regions have shrunk.

1
φ

2 5
4
3

Figure 1.8: Each tile in this figure represents a pixel. The black tiles represent edgels.
The windowed region with the thick black line represents the neighbourhood of size
n × n we consider around the edgel in the middle. In this case n = 9. The neighbours
inside this window are sorted in an anti-clockwise direction. The numbers next to them
indicate their rank. We measure the angle between any two successive rays from the
central edgel. The largest of these angles, marked with φ is the field of view of the
central edgel.
Introduction 9

(a) (b)

(c) (d)

(e) (f)

(g) (h)

Figure 1.9: (a) An original image of size 382 × 287, showing the cross-section of the
aorta of a rabbit which ate too much cholesterol. The edgels in the texture region are
sparse. (b) Edge map produced using a Sobel edge detector. (c) The edge map made
denser by replacing every 4 pixels by 1 and marking the new pixel as an edgel even if
only a single pixel in the original 2 × 2 configuration was an edgel. (d) The edgels which
have a field of view larger than 90o within a local neighbourhood of size 5 × 5 in panel
(c). (e) The edgels of panel (c) after the edgels in (d) and their neighbouring edgels
inside a window of size 4 × 4 are removed. (f) The edgels of panel (e) plus all their
neighbouring edgels inside a window of size 6 × 6 in panel (c) restored. (g) The edgels
in (f) which have a field of view larger than 90o . (h) The final result in the original size.
10 Image Processing: Dealing with Texture

• Around each edgel you have kept in figure 1.7d, consider a window of size (m +
δm) × (m + δm). Restore inside the window all edgels that are present in figure
1.7b. The result is shown in figure 1.7e. Note that now you have only the edgels
that constitute the textured region. Constant δm makes sure that the window used
at this step is slightly larger than the window used at the previous step because
we are dealing with discrete points which are at a certain average distance from
each other.
• For each edgel in figure 1.7e calculate the field of view as you did before. Keep
only the edgels that have a field of view larger than a threshold d. This is the
final result and it is shown in figure 1.7f.

This algorithm works well for texture regions with dense edgels. If the edgels are not
very dense, but you still want to identify the textured regions, you may preprocess the
edge map as follows.
Before you start working with the edge map, make it denser by replacing every l × l tile
of pixels by a single pixel. Even if only one of the pixels in the tile is an edgel, make
the replacement pixel an edgel too. This way the edge map will shrink but the number
of edgels will be preserved and they will be made denser. You can apply the algorithm
described above to the shrunk edge map. The result may be brought to the full size by
replacing every pixel by a tile of size l × l. All pixels in the tile will be marked either as
edgels or background according to how the original pixel was marked. This will yield
a thick boundary for the textured region. If this is a problem the boundary may be
thinned while preserving its continuity. This process is demonstrated in figure 1.9.
Chapter 2

Binary textures

Why are we interested in binary textures?

A grey or colour image contains a lot of information, not all of which is necessary in order
to convey its contents. For example, in the image of figure 2.1 we can easily recognise the
trees and the birds although only two brightness levels are used. Texture indicates variation
of brightness. The minimum number of brightness levels we can have is two, so, the simplest
way of representing an image is to binarise it.

Figure 2.1: We can easily recognise the depicted objects, even from a binary image.

What is this chapter about?

This chapter is about developing some basic tools that will allow us to quantify binary tex-
tures.
Image Processing: Dealing with Texture M. Petrou and P. Garcı́a-Sevilla
c 2006 John Wiley & Sons, Ltd. ISBN: 0-470-02628-6
12 Image Processing: Dealing with Texture

Are there any generic tools appropriate for all types of texture?

No, there are not. This is because there is a vast variety of textures one may encounter. In
fact every surface we see may appear textured at some resolution. So, the variety of textures
is as great as the variety of the world around us.

Can we at least distinguish classes of texture?

111111111
000000000
Yes, there are some broad texture classes. Look at figure 2.2 and try to spot the odd one out.

00000
11111111111111
000000000
You will find the answer in the next paragraph.

00000
11111
11111
000000000
111111111
00000111111111
000000000
00000
11111000000000
111111111
000000000
111111111
00000
11111000000000
111111111
00000
11111000000000
111111111
00000
11111
11111111111111
00000
00000
000000000
000000000
111111111
11111 (a) (b)

(c) (d)

Figure 2.2: Four binary textures: which one is different from the other three?

Which are the texture classes?

There are two broad categories of texture: regular and irregular ones. Most textures of man-
made objects are regular, like those in figures 2.2a and 2.2b, while most natural textures
are irregular. Texture 2.2d is semi-regular: it consists of regularly shaped objects placed at
random positions. The odd one out in figure 2.2 is texture 2.2c, because it shows a random
pattern, while all other images exhibit some regularity.

Which tools are appropriate for each type of texture?

For regular textures we use shape grammars to describe them. For irregular textures we
use statistical descriptors based on Boolean models and mathematical morphology.
Shape grammars 13

2.1 Shape grammars


What is a shape grammar?

A shape grammar is a formal way of describing a regular pattern. For example, if we wanted
to describe with words the pattern of figure 2.3a, it would have been quite tedious. However,
if we were to describe with words the pattern of figure 2.3b, we could simply say: it is a
rectangular arrangement of the pattern shown in fig 2.3c, with the patterns tightly packed
from all directions. So, in order to describe a pattern we need basically two things: some
elementary patterns, and a set of placement rules. Formally, we need something more: we
need some symbol to mark the position where we “stick” the elementary patterns together,
and we need a starting pattern.

(a) (b) (c)

Figure 2.3: (a) A random texture. (b) A texture with a regular primitive pattern and regular
placement rules. (c) The primitive pattern of texture (b) scaled up.

Box 2.1. Shape grammars

A shape grammar is defined as a collection of four items:

1. A set V of shapes, called terminals. These are in effect the primitive patterns
from which we can build up the texture.

2. A set U of shapes called markers. These are small markers which indicate the
places where the “new bricks” should be placed when building the texture pattern.
14 Image Processing: Dealing with Texture

3. A mapping between two sets W1 , and W2 , which consist of elements that are
elements of sets V and U and combinations of them. The mapping is many to
one, allowing us to replace an element of set W1 by an element of set W2 . These
are the placement rules.
4. A starting pattern S. This must be an element of W1 so that we can start building
the texture from it.

Example 2.1

Consider the texture of figure 2.4. Write a shape grammar to describe it.

Figure 2.4: An example of a regular pattern.

The first problem we have to solve is the choice of the primitive pattern. We may
choose any one of those shown in figure 2.5.

Figure 2.5: There may be more than one primitive pattern that may be used to
characterise the same texture.
Shape grammars 15

Let us choose the first one of these patterns. Let us also choose a small circle to be
used as a marker. Figure 2.6 is the set of rules we need in order to produce the texture
of figure 2.4. Finally, we need to choose a starting element. Let us choose as the
starting element the left-hand-side element of rule 1. Figure 2.7 is an example of how
texture 2.4 may be produced by the successive application of the proper rules. We can
see that the texture we had may be fully described and reproduced on the basis of the
five rules of figure 2.6.
Figure 2.8 shows the set of rules we would need to reproduce the pattern if we had
chosen the third primitive pattern of figure 2.5. Figure 2.9 shows how we may apply
these rules to reproduce a section of the texture of figure 2.4. Notice that now we need
the application of more rules to construct a section of the same size as before. This is
because our primitive element is now simpler. This becomes more obvious if we choose
as our primitive pattern the last pattern of figure 2.5. The rules needed in this case
are shown in figure 2.10, and their application to produce part of the texture of figure
2.4 is shown in figure 2.11.

Rule 1

Rule 2

Rule 3

Rule 4

Rule 5

Figure 2.6: The rules of a grammar that may be used to produce the texture of figure
2.4, using as primitive element the first pattern in figure 2.5.
16 Image Processing: Dealing with Texture

Rule 1 Rule 1

Rule 2 Rule 3

Rule 3 Rule 2

Rule 1 Rule 1

Rule 5

Figure 2.7: Successive application of the rules of figure 2.6 allows us to reproduce the
texture of figure 2.4. The sequence of rules used characterises the texture.
Shape grammars 17

Rule 1

Rule 2

Rule 3

Rule 4

Rule 5

Rule 6

Rule 7

Rule 8

Rule 9

Rule 10

Figure 2.8: The rules of a grammar that may be used to characterise the texture of
figure 2.4, using as primitive element the third pattern in figure 2.5. The simpler the
primitive elements we use, the more rules we need.
18 Image Processing: Dealing with Texture

Rule 1 Rule 1

Rule 2 Rule 5

Rule 5 Rule 6

Rule 1 Rule 1

Rule 2 Rule 5

Rule 5 Rule 10

Figure 2.9: Successive application of the rules of figure 2.8 allows us to reproduce a
section of the texture of figure 2.4.
Shape grammars 19

Rule 1

Rule 2

Rule 3

Rule 4

Rule 5

Rule 6

Rule 7

Rule 8

Rule 9

Rule 10

Rule 11

Rule 12

Figure 2.10: The rules of a grammar that may be used to characterise the texture of
figure 2.4, using as primitive element the fifth pattern in figure 2.5.
20 Image Processing: Dealing with Texture

Rule 1 Rule 3 Rule 7

Rule 3 Rule 10

Rule 5

Rule 9 Rule 5

Rule 11

Figure 2.11: Successive application of the rules of figure 2.10 allows us to reproduce a
section of the texture of figure 2.4.

Example 2.2

Use the rules of figure 2.10 with starting element the left-hand side of rule
1, to produce a texture pattern different from that of figure 2.11.

Figure 2.12 shows an example of an alternative pattern that may be constructed by


starting with the element on the left-hand side of rule 1 and applying the rules of figure
2.10 in the following sequence: 2, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 6, 10, 6, 10, 6, 10, 6,
10, 6, 10, 6, 9, etc. Note that it is not possible to produce a pattern that consists of
disconnected components, as none of the rules we have allows the continuation of the
pattern with a gap.
Shape grammars 21

Figure 2.12: An alternative pattern which may be produced by the successive appli-
cation of the rules of figure 2.10.

What happens if the placement of the primitive pattern is not regular?

The texture shown in figure 2.2d is an example of a semi-stochastic pattern: the primitives
are regular, but the rules according to which they are placed appear to be random. Such
patterns may be described by stochastic grammars. In a stochastic grammar the rules are
applied in a random order, or they depend on a random variable. They may even be given
different weights, ie they may be drawn from a random distribution that favours some of the
rules more than others. Examples of semi-stochastic textures are those of figure 2.13.

           




  



       


          


          


    


     

 




        


  
  
 

   


 


               
    

     


      

        
 





             
         


               




   

      

    
  



  

       


       

 


 



    



       





  
        







 




  
   
 













     
          


 


    



   

    





 


     

    

            



 

    

  


 
    

 



 


  


     
  
     

  


 
 







      


  
 
   

 


   








 
  

     
   






 




    






 


 

       
 

        


 



      

   


  

  

 

  
 
 





      
 


 

     


     












     





 


   
   



Figure 2.13: Two semi-stochastic textures.


22 Image Processing: Dealing with Texture

Example 2.3

Use the rules of figure 2.10 with starting element the left-hand side of rule
1, to produce a semi-stochastic pattern.

Figure 2.14 shows a pattern which was produced by the rules of figure 2.10 applied
in a totally random order, but avoiding overlaps. In other words, every time a rule
indicated continuation towards a direction where there was already a tile, this rule was
abandoned and another one was chosen at random.

Figure 2.14: A pattern which was produced by the application of the rules of figure
2.10 in a random order. Starting with the left-hand side of the first rule of figure 2.10,
we proceed by applying rules 2, 10, 3, 7,..., to produce this pattern, growing it from
its top left corner.

What happens if the primitive pattern itself is not always the same?

Then we must use rules which choose primitives from a set of possible primitive patterns
every time they are applied.

What happens if the primitive patterns vary in a continuous way?

Then we may use a probability density function to describe the distribution of the possible
values of the parameters which describe the shape of the primitive pattern. This leads to the
2D Boolean models used for texture description.
Boolean models 23

2.2 Boolean models


What is a 2D Boolean model?

The Boolean model consists of two independent probabilistic processes: a point process cre-
ating the germs and a shape process creating the grains. The outcome of the point process
is a set of locations in the 2D space. The outcome of the shape process is a set of shapes that
are placed at the random positions chosen by the point process.

Box 2.2. How can we draw random numbers according to a given probability
density function?

Most computers have programs that can produce uniformly distributed random num-
bers. Let us say that we wish to draw random numbers x according to a given probability
density function px (x). Let us also say that we know how to draw random numbers
y with a uniform probability density function defined in the range [A, B]. We may
formulate the problem as follows.
Define a transformation y = g(x) which is one-to-one and which is such that if y is
drawn from a uniform probability density function in the range [A, B], samples x are
distributed according to the given probability density function px (x).
Since we assume that relationship y = g(x) is one-to-one, we may schematically depict
it as shown in figure 2.15.

y g(x)

y
1

x1 x

Figure 2.15: A one-to-one relationship between x and y.

It is obvious from figure 2.15 that distributions Py (y1 ) and Px (x1 ) of the two variables
are identical, since whenever y is less than y1 = g(x1 ), x is less than x1 :
24 Image Processing: Dealing with Texture

Py (y1 ) ≡ P(y ≤ y1 ) = P(x ≤ x1 ) ≡ Px (x1 ) (2.1)


The distribution of x is known, since the probability density function of x is known:
 x1
Px (x1 ) ≡ px (x)dx (2.2)
−∞

The probability density function of y is given by:



1
for A ≤ y ≤ B
py (y) = B−A (2.3)
0 otherwise
The distribution of y is then easily obtained:

 y1 0
 for y1 ≤ A
Py (y1 ) ≡ py (y)dy = yB−A1 −A
for A ≤ y1 ≤ B (2.4)
−∞ 

1 for B ≤ y1

Upon substitution in (2.1) we obtain


y1 − A
= Px (x1 ) (2.5)
B−A
which leads to:
y1 = (B − A)Px (x1 ) + A (2.6)
Random number generators usually produce uniformly distributed numbers in the range
[0, 1]. For A = 0 and B = 1 we have:

y1 = Px (x1 ) (2.7)
So, to produce random numbers x, distributed according to a given probability density
function px (x), we follow these steps: we compute the distribution of x, Px (x1 ) using
equation (2.2); we tabulate pairs of numbers (x1 , Px (x1 )); we draw uniformly distributed
numbers y1 in the range [0, 1]; we use our tabulated numbers as a look-up table where
for each y1 = Px (x1 ) we look up the corresponding x1 . These x1 numbers are our
random samples distributed according to the way we wanted.

Example B2.4

Produce 50 random numbers drawn from a Gaussian probability density


function with mean µ = 2 and standard deviation σ = 3. Assume that you
have at your disposal a random number generator that produces samples
from a uniform distribution in the range [0, 1].
Boolean models 25

In this case:
1 (x−µ)2
px (x) = √ e− 2σ2 (2.8)
2πσ
 +∞ µ  +∞
Note that −∞ px (x)dx = 1 and that −∞ px (x)dx = µ px (x)dx = 1/2.
The distribution of such a probability density function is computed as follows:
 x1
1 (x−µ)2
Px (x1 ) = √ e− 2σ2 dx (2.9)
2πσ −∞
We distinguish two cases: x1 ≤ µ and x1 > µ. We shall deal with the second case first:

 µ  x1
1 − (x−µ)
2
1 (x−µ)2
Px (x1 ) = √ e 2σ 2
dx + √ e− 2σ2 dx
2πσ −∞ 2πσ µ
 x1
1 1 (x−µ)2
= +√ e− 2σ2 dx (2.10)
2 2πσ µ

If we set
x−µ √
z≡ √ ⇒ dx = σ 2dz (2.11)

we obtain  z1
1 1 2 1 1
Px (x1 ) = + √ e−z dz = + erf(z1 ) (2.12)
2 π 0 2 2

where z1 ≡ (x1 − µ)/( 2σ) and the error function is defined as:
 z
2 2
erf(z) ≡ √ e−t dt (2.13)
π 0

When x1 ≤ µ, we write:

 µ  µ
1 (x−µ)2
− 2σ2 1 (x−µ)2
Px (x1 ) = √ e dx − √ e− 2σ2 dx
2πσ −∞ 2πσ x1
 µ
1 1 (x−µ)2
= −√ e− 2σ2 dx (2.14)
2 2πσ x1

In the last expression we change variable of integration from x to y ≡ −x ⇒ dx = −dy.


Then:
 −µ
1 1 (−y−µ)2
Px (x1 ) = + √ e− 2σ2 dy
2 2πσ −x1
 −x1
1 1 (y+µ)2
= −√ e− 2σ2 dy (2.15)
2 2πσ −µ
26 Image Processing: Dealing with Texture

If we set

y+µ √
z≡ √ ⇒ dy = σ 2dz (2.16)

we obtain
√  z1
1 1 2 1 1
Px (x1 ) = − √ σ 2 e−z dz = − erf(z1 ) (2.17)
2 2πσ 0 2 2


where here z1 ≡ (−x1 + µ)/( 2σ). In summary, we deduced that:

 
1 −x
√1 +µ

2 − 12 erf 2σ
for x1 ≤ µ
Px (x1 ) = 
x√
(2.18)
1 1 1 −µ

2 + 2 erf 2σ
for x1 > µ

The error function may be easily computed by using various rational approximations,
one of which is
2
erf(x) = 1 − (a1 t + a2 t2 + a3 t3 )e−x (2.19)

where t ≡ 1/(1 + px), p = 0.47047, a1 = 0.3480242, a2 = −0.0958798 and a3 =


0.7478556. This approximation is valid for 0 ≤ x < ∞ and it returns the value of the
error function with accuracy better than 2.5 × 10−5 .
Using this approximation we create the table of values given in table 2.1.

0.18 Gaussian Dist.


Drawn numbers
0.16
0.14
0.12
0.1
0.08
0.06
0.04
0.02
0
-2 0 2 4 6

Figure 2.16: A Gaussian probability density function with µ = 2 and σ = 3 and the
histogram of 50 random numbers drawn according to it.
Boolean models 27

x1 Px (x1 ) x1 Px (x1 ) x1 Px (x1 )


-2.5 0.06680 0.6 0.32038 3.6 0.70309
-2.4 0.07123 0.7 0.33240 3.7 0.71452
-2.3 0.07587 0.8 0.34459 3.8 0.72574
-2.2 0.08075 0.9 0.35694 3.9 0.73673
-2.1 0.08586 1.0 0.36945 4.0 0.74750
-2.0 0.09120 1.1 0.38209 4.1 0.75803
-1.9 0.09679 1.2 0.39486 4.2 0.76832
-1.8 0.10263 1.3 0.40775 4.3 0.77836
-1.7 0.10871 1.4 0.42073 4.4 0.78814
-1.6 0.11506 1.5 0.43381 4.5 0.79767
-1.5 0.12166 1.6 0.44695 4.6 0.80694
-1.4 0.12853 1.7 0.46016 4.7 0.81594
-1.3 0.13566 1.8 0.47341 4.8 0.82468
-1.2 0.14305 1.9 0.48670 4.9 0.83315
-1.1 0.15072 2.0 0.50000 5.0 0.84135
-1.0 0.15865 2.1 0.51330 5.1 0.84928
-0.9 0.16685 2.2 0.52659 5.2 0.85695
-0.8 0.17532 2.3 0.53984 5.3 0.86434
-0.7 0.18406 2.4 0.55305 5.4 0.87147
-0.6 0.19306 2.5 0.56619 5.5 0.87834
-0.5 0.20233 2.6 0.57927 5.6 0.88494
-0.4 0.21186 2.7 0.59225 5.7 0.89129
-0.3 0.22164 2.8 0.60514 5.8 0.89737
-0.2 0.23168 2.9 0.61791 5.9 0.90321
-0.1 0.24197 3.0 0.63055 6.0 0.90880
0.0 0.25250 3.1 0.64306 6.1 0.91414
0.1 0.26327 3.2 0.65541 6.2 0.91925
0.2 0.27426 3.3 0.66760 6.3 0.92413
0.3 0.28548 3.4 0.67962 6.4 0.92877
0.4 0.29691 3.5 0.69145 6.5 0.93320
0.5 0.30855

Table 2.1: Pairs (x1 , Px (x1 )) when Px (x1 ) is the distribution function of a Gaussian
probability density function with mean µ = 2 and standard deviation σ = 3.

We then draw 50 numbers uniformly distributed in the range [0, 1] and look them up
under column Px (x1 ) to read the numbers we are really interested in, namely the
corresponding x1 numbers. Wherever there is no exact entry in our look-up table, we
perform linear interpolation. Some of the drawn numbers and the corresponding x1
numbers worked out from the look-up table are given in table 2.2. We usually construct
the look-up table so that it is very unlikely that we shall draw a number smaller than
the smallest one in the table or larger than the largest one in the table. The example we
give here uses a rather sparse look-up table. Figure 2.16 shows the theoretical Gaussian
probability density function superimposed on the histogram of the 50 numbers drawn.
28 Image Processing: Dealing with Texture

Uniformly distributed Gaussianly distributed


numbers in the range [0, 1] numbers with µ = 2 and σ = 3
0.13412 0.88634 -1.32152 5.62203
0.82812 0.33051 4.84066 0.68432
0.00055 0.50676 -5.97104 2.05078
0.35441 0.76733 0.87948 4.19036
0.15503 0.22638 -1.04556 -0.25284
0.79651 0.68888 4.48786 3.47826
0.25230 0.21248 -0.00188 -0.39367
0.89950 0.16105 5.83650 -0.97067
0.52185 0.93618 2.16434 6.77440
0.68380 0.01647 3.43533 -5.13699
0.73431 0.53067 3.87797 2.23079
0.23325 0.40219 -0.18480 1.25688
0.24480 0.90535 -0.07308 5.93836
0.09923 0.33897 -1.85813 0.75394
0.35064 0.80364 0.84899 4.56437
0.63024 0.48476 2.99748 1.88541

Table 2.2: The numbers on the left were drawn from a uniform distribution with range
[0, 1]. Each one of them was treated as a value of Px (x1 ) and table 2.1 was used as a
look up table to find the corresponding value of x1 . The thus deduced x1 values are
given in the corresponding position on the right of this table. They are samples from a
Gaussian probability density function with mean µ = 2 and standard deviation σ = 3.

Box 2.3. What is a Poisson process?

Imagine that we draw N random numbers uniformly distributed in the range [0, T ].
Every time we do it, we find yet another combination of N such numbers. So, if we
concentrate our attention to a sub-range of this range, say [t1 , t2 ], every time we repeat
the experiment, we have yet another number of numbers in this range. Let us say that
in the ith realisation we have ki numbers in the range [t1 , t2 ]. The probability of ki
taking a particular value k is given by the Poisson probability density function

(λ(t2 − t1 ))k
p(ki = k) = e−λ(t2 −t1 ) (2.20)
k!
where λ = N/T .
If the range is chosen to start from 0, ie if t1 = 0, and say t2 = t, then these numbers
ki constitute a Poisson process which is a function of t: k(t).
Boolean models 29

Example B2.5

Create a pattern of 100 × 100 pixels, using a Poisson process with parameter
λ = 0.005. Use a shape process which creates squares with side l. The values
of l are Gaussianly distributed with mean l0 = 5 and standard deviation
σl = 2. Repeat the experiment for λ = 0.01, 0.015, 0.025, 0.05, and 0.1.

Using the definition of λ immediately after equation (2.20), and for a total number
of pixels T = 100 × 100 = 10, 000, we work out that we must draw N = 50 pixels
when λ = 0.005. Therefore, we must identify 50 locations uniformly distributed in the
100 × 100 grid where we shall place black squares of randomly chosen sizes. We draw
100 random numbers uniformly distributed in the range [1, 100]. Then we combine
them two by two to form the coordinates of the 50 pixels we need. We use the method
of Box 2.3 to draw random numbers Gaussianly distributed with mean 5 and standard
deviation 2, in order to decide the size of each square. Each drawn number is rounded
to the nearest integer. The result is shown in figure 2.17a. The results for the other
values of λ are shown in figures 2.17b--2.17f.

λ = 0.005, N = 50 λ = 0.01, N = 100 λ = 0.015, N = 150


(a) (b) (c)

λ = 0.025, N = 250 λ = 0.05, N = 500 λ = 0.1, N = 1000


(d) (e) (f)

Figure 2.17: 2D Boolean patterns created for different values of parameter λ of the
Poisson process. The shape process creates squares with side l Gaussianly distributed
with mean l0 = 5 and standard deviation σl = 2. Parameter λ determines how many
such shapes are created and placed uniformly inside the grid.
30 Image Processing: Dealing with Texture

Example B2.6

Create a texture pattern of 100 × 100 pixels in size, using the following 2D
Boolean model. A point process defined as a Poisson process with parame-
ter λ = 0.005, and a shape process that creates circles with radius r given by
a Gaussian probability density function with mean r0 = 5 and standard de-
viation σr = 2. Approximate each circle by its nearest digital circle. Repeat
the experiment for λ = 0.01, 0.015, 0.025, 0.05, and 0.1.

We work again as for example 2.5. The results for the various values of λ are shown
in figure 2.18.

λ = 0.005, N = 50 λ = 0.01, N = 100 λ = 0.015, N = 150


(a) (b) (c)

λ = 0.025, N = 250 λ = 0.05, N = 500 λ = 0.1, N = 1000


(d) (e) (f)

Figure 2.18: 2D Boolean patterns created for different values of parameter λ of the
underlying Poisson process. The shape process created circles with radius r. The
values of r were drawn according to a Gaussian probability density function with
mean r0 = 5 and standard deviation σl = 2, using the method described in Box 2.3.
For λ = 0.1 we had far too many circles and obtained complete coverage of the grid.
Parameter λ of the Poisson process determines how many such shapes are created and
placed uniformly inside the grid.
Boolean models 31

How can we use the 2D Boolean model to describe a binary texture?

One can distinguish two types of parameters in a binary texture: aggregate and individual
parameters. The aggregate parameters are those that we can measure directly from the image.
An example of an aggregate parameter is the average number of black pixels inside a window
of fixed size. The individual parameters are those which govern the Boolean model which
we assume describes the texture. An example of an individual parameter is the value of λ
of the underlying Poisson germ process. The individual parameters are estimated from the
values of the aggregate parameters. Both types of parameter may be used to characterise the
texture; however, if one needs to reproduce the texture, one must estimate as completely as
possible the individual model parameters. In that case, one must also check the validity of
the adopted Boolean model, since it is possible that it may not be applicable.

How can we estimate some aggregate parameters of the 2D Boolean model?

Some useful aggregate parameters of a Boolean texture are the area fraction f , the specific
boundary length L, and the specific convexity N + . There are many more aggregate
parameters that may be defined, but we chose these particular ones because they are useful
in estimating some of the basic individual parameters of the underlying Boolean model, in
the case when the grains are assumed to be convex shapes and the germ process is assumed
to be Poisson.
The area fraction f is defined as the ratio of the black (covered) pixels over all pixels in
the image. For example, in the image of figure 2.19a this parameter is f = 0.38 because there
are 38 black pixels and the image consists of 100 pixels.
The specific boundary length L is defined as the average boundary length per unit area
in the image. It may be estimated by counting the number of border pixels in the image.
These are all pixels that are black but have at least one white neighbour. When using the
word “neighbour” one has to specify whether a neighbour is a pixel which has with the pixel
in question a common side or just a common vertex. If we accept as neighbours only pixels
which share a common side with the pixel being examined, then we are using 4-connectivity.
If in addition we count as neighbours pixels which share a common vertex with the pixel in
question, then we are using 8-connectivity. Very different results may be obtained according
to which connectivity we adopt. As the whole theory of 2D Boolean models is based on the
assumption of convex grains, it is advisable to use 8-connectivity to decide whether a pixel
is a boundary pixel or not. Another issue arises as to whether we must also count as border
pixels those that touch the edges of the image. Let us assume that we use 8-connectivity in
order to decide whether a pixel is a border pixel or not. The boundary pixels of image 2.19a,
which are interior to the image and are boundary pixels because they touch a white pixel,
are shown in figure 2.19b. We can count 35 such pixels, and therefore, from this count we
estimate that the specific boundary length L is 0.35. If in addition we consider as boundary
pixels those that touch the border of the image itself, then we must also include the two pixels
marked in figure 2.19c, and in this case L = 0.37. A compromise solution is to count only
as boundary pixels the pixels that touch either the left or the bottom border of the image.
It can be shown that the estimator of the specific boundary length in this case is unbiased.
Intuitively we understand this by saying that we make a compromise and it is as if the image
continues in a wrapped round way in the two directions, so counting only the border pixels
once makes sense. If we use this unbiased estimator in our example, we must only consider
32 Image Processing: Dealing with Texture

(a) (b) (c)


+
+ +
u +
+
+
+
+

(d) (e) (f)

Figure 2.19: (a) A 10 × 10 binary image. (b)The boundary pixels of the image. These are the
interior boundary pixels identified as having at least one white neighbour using 8-connectivity
to define which are the neighbours of a pixel. (c) The border pixels that may be counted
as boundary pixels as well. (d) A convex grain and the point from which its tangent is
orthogonal to vector u. (e) Patterns used to identify boundary pixels from which a tangent
can be drawn to the black grain that is perpendicular to the upward vertical direction. The
tangent points are marked with a cross. The third pattern is intentionally left incomplete with
an apparently missing pixel at its top right corner, in order to indicate that it is indifferent
whether that pixel is black or white. (f) The tangent points of tangents perpendicular to the
vertical direction identified in the image.

the border black pixel on the left in figure 2.19c, and this will yield L = 0.36.
To appreciate the problem of choosing between 4-connectivity and 8-connectivity in de-
ciding the pixels that constitute the boundary pixels of the grains, we present in table 2.3 the
“perimeter” of a digital circle of a certain radius when 4- or 8-connectivity is used and the
corresponding value of the perimeter of a circle in the continuous domain. In the same table
we also include the areas of the digital and continuous circles. Figure 2.20 shows some digital
circles and their boundary pixels defined using 4- and 8-connectivity with the background
pixels. A method which may be used to estimate the specific boundary length L and which
bypasses the problem of choosing a connectivity is the following. We choose n digital lines
passing through a white point somewhere in the middle of the image. Along each line we
count how many times it crosses a boundary, ie how many transitions we have from white
to black and the opposite. We divide this number by the total number of pixels per digital
Boolean models 33

line. The quantity we compute this way is the specific boundary length per unit length,
P (βi ), where βi is the angle line i forms with the chosen reference direction, say the horizontal
axis. Then the specific boundary length L per unit area is given by (see example 2.7):
n
π
L= P (βi ) (2.21)
2n i=1

Digital circle Continuous circle


radius Perimeter Π Perimeter Π Area A Perimeter Area
r 4-connectivity 8-connectivity 2πr πr 2
1 4 5 5 6.28 3.14
2 8 12 13 12.57 12.57
3 16 20 29 18.85 28.27
4 20 28 49 25.13 50.27
5 28 36 81 31.42 78.54
6 32 44 113 37.70 113.10
7 36 52 149 43.98 153.94
8 44 60 197 50.27 201.06
9 48 68 253 56.55 254.47
10 56 76 317 62.83 314.16
11 60 84 377 69.12 380.13
12 64 92 441 75.40 452.39
13 72 100 529 81.68 530.93
14 76 108 613 87.96 615.75
15 84 116 709 94.25 706.86
16 88 124 797 100.53 804.25
17 96 132 901 106.81 907.92
18 100 140 1009 113.10 1017.88

Table 2.3: Perimeter and area of digital and continuous circles. The perimeter of the digital
circle was measured using 4-connectivity (second column) and 8-connectivity (third column)
in order to decide whether a pixel of the digital circle had a background pixel as a neighbour
or not. The digital circle in each case was defined as the set of pixel positions (i, j) which
satisfied the inequality i2 + j 2 ≤ r 2 , with the centre of the circle assumed to be at (0, 0).

The specific convexity N + is defined as the average number of boundary points per unit
area from which one can draw a tangent to the black grain orthogonal to a fixed direction.
For example, if the fixed direction is indicated by vector u in figure 2.19d, the tangent to the
grain is drawn as shown in the same figure. These points are the points of lower positive
tangents. Such points are identified with the existence of local patterns like those shown in
figure 2.19e and they are marked with a + in figure 2.19f. It is very easy to identify them in
this example. We find that we have 6 such points, and so N + = 6/100 = 0.06. However, in
practice they have to be identified using the hit-or-miss algorithm described later in example
2.20, using the patterns shown in figure 2.19e. In addition, we use more than one orientation
for vector u, typically four with u pointing up, down, left and right, and estimate N + as the
average of its values over these orientations.
Another random document with
no related content on Scribd:
OLD HOUSES WITH CARVED DOORPOSTS, NORWAY.
CHAPTER XXVI.
THE SIGURD SAGA.

While the first part of the Elder Edda consists of a collection of


alliterative poems describing the creation of the world, the
adventures of the gods, their eventual downfall, and gives a
complete exposition of the Northern code of ethics, the second part
comprises a series of heroic lays describing the life and adventures
of the Volsung family, and especially of their chief representative,
Sigurd, the great Northern warrior.
These lays form the basis of the great Scandinavian epic, the
The Volsunga Volsunga Saga, and have supplied not only the
Saga. materials for the Nibelungenlied, the German epic,
and for countless folk tales, but also for Wagner’s
celebrated operas, “The Rhinegold,” “Valkyr,” “Siegfried,” and “The
Dusk of the Gods.” They have also been rewritten by William Morris,
the English poet, who has given them the form which they will
probably retain in our literature, and it is from his work that almost
all the quotations in this chapter are taken in preference to extracts
from the Edda.
Sigi, Odin’s son, was a powerful man, and generally respected
Sigi. until he killed a man out of jealousy because the latter
had slain the most game when they were out hunting
together. In consequence of this crime, Sigi was driven from his own
land and declared an outlaw. But, although he was a criminal, he
had not entirely forfeited Odin’s favor, for the god now gave him a
well-equipped vessel, provided him with a number of brave
followers, and promised that victory should ever attend him.
Thanks to Odin’s protection, Sigi soon won the glorious empire
of the Huns and became a powerful monarch. But when he had
attained extreme old age his fortune changed, Odin suddenly
forsook him, his wife’s kindred fell upon him, and after a short
encounter he was treacherously slain.
His death was soon avenged, however, for his son Rerir,
Rerir. returning from a journey, put all the murderers to
death and claimed the throne. But, in spite of all
outward prosperity, Rerir’s dearest wish, a son to succeed him,
remained unfulfilled for many a year. Finally, however, Frigga decided
to grant his constant prayer, and to vouchsafe the heir he longed for.
Her swift messenger Gna, or Liod, was dispatched to carry him a
miraculous apple, which she dropped into his lap as he was sitting
alone on the hillside. Glancing upward, Rerir recognized the emissary
of the goddess, and joyfully hastened home to partake of the apple
with his wife. The child thus born in answer to their prayers was a
handsome little lad called Volsung, who, losing both parents in early
infancy, became ruler of all the land.
Every year Volsung’s wealth and power increased, and, as he
Volsung. was the boldest leader, many brave warriors rallied
around him, and drank his mead sitting beneath the
Branstock, a mighty oak, which, rising in the middle of his dwelling,
pierced the roof and overshadowed the whole house.

“And as in all other matters ’twas all earthly houses’ crown,


And the least of its wall-hung shields was a battle-world’s renown,
So therein withal was a marvel and a glorious thing to see,
For amidst of its midmost hall-floor sprang up a mighty tree,
That reared its blessings roofward and wreathed the roof-tree dear
With the glory of the summer and the garland of the year.”

Volsung did not long remain childless, for ten stalwart sons and
one lovely daughter, Signy, came to brighten his home. As soon as
this maiden reached marriageable years, many suitors asked for her
hand, which was finally pledged to Siggeir, King of the Goths, whom,
however, she had never seen.
The wedding day came, and when the bride first beheld her
The wedding
destined groom she shrank back in dismay, for his
of Signy. puny form and lowering glances contrasted oddly with
her brothers’ strong frames and frank faces. But it was
too late to withdraw,—the family honor was at stake,—and Signy so
successfully concealed her dislike that none except her twin brother
Sigmund suspected how reluctantly she became Siggeir’s wife.
The wedding feast was held as usual, and when the
The sword in merrymakings had reached their height the guests
the were startled by the sudden entrance of a tall, one-
Branstock.
eyed man, closely enveloped in a mantle of cloudy
blue. Without vouchsafing word or glance to any in the assembly,
the stranger strode up to the Branstock and thrust a glittering sword
up to the hilt in its great bole. Then, turning slowly around, he faced
the awe-struck assembly, and in the midst of the general silence
declared that the weapon would belong to the warrior who could pull
it out, and that it would assure him victory in every battle. These
words ended, he passed out and disappeared, leaving an intimate
conviction in the minds of all the guests that Odin, king of the gods,
had been in their midst.

“So sweet his speaking sounded, so wise his words did seem,
That moveless all men sat there, as in a happy dream
We stir not lest we waken; but there his speech had end,
And slowly down the hall-floor and outward did he wend;
And none would cast him a question or follow on his ways,
For they knew that the gift was Odin’s, a sword for the world to
praise.”
Volsung was the first to recover the power of speech, and,
waiving his own right to try to secure the divine weapon, he invited
Siggeir to make the first attempt to draw it out of the tree-trunk.
The bridegroom anxiously tugged and strained, but the sword
remained firmly embedded in the oak. He resumed his seat, with an
air of chagrin, and then Volsung also tried and failed. But the
weapon was evidently not intended for either of them, and the
young Volsung princes were next invited to try their strength.

“Sons I have gotten and cherished, now stand ye forth and try;
Lest Odin tell in God-home how from the way he strayed,
And how to the man he would not he gave away his blade.”

The nine eldest sons were equally unsuccessful; but when


Sigmund.
Sigmund, the tenth and youngest, laid his firm young
hand upon the hilt, it easily yielded to his touch, and
he triumphantly drew the sword out without making the least
exertion.

“At last by the side of the Branstock Sigmund the Volsung stood,
And with right hand wise in battle the precious sword-hilt caught,
Yet in a careless fashion, as he deemed it all for naught;
When, lo, from floor to rafter went up a shattering shout,
For aloft in the hand of Sigmund the naked blade showed out
As high o’er his head he shook it: for the sword had come away
From the grip of the heart of the Branstock, as though all loose it
lay.”

All present seemed overjoyed at his success; but Siggeir’s heart


was filled with envy, for he coveted the possession of the weapon,
which he now tried to purchase from his young brother-in-law.
Sigmund, however, refused to part with it at any price, declaring that
the weapon had evidently been intended for him only. This refusal so
offended Siggeir that he secretly resolved to bide his time, to
exterminate the proud race of the Volsungs, and thus secure the
divine sword.
Concealing his chagrin therefore, he turned to Volsung and
cordially invited him to visit his court a month later, bringing all his
sons and kinsmen with him. The invitation so spontaneously given
was immediately accepted, and although Signy, suspecting evil,
secretly sought her father while her husband slept, and implored him
to retract his promise and stay at home, he would not consent to
appear afraid.
A few weeks after the return of the bridal couple Volsung’s well-
Siggeir’s manned vessels came within sight of Siggeir’s shores,
treachery. and Signy perceiving them hastened down to the
beach to implore her kinsmen not to land, warning
them that her husband had treacherously planned an ambush,
whence they could never escape alive. But Volsung and his sons,
whom no peril could daunt, calmly bade her return to her husband’s
palace, and donning their arms they boldly set foot ashore.
THE BRANSTOCK.—Hoffmann.
“Then sweetly Volsung kissed her: ‘Woe am I for thy sake,
But Earth the word hath hearkened, that yet unborn I spake;
How I ne’er would turn me backward from the sword or fire of bale;

—I have held that word till to-day, and to-day shall I change the
tale?
And look on these thy brethren, how goodly and great are they,
Wouldst thou have the maidens mock them, when this pain hath
passed away
And they sit at the feast hereafter, that they feared the deadly
stroke?
Let us do our day’s work deftly for the praise and the glory of folk;
And if the Norns will have it that the Volsung kin shall fail,
Yet I know of the deed that dies not, and the name that shall ever
avail.’”

Marching towards the palace, the brave little troop soon fell into
Siggeir’s ambuscade, and, although they fought with heroic courage,
they were so overpowered by the superior number of their foes that
Volsung was soon slain and all his sons made captive. Led bound
into the presence of Siggeir, who had taken no part in the fight (for
he was an arrant coward), Sigmund was forced to relinquish his
precious sword, and he and his brothers were all condemned to die.
Signy, hearing this cruel sentence, vainly interceded for them,
but all she could obtain by her prayers and entreaties was that her
kinsmen should be chained to a fallen oak in the forest, there to
perish of hunger and thirst if the wild beasts spared them. Then,
fearing lest his wife should visit and succor her brothers, Siggeir
confined her in the palace, where she was closely guarded night and
day.
Early every morning Siggeir himself sent a messenger into the
forest to see whether the Volsungs were still living, and every
morning the man returned saying a monster had come during the
night and had devoured one of the princes, leaving nothing but his
bones. When none but Sigmund remained alive, Signy finally
prevailed upon one of her servants to carry some honey into the
forest and smear it over her brother’s face and mouth.
That very night the wild beast, attracted by the smell of the
honey, licked Sigmund’s face, and even thrust its tongue into his
mouth. Clinching his teeth upon it, Sigmund, weak and wounded as
he was, struggled until his bonds broke and he could slay the nightly
visitor who had caused the death of all his brothers. Then he
vanished into the forest, where he remained concealed until the
daily messenger had come and gone, and until Signy, released from
captivity, came speeding to the forest to weep over her kinsmen’s
remains.
Seeing her evident grief, and knowing she had no part in
Siggeir’s cruelty, Sigmund stole out of his place of concealment,
comforted her as best he could, helped her to bury the whitening
bones, and registered a solemn oath in her presence to avenge his
family’s wrongs. This vow was fully approved by Signy, who,
however, bade her brother abide a favorable time, promising to send
him a helper. Then the brother and sister sadly parted, she to return
to her distasteful palace home, and he to seek the most remote part
of the forest, where he built a tiny hut and plied the trade of a
smith.

“And men say that Signy wept


When she left that last of her kindred; yet wept she never more
Amid the earls of Siggeir, and as lovely as before
Was her face to all men’s deeming: nor aught it changed for ruth,
Nor for fear nor any longing; and no man said for sooth
That she ever laughed thereafter till the day of her death was
come.”

Years passed by. Siggeir, having taken possession of the Volsung


Signy’s sons.
kingdom, proudly watched the growth of his eldest
son, whom Signy secretly sent to her brother as soon as he was ten
years of age, bidding Sigmund train the child up to help him, if he
were worthy of such a task. Sigmund reluctantly accepted the
charge; but as soon as he had tested the boy and found him
deficient in physical courage, he either sent him back to his mother,
or, as some versions relate, slew him.
Some time after this Sigmund tested Signy’s second son, who
had been sent to him for the same purpose, and found him wanting
also. Evidently none but a pure-blooded Volsung could help him in
his work of revenge, and Signy, realizing this, resolved to commit a
crime.

“And once in the dark she murmured: ‘Where then was the ancient
song
That the Gods were but twin-born once, and deemed it nothing
wrong
To mingle for the world’s sake, whence had the Æsir birth,
And the Vanir, and the Dwarf-kind, and all the folk of earth?’”

This resolution taken, she summoned a beautiful young witch,


exchanged forms with her, and, running into the forest, sought
shelter in Sigmund’s hut. Deeming her nothing but the gypsy she
seemed, and won by her coquetry, he soon made her his wife. Three
days later she vanished from his hut, returned to the palace,
resumed her own form, and when she gave birth to a little son, she
rejoiced to see his bold glance and strong frame.
When this child, Sinfiotli, was ten years of age, she herself made
Sinfiotli. a preliminary test of his courage by sewing his
garment to his skin. Then she suddenly snatched it off
with shreds of flesh hanging to it, and as the child did not even
wince, but laughed aloud, she confidently sent him to Sigmund. He,
too, found the boy quite fearless, and upon leaving the hut one day
he bade him take meal from a certain sack, and knead and bake the
bread. On returning home Sigmund asked Sinfiotli whether his
orders had been carried out. The lad replied by showing the bread,
and when closely questioned he artlessly confessed that he had
been obliged to knead into the loaf a great adder which was hidden
in the meal. Pleased to see that the child, for whom he felt a strange
affection, had successfully stood the test which had daunted his
predecessors, Sigmund bade him refrain from eating of that loaf, as
he alone could taste poison unharmed, and patiently began to teach
him all a Northern warrior need know.

“For here the tale of the elders doth men a marvel to wit,
That such was the shaping of Sigmund among all earthly kings,
That unhurt he handled adders and other deadly things,
And might drink unscathed of venom: but Sinfiotli was so wrought
That no sting of creeping creatures would harm his body aught.”

Sigmund and Sinfiotli soon became inseparable companions, and


The
while ranging the forest together they once came to a
werewolves. hut, where they found two men sound asleep. Wolf
skins hanging near them immediately made them
conclude that the strangers were werewolves (men whom a cruel
spell forced to assume the habits and guise of ravenous wolves, and
who could only resume their natural form for a short space at a
time). Prompted by curiosity, Sigmund donned one of the wolf skins,
Sinfiotli the other, and they were soon metamorphosed into wolves
and rushed through the forest, slaying and devouring all they saw.
Such were their wolfish passions that they soon attacked each
other, and after a fierce struggle Sinfiotli, the younger and weaker,
fell down dead. This sudden catastrophe brought Sigmund to his
senses. While he hung over his murdered companion in sudden
despair, he saw two weasels come out of the forest and fight until
one lay dead. The live weasel then sprang back into the thicket, and
soon returned with a leaf, which it laid upon its companion’s breast.
At the contact of the magic herb the dead beast came back to life. A
moment later a raven flying overhead dropped a similar leaf at
Sigmund’s feet, and he, understanding that the gods wished to help
him, laid it upon Sinfiotli, who was restored to life.
Afraid lest they might work each other further mischief while in
this altered guise, Sigmund and Sinfiotli now crept home and
patiently waited until the time of release had come. On the ninth
night the skins dropped off and they hastily flung them into the fire,
where they were entirely consumed, and the spell was broken
forever.
It was now that Sigmund confided the story of his wrongs to
Sinfiotli, who swore that, although Siggeir was his father (for neither
he nor Sigmund knew the secret of his birth), he would help him to
take his revenge. At nightfall, therefore, he accompanied Sigmund to
the palace; they entered unseen, and concealed themselves in the
cellar, behind the huge beer vats. Here they were discovered by
Signy’s two youngest children, who were playing with golden rings,
which rolled into the cellar, and who thus suddenly came upon the
men in ambush.
They loudly proclaimed the discovery they had just made to their
father and his guests, but, before Siggeir and his men could don
their arms, Signy caught both children by the hand, and dragging
them into the cellar bade her brother slay the little traitors. This
Sigmund utterly refused to do, but Sinfiotli struck off their heads ere
he turned to fight against the assailants, who were rapidly closing
around him.
In spite of all efforts Sigmund and his brave young companion
soon fell into the hands of the Goths, whose king, Siggeir, sentenced
them to be buried alive in the same mound, a stone partition being
erected between them so they could neither see nor touch each
other. The prisoners were already confined in their living graves, and
the men were about to place the last stones on the roof, when Signy
drew near, bearing a bundle of straw, which they allowed her to
throw at Sinfiotli’s feet, for they fancied that it contained only a few
provisions which would prolong his agony a little without helping him
to escape.
When the workmen had departed and all was still, Sinfiotli undid
the sheaf and shouted for joy when he found instead of bread the
sword which Odin had given to Sigmund. Knowing that nothing
could dull or break the keen edge of this fine weapon, Sinfiotli thrust
it through the stone partition, and, aided by Sigmund, sawed an
opening, and both soon effected an escape through the roof.

“Then in the grave-mound’s darkness did Sigmund the king upstand,


And unto that saw of battle he set his naked hand;
And hard the gift of Odin home to their breasts they drew;
Sawed Sigmund, sawed Sinfiotli, till the stone was cleft atwo,
And they met and kissed together: then they hewed and heaved full
hard
Till, lo, through the bursten rafters the winter heavens bestarred!
And they leap out merry-hearted; nor is there need to say
A many words between them of whither was the way.”

Sigmund and Sinfiotli, free once more, noiselessly sought the


Sigmund’s
palace, piled combustible materials around it, and
vengeance. setting fire to it placed themselves on either side the
door, declaring that none but the women should be
allowed to pass through. Then they loudly called to Signy to escape
ere it was too late, but she had no desire to live, and after kissing
them both and revealing the secret of Sinfiotli’s birth she sprang
back into the flames, where she perished.

“And then King Siggeir’s roof-tree upheaved for its utmost fall,
And its huge walls clashed together, and its mean and lowly things
The fire of death confounded with the tokens of the kings.”
The long-planned vengeance had finally been
Helgi.
carried out, Volsung’s death had been avenged, and
Sigmund, feeling that nothing now detained him in Gothland, set sail
with Sinfiotli and returned to Hunaland, where he was warmly
welcomed and again sat under the shade of his ancestral tree, the
mighty Branstock. His authority fully established, Sigmund married
Borghild, a beautiful princess, who bore him two sons, Hamond and
Helgi, the latter of whom was visited by the Norns when he lay in his
cradle, and promised sumptuous entertainment in Valhalla when his
earthly career should be ended.

“And the woman was fair and lovely, and bore him sons of fame;
Men called them Hamond and Helgi, and when Helgi first saw light
There came the Norns to his cradle and gave him life full bright,
And called him Sunlit Hill, Sharp Sword, and Land of Rings,
And bade him be lovely and great, and a joy in the tale of kings.”

This young Volsung prince was fostered by Hagal, for Northern


kings generally entrusted their sons’ education to a stranger, thinking
they would be treated with less indulgence than at home. Under this
tuition Helgi became so fearless that at the age of fifteen he
ventured alone into the palace of Hunding, with whose whole race
his family was at feud. Passing all through the palace unmolested
and unrecognized, he left an insolent message, which so angered
Hunding that he immediately set out in pursuit of the bold young
prince. Hunding entered Hagal’s house, and would have made Helgi
a prisoner had the youth not disguised himself as a servant maid,
and begun to grind corn as if it were his wonted occupation. The
invaders marveled somewhat at the maid’s tall stature and brawny
arms, but departed without suspecting that they had been so near
the hero whom they sought.
Having thus cleverly escaped, Helgi joined Sinfiotli; they
collected an army, and marched openly against the Hundings, with
whom they fought a great battle, during which the Valkyrs hovered
overhead, waiting to convey the slain to Valhalla. Gudrun, one of the
battle maidens, was so charmed by the courage which Helgi
displayed, that she openly sought him and promised to be his wife.
Only one of the Hunding race, Dag, remained alive, and he was
allowed to go free after promising never to try to avenge his
kinsmen’s death. This promise was not kept, however, for Dag,
having borrowed Odin’s spear Gungnir, treacherously made use of it
to slay Helgi. Gudrun, now his wife, wept many tears at his death,
and solemnly cursed his murderer; then, hearing from one of her
maids that her slain husband kept calling for her in the depths of his
tomb, she fearlessly entered the mound at night and tenderly
inquired why he called and why his wounds kept on bleeding even
after death. Helgi answered that he could not rest happy because of
her grief, and declared that for every tear she shed a drop of his
blood must flow.

“Thou weepest, gold-adorned!


Cruel tears,
Sun-bright daughter of the south!
Ere to sleep thou goest;
Each one falls bloody
On the prince’s breast,
Wet, cold, and piercing,
With sorrow big.”
Sæmund’s Edda (Thorpe’s tr.).

To still her beloved husband’s sufferings, Gudrun then ceased to


weep, but her spirit soon joined his, which had ridden over Bifröst
and entered Valhalla, where Odin made him leader of the Einheriar.
Here Gudrun, a Valkyr once more, continued to wait upon him,
darting down to earth at Odin’s command to seek new recruits for
the army which her lord was to lead into battle when Ragnarok, the
twilight of the gods, should come.
Death of Sinfiotli, Sigmund’s eldest son, also came to an
Sinfiotli. early death; for, having quarreled with and slain
Borghild’s brother, she determined to poison him. Twice Sinfiotli
detected the attempt and told his father there was poison in his cup.
Twice Sigmund, whom no venom could injure, drained the bowl; but
when Borghild made a third and last attempt, he bade Sinfiotli let
the wine flow through his beard. Mistaking the meaning of his
father’s words, Sinfiotli immediately drained the cup and fell to the
ground lifeless, for the poison was of the most deadly kind.

“He drank as he spake the words, and forthwith the venom ran
In a chill flood over his heart, and down fell the mighty man
With never an uttered death-word and never a death-changed look,
And the floor of the hall of the Volsungs beneath his falling shook.
Then up rose the elder of days with a great and bitter cry,
And lifted the head of the fallen; and none durst come anigh
To hearken the words of his sorrow, if any words he said
But such as the Father of all men might speak over Balder dead.
And again, as before the death-stroke, waxed the hall of the
Volsungs dim,
And once more he seemed in the forest, where he spake with
naught but him.”

Speechless with grief, Sigmund tenderly raised his son’s body in


his arms, and strode out of the hall and down to the shore, where
he deposited his precious burden in the skiff of an old one-eyed
boatman who came at his call. But when he would fain have stepped
aboard also, the boatman pushed off and was soon lost to sight. The
bereaved father then slowly wended his way home again, knowing
that Odin himself had come to claim the young hero and had rowed
away with him “out into the west.”
Sigmund repudiated Borghild in punishment for this crime, and
Hiordis. when he was very old indeed he sued for the hand of
Hiordis, a fair young princess, daughter of Eglimi, King
of the Islands. Although this young maiden had many suitors,
among others King Lygni of Hunding’s race, she gladly accepted
Sigmund and became his wife. Lygni, the discarded suitor, was so
angry at this decision, that he immediately collected an army and
marched against his successful rival, who, overpowered by superior
numbers, fought with the courage of despair.
Hidden in a neighboring thicket, Hiordis and her maid anxiously
watched the battle, saw Sigmund pile the dead around him and
triumph over every foe, until at last a tall, one-eyed warrior suddenly
appeared, broke his matchless sword, and vanished, leaving him
defenseless amid the foe, who soon cut him down.

“But, lo! through the hedge of the war-shafts, a mighty man there
came,
One-eyed and seeming ancient, but his visage shone like flame:
Gleaming gray was his kirtle, and his hood was cloudy blue;
And he bore a mighty twi-bill, as he waded the fight-sheaves
through,
And stood face to face with Sigmund, and upheaved the bill to
smite.
Once more round the head of the Volsung fierce glittered the
Branstock’s light,
The sword that came from Odin: and Sigmund’s cry once more
Rang out to the very heavens above the din of war.
Then clashed the meeting edges with Sigmund’s latest stroke,
And in shivering shards fell earthward that fear of worldly folk.
But changed were the eyes of Sigmund, the war-wrath left his face;
For that gray-clad, mighty Helper was gone, and in his place
Drave on the unbroken spear-wood ’gainst the Volsung’s empty
hands:
And there they smote down Sigmund, the wonder of all lands,
On the foemen, on the death-heap his deeds had piled that day.”
All the Volsung race and army had already succumbed, so Lygni
immediately left the battlefield to hasten on and take possession of
the kingdom and palace, where he fully expected to find the fair
Hiordis and force her to become his wife. As soon as he had gone,
however, the beautiful young queen crept out of her hiding place in
the thicket, ran to the dying Sigmund, caught him to her breast in a
last passionate embrace, and tearfully listened to his dying words.
He then bade her gather up the fragments of his sword, carefully
treasure them, and give them to the son whom he foretold would
soon be born, and who was destined to avenge his death and be far
greater than he.

“‘I have wrought for the Volsungs truly, and yet have I known full well
That a better one than I am shall bear the tale to tell:
And for him shall these shards be smithied; and he shall be my son,
To remember what I have forgotten and to do what I left undone.’”

While Hiordis was mourning over Sigmund’s lifeless body, her


Elf, the
watching handmaiden warned her of the approach of
viking. a party of vikings. Retreating into the thicket once
more, Hiordis exchanged garments with her; then,
bidding her walk first and personate the queen, they went to meet
the viking Elf (Helfrat or Helferich), and so excited his admiration for
Sigmund that he buried him with all pomp, and promised them a
safe asylum in his house.
As he had doubted their relative positions from the very first
moment, he soon resorted to a seemingly idle question to ascertain
their real rank. The pretended queen, when asked how she knew the
hour had come for rising when the winter days were short and there
was no light to announce the coming of morn, replied that, as she
was in the habit of drinking milk ere she fed the cows, she always
awoke thirsty. But when the same question was put to the real
Hiordis, she answered that she knew it was morning because the
golden ring her father had given her grew cold on her hand.
Elf, having thus discovered the true state of affairs, offered
Sigurd.
marriage to the pretended handmaiden, Hiordis,
promising to foster her child by Sigmund—a promise
which he nobly kept. The child was sprinkled with water by his hand
—a ceremony which our pagan ancestors scrupulously performed—
received from him the name of Sigurd, and grew up in the palace.
There he was treated as the king’s own son, receiving his education
from Regin, the wisest of men, who knew all things and was even
aware of his own fate, which was to fall by a youth’s hand.

“Again in the house of the Helper there dwelt a certain man,


Beardless and low of stature, of visage pinched and wan:
So exceeding old was Regin, that no son of man could tell
In what year of the days passed over he came to that land to dwell:
But the youth of king Elf had he fostered, and the Helper’s youth
thereto,
Yea, and his father’s father’s: the lore of all men he knew,
And was deft in every cunning, save the dealings of the sword:
So sweet was his tongue-speech fashioned, that men trowed his
every word;
His hand with the harp-strings blended was the mingler of delight
With the latter days of sorrow; all tales he told aright;
The Master of the Masters in the smithying craft was he;
And he dealt with the wind and the weather and the stilling of the
sea;
Nor might any learn him leech-craft, for before that race was made,
And that man-folk’s generation, all their life-days had he weighed.”

Under this tutor young Sigurd grew up to great wisdom. He


mastered the smith craft, and the art of carving all manner of runes,
learned languages, music, and eloquence, and, last but not least,
became a doughty warrior whom none could subdue. By Regin’s
advice, Sigurd, having reached manhood, asked the king for a war
horse—a request which was immediately granted, for he was bidden
hasten to Gripir, the stud-keeper, and choose from his flock the steed
he liked best.
On his way to the meadow where the horses were at pasture,
Sigurd encountered a one-eyed stranger, clad in gray and blue, who
bade him drive the horses into the river and select the one which
could breast the foaming tide most successfully.
Sigurd, acting according to this advice, noticed that one horse,
after crossing, raced around the meadow on the opposite side; then,
plunging back into the river, he returned to his former pasture
without showing any signs of fatigue. The young hero selected this
horse, therefore, calling him Grane or Greyfell. This steed was a
descendant of Odin’s eight-footed horse Sleipnir, and, besides being
unusually strong and indefatigable, was as fearless as his master. A
short time after this, while Regin and his pupil were sitting over the
fire, the former struck his harp, and, after the manner of the
Northern scalds, sang or recited the following tale, which was the
story of his life:
Hreidmar, king of the dwarf folk, was the father of three sons.
The treasure Fafnir, the eldest, was gifted with a fearless soul and a
of the dwarf powerful hand; Otter, the second, with snare and net,
king.
and the power of changing form at will; and Regin,
the third, could, as we have already seen, command all knowledge
and skillfully ply the trade of a smith. To please the avaricious old
Hreidmar, this youngest son fashioned for him a house which was all
lined with glittering gold and flashing gems, and guarded by Fafnir,
whose fierce glances and Ægis helmet none dared encounter.
Now it came to pass that Odin, Hoenir, and Loki once came
down upon earth in human guise for one of their wonted expeditions
to test the hearts of men, and soon reached the land where
Hreidmar dwelt.
“And the three were the heart-wise Odin, the Father of the Slain,
And Loki, the World’s Begrudger, who maketh all labor vain,
And Hönir, the Utter-Blameless, who wrought the hope of man,
And his heart and inmost yearnings, when first the work began;—
The God that was aforetime, and hereafter yet shall be
When the new light yet undreamed of shall shine o’er earth and
sea.”

These gods had not wandered very far before Loki perceived an
otter basking in the sun. Animated by his usual spirit of destruction,
he slew the unoffending beast—which, as it happened, was the
dwarf king’s second son, Otter—and flung its lifeless body over his
shoulders, thinking it would furnish a good dish when meal time
came.
Following his companions, Loki came at last to Hreidmar’s house,
entered with them, and flung his burden down upon the floor. The
moment the dwarf king’s glance fell upon it he flew into a towering
rage, and before the gods could help themselves they were bound
by his order, and heard him declare that they should never recover
their liberty unless they could satisfy his thirst for gold by giving him
enough of that precious substance to cover the otterskin inside and
out.

“‘Now hearken the doom I shall speak! Ye stranger-folk shall be free


When ye give me the Flame of the Waters, the gathered Gold of the
Sea,
That Andvari hideth rejoicing in the wan realm pale as the grave;
And the Master of Sleight shall fetch it, and the hand that never
gave,
And the heart that begrudgeth forever, shall gather and give and
rue.
Lo, this is the doom of the wise, and no doom shall be spoken
anew.’”
As this otterskin had the property of stretching itself out to a
fabulous size, no ordinary treasure could suffice to cover it. The gods
therefore bade Loki, who was liberated to procure the ransom,
hasten off to the waterfall where the dwarf Andvari dwelt, and
secure the treasure he had amassed by magical means.

“There is a desert of dread in the uttermost part of the world,


Where over a wall of mountains is a mighty water hurled,
Whose hidden head none knoweth, nor where it meeteth the sea;
And that force is the Force of Andvari, and an Elf of the dark is he.
In the cloud and the desert he dwelleth amid that land alone;
And his work is the storing of treasure within his house of stone.”

In spite of diligent search, however, Loki could not find the


dwarf; but perceiving a salmon sporting in the foaming waters, he
shrewdly concluded the dwarf must have assumed this shape, and
borrowing Ran’s net he soon had the fish in his power. As he had
suspected, it was Andvari, who, in exchange for liberty, reluctantly
brought forth his mighty treasure and surrendered it all, including
the Helmet of Dread and a hauberk of gold, reserving only the ring
he wore, which was gifted with miraculous powers, and, like a
magnet, helped him to collect the precious ore. But the greedy Loki,
catching sight of it, wrenched it away from him and departed
laughing, while the dwarf hurled angry curses after him, declaring
that the ring would ever prove its possessor’s bane and would cause
the death of many.
“That gold
Which the dwarf possessed
Shall to two brothers
Be cause of death,
And to eight princes,
Of dissension.
From my wealth no one
Shall good derive.”
Sæmund’s Edda (Thorpe’s tr.).

On arriving at Hreidmar’s hut, Loki found the mighty treasure


none too great, for the skin widened and spread, and he was even
forced to give the ring Andvaranaut (Andvari’s loom) to purchase his
and his companions’ release. The gold thus obtained soon became a
curse, as Andvari had predicted, for Fafnir and Regin both coveted a
share. As for Hreidmar, he gloated over his treasure night and day,
and Fafnir the invincible, seeing that he could not obtain it
otherwise, slew his own father, donned the Helmet of Dread and the
hauberk of gold, grasped the sword Hrotti, and when Regin came to
claim a part drove him scornfully out into the world, where he bade
him earn his own living.
Thus exiled, Regin took refuge among men, to whom he taught
the arts of sowing and reaping. He showed them how to work
metals, sail the seas, tame horses, yoke beasts of burden, build
houses, spin, weave, and sew—in short, all the industries of civilized
life, which had hitherto been unknown. Years elapsed, and Regin
patiently bided his time, hoping that some day he would find a hero
strong enough to avenge his wrongs upon Fafnir, whom years of
gloating over his treasure had changed into a horrible dragon, the
terror of Gnîtaheid (Glittering Heath), where he had taken up his
abode.
His story finished, Regin suddenly turned to the attentive Sigurd,
told him he knew that he could slay the dragon if he wished, and
inquired whether he were ready to help his old tutor avenge his
wrongs.

“And he spake: ‘Hast thou hearkened, Sigurd? Wilt thou help a man
that is old
To avenge him for his father? Wilt thou win that treasure of gold
And be more than the kings of the earth? Wilt thou rid the earth of a
wrong
And heal the woe and the sorrow my heart hath endured o’er long?’”

Sigurd immediately assented, declaring, however, that the curse


Sigurd’s
must be assumed by Regin, for he would have none
sword. of it; and, in order to be well prepared for the coming
fight, he asked his master to forge him a sword which
no blow could break. Twice Regin fashioned a marvelous weapon,
but twice Sigurd broke it to pieces on the anvil. Then, declaring that
he must have a sword which would not fail him in time of need, he
begged the broken fragments of Sigmund’s weapon from his mother
Hiordis, and either forged himself or made Regin forge a matchless
blade, whose temper was such that it neatly severed some wool
floating gently down the stream, and divided the great anvil in two
without being even dinted.
After paying a farewell visit to Gripir, who, knowing the future,
foretold every event in his coming career, Sigurd took leave of his
mother, and accompanied by Regin set sail from his native land,
promising to slay the dragon as soon as he had fulfilled his first duty,
which was to avenge his father Sigmund’s death.
“‘First wilt thou, prince,
Avenge thy father,
And for the wrongs of Eglymi
Wilt retaliate.
Thou wilt the cruel,
The sons of Hunding,
Boldly lay low:
Thou wilt have victory.’”
Lay of Sigurd Fafnicide (Thorpe’s tr.).

On his way to the Volsung land Sigurd saw a man walking on the
waters, and took him on board, little suspecting that this individual,
who said his name was Feng or Fiöllnir, was Odin or Hnikar, the wave
stiller. He therefore conversed freely with the stranger, who promised
him favorable winds, and learned from him how to distinguish
auspicious from unauspicious omens.
After slaying Lygni and cutting the bloody eagle on his foes,
The fight Sigurd left his reconquered kingdom and went with
with the Regin to slay Fafnir. A long ride through the
dragon.
mountains, which rose higher and higher before him,
brought him at last to his goal, where a one-eyed stranger bade him
dig trenches in the middle of the track along which the dragon daily
rolled his slimy length to go down to the river and quench his thirst.
He then bade Sigurd cower in one of those holes, and there wait
until the monster passed over him, when he could drive his trusty
weapon straight into its heart.
SIGURD AND THE DRAGON.—K. Dielitz.

Sigurd gratefully followed this advice, and as the monster’s


loathsome, slimy folds rolled overhead he thrust his sword under its
left breast, and, deluged with blood, sprang out of the trench as the
dragon rolled aside in the throes of death.

“Then all sank into silence, and the son of Sigmund stood
On the torn and furrowed desert by the pool of Fafnir’s blood,
And the serpent lay before him, dead, chilly, dull, and gray;
And over the Glittering Heath fair shone the sun and the day,
And a light wind followed the sun and breathed o’er the fateful
place,
As fresh as it furrows the sea plain, or bows the acres’ face.”

Regin, who had prudently remained at a distance until all danger


was over, seeing his foe was slain, now came up to Sigurd; and
fearing lest the strong young conqueror should glory in his deed and
claim a reward, he began to accuse him of having murdered his kin,
and declared that instead of requiring life for life, as was his right
according to Northern law, he would consider it sufficient atonement
if Sigurd would cut out the monster’s heart and roast it for him on a
spit.

“Then Regin spake to Sigurd: ‘Of this slaying wilt thou be free?
Then gather thou fire together and roast the heart for me,
That I may eat it and live, and be thy master and more;
For therein was might and wisdom, and the grudged and hoarded
lore:—
Or else depart on thy ways afraid from the Glittering Heath.’”
Sigurd, knowing that a true warrior never refused satisfaction of
some kind to the kindred of the slain, immediately prepared to act as
cook, while Regin dozed until the meat was ready. Feeling of the
heart to ascertain whether it were tender, Sigurd burned his fingers
so severely that he instinctively thrust them into his mouth to allay
the smart. No sooner had Fafnir’s blood touched his lips than he
discovered, to his utter surprise, that he could understand the songs
of the birds, which were already gathering around the carrion.
Listening to them attentively, he found they were advising him to
slay Regin, appropriate the gold, eat the heart and drink the blood of
the dragon; and as this advice entirely coincided with his own
wishes, he lost no time in executing it. A small portion of Fafnir’s
heart was reserved for future consumption, ere he wandered off in
search of the mighty hoard. Then, after donning the Helmet of
Dread, the hauberk of gold, and the ring Andvaranaut, and loading
Greyfell with as much ruddy gold as he could carry, Sigurd sprang on
his horse, listening eagerly to the birds’ songs to know what he had
best undertake next.
Soon he heard them sing of a warrior maiden fast asleep on a
The sleeping mountain and all surrounded by a glittering barrier of
warrior flames; through which only the bravest of men could
maiden.
pass in order to arouse her.

“On the fell I know


A warrior maid to sleep;
Over her waves
The linden’s bane:
Ygg whilom stuck
A sleep-thorn in the robe
Of the maid who
Would heroes choose.”
Lay of Fafnir (Thorpe’s tr.).
After riding for a long while through trackless regions, Sigurd at
last came to the Hindarfiall in Frankland, a tall mountain whose
cloud-wreathed summit seemed circled by fiery flames.

“Long Sigurd rideth the waste, when, lo! on a morning of day,


From out of the tangled crag walls, amidst the cloudland gray,
Comes up a mighty mountain, and it is as though there burns
A torch amidst of its cloud wreath; so thither Sigurd turns,
For he deems indeed from its topmost to look on the best of the
earth;
And Greyfell neigheth beneath him, and his heart is full of mirth.”

Riding straight up this mountain, he saw the light grow more


and more vivid, and soon a barrier of lurid flames stood before him;
but although the fire crackled and roared, it could not daunt our
hero, who plunged bravely into its very midst.
“Now Sigurd turns in his saddle, and the hilt of the Wrath he shifts,
And draws a girth the tighter; then the gathered reins he lifts,
And crieth aloud to Greyfell, and rides at the wildfire’s heart;
But the white wall wavers before him and the flame-flood rusheth
apart,
And high o’er his head it riseth, and wide and wild its roar
As it beareth the mighty tidings to the very heavenly floor:
But he rideth through its roaring as the warrior rides the rye,
When it bows with the wind of the summer and the hid spears draw
anigh;
The white flame licks his raiment and sweeps through Greyfell’s
mane,
And bathes both hands of Sigurd and the hilt of Fafnir’s bane,
And winds about his war-helm and mingles with his hair,
But naught his raiment dusketh or dims his glittering gear;
Then it fails and fades and darkens till all seems left behind,
And dawn and the blaze is swallowed in mid-mirk stark and blind.”

No sooner had Sigurd thus fearlessly sprung into the very heart
of the flames than the fire flickered and died out, leaving nothing
but a broad circle of white ashes, through which he rode until he
came to a great castle, with shield-hung walls, in which he
penetrated unchallenged, for the gates were wide open and no
warders or men at arms were to be seen. Proceeding cautiously, for
he feared some snare, Sigurd at last came to the center of the
inclosure, where he saw a recumbent form all cased in armor. To
remove the helmet was but a moment’s work, but Sigurd started
back in surprise when he beheld, instead of a warrior, the sleeping
face of a most beautiful woman.
All his efforts to awaken her were quite vain, however, until he
had cut the armor off her body, and she lay before him in pure-white
linen garments, her long golden hair rippling and waving around her.
As the last fastening of her armor gave way, she opened wide her
beautiful eyes, gazed in rapture upon the rising sun, and after

You might also like