cs781 - Colour for Computer Graphics - Winter 2012
Course Notes
Lecture 19 - Colour Spaces
And Now from our Sponsor
- Projects
- March 28: Bin, Ross, Yin
- April 2: Alan, Daniel, Marta
- Tables
of useful colour data
Note about Mappings
Mappings from input coordinates to amounts of ink, or toner, or coloured
wax, etc. are a required feature of every printer, and are an important
aspect of creating satisfied customers. Calibration services for any sort of
colour device have not been successful outside commercial colour
reproduction, where they are usually done in-house.
Gamut Mapping
Talk about fire engines: NTSC phosphor chromaticities
- R: 0.67, 0.33
- G: 0.21, 0.71
- B: 0.14, 0.08
Here are the heuristics used by printers
- Get the neutral colours neutral
- taking adaptation into account
- You have to look at the image and decide which objects appear
white/grey/black.
- This is often easier to say than do.
- You then need a continuous transformation that maps one neutral
axis to the other,
- minimizing the changes in appearance of non-neutral
colours.
- Get the TRC of the white axis right
- pixel histogram is useful
- ideally the TRCs of primaries are the same
- Maximize luminance contrast
- Keep most colours within the destination gamut
- Minimize shifts in hue and saturation
- with minimal stretching and compression
- Maximize the saturation
- taking the image content into account
Manipulating TRCs
What is a TRC?
- a way of mapping from input to output
- difficult to do by eye, but training will give a person almost any skill
Ways of adjusting TRCs
- film chemistry
- electro mechanical adjustment
- digital preprocessing
Adjusting a TRC
- the histogram of pixels
- examples of histograms and corresponding TRCs
Could different primaries have different TRCs?
In Summary
- Computers are far from being able to match the performance of humans
when it comes to high-quality gamut mapping.
- It's still true that one-off printing of no particular quality, is
still better done by humans than computers.
- Computers, however, provide tools that take over much of the routine
work previously done by humans.
- Digital cameras do a large amount of routine gamut mapping without
human intervention, assisted by very simple and regular colour gamuts.
This is device-to-device colour mapping, opposed to image-to-device
colour mapping.
Colour Spaces
Suppose you are on the beach.
The four categories below represent increasingly objective/mathematical
ways of describing how you have arranged the colours.
1. Based on Substances
A Short History of Pigments
Stone Age
- Clay coloured by naturally occurring iron and manganese oxides
- Charcoal
Greeks
Desire for a nice bright red. `Bright' means two things
- high in luminance compared to the objects that surround it
- high in saturation compared to the objects that surround it
If you ask observers to equalize the brightness of differently hued
colours, they do not give you equal luminance.
Vermillion
- mercury sulphide
- cinnabar
Reluctance to mix pigments
Mixing pigments that are dull in colour makes colours that are more
dull.
Renaissance
Ultramarine
- mined at one location in Afghanistan
Early Nineteenth Century Inorganic Chemistry
Green
defined by the vivid colour of chlorphyll
Three greens that co-existed into the coal tar revolution
- Emerald green
- copper aceto-arsenide
- on the yellow side of green
- very poisonous because of the arsenic (Green wallpaper became very
fashionable in the mid-nineteenth century, with predictable
results.)
- Viridian
- hydrated chromic acid
- on the blue side of green
- much less poisonous than emerald green
- Prussian blue
- iron ferro-cyanide
- as the name indicates, more of a greenish blue
- produces green by mixing with cadmium yellow
Late Nineteenth Century Organic Chemistry
Mauve
- The first colour isolated from coal tar
- Pigment dyed cloth a colour not previously available
- For a few decades everything was coloured by this pigment
At present almost all pigments are manufactured from organic raw
materials.
The colours are
- less poisonous, but
- more fugitive.
Colour spaces built on artist's colours
Colour wheels with pigment names are common in the late nineteenth
century.
2. Based on Samples
These have a variety of different purposes
- Colour specification: Munsell, OSA
- Measurement of colour differences: Munsell, OSA
- Creation of colour harmonies: Goethe, Ostwald, OSA
Munsell
OSA
Artist's Colour Spaces
3. Device Dependent
Additive Primaries
RGB
HSV, HLS, HSB, HVC, etc.
RGYB
Coordinates are r, g & L
- R = rL
- G = gL
- B = (1 - max(r,g))L
R+G+B = (1 + min(r,g))L. Do I believe this?
YIQ
Subtractive Primaries
CMY
CMYK
4. Device Independent
Based on instrumental measurement
Tristimulus Values
Chromaticity Coordinates
5. Colour Difference
The colour spaces above give us
- increasingly standardized colour identity
- correct colour topology
They do not give us a measure of colour difference!
Lot's of ways to do colour difference experiments
- two colours - report
- two pairs - greater difference
- seven colours - make them all equally distant
Question 1
- How many dimensions are needed to embed the data?
- Is the triangle inequality universally true?
Question 2.
- How should the colour arrangement be stretched or compressed?
Answers to these two questions were provided by the CIE in 1978.
- The first answer was 3, which is incorrect; the second answer was
twins, two uniform colour spaces.
- Luv
- L = 116 (Y/Yn)^(1/3) - 16
- u = 13 L (u' - un): u',un = 4 X / (X + 15 Y + 3 Z)
- v = 13 L (v' - vn): v',vn = 9 Y / (X + 15 Y + 3 Z)
- Lab
- L = 116 (Y/Yn)^(1/3) - 16
- a = 500 ( (X/Xn)^(1/3) - (Y/Yn)^(1/3) )
- b = 200 ( (Y/Yn)^(1/3) - (Z/Zn)^(1/3) )
Why are there two?
What does this mean about colour difference?
Comparing Images
Here's three ways that it is done
- Sum ( (R - R")^2 + (G-G')^2 + (B - B')^2 ) ^(1/2) over pixels
- Sum ( (X - X")^2 + (Y-Y')^2 + (Z - Z')^2 ) ^(1/2) over pixels
- Sum ( (L - L")^2 + (u-u')^2 + (v - v')^2 ) ^(1/2) over pixels
Why are neither of these satisfactory?
Suggestions for improvement.
Return to: