100% found this document useful (8 votes)
945 views

Full Download Machine Vision Algorithms in Java Techniques and Implementation Whelan Paul F Molloy Derek PDF

Whelan

Uploaded by

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

Full Download Machine Vision Algorithms in Java Techniques and Implementation Whelan Paul F Molloy Derek PDF

Whelan

Uploaded by

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

Download the full version of the textbook now at textbookfull.

com

Machine Vision Algorithms in Java Techniques


and Implementation Whelan Paul F Molloy Derek

https://textbookfull.com/product/machine-vision-
algorithms-in-java-techniques-and-implementation-
whelan-paul-f-molloy-derek/

Explore and download more textbook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Exploring BeagleBone Tools and Techniques for Building


with Embedded Linux 2nd Edition Derek Molloy

https://textbookfull.com/product/exploring-beaglebone-tools-and-
techniques-for-building-with-embedded-linux-2nd-edition-derek-molloy/

textbookfull.com

Distributed Virtual Worlds Foundations and Implementation


Techniques Using VRML Java and CORBA Diehl Stephan

https://textbookfull.com/product/distributed-virtual-worlds-
foundations-and-implementation-techniques-using-vrml-java-and-corba-
diehl-stephan/
textbookfull.com

Numerical Algorithms Methods for Computer Vision Machine


Learning and Graphics 1st Edition Justin Solomon

https://textbookfull.com/product/numerical-algorithms-methods-for-
computer-vision-machine-learning-and-graphics-1st-edition-justin-
solomon/
textbookfull.com

Theoretical Study of Electron Correlation Driven


Superconductivity in Systems with Coexisting Wide and
Narrow Bands Daisuke Ogura
https://textbookfull.com/product/theoretical-study-of-electron-
correlation-driven-superconductivity-in-systems-with-coexisting-wide-
and-narrow-bands-daisuke-ogura/
textbookfull.com
The Chemistry and Biology of Nitroxyl (HNO) 1st Edition
Fabio Doctorovich

https://textbookfull.com/product/the-chemistry-and-biology-of-
nitroxyl-hno-1st-edition-fabio-doctorovich/

textbookfull.com

Urban Shrinkage Industrial Renewal and Automotive Plants


Andreas Luescher

https://textbookfull.com/product/urban-shrinkage-industrial-renewal-
and-automotive-plants-andreas-luescher/

textbookfull.com

Essential Docker for ASP.NET Core MVC 1st Edition Adam


Freeman

https://textbookfull.com/product/essential-docker-for-asp-net-core-
mvc-1st-edition-adam-freeman/

textbookfull.com

Technology, Theory, and Practice in Interdisciplinary STEM


Programs: Connecting STEM and Non-STEM Approaches 1st
Edition Reneta D Lansiquot (Eds.)
https://textbookfull.com/product/technology-theory-and-practice-in-
interdisciplinary-stem-programs-connecting-stem-and-non-stem-
approaches-1st-edition-reneta-d-lansiquot-eds/
textbookfull.com

World History 101 Tom Head

https://textbookfull.com/product/world-history-101-tom-head/

textbookfull.com
Biographies and Careers throughout Academic Life 1st
Edition Jesús F. Galaz-Fontes

https://textbookfull.com/product/biographies-and-careers-throughout-
academic-life-1st-edition-jesus-f-galaz-fontes/

textbookfull.com
Machine Vision Algorithms in Java
Springer-Verlag London Ltd.
Paul F. Whelan and Derek Molloy

Machine Vision
Algorithms in Java
Techniques and Implementation

With 183 Figures

Springer
Paul F. Whelan, BEng, MEng, PhD
Derek Molloy, BEng
Vision Systems Laboratory, School of Electronic Engineering, Dublin City
University, Dublin 9, Republic of lreland

ISBN 978-1-4471-1066-8 ISBN 978-1-4471-0251-9 (eBook)


DOI 10.1007/978-1-4471-0251-9
British Library Cataloguing in Publicat ion Data
Whelan, Paul
Machine vis ion algorithms in java : techniques and
implementation
1.Computer vis ion 2. java (Computer program language)
3.Computer algorithms
I.Titiie II. Molloy, Derek
006.3'7
ISBN 978-1-4471-1066-8
Library of Congress Cataloging-in-Publication Data
Whelan, Paul E, 1963-
Machine vision algorithms in java: techniques and implementation / Paul E Whelan
and Derek Molloy.
p.cm.
ISBN 978-1-4471-1066-8 (alk. paper)
1. Computer vis ion. 2. Computer algorithms. 3. java (Computer program language) 1.
Molloy, Derek, 1973- II. Title
TA1634.w542000
006.3 '7 -dc21 00-030072
Apart from any fair dealing for the purposes of research or private study, or criticism or review, as per-
mitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored
or transmitted, in any form or by any means, with the prior permis sion in writing of the publishers, or
in the case of reprographic reproduction in accordance with the terms of licences issued by the Copy-
right Licensing Agency. Enquiries concerning reproduction outside those terms should be sent to the
publishers.
© Springer-Verlag London 2001
Originally published by Springer-Verlag London Berlin Heidelberg in 2001
Softcover reprint of the hardcover 1st edition 2001

The use of registered names, trademarks etc. in this publication does not imply, even in the absence of
a specific statement, that such names are exempt from the relevant laws and regulations and therefore
free for general use.
The publisher makes no representation, express or implied, with re gard to the accuracy of the informa-
tion contained in this book and cannot accept any legal responsibility or liability for any errors or omis-
sions that may be made.
Typesetting: PostScript files by authors

34/3830-543210 Printed on acid-free paper SPIN 10743121


To Caroline, Hannah and Sean. (PFW)

To Sally and parents. (DM)


Preface

For many novices to the world of machine vision, the development of auto-
mated vision solutions may seem like a relatively easy task as it only requires a
computer to understand basic elements such as shape, colour and texture. Of
course this is not the case. Extracting useful information from images in a lab-
oratory environment is a difficult process at the best of times, but to develop
imaging systems with the reliability and repeatability required for industrial,
medical and associated imaging applications increases the complexity of the
design task. The aim of this book was to produce a self contained software
reference source for machine vision designers which takes such issues into ac-
count. To that end Machine Vision Algorithms in Java contains explanations
of key machine vision techniques and algorithms, along with the Java source
code for a wide range of real-world image processing and analysis functions.
A number of texts have been written over the last few years, which have
focused on implementing image processing and to a lesser extent image anal-
ysis functions, through coded examples (i.e. for a range of software languages
and environments). So, why do we need another book on the subject? Firstly,
Machine Vision Algorithms in Java concentrates on examining these issues
from a machine vision perspective. It focuses on the image analysis and gen-
eral machine vision design task, as well as discussing the key concepts relating
to image processing. In addition, we have made available (via the Internet) a
comprehensive machine vision development environment, Neat Vision, which
allows the algorithms and techniques discussed throughout this book to be
implemented by the reader.
The range of machine vision techniques and applications has grown sig-
nificantly over the last decade and as such it would be difficult for a single
text to cover them all. Therefore, this book concentrates on those algorithms
and techniques that have found acceptance within the machine vision com-
munity. As is in the nature of putting a book like this together, certain areas
receive greater attention reflecting our experience and the nature of our own
research.
This book has grown from a number of different elements. Many of the
ideas outlined are based on the postgraduate modules Computer and Machine
Vision (EE544) and Object-oriented Programming (EE553) developed by Dr.
Paul Whelan and Derek Molloy respectively. Both modules are available in
Vlll Preface

traditional form and via the Internet as part of Dublin City University's
Remote Access to Continuing Engineering Education (RA CeE) initiative l .
Another key element was the development of Neat Vision, a Java based
visual programming environment for machine vision. It provides an intuitive
interface which is achieved using a "drag and drop" block diagram approach,
where each image analysis/processing operation is represented by a graphical
block with inputs and outputs that can be interconnected, edited and deleted
as required. NeatVision was designed to allow the user to focus on the ma-
chine vision design task rather than concerns about the subtlety of a given
programming language. It allows students of machine vision to implement
their ideas in a dynamic and easy to use way, thus reinforcing one of the key
elements of the educational experience, interaction. In conjunction with the
publication of this book a fully functional 'shareware' version of NeatVision
has been made available via the Internet 2 .
We have also included an introduction to Object-oriented Programming
(OOP) and the Java programming language, with particular reference to
its imaging capabilities. This was done for those readers who may be un-
familiar with OOP and the Java programming language. It includes details
relating to the design of a Java based visual programming environment for
machine vision along with an introduction to the Java 2D imaging and the
Java Advanced Imaging (JAI) Application Programming Interface (API). A
wide range of illustrative examples are also included.
Having successfully digested the ideas outlined in this book the reader
will:

• Be familiar with the essential elements of machine VlSlOn software and


have an understanding of the problems involved in the development and
implementation of machine vision systems from a software perspective.
• Have the ability to design and implement image processing and analysis
techniques.
• Be able to evaluate emerging machine vision algorithms and techniques.
• Be familiar with the Java programming language and its application to
image analysis.
• Be able to develop machine vision solutions using a Java based visual pro-
gramming environment (i.e. Neat Vision).

This book is aimed at senior undergraduate and postgraduate students in


engineering and computer science as well as practitioners in machine vision,
who may wish to update or expand their knowledge in the field. We have
tried to present the techniques and algorithms of machine vision in a way
1 http://www.racee.ie/
2 See http://www.NeatVision.com/ for further details on downloading and in-
stalling this software. This web site also contains details of the NeatVision envi-
ronment along with a summary of its techniques. A number of working examples
along with sample files and associated visual workspaces are also available.
Preface IX

that it will be understood not only by specialists familiar with the field, but
also by those who are less familiar with the topic. Care has also been taken to
ensure that we have provided adequate references to supporting work. This
should aid readers who wish to examine the topics covered in more detail.
The organisation of the book is as follows. Chap. 1 introduces the general
field of machine vision systems engineering. Chap. 2 outlines the key concepts
behind the Java programming language. As well as giving a brief history, de-
scription and layout of the Java language, this chapter outlines the properties
of Java that make it useful for image processing and analysis. The purpose of
Chap. 3 is to detail some of the basic techniques and algorithms used in the
development of machine vision systems. Key elements of the image process-
ing and analysis functions introduced in this section are also implemented in
Java and form the basis of the NeatVision visual programming environment.
Chap. 4 follows on from this basic introduction by examining mathemati-
cal morphology, a key framework in which many machine vision algorithms
can be placed. Chaps. 5 and 6 expand our discussion of imaging techniques
to include key elements of texture and colour image analysis. Chap. 7 de-
tails the design and implementation of the Neat Vision visual programming
environment. Appendix A outlines the graphics file formats that are used
by NeatVision and Appendix B details the NeatVision imaging Application
Programming Interface (API) specification. Finally, Appendix C summarises
the range of operators available in the NeatVision machine vision software
development environment. A range of sample applications implemented in
NeatVision are highlighted throughout the book.
For updates, corrections, colour images and sample visual programmes
please refer to the book web site at http://www.eeng.deu.ie;- j avamv /.

Dublin, June 2000 Paul F. Whelan


Derek Molloy

mvaj©eeng.deu.ie
Acknowledgments

This book has benefited from the comments and suggestions of a wide range
of people, including our colleagues with whom we have had many fruitful
discussions and collaborations. Numerous students have also contributed,
both directly and indirectly. The most important contributions coming from
members of the Vision Systems Laboratory (VSL) at Dublin City Univer-
sity (DCU), namely Ovidiu Ghita, Alexandru Drimbarean and Pradeep PP.
We would particulary like to express our gratitude to Robert Sadleir (VSL)
for a fruitful collaboration in the development of Neat Vision. Robert also
contributed to our discussion on the Neat Vision development environment,
specifically in Chap. 7. We would also like to thank all the members of the
VSL for their comments on the various drafts of this book.
We would like to thank Prof. Charles McCorkell, Head of the School
of Electronic Engineering, DCU, for his support of the VSL and this book
project. We would also like to acknowledge all our academic colleagues for
our many discussions on computer and machine vision, especially Prof. Bruce
Batchelor (machine vision systems engineering) and Dr. Pierre Soille (math-
ematical morphology). We would like to acknowledge Xuemei Zhang (De-
partment of Psychology, Stanford University), Mark Graves (Spectral Fusion
Technologies) and Tim Carew (Technology Systems International) and thank
them for their permission to use some of the material cited in this book.
Special thanks are due to Nicholas Pinfield and Oliver Jackson of Springer-
Verlag for their commitment to this book and maintaining its schedule. Ma-
chine Vision Algorithms in Java: Techniques and Implementation was pre-
pared in camera-ready form using the IbTEX text processing environment and
Paint Shop Pro image editing software.
Finally, the authors would like to thank their families for their constant
support and encouragement during this project. We would like to thank the
readers in advance for comments and suggestions aimed at improving and ex-
tending the present book and its associated NeatVision software. Any errors,
of course, remain our own responsibility.
XII Acknowledgments

Notice

Neat Vision and its associated materials are copyrighted © 2000, by Paul
F. Whelan. The software is presented "as is". While every reasonable effort
has been made to ensure the reliability of this software, NeatVision and the
associated algorithms outlined in this book are supplied for general reference
only and should not be relied on without further specific inquiry. Neat Vision
may be downloaded, stored on a hard drive or other storage device, with the
following restrictions and exceptions:

• Systematic or multiple-copy reproduction or republication; electronic re-


transmission to another location; print or electronic duplication of any
NeatVision material supplied for a fee or for commercial purposes; or alter-
ing or recompiling any contents of NeatVision and its associated materials
are not permitted.
• By choosing to use Neat Vision and its associated materials, you agree to
all the provisions of the copyright law protecting it and to the terms and
conditions established by the copyright holder.
• The authors cannot accept responsibility for any loss or damage caused by
the use of the source code presented in this book.

Trademarks

• Sun, Sun Microsystems, Solaris, Java and all Java-based trademarks are
trademarks or registered trademarks of Sun Microsystems, Inc. in the
United States and other countries.
• Netscape and Netscape Navigator are registered trademarks of Netscape
Communications Corporation in the United States and other countries.
• Microsoft, Windows, Windows NT and/or other Microsoft products refer-
enced herein are either trademarks or registered trademarks of Microsoft
Corporation.
• IBM is a registered trademark of IBM Corporation in the United States
and other countries.
• Paint Shop Pro is a registered trademark of Jasc Software, Inc.
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Contents

1. An Introduction to Machine Vision. . . . . . . . . . . . . . . . . . . . . . . 1


1.1 Human, Computer and Machine Vision. . . . . . . . . . . . . . . . . . . . 1
1.2 Vision System Hardware ................................ 5
1.3 Vision System Software ................................. 6
1.4 Machine Vision System Design . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4.1 Image Acquisition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4.2 Image Representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.3 Image Processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 10
1.4.4 Image Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 10
1.4.5 Image Classification .............................. 12
1.4.6 Systems Engineering. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 16
1.5 NeatVision: Where Java meets Machine Vision............. 17
1.5.1 NeatVisions Graphical User Interface (GUI) ......... 18

2. Java Fundamentals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 21
2.1 The History of Java ..................................... 21
2.1.1 What Makes Java Platform Independent? ........... 22
2.1.2 The Just-In-Time Compiler ........................ 22
2.1.3 The Sun Java Software Development Kit (Java SDK). 23
2.2 Object-oriented Programming. . . . . . . . . . . . . . . . . . . . . . . . . . .. 23
2.2.1 Encapsulation.................................... 24
2.2.2 Classes.......................................... 24
2.2.3 Objects......................................... 25
2.2.4 Inheritance...................................... 25
2.2.5 Polymorphism................................... 27
2.2.6 Abstract Classes ................................. 27
2.3 Java Language Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 28
2.3.1 Variables........................................ 28
2.3.2 Access Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 28
2.3.3 Java Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 29
2.3.4 Java Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 29
2.3.5 Java Comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 29
2.3.6 The super and this Keywords. . . . . . . . . . . . . . . . . . . .. 30
2.3.7 Java Arrays ..................................... 31
XIV Contents

2.3.8 The "Object" and "Class" Classes. . . . . . . . . . . . . . . . .. 31


2.3.9 Interfaces ....................................... 31
2.3.10 Packages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 32
2.4 Applications and Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 33
2.4.1 Writing Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 33
2.4.2 Applets......................................... 34
2.4.3 An Applet and an Application? ... . . . . . . . . . . . . . . . .. 35
2.5 Java and Image Processing .............................. 36
2.5.1 The Canvas Class ................................ 36
2.5.2 Java and Images ................................. 38
2.5.3 Image Producers and Image Consumers . . . . . . . . . . . .. 41
2.5.4 Recovering Pixel Data from an Image Object ... . . . .. 41
2.5.5 Recreating an Image Object from an Array of Pixels.. 44
2.6 Additional Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 45
2.6.1 ColorModel...................................... 45
2.6.2 ImageFilter...................................... 45
2.6.3 CropImageFilter................................. 46
2.6.4 RGBImageFilter................................. 46
2.6.5 FilteredImageSource.............................. 47
2.7 Double Buffering.. . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 47
2.8 Recent Additions to Java for Imaging. . . . . . . . . . . . . . . . . . . .. 49
2.8.1 Java 2D API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 49
2.8.2 Working with the Java 2D API .................... 50
2.8.3 Renderable Layer and Rendered Layer . . . . . . . . . . . . .. 54
2.8.4 Java Advanced Imaging API (JAI) ................. 54
2.8.5 JAI Functionality ................................ 56
2.9 Additional Information on Java . . . . . . . . . . . . . . . . . . . . . . . . .. 58
2.10 Conclusion ............................................ 59

3. Machine Vision Techniques. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 61


3.1 Elementary Image Processing Functions. . . . . . . . . . . . . . . . . .. 61
3.1.1 Monadic, Point-by-point Operators. . . . . . . . . . . . . . . .. 62
3.1.2 Intensity Histogram .............................. 65
3.1.3 Look-up Tables (LUT) . . . . . . . . . . . . . . . . . . . . . . . . . . .. 66
3.1.4 Dyadic, Point-by-point Operators .................. 70
3.2 Local Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 73
3.2.1 Linear Local Operators ........................... 74
3.2.2 Non-linear Local Operators. . . . . . . . . . . . . . . . . . . . . . .. 79
3.2.3 Edge Detectors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 82
3.2.4 N-tuple Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 90
3.2.5 Edge Effects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 91
3.2.6 Grey Scale Corner Detection. . . . . . . . . . . . . . . . . . . . . .. 93
3.3 Binary Images ......................................... 96
3.3.1 Boolean Operators ............................... 98
3.3.2 Connected Component (Blob) Analysis. . . . . . . . . . . . .. 99
Contents xv

3.3.3 Measurements on Binary Images ................... 112


3.3.4 Run-length Coding ............................... 115
3.3.5 Shape Descriptors ................................ 115
3.4 Global Image Transforms ................................ 116
3.4.1 Geometric Transforms ............................ 116
3.4.2 Distance Transforms .............................. 117
3.4.3 Hough Transform ................................ 119
3.4.4 Two-dimensional Discrete Fourier Transform (DFT) .. 124
3.5 Conclusion ............................................ 134

4. Mathematical Morphology ................................ 137


4.1 Binary Mathematical Morphology ........................ 138
4.1.1 Dilation and Erosion .............................. 138
4.1.2 Hit-and-Miss Transform ........................... 143
4.1.3 Opening and Closing ............................. 145
4.1.4 Skeletonisation ................................... 145
4.1.5 Structuring Element Decomposition ................ 146
4.1.6 Interval Coding .................................. 148
4.2 Grey Scale Mathematical Morphology ..................... 149
4.2.1 Basic Grey Scale Operators ........................ 150
4.2.2 Noise Removal using Grey Scale Morphology ......... 152
4.2.3 Morphological Gradients .......................... 152
4.2.4 Point-Pairs ...................................... 156
4.2.5 Top-Hat Transform ............................... 157
4.3 Morphological Reconstruction ............................ 160
4.3.1 Conditional Dilation .............................. 161
4.3.2 Geodesic Dilation ................................ 162
4.3.3 Geodesic Erosion ................................. 162
4.3.4 Reconstruction by Dilation ........................ 163
4.3.5 Reconstruction by Erosion ......................... 163
4.3.6 Ultimate Erosion ................................. 163
4.3.7 Double Threshold ................................ 163
4.3.8 Image Maxima ................................... 164
4.3.9 Image Minima ................................... 165
4.4 Morphological Segmentation ............................. 165
4.4.1 Skeleton Influence by Zones (SKIZ) ................. 165
4.4.2 Watershed Segmentation .......................... 165
4.5 Case Study: Geometric Packing .......................... 169
4.5.1 Geometric Packer Implementation .................. 169
4.6 Morphological System Implementation .................... 174
4.7 Conclusion ............................................ 174
XVI Contents

5. Texture Analysis ......................................... 175


5.1 Texture and Images ..................................... 175
5.2 Edge Density .......................................... 175
5.3 Monte-Carlo Method .................................... 176
5.4 Auto-Correlation Function (ACF) ........................ 177
5.5 Fourier Spectral Analysis ................................ 177
5.6 Histogram Features ..................................... 178
5.7 Grey Level Run Length Method (GLRLM) ................ 178
5.8 Grey Level Difference Method (GLDM) ................... 178
5.9 Co-occurrence Analysis .................................. 179
5.9.1 Energy, or Angular Second Moment ................ 181
5.9.2 Entropy ......................................... 181
5.9.3 Inertia .......................................... 182
5.9.4 Local Homogeneity (LH) .......................... 182
5.10 Morphological Texture Analysis .......................... 183
5.10.1 Morphological Ratio .............................. 183
5.10.2 Granularity ...................................... 184
5.11 Fractal Analysis ........................................ 184
5.12 Textural Energy ........................................ 185
5.13 Texture Spectrum Method ............................... 186
5.14 Local Binary Patterns (LBP) ............................ 187
5.15 Random Field Models ................................... 187
5.16 Spatial/Frequency Methods ............................ 188
5.17 Autoregressive Model ................................... 189
5.18 Structural Approaches to Texture Analysis ................ 189
5.19 Conclusion ............................................ 189

6. Colour Image Analysis .................................... 191


6.1 Colour Cameras ........................................ 191
6.2 Red-Green-Blue (RGB) Colour Representation ............. 193
6.2.1 Maxwell's Colour Triangle ......................... 195
6.2.2 One-dimensional Histograms: Colour Separations ..... 197
6.2.3 Two-dimensional Scattergrams ..................... 197
6.3 Hue-Saturation-Intensity (HSI) Colour Representation ...... 198
6.3.1 Colour Scattergrams .............................. 203
6.4 Opponent Process Representation ........................ 203
6.5 YIQ Colour Representation .............................. 204
6.6 YUV Colour Representation ............................. 205
6.7 CIE Chromaticity Diagram ............................. 206
6.8 CIEXYZ Colour Representation .......................... 206
6.9 CIELUV Colour Representation .......................... 208
6.10 CIELAB Colour Representation .......................... 209
6.11 Spatial CIELAB Colour Representation ................... 209
6.11.1 Segmenting Colour Textures ....................... 210
6.12 Programmable Colour Filter (PCF) ....................... 211
Contents XVII

6.12.1 PCF Implementation ............................. 211


6.12.2 Recognising a Single Colour ....................... 214
6.12.3 Noise Effects ..................................... 215
6.12.4 Colour Generalisation ............................. 217
6.13 Conclusion ............................................ 219

7. N eat Vision: Visual Programming for Machine Vision ..... 223


7.1 Visual Programming in NeatVision ....................... 224
7.1.1 Input and Output Components .................... 225
7.1.2 Processing Components ........................... 226
7.1.3 Flow Control Components ......................... 227
7.1.4 System Development .............................. 231
7.1.5 Sample Programme ............................... 231
7.2 Java Programming in NeatVision ......................... 233
7.2.1 Data Flow Programming .......................... 233
7.2.2 Standard Component Architecture .................. 235
7.2.3 Adding Functionality ............................. 237
7.2.4 Examples ....................................... 237
7.3 The NeatVision Application ............................. 245
7.3.1 Visual Programming in NeatVision ................. 245
7.3.2 Image Processing ................................. 247
7.3.3 Other User Interfaces ............................. 249
7.3.4 The Integrated Software Development Environment ... 251
7.3.5 The Help Viewer ................................. 252
7.4 Sample Applications .................................... 254
7.4.1 Low-level Programming ........................... 254
7.4.2 High-level Programming ........................... 256
7.4.3 Isolating the Largest Item in an Image .............. 257
7.4.4 Bottle-top Inspection ............................. 258
7.4.5 Plant-stem Location .............................. 259
7.5 Conclusion ............................................ 259

A. NeatVision Graphic File Formats ......................... 261

B. NeatVision Imaging API Specification .................... 263


B.1 Greylmage Class ....................................... 264
B.2 RGBlmage Class ........................................ 265

C. NeatVision Components .................................. 269

References ................................................ 273

Index ..................................................... 279


1. An Introduction to Machine Vision

The purpose of this chapter is to introduce the reader to the basic principles of
machine vision. In this discussion the differences between computer, machine
and human vision are highlighted. In doing so, we draw attention to the key
elements involved in machine vision systems engineering. While this book
concentrates on the software aspects of the design cycle, this task cannot be
taken in isolation. Successful application of vision technology to real-world
problems requires an appreciation of all the issues involved.
This chapter is aimed at readers with minimal prior experience of machine
vision and as such more experienced readers will find most of this material
familiar. We also briefly introduce the reader to the concepts behind the
Neat Vision visual programming environment. This is discussed in more detail
in Chap. 7.

1.1 Human, Computer and Machine Vision

"There is more to machine vision than meets the eye!" (Batchelor &
Whelan 1994a)

Computer and machine vision involve the automatic extraction, manipula-


tion, analysis and classification of images or image sequences, usually within
special or general-purpose computing systems. The purpose of which is to
obtain useful information about the world with a view to carrying out some
task.
Many researchers use the terms computer and machine vision interchange-
ably, although there are key differences. Machine vision systems are gener-
ally used in an industrial environment. The design of machine vision systems
requires a broad spectrum of techniques and disciplines. These include elec-
tronic engineering (hardware and software design), engineering mathematics,
physics (optics and lighting), mechanical engineering (since industrial vision
systems deal with a mainly mechanical world) as well as the system engineer-
ing aspects of developing reliable industrial systems. Machine vision generally
involves the engineering of solutions to specific problems and can be seen as a

P. F. Whelan et al., Machine Vision Algorithms in Java


© Springer-Verlag London 2001
2 1. An Introduction to Machine Vision

subset of the general systems engineering task. The formal definition 1 of ma-
chine vision put forward by the Automated Vision Association (AVA) refers
to it as:

"The use of devices for optical, non-contact sensing to automatically


receive and interpret an image of a real scene in order to obtain
information and/or control machines or processes." (AVA 1985).

Computer vision is a branch of computer science which concentrates on


the wider scientific issues relating to the automated interpretation of images.
Computer vision often deals with relatively domain-independent considera-
tions, generally aiming to duplicate the effect of human vision by electron-
ically perceiving and understanding an image. Research in this area often
deals with issues involving perception psychology and the analysis of human
and other biological vision systems.
Of course there is a danger in over-emphasizing the differences between
computer and machine vision. Both fields embrace common ground (Fig. 1.1),
but each has its own non-overlapping areas of expertise (Braggins 2000). The
key difference seems to lie in the motivation behind the development of the
imaging solution.

Image Analysis
Image Processing
Image Representation
Image Understanding

Pattern Recognition Systems Engineering


Visual Modelling & Perception Robotics
Biological Vision Applied Vision

Fig. 1.1. Key aspects of computer and machine vision.

In general, machine vision engineering is about solving specific engineer-


ing problems and not trying to develop 'human-like' visual systems. The
concept of modelling an industrial vision systems design on the human vi-
sual system can often seem like a good starting point for novices to the field.
This is not the case (Hochberg 1987) and can often be counterproductive. We
should not confuse the two types of vision, the danger in relying on human
1 Note that this definition does not specifically refer to cameras or computer sys-
tems
1.1 Human, Computer and Machine Vision 3

driven approaches is that simpler and perhaps more elegant solutions may be
overlooked. The human vision system is qualitative in nature, dealing with
a broad range of imaging tasks in varying conditions. The human system
can pick out a familiar person in a crowded room, but would find it difficult
to give the exact dimensions of that person. Machine vision On the other
hand is quantitative, i.e. it can deal with making precise measurements at
high speed, but lacks the key elements of the human vision system. Machine
vision systems are good at repetitive tasks and provide fast and reliable de-
cision making. If a human operator was to examine a colour web material
over a shift, they would find it difficult to detect a subtle colour change due
to the human's vision process ability to adapt to such gradual changes. The
fact that the human vision process is prone to subjective considerations such
as fatigue and boredom, which interfere with consistent evaluations, must
also be taken into consideration (these can be reliably handled by a machine
vision system).
Machine vision systems for industry first received serious attention in the
1970s (Parks 1978), although the proposal that a video system be used for
industrial inspection was first made in the 1930s. Throughout the early 1980s,
the subject developed slowly, with a steady contribution being made by the
academic research community, but with only limited industrial interest being
shown. In the mid-1980s there was serious interest being shown in vision
systems by the major automobile manufacturers, although this was followed
by a period of disillusionment with a large number of small vision companies
failing to survive. Interest grew significantly in the late 1980s and early 1990s,
due largely to significant progress being made in making fast image processing
hardware available at a competitive price. Throughout this period academic
workers have been steadily proving feasibility in a wide range of products,
representing all of the major branches of manufacturing industry.
Machine vision systems nOw appear in every major industrial sector, in-
cluding such areas as electronics (PCB inspection, automatic component
recognition), car manufacturing (inspection of car bodies for dents, dimen-
sional checking), food (inspection and grading of fruit and vegetables, inspec-
tion of food containers) and the medical industries (tablet quality control,
detection of missing items in pharmaceutical packets). The main application
areas for industrial vision systems occur in automated inspection and mea-
surement and robotic vision. Automated visual inspection and measurement
systems have, in the past, tended to develop faster. In fact, quality control
related applications such as inspection, gauging and recognition currently ac-
count for well over half of the machine vision market. This has been mainly
due to the lower cost and the ease of retrofitting such inspection systems onto
existing production lines, compared to the large capital investment involved
in developing a completely new robotic work cell and the extra uncertainty
and risks involved in integrating two new complex technologies. As manufac-
turing technology becomes more complex, there is a growing requirement to
4 1. An Introduction to Machine Vision

integrate the inspection process more closely with the overall manufacturing
process (McClannon et al. 1993). This moves the application of automated
inspection from a quality control to a process control role, that is from defect
detection to defect prevention. The reader is referred to Batchelor & Whelan
(1994b), Chin (1988), Chin & Harlow (1982), Davies (1996) and Freeman
(1987) for further details on a wide range of industrial implementations of
machine vision systems.
As well as reducing scrap and rework costs, product quality can also be
improved by using vision to aim for a higher quality standard. Machine vision
can be used to determine the cause of "abnormal situations" and provide early
warning for potential hazards on a production line, for example detecting a
warped metal plate before it is fed into a stamping press and potentially
damaging the press. This technology can also provide extensive statistics of
production process and in some applications we may have no alternative to
using automated vision, as the environment may be hazardous to humans.
Machine vision systems are not perfect, they contain two significant types
of error. System errors will be familiar to all engineers as there will always
be a trade-off between the cost and functionality of the systems components.
System errors can often be reduced by using components with higher speci-
fications. Statistical errors are not as easy to handle. It can be quite difficult
to decide exactly where to draw the line which determines a good from a bad
product. If the image analysis process places the product in this grey area
then we have either false rejects or worse still we may pass a faulty prod-
uct. This type of error can also be confounded by a lack of communication
between the vision engineer and the customer.
Significant progress has been made over the last decade due, in part to the
falling cost of computing power. This has led to a spread in the technology
and has enabled the development of cheaper machine vision systems. This,
in turn, has enabled medium-sized manufacturing companies to consider the
option of using machine vision to implement their inspection tasks. To a lesser
extent, the availability of a well educated work-force, a small proportion of
which has an awareness of machine vision, has also aided the growth and
acceptance, of industrial vision systems. The main reason, however, for this
growth is strategic. There is a growing realisation within many industries
that machine vision is an integral component of a long term automation
development process, especially when one considers the importance of quality
in manufacturing. This fact, combined with the legal liabilities involved in
the production and sale of defective products, highlights the strategic case
for the use of machine vision in automated inspection. A similar argument
applies to the application of vision to robotics and automated assembly.
1.2 Vision System Hardware 5

1.2 Vision System Hardware

The imaging engine in many low-cost machine vision systems consists of a


host computer working in conjunction with single or multiple plug-in boards.
The most commOn example of these systems consists of a personal computer,
or workstation and a frame-store card, which allow an image to be captured
from a standard CCD camera (array image format) and displayed. Many of
the current range of frame-store cards also offer on-board processing. Plug-in
accelerator cards which enable certain functions to be implemented in real-
time are available as daughter boards for many frame-stores. Some frame-
stores have slow-scan capabilities and the ability to interface to line-scan
cameras. When used in conjunction with the current range of high speed
personal computers, such a vision system is an attractive option for small to
medium applications, of low complexity.
Certain personal computers/workstations nOw offer direct video input
without the need for additional plug-in frame-store cards. With the growth
in multimedia applications, it is likely that this will become more commOn-
place On commercial computers. Such systems offer a number of significant
advantages, most important of which is their relatively low cost. Additional
advantages include their ease of use and familiarity. This is especially the case
when used in conjunction with standard personal computers, which have be-
come commonplace both in the home and the workplace. The fact that the
host computer for the imaging system is a widely available commercial prod-
uct also widens the base for software applications.
For greater speed and ability, engineers often turn to plug-in boards which
have a specific functionality, such as real-time edge detection, binary corre-
lation and convolution. Typically, the host computer for such boards would
be a VME rack fitted with a CPU card. Quite often, such special-purpose
boards are pipelined, i.e. they perform different operations On an image in a
sequential manner. This allows a new image to be captured while the previous
image is still undergoing processing. The main advantage of such systems is
their speed and the ability to increase the systems image throughput rate by
the addition of extra plug-boards. The disadvantage of such systems is that
they can be difficult to program and quite often require programmers with
highly specialist skills. There is also a significant cost factor involved in the
capital equipment, along with the application development costs. While the
majority of dedicated plug-in boards for pipelined systems are tuned to deal
with array CCD cameras, newer systems have appeared On the market that
are specifically designed for line-scan cameras.
Some system manufactures have taken the option of designing specific
machine vision engines which are not tuned for a specific application, but
rather designed for their general functionality. Such systems may be totally
self-contained and ready to install in an industrial environment. That is, they
contain the imaging optics, camera, imaging engine and interfaces for vari-
ous mechanical actuators and sensors. They differ from turn-key systems in
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
6 1. An Introduction to Machine Vision

that the software is supplied with the self-contained system has yet to be
moulded into a form that would solve the vision application. Such systems
have significant advantages, the main one being speed. The majority of self-
contained systems are custom designed, although they may contain some
plug-in boards and are tuned to provide whatever functionality is required
by the application. The self-contained nature of the mechanical, image ac-
quisition and display interfaces is also a significant benefit when installing
vision systems. However, it can be difficult to add further functionality at a
later date without upgrading the system.
Turn-key vision systems are self-contained machine vision systems, de-
signed for a specific industrial use. While some such systems are custom de-
signed, many turn-key systems contain commercially available plug-in cards.
Turn-key systems tend to be designed for a specific market niche, such as
paper inspection. So, not only is the hardware tuned to deal with high-speed
image analysis applications, it is also optimised for a specific imaging task.
While the other systems discussed usually require significant development
to produce a final solution for an imaging application, turn-key systems are
fully developed, although they need to be integrated into the industrial envi-
ronment. This should not be taken lightly, as it can often be a difficult task.
Also, it may not always be possible to find a turn-key system for a specific
application.

1.3 Vision System Software

There are a large number of image processing and analysis packages currently
available. Several of these packages are freely available over the Internet,
see Machine Vision Resources2 for general reference material relating to the
design and development of commercial machine vision systems. Some of these
packages are tightly tied to a given vision system, while others are compiled
for a number of host computers and operating systems. The majority of
the software packages have interactive imaging tools that allow ideas to be
tested prior to customizing the software for a given application. A number
of tutorial books have also been written which implement a large number of
image processing functions and to a lesser extent image analysis functions, in
a range of software languages (Parker 1997, Klette & Zamperoni 1996, Pitas
1993, Myler & Weeks 1993, Lindley 1991).
For more information on the hardware and software aspects of real-time
imaging, including a survey of commonly used languages, see Dougherty &
Laplante (1995).
2 http://www.eeng.dcu.ie/-whelanp/resQurces/resQurces.html
1.4 Machine Vision System Design 7

1.4 Machine Vision System Design

In this section we outline the key components found in the majority of ma-
chine vision systems, Fig. 1.2. While the application itself will determine the
relevant importance of each of these tasks, successful implementations will
have taken all these issues into consideration during the system design. The
software aspects of these design stages are expanded upon throughout the
course of this book.

Image Interpretation and


Mechanical Interface

Image Processing
and Analysis

Image Sensor FeedbaCk


Oala
Palh
Flow

lighting and Optics

Part Feedi ng and


Mechanical Interface

Fig. 1.2. Machine vision system components.

1.4.1 lInage Acquisition

Image acquisition generally involves the capture of the analogue image signal
(although digital cameras can also be used) and the generation of a one-
dimensional (I-D) or two-dimensional (2-D) array of integers representing
pixel brightness levels. In the majority of machine vision applications a solid
state sensor based camera is employed. This is made of discrete elements
that are scanned to produce an image. Examples of such sensors are Charge
Coupled Devices (CCD) and Charge Injection Devices (CID). CCD based
cameras are the most commonly used solid state sensor due to their small size,
low power consumption requirements, wide spectral response and robustness.
These cameras are available in both line scan and area array configurations.
Line scan cameras are suitable for high resolution scanning applications where
the object moves beneath a fixed camera position, for example a paper web.
Area array cameras produce a medium to high resolution 2-D snapshot of a
scene (similar to a TV image).
It is worth noting that there have been major advances in other com-
ponent technologies, specialised lighting units, lenses and advisor programs,
which guide a vision engineer through the initial stages of the design process.
8 1. An Introduction to Machine Vision

While the acquisition of image data may not be seen as directly related to
image analysis and processing, the design decisions involved in this stage (i.e.
camera type, lighting and optical system design) have a fundamental bearing
on the systems software. For example, in Fig. 1.3 we have applied two different
lighting techniques to the same scene. Given the task of counting the number
of candies in the image, which lighting configuration should be adopted?
While the image in (b) gives a cleaner image, we would have to apply complex
image segmentation techniques (such as the one discussed in Sec. 4.4.2) to
separate the touching items prior to counting. Whereas the image in (a) may
initially seem to be of little use due to the bright reflections evident on each
candy piece. In fact the lighting unit was specifically designed to produce
this effect. This lighting configuration simplifies the image processing and
analysis tasks as all that is required of the software is to isolate and count
these reflections (Chap. 3), both relatively straightforward imaging tasks.

(a) (b)

Fig. 1.3. Different lighting techniques applied to candy sweets. (a) Ring Light
(Light Background). (b) Back-lighting, this produces a silhouette of the scene.

1.4.2 Image Representation

This relates to the means of representing the image brightness data in a form
that enables the image processing and analysis design process to be imple-
mented efficiently. We shall first consider the representation of monochrome
(grey scale) images. Let x and y denote two integers where 1 :::; x :::; m and
1 :::; y :::; n. In addition, let f (x, y) denote an integer function such that
0:::; f(x, y) :::; W (W denotes the white level in a grey scale image). An array
F will be called a digital image, where an address (x, y) defines a position in
F, called a pixel, or picture element. The elements of F denote the intensities
within a number of small rectangular regions within a real (i.e. optical) im-
age. Strictly speaking, f(x, y) measures the intensity at a single point, but if
1.4 Machine Vision System Design 9

the corresponding rectangular region is small enough, the approximation will


be accurate enough for most purposes. The array F contains a total of m x n
elements and this product is called the spatial resolution of F (Fig. 1.4).
For example, when m = n 2: 128 and W 2: 64, we can obtain a good
image of a human face. Many of the industrial image processing systems
in use nowadays manipulate images in which m = n = 512 and W = 255
(Fig. 1.5). This leads to a storage requirement of 256 Kbytes/image. A binary
image is one in which only two intensity levels, black (0) and white (1), are
permitted (Fig. 1.5(d)). This requires the storage of m x n bits/image.

ly

f(x,y)

n Fig. 1.4. A digital image consisting of an array of


----+ m x n pixels. The pixel in the xth column and the
x yth row has an intensity equal to f(x, y).

An impression of colour can be conveyed to the eye by combining different


colours of light. The signal from a colour television camera may be represented
using three components (red, green and blue): R = r(x, y); G = g(x, y); B =
b(x, y), where R, G and B are defined in a similar way to F. The vector
(r(x,y),g(x,y),b(x,y)) defines the intensity and colour at the point (x,y) in
the colour image. Colour image analysis is discussed in more detail in Chap. 6.
Multispectral images can also be represented using several monochrome im-
ages. Video sequences are used to represent and analyse movement within
or across scenes. A video sequence is, in effect, a time-sampled representa-
tion of the original moving scene (see Blake & Isard (1998) for details of
one approach to image sequence analysis). Each frame in the sequence is a
standard colour, or monochrome image and can be coded as such. Thus, a
monochrome video sequence may be represented digitally as a sequence of
2-D arrays [F1 ,F2 ,F3 ... FN].
While it is beyond the scope of this book to detail the various image
coding techniques that are now available (see Rao & Hwang (1996) for further
details on video coding), two basic coding mechanism have been employed in
machine vision, namely run-length and chain coding (these will be discussed
in Chap. 3).
10 1. An Introduction to Machine Vision

(a) (b)

(c) (d)

Fig. 1.5. Image resolution and binary threshold. (a) to (c) Bottle-top grey scale
image at varying resolutions. (d) Binary version of the bottle-top image.

1.4.3 Image Processing

This is an image to image operation. It aims to produce images that will make
the analysis stage simpler and robust. Key to the image processing task is
the ability to segment (Fig. 1.6) and enhance the features to be analysed.
This can be a difficult task when dealing with complex scenes. The two main
classes of operations applied to images during processing are point to point
and neighbourhood operations. A wide range of image processing functions
are detailed in Chaps. 3, 4, 5 and 6.

1.4.4 Image Analysis

Image analysis involves the automatic extraction of useful information from


an image. This information must be both explicit and useful in the subse-
quent decision making process. Common image analysis techniques include
Random documents with unrelated
content Scribd suggests to you:
The Project Gutenberg eBook of And it was good
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.

Title: And it was good

Author: A. Earley

Illustrator: Dan Adkins

Release date: November 11, 2023 [eBook #72092]

Language: English

Original publication: New York, NY: Ziff-Davis Publishing Company,


1962

Credits: Greg Weeks, Mary Meehan and the Online Distributed


Proofreading Team at http://www.pgdp.net

*** START OF THE PROJECT GUTENBERG EBOOK AND IT WAS


GOOD ***
And It Was Good

By A. EARLEY

Illustrated by ADKINS

A moving tale of a second chance


for man—and for his maker.

[Transcriber's Note: This etext was produced from


Amazing Stories February 1962.
Extensive research did not uncover any evidence that
the U.S. copyright on this publication was renewed.]
When she came back he looked at her and put down the piece of
wood which he had been carving.
He always carved in anxious moments. Many years before he had
been apprenticed to a carpenter. He still loved the smooth, creamy
feel and the warm tang of a good piece of wood. Usually he whittled
away at it until it suggested a design to work on. More often than not
it turned out to be a face, rugged peasant features with the simple
wisdom of age engraved on them, or the chubby whorls of a child
dimpled with delight. Today, he thought, it might make a tree heavy
with fruit and the crown of leaves.
"He's decided to do it, then"? he said, and she nodded without
looking at him. She did not want to see the pain in her son's eyes.
He got up and stood beside her and put his arm round her
shoulders.
"When"? he asked her softly, patiently.
"Right away".
"Did you ask him if he would let me go again instead"?
"I couldn't"! she said and pulled him to her. "I couldn't bear it again
after what they did to you last time".
"Am I any the worse for it"? he smiled at her. "Besides, it was a long
time ago and people have changed".
"You'd suffer and you'd be away for years", she said. "I couldn't go
through that. Not again".
"Is he very sad about it"? he asked.
"You know how he is when he has to do a thing like that", she said.
"He said you weren't to worry too much. I was to tell you he'd like to
talk to you about it later. He might want you to go there for a short
visit while it's on".
He went back to his whittling, but his mind was busy with other
things and the tree would not take shape.

Spring had been late before. As the Times pointed out, there had
been snow as late as mid-May in 1569 and at the end of April in
1782, yet the chronicles recorded bumper crops for both years.
Agricultural experts advised closer pruning of fruit trees to speed
budding, and an American firm of Artificial Fertilizer Manufacturers
brought out a new product called 'Shoot-boost'. But the
correspondence columns of the newspapers carried letters pointing
out that, while spring might have been late before, this time the
weather was entirely spring-like, yet still there was no sign of shoot,
blossom or bud. Excessive radiation resulting from nuclear tests was
blamed.
It was mid-May before the people and their governments became
seriously alarmed. Trees still stood bare as in the depth of winter,
lawns bore the bruising of last season's mowing but no new growth,
flower beds showed the unbroken rills of after-seed raking. Farmers
walked their fields day after day and crouched down to silhouette the
furrows against the sky, the better to see the green whiskers when
they sprouted. They prodded their heifers and ewes and went down
to the villages to consult the vet. Their wives searched the hen-
houses and put down extra grain and bricks of chalk.
The Pope's call to world-wide prayer and the British Government's
announcement of the introduction of rationing fell on the same day.
In most countries, the Pope's call found little response because the
people were too busy lining up at food stores trying to lay in stocks.
There were bread riots in Teheran.

Rumors of a cattle disease began to circulate several days before


official news of the full extent of the additional catastrophe was
released. That night, the British Prime Minister spoke on the BBC.
"With Her Majesty's consent," he said after reviewing the 'grave and
disquieting situation', "I have given instructions for all available ships
of the Royal Navy to put to sea immediately as an emergency fishing
fleet." Meanwhile, he continued, divers and frogmen were asked to
place their services at the disposal of the Ministry of Agriculture and
Fisheries. They would be required to "glean nourishment for the
nation from the laden larders of the deep." "Human ingenuity, skill
and tenacity will conquer yet," he concluded. The Prime Minister's
broadcast was followed by the announcement of emergency
regulations for the disposal of dead cattle.
On 16th June, the President of the United States informed an
Emergency Meeting of the General Assembly of the United Nations
that Professor Braunweiler of Columbia University had perfected a
method of extracting carbon sugar from wood. All suitable industrial
plants throughout America were to be geared to the mass-production
of the necessary equipment. The United States was prepared to
supply the whole world with this equipment and with power-operated
tree-felling implements on a lend-lease basis. Teams of instructors in
the use of the equipment would be available to proceed to all parts of
the world by the end of the month. The offer, which became known
as USASAW, (USA SUGAR AID TO THE WORLD), was accepted
with gratitude by all but the Soviet delegation.
Shortly after Sugar-Aid started, a Frenchman named Dr. Muller
discovered, (in desperation, vineyards stood barren), that tree-sugar
caused a fermentation in the still-plentiful needles of coniferous trees
which, when distilled, resulted in a drink rich in alcohol and vitamins.
He gave the drink the name 'BOIGNAC' in melancholy memory of
happier days. Within six weeks, France had a surplus in the World
Bank, and a French admiral was appointed to command the NATO
Mediterranean fleet. Undoubtedly, boignac helped; yet, by the end of
August, even that could not arrest the death rate.

On 3rd September, a Soviet Task Force landed troops and armor at


sixteen places along the East-African coast. Moscow Radio informed
the world that 'the glorious forces of the USSR have taken this step
under the personal command of Mr. Khrushchev to safeguard
Africa's rich resources in animal life against the depredations of the
Capitalist Warmongers'. Thus, the world was told, all peaceloving
peoples would be assured an equitable and adequate supply of meat
in the hard months to come.
At an Emergency Meeting of the NATO Council immediate counter-
measures were agreed upon, but it was decided to confine retaliation
to Africa and not to use nuclear weapons unless Russia did so first.
The 'British Left', which had come into being after the Labor Party
had split, withdrew from the House of Commons in protest, and the
workers of the largest motor works in Italy assembled outside their
long-closed factory to call for strike action.
By mid-December, the war in Africa had settled down to a stalemate.
There was a good deal of patrolling; the opposing armies 'lived off
the land', in other words on what game they could bag before the
other side got it. Food-finding became more important than fighting,
and hunger closed the eyes of higher command to the proximity of
the enemy, except of course when the enemy was engaged in
tracking the same game. Reports from the front recorded these
'patrol skirmishes', and gave account of the really violent artillery
duels. Loading and firing guns required less waning energy than
infantry slogging in the heavy country. The fact that the wide no-
man's-land between the opposing armies formed the main hunting-
ground exposed friend and foe to the same gunfire. Casualties were
consequently high. The Neutral Investigating Commission appointed
after much vetoing by the United Nations—it consisted of delegates
from Costa Rica, Kashmir and Monaco—found the situation rather
confusing and withdrew to Cannes to consider its findings.
Early in January, a British scientist invented a Very-High-Frequency
Lamp, regular exposure to which substituted a certain amount of the
energy normally absorbed in food. The equipment was fantastically
expensive to produce and was therefore available to very few
people. A portable, cheaper and far less efficient model was mass-
produced for the armed forces and essential workers. The dashing
victories in Africa, forecast by enthusiastic politicians as a certain
result of the new machine, did not however materialize. The new
energy induced in picked units was expended in a redoubled quest
for food. The papers reported increased patrol activity.
An agent planted by the Communists in the Ministry of Defense in
London succeeded in photographing the plans of the ray-lamp.
Within six weeks, a Russian version of the equipment reached the
Red forces in Africa. As a result, the stalemate became staler still.
Both sides began to lose control of their troops, which scattered over
wide areas of Africa well outside the zone of battle; game had
become scarce, and pursuit led both sides further and further afield.
On a swampy peninsula, formed by a hairpin bend of a crocodile-
infested river, a British and a French soldier had established their
laager. They had joined forces to hunt for edible snakes, and a few
hundred yards up-river one of them had trodden on a carelessly
buried anti-personnel mine. The soggy ground had prevented the
contraption from jumping as high as the designer had intended, and
the dense, though leafless undergrowth had screened them from the
worst of the blast.
They took it in turns to fetch water in their hats from the river and to
bathe each other's wounds. Starving and feverish, neither of them
knew for certain when the stranger joined them. He was not in
uniform; he spoke English and French so well that they both claimed
him for a fellow-countryman. He did not enlighten them, and they did
not persist in their questions. He insisted on nursing them and
waiting on them. He fetched water for them from the river, and he put
clay from the river bank on their septic wounds; he said it would heal
them. The Englishman was embarrassed to see that the stranger
had tears in his eyes while he did it. To pretend that he had not
noticed, the Tommy talked about the flipping bastards who strew
flipping mines all over the flipping place. The stranger smiled at that
and said he would try to get them some fish from the river. He was
away a long time, and when the Englishman crawled down to the
river to see what had happened, he saw the stranger on his knees
on the river bank. He wanted to shout that one could not catch
flipping fish that flipping way, but then he changed his mind and
crawled back to the Frenchman. The stranger turned up a little later
with his hat full of fine fish. He wanted to light a fire to cook them, but
the Frenchman pointed up to where shells from both sides were
hissing over them, and they ate the fish raw. It tasted wonderful.
The stranger settled down to stay with them and brought fish and
water as often as they felt hungry or thirsty. When he was not
otherwise engaged, he used one of their bayonets to whittle away at
pieces of wood. Their wounds were clearing up fast and did not hurt
any more. The Frenchman insisted on giving the stranger his
gascape to sleep in because he had nothing else, and the Tommy
pulled out his only spare pair of socks because the stranger's were
walked to shreds.
Sometimes the stranger left them for a few days, but he always
made sure that they had enough water and fish before he left. He
came back dusty and dirty and tired out, but he did not seem to need
much sleep. Once, when the Tommy woke in the middle of the night
and wanted a drink, he saw the stranger kneeling under a nearby
tree. Flipping shell-shock, probably. Poor bastard.

The Russian soldier stumbled into their laager one evening just as
they were getting ready for sleep. He dropped his rifle in his surprise
and then held his hands up high because the Frenchman was
groping for his bayonet. They stood for a while looking at each other
until the Frenchman put his weapon down and the Russian's arms
fell slowly to his sides. He watched them for a few minutes, then he
saw a fishtail lying on the ground and picked it up and began to
gnaw it. The Tommy glanced at his companions and crawled to the
hole in the rocks behind them where they kept their supplies and
gave the Russian a whole fish. The Russian grinned and took it, and
while he was eating it he sat down and gradually wriggled his way
closer to them. They showed him another fish and he said 'da' and
they gave it to him. "First time I knew a flipping Ivan could say yes
too," the Tommy said.
To their amazement, the stranger spoke to the Russian with the
same ease with which he spoke English and French.
The Russian spent the night with them, and in the morning, after
more fish, he wandered off. He came back dragging mounds of
branches with which he built a shelter for the wounded men under
one tree, and another one for the stranger. He grinned all over his
broad face, pointed to the fish, to them, to himself and to the
shelters. Then he shook hands all round.
That afternoon a Russian fighting patrol passed close by. The officer
heard their voices, crept up behind them and threw a hand grenade
among them. The stranger threw himself on top of it just as it went
off. The Englishman shot the officer through the head before the dust
and smoke had cleared, and the remainder of the patrol withdrew.

When they turned the stranger over, the ants were already swarming
in his blood. At first they tried to brush them off with twigs, but more
and more ants came. The Russian pointed to the river and gestured
that it would be kindest to throw the body in. The Frenchman shook
his head, and the Englishman started to drag the body to the hole in
the rocks. They laid the stranger inside and rolled a rock against the
entrance and sealed the gaps with clay.
They missed him a great deal. Not only because of the fish and
water.
Next day the Russian left them. Before going, he banged them on
the back and shook hands with them several times and tears left
streaks on his dirty face.

She was overjoyed to have her son back with her. She could not
stop looking at him for the sheer joy of it.
"Was it very terrible"? she asked.
"No", he smiled at her. "In a way it was wonderful".
"But the suffering and the killing", she said.
"I saw more than that", he said.
"Did you tell him all of it"? she asked.
"All of it". He picked up his knife and whittled away at the wood.
"And"? she insisted.
"He's angry, and sad. And at the same time he's pleased", he said,
and that was all he would tell her. But she felt comforted and she
knew it was going to be all right.
He shaved the last of the bark of the wood and looked at the grain
and set to work. This time it would be a child, with fat round cheeks
and the dimples of laughter in them.

THE END
*** END OF THE PROJECT GUTENBERG EBOOK AND IT WAS
GOOD ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying copyright
royalties. Special rules, set forth in the General Terms of Use part of
this license, apply to copying and distributing Project Gutenberg™
electronic works to protect the PROJECT GUTENBERG™ concept
and trademark. Project Gutenberg is a registered trademark, and
may not be used if you charge for an eBook, except by following the
terms of the trademark license, including paying royalties for use of
the Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is very
easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund from
the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law in
the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms of
this agreement by keeping this work in the same format with its
attached full Project Gutenberg™ License when you share it without
charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the terms
of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears, or
with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning of
this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1 with
active links or immediate access to the full terms of the Project
Gutenberg™ License.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or expense
to the user, provide a copy, a means of exporting a copy, or a means
of obtaining a copy upon request, of the work in its original “Plain
Vanilla ASCII” or other form. Any alternate format must include the
full Project Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt that
s/he does not agree to the terms of the full Project Gutenberg™
License. You must require such a user to return or destroy all

You might also like