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

Digital Image Processing A Signal Processing and Algorithmic Approach 1st Edition D. Sundararajan (Auth.) download

The document is a promotional text for the book 'Digital Image Processing: A Signal Processing and Algorithmic Approach' by D. Sundararajan, which covers the fundamentals of digital image processing using a signal processing and algorithmic approach. It is intended for senior undergraduate and graduate students in engineering and computer science, providing mathematical theory, algorithms, and practical examples. The book also includes supplementary MATLAB programs and is suitable for self-study and reference for professionals in the field.

Uploaded by

capelquantn2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
5 views

Digital Image Processing A Signal Processing and Algorithmic Approach 1st Edition D. Sundararajan (Auth.) download

The document is a promotional text for the book 'Digital Image Processing: A Signal Processing and Algorithmic Approach' by D. Sundararajan, which covers the fundamentals of digital image processing using a signal processing and algorithmic approach. It is intended for senior undergraduate and graduate students in engineering and computer science, providing mathematical theory, algorithms, and practical examples. The book also includes supplementary MATLAB programs and is suitable for self-study and reference for professionals in the field.

Uploaded by

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

Digital Image Processing A Signal Processing and

Algorithmic Approach 1st Edition D. Sundararajan


(Auth.) download

https://textbookfull.com/product/digital-image-processing-a-
signal-processing-and-algorithmic-approach-1st-edition-d-
sundararajan-auth/

Download more ebook from https://textbookfull.com


We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!

Digital Image Processing Practical Approach Borko Furht

https://textbookfull.com/product/digital-image-processing-
practical-approach-borko-furht/

From Algebraic Structures to Tensors Digital Signal and


Image Processing Matrices and Tensors in Signal
Processing Set 1st Edition Gérard Favier (Editor)

https://textbookfull.com/product/from-algebraic-structures-to-
tensors-digital-signal-and-image-processing-matrices-and-tensors-
in-signal-processing-set-1st-edition-gerard-favier-editor/

Digital Image Watermarking: Theoretical and


Computational Advances (Intelligent Signal Processing
and Data Analysis) 1st Edition Borra

https://textbookfull.com/product/digital-image-watermarking-
theoretical-and-computational-advances-intelligent-signal-
processing-and-data-analysis-1st-edition-borra/

Conceptual Digital Signal Processing with MATLAB


Keonwook Kim

https://textbookfull.com/product/conceptual-digital-signal-
processing-with-matlab-keonwook-kim/
Digital Signal Processing-A Primer With MATLAB® 1st
Edition Samir I. Abood (Author)

https://textbookfull.com/product/digital-signal-processing-a-
primer-with-matlab-1st-edition-samir-i-abood-author/

Methods and techniques for fire detection : signal,


image and video processing perspectives 1st Edition
Çetin

https://textbookfull.com/product/methods-and-techniques-for-fire-
detection-signal-image-and-video-processing-perspectives-1st-
edition-cetin/

Think DSP Digital Signal Processing in Python 1st


Edition Allen B. Downey

https://textbookfull.com/product/think-dsp-digital-signal-
processing-in-python-1st-edition-allen-b-downey/

Smartphone based real time digital signal processing


Third Edition Abhishek Sehgal

https://textbookfull.com/product/smartphone-based-real-time-
digital-signal-processing-third-edition-abhishek-sehgal/

Digital Image Enhancement Restoration and Compression


Digital Image Processing and Analysis for True Epub
Scott E Umbaugh

https://textbookfull.com/product/digital-image-enhancement-
restoration-and-compression-digital-image-processing-and-
analysis-for-true-epub-scott-e-umbaugh/
D. Sundararajan

Digital Image
Processing
A Signal Processing
and Algorithmic Approach
Digital Image Processing
D. Sundararajan

Digital Image Processing


A Signal Processing and Algorithmic
Approach

123
D. Sundararajan
Formerly at Concordia University
Montreal
Canada

Additional material to this book can be downloaded from http://extras.springer.com.


ISBN 978-981-10-6112-7 ISBN 978-981-10-6113-4 (eBook)
DOI 10.1007/978-981-10-6113-4
Library of Congress Control Number: 2017950001

© Springer Nature Singapore Pte Ltd. 2017


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part
of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission
or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this
publication does not imply, even in the absence of a specific statement, that such names are exempt from
the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this
book are believed to be true and accurate at the date of publication. Neither the publisher nor the
authors or the editors give a warranty, express or implied, with respect to the material contained herein or
for any errors or omissions that may have been made. The publisher remains neutral with regard to
jurisdictional claims in published maps and institutional affiliations.

Printed on acid-free paper

This Springer imprint is published by Springer Nature


The registered company is Springer Nature Singapore Pte Ltd.
The registered company address is: 152 Beach Road, #21-01/04 Gateway East, Singapore 189721, Singapore
Preface

Vision is one of our strongest senses. The amount of information conveyed through
pictures over the Internet and other media is enormous. Therefore, the field of
image processing is of great interest and rapidly growing. Availability of fast digital
computers and numerical algorithms accelerates this growth. In this book, the
basics of Digital Image Processing is presented, using a signal processing and
algorithmic approach. The image is a two-dimensional signal, and most processing
requires algorithms. Plenty of examples, figures, tables, programs, and physical
explanations make it easy for the reader to get a good grounding in the basics of the
subject, able to progress to higher levels, and solve practical problems.
The application of image processing is important in several areas of science and
engineering. Therefore, Digital Image Processing is a field of study for engineers
and computer science professionals. This book includes mathematical theory, basic
algorithms, and numerical examples. Thereby, engineers and professionals can
quickly develop algorithms and find solutions to image processing problems
of their interest using computers. In general, there is no formula for solving prac-
tical problems. Invariably, an algorithm has to be developed and used to find the
solution. While every solution is a combination of the basic principles, several
combinations are possible for solving the same problem. Out of these possibilities,
one has to come with the right solution. This requires some trial-and-error process.
A good understanding of the basic principles, knowledge of the characteristics
of the image data involved, and practical experience are likely to lead to an efficient
solution.
This book is intended to be a textbook for senior undergraduate- and
graduate-level Digital Image Processing courses in engineering and computer
science departments and a supplementary textbook for application courses such as
remote sensing, machine vision, and medical analysis. For image processing pro-
fessionals, this book will be useful for self-study. In addition, this book will be a
reference for anyone, student or professional, specializing in image processing. The
prerequisite for reading this book is a good knowledge of calculus, linear algebra,
one-dimensional digital signal processing, and programming at the undergraduate
level.

v
vi Preface

Programming is an important component in learning and practicing this subject.


A set of MATLAB® programs are available at the Web site of the book. While the
use of a software package is inevitable in most applications, it is better to use the
software in addition to self-developed programs. The effective use of a software
package or to develop own programs requires a good grounding in the basic
principles of the subject. Answers to selected exercises marked  are given at the
end of the book. A Solutions Manual and slides are available for instructors at the
Web site of the book.
I assume the responsibility for all the errors in this book and would very
much appreciate receiving readers’ suggestions and pointing out any errors
(email:[email protected]). I am grateful to my Editor and the rest of the
team at Springer for their help and encouragement in completing this project.
I thank my family for their support during this endeavor.

D. Sundararajan
About the Book

This book “Digital Image Processing—A Signal Processing and Algorithmic


Approach” deals with the fundamentals of Digital Image Processing, a topic of
great interest in science and engineering. Digital Image Processing is processing of
images using digital devices after they are converted to a 2-D matrix of numbers.
While the basic principles of the subject are those of signal processing, the appli-
cations require extensive use of algorithms. In order to meet these requirements, the
book presents the mathematical theory along with numerical examples with 4  4
and 8  8 subimages. The presentation of the mathematical aspects has been greatly
simplified with sufficient detail. Emphasis is given for physical explanation of the
mathematical concepts, which will result in deeper understanding and easier
comprehension of the subject. Further, the corresponding MATLAB codes are
given as supplementary material. The book is primarily intended as a textbook for
an introductory Digital Image Processing course at senior undergraduate and
graduate levels in engineering and computer science departments. Further, it can be
used as a reference by students and practitioners of Digital Image Processing.

vii
Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Image Acquisition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Digital Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Representation in the Spatial Domain . . . . . . . . . . . . . . 3
1.2.2 Representation in the Frequency Domain . . . . . . . . . . . 6
1.3 Quantization and Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.1 Quantization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.2 Spatial Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.3 Sampling and Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3.4 Image Reconstruction and the Moiré Effect . . . . . . . . . . 15
1.4 Applications of Digital Image Processing . . . . . . . . . . . . . . . . . . 16
1.5 The Organization of This Book . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2 Image Enhancement in the Spatial Domain . . . . . . . . . . . . . . . . . . . 23
2.1 Point Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.1.1 Image Complement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.1.2 Gamma Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.2 Histogram Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.2.1 Contrast Stretching . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.2.2 Histogram Equalization . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.2.3 Histogram Specification . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.3 Thresholding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
2.4 Neighborhood Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.4.1 Linear Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.4.2 Median Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

ix
x Contents

3 Fourier Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.1 The 1-D Discrete Fourier Transform . . . . . . . . . . . . . . . . . . . . . . 66
3.2 The 2-D Discrete Fourier Transform . . . . . . . . . . . . . . . . . . . . . . 75
3.3 DFT Representation of Images . . . . . . . . . . . . . . . . . . . . . . . . . . 76
3.4 Computation of the 2-D DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
3.5 Properties of the 2-D DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.6 The 1-D Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
3.7 The 2-D Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
3.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4 Image Enhancement in the Frequency Domain. . . . . . . . . . . . . . . . . 109
4.1 1-D Linear Convolution Using the DFT . . . . . . . . . . . . . . . . . . . 110
4.2 2-D Linear Convolution Using the DFT . . . . . . . . . . . . . . . . . . . 111
4.3 Lowpass Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4.3.1 The Averaging Lowpass Filter . . . . . . . . . . . . . . . . . . . 112
4.3.2 The Gaussian Lowpass Filter . . . . . . . . . . . . . . . . . . . . . 117
4.4 The Laplacian Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
4.4.1 Amplitude and Phase Distortions . . . . . . . . . . . . . . . . . . 124
4.5 Frequency-Domain Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
4.5.1 Ideal Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
4.5.2 The Butterworth Lowpass Filter . . . . . . . . . . . . . . . . . . 129
4.5.3 The Butterworth Highpass Filter . . . . . . . . . . . . . . . . . . 132
4.5.4 The Gaussian Lowpass Filter . . . . . . . . . . . . . . . . . . . . . 134
4.5.5 The Gaussian Highpass Filter . . . . . . . . . . . . . . . . . . . . 134
4.5.6 Bandpass and Bandreject Filtering. . . . . . . . . . . . . . . . . 134
4.6 Homomorphic Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
4.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
5 Image Restoration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
5.1 The Image Restoration Process . . . . . . . . . . . . . . . . . . . . . . . . . . 143
5.2 Inverse Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
5.3 Wiener Filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
5.3.1 The 2-D Wiener Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 150
5.4 Image Degradation Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
5.5 Characterization of the Noise and Its Reduction . . . . . . . . . . . . . 154
5.5.1 Uniform Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
5.5.2 Gaussian Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
5.5.3 Periodic Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
5.5.4 Noise Reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
5.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Contents xi

6 Geometric Transformations and Image Registration . . . . . . . . . . . . 163


6.1 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
6.1.1 Nearest-Neighbor Interpolation . . . . . . . . . . . . . . . . . . . 164
6.1.2 Bilinear Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
6.2 Affine Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
6.2.1 Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
6.2.2 Shear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
6.2.3 Translation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
6.2.4 Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
6.3 Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
6.3.1 1-D Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
6.3.2 2-D Correlation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
6.4 Image Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
6.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
7 Image Reconstruction from Projections . . . . . . . . . . . . . . . . . . . . . . . 189
7.1 The Normal Form of a Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
7.2 The Radon Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
7.2.1 Properties of the Radon Transform . . . . . . . . . . . . . . . . 196
7.2.2 The Discrete Approximation of the Radon
Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
7.2.3 The Fourier-Slice Theorem . . . . . . . . . . . . . . . . . . . . . . 202
7.2.4 Reconstruction with Filtered Back-projections . . . . . . . . 206
7.3 Hough Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
7.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
8 Morphological Image Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
8.1 Binary Morphological Operations . . . . . . . . . . . . . . . . . . . . . . . . 218
8.1.1 Dilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
8.1.2 Erosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
8.1.3 Opening and Closing . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
8.1.4 Hit-and-Miss Transformation . . . . . . . . . . . . . . . . . . . . . 229
8.1.5 Morphological Filtering . . . . . . . . . . . . . . . . . . . . . . . . . 231
8.2 Binary Morphological Algorithms . . . . . . . . . . . . . . . . . . . . . . . 233
8.2.1 Thinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
8.2.2 Thickening. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
8.2.3 Noise Removal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
8.2.4 Skeletons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
8.2.5 Fill. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
8.2.6 Boundary Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
8.2.7 Region Filling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
8.2.8 Extraction of Connected Components . . . . . . . . . . . . . . 244
xii Contents

8.2.9 Convex Hull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244


8.2.10 Pruning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
8.3 Grayscale Morphology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
8.3.1 Dilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
8.3.2 Erosion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
8.3.3 Opening and Closing . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
8.3.4 Top-Hat and Bottom-Hat Transformations . . . . . . . . . . . 249
8.3.5 Morphological Gradient . . . . . . . . . . . . . . . . . . . . . . . . . 250
8.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
9 Edge Detection . . . . . . . . . . . . . . . . . . . . . . ................. . . . . 257
9.1 Edge Detection . . . . . . . . . . . . . . . . . ................. . . . . 257
9.1.1 Edge Detection by Compass Gradient Operators . . . . . . 264
9.2 Canny Edge Detection Algorithm . . . ................. . . . . 266
9.3 Laplacian of Gaussian. . . . . . . . . . . . ................. . . . . 273
9.4 Summary . . . . . . . . . . . . . . . . . . . . . ................. . . . . 278
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . ................. . . . . 278
10 Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
10.1 Edge-Based Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
10.1.1 Point Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
10.1.2 Line Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
10.2 Threshold-Based Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . 284
10.2.1 Thresholding by Otsu’s Method . . . . . . . . . . . . . . . . . . 286
10.3 Region-Based Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
10.3.1 Region Growing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
10.3.2 Region Splitting and Merging . . . . . . . . . . . . . . . . . . . . 293
10.4 Watershed Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
10.4.1 The Distance Transform . . . . . . . . . . . . . . . . . . . . . . . . 295
10.4.2 The Watershed Algorithm . . . . . . . . . . . . . . . . . . . . . . . 300
10.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
11 Object Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
11.1 Boundary Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
11.1.1 Chain Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
11.1.2 Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
11.1.3 Fourier Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
11.2 Regional Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
11.2.1 Geometrical Features . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
11.2.2 Moments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
11.2.3 Textural Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Contents xiii

11.3 Principal Component Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 334


11.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
12 Object Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
12.1 The k-Nearest Neighbors Classifier . . . . . . . . . . . . . . . . . . . . . . . 345
12.2 The Minimum-Distance-to-Mean Classifier . . . . . . . . . . . . . . . . . 347
12.2.1 Decision-Theoretic Methods . . . . . . . . . . . . . . . . . . . . . 349
12.3 Decision Tree Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
12.4 Bayesian Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
12.5 k-Means Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
12.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
13 Image Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
13.1 Lossless Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
13.1.1 Huffman Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
13.1.2 Run-Length Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . 368
13.1.3 Lossless Predictive Coding . . . . . . . . . . . . . . . . . . . . . . 369
13.1.4 Arithmetic Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
13.2 Transform-Domain Compression . . . . . . . . . . . . . . . . . . . . . . . . 382
13.2.1 The Discrete Wavelet Transform . . . . . . . . . . . . . . . . . . 383
13.2.2 Haar 2-D DWT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
13.2.3 Image Compression with Haar Filters . . . . . . . . . . . . . . 389
13.3 Image Compression with Biorthogonal Filters . . . . . . . . . . . . . . 391
13.3.1 CDF 9/7 Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
13.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
14 Color Image Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
14.1 Color Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
14.1.1 The RGB Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
14.1.2 The XYZ Color Model . . . . . . . . . . . . . . . . . . . . . . . . . 412
14.1.3 The CMY and CMYK Color Models . . . . . . . . . . . . . . 412
14.1.4 The HSI Color Model . . . . . . . . . . . . . . . . . . . . . . . . . . 414
14.1.5 The NTSC Color Model . . . . . . . . . . . . . . . . . . . . . . . . 419
14.1.6 The YCbCr Color Model. . . . . . . . . . . . . . . . . . . . . . . . 420
14.2 Pseudocoloring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
14.2.1 Intensity Slicing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
14.3 Color Image Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
14.3.1 Image Complement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
14.3.2 Contrast Enhancement . . . . . . . . . . . . . . . . . . . . . . . . . . 426
14.3.3 Lowpass Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
14.3.4 Highpass Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
14.3.5 Median Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
xiv Contents

14.3.6 Edge Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429


14.3.7 Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
14.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Appendix A: Computation of the DFT . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Answers to Selected Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
About the Author

D. Sundararajan is a full-time author in signal processing and related areas. In


addition, he conducts workshops on image processing, MATLAB, and LATEX. He
was formerly associated with Concordia University, Montreal, Canada, and other
universities and colleges in India and Singapore. He holds a M.Tech. degree in
Electrical Engineering from Indian Institute of Technology, Chennai, India, and a
Ph.D. degree in Electrical Engineering from Concordia university, Montreal,
Canada. His specialization is in signal and image processing. He holds a US, a
Canadian, and a British Patent related to discrete Fourier transform algorithms. He
has written four books, the latest being “Discrete wavelet transform, a signal pro-
cessing approach” published by John Wiley (2015). He has published papers in
IEEE transactions and conferences. He has also worked in research laboratories in
India, Singapore, and Canada.

xv
Abbreviations

1-D One-dimensional
2-D Two-dimensional
3-D Three-dimensional
bpp Bits per pixel
DC Sinusoid with frequency zero, constant
DFT Discrete Fourier transform
DWT Discrete wavelet transform
FIR Finite impulse response
FT Fourier transform
IDFT Inverse discrete Fourier transform
IDWT Inverse discrete wavelet transform
IFT Inverse Fourier transform
LoG Laplacian of Gaussian
LSB Least significant bit
MSB Most significant bit
PCA Principal component analysis
SNR Signal-to-noise ratio

xvii
Chapter 1
Introduction

Abstract The image of a scene or object is inherently a continuous two-dimensional


signal. Due to the advantages of digital systems, this type of image has to be con-
verted into a discrete signal. This change in form requires sampling and quantization.
The characteristics of a digital image and its spatial- and frequency-domain repre-
sentations are introduced. The sampling and quantization operations are described.

Most of the information received by humans is visual. A picture is a 2-D visual


representation of a 3-D scene. A picture is worth a thousand words. That is, a certain
amount of information can be quickly and effectively conveyed by a picture. It is
obvious from the popularity of the film medium, Internet, and digital cameras. Digital
image processing is the processing of images using digital computers and is used in
many applications of science and engineering. It is implied that natural images are
converted to digital form prior to processing.
While an image is a 2-D signal, a considerable amount of its processing is carried
out in one dimension (row by row and column by column). Therefore, we start with 1-
D signals. An example of a one-dimensional (1-D) signal is x(t) = sin(t). x(t) is the
amplitude of the signal at t, the independent variable. Variable t is usually associated
with continuous time. As most of the practical signals are of continuous type and
digital signal processing is advantageous, the signal is sampled and quantized. A
1-D discrete signal is usually specified as x(n), where the independent variable n
is an integer. The sampling interval Ts is usually suppressed. A discrete image is
a two-dimensional (2-D) signal, x(m, n), where m and n are the two independent
variables. The amplitude of the image x(m, n) at each point is called the pixel value.
Pixel stands for picture element. The three major goals of digital image processing
are: (i) to improve the quality of the image for human perception, (ii) to improve the
quality and represent the image suitable for automatic machine perception, and (iii)
to compress the image so that the storage and transmission requirements are reduced.
The requirements for human and machine perceptions are, in general, different. These
tasks are carried out by computers after the picture is represented in a numeric form.
The use of digital cameras, which directly produce digital images, is in prevalent
use. Scanners are available to digitize analog photographs. With some exceptions,
the processing of an image, which is a 2-D signal, is a straightforward extension of

© Springer Nature Singapore Pte Ltd. 2017 1


D. Sundararajan, Digital Image Processing, DOI 10.1007/978-981-10-6113-4_1
2 1 Introduction

Table 1.1 Electromagnetic spectrum


Cosmic Gamma X-rays Ultra Visible Infra-red Microwaves TV Radio
rays rays violet spectrum

that of 1-D signals. For example, with a good knowledge of important operations
such as sampling, convolution, and Fourier analysis of 1-D signals, one can easily
adapt to their extension for 2-D signals.
An image is some form of a picture giving a visual representation of a scene or
an object for human or machine perception. Light is an electromagnetic radiation
that can produce visual sensation. Photon is a quantum of electromagnetic radiation.
Photons travel at the speed of light. The wavelength of the electromagnetic spectrum
varies from λ = 10−12 to 103 m. Components of the electromagnetic spectrum are
shown in Table 1.1. Frequency f in Hz and wavelength λ in meters are related by
the expression
(2.998)108
f =
λ
High-frequency photons carry more energy than the low-frequency photons. That
small part of the spectrum from λ = (0.43)10−6 to (0.79)10−6 m, which is visible
for human beings, is called the visible spectrum.
The invisible part of the spectrum is also of interest in image processing, since it
can be sensed by machines (e.g., X-ray is important in the medical field). As in the case
of most naturally occurring signals, an image is also a continuous signal inherently.
This signal has to be sampled and quantized to make it a digital image. Except
that there are two frequency components in two directions to be considered, the
sampling is governed by the 1-D sampling theorem. Both sampling and quantization
are constrained by the two contradicting criteria, accuracy and processing time.
Each point in an image corresponds to a small part of the scene making the
image. The brightness of the light received by an observer from a scene varies as
the reflectivity of the objects composing the scene and the illumination vary. This
type, which is most common, is called a reflection image. Another type, called the
emission image, is obtained from self-luminous objects such as stars or lights. A third
type, called the absorption image, is the result of radiation passing through objects.
The variation of the attenuation of the intensity of radiation (such as X-ray) recorded
by a film is the image. While camera produces most of the images, images are also
formed by other sensors such as infrared and ultrasonic. Irrespective of the source,
the processing of images involves the same basic principles.

1.1 Image Acquisition

The visual information is a function of two independent variables. It is a 2-D signal.


Nowadays, digital cameras produce digital images. These cameras use some type of
array of photosensitive devices to produce electrical signals proportional to the scene
1.1 Image Acquisition 3

brightness over small patches of a scene. The incident light on these devices create
charge carriers (holes and electrons), and a voltage applied across the device causes
the conduction of current. The potential difference across a resistor in the path of this
current is proportional to the average intensity of the light received by the device. The
resulting voltages of the array represent the scene being captured as an image. The
set of analog signals is converted to a digital image by an interface, called the frame
grabber. This interface is a constituent part of digital cameras, and the digital image
is delivered in a standard format through an interface to the computer. Of course, it
is understood that the sampling and quantization resolutions are set as required, at
the time of taking the picture. Invariably, the digital image requires some processing
either to enhance it with respect to some criteria and/or to extract useful information
for various applications. That is digital image processing. In this chapter, we study
the form and characteristics of the digital image.

1.2 Digital Image

While a scene is typically three dimensional, it is represented in two dimensions in


the image. In digital image processing, an image is represented as a 2-D matrix of
numbers. A M × N image with M rows and N columns is given by

n→
m⎡ x(0, 0) x(0, 1) x(0, 2) . . .
x(0, N − 1)

↓⎢ x(1, 0) x(1, 1) x(1, N − 1) ⎥
x(1, 2) . . .
x(m, n) = ⎢ ⎥
⎢ .. ⎥
⎣ . ⎦
x(M − 1, 0) x(M − 1, 1) x(M − 1, 2) . . . x(M − 1, N − 1)

With reference to the image, the pixel (picture element) located at (m, n) is with
value x(m, n). The image coordinates are m and n, and x(m, n) is proportional to
the brightness of the scene about that point. This domain of representation is called
the spatial domain, similar to the representation of a 1-D discrete signal in the time
domain. While the top-left corner is the origin in most cases, sometimes we also use
the bottom-left corner as the origin.

1.2.1 Representation in the Spatial Domain

An image is usually represented in the spatial domain by three forms. A 1-D signal,
such as the sine waveform y(t) = sin(t), is a curve, and we are familiar with
its representation in a figure with t represented by the x-axis and y(t) = sin(t)
represented by the y-axis. The independent variable is t and y(t) is the dependent
variable because the values of y(t) depend on the values of t. While a 1-D signal is a
4 1 Introduction

(a) (b)
255
50

100

x(m,n)
m

150

0
200
200
200
250 100
100
50 100 150 200 250
m 0 0 n
n

Fig. 1.1 a A 256 × 256 image with 256 gray levels; b its amplitude profile

(a) (b)

50 50

100 100
m

150 150

200 200

250 250
50 100 150 200 250 50 100 150 200 250
n n

Fig. 1.2 a A 256 × 256 image with its intensity values increasing, for each row, from 0 to 255; b
A 256 × 256 synthetic image with 256 gray levels

curve, a 2-D signal is a surface. Therefore, an image x(m, n) can be represented as a


surface with the m- and n-axes fixing the two coordinates and a third axis fixing its
amplitude. Figure 1.1a shows a 256 × 256 image with 256 gray levels and (b) shows
its amplitude profile. While the amplitude profile is mostly used to represent 1-D
signals, images are mostly represented using the intensity of its pixels.
Figure 1.1a is the representation of an image by the intensity (gray level) values
of its pixels. In a monochromatic or gray-level image, typically, a byte of storage is
used to represent the pixel value. With 8 bits, the pixel values are integers from 0 to
255. Figure 1.2a shows a 256 × 256 image in which the intensity values, for each
row, are increasing from 0 to 255. The value of all the pixels in the first row is 0,
those of the second row is 1, and so on. The value of all the pixels in the bottom
1.2 Digital Image 5

Table 1.2 Pixel values of a 8 × 8 subimage


173 185 189 186 199 195 195 192
177 187 189 192 197 195 189 177
188 190 196 197 199 193 171 124
191 192 197 198 192 158 111 110
196 199 99 189 149 108 110 113
202 200 182 130 100 98 108 114
204 178 117 85 100 96 104 108
173 100 85 87 95 98 96 100

row is 255. Starting from black in the top, the image gradually becomes white at the
bottom. Typically, zero is black and the maximum value is white. The value of all the
white pixels is set to 255, and the value of the black ones is set to zero. The values
between zero and the maximum value are shades of gray (a color between white and
black).
A simple image is shown in Fig. 1.2b, which is composed of three squares, with
various gray levels, in a black background. This is a synthetic image. This type of
images is useful for algorithm design, development, debugging, and verification,
since their values and the output of the algorithms are easily predictable. The image
has 256 rows of pixels, and each row is made up of 256 pixels with the gray level
varying from 0 to 255. The gray-level values of the three squares, from top to bottom,
are 84, 168, and 255, respectively.
Another representation of an image is by the numerical values of its intensity, as
shown in Table 1.2. While it is impossible to represent a large image in this form,
it is, in addition to synthetic images, extremely useful in algorithm development,
debugging, and verification (which is a major task in image processing applications)
with subimages typically of sizes 4 × 4 and 8 × 8.
In a color image, each pixel is vector-valued. Typically, a color pixel requires
24 bits of storage. A color image is a combination of images with basis colors. For
example, a color image is composed of its red, green, and blue components. If each
component is represented with 8 bits, then a color pixel requires 24 bits. While most
of the natural images are color images, the processing of gray-level images is given
importance because its processing can be easily extended to color images in most
cases and gray-level images contain essential information of the image. In a binary
image, a pixel value is stored in a bit, 0 or 1. Typical binary images contain text,
architectural plans, and fingerprints.
When operations, such as transforms, are carried out on images, the resulting
images may have widely varying amplitude range and precision. In such cases,
quantization is required. More often, images are square and typical sizes vary from
256 × 256 to 4096 × 4096. The numbers are usually a power of 2. Image processing
operations are easier with these numbers. For example, in order to reduce the size of
6 1 Introduction

an image to one-half, we simply discard alternate pixels. The all-important Fourier


analysis is carried out, in practice, with these numbers.
Some examples of the requirement of storage for images are:
(i) 512 × 512 binary image,

512 × 512 × 1 = 262144 bits = 32768 bytes

(ii) 512 × 512 8-bit gray-level image,

512 × 512 × 1 = 262144 bytes

(iii) 512 × 512 color image, with a byte of storage for each of the three color
components of a pixel,

512 × 512 × 3 = 786432 bytes

While the picture quality improves with increasing the size, the execution time of
algorithms also increases at a fast rate. Therefore, the minimum size that satisfies
the application requirements should be selected. The selection of fast algorithms is
also equally critical. Even with the modern computers, processing of images could
be slow depending on the size of the image and the complexity of the algorithm
being executed. Therefore, the minimum size, the simplest type (binary, gray-level,
or color image), and an appropriate algorithm must be carefully chosen for efficient
and economical image processing for any application.

1.2.2 Representation in the Frequency Domain

One of the major tasks in image processing is to find suitable representations of


images in other domains, in addition to the spatial domain, so that the processing
becomes easier and efficient, as is the case in 1-D signal processing. The suitable
representation invariably requires taking the transform of the image. Transforms
approximate practical images, which usually have arbitrary amplitude profiles, as a
weighted sum of a finite set of well-defined basis functions with adequate accuracy.
There are many transforms used in image processing, and each one has a different
set of basis functions and is suitable for some tasks. The most important of all the
transforms is the Fourier transform. Sinusoidal curves are the Fourier basis func-
tions for 1-D signals, and sinusoidal surfaces, such as that shown in Fig. 1.3, are the
Fourier basis functions for 2-D signals (images). In a transformed form, important
characteristics of the images, such as their frequency content, can be estimated. The
interpretation of operations, such as filtering of images, becomes easier. Further, the
computational complexity of operations and storage requirements are also reduced
in most cases.
1.3 Quantization and Sampling 7

Fig. 1.3 A 64 × 64
sinusoidal surface, which is a
typical basis function in the
2-D Fourier transform 200
representation of images

x(m,n)
0

−200

60
40 60
40
20
20
m 0 0 n

1.3 Quantization and Sampling

Sampling is required due to limited spatial and temporal resolutions (number of


pixels) of a digital image. Quantization is required due to limited intensity resolution
(wordlength). A pixel value, typically, is the integral of the image intensity over a
finite area. As most practical signals are continuous functions of continuous variables,
both sampling and quantization are required to get a digital signal so that they can
be processed by a digital computer. Sampling is converting a continuous function
into a discrete one. The values of a sampled function are known only at the discrete
values of its independent variable. Quantization is converting a continuous variable
into a discrete one. The values of a quantized variable are fixed at discrete intervals.
Consider one period of the continuous sinusoidal signal

2π π
x(t) = cos t+
16 6

shown in Fig. 1.4. The signal is sampled with a sampling interval of 1 s. Therefore,
starting with t = 0, we get 16 samples

x(n) ={0.8660, 0.6088, 0.2588, −0.1305, −0.5000, −0.7934, −0.9659, −0.9914,


− 0.8660, −0.6088, −0.2588, 0.1305, 0.5000, 0.7934, 0.9659, 0.9914}

These samples are further quantized with a quantization step of 0.2. That is, each
sample value is restricted to one of the finite set of values

{1, 0.8, 0.6, 0.4, 0.2, 0, −0.2, −0.4, −0.6, −0.8, −1}
8 1 Introduction

Fig. 1.4 Sampling and 1


quantizing a 1-D signal
0.8
0.6 quantized
actual
0.4
0.2

x(t)
0
−0.2
−0.4
−0.6
−0.8
−1
0 4 8 12
t

Each sample is assigned to the nearest allowed value. The samples of the sampled
and quantized signal are

xq (n) ={0.8, 0.6, 0.2, −0.2, −0.6, −0.8, −1.0, −1.0, −0.8, −0.6,
− 0.2, 0.2, 0.6, 0.8, 1.0, 1.0}

shown by dots in Fig. 1.4. The actual sample values are shown by crosses. Maximum
error is one-half of the quantization step. Both sampling and quantization operations
introduce errors in the representation of a signal. According to the sampling theorem,
the sampling frequency has to be more than twice that of the highest frequency content
of the signal. The quantization step should be selected so that the quantization noise
is within acceptable limit.

1.3.1 Quantization

Quantization is the process of mapping the amplitude of a continuous variable into a


set of finite discrete values. For a digital representation, the pixel values of an image
have to be quantized to some finite levels so that the image can be stored using a
finite number of bits. Typically, 8 bits are used to represent a pixel value. Figure 1.5
shows the effect of quantization of the pixel values, using 8, 7, 6, 5, 4, 3, 2, and 1 bits.
Reducing the number of bits reduces the number of gray levels and, in turn, reduces
the contrast of the image. The deterioration in quality is not noticeable upto 6 bits of
representation. From 5 bits onward, grayscale contouring effect is noticeable. False
edges appear when the gradually changing pixel values in a region of the image are
replaced by a single value. Due to the lower quantization levels, edges are created
between adjacent regions. As the use of 6 or 7 bits does not save much and the
8-bit (byte) wordlength is in popular use in the computer architectures, the 8-bit
representation is most often used.
1.3 Quantization and Sampling 9

Fig. 1.5 Representations of 8 7


an image using 8, 7, 6, 5, 4,
3, 2, and 1 bits

6 5

4 3

2 1
10 1 Introduction

Fig. 1.6 Bit-plane bit−plane 7:MSB bit−plane 6


representations of an image

bit−plane 5 bit−plane 4

bit−plane 3 bit−plane 2

bit−plane 1 bit−plane 0:LSB


1.3 Quantization and Sampling 11

The relative influence of the various bits in the formation of the image is shown in
Fig. 1.6. A gray-level image can be decomposed into a set of binary images, which
is useful in applications such as compression. The last image corresponds to the
least significant bit. It looks like an image generated by a set of random numbers,
and it is difficult to relate it to the original image. Higher-order bits carry more
information. As expected, the most significant bit carries most information and the
corresponding image (the first) resembles like its original. The bit-plane images can
be isolated from the grayscale images by repeatedly dividing the image matrix by
successive powers of 2 and taking the remainder of dividing the truncated quotient by
2. For example, let x = {0, 1, 2, 3, 4, 5}. Dividing x by 2 and taking the remainders,
we get x0 = {0, 1, 0, 1, 0, 1}. Dividing x by 2 and taking the truncated quotients,
we get x2q = {0, 0, 1, 1, 2, 2}. Dividing x2q by 2 and taking the remainders, we
get x1 = {0, 0, 1, 1, 0, 0}. Dividing x by 4 and taking the truncated quotients, we
get x4q = {0, 0, 0, 0, 1, 1}. Dividing x4q by 2 and taking the remainders, we get
x2 = {0, 0, 0, 0, 1, 1}. Note that 20 x0 + 21 x1 + 22 x2 = x. The 4 × 4 4-bit image
x(m, n) and its bit-plane components from MSB to LSB are
⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤
8 1 7 3 100 0 0 0 1 0 001 1 011 1
⎢1 11 15 12 ⎥ ⎢0 1 1 1⎥ ⎢0 0 1 1⎥ ⎢0 1 1 0⎥ ⎢1 1 1 0⎥
⎢ ⎥=2 ⎢
3 ⎥+2 ⎢
2 ⎥+2⎢ ⎥+⎢ ⎥
⎣0 11 7 13 ⎦ ⎣0 1 0 1⎦ ⎣0 0 1 1⎦ ⎣0 1 1 0⎦ ⎣0 1 1 1⎦
2 10 9 6 011 0 0 0 0 1 110 1 001 0

Quantization levels with equal intervals is called linear quantization. In nonlinear


quantization, the range of the frequently occurring pixels is quantized using more bits
and vice versa. The average error due to quantization is reduced without increasing
the number of bits. This type of quantization is often used in image compression.
It should be noted that, while sampling and quantization are necessary to get the
advantages of digital image processing, the image is corrupted to some extent due
to the quantization noise and the aliasing effect. It should be ensured that image
quality is within acceptable limits by proper selection of the sampling interval and
the quantization levels. In general, a rapidly varying scene requires a higher sampling
rate and fewer quantization levels and vice versa. A 256 × 256 image with 64 gray
levels is typically the minimum for most practical purposes.

1.3.2 Spatial Resolution

An image represents an object of a certain area. The spatial resolution is the physical
area of the object represented by a pixel. The resolution varies from nanometers in
microscopic images to kilometers in satellite images. The number of independent
pixel values per unit distance (pixel density) indicates the spatial resolution. A higher
number of pixels improves the ability to see finer details of an object in the image. For
example, the resolution of a digital image of size 512 × 512 formed from an analog
image of size 32×32 cm is 512/32 = 16 pixels per centimeter. Figure 1.7a–d shows,
12 1 Introduction

(a) (b)

64 32

128 64

192 96

64 128 192 32 64 96

(c) (d)

16 8

32 16

48 24

16 32 48 8 16 24

Fig. 1.7 Effects of reducing the spatial resolution. a Resolution 256 × 256; b resolution 128 × 128;
c resolution 64 × 64; d resolution 32 × 32

respectively, an image with resolutions 256 × 256, 128 × 128, 64 × 64, and 32 × 32.
Reducing the spatial resolution results in blockiness of the image. The blockiness
is just noticeable in the image in (b) and clearly seen in the image in (c), while the
image in (d) becomes unrecognizable.

1.3.3 Sampling and Aliasing

When sampling a signal, the sampling frequency must be greater than twice that of
its highest frequency component in order to reconstruct the signal perfectly from
its samples. In the case of an image, there are two frequency components (horizon-
tal and vertical) to be considered. Aliasing effect is the impersonation of a higher
1.3 Quantization and Sampling 13

frequency sinusoid as a lower frequency sinusoid due to insufficient number of sam-


ples. An arbitrary sinusoid with frequency f Hz requires more than 2 f samples for
its unambiguous representation by its samples. Aliasing can be eliminated by suitable
lowpass filtering of the image and then sampling so that the bandwidth is less than
half of that of the sampling frequency. The price that is paid for eliminating aliasing
is the blurring of the image, since high-frequency components, which provide the
details, are removed in lowpass filtering.
The aliasing effect is characterized by the following formulas.
 
2π 2π N
x(n) = cos (k + l N )n + φ = cos kn + φ , k = 0, 1, . . . , −1
N N 2
 
2π 2π N
x(n) = cos (l N − k)n + φ = cos kn − φ , k = 1, 2, . . . , −1
N N 2

where the number of samples N and index l are positive integers. With N even, oscil-
lations increase only upto k = N2 , decrease afterward, and cease at k = N , and this
pattern repeats indefinitely. With frequency indices higher than N2 , frequency fold-
ing occurs. Therefore, sinusoids with frequency index upto N2 can only be uniquely
identified with N samples. Frequency with index N2 is called the folding frequency.
The implication is that, with the number of samples fixed, only a limited number of
sinusoidal components can be distinctly identified. For example, with 256 samples,
the uniquely identifiable frequency components are


x(n) = cos kn + φ , k = 0, 1, . . . , 127
256

Figure 1.8a shows a 32 × 32 sinusoidal surface



2π 2π π
x(m, n) = cos 2m + 1n +
32 32 2

with frequencies 2/32 and 1/32 cycles per sample along the m and n axes, respectively.
The bottom peak of the sinusoidal surface is black, and the top peak is white. It is
clear that the surface makes 2 cycles along the m axis and one along the n axis.
Consider a 32 × 32 sinusoidal surface

2π 2π π
x(m, n) = cos 30m + 31n −
32 32 2

with frequencies 30/32 and 31/32 cycles per sample along the m and n axes, respec-
tively. Frequency with index N2 = 32 2
= 16 is called the folding frequency. The
apparent frequencies are (32 − 30)/32 = 2/32 and (32 − 31)/32 = 1/32 cycles
per sample, respectively. This sinusoidal surface also produces oscillations with the
same frequency as in Fig. 1.8a.
14 1 Introduction

(a) 0 (b) 0
4
4
8
8
12
12
16
m

m
16
20
20
24
24
28
28

0 4 8 12 16 20 24 28 0 4 8 12 16 20 24 28
n n
π
Fig. 1.8 Aliasing effect. a x(m, n) = cos( 2π
32 2m + 32 1n + 2 ) = cos( 32 30m +
2π 2π 2π
32 31n − π2 ); b
x(m, n) = cos( 32 4m + 32 7n + π) = cos( 32 28m + 32 25n − π)
2π 2π 2π 2π


2π 2π π
x(m, n) = cos 30m + 31n −
32 32 2
 
2π 2π π 2π 2π π
= cos (32 − 2)m + (32 − 1)n − = cos 2m + 1n +
32 32 2 32 32 2

Figure 1.8b shows a 32 × 32 sinusoidal surface



2π 2π
x(m, n) = cos 4m + 7n + π
32 32

with frequencies 4/32 and 7/32 cycles per sample along the m and n axes, respectively.
It is clear that the surface makes 4 cycles along the m axis and 7 along the n axis.
Consider the sinusoidal surface

2π 2π
x(m, n) = cos 28m + 25n − π
32 32
 
2π 2π 2π 2π
= cos (32 − 4)m + (32 − 7)n − π = cos 4m + 7n + π
32 32 32 32

This sinusoidal surface also produces oscillations with the same frequency as in
Fig. 1.8b. If we double the number of samples, then aliasing is avoided in these
cases.
To fix the sampling frequency for a class of real-valued images, find the Fourier
spectra of typical images using the 2-D DFT for increasing sampling frequencies.
The appropriate sampling frequency in each of the two directions is that which
yields negligible spectral magnitude values in the vicinity of one-half of the sampling
frequency.
Exploring the Variety of Random
Documents with Different Content
yet touched; he had wound therefrom a lovely garland, all crimson
and red, that throughout the day had crowned the loved one's brow.
A fire close by cast a friendly light through every crevice, so that the
humble dwelling looked warm and homely, in spite of its barren
poorness and the drear solitude upon which it stood.
Before the wide-open entry sat the mysterious maiden on an ancient
wooden chest, her much-loved violin, as always, pressed tenderly
beneath her cheek.
She played and played, and out of the darkness Fate was coming
towards her, treading with noiseless feet.... Still she played on, all
else forgotten or never even seen, tunes almost too sweet for
human ear to bear. But to-day there was something within them
resembling the sighs of a wandering soul that longs for what it
cannot reach.
Something there was that perhaps the cold night air wafted to her
sleeping soul—something that held a warning that the tides of life
were at last gradually rising to creep close to her heart, for she
suddenly laid down the faithful friend that would no more give forth
the sounds she was wont to hear.
Each time she drew the bow across its melodious chords, the notes
it uttered were like the cry of a lost spirit in dire distress.
So she sat gazing into the pitchy darkness with something unknown
and frightening, fluttering amidst the strings of her heart. And there
out of the shadows of the lonely night a human form rose and stood
beside her, with arms outstretched. Then Eric was on his knees
before her, and drew the slowly awakening maiden within the
unbounded tenderness of his yearning arms.
The whole world seemed alive with a leaping promise of coming
fulfilment.
And then, oh wonder of wonders, he laid his lips upon the heart of
the girl, the girl who would not look upon his face.
And as he did so he perceived how an indescribable light of dawning
comprehension spread slowly over all her features, and awoke like
two luminous torches in both her eyes.
Then at last her gaze met his ... twin flames of purest beauty, in
which, quite gradually, all the hidden treasures of unconceived
ecstasies rose one by one in an overwhelming flood too strong for
human strength to sustain. Awful, wonderful, terrifying ... and yet so
sweet, so sweet that no halting tongue could ever describe such
marvellous revelations. Almost imperceptibly she bent her angelic
lips nearer his, so that the vision of his dreams was all at once
looking into his upturned face, with eyes into which a God-given
splendour had suddenly come in a burst of passionate
understanding.
Never had the exquisite orbs been so sweet, never had the ethereal
face shone with a more divine light;—and a voice that seemed to
come from the far-off distances of the land of mystery pronounced
these words:
"Where have I been? To what regions have I come? What is this
dazzling splendour that rushes through my being like a leaping river
of Life? What is this dear face I see gazing into mine, what is this
bounding joy that wants to burst the confines of my overstrained
heart? Oh what—oh what does it mean?"
Drawing herself up she stood, both hands pressed on her heaving
breast, as if her great pain were piercing her through and through.
"What is it?... What is it?... What can it be? I do not understand!"
Eric rose also, and stood trembling before this unheard-of miracle
that had come to pass.
A great fear came to him and swept with a cold wind over his
immensity of joy. Would she suddenly close her mind again to his
flaming love, now that he had at last aroused her sleeping soul?
"Oh, my love, my love!" he cried. "It is I, it is I, who have come over
the distant seas, who have travelled through sun and shade, through
storm and calm, who have passed through the Shadow of Death to
reach the heaven of thy face; look at me with thy awakening eyes,
and tell me that life is sweet."
"Life!" said the girl, her two hands still tightly clutching at her
pulsing heart.
"Life, what is Life?"
"Life," cried Eric, "is contained in this one hour of perfect attainment.
Life is the great promise of love fulfilled. Life is the sacred moment
when my arms may clasp thee to my thirsting soul!
"Come, my beloved, for I have waited so cruelly long, so tirelessly
have I searched and yearned!"
Stella, moved by some unknown, mysterious force, timidly drew near
to this stranger man, whose face was as fair as the angels with
whom in her visions she had always dwelt.
But what was this waking joy—this tumultuous tide of intensest
bliss? Something too strong, too strong, something that no living
mortal could bear.... And yet now she lay within his passionate arms,
her head hidden against his throbbing straining heart.
In an agony of delight no words can describe, his lips, his warm
living lips, were drinking her very soul away—drawing by slow
degrees her sweet hardly-dawning life to mix with his boundless
need.
He knew that this was the ultimate limit of his soul's desire, a
moment of such incommensurable joy, that body and soul flowed
together into a sunrise of dazzling triumph. All that had been, was as
if it had never existed. Past, present, and future were caught up and
welded together into a blaze of unearthly rapture.
He felt that he was being carried by the eternal wings of creation
into the very heart of the throbbing world; he was one with Nature,
he was one with God, one with his whole being's most sacred
longing. And thus, closely locked in each other's arms, these two
mortals of perfect beauty lived an hour that lies as a pulsing
memory, deeply hidden within the dark lap of the ever-wakeful
Mother Earth, and from which it rose like a song of undying, eternal
perfection to the vastness of the sky above: a song that now floats
in never-ending echoes on every passing cloud, on every ray of the
sun. It was an hour when Nature stood still to listen to the
accomplishment of one of her dearest dreams—when all life seemed
concentrated within the happiness of those two frail human
beings....
A cold streak of dawn was slowly advancing with pale furtiveness out
of the cover of night, when Eric bent once again to press his lips
upon the perfect mouth; as he did so Stella looked up into his face
with those eyes that had for so long been a living part of his most
hidden self.
Oh! was ever any earthly thing so marvellous, so wonderful, as
those two grey stars of light! and a sweet whisper rose stealing into
every drop of his blood:
"I love thee, I love thee, as never have I loved a single one of my
heavenly dreams; I have learnt in this hour the most limitless
boundaries of human bliss. Lay now thy dear lips upon these eyes
thou hast found at last, so that no other sight than thy fond face
may ever trouble my inner vision.
"Oh, see the day dawns; give me once more all thy bounding soul in
the blessing of thy kiss."
Eric lifted the beloved woman and pressed her in a frenzy of joy to
his heart; then very gently laid his mouth upon her eyes, closing the
delicate lids, shutting away within her starry orbs the visage she
loved more than all else.
Long did he remain thus holding her sweet face beneath his tender
caress, whilst a heavenly smile parted her gentle lips.
And it seemed to Eric that at that moment his life and hers were
flowing quietly together in one great tide towards the shores of
Eternity....
But when old Zorka came at the break of day to see how her dear
ones fared, she stood strangling a cry that rose in the air; then,
throwing herself upon the ground, she hid her grey head in the dust.
There sat Eric with wandering gaze, his eyes wide open, full of
frantic misery, looking down upon a corpse he held pressed closely
to his beating heart. And through the gold of his shining locks, soft
silver threads were scattered like finely spun moonbeams entwined
with the rays of the sun.
Zorka lifted her haggard face and stared in awe at the ghost-like
pallor of the girl. A wonderful light rested on her waxen features as
she lay full of peace and rest, white and motionless in the arms of
her lover.
Her eyes were closed as one who has shut her tired lids over a joy
too great for words, the vastness of which had burst asunder her
human heart.
XXV
And thy first night of death
Belongs to our first
sorrow....
What knowledge now is
thine?
A deeper one than ours.

Bard
o
f
t
h
e
D
â
m
b
o
v
i
t
z
a
.

All day the dark men of the tribe had been building a coffin into
which the beautiful maiden was to be laid to rest.
One and all were bowed with sorrow; this death was to them a
horrible unreality their simple minds could not grasp. Why was this
creature of light cut down in her sweetest prime?
What would their lives now be without the glamour and mystery
with which she had filled their wandering day?
The morning was bleak, and the rain fell in occasional showers that
the wind swept, with moaning sighs, over the naked waste. The
canvas of the tents flapped and creaked, straining against the poles
and cords that held them in place.
A heavy gloom brooded over the wretched camp, so that even the
squabbling children spoke with bated breath.
Within Stella's silent tent sat Eric of the golden locks, staring without
tears upon the face of the dead. The eyes of his dream looked upon
him no more; he had shut them for ever with the passion of his kiss.
Beneath his living lips she had breathed her last, dying like a fading
flower, scorched by the flame of his love!
He had not known when she had passed away—only the growing
chill he had felt beneath his cheek had pierced his soul with a
sudden fear, and when he had called on her beloved name no
answer had come in response. But we shall draw a veil over that
hour of morn when he realized what was to be his fate. There are
times of darkness and bottomless grief wherein the eye of a stranger
must never descend. This was the end—the end! Hope was dead,
life was a waste, and all had been but a passionate dream that
ended with a kiss!
The wind swept over the humble tent, but upon her lowly couch
Stella still smiled the wise smile that removes the dead so far beyond
the reach of those who weep.
Not far off sat Zorka, the witch, her head bent down upon her
trembling knees, whilst the storm played amongst the frosted wisps
of her hair. From all sides weird chants rose into the wintry air where
the old women, sitting round their blazing fire, were singing dirges
for the dead.
And now came the moment when the black-eyed, black-haired sons
of the wild came to carry Stella to her last narrow bed.
They had fashioned her a coffin with sides of shining copper the
colour of the autumn that had now passed away. Eric had to stand
by and see how they lifted the body he loved, and laid it, all rigid
and small, within the three sides of the metal box that received in
unmoved silence this, his faded dream.
The gypsies had sullenly refused to let him carry her himself; they
jealously desired to have at least her inert body within their arms,
they who had never dared touch a single hair of her head.
They did not know that she had died beneath the kiss of his lips, but
they somehow guessed that at the end he had awakened her
sleeping soul; and although they had dearly loved his beautiful face,
Eric had always been an alien in their midst, all shining and fair, a
being of light amongst their sombre race.
Now she was dead—Stella was dead—the Luck of their tribe lay
white and cold in her last resting-place. Now she was theirs, and this
son of another clime must relinquish his right, and leave her pure
perfection between their dusky hands.
So while they were carrying her from out her tent Eric wandered
with dragging feet into the forest where he had so often sat,
painting her lovely face.
Now all the gold had fallen to the ground, the trees stood gaunt and
bare. Over his cruelly bowed head the branches stretched naked and
grey; from every twig large dropping tears fell splashing on the
carpet of faded leaves.
Nowhere could he find the smallest plant or flower out of which to
wind her a final wreath the same as those she had always worn. In
vain he searched each sheltered corner; wherever he peered, all was
dark and dead, killed by the frost of the night.
When he came back to where she lay, pale and still, all that he had
to bring to the woman he loved was a crown of thorns. These he
pressed on her snowy brow where they rested, sharp and hard,
amongst her silky tresses, so that verily she resembled a martyred
queen upon the bier of a beggar.
In a circle around her coffin the gypsies had lighted blazing fires,
and now that their work was done they left the stranger standing in
lonely communion with that silent shape that never again would look
upon the light of day.
As he knelt beside her lowly bed, his face hidden on the heart that
beat no more, a sound of wings came wafted upon the wind, and
there, fluttering above the lifeless maiden, was his trusted
companion the milk-white hawk, holding in its sharpened beak the
chain with the moon-coloured diamond.
As Eric looked up with hopeless eyes, he saw how the beautiful
creature swooped down quite close, covering the lovely vision with
its large soft wings; and when it rose again, like foam against the
darkening sky, Gundian espied upon the heart of the maiden the
magic diamond, shining as if all her love were a last time bursting
from her breast in mystic rays of enchantment.
Night came down and still Eric knelt beside his shattered happiness.
All about him the fires burned and crackled, and the dismal chants of
the gypsies rose like curses to the heavens.
The wondrous face of the sleeper lived again in the glowing shine,
but Eric did not see this illusive light of life; when he looked up the
fires had burnt out; the gypsies had gone to rest.
The night had laid its darkness over the frowning solitude; no star
shone in the sky; the only spot of brightness was the twinkling
diamond that glowed there on Stella's bosom, where Eric had
awakened her soul with his first burning kiss of love!
XXVI
The grey wind weeps, the
grey wind weeps,
the grey wind
weeps.
Dust on her breast, dust on
her eyes,
The grey wind weeps.

Fiona
M
a
c
l
e
o
d
.

Next day her grave was dug, there, upon that endless plain of
silence. Eric had strewn the gaping hole with a lining of withered
leaves, gathered from the weeping forest.
Before they hid her marvellous face out of sight he had passionately
covered its mask of beauty with desperate burning kisses. Zorka had
stood close by, guarding him from hostile glances, so that this
heartbroken lover might be for a last time alone with what had been
the dream of his life.
Then from his shoulders he took the torn black cloak he had worn
during all his wanderings and draped it round those rigid limbs that
froze his blood with their icy coldness.
"Mother, dear old mother," he cried, "I want to keep her warm; the
night before last she glowed in the arms of my passion, and now I
must leave her to the chill mercy of the frozen ground. How can I
bear such torture?"
Zorka laid her withered hand upon his shoulder.
"Son, my son, I feel that no ice can harm her more—she looked
upon the flames of Love, and died whilst they were folded round
her; she closed her eyes upon the vision of thy burning worship, and
that wonderful sweetness was the last thing she saw; now she is for
ever happy."
So Eric wound her from head to foot in the dark folds of his mantle;
he hid away her white hands and her tiny feet. Then he pressed the
wreath of thorns over the dusky drapery, placing the gleaming gem
in the centre of her forehead. He fetched her dear violin and laid it
so that her toes just touched its polished wood.
Over the shabby black tissue of the weather-beaten vestment he
spread the faded wreaths that once had rested upon her rippling
hair. And after one long look of farewell he allowed the heavy lid to
be shut down on his hard-won happiness.
The damp earth was thrown with a hollow thud over the lid of the
coffin, the ground was beaten down smooth and flat on every side,
so that no wandering stranger should ever disturb her deep dark
grave beneath its covering of sombre soil.
The gypsies folded their tents with hasty rapidity, longing to steal
away from a place where silence brooded amongst the whispering
winds.
Old Zorka came and stood upon the spot where her darling had
been hidden for ever away, and there she murmured all the prayers
she could call back to her flagging memory, whilst her streaming
tears mixed with the mould that lay over that past dream of beauty.
But no persuasion nor entreaty could make Eric move from that dark
mound in the barren lonely wild; he meant to remain there that first
night when she had been confided to the indifferent shadows that
closed in around her.
He promised Zorka he would follow next day, but this night he must
lie on Stella's cold grave, to protect it from the biting frost.
When all had gone and he was alone on that dreary vastness, he
drew from its sheath his treasured sword and planted it like a cross,
there where her eyes must be hidden away, never more to look
upon the rising sun.
Dreary blasts of wind blew over the gloomy desert; darkness came
down and Eric stretched himself upon the frozen ground, his lips
pressed upon the spot where, far beneath the heavy covering of soil,
her beautiful mouth must have been.
There he lay, forsaken, the only breathing being in that cruel night of
sorrow. But not far off, amongst the dim shadows of the forest, the
snowy falcon was faithfully watching, though the glinting light no
longer shone on his breast, watching till day should mercifully break.
Through the heavy hours Eric never moved; he was fighting alone a
dreary battle against life and his God. Nor did he know, as his face
lay hidden in his clenched hands, that the magic hilt of the sword
was glowing like a shining promise far over the sleeping world.
There it stood, a cross of flame, burning with sacred light, watching
over this desperate mortal who longed to cast his life away.
The wind howled with voices of terror and storm; the dust was
whirled in clouds from the frozen waste, sweeping over the cross-
shaped light and over the weeping man, trying to blot them out of
sight.
But deep down in eternal night, under the protecting arms of her
lover, rested Stella in stony quiet, bedded in the lap of old Mother
Earth.
Beneath her closed lids her starry eyes were for ever guarding the
last dear vision her waking brain had looked upon.
XXVII
And in her two white hands like
swans on a frozen lake,
Hath she not my heart, that I have
hidden there for dear love's
sake.

Fiona
M
a
c
l
e
o
d
.

Morning dawned, and Eric rose from the ground, half-frozen from his
long night's vigil, his eyes hollow, staring with a desperate look.
The wan daylight was gradually spreading over the wilderness, on
which he stood like a wounded soldier whom his comrades had
forsaken, imagining he was dead. No, he was not dead, poor youth,
he was alive, crying, with broken heart and thirsting soul, for what
could be no more. He had lived his dream and shattered it all in one.
Zorka had been right, some flowers must not be plucked; and now
his hands were empty—empty. He himself had made the sweet
petals fall, and no earthly power could give them back their bloom.
Down there under the dark cold sod she lay, his dream of dreams,
crushed by his passion and love. He had held his soul's desire
pressed against his wildly beating heart, and she had left him in
their hour of rapture; had died beneath the fire of his kiss.
Once more he threw himself down upon the merciless earth that
covered her sacred beauty. He pressed his mouth upon the dust of
the ground, tracing the sign of the Cross with his lips, there where
he guessed that her snowy brow, her silent heart, and closed eyes
lay hidden for ever out of sight.
Then kneeling before the cross-shaped sword, Eric prayed in words
of glowing entreaty to the great Father above, that her sleep should
be sweet and the earth soft to that body he loved, that the weight of
the dark mould that wrapped her round should not be heavy to her
delicate limbs.
He cried to that silent brooding sky to be merciful towards that
creature of light and soon to call her from the damp dark grave to a
sunrise of glory and joy.
"God! my God! it cannot be that Thou lettest her slumber for ever in
that cold solitude and I not knowing if her sleep be sweet. She who
was like a ray from the sun—she who carried within her orbs the
whole glory of the summer skies, the entire mystery of the starry
nights. She whose music was the most exquisite rendering of the
beauty of life; she whose perfection was the gladness of each
awakening day, whose soul and body were like the spotless snow of
mountain heights where no human foot has ever passed. O God! O
God! how can I leave her grave?" And again he lay there, stretched
upon the relentless soil, groaning and shedding tears of blood, whilst
the brooding silence of the naked wild lay over all, hostile and
unheeding, with Nature's stony indifference to the sorrow and
anguish of the human race.
Then at last he tore himself away, feeling how useless were his grief
and misery before those eternal laws of creation which for ever are,
and for ever shall be.
Now he was fleeing that silent wilderness, bending his head against
the driving wind and rain, against the storm of dust and sand that
the wild gusts were throwing in his face.
Several times he turned in hopeless yearning towards that lonesome
spot where his precious sword stood a lonely guardian of his lost
happiness; then, covering his face in an agony too deep for tears, on
he rushed as one who tries to escape from a sight he cannot bear.
His faithful friend the hawk flew beside him, occasionally caressing
his tear-stained face with the velvet touch of its wings.
For several hours he had thus fought his desperate way, when, on
raising his head, he saw a small cloud coming towards him out of
the distance, growing in size the nearer it came.
He stood still, vaguely wondering what it might be, when out of the
midst of the moving dust a young boy emerged, driven along by the
storm that strove to carry him off his feet.
The first thing Eric discerned was a high fur cap, a shaggy coat of
skins, into the wide sleeves of which the youth's hands had been
deeply thrust, whilst a thick staff was pressed in the hollow of his
arm. Behind this advancing figure came the pattering feet of
innumerable sheep, raising beneath their steps the thick cloud Eric
had first of all descried.
Suddenly, with a glad cry, both youths ran towards each other with
joyful recognition, for this was none other than Radu, the shepherd,
who was leading his flocks home from the mountains, driven thence
by the coming winter.
For a moment both remained speechless, hands clasped, staring into
each other's face that were wet and shining from the drizzling rain
which had not yet been able to turn into mud the thick coating of
dust that lay like powder on the roads. The one who spoke first was
Radu, and it was anxiously to ask:
"Where hast thou left thy cloak? Thou art quite wet; and thy sword,
thy beautiful sword, where hast thou left thy sword?"
Eric did not answer; he simply lifted both his hands, showing that
they were empty; then he let them fall again at his sides with the
hopeless gesture of one who has given everything up for ever more.
Then only did Radu come quite near and peer with frightened eyes
more closely into his face.
"What is it?" he cried. "What is it? What hast thou seen?"
"Heaven and Hell," answered Eric. "I have been in both!"
"And thy dream—didst thou find thy dream?" whispered the peasant.
"I found it and I lost it," was the answer he got. "It was mine for a
short hour of bliss—mine; but again God beat me down with my face
to the earth.
"I have been a dreamer of dreams, and it is not to be given to me to
keep what I clasp. God allowed me visions to lead me ever on; they
brought me to this land of promise.
"It was summer then; now thou seest what colour is over the earth.
But I touched my dream; I held it within my human arms; but as
sayeth the poet: 'How can the body touch the flower which only the
spirit may touch,' so I killed my flower, killed it with my kiss."
"Can one kill with a kiss?" cried Radu, awe in his voice.
"One can kill with more things than with a sword. I found the face of
my vision, I followed it step by step. I hunted it down with sighs and
tears till at last it was mine. I held it one short moment in my arms,
a moment within which I lived the ultimate triumph of my desire.
Then it was gone. I myself destroyed it, consumed it, with the thirst
of my soul!"
"But was she happy?" queried Radu, with tears in his eyes.
"Was she happy! Good God! was she happy!" cried Eric, clenching
his fists towards the skies. "Yes, I believe she was happy! If I did not
believe that I could not live. She said to me to kiss her eyes so that
for ever she could keep the picture of what she had loved best in
this world! At that moment she died! My warm touch of love was
death! Canst grasp that frightful truth?... was death! My lips, my
lover's lips closed her eyes for ever!... for ever ... over the vision of
my face!
"Before they laid her in the ground I wrapped her in my cloak; that
is why it is gone. I would not leave her thus thinly clad within the
cold shadow of her grave; and upon the spot where she lies I
planted my sword. There, where the eyes I followed so far are for
ever closed, I left my sword."
"Oh," sobbed Radu, "and now I shall never see that face!"
"Yes, thou shalt," answered his friend. "Come with me and thou
shalt see the fairest being God ever made!"
"Where?" asked the astonished peasant, "where?"
"Follow me and thou shalt know!"
"But my sheep,—they are tired; and see how tame are my dogs,
exhausted by the length of the way."
"It is not far from here—there thou canst rest; thou art not in a
hurry, and I would thou shouldst know the eyes of my dream."
Again Eric hid his face in his clasped hands, whilst a harsh dry sob
rose to his throat.
"Come, come! I, too, thirst for the sight of her face."
Towards the evening the two lads arrived at the gypsies' camp.
Along the dreary roadside several tall wooden crosses had been
erected, tall and gaunt, with curious shapes, decorated with archaic
saints in crudest colours.
These weird crosses stood in a line like silent spectres, some
bending sideways, as if tired of their vigil.
It was here that old Zorka had told Eric he would find their halting-
place. The fires had already been lit, the dark men and women sat
about in groups. The tents stood out, dismal shadows, against the
Western Bar.
Eric holding Radu by the hand led him to where Zorka was cooking
her evening meal in a blackened pot.
Radu's flock had followed pitter-patter in their wake, hardly
discernible in the dusk, their way-stained wool the colour of the
ground they trod.
When she saw her favourite the old seer ran forward and clasped
him to her breast, anxiously scanning his haggard face, but saying
never a word for fear of awakening his surging grief.
"Mother Zorka," he said, "here is a friend who has come to look
upon her face!"
Zorka went to her tent, brought out the wonderful picture, and put it
into the peasant's hands. He stared at it in enraptured silence. Then
very slowly he laid it on the ground and knelt before it, making the
sign of the cross over his brow, the tears flowing down his cheeks.
Zorka brought the boys food in a dish, urging her dear one to eat,
but Eric shook his head.
"Mother Zorka, willst thou tend him and give him a bed? for he was
good to me when I was in sore distress."
Then taking the picture he went off alone in the darkness of the
night. The wind howled, and the rain came down in heavier
showers, beating upon the miserable tents.
Zorka sat with the young shepherd in the shelter of her dwelling,
looking out upon the darkness into which the lonely mourner had
disappeared.
"Was she an angel?" asked Radu, who had finished his meal, and
whose face was still wet with tears.
"I think she was," said Zorka, nodding her head.
"Tell me," he continued, "why did she die?"
"Why did she die?" repeated the tired old woman. "Because it is
given to some never to wake from their dream of bliss, and those it
is said are loved of the gods."
"Why was he left alone? Do the gods not love him?"
Zorka sighed: "Because some must learn to the bitter end to
overcome all they reach; must learn to leave behind them both joy
and pain; to rise above all their desires, and hopes, and fears, till
their souls are as pure and bright as an archangel's sword; and
those are the chosen of God."
"But was she happy?" queried Radu, for the second time.
"Yes," answered Zorka, with a solemn voice. "Yes, she was happy.
She died of joy."
XXVIII
A star has ceased to shine
in my lonely skies,
Sometimes I dream I see it
shining in my heart.

Fiona
M
a
c
l
e
o
d
.

Zorka could not bear to part from Eric of the golden locks, and
begged him to remain at her side.
He, too, for a while felt that he dared not leave the old woman who
had led him to his love; so all that winter he wandered about with
the travelling clan, from clime to clime, leaving far behind him the
country of his dream. Wherever he went the falcon followed, flying
as near his head as it could.
Radu had parted from Eric with tears in his eyes; both boys felt as
they joined hands for the last time that nothing could wipe out the
deep affection they had conceived for each other.
Radu had gone off on an endless road, playing a melancholy tune on
his wooden flute, his flock following him, his cowed dogs at his
heels, his feet splashing about in the mud, the patient sheep leaving
thousands of small footprints wherever they passed.
But Eric played no more, neither did he sing; and over the gold of
his locks the silver began to spread more and more, like foam on the
sea.
Wherever he stopped he bought canvas and paint, but each of his
pictures showed always but the one and only face.
He painted the features of his dream in every form his heart could
remember.
He represented her as first he had seen her, crowned with a wreath
of bells, her old violin pressed under her cheek, her eyes full of the
visions she alone could see. He painted her seated in the dust of the
road with a circle of corn-ears round her delicate brow. He conjured
up her beauty against the setting sun, whilst the coronet she wore
was of autumn leaves all glowing as the blazing sky.
One of his sketches showed her shimmering and pale, lit by the rays
of the moon, and this time it was a halo he had painted round the
pureness of her heavenly face.
And once his restless fingers had created the picture of her marble
features as she lay motionless on her bier, her face still and white
under the brooding clouds, with the crown of thorns on her head,
her wonderful eyes closed beneath the heavy lids, a smile of peace
and happiness hovering like a blessing over her lips.
But one picture alone no human eye but his was ever allowed to
see; on that one he had awakened, for a second and last time, the
look her eyes had borne when he had closed them with his lips.
This sketch he kept jealously hidden beneath all the others, and it
was never shown—not even Zorka had the right to cast a glance
upon that expression which was too holy for mortal to look upon.
One of his pictures he had given to Zorka in sign of gratitude. It
represented the lost Luck of the wandering tribe. She stood on a
lonely plain, her hands joined behind her back, her eyes looking
straight before her, her head slightly raised as if listening for the
coming of a being she could not see.
A marvellous picture of unearthly beauty before which the old
fortune-teller daily said her curious prayers, prayers to a God who
had no form, but who lived in every breath of the wind, and who
filled her weary old soul with the hope of coming peace.
They wandered slowly from land to land, amidst scenes of beauty,
and often also through countries bleak and joyless; but the heart of
the painter was always yearning for a far-off desolate plain where he
had planted his shining sword over the face of his love.
When at night he closed his lids over his eyes heavy with unshed
tears, that wilderness always rose before him, cold and lonely, filling
him with a haunting dread that the sword might be slowly
descending to pierce her innocent heart. That vision would suddenly
awake him out of his sleep, and horror would stand at the foot of his
wretched bed, till he could bear it no more and would rush wildly out
into the night.
Zorka knew all his suffering, and bowed her head always lower to
the ground.
When spring was covering the earth with a new smile of youth,
Zorka felt that the moment she dreaded had come, and that the
loved wanderer would soon leave her to go his way.
She had heard him speak of a wonderful picture he was one day to
finish in the palace of a mighty king. With her seer's certainty she
knew that the time was close at hand—had he not found the face of
love,—and slowly the desire must strengthen within him to terminate
the work he had begun.
She accepted the coming of this final suffering as one who knows
that her days are surely numbered.
One morning Eric Gundian, the last joy of her eyes, stood tall and
slim before her dimmed sight.
"Mother Zorka, I feel I must go. I thank thee for all thy bounteous
kindness, and I want thy blessing as once the dear master gave me
his!"
He knelt down as a little child might have done, and laid the frosted
gold of his locks amongst the folds of her earth-coloured rags. She
placed her trembling hands upon his head and raised her quavering
voice:
"Go in peace, my loved one, take up thy burden and finish thy great
work; it is thy duty to return to the kingly master who loved thee so
well, and when thy pain seems too heavy to bear, remember these
words of old Zorka the witch.
"Those who die of happiness are blessed, but thrice blessed is the
man who carries without complaint the burden of his broken heart.
Thou hast known the sublimest fulfilment of joy. Be for ever grateful
for that hour of bliss, and remember that she died at the moment of
attainment, which is given to so few; therefore do not mourn as if
her lot had been cruel. There are others who fall before winning the
race; thou hast known what it is to reach thy goal; so, thou must not
weep. Go, and carry joy with thee wherever thou treadest, because
thou art a Chosen of God. It is I, the old seer, who thus does speak."
She bent low over him and pressed her quivering lips to the silver
threads in his hair; then he rose, and stood with his head thrown
back, his arms reaching up towards the vault of blue, as one who
longs to be received within the far-off clouds.
"But, Mother Zorka, I can sing no more; God has drowned my voice
in a sea of tears!"
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

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

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like