12/4/2013
1
Newton’s Color Experiments 1671
• White light has seven constituent components: red, orange, yellow, green, blue,indigo and violet.
• Dispersed light can be recombined to form white light.
• Magenta and purple can be obtained by combining only portions of the spectrum.
Newton’s Conclusions
12/4/2013
2
Color and Color Vision
The perceived color of an object depends onfour factors:1. Spectrum of the illumination source2. Spectral Reflectance of the object3. Spectral response of the photoreceptors
(including bleaching)4. Interactions between photoreceptors
Light Sources
400 700nm
SpectralOutput
400 700nm
SpectralOutput
400 700nm
SpectralOutput
White Monochromatic Colored
12/4/2013
3
Pigments
Red Green Blue
400 700nm
SpectralReflectance
400 700nm
SpectralReflectance
400 700nm
SpectralReflectance
Subtractive ColorsPigments (e.g. paints and inks) absorb different portions of the spectrum
400 700nm
SpectralOutput
400 700nm
SpectralOutput
400 700nm
SpectralOutput
400 700nm
400 700nm
400 700nm
Multiply the spectrum of the light source by the spectral reflectivityof the object to find the distribution entering the eye.
12/4/2013
4
Blackbody Radiation
For lower temperatures,blackbodies appear red.As they heat up, theshift through the spectrumtowards blue.
Our sun looks like a6500K blackbody.
Incandescent lights are poorefficiency blackbodiesradiators.
Gas‐Discharge & Fluorescent Lamps
A low pressure gas or vapor isencased in a glass tube. Electricalconnections are made at the ends ofthe tube. Electrical discharge excitesthe atoms and they emit in a seriesof spectral lines. We can use individual lines for illumination (e.g. sodium vapor) or ultraviolet lines to stimulate phosphors.
12/4/2013
5
CIE Standard Illuminants
Illuminant A - Tungsten lamp looking like a blackbody of 2856 KIlluminant B - (discontinued) Noon sunlight.Illuminant C - (discontinued) Noon sunlight.
Illuminant D55 - (Occasionally used) 5500 K blackbodyIlluminant D65 - 6500 K blackbody, looks like average sunlight and
replaces Illuminants B and C.Illuminant D75 - (Occasionally used) 7500 K blackbody
Illuminants A and D65
0
50
100
150
200
250
300
300 500 700
Wavelength (nm)
Sp
ectr
al R
adia
nce
Illuminant A
Illuminant D65
12/4/2013
6
Additive ColorsSelf-luminous Sources (e.g. lamps and CRT phosphors) emit differentspectrums which combine to give a single apparent source.
400 700nm
SpectralOutput
400 700nm
SpectralOutput
400 700nm
SpectralOutput
Add the spectrums of the different light sources to get the spectrum of the apparent sourceentering the eye.
Color Models
• Attempt to put all visible colors in a ordered system.
• Mathematics based, art based and perceptually based systems.
12/4/2013
7
RGB Color Model
A red, green and blue primary are mixed in different proportionsto give a color
(1,0,0) is red(0,1,0) is green(0,0,1) is blue
24 bit color on computer monitors devote 8 bits (256 values) to eachprimary color (i.e. red can take on values (0…255) / 255)
(1,1,1) is white(0,0,0) is black
HSB (HSV) Color Model
Hue – color is represented by angleSaturation – amount of white representedby radial positionBrightness (Value) – intensity is representedby the vertical dimension
12/4/2013
8
HLS Color Model
Hue – color is represented by angleLightness – intensity is representedby the vertical dimensionSaturation – amount of white representedby radial position
CIE
• 90 year old commission on color
• Recognized as the standards body for illumination & color.
• Has defined standard illuminants and human response curves.
12/4/2013
9
Luminosity FunctionsThe spectral responses of the eye are called the luminosity functions. TheThe V() curve (photpic response) is for cone vision and the V’() curve (scoptopic response) is for rod vision. V() was adopted as a standard by the CIE in 1924. There are some errors for <500 nm, that remain. TheV’() curve was adopted in 1951 and assumes an observer younger than30 years old.
00.10.20.30.40.50.60.70.80.9
1
380 480 580 680 780
Wvaelength (nm)
Rel
ativ
e S
pec
tral
Sen
siti
vity
Photopic
Scotopic
V()V’()
Purkinje Shift
Note how the brightness of reds and blues change with decreasingillumination. This is due to the sensitivity of the eye shifting from photopic to scoptic
12/4/2013
10
Human Color Models
RG
B
C
Observer adjusts the Luminances of R, G and Blights until they match C
C r’(R + g’(G + b’(B
R = 700.0 nmG = 546.1 nmB = 435.8 nm
1931 CIE Color Matching Functions
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
380 430 480 530 580 630 680 730 780
Wavelength (nm)
Ch
rom
ati
city
Co
ord
ina
tes
r'()g'()
b'()
435.8 546.1 700.0
12/4/2013
11
Color Matching Functions
R
G
B
C
What does a negative value of the ColorMatching Function mean? Bring one light to the other side of the field. Observer now adjusts, for example, the Luminances of G and B lights until they match C+ R
C + r’(R g’(G + b’(B
R = 700.0 nmG = 546.1 nmB = 435.8 nm
1931 CIE Color Matching Functions
The CIE defined threetheoretical primaries x’, y’ and z’ such that the color matching functions are everywhere positive and the “green” matching function is the same as the photopic response of the eye. -0.2
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
380 430 480 530 580 630 680 730 780
Wavelength (nm)
Ch
rom
ati
city
Co
ord
ina
tes
x'()y'()
z'()
12/4/2013
12
Conversion x’y’z’ to r’g’b’
'z
'y
'x
17860.000255.000092.0
01571.025243.009117.0
08283.015860.041846.0
'b
'g
'r
The x’, y’, z’ are more convenient from a book-keeping standpointand the relative luminance is easy to determine since it is related to y’.
The consequence of this conversion is that the spectral distribution ofthe corresponding primaries now have negative values. This meansthey are a purely theoretical source and can not be made.
Tristimulus Values X, Y, Z
d)('z)(PZ
d)('y)(PY
d)('x)(PX
0
0
0
The tristimulus values are coordinatesin a three dimensional color space. Theyare obtained by projecting the spectraldistribution of the object of interest P()onto the color matching functions.
12/4/2013
13
Chromaticity Coordinates x, y, z
yx1ZYX
Zz
ZYX
Yy
ZYX
Xx
The chromaticity coordinatesare used to normalize out thebrightness of the object. This way,the color and the brightness can bespearated. The coordinate z is notindependent of x and y, so this isa two dimensional space.
Chromaticity Coordinates
Light SourceSpectralDistribution
Object SpectralReflectance orTransmittance
Spectral Distributionof Light entering theeye.
x =
Calculate TristimulusValues X, Y, Z
Project ontox’, y’, z’
CalculateChromaticityCoordinates
Normalize
Plot (x, y)
12/4/2013
14
Example ‐ Spectrally Pure Colors
Suppose P() = (-o)
)('zd)('z)(Z
)('yd)('y)(Y
)('xd)('x)(X
o
0
o
o
0
o
o
0
o
yx1z
)('z)('y)('x
)('yy
)('z)('y)('x
)('xx
ooo
o
ooo
o
Plotting x vs. y for spectrally pure colors gives the boundary of color vision
CIE Chromaticity Chart
0
0.2
0.4
0.6
0.8
1
0 0.2 0.4 0.6 0.8 1
x chromaticty coordinate
y ch
rom
atic
ity
coo
rdin
ate
12/4/2013
15
Example ‐White Light
Suppose P() =
1d)('zZ
1d)('yY
1d)('xX
0
0
0
33.0yx1z
33.0111
1y
33.0111
1x
CIE Chromaticity Chart
12/4/2013
16
Example ‐MacBeth Color Checker
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
380 430 480 530 580 630 680 730 780
Wavelength (nm)
Sp
ectr
al R
efle
ctan
ce
Blue Sky
Example ‐ Blue Sky Patch
0
20
40
60
80
100
120
140
380 480 580 680 780
Wavelength (nm)
Rel
ativ
e R
adia
nce
Illuminant C
After Reflection
The Macbeth colorchecker assumes thatIlluminant C is usedfor illumination.
Multiply the spectraldistribution of IlluminantC by the spectral reflectance of the color patch to get the light entering the eye.
12/4/2013
17
Example Blue Sky Patch
253.)9.3796.1921.188/(6.192y
247.)9.3796.1921.188/(1.188x
9.379)('z)(PZ
6.192)('y)(PY
1.188)('x)(PX
Example ‐MacBeth Color Checker
Dark Skin
00.050.1
0.150.2
0.250.3
0.350.4
0.450.5
380 430 480 530 580 630 680 730 780
Wavelength (nm)
Sp
ectr
al R
efle
ctan
ce
12/4/2013
18
Example ‐ Dark Skin Patch
Dark skin is much darker than the blue sky. The chromaticity coordinates,however, remove the luminance factor and onlylook at color.
0
20
40
60
80
100
120
140
380 480 580 680 780
Wavelength (nm)
Rel
ativ
e R
adia
nce
Illuminant C
Dark Skin
Blue Sky
Example Dark Skin
35.0)9.3796.1921.188/(6.192y
41.0)9.3796.1921.188/(1.188x
2.66)('z)(PZ
8.98)('y)(PY
6.113)('x)(PX
12/4/2013
19
CIE Chromaticity Diagram
Think of this as a distortedversion of the HSB color model.
W = White Point (0.33,0.33)D = Dominant Wavelength (hue)
W
D
AWD
WApurity excitationp C
BC = Complimentary Color
WC
WBpurity excitationp
MacAdam EllipsesJust noticeable differences for two similar colors is nonlinear onthe CIE diagram. Would like acolor space that these ellipses become circles. (ellipses are 3xlarger than actuality)
12/4/2013
20
1976 CIELUV
Television and Video
3y12x2
y9
Z3Y15X
Y9'v
3y12x2
x4
Z3Y15X
X4'u
v'v*L13*v
u'u*L13*u
008856.0Y
Yfor
Y
Y292.903*L
008856.0Y
Yfor 16
Y
Y116*L
n
n
nn
n
3/1
n
L* is related to the lightness andis nonlinear to account for thenonlinear response of the visualsystem to luminance. The u’s and v’s distort the CIE diagram to make the MacAdam ellipses more round.
Yn, un and vn are for white
1976 CIELUV
222 *v*u*LE
DifferenceColor CIELUV
*
*
uv
***uv
u
vtanh
vuC
1
22
180
Polar Coordinates
12/4/2013
21
1976 CIELAB
Plastic, Textile & Paint L* is related to the lightness andis nonlinear to account for thenonlinear response of the visualsystem to luminance. The a’s andb’s distort the CIE diagram to make the MacAdam ellipses moreround.
Xn, Yn and Zn are for white
0.008856sfor 16/1167.787sf(s)
0.008856sfor sf(s) where
Z
Zf
Y
Yf200*b
Y
Yf
X
Xf500*a
16Y
Yf116*L
3/1
nn
nn
n
1976 CIELAB
*
*
ab
***ab
a
btanh
baC
1
22
180
Polar Coordinates
222 ****ab baLE
Color Difference
12/4/2013
22
Color Difference Formulas
• DE = 1 is approximate threshold for Just Noticeable Difference.
• CIELAB used primarily today instead of CIELUV
• CIELAB DE > 5, but some variation for smaller differences.
• CIEDE2000 performs better for small color differences.
CIEDE2000
Westland – Computational Colour Science using Matlab
12/4/2013
23
Comparison of 10 Samples
CIELAB Space
12/4/2013
24
Color Difference Comparison
Human Cone Sensitivities
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
380 430 480 530 580 630 680 730 780
Wavelength (nm)
Re
lati
ve S
en
siti
vity
LS M
Only during the 1990swere researcher able todistinguish the conesensitivities
12/4/2013
25
LMS Color Space
Project P onto LMS color matchingfunctions. The (l,m) is analogous to(x,y) chromaticity coordinates.
Color Blindness
• Protanopia ‐ No L Cones
– 1% men, rare in women
• Deutranopia ‐ No M Cones
– 1% men, 0.01% women
• Tritanopia ‐ No S Cones
– rare
12/4/2013
26
Color Blindness
Color Blindness
Normal Protonopia Deuteranopia
No L Cones No M Cones
12/4/2013
27
Color Blindness Examples
ProtanopiaDeuteranopiaNormal
Color Space Conversions
709
709
709
B
G
R
950227.0119193.0019334.0
072169.0715160.0212671.0
180423.0357580.0412453.0
Z
Y
X
This is a conversion from an RGB color model to XYZ trichromaticcoordinates. The 709 refers to a standard set of phosphors used inmost displays. RGB colors are assumed to range from 0..1. However,in the computer they usually range from 0..255. Simply divide the computer value by 255 to normalize.
12/4/2013
28
Color Space Conversions ‐ Example
0
0
1
950227.0119193.0019334.0
072169.0715160.0212671.0
180423.0357580.0412453.0
Z
Y
X
X = 0.412453Y = 0.212671Z = 0.019334
x = 0.412453/(0.412453+0.212671+0.019334)x = 0.64y = 0.212671/(0.412453+0.212671+0.019334)y = 0.33
Example (1, 0, 0)
12/4/2013
29
Color Space Conversions
L+M Channels
0
0.2
0.4
0.6
0.8
1
1.2
380 480 580 680 780
Wavelength (nm)
Re
lati
ve S
en
siti
vity
0.68273L+0.35235M
Photopic Response
12/4/2013
30
Opponent Processes
Opponent Colors
12/4/2013
31
Camera White Balance
Photofocus.com
Von Kries Transform
1
1
1
12
12
12
2
2
2
00
00
00
S
M
L
SS
MM
LL
S
M
L
WW
WW
WW
Sometimes called “wrong” von Kries transform when done on XYZ instead of LMS.
12/4/2013
32
Chromatic Adaptation Transform
• Von Kries is a little too simple due to interaction between the channels.
• CATs try to match real data
1
1
1
12
12
121
2
2
2
00
00
00
Z
Y
X
M
ZZ
YY
XX
M
Z
Y
X
CAT
WW
WW
WW
CAT
Questions on Trichromatic Theory
• What does bluish‐yellow look like?
• What does greenish‐red look like?
• Why do colorblind people either lose red‐green or yellow‐blue colors in pairs?
• Red, green and blue appear to be pure colors (i.e. not a mixture of other colors). Why does yellow also appear as a pure color?
12/4/2013
33
Opponent Process
Opponent Process Test
How much yellowis needed to cancelblue tint?
How much blueis needed to cancelyellow tint?
How much greenis needed to cancelred tint?
How much redis needed to cancelgreen tint?
12/4/2013
34
Opponent Process
Opponent Process
12/4/2013
35
Opponent Process
Opponent Colors
12/4/2013
36
Receptive Fields
The lighter photoreceptors are the ones that activate in response to light while the others are the photoreceptors that activate in the absence of light. As you can see, some of the dark photoreceptors encircle the lighter ones and vice versa. In reality, however, these two types of photoreceptors look the same.
Receptive Fields
Center-ON
Center-OFF
12/4/2013
37
Hermann’s Grid
Hermann’s Grid
12/4/2013
38
Mach Bands
Mach Bands
12/4/2013
39
Mach Bands
Lightness Contrast
12/4/2013
40
Lightness Contrast
Color Contrast
12/4/2013
41
Complex Color Shifts
Rubik’s Cube??
12/4/2013
42
Rubic’s Cube
Blue Dot
12/4/2013
43
Blue Dot
Color Mach Bands
12/4/2013
44
Color Contrast Example
R=200G=200B=200
R=249G=245B=24
R=249G=106B=71
Color Contrast
Rnorm = R/255
Scale XYZ to make Yw = 100
12/4/2013
45
CIECAM02 Output
• Brightness is the subjective appearance of how bright an object appears given its surroundings and how it is illuminated.
• Lightness is the subjective appearance of how light a color appears to be.
• Colorfulness is the degree of difference between a color and grey.
• Chroma is the colorfulness relative to the brightness of another color that appears white under similar viewing conditions. This allows for the fact that a surface of a given chroma displays increasing colorfulness as the level of illumination increases.
• Saturation is the colorfulness of a color relative to its own brightness.
• Hue is the degree to which a stimulus can be described as similar to or different from stimuli that are described as red, green, blue, and yellow.
Source: Wikipedia
Lightness Contrast
Sample Color
White
BackgroundLuminance (Yb)
CIECAM02
Chroma & Hue unchanged,Brightness increased
12/4/2013
46
CIECAM02 Example
Hyperspectral Imaging
12/4/2013
47
Singular Value Decomposition (SVD)
A matrix Amxn with m rows and n columns can be decomposed into
A = USVT
where UTU = I, VTV = I (i.e. orthogonal) and S is a diagonal matrix.
If Rank(A) = p, then Umxp, Vnxp and Spxp
OK, but what does this mean is English?
SVD by Example
Keele Data on Reflectance of Natural Objectsm = 404 rows of different objectsn = 31 columns, wavelengths 400‐700 nm in 10 nm stepsRank(A) = 31 means at least 31 independent rows
A404x31=
12/4/2013
48
SVD by Example
UTU = I means dot product of two different columns of U equalszero. VTV = I means dot product of two different columns of V (rowsof VT) equals zero.
A404x31 U404x31 S31x31 VT31x31=
Basis Functions
V31x31=
Columns of V are basis functions that can be used to representthe original Reflectance curves.
12/4/2013
49
Basis Functions
First column handles most of the variance, then the second columnetc.
Singular Values
S31x31=
The square of diagonal elements of S describe the varianceaccounted for by each of the basis functions.
12/4/2013
50
SVD Approximation
The original matrix can be approximated by taking the first dcolumns of U, reducing S to a d x d matrix and using the first drows of VT.
A404x31 U404xd Sdxd VTdx31~
SVD ReconstructionThree Basis Functions
Five Basis Functions