Theory and Practice of Colour Measurement

Similar documents
Figure 1: Energy Distributions for light

Color & Graphics. Color & Vision. The complete display system is: We'll talk about: Model Frame Buffer Screen Eye Brain

Unit 8: Color Image Processing

LECTURE 07 COLORS IN IMAGES & VIDEO

Color Image Processing. Gonzales & Woods: Chapter 6

Computer Graphics Si Lu Fall /27/2016

For a long time I limited myself to one color as a form of discipline. Pablo Picasso. Color Image Processing

Colors in Images & Video

Color Science. What light is. Measuring light. CS 4620 Lecture 15. Salient property is the spectral power distribution (SPD)

Interactive Computer Graphics

PERCEIVING COLOR. Functions of Color Vision

Understand brightness, intensity, eye characteristics, and gamma correction, halftone technology, Understand general usage of color

Observing a colour and a spectrum of light mixed by a digital projector

Test 1: Example #2. Paul Avery PHY 3400 Feb. 15, Note: * indicates the correct answer.

Introduction. The Spectral Basis for Color

Chapter 9: Color. What is Color? Wavelength is a property of an electromagnetic wave in the frequency range we call light

Colour Theory Basics. Your guide to understanding colour in our industry

CS6640 Computational Photography. 6. Color science for digital photography Steve Marschner

Color Reproduction. Chapter 6

Color vision and representation

Introduction to Color Science (Cont)

Additive Color Synthesis

To discuss. Color Science Color Models in image. Computer Graphics 2

Digital Image Processing (DIP)

Understanding Color Theory Excerpt from Fundamental Photoshop by Adele Droblas Greenberg and Seth Greenberg

Comparing Sound and Light. Light and Color. More complicated light. Seeing colors. Rods and cones

Hello, welcome to the video lecture series on Digital image processing. (Refer Slide Time: 00:30)

Colour Management Workflow

Digital Image Processing COSC 6380/4393. Lecture 20 Oct 25 th, 2018 Pranav Mantini

Digital Image Processing

What is Color Gamut? Public Information Display. How do we see color and why it matters for your PID options?

Fig Color spectrum seen by passing white light through a prism.

Colour. Cunliffe & Elliott, Chapter 8 Chapman & Chapman, Digital Multimedia, Chapter 5. Autumn 2016 University of Stirling

CS 565 Computer Vision. Nazar Khan PUCIT Lecture 4: Colour

CS 178 Digital Photography Professor Marc Levoy Stanford University Spring 2011

Digital Image Processing Color Models &Processing

Digital Image Processing

Colour. Why/How do we perceive colours? Electromagnetic Spectrum (1: visible is very small part 2: not all colours are present in the rainbow!

Color images C1 C2 C3

any kind, you have two receptive fields, one the small center region, the other the surround region.

Color , , Computational Photography Fall 2018, Lecture 7

Chapter 3 Part 2 Color image processing

COLOR and the human response to light

In order to manage and correct color photos, you need to understand a few

Colour. Electromagnetic Spectrum (1: visible is very small part 2: not all colours are present in the rainbow!) Colour Lecture!

Bettina Selig. Centre for Image Analysis. Swedish University of Agricultural Sciences Uppsala University

Color Science. CS 4620 Lecture 15

MATH 5300 Lecture 3- Summary Date: May 12, 2008 By: Violeta Constantin

05 Color. Multimedia Systems. Color and Science

The Science Seeing of process Digital Media. The Science of Digital Media Introduction

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

The Noise about Noise

Achim J. Lilienthal Mobile Robotics and Olfaction Lab, AASS, Örebro University

Images and Colour COSC342. Lecture 2 2 March 2015

Lecture Color Image Processing. by Shahid Farid

excite the cones in the same way.

6 Color Image Processing

HISTOGRAMS. These notes are a basic introduction to using histograms to guide image capture and image processing.

Slide 1. Slide 2. Slide 3. Light and Colour. Sir Isaac Newton The Founder of Colour Science

Unit 8: Light and Optics

Retina. last updated: 23 rd Jan, c Michael Langer

PhysicsAndMathsTutor.com 1

USE OF COLOR IN REMOTE SENSING

Photometric Colorimetry

Color Management User Guide

What is Color? Chapter 9: Color. Color Mixtures. Color Mixtures 10/29/2012. What is color? Color vocabulary

Colors in images. Color spaces, perception, mixing, printing, manipulating...

Digital Image Processing

Introduction to the operating principles of the HyperFine spectrometer

Geography 360 Principles of Cartography. April 24, 2006

Image and video processing (EBU723U) Colour Images. Dr. Yi-Zhe Song

Prof. Feng Liu. Winter /09/2017

Color , , Computational Photography Fall 2017, Lecture 11

Color Computer Vision Spring 2018, Lecture 15

Digital Image Processing. Lecture # 8 Color Processing

Estimation of spectral response of a consumer grade digital still camera and its application for temperature measurement

SEEING. Seeing lecture 2 The retina and colour vision. Dr John S. Reid Department of Physics University of Aberdeen

Color and perception Christian Miller CS Fall 2011

Color Measurement with the LSS-100P

Technology and digital images

LECTURE III: COLOR IN IMAGE & VIDEO DR. OUIEM BCHIR

Preventive Conservation and Energy conservation. Units of light, Perception of colour, Energy used by lighting.

Understanding Histograms

Color Image Processing

COLOR. and the human response to light

Color and Color Model. Chap. 12 Intro. to Computer Graphics, Spring 2009, Y. G. Shin

The RGB code. Part 1: Cracking the RGB code (from light to XYZ)

ABSTRACT INTRODUCTION METHOD

Gernot Hoffmann. Sky Blue

Light. intensity wavelength. Light is electromagnetic waves Laser is light that contains only a narrow spectrum of frequencies

How to correct a contrast rejection. how to understand a histogram. Ver. 1.0 jetphoto.net

CIE tri-stimulus experiment. Color Value Functions. CIE 1931 Standard. Color. Diagram. Color light intensity for visual color match

Images. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 38

INSTITUTIONEN FÖR SYSTEMTEKNIK LULEÅ TEKNISKA UNIVERSITET

The IQ3 100MP Trichromatic. The science of color

Measurement of reflection and retroreflection

Application Note (A13)

Myth #1. Blue, cyan, green, yellow, red, and magenta are seen in the rainbow.

Design III CRAFTS SUPPLEMENT

Lecture 8. Color Image Processing

Transcription:

Theory and Practice of Colour Measurement Richard Harrison, September 2014 I find it difficult to judge just how good a particular coloured star is. I can appreciate a good blue, for example, but is it as good as, better or worse than one I saw six months ago? I decided the only way to be sure would be to create a permanent, reliable record that would allow colours to be compared. Ideally, the technique should be sufficiently simple to be available to everyone, which means not involving the use of expensive equipment. Before leaping in, I think it s worth taking a brief look at some basic colour theory. The Eye The human eye contains colour receptors (cones) of three types, sensitive to light of short (S), middle (M) and long (L) wavelength ranges. As shown here, their sensitivities overlap to a significant extent and, together, they provide sensitivity to all wavelengths of light from around 400nm (blue) to around 700nm (red). The eyes of different individuals have greatly varying proportions of the three types of receptor but, despite this, experiments show that most people have closely similar colour perception. Extreme deficiency in, or absence of, one or more of the sensor types is one of the possible causes of colour blindness. In the majority of people, light at a wavelength of around 560nm triggers roughly equal responses from both the M and L sensors, and virtually none from the S sensors. It is this data, when transmitted to the brain, that gives the sensation of yellow. It should, therefore, come as no surprise that, when illuminated by a suitable mixture of red (say, at 650nm) and green (say, at L M S Perceived Colour X X X Black White X X Red X Yellow X X Green X Cyan X X Blue X Purple 525nm) light, the brain receives the same signals and interprets the colour as yellow, despite there being no yellow light entering the eye. Similar arguments explain the eye s response to other mixtures of coloured light, as illustrated in the accompanying table. The combination of red and blue light, giving the sensation of purple, is worthy of further comment. As you can see from the eye s sensitivity graphs, there is no single wavelength in the visible spectrum that will evoke responses from both L and S, without also triggering a response from M; purple is not a colour that is present in the visible light spectrum. Measuring Colours The eye s ability to see a mix of light of two or more colours as another, different colour gives us the ability to measure colours in terms of the amounts of standard colours necessary to recreate the colour in question. The obvious choice for the standard colours is red, green, and blue. Let s take three particular shades, and I ll label their intensities as R, G and B. Initially, it doesn t matter which

precise colours we choose; on a computer screen they will be the three colours selected for the light-emitting elements. In general, they won t be pure colours that you might see in a spectrum. In principle, any colour can be reconstructed by combining appropriate amounts of these three colours, as represented by the following equation: C = R + G + B You could illustrate this on a three-dimensional graph, where each point has the colour corresponding to its R, G and B coordinates. That s neat, but it s awkward to realise in practice; a two-dimensional graph would be much easier to work with. Fortunately, there s a trick we can use to do just that. Suppose we restrict the colours we are measuring to all be of equal brightness. If we set that brightness to a standard value of, say, 100, we can write: C = R + G + B = 100 The values of R, G and B are no longer independent; selecting the values of any two means that the third is fixed. For example, for the amounts of R, G and B needed to recreate the colour C: B = 100 R G We can therefore plot a graph using only two of the standard colours, the value of the third being fixed by the choice of the other two. Let s choose R and G. Some other red will be able to be recreated by combining a large proportion of R with relatively small amounts of G and B, so it will appear at the lower right in this diagram. A green will likewise be matched with lots of G and very little R or B, and will appear at the upper left. A blue will need to be matched with a large value of B and, therefore, very little R or G and will appear at the bottom left, near the origin. By the rules of mixing colours, it is clear that a yellow will appear somewhere between the reds and the greens, a cyan will be positioned between the blues and the greens, and the various shades of purple will be located between the reds and the blues. There will be a point somewhere near the middle where R, G and B combine in the appropriate proportions to appear white. Furthermore, it should now be apparent that if you start at the white point and move along any straight line, the colour will become stronger, or purer. For example, moving along the line from white to yellow in this diagram, the yellow colour will strengthen, until a point is reached (a little further out than the marked yellow) where that particular yellow colour is as pure as possible. That yellow will be one that appears in a continuous spectrum, as a spectrum contains the purest shade of any colour. Marking the points that represent all the pure spectral colours gives rise to a curve of the general form shown in the diagram below. But, surely, isn t something wrong? Part of the curve is to the left of the vertical axis, which implies that the value of R must be negative! How can you have a negative amount of a colour? The answer

lies in the sad fact that, no matter which three colours you select to be your standards for R, G and B, there will be some colours that you cannot reconstruct. However, you can always convert such a colour into one that you can reconstruct by adding to it a little of one or other of your reference colours. For example, take the colour marked X. If you add gradually increasing amounts of R, the point will move to the right, as its overall colour changes. Eventually, when it reaches the vertical axis, it will be a colour that can be matched (with a combination of just G and B). The amount of R that you had to add is the negative value of R for the original colour at X. The Chromaticity Diagram I would imagine that anyone who is interested in reading about coloured pyrotechnic flames will, at some point, have come across a chromaticity diagram. You might also be thinking that it looks vaguely similar to the R-G diagram that was discussed in the previous section. If so, you would be right; a chromaticity diagram is effectively doing the same job as an R-G diagram, but with a few added tweaks. The main difference is that the axes are adjusted to avoid the annoying negative values. This is done by applying a linear transformation that converts the R, G, B values into a new set, labelled (rather unimaginatively, in my opinion) X, Y and Z. For anyone who is interested, the transformation, for one particular specification of the R, G and B colours, is defined by 1 : The price to be paid for getting rid of the negative values is that X, Y and Z no longer represent real colours. In order to standardise the range, X, Y and Z are then converted to quantities named x, y and z according to the relationships: x = X/(X+Y+Z), y = Y/(X+Y+Z) and z = Z/(X+Y+Z). The values of x, y and z are thereby restricted to lie in the range 0.0 to 1.0. The standard form of the chromaticity diagram plots y against x with an implied value of z (as for B in the R-G diagram). As in the R-G diagram, the curved boundary represents the range of pure colours present in the visible spectrum the above diagram is annotated to show the wavelengths, in nanometers, of these colours. The straight line at the lower edge represents the non-spectral mixtures of red and blue and is known as the Line of Purples. The white point at the centre is at a position where x = y = 1/3 (= z). Since the diagram contains colours that are not representable by any combination of R, G and B, the colours in the above image can t all be accurate. Computer screens and files designed to be 1 This transformation applies to the CIE (1931) RGB colour space, which is different from the srgb standard I have available on my camera.

displayed on them are particularly poor at showing subtleties of colour in the green region. Printed images, using 4-colour (CMYK) printing, may give a better representation, but still won t be perfect. RGB Measurements by Camera It ought to be possible to use a digital camera to obtain reliable RGB data for coloured pyrotechnic flames. Direct photographs of pyrotechnic effects, with their inherent high contrast, are not really suited to the task, but indirect photography of scattered light might offer better possibilities. In order to evaluate the suitability of using a commercially available digital camera, I ran a few initial tests on a set of high-purity coloured images. Not having a spectrograph, I decided to try photographing the highly coloured reflections from a blank DVD-R disk. The disk surface acts as a reflective diffraction grating, producing highly dispersed reflected images. I suspected that, with care, I could obtain images that contained regions of high colour purity, close to what could be obtained by use of monochromatic sources. The camera I used was a Canon EOS 550D SLR. In my initial tests it was set to use the srgb colour space and a fixed white balance for direct sunlight (colour temperature 5200K). I took direct hand-held photographs of the reflections. I let the camera select the exposure, but had previously set the exposure compensation to -5 to prevent the bright reflections from being overexposed. A typical image is shown here. I then transferred the images to a PC and used the Paint program to extract the RGB values of selected pixels. As is done for a chromaticity diagram, I converted the RGB values to r [= R/(R+G+B)] and g [= G/(R+G+B)], with values in the range 0.0 to 1.0, before plotting them on a graph (the three points marked in red indicate the extreme results that are theoretically possible). The results, as shown here, indicate that the colours I measured were, in the main, well saturated and that my selections provided good coverage of the whole range of detectable colours with the possible exception of some of the strongest blues. To get some idea of how these measurements relate to the whole gamut of existing colours, I used the transformation quoted above (despite the fact that it isn t totally appropriate for the srgb standard) to map the readings to chromaticity values, with the result as shown in the diagram on the left. I then superimposed these results on a chromaticity diagram. The triangle gives some idea of the range of colours that are distinguishable by making RGB measurements. The data suggests that making such measurements should be quite successful at detecting differences in reds, yellows, purples and to a lesser extent blues. It does, however, suggest that such measurements

would be far less successful when applied to greens. In the best possible interpretation, the technique seems unlikely to be able to distinguish an excellent green from one that is merely good. Critique Just because a digital camera can distinguish a range of colours doesn t mean that the resulting photographic colours will closely match the original ones. As implied earlier, I have no real control in that respect (other than being able to choose a white balance parameter) and am reliant on the unknown nature and amount of the image processing performed by the camera s software. All that the measurements described in this document really show is that photographs of highly saturated colours do, indeed, get recorded with RGB values that are close to the border of the available range. That is a first and necessary condition for a camera to meet, but it is by no means sufficient to guarantee accurate colour measurements. Furthermore, the srgb standard is about how colours are displayed (rather than how they are detected). The range of colours is, in fact, more limited than the mapping in the earlier illustration would suggest. Given the non-spectral nature of the R, G and B colours specified in the standard, the available range is more accurately shown in the diagram on the right. The measurements that I have so far made don t give any information about the sensitivity of the camera s sensors to light of a particular wavelength, or on how colours outside the srgb triangle are mapped into it. In order gain more information, I would need to obtain images of light of known wavelength and known (relative) intensity which implies the use of a spectrometer and one or more standard light sources. Without significantly more calibration effort, the absolute colour values of the numerical results will be somewhat arbitrary and are unlikely to agree in detail from one observer (and camera) to another. The whole question of the choice of standards, and the mapping from RGB values to a chromaticity diagram, would obviously need more care and attention than I have given them so far. However, even without such refinements, the relative values comparing one colour with another ought to be reasonably meaningful and should give (qualitatively, at least) fairly reliable information about relative colour and purity. It seems clear to me that differences in pyrotechnic coloured flames are detectable at least over the range of colours that are produced by the majority of current coloured star formulae. Practical Colour Measurement In order to reduce the variations in brightness and contrast to values that a camera can cope with, I came up with the idea of a light box. The box is designed to doubly diffuse the light from a lit star, supported at position A. The light passes through a baffle to a first diffusing screen at B. The diffused light falls on a similar screen at C, which is observed, or photographed, at D. Apart from the screens, the rest of the interior is painted matt black, to reduce unwanted scattering of light.

The two-stage diffusion serves two purposes. Firstly it provides a relatively large surface (compared with that of a star) that is reasonably uniformly illuminated and therefore easy to photograph, even with an automatic camera that has no manual control over the exposure. Secondly, it reduces the level of illumination to a point where a more sophisticated camera can use reasonably long exposures, of the order of 0.5 sec, thereby integrating out some of the random fluctuations in the light from the burning star. A further advantage of this technique is that the dimensions of the light box are largely immaterial, so it can be built to suit any reasonable set of circumstances. My prototype was constructed from two large cardboard boxes, with A5 white cards as the diffusing screens. The box containing the star is open at the top, to allow smoke to escape, and is lined with aluminium foil, with a fire-resistant mat on the base. There is, of course, some risk of the box catching fire, so it needs to be used in the open air, preferably after dark to reduce stray light. Once a photograph is taken and a JPG file transferred to a computer, it is a fairly simple process to extract R, G and B values at a number of points in the image. In the absence of specific software, the Microsoft Paint application will do the job (select the Color picker tool, click on a point in the image and then select Edit colors to see the RGB values at the selected point). Initial trials showed that this device does, indeed, work broadly as expected. As you can see, a photograph of the second screen shows that it is not as uniformly illuminated as I would have hoped, but experimentation showed that the measured r, g and b colour coordinates 2 were largely independent of the brightness across the whole illuminated area. Revised Light Box The prototype was large and cumbersome and, as mentioned earlier, produced a final image of nonuniform brightness. I therefore redesigned it, in an attempt to remedy these defects. The new design is illustrated below. 2 Measured as: r = R/(R+G+B), g = G/(R+G+B) and b = B/(R+G+B), as described earlier in this document.

The diffusing screens are still A5 in size, but the containing structure is about one tenth of the volume of the earlier version. In addition, the screens are oriented differently, which significantly improves the evenness and uniformity of illumination, as seen from the observation point. The source is now positioned outside the box, which almost completely removes the fire risk. However, both screens are exposed to the surroundings, which fact means that it is now essential rather than merely preferable to make measurements in total darkness. But Does it Work? Well, here are the results taken from my first trials on two blue stars. The two stars were made from a single chemical formula, but one was made with potassium perchlorate that was contaminated with a sodium compound and the second made with recrystallized potassium perchlorate. The colours shown here were taken from the photographic images, adjusted so they both had the same value of luminosity (equal to that of the grey background). As you can see, the colour difference, although not huge, is readily noticeable. The difference is, perhaps, more clearly shown in the average rgb values calculated from the measured colours at five separate points in each image, and in the corresponding r-g diagram: r g b Contaminated 0.212 0.174 0.614 Uncontaminated 0.175 0.125 0.700 The star made with the purified perchlorate shows a significant improvement in colour purity compared with that made from the contaminated sample. The measured values are very susceptible to small amounts of stray light, so it might be sensible to add baffles to the light box, and there is still work to be done in determining the best exposure times. However, these initial results are promising.