0% found this document useful (0 votes)
12 views77 pages

Image Processing and Machine Learning Volume 1 Foundations of Image Processing 1st Edition Cuevas Instant Download

The document is about 'Image Processing and Machine Learning Volume 1', which serves as a foundational textbook covering essential concepts and techniques in image processing. It discusses various methods such as pixel operations, spatial filtering, edge detection, and segmentation, providing theoretical foundations and practical applications. The book is aimed at students, instructors, app developers, and engineers interested in the field of image processing.

Uploaded by

rodalamengue
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views77 pages

Image Processing and Machine Learning Volume 1 Foundations of Image Processing 1st Edition Cuevas Instant Download

The document is about 'Image Processing and Machine Learning Volume 1', which serves as a foundational textbook covering essential concepts and techniques in image processing. It discusses various methods such as pixel operations, spatial filtering, edge detection, and segmentation, providing theoretical foundations and practical applications. The book is aimed at students, instructors, app developers, and engineers interested in the field of image processing.

Uploaded by

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

Image Processing And Machine Learning Volume 1

Foundations Of Image Processing 1st Edition


Cuevas download

https://ebookbell.com/product/image-processing-and-machine-
learning-volume-1-foundations-of-image-processing-1st-edition-
cuevas-54734782

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Image Processing And Machine Learning Volume 2 Advanced Topics In


Image Analysis And Machine Learning 1st Edition Erik Cuevas

https://ebookbell.com/product/image-processing-and-machine-learning-
volume-2-advanced-topics-in-image-analysis-and-machine-learning-1st-
edition-erik-cuevas-54730812

Artificial Intelligence And Machine Learning Techniques In Image


Processing And Computer Vision Karm Veer Arya Ciro Rodriguez Rodriguez
Saurabh Singh Abhishek Singhal

https://ebookbell.com/product/artificial-intelligence-and-machine-
learning-techniques-in-image-processing-and-computer-vision-karm-veer-
arya-ciro-rodriguez-rodriguez-saurabh-singh-abhishek-singhal-55754878

Applications Of Optimization And Machine Learning In Image Processing


And Iot Nidhi Gupta

https://ebookbell.com/product/applications-of-optimization-and-
machine-learning-in-image-processing-and-iot-nidhi-gupta-52601230

Python For Computer Vision Unlocking Image Processing And Machine


Learning With Python Mark Jackson

https://ebookbell.com/product/python-for-computer-vision-unlocking-
image-processing-and-machine-learning-with-python-mark-
jackson-147611288
Artificial Intelligence And Machine Learning In 2d3d Medical Image
Processing 1st Edition Rohit Raja Editor

https://ebookbell.com/product/artificial-intelligence-and-machine-
learning-in-2d3d-medical-image-processing-1st-edition-rohit-raja-
editor-34710588

Artificial Neural Networks And Machine Learning Icann 2019 Image


Processing 28th International Conference On Artificial Neural Networks
Munich Germany September 1719 2019 Proceedings Part Iii 1st Ed 2019
Igor V Tetko
https://ebookbell.com/product/artificial-neural-networks-and-machine-
learning-icann-2019-image-processing-28th-international-conference-on-
artificial-neural-networks-munich-germany-
september-1719-2019-proceedings-part-iii-1st-ed-2019-igor-v-
tetko-10800306

Advances In Soft Computing And Machine Learning In Image Processing


1st Edition Aboul Ella Hassanien

https://ebookbell.com/product/advances-in-soft-computing-and-machine-
learning-in-image-processing-1st-edition-aboul-ella-hassanien-6789716

Fusion Of Artificial Intelligence And Machine Learning For Advanced


Image Processing Data Analysis And Cyber Security Arun Kumar Rana

https://ebookbell.com/product/fusion-of-artificial-intelligence-and-
machine-learning-for-advanced-image-processing-data-analysis-and-
cyber-security-arun-kumar-rana-59788584

Fusion Of Artificial Intelligence And Machine Learning For Advanced


Image Processing Data Analysis And Cyber Security First Edition 1st
Edition Arun Kumar Rana Rashmi Gupta Sharad Sharma Ahmed A Elngar
Sachin Dhawan
https://ebookbell.com/product/fusion-of-artificial-intelligence-and-
machine-learning-for-advanced-image-processing-data-analysis-and-
cyber-security-first-edition-1st-edition-arun-kumar-rana-rashmi-gupta-
sharad-sharma-ahmed-a-elngar-sachin-dhawan-59788592
Image Processing and
Machine Learning,
­Volume 1
Image processing and machine learning are used in conjunction to analyze
and understand images. Where image processing is used to pre-process
images using techniques such as filtering, segmentation, and feature extrac-
tion, machine learning algorithms are used to interpret the processed data
through classification, clustering, and object detection. This book serves as a
textbook for students and instructors of image processing, covering the theo-
retical foundations and practical applications of some of the most prevalent
image processing methods and approaches.
Divided into two volumes, this first installment explores the fundamental
concepts and techniques in image processing, starting with pixel operations
and their properties and exploring spatial filtering, edge detection, image
segmentation, corner detection, and geometric transformations. It provides a
solid foundation for readers interested in understanding the core principles
and practical applications of image processing, establishing the essential
groundwork necessary for further explorations covered in Volume 2.
Written with instructors and students of image processing in mind, this
book’s intuitive organization also contains appeal for app developers and
engineers.
Image Processing and
Machine Learning,
­Volume 1
Foundations of Image Processing

Erik Cuevas and Alma Nayeli Rodríguez


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.

First edition published 2024


by CRC Press
2385 NW Executive Center Drive, Suite 320, Boca Raton FL 33431

and by CRC Press


4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN

CRC Press is an imprint of Taylor & Francis Group, LLC

© 2024 Erik Cuevas and Alma Rodríguez

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, access www.copyright.
com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA
01923, 978-750-8400. For works that are not available on CCC please contact mpkbookspermissions@
tandf.co.uk

Trademark notice: Product or corporate names may be trademarks or registered trademarks and are
used only for identification and explanation without intent to infringe.

ISBN: 978-1-032-23458-8 (hbk)


ISBN: 978-1-032-26260-4 (pbk)
ISBN: 978-1-003-28741-4 (ebk)

DOI: 10.1201/9781003287414

Typeset in Palatino
by codeMantra
Contents

Preface Volume 1.....................................................................................................ix

1. Pixel Operations..............................................................................................1
1.1 Introduction............................................................................................1
1.2 Changing the Pixel Intensity Value.....................................................2
1.2.1 Contrast and Illumination or Brightness..............................2
1.2.2 Delimitation of Results by Pixel Operations.........................3
1.2.3 Image Complement..................................................................4
1.2.4 Segmentation by Threshold....................................................5
1.3 Histogram and Pixel Operations.........................................................7
1.3.1 Histogram..................................................................................7
1.3.2 Image Acquisition Characteristics.........................................8
1.3.3 Calculating the Histogram of an Image with MATLAB..... 11
1.3.4 Color Image Histograms........................................................ 12
1.3.5 Effects of Pixel Operations on Histograms......................... 13
1.3.6 Automatic Contrast Adjustment........................................... 15
1.3.7 Cumulative Histogram.......................................................... 18
1.3.8 Histogram Linear Equalization............................................ 19
1.4 Gamma Correction..............................................................................22
1.4.1 The Gamma Function............................................................ 23
1.4.2 Use of Gamma Correction..................................................... 24
1.5 MATLAB Pixel Operations................................................................. 25
1.5.1 Changing Contrast and Illumination in MATLAB........... 25
1.5.2 Segmenting an Image by Thresholding
Using MATLAB....................................................................... 25
1.5.3 Contrast Adjustment with MATLAB................................... 26
1.5.4 Histogram Equalization Using MATLAB........................... 29
1.6 Multi-Source Pixel Operations........................................................... 31
1.6.1 Logical and Arithmetic Operations..................................... 32
1.6.2 Alpha Blending Operation.................................................... 35
References........................................................................................................ 35

2. Spatial Filtering............................................................................................. 36
2.1 Introduction.......................................................................................... 36
2.2 What Is a Filter?.................................................................................... 36
2.3 Spatial Linear Filters............................................................................ 38
2.3.1 The Filter Matrix..................................................................... 39
2.3.2 Filter Operation....................................................................... 39
2.4 Calculation of Filter Operations in MATLAB.................................. 41
2.5 Types of Linear Filters.........................................................................43

v
vi Contents

2.5.1 Smoothing Filters....................................................................43


2.5.2 The “Box” Filter.......................................................................44
2.5.3 The Gaussian Filter.................................................................44
2.5.4 Difference Filters..................................................................... 46
2.6 Formal Characteristics of Linear Filters........................................... 47
2.6.1 Linear Convolution and Correlation.................................... 48
2.6.2 Linear Convolution Properties.............................................. 49
2.6.3 Filter Separability.................................................................... 51
2.6.4 Impulse Response of a Filter................................................. 52
2.7 Add Noise to Images with MATLAB................................................ 55
2.8 Spatial Non-Linear Filters................................................................... 59
2.8.1 Maximum and Minimum Filters.......................................... 59
2.8.2 The Median Filter.................................................................... 61
2.8.3 Median Filter with Multiplicity Window............................63
2.8.4 Other Non-Linear Filters.......................................................65
2.9 Linear Spatial Filters in MATLAB..................................................... 66
2.9.1 Correlation Size and Convolution........................................ 66
2.9.2 Handling Image Borders....................................................... 68
2.9.3 MATLAB Functions for the Implementation of
Linear Spatial Filters............................................................... 73
2.9.4 MATLAB Functions for Non-Linear Spatial Filtering....... 75
2.10 Binary Filter..........................................................................................80
2.10.1 Implementation of the Binary Filter in MATLAB.............. 82
References........................................................................................................ 87

3. Edge Detection............................................................................................... 89
3.1 Borders and Contours......................................................................... 89
3.2 Edge Detection Using Gradient-Based Techniques........................90
3.2.1 Partial Derivative and Gradient............................................ 91
3.2.2 Derived Filter........................................................................... 92
3.3 Filters for Edge Detection................................................................... 92
3.3.1 Prewitt and Sobel Operators................................................. 93
3.3.2 The Roberts Operator............................................................. 96
3.3.3 Compass Operators................................................................ 96
3.3.4 Edge Detection with MATLAB............................................. 98
3.3.5 MATLAB Functions for Edge Detection........................... 101
3.4 Operators Based on the Second Derivative.................................... 104
3.4.1 Edge Detection Using the Second-Derivative
Technique............................................................................... 105
3.4.2 Sharpness Enhancement in Images................................... 108
3.4.3 Use of MATLAB for the Implementation of the
Laplacian Filter and the Enhancement of Sharpness...... 109
3.4.4 The Canny Filter................................................................... 111
3.4.5 MATLAB Tools that Implement the Canny Filter............ 112
References...................................................................................................... 113
Contents vii

4. Segmentation and Processing of Binary Images.................................. 114


4.1 Introduction........................................................................................ 114
4.2 Segmentation...................................................................................... 114
4.3 Threshold............................................................................................ 115
4.4 The Optimal Threshold..................................................................... 119
4.5 Otsu Algorithm.................................................................................. 120
4.6 Segmentation by Region Growth..................................................... 123
4.6.1 Initial Pixel............................................................................. 124
4.6.2 Local Search........................................................................... 125
4.7 Labeling of Objects in Binary Images............................................. 129
4.7.1 Temporary Labeling of Objects (Step 1)............................. 130
4.7.2 Propagation of Labeling....................................................... 132
4.7.3 Adjacent Tagging.................................................................. 132
4.7.4 Collision Resolution (Step 2)................................................ 134
4.7.5 Implementation of the Object Labeling Algorithm
Using MATLAB..................................................................... 135
4.8 Object Borders in Binary Images..................................................... 138
4.8.1 External and Internal Contours.......................................... 138
4.8.2 Combination of Contour Identification
and Object Labeling............................................................. 139
4.8.3 Implementation in MATLAB.............................................. 145
4.9 Representation of Binary Objects.................................................... 151
4.9.1 Length Encoding................................................................... 152
4.9.2 Chain Code............................................................................ 152
4.9.3 Differential Chain Code....................................................... 154
4.9.4 Shape Numbers..................................................................... 154
4.9.5 Fourier Descriptors............................................................... 155
4.10 Features of Binary Objects................................................................ 156
4.10.1 Features.................................................................................. 156
4.10.2 Geometric Features............................................................... 156
4.10.3 Perimeter................................................................................ 156
4.10.4 Area......................................................................................... 157
4.10.5 Compaction and Roundness............................................... 158
4.10.6 Bounding Box........................................................................ 158
References...................................................................................................... 159

5. Corner Detection.......................................................................................... 160


5.1 Corners in an Image.......................................................................... 160
5.2 The Harris Algorithm....................................................................... 161
5.2.1 Matrix of Structures............................................................. 161
5.2.2 Filtering of the Matrix of Structures.................................. 162
5.2.3 Calculation of Eigenvalues and Eigenvectors................... 162
5.2.4 Corner Value Function (V)................................................... 163
5.2.5 Determination of the Corner Points................................... 164
5.2.6 Algorithm Implementation................................................. 165
viii Contents

5.3 Determination of Corner Points Using MATLAB......................... 168


5.4 Other Corner Detectors..................................................................... 173
5.4.1 Beaudet Detector................................................................... 173
5.4.2 Kitchen & Rosenfield Detector............................................ 176
5.4.3 Wang & Brady Detector....................................................... 178
References...................................................................................................... 182

6. Line Detection.............................................................................................. 183


6.1 Structures in an Image...................................................................... 183
6.2 Hough Transform............................................................................... 184
6.2.1 Parameter Space.................................................................... 185
6.2.2 Accumulation Records Matrix............................................ 187
6.2.3 Parametric Model Change................................................... 188
6.3 Hough Transform Implementation................................................. 190
6.4 Encoding the Hough Transform in MATLAB............................... 191
6.5 Line Detection Using MATLAB Functions.................................... 198
6.5.1 Example of Line Detection Using
MATLAB Functions.............................................................. 199
References...................................................................................................... 203

Index...................................................................................................................... 205
Preface Volume 1

Image processing is an important area of research because it enables the


improvement and manipulation of images for various applications, such as
medical imaging, wherein it plays a crucial role in the analysis and diagno-
sis of X-rays, CT scans, and MRI images. Image processing algorithms can
be used in surveillance systems to detect and track objects, enhance image
quality, and perform facial recognition. In remote sensing, image process-
ing techniques are used to analyze satellite and aerial images for various
purposes such as environmental monitoring and resource management. In
multimedia, it is used in applications to enhance and manipulate images for
display, such as in photo editing software and video games. Overall, image
processing has a wide range of applications and has become a critical tool in
many industries, making it an important area of study and research.
Machine learning (ML) is a research field part of artificial intelligence
that allows to learn from data and make predictions or decisions without
being explicitly programmed. Some of the main applications of ML include
automation, where ML algorithms can automate tasks that would otherwise
require human intervention, reducing errors and increasing efficiency. In
predictive analytics, ML models can analyze large amounts of data to iden-
tify patterns and make predictions, which can be used in various applica-
tions such as stock market analysis, fraud detection, and customer behavior
analysis. In decision-making, ML algorithms can help organizations make
better and more informed decisions by providing insights and recommenda-
tions based on data.
The combination of image processing and ML involves the use of tech-
niques from both fields to analyze and understand images. Image pro-
cessing techniques are used to pre-process the images, such as filtering,
segmentation, and feature extraction, while ML algorithms are used to
analyze and interpret the processed data such as classification, clustering,
and object detection. The goal is to use the strengths of each field to build
computer vision systems that can automatically understand and analyze
images without human intervention. With this combination, image process-
ing techniques can enhance the quality of the images, which improves the
performance of ML algorithms. On the other hand, ML algorithms can auto-
matically analyze and interpret images, which reduces the need for manual
intervention.
Our primary objective was to create a comprehensive textbook that serves
as an invaluable resource for an image processing class. With this goal in
mind, we carefully crafted a book that encompasses both the theoretical
foundations and practical applications of the most prevalent image process-
ing methods. From pixel operations to geometric transformations, spatial

ix
x Preface Volume 1

filtering to image segmentation, and edge detection to color image process-


ing, we have meticulously covered a wide range of topics essential to under-
standing and working with images. Moreover, recognizing the increasing
relevance of ML in image processing, we have incorporated fundamental ML
concepts and their applications in this field. By introducing readers to these
concepts, we aim to equip them with the necessary knowledge to leverage
ML techniques for various image processing tasks. Our ultimate aspiration is
for this book to be a valuable companion for students and practitioners alike,
providing them with a solid understanding of image processing fundamen-
tals and empowering them to apply these techniques in real-world scenarios.
To cover all the important information, the inclusion of numerous chap-
ters and programs is necessary. Consequently, the resulting book contained
a substantial amount of content and programming examples. However, rec-
ognizing that a single-volume book with a multitude of chapters and pro-
grams can be overwhelming for readers, the decision to divide the book into
two volumes was made. This division was undertaken with the primary
objective of ensuring that the book was appropriately handled and compre-
hended by readers. The book becomes more approachable and manageable
by splitting the material into two volumes, preventing readers from feeling
overwhelmed by the sheer volume of the information. This thoughtful divi-
sion facilitates a smoother learning experience, allowing readers to navigate
through the content more effectively, delve deeper into the material, and
absorb concepts and techniques at their own pace. Ultimately, the decision to
divide the book into two volumes serves the purpose of optimizing readers’
understanding and engagement with the extensive materials and programs
presented within its pages.
With the objective of ensuring that the book can be effectively navigated
and comprehended by readers, we have made the decision to divide it into
two volumes. Volume 1: “Foundations of Image Processing” and Volume 2:
“Advanced Topics in Image Analysis and Machine Learning”.
Volume 1 covers the fundamental concepts and techniques in image
processing, starting with pixel operations and their properties and explor-
ing spatial filtering, edge detection, image segmentation, corner detection,
and geometric transformations. It provides a solid foundation for readers
interested in understanding the core principles and practical applications
of image processing. By focusing on these initial six chapters, the volume
establishes the essential groundwork necessary for further exploration in the
field. Building upon the knowledge gained from Volume 1, Volume 2 con-
siders more advanced topics in image analysis. It covers a range of subjects,
including morphological filters, color image processing, image matching,
feature-based segmentation using the mean-shift algorithm, and finally, the
application of singular value decomposition (SVD) for image compression.
In addition to covering the advanced concepts and techniques of image pro-
cessing, Volume 2 provides several important ML techniques as applied to
the field. Recognizing the increasing significance of ML in image analysis
Preface Volume 1 xi

and understanding its potential for enhancing image processing tasks, we


have incorporated relevant ML approaches throughout Volume 2.
The division into two volumes was aimed at ensuring that each volume
could stand alone as a self-contained resource. This means that readers have
the flexibility to review and study each volume independently, without nec-
essarily relying on the other volume for context or understanding. By main-
taining a self-contained structure, readers can approach the material in a
modular manner, focusing on specific aspects or revisiting specific chapters
as needed.
Welcome to Volume 1 of our book. This volume serves as an introduction
to the fundamental concepts and techniques in image processing. It lays the
groundwork for understanding the core principles and practical applications
of image processing. By focusing on these fundamental topics, Volume 1
aims to provide readers with a solid understanding of the core concepts and
techniques in image processing. It forms the basis upon which you can fur-
ther explore advanced topics and ML applications in Volume 2. Whether you
are a student or a practitioner in the field, this volume will equip you with the
necessary knowledge to approach image processing tasks with confidence
and understanding.
Many books on image processing techniques are geared toward readers
with a strong mathematical background. Upon reviewing various related
books, the authors noticed the need for a more general and less technical
approach to these topics to attract a wider audience of readers and students.
This book includes all the topics found in other similar books, but with a
greater emphasis on explaining, putting into practice, and utilizing the
methods, and less emphasis on the mathematical details.
This book not only covers the key concepts and techniques of image pro-
cessing but also provides a substantial amount of code and implementations.
The authors view this as an important aspect of the book. Even those readers
with strong mathematical abilities can struggle to fully grasp a particular
approach until they see it in code. By implementing algorithms and methods
in code, any confusion or uncertainty is removed, making the material easier
to understand and transmit. With this approach, as the reader progresses
through the book from simpler to more advanced methods, the focus on
computation (the implemented code) allows them to see the various models
and reinforce their mathematical understanding.
Many comparable books only focus on the theoretical aspect, while those
that cover practical implementations usually present a general approach to
developing algorithms from scratch. Our teaching experience has shown
that students understand the material faster when they have access to code
that they can modify and experiment with. This book uses MATLAB® as
the programming language to implement the systems, due to its popularity
among engineers and its extensive library collection for various disciplines.
Other programming languages such as Java, R, C++, and Python are also
used in engineering, but MATLAB stands out for its distinctive features.
xii Preface Volume 1

For beginner readers, the numerous computational methods used in image


processing can be overwhelming due to the vast number of mathematical
concepts and techniques involved. Some practical books attempt to address
this issue by offering chapters on how to use pre-existing recipes. However,
what if the assumptions of the problem are not met? In such cases, it becomes
necessary to modify or adapt the algorithm. To accomplish this, it’s crucial
that the book provides the conceptual understanding needed to appreciate
and comprehend the underlying mathematics. The aim of this book is to
strike a balance by offering a comprehensive yet accessible view of the most
commonly used computational algorithms and popular image processing
approaches, with a focus on rigor.
Despite the heavy mathematical concepts involved in image processing
methods, it is possible to utilize these models without a deep understanding
of their mathematical foundations. For many readers, learning image pro-
cessing through programming instead of a complex mathematical model is a
more feasible goal. This book aims to fulfill this objective.
The teaching of image processing can be effective by blending theoreti-
cal knowledge with hands-on computer exercises, allowing students to write
their own code for processing image data. As image processing principles
are widely used in various fields, such as ML and data analysis, there is a
growing demand for engineers who are proficient in these concepts. Many
universities respond to this need by offering comprehensive courses in image
processing that cover the most widely used techniques. Image processing is
perceived as a highly practical subject, inspiring students to see how image
transformations can be transformed into code to produce visually appealing
effects.
The material has been compiled from a teaching perspective. For this rea-
son, the book is primarily intended as a textbook for undergraduate and
postgraduate students of Science, Electrical Engineering, or Computational
Mathematics. It is appropriate for courses such as image processing, com-
puter vision, artificial vision, advanced methods, and image understand-
ing. The book was conceived as a complete course that can be covered in a
semester.
Volume 1 is organized in a way that allows readers to easily understand
the goal of each chapter and reinforce their understanding through practical
exercises using MATLAB programs. It consists of six chapters; the details of
each chapter are described below.
Chapter 1 explores pixel operations, their properties, and how they are
applied in image processing. It also explains the relationship between image
histograms and pixel operations and includes numerical examples using
MATLAB to help illustrate the concepts.
Chapter 2 focuses on the analysis of spatial filtering, which involves modi-
fying each pixel of an image by considering not only its original value but
also the values of its neighboring elements.
Preface Volume 1 xiii

In Chapter 3, the concepts of the edges or contours of an image are


described, which corresponds to an important component for image analysis.
The main existing methods for locating edges, their properties, and particu-
larities, which are implemented in MATLAB for the reader’s understanding,
are also addressed.
Chapter 4 covers the topic of image segmentation and the treatment of
binary images. Segmentation involves isolating each individual binary
object in an image. After isolating these objects, various properties such as
the number of objects, their position, and the number of pixels that make up
the object can be evaluated.
Chapter 5 outlines the main methods for identifying corners, their key
properties, defining equations, and implementation in MATLAB.
In Chapter 6, the primary methods for detecting geometric shapes, such as
lines or circles, are covered.
Over a span of more than 5 years, we conducted extensive testing and
experimentation to effectively present this material to diverse audiences.
Furthermore, we are deeply grateful for the unwavering support and toler-
ance we received from our students, particularly those from the CUCEI at the
University of Guadalajara, Mexico. The invaluable collaborations, assistance,
and discussions with our colleagues throughout this journey could fill an
additional chapter. We extend our sincerest gratitude to all those who have
contributed to this endeavor.

Erik Cuevas
Alma Nayeli Rodriguez
Guadalajara, Jalisco, Mexico
1
Pixel Operations

1.1 Introduction
Pixel operations refer to those operations performed on images where only
the pixel value of interest p = I ( x , y ) from the image is considered [1]. Each
new pixel value calculated p ′ = I ′ ( x , y ) is dependent on the value of the origi-
nal pixel p = I ( x , y ) at the same position. Thus, it is independent of the values
of other pixels, such as its closest neighbors. The new pixel value is deter-
mined through a function f  I ( x , y ) , so that:

f  I ( x , y )  → I ′ ( x , y ) (1.1)

Figure 1.1 shows a representation of this type of operation. If, as in the previ-
ous case, the function f (⋅) is independent of the image coordinates, its values
do not depend on the pixel position, so the function is called homogeneous.
Examples of typical homogeneous operations are:

FIGURE 1.1
Representation of pixel operations, in which the resulting pixel depends only on the value of
the function operating on the original pixel.

DOI: 10.1201/9781003287414-1 1
2 Image Processing and Machine Learning, Volume 1

• Contrast and illumination changes in the image


• Application of certain illumination curves
• Inverting or complementing an image
• Threshold segmentation of an image
• Gamma correction of an image
• The color transformation of an image

On the other hand, non-homogeneous pixel operations consider not only the
value of the pixel in question but also its relative position in the image, that
is I ′ ( x , y ) .

g  I ( x , y ) , x , y  → I ′ ( x , y ) (1.2)

A frequent operation performed on images using non-homogeneous opera-


tions is the changing of contrast or illumination of an image depending on
the position of the pixel in the image. Under such conditions, some image
pixels will be strongly altered, while other elements will present only small
effects.

1.2 Changing the Pixel Intensity Value


1.2.1 Contrast and Illumination or Brightness
The contrast of an image can be defined as the relationship between the dif-
ferent intensity values present in the whole image [2]. The contrast is related
to how the intensity values are distributed [3]. Suppose they are concentrated
toward lower intensity values. In that case, the image will appear darker.
In contrast, if the intensity values are concentrated toward higher intensity
values, the image will appear bright or illuminated. To exemplify these con-
ditions, we can present examples of increasing the contrast of an image by
50%, which would be equivalent to applying a homogeneous function that
multiplies the pixel by 1.5. Another example can be to increase the illumina-
tion or brightness by 100 levels, which would be equivalent to employing a
function that adds 100 units to the pixel in question. Thus, the homogeneous
function can be defined as follows:

( )
fc I ( x , y ) = I ( x , y ) ⋅ 1.5 (1.3)

( )
f h I ( x , y ) = I ( x , y ) + 100 (1.4)
Pixel Operations 3

(a) (b)

FIGURE 1.2
Graphical representation of the mapping generated for the resulting pixel I′(x, y): (a) when
changing the value of c in Equation 1.5 with b = 0, and (b) when changing the value of b in
Equation 1.5 with c = 1.

The generic operator f (⋅), which is used to modify the contrast or illumina-
tion in an image, can be formulated as follows:

I ( x, y ) = f ( x, y ) = c ⋅ I ( x, y ) + b ; (1.5)

where c modifies the contrast value and b changes the brightness or illumi-
nation value, Figure 1.2 shows graphically the different effects produced by
distinct values of c and b.
Figure 1.3 shows the result of applying the above homogeneous operations
on an image.

1.2.2 Delimitation of Results by Pixel Operations


When homogeneous operations are used, the calculated pixel value may
exceed the limited value defined by the 8-bit grayscale images. Therefore,
new pixel values could fall outside the range of 0–255. If this situation hap-
pens, the image data type automatically changes from integer (uint8) to float
(double). If you write programs in a language such as C, you need to avoid
this problem by using appropriate instructions. One example to protect
the program when the pixel value exceeds the upper limit is considered as
follows:

If (Ixy > 255)


Ixy = 255;

The previous operation will have the effect of eliminating any excess pro-
duced by the application of the homogeneous operation on the image. This
effect is often referred to in the literature as “clamping.” Another problem
in the use of homogeneous operations performed on pixels occurs when the
4 Image Processing and Machine Learning, Volume 1

(a) (b)

(c)

FIGURE 1.3
Examples of applying homogeneous pixel operations. (a) Original image, (b) image with 50%
contrast increment, and (c) image with illumination decreased by 100 levels.

calculated value of the new pixel is less than the lower limit defined for an
8-bit grayscale image. This can happen when the value of the illumination is
reduced to some levels, producing negative values. This problem, as well as
the previous one, is avoided if the program is protected with the following
instructions:

If (Ixy < 0)
Ixy = 0;

1.2.3 Image Complement
Image complement or inversion is considered a pixel operation in which
the pixel value is altered in the opposite direction (by multiplying the pixel
value by −1), while on the other hand, a constant intensity value is added.
Under this operation, the result falls within the allowed range of values. For
one pixel p = I ( x , y ) on range of values  0, pmax  the complement or inversion
operation is defined as:

finv ( p ) = pmax − p (1.6)


Pixel Operations 5

(a) (b)

FIGURE 1.4
Result of applying the complement pixel operation to an image. (a) Original grayscale image
and (b) complement.

To implement the complement operation of an image in MATLAB®, it is nec-


essary to perform the code shown below:

I=imread(‘extension’);
Ig=rgb2gray(I);
IC=255-Ig;

Where IC is the result of the complement corresponding to the image stored


in I. Figure 1.4 shows the effect of having applied the complement on an
image using the previous code in MATLAB.

1.2.4 Segmentation by Threshold
Segmentation by thresholding can be considered a special form of quanti-
fication in which the image pixels are divided into two classes depending
on their relationship with a predefined threshold value pth. All pixels in the
image assume two different values p0 or p1 depending on their relationship
to the threshold, formally defined as:

 p0 si p < pth
fth ( p ) =  (1.7)
 p1 si p ≥ pth

where 0 < pth < pmax. A frequent application of this operation is the bina-
rization of a grayscale image by considering a p0 = 0 y p1 = 1. An example
of applying segmentation by using thresholding on an image is shown in
Figure 1.5. The effect of binarization can be clearly seen in the resulting his-
togram of the image, where the whole distribution is divided into only two
parts p0 y p1 as shown in Figure 1.6.
6 Image Processing and Machine Learning, Volume 1

(a) (b)
107 10
5

2.5
2.5

2 2
Frequency

Frequency

1.5 1.5

1 1

0.5 0.5

0 0

0 Intensity 1 0 50 100 150 200 255


Intensity

(c) (d)

FIGURE 1.5
Example showing the application of segmentation by using thresholding on an image, consid-
ering p0 = 0, p1 = 1 y pth = 80. In addition, (c) and (d) show the respective histograms of (a) and (b).

FIGURE 1.6
The effect of the binarization operation on the histogram. The threshold value is pth.
(left) Original histogram and (right) histogram resulting from the operation, concentrating
their values at two different points. p0 y p1.
Pixel Operations 7

1.3 Histogram and Pixel Operations


In some cases, the effects of pixel operations can be easily detected through
the histogram. Histograms can be considered as a statistical index of the
image. It is usually used as an element to assist in the evaluation of impor-
tant properties of an image [4]. Especially, errors produced in image acqui-
sition are easily recognized through the use of histograms. In addition to
the ability to deal with the problems mentioned above, it is also possible to
pre-­process the image based on the histogram to improve it or to highlight
features of the image that will be extracted or analyzed in later processing
steps (e.g., by considering a pattern recognition system in the image).

1.3.1 Histogram
Histograms are elements that describe the frequency at which the intensity
values (pixels) of the image are distributed. In the simplest case, histograms
are best understood when they describe the distribution of grayscale images.
An example is shown in Figure 1.7. For a grayscale image I ( u, v ) with inten-
sities in the range [ 0, K − 1] generate a histogram H with exactly K different
values. Therefore, for a typical 8-bit grayscale image, a histogram will use
H = 2 8 = 256. Each element of the histogram is defined as h ( i ) , correspond-
ing to the number of pixels in the image with an intensity value i, for all
values of 0 ≤ i < K . This can be expressed as follows:

{
h ( i ) = card1 ( u, v ) I ( u, v ) = i } (1.8)

h ( 0 ) is then the number of pixels with the value 0, h ( 1) the number of pix-
els that have the value of 1, and so on, while finally h ( 255 ) represents the
­number of white pixels (with the maximum intensity value) in the image.

10 4

12

10
Frequency

0 50 100 150 200 255


Intensity

(a) (b)

FIGURE 1.7
(a) 8-bit intensity (grayscale) image and (b) its histogram.
8 Image Processing and Machine Learning, Volume 1

9 pixels with intensity value of 2

6
h(i)

i
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

h(i) 0 2 9 0 0 0 5 7 3 9 1 6 3 6 3 2

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

FIGURE 1.8
The vector of a histogram with 16 possible intensity values. The index of the elements of the
vector i = 0…15 represents the intensity value. The value of 9 of intensity 2 means that in the
corresponding image, the intensity value 2 appears 9 times.

As a result of the histogram calculation, a one-dimensional vector h with a


length K is obtained, as shown in Figure 1.8 where K = 16.
The histogram shows important characteristics of an image, such as its
contrast and dynamic range, which are attributed to the image acquisition
and need to be evaluated for correcting levels so that image properties can be
analyzed more clearly in the post-processing stages.
Evidently, the histogram does not provide information about the spatial
distribution of the pixels. Therefore, the information provided by the histo-
gram presents a loss of information about the spatial relationship that the
pixels had in the image. Under such conditions, it is impossible to recon-
struct an image using only the information from its histogram. To exem-
plify this fact, Figure 1.9 shows three different images that produce the
same histogram.

1.3.2 Image Acquisition Characteristics


Histograms show important characteristics of an image, such as contrast and
dynamics, which are problems that occur during image acquisition and have
consequences for the subsequent processing steps. In the following, impor-
tant concepts to consider regarding the acquisition of an image and its histo-
gram are explained.
Pixel Operations 9

FIGURE 1.9
Three different images that produce the same histogram.

1.3.2.1 Lighting
Illumination errors are recognized in the histogram because there are no pix-
els in the final or initial region of the intensity scale, while the middle regions
of the histogram present a concentration of pixels with different intensity
values. Figure 1.10 shows an example of images with different types of illu-
mination. It is possible to observe that the pixels in image (a) cover the entire
dynamic (0–255) width of the histogram (b). On the other hand, images (c)
and (e) have histograms with intensity values concentrated in whiter colors
(values close to 255) and in the darker colors (values close to 0), histograms
(d) and (f), respectively.

1.3.2.2 Contrast
The definition of contrast is understood as the range of intensity values that
are used in a given image, or, in short, the difference between the maximum
and minimum intensity values of the pixels present in the image. A full con-
trast image uses the full range of intensity levels defined for the image from
0 to K − 1 (black to white). It is, therefore, easy to observe the contrast of an
image using a histogram. Figure 1.11 shows different contrast settings in
images from the histograms produced.

1.3.2.3 Dynamics
Under the term dynamics, we understand the number of different pixels
that are used in the image. The ideal case in an image is presented when
the full range of available intensity values K is used for the image in ques-
tion. In this case, the whole region of intensity values is covered completely.
An image that covers a region of intensity values smaller than the full one
( amin = 0, amax = K − 1) so that:
amin > 0 or amax < K − 1 (1.9)

It produces an image with poor dynamic. It is considered poor since an


appropriated dynamic reaches its maximum when all intensity values in that
range are present in the image (Figure 1.12).
10 Image Processing and Machine Learning, Volume 1

5
10
3.5

2.5

Frequency
2

1.5

0.5

0 50 100 150 200 255


Intensity

(a) (b)
5
10

2.5

Frequency
2

1.5

0.5

0 50 100 150 200 255


Intensity

(c) (d)
5
10

3.5

2.5
Frequency

1.5

0.5

0 50 100 150 200 255


Intensity

(e) (f)

FIGURE 1.10
The figures show how lighting errors are easily detected by the histogram. (a) Image with cor-
rect illumination, (c) with high illumination, and (e) with poor illumination. (b), (d), and (f) are
the histograms of (a), (c), and (e), respectively.

While the contrast of an image can be high as long as the maximum value
of the pixel intensity range is not exceeded, the dynamics of an image cannot
be high (except by interpolation of the pixel intensity values). High dynam-
ics represent an advantage for an image because the risk of losing image
quality through the following processing steps is reduced. For this reason,
­digital cameras and professional scanners have a resolution higher than
8 bits, u
­ sually 12–14 bits, even if the image display elements have a normal
resolution of 256.
Pixel Operations 11

(a) (b)
5 5
10 10
5

4
4

3
Frequency

Frequency
3

2
2

1 1

0 0

0 50 100 150 200 255 0 50 100 150 200 255


Intensity Intensity

(c) (d)

FIGURE 1.11
The figures show different contrasts in images and their respective effects on the histogram.
(a) Normal contrast and its histogram (c); and (b) low contrast and its histogram (d).

1.3.3 Calculating the Histogram of an Image with MATLAB


This section explains MATLAB functions that can be used to calculate
and display the histogram of an image contained in the Image Processing
Toolbox [5].

1.3.3.1 MATLAB Command Line Function


The function of the image processing toolbox for calculating the histogram of
an image has the following format:

[counts,x]=imhist(I, n)

This function calculates and displays the histogram of the I image. The num-
ber of histogram values if n is not specified depends on the type of image
involved. If I corresponds to a grayscale image, the function will use 256
values for the calculation and display. If I represents a binary image, the
function will calculate the histogram with only two values.
If n is specified, the histogram is calculated and displayed using n intensity
values instead of those specified by the image type. The variable counts
symbolizes a vector that contains the number of pixels.
12 Image Processing and Machine Learning, Volume 1

10 5
5

Frequency
3

0 50 100 150 200 255


Intensity

(a) (d)
6
10
2

1.5

Frequency
1

0.5

0 50 100 150 200 255


Intensity

(b) (e)
10 6
5

4
Frequency

0
XLabel
0 50 100 150 200 255
Intensity

(c) (f)

FIGURE 1.12
Different dynamics in an image and their effects on the histogram. (a) High dynamics, (b) low
dynamics with 20 intensity levels, (c) very low dynamics with only 8 intensity levels, (d) histo-
gram of (a), (e) histogram of (b), and (f) histogram of (c).

1.3.4 Color Image Histograms


Histograms of color images refer to brightness histograms. They are obtained
over the planes from the color image, considering each plane as if it were an
independent grayscale image.

1.3.4.1 Brightness Histograms
The brightness histogram of an image is nothing more than the histogram of
the corresponding grayscale version of the color image. Since the grayscale
Pixel Operations 13

(a) (b)
10 5
3.5

2.5
Frequency

1.5

0.5

0 50 100 150 200 255


Intensity

(c)

FIGURE 1.13
Brightness histogram of a single plane from a color image. (a) Color image, (b) its grayscale ver-
sion (luminance image), and (c) the corresponding histogram of (b).

images are extracted from the color image, they represent the histograms of
the different planes that compose it. Figure 1.13 shows the luminosity histo-
gram of a color image.

1.3.4.2 Color Component Histograms


Although the luminance histogram considers all color components, it is pos-
sible that errors may not be detected in the image. The luminance histogram
may appear adequate, even though some color planes are inconsistent.
The histograms of each channel also give additional information on the
color distribution in the image. For example, the blue channel (B) usually
has a small contribution to the total luminance of the color image. To cal-
culate the color component histograms, each color channel is considered
an independent grayscale image from which each histogram is generated.
Figure 1.14 shows the luminance histogram hLUM and the histograms of each
of the different color planes hR, hG y hB for a typical RGB image.

1.3.5 Effects of Pixel Operations on Histograms


An increase in the illumination (to add a positive constant to all pixel val-
ues) of an image causes its histogram to be shifted to the right side so that
14 Image Processing and Machine Learning, Volume 1

5
10
3.5

2.5

Frequency
2

1.5

0.5

0 50 100 150 200 255


Intensity

(a) (b)
4 4
10 10 4 10
12
12
12
10
10 10

8 8
Frequency

Frequency
Frequency

8
6 6
6

4 4 4

2 2 2

0 0 0

0 50 100 150 200 255 0 50 100 150 200 255 0 50 100 150 200 255
Intensity Intensity Intensity

(c) (d) (e)

FIGURE 1.14
Histograms of the components from a color image. (a) Original RGB image, (b) histogram of
Luminosity (hLUM), (c) histogram of the red channel (hR), (d) histogram of the green channel (hG),
and (e) histogram of the blue channel (hB),

the values will tend to approach the upper limit of the allowed dynamic
range (to intensity values of 255). On the other hand, an increase in the con-
trast of some images causes the respective histogram to extend its values
within the ­interval of intensities (0–255). The complement operation on an
image or inversion provokes the histogram to reflect itself, but in the oppo-
site ­direction from its original position. Although the above cases seem
­straightforward (even trivial), it might be useful to discuss in detail the rela-
tionships between pixel operations and the histograms resulting from such
operations.
Figure 1.15 illustrates the way in which each region of the image with a
homogeneous intensity i belongs to element i in the histogram. This element
i corresponds to all pixels having an intensity value of i.
As a result of an operation such as those mentioned above, the histogram
value can shift, with the effect that all pixels belonging to this intensity value
change. However, what happens when two different intensity values coin-
cide as a result of an operation? In that case, both sets of pixels are merged,
and the full amount of both is added together to generate a single intensity
value for the histogram. Once different intensity levels have been merged
into one, it is not possible to differentiate the subsets of pixels. Consequently,
it is not possible to divide them. From the above, it is possible to conclude
Pixel Operations 15

FIGURE 1.15
Histogram values corresponding to a different set of pixels in the image. If a histogram element
is shifted as a consequence of an operation, then all pixels of the corresponding set will also be
modified in the same way. When two histogram elements h(p1) y h(p2) are joined together, their
corresponding sets of pixels are also added together and are now non-separable.

that this process or operation is associated with a loss in the dynamics and
information of the image.

1.3.6 Automatic Contrast Adjustment


The objective of the automatic adaptation of the contrast is that the pixel val-
ues of an image are automatically modified in order to completely cover the
allowed range of intensity values. To achieve this, a procedure is performed
in which it is considered that the darkest pixel in the image is forced to take
the smallest allowable value in the range of intensity values and the brightest
pixel to the highest allowable value, while the rest of the pixels between these
two values are linearly interpolated within this range [6].
Considering that plow y phigh are the current intensity values corresponding
to the smallest and highest pixels of an image I, which has a set of intensity
values defined by the Interval  pmin , pmax . To cover the full scale of intensity
values of the image, the pixel with the lowest intensity contained in the image

FIGURE 1.16
The auto-contrast operation, in which from Equation 1.10, the pixel value p is linearly interpo-
lated from the interval [plow, phigh] to the interval [pmin, pmax].
16 Image Processing and Machine Learning, Volume 1

is considered as the smallest of the allowable range (zero for an 8-bit grayscale
image), and then the contrast (see Figure 1.16) is modified by the factor:
pmax − pmin
(1.10)
phigh − plow

Therefore, the simplest function of contrast adaptation fac is defined as


follows:

 pmax − pmin 
f ac = ( p − plow )   + pmin (1.11)
 phigh − plow 

For an 8-bit grayscale image, the function can be simplified to:

 255 
fac = ( p − plow ) ⋅   + pmin (1.12)
 phigh − plow 

The value of the interval  pmin , pmax  does not always mean that it is the maxi-
mum permissible range of image representation, but it can also represent
any range of interest for an image representation. Under such conditions,

(a) (b)
5
10 5 10

5 5

4 4
Frequency
Frequency

3 3

2 2

1 1

0 0

0 50 100 150 200 255 0 50 100 150 200 255


Intensity Intensity
(c) (d)

FIGURE 1.17
The effect of the auto contrast operation. (a) Original image with low contrast, (b) enhanced
image, (c) histogram of the original image, and (d) histogram of the enhanced image.
Pixel Operations 17

this method originally planned to increase the contrast can also be used
to represent the image within a particular permissible range plow and phigh .
Figure 1.17 shows the effect of the auto-contrast operation p′.
As can be seen from Figure 1.17, the self-adjustment of contrast performed
by using Equation. 1.11 can produce that the extreme pixel values contained
in the image change radically or very little the complete distribution of the
resulting histogram. This is because the values of plow and phigh from the
original histogram involve a very small number of pixels that do not signifi-
cantly represent the complete distribution. To avoid this problem, some fixed
( )
percentages slow , shigh are defined from which the distribution is considered
significant for both the starting point (dark pixels) and the end element (light
pixels) of the distribution. With these percentages, we calculate the new

FIGURE 1.18
Auto-contrast operation considers percentage values to generate new boundaries. They now
represent the significant values of the distribution. All values between 0 y alow as well as ahigh
and 255 are ignored in the adjustment so that the resulting image reflects an improvement in
contrast.
18 Image Processing and Machine Learning, Volume 1

boundaries of the distribution. For this purpose, the lower boundary alow is
considered the intensity value at which the number of pixels of lower intensi-
ties added together is greater than or equal to slow. Likewise, ahigh is the upper
boundary intensity value at which the number of pixels of higher intensities
added together is less than or equal to shigh . See Figure 1.18 for an illustration
of the process. The values alow y ahigh depend on the image content and can be
easily calculated from the cumulative histogram. H ( i ) of image I, such that:

{
alow = min i H ( i ) ≥ M ⋅ N ⋅ slow } (1.13)

{
ahigh = max i H ( i ) ≤ M ⋅ N ⋅ 1 − shigh( )} (1.14)

where M ⋅ N is the number of pixels in the image I. All values outside the
interval alow y ahigh are not considered for contrast enhancement, while val-
ues within this range are linearly scaled to occupy the permissible range
 pmin , pmax . The pixel operation used to perform the auto-contrast operation
can be formulated as follows:

 p si low min

fmac = ( p − alow ) si alow < p < ahigh (1.15)

 p si high max

In practice, slow y shigh are assigned the same value. They typically assume
values within the interval [0.5, 1.5]. An example of this operation is provided
by the popular image-processing program Photoshop, where the value of s is
set to slow = 0.5 in order to perform auto-adjustment of the contrast in images.

1.3.7 Cumulative Histogram
The cumulative histogram is a variant of the normal histogram. It provides
important information for performing pixel-by-pixel operations on images
(point operations), for example, to balance a histogram. The cumulative his-
togram H ( i ) is defined as:

H (i) = ∑ h( j)
j= 0
para 0 ≤ i < K (1.16)

The value of H ( i ) is then the sum of all the elements below the specified
value i of the “classical” histogram h ( j ) with the values j = 0…i. or the value
obtained considering the immediately preceding value
Pixel Operations 19

 h ( 0) para i = 0

H (i) =  (1.17)
 H ( i − 1) + h ( i ) para 0 ≤ i < K

The cumulative histogram is, according to its definition, a monotonically


increasing function with a maximum value of
K −1

H ( K − 1) = ∑h( j) = MN
j= 0
(1.18)

Figure 1.19 shows an example of the cumulative histogram.

1.3.8 Histogram Linear Equalization


A frequent problem is the adaptation of different images to the same distri-
bution heq of intensity levels, either to improve their print quality or to be able
to compare them properly. Balancing a histogram means, by using a pixel
operation, changing the image in such a way that it shows a histogram, as far

(a)
4
10 10 6
12

12
10
10
8
Frequency

Frequency

8
6
6

4 4

2 2

0
0
0 50 100 150 200 255
0 50 100 150 200 255
Intensity Intensity
(b) (c)

FIGURE 1.19
(a) Original image, (b) histogram of (a), and (c) the cumulative histogram of (a).
20 Image Processing and Machine Learning, Volume 1

FIGURE 1.20
Representation of the equalization process of a histogram. Using a pixel operation on an image
with the original histogram h(i), the idea is to obtain the histogram heq(i), the cumulative histo-
gram H(i) and the balanced version represented by Heq(i) as the effect of the operation.

as possible, distributed over all intensity levels (see Figure 1.20). Since we are
dealing with discrete distributions, this is only possible at the approximation
level because, as already discussed above, the homogeneous operations can
only shift or merge groups of pixels belonging to a certain intensity level.
However, once they are together, it is not possible to separate them. Therefore,
it is not possible to remove the histogram peaks from the distribution. Under
such conditions, it is not possible to produce, from the original histogram, an
ideal histogram heq, where all gray levels are equally distributed. Instead of
this, it is possible only to transform the image so that the histogram shows an
approximation to the balanced distribution of gray levels. Such an approxi-
mation can be achieved by the cumulative histogram H ( i ) . An important
feature of this transformation is that a version of the cumulative histogram
H eq represents a balanced (target) distribution. Obviously, as presented in the
previous statement, this is only an approximation. However, it is possible in
this way to use a pixel operation that shifts the histogram elements in such
a way that the cumulative histogram of the image shows at least approxi-
mately an increasing linear function, as exemplified in Figure 1.20.
The pixel operation feq ( p ) required to balance the histogram of an image
is calculated from its cumulative histogram. For an image with a resolution
M × N pixels in the range of [ 0...K − 1] the operation can be defined as follows:

 K − 1
feq ( p ) =  H ( p ) ⋅ (1.19)
 MN 
Pixel Operations 21

FIGURE 1.21
Through the use of the correct pixel operation feq the intensity value p is shifted to p′ in such a
way that it best approximates the cumulative target histogram Heq(i).

The function defined in Equation 1.13 presents a monotonical behavior


because this function corresponds to the cumulative histogram experiments,
a behavior in which it is constantly incremented. H ( p ) and the other param-
eters K, M, and N are only constants. An image whose histogram is already
well distributed over all its intensity levels would not represent any change
when applying the pixel operation that balances the histogram. Figure 1.21
shows the result on an image after having equalized its histogram linearly. It
can be noted that for inactive pixels (those intensity values that do not exist
in the original image), when they are considered in the cumulative histo-
gram, the graph presents the same value as its previous neighbor value. For
example, consider that there are no pixels in the original image of intensity
level 10. Their value in the histogram will be h ( 10 ) = 0, but their value in the
cumulative histogram will be H ( 10 ) = H ( 9 ). This, although it would seem to
be a negative consequence of the pixel operation used to balance the histo-
gram (Equation 1.11). As a consequence, intensity values that do not exist in
the original image will not finally appear in the balanced image.

H (i) H (i) h( j)
i i

fdD ( i ) = =
H ( K − 1) Sum ( h )
= ∑ Sum ( h) = ∑hN ( i)
j= 0 j= 0

0≤i<K (1.20)

The function fdD ( i ) is, like the cumulative histogram, monotonically increas-
ing, so it follows that:

fdD ( 0 ) = hN ( 0 ) (1.21)
22 Image Processing and Machine Learning, Volume 1

K −1

fdD ( K − 1) = ∑ hN ( i) = 1
i= 0
(1.22)

Through this statistical formulation, it is possible to model the image as a


random process. The process is usually considered to be homogeneous (i.e.,
independent of the position in the image). Thus, each pixel in the image
I ( x , y ) is the result of a random experiment with a random variable i.

1.4 Gamma Correction
So far, in this book, the word “intensity” has been used several times,
with the understanding that the pixel values of an image are somehow
related to these concepts. However, how does the value of a pixel actually
relate to the amount of light on a monitor or to the number of toner particles
that the laser printer needs to form a certain intensity value on the paper?
In general, the relationship between the intensity value of a pixel and its
respective p­ hysical measurements is complex and, in all cases, non-linear.
Therefore, it is important to know at least approximately the nature of these
relationships and thus to be able to predict the appearance of images on
different media.
Gamma correction is a pixel operation that compensates for the differ-
ent image acquisition conditions and allows the display of different char-
acteristics by using a general space of intensities [7]. The expression gamma
originally comes from classical photography, where there is an approxi-
mately logarithmic relationship between the amount of illumination and

density D

illumination B

FIGURE 1.22
Illumination function for photography. The function relates the logarithmic magnitude of the
illumination to the resulting photographic film density over a relatively large region. The slope
∆D
of the function is defined as gamma (γ) of the photographic film γ = .
∆B
Pixel Operations 23

the resulting density of the photographic film. The so-called illumination


function represents this relationship and is distributed over a relatively large
region in the form of an ascending line (see Figure 1.22). The slope of the illu-
mination function within its dispersion region is traditionally defined as the
gamma of the photographic film. Later in the television industry, the prob-
lem of image distortion due to the nonlinearity of the cathode ray tube was
confronted, and the concept of gamma was adopted to describe it. Therefore,
the television signal is corrected by the television station before sending it to
the receiver, which is called gamma correction, so this correction compen-
sates for the distortion made by the TV.

1.4.1 The Gamma Function


The basis for the gamma correction is the gamma function, which can be
defined as follows:

b = fγ ( a ) = aγ

b = fγ ( a ) = aγ
(1.23)
a ∈ , γ > 0

where the parameter γ is the so-called gamma factor. The gamma function
is used only within the interval [0,1], and the function produces a value from
(0,0) to (1,1). As shown in Figure 1.23, when γ = 1, we have fγ ( a ) = a (iden-
tity), generating a line from (0,0) to (1,1). For values of γ < 1, the function is
displayed above the line. For the case γ = 1, if γ > 1, the function is below the
line, where the curvature of the function increases in both directions (above
and below the line) as long as γ is different from 1.

1
γ= 1
20 γ=
5

1
γ= γ =1 γ =2
2

γ =5
γ = 20

FIGURE 1.23
Gamma function b = aγ for different values of γ.
24 Image Processing and Machine Learning, Volume 1

FIGURE 1.24
Principle of gamma correction. To correct the distortion γ c presented by a camera, it is neces-
sary to apply the gamma correction γ c in such a way that the combination of both generates
the elimination of the distortion.

The gamma function is controlled only by the parameter γ and behaves


with monotonical increments in the interval [0,1], so it is invertible, such that:

a = fγ−1 ( b ) = b1/γ = fγ ( b ) (1.24)

1
The same is applicable to the case of the gamma value with γ = .
γ
The specific values of γ for different devices are usually specified by the
manufacturer and obtained from measurements. For example, the nominal
values for γ of a standard cathode ray tube are between 1.8 and 2.8, with a
typical value of 2.4 for a standard LCD monitor.

1.4.2 Use of Gamma Correction


To illustrate the use of gamma correction, it is assumed that a camera distorts
the image with a value γ c. It produces an output signal s because of the occur-
rence of the illumination value under the following relationship:

s = Bγ c (1.25)

To compensate for this distortion, we apply an inverse gamma correction to


the camera output signal. γ c will allow us to recover the original signal. This
operation can be formulated as follows:

b = fγ c ( s ) = s1 γ c (1.26)

From this formulation, it can be observed that:


γc

b=s 1/γ c
( )
= B γc 1γc
=B γc
= B1 = B (1.27)

The corrected signal b is identical to the light intensity. Under this opera-
tion, the distortion produced by the camera is eliminated. Figure 1.24 shows
an illustration of this process. The rule of thumb is to find the distortion γ D for
the device in question and compensate for it through gamma correction γ D.
Pixel Operations 25

Everything discussed above assumes that all values are in the interval [0,1].
Obviously, this is not always the case, particularly when dealing with digital
images in the range [0,255]. Considering this, for applying the gamma cor-
rection, the only thing to do is to scale the image interval to values between
0 and 1 and then apply the gamma correction as discussed in this section.

1.5 MATLAB Pixel Operations


Once we have covered the theoretical foundations in previous sections,
we will present how to use MATLAB tools to perform pixel operations on
images. These tools involve using MATLAB as a programming language
(.m file extension) and functions belonging to the image processing and com-
puter vision toolboxes.

1.5.1 Changing Contrast and Illumination in MATLAB


To increase the contrast using MATLAB, it is necessary to multiply the image
by a positive constant so that the histogram of the resulting image becomes
wider. The following command assumes that A is an image, and the contrast
is raised by 50% so that the image is multiplied by 1.5, leaving its result in B.

>>B=A*1.5;

To increase the illumination of an image in MATLAB, add to the image the


number of levels to which you want to increase the illumination. With this
operation, we will make the histogram move in any direction according to
the added number of levels. The following command assumes that we want
to increase the illumination of image A by 10 levels, so we add 10 to this
matrix, producing the result in B.

>>B=A+10;

1.5.2 Segmenting an Image by Thresholding Using MATLAB


Although segmentation and binary image processing will be covered in
depth in another chapter, this section briefly introduces thresholding, but
only as a pixel operation, and how to perform it using MATLAB commands.
Using the functions of the MATLAB image processing toolbox, it is pos-
sible to segment an image depending on the intensity level of the objects
presented in the scene.
To perform the segmentation process by thresholding, it is only necessary
to define the intensity level (threshold) from which the elements of the image
26 Image Processing and Machine Learning, Volume 1

can be classified into two classes. Those above this value will be considered
as a particular class, while those below this value will be considered another
class.

1.5.2.1 Command Line Segmentation


The simplest binarization process that can be conducted by MATLAB is logi-
cal operations. The way to do this is by using the overloaded property of the
logical operations. These operations, in the case of matrices (images), imply
the evaluation of the logical condition for each element. The result of this
operation produces ones and zeros for those elements that have fulfilled the
logical condition. On the other hand, the elements with a value of zero repre-
sent those pixels whose evaluation of the condition is false. For example, we
would have in the command line:

>>B=A>128;

The resulting matrix B will be composed of ones and zeros. Ones at those
positions of A where the pixel values are greater than the threshold 128,
while zeros at those points of A where the pixels did not meet the condition.

1.5.3 Contrast Adjustment with MATLAB


MATLAB contains the function imadjust, which allows us to adapt the
contrast of images to increase, decrease or adjust it. The function prototype
presents the following structure:

J=imadjust (I)
J=imadjust(I,[low_in; high_in],[low_out; high_out])

J = imadjust(I) maps the intensity values of the image I to new inten-


(
sity values in image J such that from 1% of the data slow = shigh = 1% are )
considered to define the lower and upper limits of intensities of the image
I. From these limits, it will be adjusted the contrast of the resulting image J.
As already discussed above, the fact of not considering the limits of image
I, but only a percentage, allows us to improve the contrast considering the
complete amount of the data. Under such conditions, it is possible to improve
the contrast of the image even in those cases where the contrast covers the
entire image range but not significantly.
J = imadjust(I,[low_in; high_in],[low_out; high_out])
maps the values of the image I to new values of J, such that the values of
image low_in and high_in are mapped to the new values low_out and
high_out of image J. The values below low_in and high_in of the image
Pixel Operations 27

(a) (b)
10 5 10 5
10 6

5
8

4
Frequency
Frequency

6
3

4
2

2 1

0 50 100 150 200 255 0 50 100 150 200 255


Intensity
(c) (d)

FIGURE 1.25
Result of applying the imadjust function. (a) Original image, (b) image resulting from applying
the imadjust function, (c) histogram of the original image, and (d) histogram of the contrast-
corrected image.

I are not considered. It is possible to delimit the boundaries with the empty
matrix [], which means defining the boundaries with the permissible values
for each type of image [0,1].
There are some additional variants of this function that, apart from con-
sidering the contrast enhancement, allow us to further scale the contrast by
means of a parameter (SP). Through this parameter, it is possible to represent
the way in which the images I  and J are related when scaled. The structure
of the function is as follows:

J = imadjust(I,[low_in; high_in],[low_out; high_out], SP)

This function transforms the values of I  to obtain the values of J, as explained
above. However, if SP is less than 1, the mapping is scaled up (brighter) for the
J image values, while if SP is greater than 1, the scaling is done down (darker).
For the case where SP is one, the adjustment is simply linear. Figure 1.25 shows
the effect of applying the imadjust function to an image.
28 Image Processing and Machine Learning, Volume 1

PROGRAM 1.1. IMPLEMENTATION OF EQUATION


1.28 TO ENHANCE THE CONTRAST OF AN IMAGE
USING THE LINEAR HISTOGRAM EQUALIZATION
TECHNIQUE, WHERE IMG IS THE SOURCE
IMAGE AND IMGEQ IS THE IMAGE WITH THE
ENHANCED CONTRAST BY EQUALIZATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Program 1.1: Image contrast enhancement using the linear %
%equalization technique %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Erik Cuevas %
%Alma Rodríguez %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all

img = imread(‘image.jpg’);
% The image is converted to a grayscale image
img = rgb2gray(img);
% The intensity image is displayed.
figure
imshow(img)
% Display the original histogram of the image
figure
imhist(img)
% Display the cumulative histogram
h = imhist(img);
H = cumsum(h);
figure
bar(H)
% Linear equalization
[m,n] = size(img);
for r = 1:m
for c = 1:n
ImgEq(r,c)=round(H(img(r,c)+1)*(255/(m*n)));
end
end
ImgEq = uint8(ImgEq);
% Enhanced image and histogram are shown
figure
imshow(ImgEq)
figure
imhist(ImgEq)
h2 = imhist(ImgEq);
H2 = cumsum(h2);
figure
bar(H2)
Pixel Operations 29

(a) (b)
5 5
10 10
10

8
8

6
Frequency

Frequency
6

4
4

2 2

0 0

0 50 100 150 200 255 0 50 100 150 200 255


Intensity Intensity
(c) (d)
10
7 10 7
2.5 2.5

2 2
Frequency
Frequency

1.5 1.5

1 1

0.5 0.5

0 0
0 50 100 150 200 255 0 50 100 150 200 255
Intensity Intensity
(e) (f)

FIGURE 1.26
Result of applying the code described in Program 1.1. (a) Original intensity image, (b) contrast-
enhanced image, (c) histogram of the original image, (d) histogram of the enhanced image, (e)
cumulative histogram of the original image, and (f) cumulative histogram of the enhanced
image.

1.5.4 Histogram Equalization Using MATLAB


The problem of adapting different images to the same distribution of inten-
sity levels, either to improve their print quality or to compare them properly,
can be implemented using MATLAB. Equalizing a histogram, as already
discussed in previous sections, means modifying it by using a pixel opera-
tion of the image in such a way that it shows a histogram with a desired
distribution. To solve the equalization problem, the cumulative histogram is
used, and among its properties is that it represents an equalized distribution.
Obviously, the above statement is only an approximation. However, it is pos-
sible to use a pixel operation that shifts the histogram elements so that the
30 Image Processing and Machine Learning, Volume 1

cumulative histogram of the image shows at least approximately an increas-


ing linear function.
The required pixel operation feq ( p ) to equalize the histogram of an image is
calculated from its cumulative histogram, which is defined by Equation 1.28.
By implementing this process in a MATLAB program, one could equalize the
histogram of an image in a linear way. Program 1.1 shows the implementa-
tion of the linear equalization of the histogram of an image.
The results shown in Figure 1.26 were obtained after applying the code
described in Program 1.1. From the figure, the result of the contrast improve-
ment can be clearly observed and can be analyzed by reviewing the corre-
sponding histograms.
The MATLAB image processing toolbox implements the histeq function,
which allows equalizing the histogram of images to increase their contrast.
histeq increases the contrast of an image by transforming the intensity levels
of the image so that the histogram of the output image is close to a specific
histogram considered as a reference. The function has the following structure:

J = histeq(I, hgram)
J = histeq(I, n)

J = histeq(I, hgram) transforms the intensity values of the image I so


that the cumulative histogram of image J is close to the one considered as
reference hgram. The vector hgram must have a length that depends on the
type of image and its characteristics. For example, for images of type uint8,
we have a length of 256. To perform the transformation of the intensity levels
of I, we select a function fT (pixel operation), which produces a cumulative
histogram that minimizes the association defined by:

∑H
i
fT ( fT ( i )) − H hgram ( i ) (1.28)

where H fT is the cumulative histogram of the image transformed by the


function fT and H hgram the cumulative histogram is considered a reference to
which we want to approximate H fT by choosing fT .
If the vector hgram is not used in the function histeq, it is considered that
the transformation performed on the image I is done so that its histogram
approaches a response that is as flat as possible.
J = histeq(I, n) transforms the intensity values of the image I, return-
ing an image with only n different intensity values. The transformation is
performed by mapping the intensity levels of image I to n different values of
image J so that the histogram of J is approximately flat.
Figure 1.27 shows the result of applying the function histeq to an image.
In this example, the vector hgram has not been given as an argument.
Therefore, the transformation of the intensity values of the source image is
Pixel Operations 31

(a) (b)
105 105
6 6

5 5

4 4
Frequency
Frequency

3 3

2 2

1 1

0 0

0 50 100 150 200 255 0 50 100 150 200 255


Intensity Intensity
(c) (d)
10 6 10
6
12 12

10 10

8 8
Frequency

Frequency

6 6

4 4

2 2

0 0
0 50 100 150 200 255 0 50 100 150 200 255
Intensity Intensity
(e) (f)

FIGURE 1.27
Result of applying the function histeq. (a) Source image, (b) result image, (c) histogram
of the source image, (d) flattened histogram resulting from the operation performed by
histeq, (e) cumulative histogram of the source image, and (f) cumulative histogram of the
resulting image.

performed so that the histogram of the resulting image is approximately flat,


which results in a cumulative histogram similar to a straight line.

1.6 Multi-Source Pixel Operations


Sometimes it will be necessary to perform pixel operations where the inten-
sity value of the resulting pixel depends not only on the pixel in question in
32 Image Processing and Machine Learning, Volume 1

FIGURE 1.28
Representation of pixel operations, in which the resulting pixel depends on the value of pixels
from different images, keeping the same position.

an image but also on other pixels in different images. Figure 1.28 shows a
representation of such operations.
As can be seen from Figure 1.28, the resulting pixel is obtained from
the application of a function that operates on the two pixels from two dif-
ferent images. It is also considered that all the pixels participating in the
function are from two different images with the same position. The value
from this operation represents the result, which is in the same position as
its sources.

1.6.1 Logical and Arithmetic Operations


Logical and arithmetic operations performed between images, such as
addition, subtraction, AND, and OR, can be performed pixel by pixel.
­
An important point to consider is the fact that these operations may result in
values that are outside the permissible range for the image, so sometimes a
change of scale is required.

1.6.1.1 Sum
The sum of the two images I A and I B is defined as:

I ′ ( x, y ) = I A ( x, y ) + IB ( x, y ) (1.29)

A common application of this operation is to superimpose one image on


another to achieve a blending effect (see Figure 1.29), as well as to add an
image with artifacts or dots in different positions to simulate noise patterns.
Pixel Operations 33

(a) (b)

(c)

FIGURE 1.29
Superposition of images by applying the sum operator between two images. (a) Image 1,
(b) image 2, (c) superposition of images 1 and 2.

1.6.1.2 Subtract
The difference between the two images I A and I B is defined as:

I ′ ( x, y ) = I A ( x, y ) − IB ( x, y ) (1.30)

This operation is commonly used for image segmentation and enhancement.


Another important use of image subtraction is in the case of movement detec-
tion [8]. If two images taken at different times are considered, T1 y T2, and we
obtain their difference. What we will find with it is the change in position of
the pixels that were part of the object that changed its position. Figure 1.30
shows an example of position change detection by subtracting two images
taken at different time instants.

1.6.1.3 AND and OR
These operations are performed between binary images using the truth table
for both logic functions. Therefore, in the case of AND, both pixels must be
34 Image Processing and Machine Learning, Volume 1

(a) (b)

(c)

FIGURE 1.30
Movement detection by subtracting images taken at different time instants. (a) Image 1 taken at
instant 1, (b) image 2 taken at instant 2, and (c) subtraction of image 1 and 2.

(a) (b)

(c) (d)

FIGURE 1.31
Effect of applying the Alpha Blending operation. (a) Image IB, (b) image IA, (c) result image IR
with α = 0.3, and (d) result image IR with α = 0.7.
Pixel Operations 35

one in order to generate a pixel one in the resulting image, while in the case
of the OR function with one of the pixels of the image being one is sufficient
reason to generate one in the output image. For any other combination in
both cases, the pixel will be zero in the output image. These functions have
their main activity in block processing, where only those pixels considered
in a certain region will be considered in the processing, while the others will
be set to zero or simply not taken into account.

1.6.2 Alpha Blending Operation


The alpha blending or compositing operation is used to combine two images,
where each pixel of the resulting image is a linear combination of the pixels
of the two images considered as sources. That is, if we have two images and
we apply the alpha blending operation to combine them, each pixel of the
resulting image will be a linear combination of both images, defined by the
following equation:

IR ( x, y ) = (1 − α ) ⋅ I A ( x, y ) + α ⋅ IB ( x, y ) (1.31)

By means of this operation, it is possible to blend two images. The back-


ground image is represented by the image I A . The image I B is considered
transparent in the background I A . The association of these two images is
controlled by the transparency factor α , which is defined in the interval [0,1].
Figure 1.31 shows the effect of applying this operation to two images, consid-
ering different values of α .

References
[1] Gonzalez, R. C., & Woods, R. E. (2008). Digital image processing (3rd ed.). Prentice
Hall.
[2] Jain, A. K. (1989). Fundamentals of digital image processing. Prentice Hall.
[3] Woods, R. E. (2015). Digital image processing (4th ed.). Pearson.
[4] Gonzalez, R. C., & Wintz, P. (1977). Digital image processing. Addison-Wesley.
[5] Gonzalez, R. C., Woods, R. E., & Eddins, S. L. (2004). Digital image processing
using MATLAB. Prentice Hall.
[6] Burger, W., & Burge, M. J. (2016). Digital image processing: An algorithmic introduc-
tion using Java. Springer.
[7] Szeliski, R. (2010). Computer vision: algorithms and applications. Springer.
[8] Milanfar, P. (2013). A tour of modern image processing: From fundamentals to applica-
tions. CRC Press.
Random documents with unrelated
content Scribd suggests to you:
—Êtes-vous fou de voyager par un temps pareil, monsieur?
—J'ai hâte de rejoindre quelqu'un que j'ai perdu et dont je suis la
trace, répondit l'inconnu.
—Quelle est votre profession? cria le juif.
—Je suis un poète.

Le prophète tapa du pied et tandis que le jeune homme s'éloignait il


l'injuria ignoblement à cause de la pitié qui lui venait, puis il baissa la
tête et sans plus s'occuper du poète alla regarder les poteaux pour
se renseigner au sujet des routes. Il prit tout droit devant lui en
bougonnant.
«Heureusement que le vent est tombé... au moins on peut
marcher... J'avais cru d'abord qu'il arrivait pour me tuer. Mais non, il
mourra peut-être avant moi ce poète qui n'est même pas juif. Enfin,
marchons vite et joyeusement pour nous préparer une mort
glorieuse.»
Le vieux rabbin marcha plus vite; avec sa longue houppelande, il
faisait l'effet d'un revenant, et des enfants qui, après l'arbre de Noël,
revenaient de Pützchen, passèrent près de lui en criant d'épouvante,
et longtemps ils jetèrent des pierres dans la direction où il avait
disparu.
*
* *
Croniamantal parcourut ainsi une partie de l'Allemagne et de l'empire
autrichien; la force qui le poussait l'entraîna à travers la Thuringe, la
Saxe, la Bohême, la Moravie, jusqu'à Brünn, où il dut s'arrêter.
*
* *
Le soir même de son arrivée, il parcourut la ville. Dans les rues
bordées de vieux palais, des Suisses énormes, en culotte et bicorne,
se tenaient debout devant les portes. Ils s'appuyaient sur de longues
cannes à pommeau de cristal. Leurs boutons d'or luisaient comme
des yeux de chat.
Croniamantal ne trouvait plus son chemin; il erra pendant quelque
temps et longeait des maisons pauvres où des ombres passaient
vivement derrière les fenêtres éclairées. Des officiers en long
manteau bleu passèrent. Croniamantal se tourna pour les suivre du
regard, puis il sortit de la ville et alla, dans la nuit, contempler la
masse sombre du Spielberg. Tandis qu'il examinait la vieille prison
d'État, il y eut près de Croniamantal un bruit de pas, puis il vit trois
moines le dépasser en gesticulant et parlant haut. Croniamantal
courut après eux et leur demanda son chemin.
«Vous êtes Français, lui dirent-ils; venez avec nous.»

Croniamantal les examina et vit qu'ils portaient sur leurs frocs de


petits manteaux beige fort élégants. Chacun d'eux tenait une badine
et était coiffé d'un chapeau melon. En route, un des moines dit à
Croniamantal:
«Vous vous êtes fort éloigné de votre hôtel, nous vous indiquerons le
chemin si vous voulez. Mais, si cela vous convient, vous pouvez fort
bien venir au couvent: on vous recevra convenablement, puisque
vous êtes étranger, et vous pourrez y passer la nuit.»

Croniamantal accepta joyeusement en disant:


«Je le veux bien, car n'êtes-vous pas mes frères, à moi qui suis
poète?»
Ils se mirent à rire. Le plus vieux, qui avait des lorgnons cerclés d'or
et dont le ventre saillait hors du pet-en-l'air à la mode, leva les bras
en s'écriant:
«Poète! Est-ce possible?»
Et les deux autres, plus maigres, s'esclaffèrent en se baissant et en
se tenant le ventre comme s'ils avaient eu la colique.
«Soyons sérieux, dit le moine à lorgnon, nous allons traverser une
rue habitée par des juifs.»

Dans les rues, à chaque pas de porte, de vieilles femmes, debout


comme des sapins dans une forêt, appelaient, faisaient des signes.
—Fuyons cette puterie, dit le gros moine, qui était tchèque de
nation, que ses compagnons appelaient le père Karel.

Croniamantal et les moines finirent par s'arrêter devant un grand


couvent. Au son de la cloche, le portier vint ouvrir. Les deux moines
maigres dirent au revoir à Croniamantal, qui resta seul avec le père
Karel dans un parloir richement meublé.
«Mon enfant, dit le père Karel, vous vous trouvez dans un couvent
unique. Les moines qui l'habitent sont tous des gens comme il faut.
Nous avons d'anciens archiducs et même d'anciens architectes, des
soldats, des savants, des poètes, des inventeurs, quelques moines
venus de France après l'expulsion des congrégations et quelques
hôtes laïcs de bonnes manières. Tous sont des saints. Moi-même, tel
que vous me voyez, avec mes lorgnons et mon gros ventre, je suis
un saint. Je vais vous indiquer votre chambre, vous y resterez
jusqu'à neuf heures; alors vous entendrez la cloche du repas sonner
et je viendrai vous chercher.»

Le père Karel guida Croniamantal à travers de longs corridors. Puis


ils montèrent un escalier de marbre blanc et, au deuxième étage, le
père Karel ouvrit une porte en disant:
«Votre chambre.»

Il lui montra le bouton de l'électricité et sortit.


La chambre était ronde, le lit et les meubles étaient ronds; sur la
cheminée, une tête de mort ressemblait à un vieux fromage.
Croniamantal se mit à la fenêtre, sous laquelle s'étendait l'obscurité
touffue d'un grand jardin monacal d'où semblaient monter des rires,
des soupirs, des cris de joie, comme si mille couples s'y étreignaient.
Alors une voix de femme, dans le jardin, chanta une chanson que
Croniamantal avait entendue autrefois:
Croquemitaine
Porte la rose et le lilas
Le roi s'en vient
—Bonjour Germaine
—Croquemitaine
Tu reviendras une autre fois
Et Croniamantal se mit à chanter la suite:
—Bonjour Germaine
Je viens aimer entre tes bras
Puis il attendit que la voix de Tristouse continuât le couplet.
Et des voix d'hommes de-ci de-là chantaient sur des airs graves des
chansons inconnues, tandis qu'une voix cassée de vieillard
chevrotait:
Vexilla régis prodeunt...
À ce moment, le père Karel entra dans la chambre, tandis qu'une
cloche sonnait à toute volée.
«Eh bien! mon garçon, on écoutait les rumeurs de notre beau
jardin? Il est plein de souvenirs, ce paradis terrestre. Tychobrahé y
fit l'amour autrefois avec une jolie juive qui lui disait tout le temps:—
Chazer,—ce qui signifie cochon en jargon. Moi, j'y ai vu l'archiduc un
tel s'y amuser avec un joli garçon qui avait le derrière fait en forme
de cœur. Allons dîner, allons dîner.
*
* *
Ils arrivèrent dans un vaste réfectoire encore vide, et le poète put
examiner à son aise les fresques qui couvraient les murailles.
C'était Noé ivre-mort et couché. Son fils Cham découvrait la nudité
de son père, c'est-à-dire un cep de vigne joliment et naïvement peint
dont les branches servaient d'arbre généalogique ou à peu près, car
c'étaient les noms des abbés du couvent que l'on avait peints en
lettres rouges dans les folioles.
Les noces de Cana montraient un Mannekenpis pissant du vin dans
les barriques, tandis que la mariée, enceinte d'au moins huit mois,
présentait son ventre pareil à un baril à quelqu'un qui écrivait
dessus, au charbon: Tokaï.
C'étaient encore les soldats de Gédéon se soulageant de l'affreuse
colique causée par l'eau qu'ils avaient bue.
La longue table qui tenait le milieu de la salle, en longueur, était
mise avec une rare somptuosité. Les verres et les carafes étaient de
cristal taillé de Bohème, du cristal rouge le plus fin, dans lequel
n'entrent que de la fougère, de l'or et des grenats. Des pièces
d'argenterie superbes brillaient sur la blancheur de la nappe semée
de violettes.
Les moines arrivèrent deux par deux, capuchon sur la tête, bras
croisés sur la poitrine. En entrant, ils saluèrent Croniamantal et se
placèrent selon leur habitude. À mesure qu'ils arrivaient, le père
Karel disait à Croniamantal leur nom et leur pays d'origine. La tablée
fut bientôt complète et les convives étaient au nombre de cinquante-
six, Croniamantal compris. L'abbé, un Italien aux yeux bridés, dit le
bénédicité, et le repas commença, mais Croniamantal attendait avec
anxiété l'arrivée de Tristouse.
On servit d'abord un potage au bouillon dans lequel nageaient de
petites cervelles d'oiseaux et des petits pois...
*
* *
«Nos deux hôtes français viennent de partir, dit un moine français
qui avait été le prieur du Crépontois. Je n'ai pu les retenir: le
compagnon de mon neveu chantait tout à l'heure au jardin, de sa
jolie voix de soprano. Il a manqué s'évanouir en entendant
quelqu'un chanter, dans ce couvent, la suite de la chanson. C'est en
vain que mon neveu supplia son gracieux camarade de rester ici; ils
sont partis à cette heure et ont pris le train, car leur automobile
n'était pas prête. Nous la leur enverrons par chemin de fer. Ils ne
m'ont pas confié le but de leur voyage, mais je pense que ces pieux
enfants ont affaire à Marseille. Je crois, au demeurant, les avoir
entendus parler de cette ville.»

Croniamantal, pâle comme un linge, se leva alors:


«Excusez-moi, mes pères, leur dit-il, mais j'ai eu tort d'accepter
votre hospitalité. Il faut que je m'en aille, ne m'en demandez pas la
raison. Mais je garderai toujours un bon souvenir de la simplicité, de
la gaîté, de la liberté qui régnent ici. Tout cela m'est cher au plus
haut degré, pourquoi, pourquoi, hélas, n'en puis-je profiter?»

XVI

Persécution

En ce temps-là, on distribuait chaque jour des prix de poésie. Des


milliers de sociétés s'étaient fondées dans ce but et leurs membres
vivaient grassement en faisant, à date fixe, des largesses aux
poètes. Mais le 26 janvier était le jour où les plus grandes sociétés,
compagnies, conseils d'administration, académies, comités, jurys,
etc., etc., du monde entier décernaient celui qu'elles avaient fondé.
On attribuait ce jour-là 8,019 Prix de poésie dont le montant faisait
une somme de 50 millions 3,225 fr. 75. D'autre part, le goût de la
poésie ne s'étant répandu dans aucune classe de la population
d'aucun pays, l'opinion publique était très montée contre les poètes
que l'on appelait paresseux, inutiles, etc. Le 26 janvier de cette
année-là se passa sans incidents, mais le lendemain, le grand
journal La Voix, publié à Adélaïde (Australie), en langue française,
contenait un article du savant chimiste-agronome Horace Tograth
(un Allemand, né à Leipzig), dont les découvertes et les inventions
avaient paru souvent tenir du miracle. L'article intitulé Le Laurier
contenait une sorte d'historique de la culture du laurier en Judée, en
Grèce, en Italie, en Afrique et en Provence. L'auteur donnait des
conseils à ceux qui avaient des lauriers dans leurs jardins, il indiquait
les usages multiples du laurier, dans l'alimentation, dans l'art, dans la
poésie et son rôle comme symbole de la gloire poétique. Il en venait
à parler mythologie, faisant des allusions à Apollon et à la fable de
Daphné. À la fin, Horace Tograth changeait brusquement de ton et
terminait ainsi son article: «Et puis, je le dis en vérité, cet arbre
inutile est encore trop commun, et nous avons des symboles moins
glorieux auxquels les peuples attribuent la saveur fameuse du laurier.
Les lauriers tiennent trop de place sur notre terre trop habitée, les
lauriers sont indignes de vivre. Chacun d'eux prend la place de deux
hommes au soleil. Qu'on abatte les lauriers et qu'on craigne leurs
feuilles comme un poison. Naguère encore symbole de poésie et de
science littéraire, elles ne sont aujourd'hui que le symbole de cette
morte-gloire qui est à la gloire ce que la mort est à la vie, ce que la
main de gloire est à la clef.
«La vraie gloire a abandonné la poésie pour la science, la
philosophie, l'acrobatie, la philanthropie, la sociologie, etc... Les
poètes ne sont plus bons aujourd'hui qu'à toucher de l'argent qu'ils
ne gagnent point puisqu'ils ne travaillent guère et que la plupart
d'entre eux (sauf les chansonniers et quelques autres) n'ont aucun
talent et par conséquent aucune excuse. Pour ceux qui ont quelque
don, ils sont encore plus nuisibles, car s'ils ne touchent rien, ni à
rien, ils font chacun plus de bruit qu'un régiment et nous rabattent
les oreilles de ce qu'ils sont maudits. Tous ces gens-là n'ont plus de
raison d'être. Les prix qu'on leur décerne sont volés aux travailleurs,
aux inventeurs, aux savants, aux philosophes, aux acrobates, aux
philanthropes, aux sociologues, etc. Il faut que les poètes
disparaissent. Lycurgue les avait bannis de la République, il faut les
bannir de la terre. Sans quoi les poètes, paresseux fieffés, seront
nos princes et, sans rien faire, vivront de notre travail, nous
opprimeront, se moqueront de nous. En un mot, il faut se
débarrasser au plus vite de la tyrannie poétique.
«Si les républiques et les rois, si les nations n'y prennent garde, la
race des poètes, trop privilégiée, croîtra dans de telles proportions et
si rapidement qu'avant peu de temps personne ne voudra plus
travailler, inventer, apprendre, raisonner, faire des choses
dangereuses, remédier aux malheurs des hommes et améliorer leur
sort.
«Sans tarder, donc, il faut aviser et nous guérir de cette plaie
poétique qui ronge l'humanité.»

Un bruit énorme accueillit cet article. Il fut télégraphié ou téléphoné


partout, tous les journaux le reproduisirent. Quelques journaux
littéraires firent suivre la citation de l'article de Tograth de réflexions
moqueuses à l'égard du savant, on avait des doutes sur l'état de sa
mentalité. On riait de cette terreur qu'il manifestait à l'égard du
laurier lyrique. Les journaux d'informations et d'affaires, au
contraire, faisaient grand cas de l'avertissement. On y disait que
l'article de La Voix était génial.
L'article du savant Horace Tograth avait été un prétexte unique,
admirable pour affirmer la haine de la poésie. Et le prétexte était
poétique. L'article du savant d'Adélaïde faisait appel au merveilleux
de l'antiquité dont le souvenir gît dans tout homme bien né et à
l'instinct de conservation que connaissent tous les êtres. C'est
pourquoi presque tous les lecteurs de Tograth furent émerveillés,
effrayés et ne voulurent pas manquer l'occasion de faire du tort aux
poètes qui, à cause du grand nombre de prix dont ils bénéficiaient,
étaient jalousés par toutes les classes de la population. La plupart
des journaux concluaient en demandant que les gouvernements
prissent des mesures pour qu'au moins les prix de poésie fussent
supprimés.
Le soir, dans une autre édition de La Voix, le chimiste-agronome
Horace Tograth, publiait un nouvel article qui, de même que le
premier, télégraphié ou téléphoné partout, porta l'émotion à son
comble dans la presse, parmi le public et chez les gouvernants. Le
savant terminait ainsi:
«Monde, choisis entre ta vie et la poésie; si l'on ne prend pas de
mesures sérieuses contre elle, c'est fait de la civilisation. Tu
n'hésiteras point. Dès demain commencera l'ère nouvelle. La poésie
n'existera plus, on brisera les lyres trop lourdes pour les vieilles
inspirations. On massacrera les poètes.»
*
* *
Pendant la nuit la vie fut pareille dans toutes les villes du globe.
L'article télégraphié partout avait été reproduit dans des éditions
spéciales des journaux locaux qu'on s'arrachait. Le peuple était
partout de l'avis de Tograth. Les tribuns descendirent dans la rue et
se mêlant à la foule l'excitèrent. La plupart des gouvernements
prirent d'ailleurs cette nuit même des décisions dont le texte affiché
au fur et à mesure provoquait dans les rues un enthousiasme
indescriptible. La France, l'Italie, l'Espagne et le Portugal décrétèrent
les premières que les poètes établis sur leur territoire seraient
emprisonnés au plus tôt, en attendant qu'on décidât de leur sort.
Les poètes étrangers ou absents qui tenteraient de pénétrer dans
ces pays risqueraient d'être condamnés à mort. On télégraphia que
les États-Unis d'Amérique avaient décidé d'électrocuter tout homme
dont la profession de poète serait notoire. On télégraphia aussi qu'en
Allemagne il avait été décrété que les poètes en vers ou en prose
établis sur le territoire de l'empire resteraient enfermés jusqu'à
nouvel ordre dans leurs demeures. À la vérité, durant cette nuit et la
journée qui suivit tous les États du globe, même ceux qui ne
possédaient que de mauvais petits bardes sans lyrisme, prirent des
mesures contre le nom même de poète. Seuls, deux pays firent
exception, c'étaient l'Angleterre et la Russie. Ces lois improvisées
furent mises aussitôt à exécution. Tous les poètes qui se trouvaient
sur les territoires français, italien, espagnol et portugais furent
emprisonnés le lendemain, tandis que quelques journaux littéraires
paraissaient encadrés de noir et se lamentaient sur la nouvelle
terreur. Des dépêches arrivées à midi annoncèrent qu'Aristénète
Sud-Ouest, le grand poète nègre d'Haïti, avait été coupé en
morceaux le matin même et dévoré par une populace de noirs et de
mulâtres ivres de soleil et de carnage. À Cologne, la Rayserglocke
avait tonné toute la nuit, et le matin, le professeur docteur
Stimmung, auteur d'une épopée médiévale en quarante-huit chants,
étant sorti pour prendre le train, car il se rendait à Hanovre, avait
été poursuivi par une troupe de fanatiques qui lui donnait des coups
de bâton et criait: «À mort le poète!»
Il s'était réfugié dans la cathédrale et y demeura enfermé avec
quelques bedeaux par la population déchaînée des Drikkes, des
Hannes et des Marizibill. Ces dernières surtout se montraient
acharnées, invoquaient la Vierge, sainte Ursule et les trois rois
Mages en plat allemand, sans négliger de donner des coups de
poing, afin de se frayer un passage dans la foule. Leurs patenôtres
et adjurations pieuses étaient entrelardées d'insultes admirablement
ignobles à l'égard du professeur-poète, qui devait surtout sa
réputation à l'unisexualité de ses mœurs. Le front contre terre, il se
mourait de peur sous le grand saint Christophe de bois. Il entendit
les bruits des maçons qui muraient toutes les issues de la cathédrale
et se prépara à mourir de faim.
Vers deux heures, on télégraphia qu'un sacristain-poète de Naples
avait vu bouillonner le sang de saint Janvier dans l'ampoule. Le
sacristain était sorti en proclamant le miracle et s'était empressé
d'aller au port jouer à la mourre. Il avait gagné à ce jeu tout ce qu'il
avait voulu et un coup de couteau à la poitrine.
Les télégrammes annonçant les arrestations de poètes se
succédèrent toute la journée. L'électrocution des poètes américains
fut connue vers quatre heures.

À
À Paris, quelques jeunes poètes de la rive gauche épargnés à cause
de leur manque de notoriété organisèrent une manifestation qui
partit de la Closerie des Lilas vers la Conciergerie, où était enfermé
le prince des poètes.
La troupe arriva pour disperser les manifestants. La cavalerie
chargea. Les poètes sortirent des armes et se défendirent, mais le
peuple à cette vue se mêla à la bagarre. On étrangla les poètes et
quiconque se proclamait leur défenseur.
Ainsi commença la persécution qui s'étendit rapidement dans le
monde entier. En Amérique, après l'électrocution des poètes
célèbres, on lyncha tous les chansonniers nègres et même beaucoup
qui de leur vie n'avaient fait de chansons; ensuite on tomba sur les
blancs de la bohème littéraire. On apprit aussi que Tograth, après
avoir dirigé lui-même la persécution en Australie, s'était embarqué à
Melbourne.

XVII

Assassinat

Comme Orphée, tous les poètes étaient près d'une malemort.


Partout les éditeurs avaient été pillés et les recueils de vers brûlés.
Dans chaque ville, des massacres avaient eu lieu. L'admiration
universelle allait pour le moment à cet Horace Tograth qui d'Adélaïde
(Australie) avait déchaîné la tempête et semblait avoir à jamais
détruit la poésie. La science de cet homme, racontait-on, tenait du
miracle. Il dissipait les nuages ou amenait un orage au lieu qu'il
voulait. Les femmes, dès qu'elles le voyaient, étaient prêtes à faire
sa volonté. Au demeurant, il ne dédaignait pas les virginités ou
féminines ou masculines. Dès que Tograth avait su quel
enthousiasme il avait éveillé dans tout l'univers, il avait annoncé qu'il
irait dans les principales villes du globe après que l'Australie aurait
été débarrassée de ses poètes érotiques ou élégiaques. En effet, on
apprit à quelque temps de là le délire des populations de Tokio, de
Pékin, de Yakoutsk, de Calcutta, du Caire, de Buenos-Ayres, de San
Francisco, de Chicago, à l'occasion de la visite de l'infâme Allemand
Tograth. Il laissa partout une impression surnaturelle à cause de ses
miracles qu'il disait scientifiques, de ses guérisons extraordinaires qui
portèrent au sublime sa réputation de savant et même de
thaumaturge.
Le 30 mai, Tograth débarqua à Marseille. La population était massée
sur les quais, Tograth arriva du paquebot dans une chaloupe. Dès
qu'on qu'on l'aperçut, les cris, les vivats, les braillements poussés
par des gosiers innombrables se mêlèrent au bruit du vent, des
vagues et des sirènes sur les vaisseaux. Tograth était debout dans la
chaloupe, grand et maigre. À mesure que la chaloupe approchait, on
distinguait mieux les traits du héros. Son visage était glabre et
bleuissait à l'endroit des poils, sa bouche presque sans lèvres
blessait d'une large estafilade le visage sans menton, ce qui faisait
qu'on eût dit d'un requin. Au-dessus, le nez se retroussait et laissait
béantes les narines. Le front montait perpendiculaire, très haut et
très large. Le costume de Tograth était blanc, très collant, ses
souliers également blancs avaient des talons hauts. Il ne portait pas
de chapeau. Lorsqu'il posa le pied sur le sol de Marseille,
l'enthousiasme fut tel qu'après que les quais se furent vidés, trois
cents personnes furent trouvées mortes étouffées, foulées aux pieds,
écrasées. Quelques hommes saisirent le héros et le portèrent ainsi,
tandis que l'on chantait, criait et que des femmes lui jetaient des
fleurs jusqu'à l'hôtel où des appartements lui avaient été préparés,
et à la porte s'étaient placés les directeurs, les interprètes, les
pisteurs.
*
* *
Le même matin, Croniamantal, venant de Brünn, était arrivé à
Marseille pour y chercher Tristouse qui s'y trouvait depuis la veille au
soir avec Paponat. Tous trois s'étaient mêlés à la foule qui acclamait
Tograth devant l'hôtel où il devait descendre.
—Heureuse fureur, dit Tristouse. Vous n'êtes pas poète, Paponat,
vous avez appris des choses qui valent infiniment mieux que la
poésie. N'est-ce pas, Paponat, que vous n'êtes nullement poète?
—En effet, ma chère, répondit Paponat, j'ai versifié pour m'amuser,
mais je ne suis pas poète, je suis un homme d'affaires excellent et
nul ne s'y entend mieux que moi pour gérer une fortune.
—Ce soir, vous mettrez à la poste une lettre pour La Voix d'Adélaïde,
vous direz tout cela et ainsi vous serez à l'abri.
—Je n'y manquerai pas, dit Paponat. À-t-on jamais vu ça, poète!
c'est bon pour Croniamantal.
—J'espère bien, dit Tristouse, qu'on va le massacrer à Brünn, où il
pensait nous trouver.
—Mais justement le voilà, dit doucement Paponat. Il est dans la
foule. Il se cache, il ne nous a pas vus.
—Je voudrais qu'on le massacrât sans tarder, dit Tristouse avec un
soupir. J'ai idée que cela ne tardera pas.
—Regardez, dit Paponat, voici venir le héros.
*
* *
Le cortège qui amenait Tograth étant arrivé devant l'hôtel, on
déposa l'agronome sur le sol. Tograth se tourna vers la foule et lui
parla:
«Marseillais, je pourrais, pour vous remercier, employer des paroles
plus grosses que votre célèbre sardine. Je pourrais faire un long
discours. Mais ces paroles ne seraient jamais proportionnées à la
magnificence de la réception que vous m'aviez réservée. Je sais qu'il
y a parmi vous des maux que je puis soulager grâce à la science,
non pas seulement la mienne, mais celle que les savants ont
accumulée depuis des millénaires. Qu'on amène les malades, je veux
les guérir.»

Un homme dont le crâne était chauve comme celui d'un habitant de


Mycone cria:
«Tograth! divinité humaine, savantissime tout-puissant, donne-moi
une chevelure luxuriante.»

Tograth sourit et dit qu'on laissât cet homme s'approcher, ensuite il


toucha le crâne dénudé en disant:
«Ton caillou stérile se recouvrira d'une abondante végétation, mais
souviens-toi de ce bienfait en haïssant à jamais le laurier.»

En même temps que le chauve, une fille s'était approchée. Elle


implora Tograth:
«Bel homme, bel homme, regarde ma bouche, mon amant, à coups
de poing, m'a cassé quelques dents, rends-les-moi.»

Le savant sourit et lui mit un doigt dans la bouche en disant:


«Tu peux mordre maintenant, tu as des dents superbes, Mais, en
reconnaissance, montre ce que tu as dans ton sac.»

La fille rit en ouvrant la bouche où brillèrent de nouvelles dents, puis


elle ouvrit son sac en s'excusant:
«C'est une drôle d'idée, devant tout le monde. Voilà mes clefs, voici
la photographie sur émail de mon amant; il est mieux que ça.»

Mais les yeux de Togralh avaient brillé; il avait avisé, pliées, quelques
chansons parisiennes rimées sur des airs viennois, Il prit ces papiers
et après les avoir regardés:
—Ce ne sont que des chansons, dit-il, n'as-tu pas de poésies?
—J'en ai une bien jolie, dit la fille, c'est le pisteur de l'hôtel Victoria
qui me l'a faite avant de partir pour la Suisse. Mais je ne l'ai pas
montrée à Sossi.

Et elle tendit à Tograth un petit papier rose sur lequel se trouvait ce


lamentable acrostiche:
Mon aimée adorée avant que je m'en aille,
Avant que notre amour, Maria, ne déraille,
MARIA Râle et meure, m'amie, une fois, une fois,
Il faut nous promener tous deux seuls dans les bois,
Alors je m'en irai plein de bonheur je crois.
«Ce n'est pas seulement de la poésie, dit Tograth, elle est, en outre,
idiote.»

Il déchira le papier et le jeta dans le ruisseau, tandis que la fille


claquait des dents et assurait d'un air effrayé:
«Bel homme, bel homme, je ne savais pas que ce fût mal.»

À ce moment, Croniamantal s'avança auprès de Tograth et


apostropha la foule:
«Canailles, assassins!»

Des rires éclatèrent. On cria:


«À l'eau, le couillon!»

Et Tograth, regardant Croniamantal, lui dit:


«Mon ami, que cette affluence ne vous offusque point. Moi, j'aime la
populace, bien que je descende dans des hôtels où elle ne fréquente
point.»

Le poète laissa parler Tograth, puis il reprit, s'adressant à la foule:


«Canaille, ris de moi, tes joies sont comptées, on te les arrachera
une à une. Et sais-tu, populace, quel est ton héros?»
Tograth souriait et la foule était devenue attentive. Le poète
poursuivit:
«Ton héros, populace, c'est l'Ennui apportant le Malheur.»

Un cri d'étonnement sortit de toutes les poitrines. Des femmes firent


le signe de la croix. Tograth voulut parler, mais Croniamantal le saisit
brusquement par le cou, le jeta sur le sol et l'y maintint en posant
un pied sur sa poitrine. En même temps il parla:
«C'est l'Ennui et le Malheur, le monstre ennemi de l'homme, le
Léviathan gluant et immonde, le Béhémoth souillé de stupres, de
viols et par le sang des merveilleux poètes. Il est le vomissement
des Antipodes, ses miracles ne trompent pas plus les clairvoyants
que les miracles de Simon le magicien n'en imposaient aux Apôtres.
Marseillais, Marseillais, pourquoi vous dont les ancêtres s'en sont
venus du pays le plus purement lyrique, vous êtes-vous solidarisés
avec les ennemis des poètes, avec les barbares de toutes les
nations? Le plus étrange miracle de l'Allemand revenu d'Australie, le
connaissez-vous? C'est d'en avoir imposé au monde et d'avoir été un
instant plus fort que la création même, que la poésie éternelle.»

Mais Tograth, qui avait pu se dégager, se dressa, sali de poussière et


ivre de rage, il demanda:
«Qui es-tu?»

Et la foule cria:
«Qui es-tu, qui es-tu?»

Le poète se tourna vers l'orient et parla d'une voix exaltée:


«Je suis Croniamantal, le plus grand des poètes vivants. J'ai souvent
vu Dieu face à face. J'ai supporté l'éclat divin que mes yeux humains
tempéraient. J'ai vécu l'éternité. Mais les temps étant venus, je suis
venu me dresser devant toi.»

Tograth accueillit d'un éclat de rire terrible ces dernières paroles. Les
premiers rangs de la foule ayant vu rire Tograth rirent aussi, et le
rire en éclats, en roulades, en trilles se communiqua bientôt à la
populace tout entière, à Paponat et à Tristouse Ballerinette. Toutes
les bouches ouvertes faisaient face à Croniamantal qui perdait
contenance. On cria parmi les rires:
«À l'eau, le poète!... Au feu, Croniamantal!... Aux chiens, l'amant du
laurier!»

Un homme qui était au premier rang et avait un gros gourdin en


appliqua un coup à Croniamantal, dont la grimace douloureuse fit
redoubler les rires de la foule. Une pierre habilement lancée vint
frapper le nez du poète, dont le sang jaillit. Une marchande de
poisson fendit la foule, puis, se plaçant devant Croniamantal, lui dit:
«Hou! le corbeau. Je te reconnais, Peuchaire! tu es un policier qui
s'est fait poète; tiens, vache, tiens, conteur de bourdes.»

Et elle lui asséna une gifle formidable en lui crachant au visage.


L'homme que Tograth avait guéri de la calvitie s'approcha en disant:
«Regarde mes cheveux, est-ce un faux miracle, ça?»

Et levant sa canne, il la poussa si adroitement qu'elle creva l'œil


droit. Croniamantal tomba à la renverse, des femmes se
précipitèrent sur lui et le frappèrent. Tristouse trépignait de joie,
tandis que Paponat essayait de la calmer. Mais du bout de son
parapluie, elle alla crever l'autre œil de Croniamantal, qui la vit en
cet instant et s'écria:
«Je confesse mon amour pour Tristouse Ballerinette, la poésie divine
qui console mon âme.»

Alors de la foule des hommes crièrent:


«Tais-toi, charogne! attention les madames.»

Les femmes s'écartèrent vite, et un homme qui balançait un grand


couteau posé sur sa main ouverte le lança de telle façon qu'il vint se
planter dans la bouche ouverte de Croniamantal. D'autres hommes
firent de même. Les couteaux se fichèrent dans le ventre, la poitrine,
et bientôt il n'y eut plus sur le sol qu'un cadavre hérissé comme une
bogue de châtaigne marine.

XVIII

Apothéose

Croniamantal mort, Paponat avait ramené à l'hôtel Tristouse


Ballerinette qui, aussitôt qu'elle y fut, se livra à une crise de nerfs
dans les règles. On était dans un vieil immeuble et, par hasard, dans
un placard, Paponat découvrit une bouteille d'eau de la reine de
Hongrie qui remontait au XVIIe siècle. Ce remède agit rapidement.
Tristouse reprit ses sens et alla sans plus tarder à l'hôpital réclamer
le corps de Croniamantal, qu'on lui remit sans difficulté.
Elle lui fit des funérailles décentes et plaça sur sa tombe une pierre
sur laquelle on grava, comme épitaphe:
Marchez sur la pointe des pieds
Pour ne pas troubler le bon sommeil
Ensuite elle revint à Paris avec Paponat qui l'abandonna quelques
jours après pour un mannequin des Champs-Élysées.
Tristouse ne le regretta pas longtemps. Elle prit le deuil de
Croniamantal et monta à Montmartre, chez l'oiseau du Bénin, qui
commença par lui faire la cour, et après qu'il en eût eu ce qu'il
voulait, ils se mirent à parler de Croniamantal.
—Il faut que je lui fasse une statue, dit l'oiseau du Bénin. Car je ne
suis pas seulement peintre, mais aussi sculpteur.
—C'est ça, dit Tristouse, il faut lui élever une statue.
—Où ça? demanda l'oiseau du Bénin; le gouvernement ne nous
accordera pas d'emplacement. Les temps sont mauvais pour les
poètes.
—On le dit, répliqua Tristouse, mais ce n'est peut-être pas vrai. Que
pensez-vous du bois de Meudon, monsieur l'oiseau du Bénin?
—J'y avais bien pensé, mais je n'osais le dire. Va pour le bois de
Meudon.
—Une statue en quoi? demanda Tristouse. En marbre? En bronze?
—Non, c'est trop vieux, répondit l'oiseau du Bénin, il faut que je lui
sculpte une profonde statue en rien, comme la poésie et comme la
gloire.
—Bravo! Bravo! dit Tristouse en battant des mains, une statue en
rien, en vide, c'est magnifique, et quand la sculpterez-vous?
—Demain, si vous voulez; nous allons dîner, nous passerons la nuit
ensemble, et dès le matin nous irons au bois de Meudon, où je
sculpterai cette profonde statue.
*
* *
Aussitôt dit, aussitôt fait. Ils allèrent dîner avec l'élite montmartroise,
rentrèrent se coucher vers minuit et le lendemain matin, à neuf
heures, après s'être munis d'une pioche, d'une bêche, d'une pelle et
d'ébauchoirs, ils prirent le chemin du joli bois de Meudon, où ils
rencontrèrent, en compagnie de sa mie, le prince des poètes, tout
heureux des bonnes journées qu'il avait passées à la Conciergerie.
Dans la clairière, l'oiseau du Bénin se mit à l'ouvrage. En quelques
heures, il creusa un trou ayant environ un demi-mètre de largeur et
deux mètres de profondeur.
Ensuite, on déjeuna sur l'herbe.
L'après-midi fut consacré par l'oiseau du Bénin à sculpter l'intérieur
du monument à la semblance de Croniamantal.
Le lendemain, le sculpteur revint avec des ouvriers qui habillèrent le
puits d'un mur en ciment armé large de huit centimètres, sauf le
fond qui eut trente-huit centimètres, si bien que le vide avait la
forme de Croniamantal, que le trou était plein de son fantôme.
*
* *
Le surlendemain, l'oiseau du Bénin, Tristouse, le prince des poètes et
sa mie revinrent au monument qui fut comblé avec la terre qu'on en
avait tirée et là, la nuit tombée, on planta un beau laurier des
poètes, tandis que Tristouse Ballerinette dansait en chantant:

Toutes ne t'aiment pas tu mens


Palantila mila miman
Quand il fut l'amant de la reine
Il est le roi puisqu'elle est reine
C'est vrai c'est vrai je l'aime
Croniamantal au fond du puits
Est-ce lui

Cueillons la marjolaine
La nuit

À
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like