A Computational Introduction to Digital Image Processing 2nd Edition Edition Alasdair Mcandrew 2024 scribd download
A Computational Introduction to Digital Image Processing 2nd Edition Edition Alasdair Mcandrew 2024 scribd download
https://ebookultra.com
https://ebookultra.com/download/a-computational-
introduction-to-digital-image-processing-2nd-
edition-edition-alasdair-mcandrew/
https://ebookultra.com/download/digital-image-processing-piks-
inside-3rd-edition-william-pratt/
ebookultra.com
https://ebookultra.com/download/digital-image-processing-piks-
inside-3rd-edition-william-k-pratt/
ebookultra.com
https://ebookultra.com/download/digital-signal-processing-techniques-
and-applications-in-radar-image-processing-1st-edition-bu-chin-wang/
ebookultra.com
https://ebookultra.com/download/digital-image-sequence-processing-
compression-and-analysis-1st-edition-todd-r-reed/
ebookultra.com
Biomedical Signal and Image Processing 2nd Edition
Najarian
https://ebookultra.com/download/biomedical-signal-and-image-
processing-2nd-edition-najarian/
ebookultra.com
https://ebookultra.com/download/introduction-to-computational-
earthquake-engineering-2nd-edition-muneo-hori/
ebookultra.com
https://ebookultra.com/download/data-analysis-digital-signal-and-
image-processing-1st-edition-gerard-govaert/
ebookultra.com
https://ebookultra.com/download/image-sensors-and-signal-processing-
for-digital-still-cameras-1st-edition-junichi-nakamura/
ebookultra.com
https://ebookultra.com/download/multimedia-image-and-video-
processing-2nd-ed-edition-guan/
ebookultra.com
A Computational Introduction to Digital Image
Processing 2nd Edition Edition Alasdair Mcandrew
Digital Instant Download
Author(s): Alasdair McAndrew
ISBN(s): 9781482247350, 1482247356
Edition: 2nd Edition
File Details: PDF, 45.98 MB
Year: 2015
Language: english
A COMPUTATIONAL INTRODUCTION TO DIGITAL IMAGE PROCESSING
2nd ed. Alasdair McAndrew Victoria University, Melbourne, Australia
9781482247350
MATLAB® is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does not
warrant the accuracy of the text or exercises in this book. This book's use or discussion of MATLAB®
software or related products does not constitute endorsement or sponsorship by The MathWorks of a
particular pedagogical approach or particular use of the MATLAB® software.
CRC Press
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts
have been made to publish reliable data and information, but the author and publisher cannot assume
responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize
to copyright holders if permission to publish in this form has not been obtained. If any copyright material
has not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced,
transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or
hereafter invented, including photocopying, microfilming, and recording, or in any information storage or
retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access
www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc.
(CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that
provides licenses and registration for a variety of users. For organizations that have been granted a
photocopy license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are
used only for identification and explanation without intent to infringe.
http://www.taylorandfrancis.com
http://www.crcpress.com
Front Matter
1 Introduction
2 Images Files and File Types
3 Image Display
4 Point Processing
5 Neighborhood Processing
6 Image Geometry
7 The Fourier Transform
8 Image Restoration
9 Image Segmentation
10 Mathematical Morphology
11 Image Topology
12 Shapes and Boundaries
13 Color Processing
14 Image Coding and Compression
15 Wavelets
16 Special Effects
Back Matter
Front Matter
Dedication
To my dear wife, Felicity, for all her love, support and understanding during my writing of this book.
Preface
Human beings are predominantly visual creatures, and our computing environments reflect this. We have
the World Wide Web, filled with images of every possible type and provenance; and our own computers
are crammed with images from the operating system, downloaded from elsewhere, or taken with our
digital cameras. Then there are the vast applications which use digital images: remote sensing and satellite
imaging; astronomy; medical imaging; microscopy; industrial inspection and so on.
This book is an introduction to digital image processing, from a strictly elementary perspective. We have
selected only those topics that can be introduced with simple mathematics; however, these topics provide
a very broad introduction to the discipline. The initial text was published in 2004; the current text is a
rewritten version, with many changes.
This book is based on some very successful image processing subjects that have been taught at Victoria
University in Melbourne, Australia, as well as in Singapore and Kuala Lumpur, Malaysia. The topics
chosen, and their method of presentation, are the result of many hours talking to, and learning from, the
hundreds of students who have taken these subjects.
There are a great many books on the subject of image processing, and this book differs from all of them in
several important respects:
Not too much mathematics. Some mathematics is necessary for the explanation and
discussion of image processing algorithms. But this book attempts to keep the mathematics at a
level commensurate with elementary undergraduate computer science. The level of mathematics
required is about one year's study at a tertiary level, including calculus and linear algebra.
A discrete approach. Since digital images are discrete entities, we have adopted an approach
using mainly discrete mathematics. Although calculus is required for the development of some
image processing topics, we attempt to connect the calculus-based (continuous) theory with its
discrete implementation.
A strong connection between theory and practice. Since we have used a mainly discrete
approach to explain the material, it becomes much easier to extend the theory into practice. This
becomes particularly significant when we develop our own functions for implementing specific
image processing algorithms.
Software based. There are image processing books that are based around programming
languages: generally C or Java. The problem is that to use such software, a specialized image
processing library must be used, and at least for C, there is no standard for this. And a problem
with the Java image processing libraries is they are not really suitable for beginning students.
This book is based entirely around three different systems: MATLAB® and its Image Processing
Toolbox, GNU Octave and its Image Processing Toolbox, and Python with various scientific and
imaging libraries. Each system provides a complete environment for image processing that is
easy to use, easy to explain, and easy to extend.
Plenty of examples. All the example images in this text are accompanied by commands in
each of the three systems. Thus, if you work carefully through the book, you can create the
images as given in the text.
Exercises. Most chapters finish off with a selection of exercises enabling the student to
consolidate and extend the material. Some of the exercises are “pencil-and-paper”; designed for
better understanding of the material; others are computer based to explore the algorithms and
methods of that chapter.
Chapter 4 looks at some of the simplest, yet most powerful and widely used, of all image processing
algorithms. These are the point operations, where the value of a pixel (a single “dot” in a digital image) is
changed according to a single function of its value.
Chapter 5 introduces spatial filtering. Spatial filtering can be used for a vast range of image processing
operations: from removing unnecessary detail, to sharpening edges and removing noise.
Chapter 6 looks at the geometry of an image: its size and orientation. Resizing an image may be necessary
for inclusion in a web page or printed text; we may need to reduce it to fit or enlarge it.
Chapter 7 introduces the Fourier transform. This is possibly the single most important transform for
image processing. To get a feeling for how the Fourier transform “works” and what information it
provides, we need to spend some time exploring its mathematical foundations. This is the heaviest
mathematics in this book, and requires some knowledge of complex numbers. In keeping with our
philosophy, we use discrete mathematics only. We then show how images can be processed with great
efficiency using the Fourier transform, and how various operations can be performed only using the
Fourier transform.
Chapter 8 discusses the restoration of an image from different forms of degradation. Among these is the
problem of noise, or “errors” in an image. Such errors are a natural consequence of electronic
transmission of image signals, and although error correction of the signal can go a long way to ensuring
that the image arrives “clean,” we may still receive images with noise. We also look at the removal of blur.
Chapter 9 addresses the problems of thresholding and of finding edges in an image. Edges are a vital
aspect of object recognition: we can classify the size, shape, and type of object by an analysis of its edges.
As well, edges form a vital aspect of human visual interpretation, and so the sharpening of edges is often
an important part of image enhancement.
defined in terms of binary images (which is what we do here) and then can be extended to grayscale
images. With the latter, we can also perform edge detection and some noise reduction.
Chapter 11 investigates the topology of digital images. This is concerned with the neighborhoods of pixels,
and how the exploration of different neighborhoods leads to an understanding of the structure of image
objects.
We continue the investigation of shapes in Chapter 12, but from a more spatial viewpoint; we look at
traversing the edges of an object, and how the traversal can be turned into descriptors of the size and
shape of the object.
Chapter 13 looks at color. Color is one of most important aspects of human interpretation. We look at the
definition of color, from physical and digital perspectives, and how a color image can be processed using
the techniques we have developed so far.
Chapter 14 discusses some basic aspects of image compression. Image files tend to be large, and their
compression can be a matter of some concern, especially if there are many of them. We distinguish two
types of compression: lossless, where there is no loss of information, and lossy, where higher compression
rates can be obtained at the cost of losing some information.
Chapter 15 introduces wavelets. These have become a very hot topic in image processing; in some places
they are replacing the use of the Fourier transform. Our treatment is introductory only; we show how
wavelets and waves differ; how wavelets can be defined; how they can be applied to images; and the affects
that can be obtained. In particular, we look at image compression, and show how wavelets can be used to
obtain very high rates of lossy compression, with no apparent loss of image quality.
The final chapter is intended to be a bit more light-hearted than the others: here we look at some “special
effects” on images. These are often provided with image editing programs—if you have a digital camera,
chances are the accompanying software will allow this—our treatment attempts to provide an
understanding into the nature of these algorithms.
• Chapter 1
• Chapter 2 except for Section 2.5
• Chapter 3 except for Section 3.5
• Chapter 4
• Chapter 5
• Chapter 7
• Chapter 8
• Chapter 9 except for Sections 9.4, 9.5 and 9.9
• Chapter 10 except for Sections 10.8 and 10.9
• Chapter 13
• Chapter 14, Sections 14.2 and 14.3 only
• Section 2.5
• Section 3.5
• Chapter 6
• Sections 9.4, 9.5 and 9.9
• Sections 10.8 and 10.9
• Chapter 11
• Chapter 12
• Section 14.5
• Chapter 15
As taught at Victoria University, for the first course we concentrated on introducing students to the
principles and practices of image processing, and did not worry about the implementation of the
algorithms. In the second course, we spent much time discussing programming issues, and encouraged
the students to write their own programs, and edit programs already written. Both courses have been very
popular since their inception.
At the time of writing the first edition, MATLAB was the the software of choice: its power, ease of use, and
its functionality gave it few, if any, competitors. But the world of software has expanded greatly since then,
and the beginning user is now spoiled for choice. In particular, many open-source systems (such as GNU
Octave) have reached a maturity that makes them genuine alternatives to MATLAB for scientific
programming. For users
who prefer the choice that open-source provides, this has been a welcome development. MATLAB still has
an edge in its enormous breadth: its image processing toolbox has over 300 commands and functions—far
more than any competitor—as well as a very mature graphics interface library. However, for basic and
fundamental image processing—such as discussed in this text—MATLAB is equalled by both Octave and
Python, and in some respects even surpassed by them.
Octave has been designed to be a “drop-in” replacement for MATLAB: standard MATLAB functions and
scripts should run unchanged in Octave. This philosophy has been extended to the Octave Image
Processing Toolbox, which although less comprehensive than that of MATLAB, is equal in depth. Thus, all
through this text, except in a very few places, MATLAB and Octave are treated as though they are one and
the same.
Python has several imaging libraries; I have chosen to use scikit-image [53]. This is one of several toolkits
that are designed to extend and deepen the functionality in the standard Python scientific library SciPy
(“Scikit” is a shortened version of “SciPy Toolkit”). It is designed to be easy to use: an image is just an
array, instead of a specialized data-type unique to the toolkit. It is also implemented in Python, with the
static library Cython used when fast performance is necessary. Other imaging libraries, such as Mahotas
[9] and OpenCV [4, 19], while excellent, are implemented in C++. This makes it hard for the user (without
a good knowledge of C++) to understand or extend the code. The combination of scikit-image with the
functionality already available in SciPy provides very full-featured and robust image processing.
Many teachers, students, and practitioners are now attempting to find the best software for their needs.
One of the aims of this text is to provide several different options, or alternatively enable users to migrate
from one system to another.
There are also many changes throughout the text—some minor and typographical, some major. All the
diagrams have been redrawn using the amazing TiKZ package [31]; some have been merely rewritten
using TiKZ; others have been redrawn for greater symmetry, clarity, and synthesis of their graphics
elements. Programs (in all three systems) have been written to be as modular as possible: in the first
edition they tended to be monolithic and large. Modularity means greater flexibility, code reuse, and often
conciseness—one example in the first edition which took most of a page, and 48 lines of small type, has
been reduced to 9 lines, and includes greater functionality! Such large programs as are left have been
relegated to the ends of the chapters.
All chapters have been written to be “system neutral”: as far as possible, imaging techniques are
implemented in MATLAB and Octave, and again in Python. In Chapter 2, the section on PNG images has
been expanded to provide more information about this format. Chapter 5 has been extended with some
material about the Kuwahara and bilateral filters—both methods for blurring an image while maintaining
edge sharpness—as well as a rewritten section on region of interest processing. In Chapter 6 an original
section on anamorphosis has been removed, on account of difficulties obtaining a license to use a
particular image; this section has been replaced with a new section containing an example of image
warping. For readers who may pine for anamorphosis, the excellent recent text by Steven Tanimoto [50]
contains much wonderful material on anamorphosis, as well as being written in a beautifully approachable
style. Chapter 7 has had a few new diagrams inserted, hopefully to clarify some of the material. Chapter 9
includes an extended discussion on Otsu's method of thresholding, as well as new material about the
ISODATA method. This chapter also contains a new section about corner detection, with discussions of
both the Moravec and Harris-Stephens operators. The section on the Hough transform has been
completely rewritten to include the Radon transform. In Chapter 11, the algorithms for the Zhang-Suen
and Guo-Hall skeletonization methods have been rewritten to be simpler. Chapter 12 contains a new
discussion on Fourier shape descriptors, with different examples. Chapter 13 contains a new section at the
end introducing one version of the retinex algorithm. Chapter 14 implements a simpler and faster method
for run-length encoding, and includes a new section on LZW compression. Chapter 15 has been simplified,
and more connections made between the discrete wavelet transform and digital filtering. Also in this
chapter a new wavelet toolbox is used, one that amazingly has been written to be used in each of MATLAB,
Octave, and Python. In Chapter 16 the greater modularity of the programs has allowed a greater
conciseness, with (I hope) increased clarity.
Finally, new images have been used to ameliorate licensing or copyright difficulties. All images in this
book are either used with permission of their owners, or are the author's and may be used freely and
without permission. They are listed at the end.
Acknowledgments
The first edition of this book began as set of notes written to accompany an undergraduate introductory
course to image processing; these notes were then extended for a further course. Thanks must go to the
many students who have taken these courses, and who have discussed the subject material and its
presentation with me.
I would like to thank my colleagues at Victoria University for many stimulating conversations about
teaching and learning. I would also like to thank Associate Professor Robyn Pierce at the University of
Melbourne, for providing me with a very pleasant environment for six months, during which much of the
initial programming and drafting of this new edition was done.
Sunil Nair and Sarfraz Khan, of Taylor and Francis Publishing Company, have provided invaluable help
and expert advice, as well as answering all my emails with admirable promptness. Their helping hands
when needed have made this redrafting and rewriting a very pleasant and enjoyable task.
I am indebted to the constant hard work of David Miguel Susano Pinto (maintainer of the Octave Forge
image package under the alias of Carnë Draug), and his predecessor Søren Hauberg, the original author of
the image package; also Stefan van der Walt, lead developer of the Python scikit-image package. They have
made lasting and valuable contributions to open-source imaging software, and also have answered many
of my questions.
I would also like to thank the reviewers for their close and careful reading of the initial proposal, and for
their thoughtful, detailed, and constructive comments.
Finally, heartfelt thanks to my long suffering wife Felicity, and my children Angus, Edward, Fenella,
William, and Finlay, who have put up, for far too long, with absent-mindedness, tables and benches
covered with scraps of papers, laptops, and books, and a husband and father who was more concentrated
on his writing than their needs.
The image
has been cropped from the NOAA image anim0614.jpg, a photograph of a caribou (Rangifer tarandus)
by Capt. Budd Christman of the NOAA Corps.
The image
has been taken from www.pixabay.com as an image in the public domain; the photographer is Marianne
Langenbach.
showing the last known living thylacine, or Tasmanian tiger, at the Hobart zoo in 1933, is now in the
public domain.
has been taken from Wikimedia Commons, as an image in the public domain. It can be found at
http://bit.ly/1Az0Tzk; the original image has been provided by Diego Grez from Santa Cruz, Chile.
MATLAB and Simulink are registered trademarks of The Mathworks, Inc. For product information, please
contact:
Tel: 508-647-7000
Fax: 508-647-7001
Email: info@mathworks.com
Web: www.mathworks.com
1 Introduction
1.1 Images and Pictures
As we mentioned in the Preface, human beings are predominantly visual creatures: we rely heavily on our
vision to make sense of the world around us. We not only look at things to identify and classify them, but
we can scan for differences, and obtain an overall rough “feeling” for a scene with a quick glance.
Humans have evolved very precise visual skills: we can identify a face in an instant; we can differentiate
colors; we can process a large amount of visual information very quickly.
However, the world is in constant motion: stare at something for long enough and it will change in some
way. Even a large solid structure, like a building or a mountain, will change its appearance depending on
the time of day (day or night); amount of sunlight (clear or cloudy), or various shadows falling upon it.
We are concerned with single images: snapshots, if you like, of a visual scene. Although image processing
can deal with changing scenes, we shall not discuss it in any detail in this text.
For our purposes, an image is a single picture that represents something. It may be a picture of a person,
people, or animals, an outdoor scene, a microphotograph of an electronic component, or the result of
medical imaging. Even if the picture is not immediately recognizable, it will not be just a random blur.
We shall be concerned with digital image processing, which involves using a computer to change the
nature of a digital image (see Section 1.4). It is necessary to realize that these two aspects represent two
separate but equally important aspects of image processing. A procedure that satisfies condition (1)—a
procedure that makes an image “look better”—may be the very worst procedure for satisfying condition
(2). Humans like their images to be sharp, clear, and detailed; machines prefer their images to be simple
and uncluttered.
• Enhancing the edges of an image to make it appear sharper; an example is shown in Figure
1.1. Note how the second image appears “cleaner”; it is a more pleasant image. Sharpening edges
is a vital component of printing: in order for an image to appear “at its best” on the printed page;
some sharpening is usually performed.
• Removing “noise” from an image; noise being random errors in the image. An example is
given in Figure 1.2. Noise is a very common problem in data transmission: all sorts of electronic
components may affect data passing through them, and the results may be undesirable. As we
shall see in Chapter 8, noise may take many different forms, and each type of noise requires a
different method of removal.
• Removing motion blur from an image. An example is given in Figure 1.3. Note that in the
deblurred image (b) it is easier to read the numberplate, and to see the spikes on the fence behind the car,
as well as other details not at all clear in the original image (a). Motion blur may occur when the shutter
speed of the camera is too long for the speed of the object. In photographs of fast moving objects—
athletes, vehicles for example—the problem of blur may be considerable.
• Removing detail from an image. For measurement or counting purposes, we may not be
interested in all the detail in an image. For example, a machine inspected items on an assembly
line, the only matters of interest may be shape, size, or color. For such cases, we might want to
simplify the image. Figure 1.5 shows an example: in image (a) is a picture of an African buffalo,
and image (b) shows a blurred version in which extraneous detail (like the logs of wood in the
background) have been removed. Notice that in image (b) all the fine detail is gone; what
remains is the coarse structure of the image. We could for example, measure the size and shape
of the animal without being “distracted” by unnecessary detail.
and sample it at ten evenly spaced values of x only. The resulting sample points are shown in Figure 1.6.
This shows an example of undersampling, where the number of points is not sufficient to reconstruct the
function. Suppose we sample the function at 100 points, as shown in Figure 1.7. We can clearly now
reconstruct the function; all its properties can be determined from this sampling. In order to ensure that
we have enough sample points, we require that the sampling period is not greater than one-half the finest
detail in our function. This is known as the Nyquist criterion, and can be formulated more precisely in
terms of “frequencies,” which are discussed in Chapter 7. The Nyquist criterion can be stated as the
sampling theorem, which says, in effect, that a continuous function can be reconstructed from its samples
provided that the sampling frequency is at least twice the maximum frequency in the function. A formal
account of this theorem is provided by Castleman [7].
Sampling an image again requires that we consider the Nyquist criterion, when we consider an image as a
continuous function of two variables, and we wish to sample it to produce a digital image.
An example is shown in Figure 1.8 where an image is shown, and then with an undersampled version. The
jagged edges in the undersampled image are examples of aliasing.
The sampling rate will of course affect the final resolution of the image; we discuss this in Chapter 3. In
order to obtain a sampled (digital) image, we may start with a continuous representation of a scene. To
view the scene, we record the energy reflected from it; we may use visible light, or some other energy
source.
Using Light
Light is the predominant energy source for images; simply because it is the energy source that human
beings can observe directly. We are all familiar with photographs, which are a pictorial record of a visual
scene.
Many digital images are captured using visible light as the energy source; this has the advantage of being
safe, cheap, easily detected, and readily processed with suitable hardware. Two very popular methods of
producing a digital image are with a digital camera or a flat-bed scanner.
CCD camera. Such a camera has, in place of the usual film, an array of photosites; these are
silicon electronic devices whose voltage output is proportional to the intensity of light falling on
them. For a camera attached to a computer, information from the photosites is then output to a
suitable storage medium. Generally this is done on hardware, as being much faster and more
efficient than software, using a framegrabbing card. This allows a large number of images to
be captured in a very short time—in the order of one ten-thousandth of a second each. The
images can then be copied onto a permanent storage device at some later time. This is shown
schematically in Figure 1.9.
The output will be an array of values; each representing a sampled point from the original scene.
The elements of this array are called picture elements, or more simply pixels. Digital still
cameras use a range of devices, from floppy discs and CDs, to various specialized cards and
“memory sticks.” The information can then be downloaded from these devices to a computer
hard disk.
Flat bed scanner. This works on a principle similar to the CCD camera. Instead of the entire
image being captured at once on a large array, a single row of photosites is moved across the
image, capturing it row-by-row as it moves. This is shown schematically in Figure 1.10. Since
this is a much slower process than taking a picture with a camera, it is quite reasonable to allow
all capture and storage to be processed by suitable software.
A further method of obtaining images is by the use of xray tomography, where an object is encircled by
an x-ray beam. As the beam is fired through the object, it is detected on the other side of the object, as
shown in Figure 1.12. As the beam moves around the object, an image of the object can be constructed;
such an image is called a tomogram. In a CAT (Computed Axial Tomography) scan, the patient lies within
a tube around which x-ray beams are fired. This enables a large number of tomographic “slices” to be
formed, which can then be joined to produce a three-dimensional image. A good account of such systems
(and others) is given by Siedband [48].
Such a function can of course be plotted, as shown in Figure 1.14. However, such a plot is of limited use to
us in terms of image analysis. The concept of an image as a function, however, will be vital for the
development and implementation of image processing techniques.
A digital image differs from a photo in that the x, y, and f(x, y) values are all discrete. Usually they take on
only integer values, so the image shown in Figure 1.13 will have x and y ranging from 1 to 256 each, and
the brightness values also ranging from 0 (black) to 255 (white). A digital image, as we have seen above,
can be considered a large array of sampled points from the continuous image, each of which has a
particular quantized brightness; these points are the pixels, which constitute the digital image. The pixels
surrounding a given pixel constitute its neighborhood. A neighborhood can be characterized by its shape
in the same way as a matrix: we can speak, for example, of a 3 × 3 neighborhood or of a 5 × 7
neighborhood. Except in very special circumstances, neighborhoods have odd numbers of rows and
columns; this ensures that the current pixel is in the center of the neighborhood. An example of a
neighborhood is given in Figure 1.15. If a neighborhood has an even number of rows or columns (or both),
it may be necessary to specify which pixel in the neighborhood is the “current pixel.”
Figure 1.14: The image of Figure 1.13 plotted as a function of two variables
Figure 1.14: The image of Figure 1.13 plotted as a function of two variables
• Inspection and interpretation of images obtained from x-rays, MRI, or CAT scans
• Analysis of cell images, of chromosome karyotypes
2. Agriculture
• Satellite/aerial views of land, for example to determine how much land is being
used for different purposes, or to investigate the suitability of different regions for
different crops
• Inspection of fruit and vegetables—distinguishing good and fresh produce from
old
3. Industry
4. Law enforcement
• Fingerprint analysis
• Sharpening or deblurring of speed-camera images
Image enhancement. This refers to processing an image so that the result is more suitable for a
particular application. Examples include:
Image restoration. This may be considered as reversing the damage done to an image by a known
cause, for example:
Image segmentation. This involves subdividing an image into constituent parts, or isolating certain
aspects of an image:
Image registration. This involves “matching” distinct images so that they can be compared, or
processed together. The initial images must all be joined to share the same coordinate system. In this text,
registation as such is not covered, but some tasks that are vital to registration are discussed, for example
corner detection.
These classes are not disjoint; a given algorithm may be used for both image enhancement or for image
restoration. However, we should be able to decide what it is that we are trying to do with our image:
simply make it look better (enhancement) or removing damage (restoration).
Acquiring the image. First we need to produce a digital image from a paper envelope. This can be done
using either a CCD camera or a scanner.
Preprocessing. This is the step taken before the “major” image processing task. The problem here is to
perform some basic tasks in order to render the resulting image more suitable for the job to follow. In this
case, it may involve enhancing the contrast, removing noise, or identifying regions likely to contain the
postcode.
Segmentation. Here is where we actually “get” the postcode; in other words, we extract from the image
that part of it that contains just the postcode.
Representation and description. These terms refer to extracting the particular features which allow
us to differentiate between objects. Here we will be looking for curves, holes, and corners, which allow us
to distinguish the different digits that constitute a postcode.
Recognition and interpretation. This means assigning labels to objects based on their descriptors
(from the previous step), and assigning meanings to those labels. So we identify particular digits, and we
interpret a string of four digits at the end of the address as the postcode.
Binary. Each pixel is just black or white. Since there are only two possible values for each pixel, we only
need one bit per pixel. Such images can therefore be very efficient in terms of storage. Images for which a
binary representation may be suitable include text (printed or handwriting), fingerprints, or architectural
plans.
An example was the image shown in Figure 1.4(b). In this image, we have only the two colors: white for the
edges, and black for the background. See Figure 1.16.
Grayscale. Each pixel is a shade of gray, normally from 0 (black) to 255 (white). This range means that
each pixel can be represented by eight bits, or exactly one byte. This is a very natural range for image file
handling. Other grayscale ranges are used,
but generally they are a power of 2. Such images arise in medicine (X-rays), images of printed works, and
indeed 256 different gray levels is sufficient for the recognition of most natural objects.
An example is the street scene shown in Figure 1.1, and in Figure 1.17.
True color, or RGB. Here each pixel has a particular color; that color being described by the amount of
red, green, and blue in it. If each of these components has a range 0–255, this gives a total of 2553 =
16,777,216 different possible colors in the image. This is enough colors for any image. Since the total
number of bits required for each pixel is 24, such images are also called 24-bit color images.
Such an image may be considered as consisting of a “stack” of three matrices; representing the red, green,
and blue values for each pixel. This means that for every pixel there are three corresponding values.
Indexed. Most color images only have a small subset of the more than sixteen million possible colors. For
convenience of storage and file handling, the image has an associated color map, or color palette, which is
simply a list of all the colors used in that image. Each pixel has a value which does not give its color (as for
an RGB image), but an index to the color in the map.
It is convenient if an image has 256 colors or less, for then the index values will only require one byte each
to store. Some image file formats (for example, Compuserve GIF) allow only 256 colors or fewer in each
image, for precisely this reason.
Figure 1.19 shows an example. In this image the indices, rather then being the gray values of the pixels, are
simply indices into the color map. Without the color map, the image would be very dark and colorless. In
the figure, for example, pixels labelled 5 correspond to 0.2627 0.2588 0.2549, which is a dark grayish
color.
(Here we use the convention that a kilobyte is 1000 bytes, and a megabyte is one million bytes.)
Many images are of course larger than this; satellite images may be of the order of several thousand pixels
in each direction.
The combination and immense variability of these steps influences the ways in which we perceive the
world around us.
1. Observed intensities vary as to the background. A single block of gray will appear darker if
placed on a white background than if it were placed on a black background. That is, we don't
perceive gray scales “as they are,” but rather as they differ from their surroundings. In Figure
1.20, a gray square is shown on two different backgrounds. Notice how much darker the square
appears when it is surrounded by a light gray. However, the two central squares have exactly the
same intensity.
2. We may observe non-existent intensities as bars in continuously varying gray levels. See,
for example, Figure 1.21. This image varies continuously from light to dark as we travel from left
to right. However, it is impossible for our eyes not to see a few horizontal edges in this image.
3. Our visual system tends to undershoot or overshoot around the boundary of regions of
different intensities. For example, suppose we had a light gray blob on a dark gray background.
As our eye travels from the dark background to the light region, the boundary of the region
appears lighter than the rest of it. Conversely, going in the other direction, the boundary of the
background appears darker than the rest of it.
Exercises
1. Watch the TV news, and see if you can observe any examples of image processing.
2. If your TV set allows it, turn down the color as far as you can to produce a monochromatic
display. How does this affect your viewing? Is there anything that is hard to recognize without
color?
3. Look through a collection of old photographs. How can they be enhanced or restored?
4. For each of the following, list five ways in which image processing could be used:
• Medicine
• Astronomy
• Sport
• Music
• Agriculture
• Travel
5. Image processing techniques have become a vital part of the modern movie production
process. Next time you watch a film, take note of all the image processing involved.
6. If you have access to a scanner, scan in a photograph, and experiment with all the possible
scanner settings.
(a) What is the smallest sized file you can create which shows all the detail of your
photograph?
(b) What is the smallest sized file you can create in which the major parts of your
image are still recognizable?
(c) How do the color settings affect the output?
7. If you have access to a digital camera, again photograph a fixed scene, using all possible
camera settings.
8. Suppose you were to scan in a monochromatic photograph, and then print out the result.
Then suppose you scanned in the printout, and printed out the result of that, and repeated this
a few times. Would you expect any degradation of the image during this process? What aspects
of the scanner and printer would minimize degradation?
9. Look up ultrasonography. How does it differ from the image acquisition methods
discussed in this chapter? What is it used for? If you can, compare an ultrasound image with an
x-ray image. How to they differ? In what ways are they similar?
10. If you have access to an image viewing program (other than MATLAB, Octave or Python)
on your computer, make a list of the image processing capabilities it offers. Can you find
imaging tasks it is unable to do?
This takes the gray values of all the pixels in the grayscale image wombats.png and puts them all into a
matrix w. This matrix w is now a system variable, and we can perform various matrix operations on it. In
general, the imread function reads the pixel values from an image file, and returns a matrix of all the
pixel values.
1. If you are using MATLAB or Octave, end with a semicolon; this has the effect of not
displaying the results of the command to the screen. As the result of this particular command is
a matrix of size 256 × 256, or with 65,536 elements, we do not really want all its values
displayed. Python, however, does not automatically display the results of a computation.
2. The name wombats.png is given in quotation marks. Without them, the system would
assume that wombats.png was the name of a variable, rather than the name of a file.
This is really three commands on one line. MATLAB allows many commands to be entered on the same
line, using commas to separate the different commands. The three commands we are using here are:
figure, which creates a figure on the screen. A figure is a window in which a graphics object can be
placed. Objects may include images or various types of graphs.
impixelinfo, which turns on the pixel values in our figure. This is a display of the gray values of the
pixels in the image. They appear at the bottom of the figure in the form
where c is the column value of the given pixel; r is its row value, and p is its gray value. Since
wombats.png is an 8-bit grayscale image, the pixel values appear as integers in the range 0–255.
However, an interactive display is possible using the ImageViewer method from the module with the
same name:
This is shown in Figure 2.2.
At present, Octave does not have a built-in method for interactively displaying the pixel indices and value
comparable to MATLAB's impixelinfo or Python's ImageViewer.
If there are no figures open, then in Octave or MATLAB an imshow command, or any other command that
generates a graphics object, will open a new figure for displaying the object. However, it is good practice to
use the figure command whenever you wish to create a new figure.
We could display this image directly, without saving its gray values to a matrix, with the command
or
However, it is better to use a matrix, seeing as these are handled very efficiently in each system.
Figure 2.3: The color cube for the RGB color model
Figure 2.3: The color cube for the RGB color model
RGB is the standard for the display of colors on computer monitors and TV sets. But it is not a very good
way of describing colors. How, for example, would you define light-brown using RGB? As we shall see also
in Chapter 13, some colors are not realizable with the RGB model in that they would require negative
values of one or two of the RGB components. In general, 24-bit RGB images are managed in much the
same way as grayscale. We can save the color values to a matrix and view the result:
Note now that the pixel values consist of a list of three values, giving the red, green, and blue components
of the color of the given pixel.
An important difference between this type of image and a grayscale image can be seen by the command
which returns three values: the number of rows, columns, and “pages” of b, which is a three-dimensional
matrix, also called a multidimensional array. Each system can handle arrays of any dimension, and b is
an example. We can think of b as being a stack of three matrices, each of the same size.
In Python:
To obtain any of the RGB values at a given location, we use indexing methods similar to above. For
example,
returns the second color value (green) at the pixel in row 100 and column 200. If we want all the color
values at that point, we can use
However, MATLAB and Octave allow a convenient shortcut for listing all values along a particular
dimension just using a colon on its own:
This can be done similarly in Python:
(Recall that indexing in Python starts at zero, so to obtain the same results as with MATLAB and Octave,
the indices need to be one less.)
returns the red, green, and blue values of the pixel at column 200, row 100. Notice that the order of
indexing is the same as that which is provided by the impixelinfo command. This is opposite to the
row, column order for matrix indexing. This command also applies to grayscale images:
Again, three values are returned, but since w is a single two-dimensional matrix, all three values will be the
same.
Note that in Octave, the command impixel will in fact produce a 3 × 3 matrix of values; the three
columns however will be the same. If we just want the values once, then:
produces a nice color image of an emu. However, the pixel values, rather than being three integers as they
were for the RGB image above, are three fractions between 0 and 1, for example:
we obtain a dark, barely distinguishable image, with single integer gray values, indicating that em is being
interpreted as a single grayscale image.
In fact the image emu.png is an example of an indexed image, consisting of two matrices: a color map,
and an index to the color map. Assigning the image to a single matrix picks up only the index; we need to
obtain the color map as well:
MATLAB and Octave store the RGB values of an indexed image as values of type double, with values
between 0 and 1. To obtain RGB values at any value:
To find the color values at this point, note that the color indexing is done with eight bits, hence the first
index value is zero. Thus, index value 37 is in fact the 38th row of the color map:
Python automatically converts an indexed image to a true-color image as the image file is read:
This last shows how to obtain information comparable to that obtained with MATLAB and Octave.
Much of this information is not useful to us; but we can see the size of the image in pixels, the size of the
file (in bytes), the number of bits per pixel (this is given by BitDepth), and the color type (in this case
“indexed”).
For comparison, let's look at the output of a true color file (showing only the first few lines of the output),
this time using MATLAB:
Now we shall test this function on a binary image, in Octave:
What is going on here? We have a binary image, and yet the color type is given as either “indexed” or
“grayscale.” The fact is that the imfinfo command in both MATLAB nor Octave has no value such as
“Binary”, “Logical” or “Boolean” for ColorType. A binary image is just considered to be a special case of a
grayscale image which has only two intensities. However, we can see that circles.png is a binary image
since the number of bits per pixel is only one.
In Chapter 3 we shall see that a binary image matrix, as distinct from a binary image file, can have the
numerical data type Logical.
To obtain image information in Python, we need to invoke one of the libraries that supports the metadata
from an image. For TIFF and JPEG images, such data is known as EXIF data, and the Python exifread
library may be used:
Some of the output is not shown here. For images of other types, it is easiest to invoke a system call to
something like “ExifTool”1:
logical Boolean 0 or 1
and Python uses “float.” There are others, but those listed will be sufficient for all our work with images.
Notice that, strictly speaking, logical is not a numeric type. However, we shall see that some image use
this particular type. These data types are also functions, and we can convert from one type to another. For
example:
Exploring the Variety of Random
Documents with Different Content
The Project Gutenberg eBook of Le Legs de 30.000
dollars et autres contes
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.
Language: French
DU MÊME AUTEUR
Contes choisis, traduits par Gabriel de Lautrec et précédés d’une
1 vol.
étude sur l’humour
Exploits de Tom Sawyer détective et autres nouvelles, traduits
1 vol.
par François de Gail
Un Pari de Milliardaires, et autres nouvelles, traduits par
1 vol.
François de Gail
Le Prétendant américain, roman traduit par François de Gail 1 vol.
Plus fort que Sherlock Holmès, traduit par François de Gail 1 vol.
Le Capitaine tempête, et autres contes, traduits par Gabriel de
1 vol.
Lautrec
Les Peterkins, et autres contes, traduits par François de Gail 1 vol.
MARK TWAIN
Le
Legs de 30.000 dollars
ET AUTRES CONTES
TRADUITS ET PRÉCÉDÉS D’UNE ÉTUDE SUR L’AUTEUR
PAR
MICHEL EPUY
CINQUIÈME ÉDITION
PARIS
MERCURE DE FRANCE
XXVI, RUE DE CONDÉ, XXVI
MCMXIX
JUSTIFICATION DU TIRAGE
(SAMUEL CLEMENS)
En 1835, toutes les régions situées à l’ouest du Mississipi ne possédaient
guère plus de cinq cent mille habitants blancs au lieu des vingt-deux
millions qui s’y trouvent aujourd’hui. Dans ces espaces immenses et à peu
près inexplorés, les États-Unis ne comptaient que deux «États» organisés et
policés, la Louisiane et le Missouri; tout le reste était «territoire» sans limite
fixe et sans gouvernement. Deux villes seulement, la Nouvelle-Orléans et
Saint-Louis, groupaient quelques milliers d’habitants, et si l’on excepte la
Nouvelle-Orléans, qui est d’ailleurs à l’Orient du fleuve, on peut dire qu’il
n’y avait dans ces vastes régions qu’une seule ville, Saint-Louis, qui fut
longtemps la Métropole, la reine, le Paris de ces pays... Or Saint-Louis
n’avait alors que 10.000 habitants.
C’est dans ces solitudes, en un petit hameau perdu (Florida, du district
de Missouri), que naquit Samuel Langhorne Clemens, le 30 novembre
1835. Ses parents s’étaient aventurés jusque-là pour profiter des grandes
occasions qui devaient fatalement se produire en ces pays neufs, mais le
hasard déjoua tous leurs plans, et, soixante ans après leur séjour à Florida,
le hameau ne comptait pas plus de cent vingt-cinq habitants. Quand nous
entendons parler de villes qui se fondent et se peuplent de vingt mille
habitants en quelques mois, quand nous lisons les récits de ces miraculeuses
fortunes réalisées dans ce Far-West en moins de dix ans, il semble que tous
ceux qui s’y rendirent autrefois auraient dû arriver inévitablement à quelque
résultat... Mais il n’en fut pas ainsi, et les parents de Mark Twain paraissent
avoir passé à côté de toutes les merveilleuses occasions qui se multipliaient
en vain sous leurs pas. Ils auraient pu acheter tout l’emplacement où s’élève
aujourd’hui la ville de Chicago pour une paire de bottes. Ils auraient pu
élever une ferme à l’endroit où s’est formé le quartier aristocratique de
Saint-Louis... Au lieu de cela, ils vécurent quelque temps à Columbia, dans
le Kentucky, dans une petite propriété que cultivaient leurs six esclaves,
puis se rendirent à Jamestown, sur un plateau du Tennessee. Quand John
Marshall Clemens prit possession de 80.000 acres de terres sur ce plateau, il
crut que sa fortune était faite... mais les chemins de fer et les villes
semblaient prendre plaisir à éviter les possessions de la famille Clemens.
Elle émigra encore, alla d’abord à Florida,—qui semblait appelé à de
grandes destinées au temps de la Présidence de Jackson;—puis enfin en un
autre hameau qui s’appelait Hannibal.
Si Samuel Clemens naquit dans une famille pauvre, il hérita du moins
d’un sang pur. Ses ancêtres étaient établis dans les États du Sud depuis fort
longtemps. Son père, John Marshall Clemens, de l’État de Virginie,
descendait de Gregory Clemens, un des juges qui condamnèrent Charles Iᵉʳ
à mort. Un cousin du père de Twain, Jérémiah Clemens, représenta l’État
d’Alabama au Congrès, de 1849 à 1853.
Par sa mère, Jane Lampton (ou mieux Lambton), le jeune Twain
descendait des Lambton de Durham (Angleterre), famille qui possède la
même propriété depuis le douzième siècle jusqu’aujourd’hui. Quelques
représentants de cette famille avaient émigré de bonne heure en Nouvelle-
Angleterre, et, leurs descendants s’étant aventurés toujours plus loin dans
les terres inexplorées, Jane Lampton était née dans quelque hutte en troncs
d’arbres du Kentucky. Cet État passait alors pour une pépinière de jolies
filles, et tout porte à penser que la jeune maman de Mark Twain joignit de
grandes qualités de cœur et d’esprit à sa remarquable beauté.
John Marshall Clemens avait fait des études de droit en Virginie et il
exerça pendant quelque temps les fonctions de juge de comté (juge de paix)
de Hannibal. Ce fut le seul maître du jeune Samuel, et lorsqu’il mourut, en
mars 1847, Twain cessa d’étudier. Il avait été jusqu’alors assez chétif et son
père n’avait pas voulu le surmener, bien qu’il eût été fort désireux de
donner une solide instruction à ses enfants. Ce fut assurément une bonne
chose pour Twain de ne pas subir l’empreinte uniforme de la culture
classique. Ce sont les hommes, les livres, les voyages et tous les incidents
d’une vie aventureuse qui ont formé son esprit, et c’est par là sans doute
qu’il acquit ce tempérament si unique, personnel et original.
Après la mort de son père, il entra dans une petite imprimerie de village
où son frère aîné Orion dirigeait, composait et fabriquait de toutes pièces
une petite feuille hebdomadaire. L’enfant de 13 ans fut employé un peu
dans tous les «services» et, en l’absence de son frère, il se révéla journaliste
de race en illustrant ses articles au moyen de planches de bois
grossièrement gravées à l’aide d’une petite hachette. Le numéro où parurent
ces illustrations éveilla l’attention de tous les lecteurs du village, mais
«n’excita nullement leur admiration», ajouta son frère en racontant
l’incident.
Dès son jeune âge, Samuel avait témoigné d’un tempérament fort
aventureux. Avant d’entrer à l’imprimerie de son frère, il fut retiré trois fois
du Mississipi et six fois de la Rivière de l’Ours, et chaque fois il avait bien
manqué y rester: mais sa mère, douée d’une imperturbable confiance en
l’avenir, avait simplement dit: «Les gens destinés à être pendus ne se noient
jamais!»
Vers dix-huit ans, le jeune Clemens commença à se trouver trop à l’étroit
dans ce petit village d’Hannibal. Il partit et alla d’imprimerie en imprimerie
à travers tous les États de l’Est. Il vit l’exposition de New-York en 1855,
visita Boston et d’autres villes, vivant de rien, travaillant quelques semaines
dans les imprimeries où il parvenait à s’embaucher. A la fin, à bout de
ressources, il rentra chez lui, travailla dans quelques autres imprimeries à
Saint-Louis, Muscatine et Keokuk jusqu’en 1857. Ce fut à ce moment qu’il
changea de métier pour la première fois: il obtint de son ami Horace Bixby
la faveur de devenir son élève... Horace Bixby était pilote sur le Mississipi.
Le charme de cette existence paresseuse sur les eaux tranquilles du fleuve
attirait le jeune homme et il en devait garder toute sa vie une empreinte
indélébile. Dans Tom Sawyer, Huckleberry Finn, La Vie sur le Mississipi,
Twain a abondamment parlé de ce beau métier rendu inutile maintenant par
les progrès de la civilisation.
Assurément, les grands traits innés d’un caractère se développent
toujours et malgré toutes les circonstances, mais on est en droit de se
demander ce que serait devenue la gaieté communicative et gamine de
Twain s’il avait été élevé à Ecclefechan au lieu de l’être à Hannibal, et en
quoi se serait métamorphosée la gravité de Carlyle s’il avait passé sa
jeunesse à Hannibal et non à Ecclefechan...
Il y a cinquante ans, un pilote sur le Mississipi était un grand
personnage. D’une habileté consommée, il était maître absolu du bord, et à
ce moment-là un vice-président des États-Unis ne gagnait pas plus que lui.
C’était une très haute position, mais fort difficile à acquérir; et Samuel
Clemens dut s’imposer un incroyable labeur, un travail auprès duquel la
préparation au doctorat en philosophie n’est rien. Pour apprécier à sa juste
valeur l’éducation d’un pilote, il faut lire toute la Vie sur le Mississipi...
mais peut-être ce petit extrait pourra-t-il donner une faible idée d’un des
éléments de cette éducation: la culture intensive de la mémoire:
«Il y a une faculté qu’avant tout autre un pilote doit posséder et
développer d’une façon intense, c’est la mémoire. Il n’est pas suffisant
d’avoir une bonne mémoire, il faut l’avoir parfaite. Le pilote ne saurait
avoir la moindre défaillance du souvenir ou le moindre doute sur tel ou tel
point du métier, il lui faut toujours savoir clairement et immédiatement.
Quel mépris aurait accueilli le pilote d’autrefois s’il avait prononcé un
faible «Je crois» ou «Peut-être» au moment où il fallait une décision
prompte et une assurance résolue! Il est très difficile de se rendre compte du
nombre infini de détails qu’il faut avoir présents à l’esprit quand on conduit
un bateau le long du fleuve encombré, à travers des passes instables et par
des fonds mouvants. Essayez de suivre une des rues de New-York en
observant les détails de chaque maison, la disposition, la couleur, la nature
des murs, des portes, des fenêtres, le caractère de chaque magasin,
l’emplacement des bouches d’égout, etc., etc. Tâchez de vous souvenir de
tous ces détails au point d’être capable de les retrouver immédiatement par
la nuit la plus noire... Imaginez maintenant que vous faites la même étude
pour une rue de plus de 4.000 kilomètres de longueur, et vous aurez une
idée encore très atténuée de tout ce que doit savoir un pilote du Mississipi.
De plus, il faut se dire que chacun de ces détails change constamment de
place suivant une certaine loi et suivant certaines conditions climatériques...
Vous comprendrez peut-être alors ce que peut être la responsabilité d’un
homme qui doit connaître tout cela sous peine de mener un bateau et des
centaines de vies à la perdition.
«Je crois, continue Mark Twain, que la mémoire d’un pilote est une
merveille. J’ai connu des personnes capables de réciter l’Ancien et le
Nouveau Testament d’un bout à l’autre, en commençant par l’Apocalypse
aussi bien que par la Genèse, mais je proclame que ce tour de force n’est
rien relativement au travail que doit déployer à chaque instant un bon
pilote.»
Le jeune Clemens s’exerça et étudia longtemps; il reçut enfin son brevet
de pilote, eut un emploi régulier et se considérait comme établi lorsque
éclata la guerre civile qui brisa cette jeune carrière. La navigation
commerciale sur le Mississipi cessa complètement, et les petits bateaux de
guerre, les canonnières noires, remplacèrent les grands paquebots blancs
dont les pilotes avaient été les maîtres incontestés. Clemens se trouvait à la
Nouvelle-Orléans lorsque la Louisiane se sépara des autres États; il partit
immédiatement et remonta le fleuve. Chaque jour son bateau fut arrêté par
des canonnières, et pendant la dernière nuit du voyage, juste en aval de
Saint-Louis, sa cheminée fut coupée en deux par des boulets tirés des
baraquements de Jefferson.
Élevé dans le Sud, Mark Twain sympathisait naturellement avec les
Esclavagistes. En juin, il rejoignit les Sudistes dans le Missouri et s’enrôla
comme second lieutenant sous les ordres du général Tom Harris. Sa carrière
militaire ne dura que deux semaines. Après avoir échappé de peu à
l’honneur d’être capturé par le colonel Ulysse Grant, il donna sa démission,
prétextant une trop grande fatigue. Dans ses œuvres, Twain n’a jamais parlé
de cette courte expérience qu’avec ironie et il l’a présentée souvent comme
un épisode burlesque, mais si l’on en croit les rapports officiels et la
correspondance des généraux Sudistes, il se serait très valeureusement
conduit... Ce n’est donc pas le courage qui lui manqua... Il vaut mieux
penser que ses sympathies esclavagistes n’étaient que superficielles et qu’en
lui se cachaient des sentiments de justice et d’humanité auxquels il se
décida à obéir. C’est du reste ce qui lui est arrivé constamment durant tout
le reste de sa vie: jamais il ne consentit à avouer les élans de son grand
cœur et il cacha constamment ses bonnes actions sous le voile de son ironie,
masquant le sanglot par le rire...
Mais revenons à la biographie. Son frère Orion, étant persona grata
auprès des ministres du Président Lincoln, réussit à se faire nommer
premier secrétaire du territoire de Névada. Il offrit aussitôt à son cadet de
l’accompagner en qualité de secrétaire privé, avec «rien à faire, mais sans
traitement». Les deux frères partirent ensemble et firent un magnifique
voyage à travers la Prairie.
Pendant toute une année, Mark Twain parcourut en explorateur et
chasseur les territoires avoisinant les mines d’argent de Humboldt et
d’Esmeralda. C’est à ce moment qu’il fit ses premiers débuts d’écrivain. Il
envoya quelques lettres au journal de la ville la plus proche, à l’Entreprise
Territoriale de Virginia City. Cela attira l’attention du propriétaire du
journal, M. J. T. Goodman, qui lui demanda une correspondance régulière.
Les lettres du jeune Clemens firent une certaine sensation... Il ne s’agissait
alors que de l’organisation de ces contrées incultes et non policées, mais
dans ses lettres hebdomadaires, Samuel Clemens disait si rudement leur fait
aux législateurs et aux aventuriers que, à chaque séance du Conseil d’État,
un nouveau scandale éclatait, chaque député se voyant véhémentement
accusé de quelque énormité... Voyant cela, le correspondant de l’Entreprise
Territoriale redoubla ses coups et se décida à signer ses chroniques; il
adopta comme pseudonyme le cri par lequel on annonçait autrefois la
profondeur des eaux en naviguant sur le Mississipi: Mark three! Quarter
twain! Half twain! Mark twain![A].
A cette époque le duel était fort répandu, et toujours sérieux. L’arme était
le revolver de marine Colt. Les adversaires étaient placés à quinze pas et
avaient chacun six coups; ils se blessaient presque toujours mortellement.
Or, Mark Twain, dont les articles suscitaient beaucoup de colères, eut une
querelle avec M. Laird, directeur du journal l’Union de Virginia City, et une
rencontre fut jugée nécessaire. Aucun des deux combattants n’était bien fort
au revolver; aussi se mirent-ils tous deux à s’exercer activement. Mark
Twain tiraillait dans les bois, sous la direction de son second, lorsqu’on
entendit les coups de feu de l’adversaire, qui s’exerçait non loin de là. Le
compagnon de Twain lui prit alors son arme et à trente mètres abattit un
oiseau... L’adversaire survint alors, vit l’oiseau, demanda qui l’avait tué. Le
second de l’humoriste déclara que c’était Twain... et M. Laird, après
quelques instants de réflexion, offrit des excuses publiques.
Cet incident eut des conséquences importantes. Les duellistes étaient
pourchassés avec rigueur, et, apprenant qu’il était recherché par la police,
Twain dut fuir jusqu’en Californie. A San-Francisco, il trouva un poste de
rédacteur au Morning Call, mais ce travail routinier ne lui convenait pas et
il alla tenter la fortune auprès de mines d’or. Il ne découvrit heureusement
aucun filon précieux, et sut échapper à la terrible fascination qui retient tant
de milliers d’hommes dans les abominables baraquements des placers. De
retour à San-Francisco, trois mois après, il écrivit encore quelques lettres à
son ancien journal de Virginie, puis accepta d’aller étudier la question de la
culture de la canne à sucre à Hawaï pour le compte du journal l’Union de
Sacramento. Ce fut à Honolulu qu’il accomplit son premier exploit de
journaliste. Le clipper Hornet avait fait naufrage et arrivait à Honolulu avec
quelques survivants qui avaient vécu de quelques boîtes de conserves
pendant quarante-trois jours. Mark Twain leur fit raconter leurs aventures,
travailla toute le nuit et envoya dès le lendemain à son journal un
merveilleux récit du naufragé. Ce récit arrivé le premier à San-Francisco, fit
sensation, et l’Union en témoigna sa reconnaissance à Mark Twain en
décuplant ses honoraires ordinaires.
Après avoir passé six mois dans les îles Sandwich, Mark Twain revint en
Californie et fit sur son voyage quelques conférences qui furent bien
accueillies. En 1867, il se rendit dans l’Amérique Centrale, traversa
l’isthme de Panama, revint dans les États de l’Est et accepta d’accompagner
un pèlerinage de Quakers en Terre-Sainte, en qualité de correspondant de
l’Alta California de San-Francisco. Il visita alors les principaux ports
Méditerranéens et la Mer Noire. C’est de ce voyage qu’est née la principale
inspiration des Innocents à l’Étranger, le livre qui assura la célébrité de
Mark Twain. Il avait déjà écrit, il est vrai, la Grenouille Sauteuse, cette
histoire d’une bonne farce bien yankee, mais ce fut cette peinture des
Innocents à l’Étranger qui éveilla l’attention. Un critique digne de foi
affirme que les cent mille exemplaires—auxquels rêve tout romancier—se
vendirent en un an.
Les quatre années suivantes furent consacrées à des tournées de
conférences: travail désagréable, mais lucratif. Mark Twain a toujours eu
horreur de s’exhiber sur une plate-forme quelconque, et cependant c’est à
cet exercice qu’il dut de gagner si vite la faveur du public. Il fit partie, avec
Henry Ward Beecher, d’un petit groupe d’hommes que chaque municipalité
de petite ville recherchait à tout prix et dont le nom seul assurait la réussite
d’une série de conférences.
La tournée qui comprenait la Cité des Quakers eut un résultat heureux et
important. Par son frère, qui faisait partie de la bande, M. Samuel Clemens
fit la connaissance de Miss Olivia L. Langdon, et il en résulta, en février
1870, le plus gentil mariage que l’on puisse rêver. Quatre enfants naquirent
de cette union. Le premier ne vécut que deux ans. Le second, une fille,
Suzanne-Olivia, douée d’une intelligence remarquable, mourut à l’âge de
vingt-quatre ans. Deux autres filles naquirent en 1874 et en 1880. L’une
d’elles, qui avait toujours vécu avec son père, est morte dans son bain en
1909, moins d’un an avant Mark Twain lui-même.
Après son mariage, Twain résida d’abord à Buffalo, dans une propriété
que M. Langdon avait donnée à sa fille en cadeau de noces. Il acheta une
part d’administrateur dans un journal quotidien, l’Express de Buffalo,
auquel il collabora activement. Mais ce travail au jour le jour ne lui
convenait pas et ce fut là sa dernière incursion dans le domaine du
journalisme. Au bout d’une année, il renonça à ses fonctions; désormais
assuré de gagner tout l’argent qu’il voudrait en écrivant à sa fantaisie, il se
vit libre de choisir le moment et le lieu de ses travaux.
Il y avait alors à Hartford un petit milieu littéraire très intéressant. Cette
petite ville, fort pittoresque et très tranquille, avait attiré auprès d’elle
quelques hommes d’élite, et son charme captiva le célèbre humoriste. Il s’y
établit en octobre 1871 et bientôt après y bâtit une maison dont on parla
beaucoup aux États-Unis. C’est qu’elle avait été bâtie selon des plans tout
nouveaux et qu’elle devait servir de protestation contre le mauvais goût de
l’architecture domestique en Amérique. Pendant plusieurs années, cette
maison fut un objet d’étonnement pour le touriste ingénu. Le simple fait que
ses chambres fussent disposées pour la commodité de ceux qui devaient les
occuper, que ses fenêtres, ses vérandas, ses tourelles fussent construites en
vue du confort et de la beauté, eut le don de réveiller l’apathie des critiques
et de causer de grandes discussions dans tous les journaux et dans toutes les
revues des États-Unis, à propos de ce qu’on appelait «la nouvelle farce de
Mark Twain».
Mais avec le travail et le succès, le tempérament littéraire de Mark
Twain achevait de se développer. Il publia Roughing It, qu’il avait écrit en
1872 et dont le succès égala presque celui des Innocents. C’était encore un
simple récit humoristique des expériences personnelles de l’auteur, mais il y
ajoutait cette fois de brillantes descriptions. Avec l’Age d’Or qui parut la
même année et qu’il avait écrit en collaboration avec Charles Dudley
Warner, l’humoriste commença à se transformer en philosophe. Tom
Sawyer, qui parut en 1876, est une piquante étude psychologique, et le
roman qui lui fait suite, Huckleberry Finn (publié neuf ans plus tard), est
une étude fort émouvante du développement progressif d’une âme inculte et
fruste. Le Prince et le Pauvre (1882), Un Yankee à la Cour du Roi Arthur
(1890) et Pudd’nhead Wilson (1893) sont tout vibrants de sympathie, de
tendresse et de délicate sentimentalité, l’humour y occupe une place
inférieure, et c’est ce qu’on ne sait pas assez en France, bien que Mark
Twain n’ait jamais écrit un livre d’où l’humour fût totalement absent.
En 1894 et 1895 parut en périodique un livre anonyme intitulé:
Souvenirs personnels sur Jeanne d’Arc. La plupart des critiques
l’attribuèrent à M. X. ou à M. Y... Aucun ne songea à Mark Twain, et
pourtant ce livre était bien caractéristique, à chaque page se manifestait
cette tranquille audace du grand homme qui savait si bien parler en riant des
choses les plus respectables et les plus tristes sans jamais tomber dans la
trivialité. Cette œuvre marque une date dans la vie littéraire de Mark Twain,
il y fait preuve d’une puissance d’émotion qu’on n’aurait jamais
soupçonnée chez l’auteur de la Grenouille Sauteuse. Dans les Innocents
même Twain n’avait que de l’esprit, maintenant il a du cœur, il a de l’âme.
Et à côté de ce développement moral, se manifeste aussi un
développement intellectuel. Le Mark Twain des Innocents avait le regard
perçant et observateur; il savait trouver des mots drôles et des saillies
spirituelles, mais il avouait franchement qu’il ne savait pas «ce que diable
pouvait bien être la Renaissance». Après les Souvenirs personnels sur
Jeanne d’Arc, l’humoriste bruyant des premières années est devenu un lettré
accompli et un écrivain à qui l’Europe ne peut plus guère offrir de surprises.
En 1873, Mark Twain passa plusieurs mois en Écosse et en Angleterre,
et fit quelques conférences à Londres. Il revint en Europe en 1878, et y
passa un an et demi. A son retour, il publia, presque coup sur coup: Une
promenade à l’Étranger, le Prince et le Pauvre, la Vie sur le Mississipi et
Huckleberry Finn. Il faut noter que ce dernier livre, qui est d’une très haute
portée morale, fut d’abord mal accueilli, sinon par le public, du moins par
les libraires, qui le déclarèrent immoral.
Jusqu’alors, la fortune avait constamment souri aux entreprises de
Twain. On le citait—avec envie—comme un exemple de littérateur
millionnaire qui dédaigne les efforts des débutants pauvres et ne se soucie
plus de ce qu’on peut dire ou ne pas dire de lui. Mais, à ce moment
commencèrent des spéculations malheureuses, qui finirent par emporter tout
le fruit de son pénible labeur et le laissèrent chargé de dettes contractées par
d’autres. En 1885, il avait commandité la maison d’édition Charles L.
Webster et Cⁱᵉ à New-York. Les affaires de cette maison commencèrent
brillamment. Elle édita les Mémoires du Général Grant, dont six cent mille
exemplaires se vendirent en peu de temps. Le premier chèque reçu par les
héritiers de Grant fut de 150.000 dollars, et quelques mois après, ils en
reçurent un autre de 200.000 dollars. C’est, croyons-nous, le chèque le plus
considérable qui ait jamais été payé pour un seul ouvrage. Pendant ce
temps, M. Clemens dépensait de fortes sommes à la fabrication d’une
machine typographique qui devait faire merveille. A l’essai, cette machine
fonctionna très bien, mais elle était trop compliquée et coûteuse pour
devenir d’un usage courant, et, après avoir dépensé toute une fortune entre
1886 et 1889 à réaliser ce rêve, Mark Twain dut y renoncer. Après cela, la
maison Webster, mal dirigée, fit faillite; Twain sacrifia encore 65.000
dollars pour essayer de la sauver. Il n’y réussit pas et se trouva enfin engagé
pour 96.000 dollars dans le passif de cette maison.
En 1895 et 1896, il fit le tour du monde, et son récit de voyage,
Following the Equator, paya toutes les dettes dont il avait assumé la
responsabilité. De 1897 à 1899, il parcourut l’Angleterre, la Suisse et
l’Autriche. Il se plut beaucoup à Vienne, où on voulait le retenir. Il y fut
témoin de quelques événements intéressants. Il se trouvait au Reichsrath
autrichien en cette séance mémorable qui fut violemment interrompue par
l’arrivée de soixante agents de police venus pour arrêter seize membres de
l’opposition. Il paraît que cet événement, unique dans les annales
parlementaires, l’impressionna vivement.
Après être demeuré plusieurs années en Amérique, Mark Twain,
septuagénaire, revint encore en Europe: c’était pour être solennellement
reçu docteur de l’Université Anglaise, en même temps que Rudyard
Kipling. En 1909, la mort de sa fille l’affecta beaucoup, et depuis lors,
souffrant d’une maladie de cœur, que l’abus du cigare ne contribuait pas à
guérir, Mark Twain languit et s’éteignit enfin, à l’âge de soixante et quinze
ans, le 20 avril 1910.
Nous laissons aux critiques autorisés le soin d’apprécier comme il
convient l’œuvre littéraire de Mark Twain: nous nous sommes bornés à
donner ici une esquisse biographique du célèbre humoriste, mais, pour
conclure, nous demandons la permission de protester contre les jugements
hâtifs portés par plusieurs auteurs des notices nécrologiques consacrées à
Mark Twain: est-il vrai que Mark Twain n’a été qu’une sorte de bouffon
grossier et sans art, qu’un pince-sans-rire flegmatique, brutal amateur de
lourdes plaisanteries?
Oui, Mark Twain a été cela, au début de sa carrière littéraire, et il faut se
rappeler qu’alors il venait d’être pilote sur le Mississipi, et qu’il s’adressait
à un public de pionniers et de rudes fermiers. Mais à mesure que les années
passaient, le talent de Twain s’affinait, son gros rire s’atténuait, sa
sensibilité, plus cultivée, vibrait chaque jour davantage, et le joyeux conteur
de bonnes farces était devenu, vers soixante ans, un psychologue averti et
un peintre attendri des plus fines nuances du sentiment. Nous pourrions
citer ici, à l’appui de ces affirmations, plusieurs nouvelles toutes pénétrées
de pitié et de tendresse, telles que Mémoires d’une Chienne, Enfer ou
Paradis? etc... Dickens ou Daudet auraient pu signer ces pages émouvantes,
mais le génie de Twain s’est élevé plus haut encore, et dans le Journal
d’Ève, qui est un recueil des toutes premières impressions d’Ève au paradis
terrestre, il a atteint la perfection d’Homère ou de La Fontaine. Ce petit
chef-d’œuvre (qui mériterait d’être édité à part avec les suggestives
illustrations qui l’accompagnent dans le texte anglais) est une merveille de
grâce et d’esprit. Tout y est souple, aisé, souriant, léger et tendre, et nous ne
croyons pas exagérer en disant qu’après avoir lu le Journal d’Ève, c’est à
Voltaire ou à Anatole France que l’on se sent contraint de comparer le
spirituel humoriste américain. Joignons-nous donc de tout cœur à ses
compatriotes pour déplorer la perte de ce grand homme.
Michel Epuy.
LE LEGS DE 30.000 DOLLARS
Lakeside était un gentil petit village de trois à quatre mille habitants; on
pouvait même le qualifier de joli pour un village du Far-West. Les facilités
religieuses eussent été assez nombreuses pour une ville de trente-cinq mille
âmes. C’est toujours ainsi dans le Far-West et dans le Midi où tout le monde
est religieux et où toutes les sectes protestantes sont représentées par un
édifice particulier. A côté de cela, les différentes classes sociales étaient
inconnues à Lakeside, inavouées en tout cas; tout le monde connaissait tout
le monde et son chien, et la sociabilité la plus aimable y régnait.
Saladin Foster était comptable dans un des principaux magasins et le
seul de cette profession à Lakeside qui fût bien salarié. Il avait trente-cinq
ans et était dans la même maison depuis quatorze ans. Il avait débuté la
semaine après son mariage, à quatre cents dollars par an. Depuis quatre ans,
il avait régulièrement obtenu cent dollars de plus chaque année. Après cela,
son salaire était resté à huit cents dollars—un joli chiffre vraiment—et tout
le monde reconnaissait qu’il en était digne.
Electra, sa femme, était une compagne capable, quoiqu’elle aimât trop
(comme lui) à faire de beaux rêves et à bâtir des châteaux au pays des
songes. La première chose qu’elle fit après son mariage, tout enfant qu’elle
fût, c’est-à-dire à dix-neuf ans à peine, ce fut d’acheter un carré de terrain
sur les limites du village et de le payer comptant, vingt-cinq dollars, soit
toute sa fortune. (Saladin, lui, n’avait que dix dollars à lui à ce moment-là.)
Elle y créa un jardin potager, le fit travailler par le plus proche voisin avec
qui elle partagea les bénéfices et cela lui rapporta cent pour un par an. Elle
préleva sur la première année le salaire de Saladin, trente dollars qu’elle mit
à la Caisse d’épargne, soixante sur la seconde année, cent sur la troisième et
cent cinquante sur la quatrième, le traitement de son mari étant alors de huit
cents dollars. Deux enfants étaient arrivés qui avaient augmenté les
dépenses; néanmoins, depuis ce moment-là, elle mit de côté régulièrement
ses cent cinquante dollars par an. Au bout de sept ans, elle fit construire et
meubla confortablement une maison de deux mille dollars au milieu de son
carré de terrain. Elle paya tout de suite la moitié de cette somme et
emménagea. Sept ans plus tard, elle s’était entièrement acquittée de sa dette
et elle possédait plusieurs centaines de dollars tous bien placés.
Depuis longtemps elle avait agrandi son terrain et en avait revendu avec
profit des lots à des gens de commerce agréable qui désiraient construire.
De cette façon elle s’était procuré des voisins sympathiques. Elle avait un
revenu indépendant en placements sûrs d’environ cent dollars par an. Ses
enfants grandissaient et jouissaient d’une florissante santé. Elle était donc
une femme heureuse par ses enfants, comme le mari et les enfants étaient
heureux par elle.
C’est à ce moment que cette histoire commence. La plus jeune des
enfants, Clytemnestra, appelée familièrement Clytie, avait onze ans; sa
sœur, Gwendolen, appelée familièrement Gwen, avait treize ans. C’étaient
de gentilles petites filles et assez jolies. Leurs noms trahissaient une teinte
romanesque dans l’âme des parents, et les noms des parents indiquaient que
cette teinte était héréditaire. C’était une famille affectueuse, d’où vient que
ces quatre membres avaient des petits noms. Le petit nom de Saladin était
curieux et pas de son sexe, on l’appelait Sally. Il en était de même d’Électra,
on l’appelait Aleck. Du matin au soir, Sally était un vaillant comptable et un
bon vendeur. Du matin au soir, Aleck était une bonne mère, une
incomparable ménagère et une femme adroite et réfléchie. Mais, le soir
venu, dans la douce intimité de la chambre commune, ils mettaient tous
deux de côté le monde et son trafic pour aller vivre dans un autre monde
plus idéal et plus beau. Ils lisaient des romans, ils faisaient des rêves d’or,
ils frayaient avec les rois et les princes, avec les grands seigneurs hautains
et les dames majestueuses dans le tumulte, la splendeur et l’éblouissement
des merveilleux palais et des très vieux châteaux.
II
Alors survint une grande nouvelle, une nouvelle étonnante et joyeuse, en
vérité. Elle arriva d’un district voisin où vivait le seul parent que
possédaient les Foster. C’était un parent de Sally, une vague espèce d’oncle
ou de cousin au second ou au troisième degré. Il s’appelait Tilbury Foster.
C’était un célibataire de soixante-dix ans réputé à son aise et par conséquent
aigri contre le monde et misanthrope acharné. Autrefois Sally avait essayé
de renouer avec lui, par lettres, mais il n’avait pas recommencé. Mais un
beau jour, Tilbury écrivit à Sally disant qu’il allait mourir prochainement et
qu’il lui laisserait trente mille dollars en espèces. Cela, non pas par affection
pour lui, mais parce qu’il devait à l’argent toutes ses peines et tous ses
soucis et qu’il désirait le placer là où il avait bon espoir de le voir continuer
son œuvre nuisible. L’héritage serait confirmé dans son testament, etc., et
lui serait intégralement payé le lendemain de son décès. Cela à condition
que Sally puisse prouver aux exécuteurs testamentaires qu’il n’avait parlé
du legs à personne, ni de vive voix, ni par lettre, qu’il n’avait fait aucune
enquête concernant la marche du moribond vers les régions éternelles et
qu’il n’avait pas assisté aux funérailles.
Dès qu’Aleck se fut remise de l’émotion intense causée par la lettre, elle
écrivit à la ville où résidait son parent pour s’abonner au journal local. Le
mari et la femme prirent ensuite l’un devant l’autre l’engagement solennel
de ne jamais divulguer la grande nouvelle à qui que ce fût pendant que leur
parent vivrait. Ils craignaient que quelque personne ignorante ne rapportât
ces paroles au lit de mort de Tilbury en les dénaturant et en laissant croire
qu’ils étaient reconnaissants de l’héritage et que, malgré la défense qui leur
en avait été faite, ils le disaient et le publiaient.
Pendant le reste de la journée, Sally ne créa que trouble et confusion
dans ses livres et Aleck ne put s’appliquer à ses affaires, elle ne put prendre
un pot de fleurs, un livre ou un morceau de bois sans oublier
immédiatement ce qu’elle pensait en faire... car ils rêvaient tous deux aux
«Tren...te mille dollars!»
Toute la journée, la musique de ces mots inspirateurs chanta dans la tête
du joyeux couple. Depuis le jour de son mariage, Aleck avait tenu une main
ferme sur la bourse et Sally avait rarement connu le privilège de gaspiller
un centime pour des choses inutiles...
«Tren...te mille dollars!»
La chanson continuait toujours. Une énorme somme! Une somme
impossible à concevoir. Du matin du soir, Aleck fut absorbée par des projets
de placement et Sally fit des plans sur la manière de dépenser cet argent.
On ne lut pas de roman ce soir-là. Les enfants se retirèrent de bonne
heure, car les parents étaient silencieux, distraits et étrangement préoccupés.
Les baisers du soir furent donnés dans le vide et ne reçurent aucune
réponse, les parents ne les avaient même pas sentis et les enfants étaient
partis depuis une heure quand les parents s’en aperçurent. Deux crayons
avaient travaillé pendant cette heure-là à faire des plans et prendre des
notes. Ce fut Sally qui le premier rompit le silence. Il s’écria tout transporté: