Computing Colour Image Processing Alan Parkin All Chapters Instant Download
Computing Colour Image Processing Alan Parkin All Chapters Instant Download
com
https://textbookfull.com/product/computing-colour-
image-processing-alan-parkin/
https://textbookfull.com/product/advances-in-soft-computing-and-
machine-learning-in-image-processing-1st-edition-aboul-ella-hassanien/
textbookfull.com
https://textbookfull.com/product/image-operators-image-processing-in-
python-first-edition-kinser/
textbookfull.com
https://textbookfull.com/product/mathematical-image-processing-
kristian-bredies/
textbookfull.com
https://textbookfull.com/product/the-wealth-of-england-the-medieval-
wool-trade-and-its-political-importance-1100-1600-susan-rose/
textbookfull.com
Ethics in Marketing International Cases and Perspectives
Patrick E. Murphy
https://textbookfull.com/product/ethics-in-marketing-international-
cases-and-perspectives-patrick-e-murphy/
textbookfull.com
https://textbookfull.com/product/the-epilepsy-prescriber-s-guide-to-
antiepileptic-drugs-3rd-edition-philip-n-patsalos/
textbookfull.com
https://textbookfull.com/product/book-of-anonymity-1st-edition-anon-
collective/
textbookfull.com
https://textbookfull.com/product/green-photocatalysts-mu-naushad/
textbookfull.com
Learning Theories: An Educational Perspective 8th Edition
Schunk
https://textbookfull.com/product/learning-theories-an-educational-
perspective-8th-edition-schunk/
textbookfull.com
Alan Parkin
Computing
Colour Image
Processing
Digital Colour Primer
Computing Colour Image Processing
Alan Parkin
123
Alan Parkin
London
UK
This Springer imprint is published by the registered company Springer International Publishing AG
part of Springer Nature
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
For Lily 1926–2008
Preface
This book is based on observations and opinions formed over many years of
professional practice in graphic design, commercial data processing and amateur
painting.
The first observation is that colour in digital imaging is a distinct field which
shares some of the knowledge and traditions of the vast spread of other colour
activities, and diverges from them in other ways.
The second observation is that sRGB colour standards, implemented in generally
available equipment, are a suitable environment for further study.
The third observation is that the complete numerical representation of colour in
any digital image brings radically new opportunities for processing colour by
program.
The fourth observation is that some of the formal properties of colour schemes
can be analysed and measured computationally, in ways not possible hitherto.
The fifth observation is that any digital image can be computationally brought to
a norm of neutral balance: an idea with good traditional antecedents.
The first opinion is that the general principles of economy of materials for
purposes, and fitness of means to ends, found in most traditional arts and crafts,
should be applied in digital imaging.
The second opinion is that digital images are often created and used at levels of
resolution of location and colour which are unnecessary and inconvenient. The
specific character and charm of digital images lie at the threshold where pixel
structure and colour gradation steps are just about visible at the intended viewing
distance.
The third opinion is that commonly available commercial software for colour
manipulation is inappropriately based on photographic conventions. Scripting in
Python offers a better way to explore and develop digital colour.
The fourth opinion is that digital imaging is an interesting field for the exercise
of curiosity, skill, luck, discrimination and taste, over and above its undoubted
usefulness in business, technology and science. It can move towards art and
connoisseurship.
vii
viii Preface
The fifth opinion is that preparing a digital image, simple or complex, is like
preparing food. It begins with growing and harvesting the ingredients (by GUI or
program), or hunting and killing (by camera or scanner or download). It proceeds
by peeling, skinning, chopping up and cooking the ingredients (by the transfor-
mations); and finally serving up the finished dish (as a display or printout).
This book is a second attempt to put these observations and opinions into
practice. The first attempt (Digital Imaging Primer, Parkin A., Springer, 2016) used
BASIC programming to explain and illustrate. This book uses Python scripting to
explain and illustrate some 20 elementary tools. For serious use, these scripts can be
freely improved and expanded, and can be wrapped into full GUI Tkinter
applications.
Let us honour the universities, institutions, commercial enterprises and inde-
pendent enthusiasts, many indicated in the chapter references, who have made
digital imaging available to all. Special thanks are due to Dr. Claus Ascheron and
his team at Springer for bringing this book into being, and for their personal
kindness throughout.
And may you, gentle reader, enjoy a happy lifetime among the coloured pixels.
1 Colour Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 The Many Meanings of Colour . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Everyday Seeing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 The Science of Seeing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Measuring Colour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Manufacturing Colour Materials . . . . . . . . . . . . . . . . . . . . . . . 7
1.6 Ornamenting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.7 Picturing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.8 Photographing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.9 Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.10 Digital Imaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2 Digital Imaging Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.1 Digital Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 sRGB Colour Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3 Numerical Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.4 Scan Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.5 Computer Processing of Images . . . . . . . . . . . . . . . . . . . . . . . . 19
2.6 Location Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.7 Colour Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3 Creating a Digital Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.1 Creating by Image Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2 Creating by Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.3 Creating by Camera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.4 Creating by Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
ix
x Contents
8 Printing an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
8.1 Subtractive Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
8.2 Location Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
8.3 Colour Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
8.4 Viewing Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
9 Analysing Image Colour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
9.1 Image Colour Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
9.2 Constructing a Colour Scheme Table . . . . . . . . . . . . . . . . . . . . 103
9.3 Constructing a Colour Scheme Bar Graph . . . . . . . . . . . . . . . . 105
9.4 Conditioning the Colour Scheme . . . . . . . . . . . . . . . . . . . . . . . 106
9.5 Scripts for a Colour Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . 106
9.6 Colour Scheme Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
10 Balancing Image Colour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
10.1 Neutral Colour Balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
10.2 Balancing by Changing Colours . . . . . . . . . . . . . . . . . . . . . . . 119
10.3 Script for Balancing by Changing Image Colours . . . . . . . . . . . 121
10.4 Examples of Balancing by Changing Colours . . . . . . . . . . . . . . 124
10.5 Balancing by Adjoining a Frame . . . . . . . . . . . . . . . . . . . . . . . 129
10.6 Examples of Balancing by Adjoining a Frame . . . . . . . . . . . . . 133
10.7 Why Balance? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Chapter 1
Colour Environments
Colour has a vast spread of competing meanings and treatments. A preliminary task
is to articulate this spread, in order to identify the corner which we wish to investigate
further. One way to do this is by distinguishing typical environments in which colour
occurs.
Figure 1.1 shows the environment of everyday seeing. In this and the following
flowcharts:
A rectangular box shows a process.
An arrow shows a flow of something from one process to another.
A black/white inversion shows the boundary of an entity.
A sloped box shows an input or output process at an entity boundary.
A dished box shows storage of some kind.
Phenomenologically, as each of us moves about and looks around, we have a
continuously changing perception of the nearby external world. We know the differ-
ence between movement of objects out there and movement of ourselves. We can
articulate the continuous perception by turning our attention to various aspects of the
scene: what objects are there, how many, what shapes and colours they have and so
on. We can remember perceptions from the immediate past, and from further back.
Sometimes, we talk or write about what we see.
Philosophically, perception has been a contentious topic for centuries [1]. In recent
times, the treatment has often centred on language, language games and private
languages [2, 3].
Fig. 1.1 The everyday seeing environment. In the world, a changing scene is available to those
that have eyes to see. Each waking self takes in a continuously changing stream of sights from its
continuously changing cone of view. This stream is processed in ways which are little understood,
to emerge in consciousness as perceptions of a stable outer world. Some aspects of these perceptions
pass through short-term memory, and some sink into long-term memory. Linguistic communication
with others is important in this environment
Fig. 1.2 The eleven colour names in common use in English: white, black, red, yellow, green, blue,
brown, purple, pink, orange and grey
Linguistically, the variety of basic colour terms in different natural languages has
attracted much interest. It is known that in English and many other languages about
eleven colour names are in common use [4, 5], together with a few modifiers such
as ‘light’, ‘dark’, ‘very’ and ‘-ish’. Figure 1.2 shows the English eleven colours.
In the everyday seeing environment, we may say that colour means the competent
use of common colour terms in describing perceptions to oneself and to others.
1.3 The Science of Seeing 3
Fig. 1.3 The scientific seeing environment. In the world, light from various sources falling on
various objects constitutes a scene. Eyes receive light directly, or reflected or transmitted by objects,
form optical images on the retinas and transduce the momentary images to binary nerve impulses.
The brain somehow groups the nerve impulses to eventuate as stable perceptions of the scene, which
can be selectively stored in memory
Fig. 1.4 Physics of light. a Spectral power distributions of three light sources. b Spectral power
distributions of four reflecting surfaces
4 1 Colour Environments
in understanding the further brain processes in seeing. But the causal chain is so far
unable to cover the leap from nerve impulses to experiences of perception, attention
and memory [9].
Figure 1.4 shows typical physical plots of colours as spectral power distributions
for some light sources and some reflecting objects.
In the scientific environment, colour means the spectral power distribution of light
in the external world.
Fig. 1.6 CIE colourimetry. a The CIE 1931 xyY chromaticity chart. b Colour temperature of
various light sources
in Fig. 1.7a. The more recent Natural Colour System (NCS) atlas [16] has 1950
colours, based on the purported Hering opponent pairs of black/white, red/green
and blue/yellow. It is also presented in various forms, such as the swatch shown in
Fig. 1.7b. Colour specifications in CIE, Munsell and NCS are interconvertible.
In this environment, colour means the physical tri-stimulus values, or the atlas
standard codes, which match the sample.
Fig. 1.8 The manufacturing environment. Raw materials are processed to colour materials, which
are made available to other manufacturers and end users
Fig. 1.9 Typical manufacturer’s swatch of paint colours available for interior decoration
1.5 Manufacturing Colour Materials 7
Fig. 1.10 The ornamenting environment. A self uses hands materials and tools to apply colours to
objects
1.6 Ornamenting
1.7 Picturing
Fig. 1.12 The picturing environment. A self views a scene and makes a representation of it, live
or from memory, using available paints and tools. The resulting picture can be seen by oneself and
by others
1.7 Picturing 9
Fig. 1.13 Oil painting Brighton pierrots by Walter Sickert,1915. Original 25 × 30 inches
1.8 Photographing
Fig. 1.14 The photographing environment. A self chooses a scene and uses a photographic process
to make a representation of it. The self controls the process at various stages, making choices from
available materials and tools. The resulting photograph can be seen by oneself and by others
1.9 Printing
Fig. 1.16 The printing environment. Technicians use devices to photograph an original object,
make plates and mass-print reproductions for publication
12 1 Colour Environments
with more or less of the white of the paper. In early printing, halftoning was done
in the original by hand stippling or cross-hatching; subsequently, it was done by
photographing a tonal original through a halftone screen; and today by digital means
[33].
Optically, printed inks are transparent films, acting as filters on the incident light,
unlike opaque paint coats. Thus, a red ink absorbs the red long wavelengths and
transmits the green middle wavelengths and the blue short wavelengths. A reasonably
good gamut can be got using inks which are the inverses of red green and blue, that
is to say, cyan, magenta and yellow (CMY). Ideally, the overlaying of all three inks
should show as black; but unfortunately available inks do not do this. So a black ink
(K) is added.
Practically, reproducing a colour original is done by preparing a halftone plate
for each of the four CMYK inks, imposed in register on the paper by the press.
Figure 1.17 shows the SDPs of a set of CMYK inks and their overprints.
Figure 1.18 shows the main components of the digital imaging environment.
In digital imaging, a person uses a computer and various peripheral devices to
create, store, analyse, transform, display, print and communicate an image as an
array of coloured picture elements (pixels). The processes are open to user control
throughout [34].
Common methods of creating a digital image are by hand, using a graphic user
interface (GUI); by program, using a suitable programming language; by optical
projection from a scene, using a digital camera; by contact capture from a given
flat image, using a scanner; by capture from a remote source, using a downloaded
file; or by calculating a projection from a numerically specified three-dimensional
model. All these methods produce a machine-readable numerical representation of
an image.
Storing is done in various file structures, using standard read/write routines.
1.10 Digital Imaging 13
Fig. 1.18 The digital imaging environment. A self chooses a scene and uses a digital process to
make a representation of it. The self controls the process at various stages, making choices from
available materials and tools. The resulting image can be seen by oneself and by others, possibly
widely disseminated
References
sRGB is a standard [1] defining a colour space and viewing conditions for digital
images [2]. It is available in virtually all current personal computers, digital cameras,
scanners, displays and printers.
In brief, sRGB has:
Three variables: red, green and blue.
In each variable, a range of integer intensities R, G, B, where 0 ≤ R ≤ 255, 0
≤ G ≤ 255, 0 ≤ B ≤ 255.
In the whole space, 2563 = 16.7 million colours, where a colour is an additive
mixture of three intensities: (R, G, B).
A subset of 256 neutrals, colours where R = G = B.
The sRGB variables are defined as three primary light sources (the same as for
HDTV [4]), which have the CIExyY chromaticity coordinates [3]:
R: x = 0.64, y = 0.33.
G: x = 0.30, y = 0.60.
B: x = 0.15, y = 0.06.
White point: x = 0.3127, y = 0.3290.
Figure 2.2a shows the three primary colours, which combine additively as white, and
(b) shows the sRGB gamut within the full CIE gamut. Thus, sRGB colour space is
© Springer International Publishing AG, part of Springer Nature 2018 15
A. Parkin, Computing Colour Image Processing,
https://doi.org/10.1007/978-3-319-74076-8_2
Random documents with unrelated
content Scribd suggests to you:
TRICHOGLOSSUS
SWAINSONII: Jard: and
Selb:
J. Gould
and H.C.
Richter delt.
C.
Hullmandel
Imp.
TRICHOGLOSSUS SWAINSONII, Jard. and
Selb.
Swainson’s Lorikeet.
J. Gould
and H.C.
Richter delt.
C.
Hullmandel
Imp.
TRICHOGLOSSUS RUBRITORQUIS, Vig. and
Horsf.
Red-collared Lorikeet.
J. Gould
and H.C.
Richter del
et lith.
C.
Hullmandel
Imp.
TRICHOGLOSSUS CHLOROLEPIDOTUS, Jard.
and Selb.
Scaly-breasted Lorikeet.
J. Gould
and H.C.
Richter delt.
C.
Hullmandel
Imp.
TRICHOGLOSSUS VERSICOLOR, Vig.
Varied Lorikeet.
J. Gould
and H.C.
Richter del
et lith.
C.
Hullmandel
Imp.
TRICHOGLOSSUS CONCINNUS, Vig. and Horsf.
Musky Parrakeet.
J. & E.
Gould del.
C.
Hullmandel
Imp.
TRICHOGLOSSUS PORPHYROCEPHALUS, Diet.
Porphyry-crowned Lorikeet.
J. Gould
and H.C.
Richter del
et lith.
C.
Hullmandel
Imp.
TRICHOGLOSSUS PUSILLUS, Vig. and Horsf.
Little Parrakeet.
J. Gould
and H.C.
Richter delt.
C.
Hullmandel
Imp.
PTILINOPUS SWAINSONII, Gould.
Swainson’s Fruit Pigeon.
J. Gould
and H.C.
Richter del.
C.
Hullmandel
Imp.
PTILINOPUS EWINGII, Gould.
Ewing’s Fruit Pigeon.