RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear...

163
RGB • Models human visual system? • Gives an absolute color description? • Models color similarity? • Linear model? • Convenient for color displays?
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    218
  • download

    0

Transcript of RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear...

Page 1: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

RGB

• Models human visual system?

• Gives an absolute color description?

• Models color similarity?

• Linear model?

• Convenient for color displays?

Page 2: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

RGB

• Models human visual system

• Gives an absolute color description

• Models color similarity

• Linear model

• Convenient for color displays

Page 3: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Spectra

• Light reaching the retina is characterized by spectral distribution, i.e. (relative) amount of power at each wavelength.

• Each kind of cone (S,M,L) responds differently.

Page 4: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

350 400 450 500 550 600 650 700 7500

50

100

150

200

250

Spectral Distribution of daylight at various color temperatures

T=25000R

ela

tive

Po

we

r

T=6504(CIE D65)

T=5003(CIE D50)

T=4000

Page 5: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Sources of colored light used in modern fireworks.

• Yellow Sodium D-line 589 nm

• Orange CaCl 591- 599 nm603-608 nm

• Red SrCl 617-623 nm 627-635 nm

640-646 nm

• Green BaCl 511-515 nm524-528 nm530-533 nm

• Blue CuCl 403-456 nm,

Page 6: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

CorneaLens

Pupil

Iris

Retina

Fovea

Optic nerve

Page 7: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Ganglion

Bipolar

Amacrine

Rod Cone

Epithelium

Optic nerve

Retinal cross section

Light

Horizontal

Page 8: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Photoreceptors

• Cones - – respond in high (photopic) light– differing wavelength responses (3 types)– single cones feed retinal ganglion cells so give

high spatial resolution but low sensitivity– highest sampling rate at fovea

Page 9: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Photoreceptors

• Rods– respond in low (scotopic) light– none in fovea– one type of spectral response– several hundred feed each ganglion cell so give

high sensitivity but low spatial resolution

Page 10: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Optic nerve

• 130 million photoreceptors feed 1 million ganglion cells whose output is the optic nerve.

• Optic nerve feeds the Lateral Geniculate Nucleus approximately 1-1

• LGN feeds area V1 of visual cortex in complex ways.

Page 11: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Rods and cones

• Rods saturate at 100 cd/m2 so only cones work at high (photopic) light levels

• All have same spectral sensitivity

• Low light condition is called scotopic

• Three cone types differ in spectral sensitivity and somewhat in spatial distribution.

Page 12: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Cones

• L (long wave), M (medium), S (short)– describes sensitivity curves.

• “Red”, “Green”, “Blue” is a misnomer. See spectral sensitivity.

Page 13: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

350 400 450 500 550 600 650 7000

0.2

0.4

0.6

0.8

1

wavelength (nm)

Con

e re

spon

se

Cone Spectral Responses

Page 14: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 15: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Trichromacy

• Helmholtz thought three separate images went forward, R, G, B.

• Wrong because retinal processing combines them in opponent channels.

• Hering proposed opponent models, close to right.

Page 16: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Opponent Models

• Three channels leave the retina:– Red-Green (L-M+S = L-(M-S))– Yellow-Blue(L+M-S)– Achromatic (L+M+S)

• Note that chromatic channels can have negative response (inhibition). This is difficult to model with light.

Page 17: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Adaptation

• Luminance adaptation allows greater sensitivity but over narrow ranges

• Chromatic adaptation supports color constancy by compensating for changes in illuminating spectra.

Page 18: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 19: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

100

10

1.0

0.1

0.001

-1 0 1 2

Log Spatial Frequency (cpd)

Con

tras

t Sen

siti

vity

Luminance

Red-Green

Blue-Yellow

Page 20: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Weber Fraction

• I/I = c, I = perceived change

• log I = log I + log c perceived change vs I

• log I = log I + yields

• I = c I power law

• Many perceptual responses follow power laws with <1, i.e. compressive non-linearity

Page 21: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Other non-linearities

0 20 40 60 80 100 120 1400

10

20

30

40

50

60

70

80

90

100

Stimulus P

Re

spo

nse

R N=1

N=2

N=3

Naka-Rushton Function

R(P)= M PN / sN + PN)

s=50 M=100

Page 22: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color matching

• Grassman laws of linearity:()(((

• Hence for any stimulus s() and response

r(), total response is integral of s() r(), taken over all or approximately s()r()

Page 23: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Primarylights

Test light

Bipartitewhitescreen

Surround field

Test light Primary lights

Subject

Surround light

Page 24: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color matching

• M() = R*R() + G*G() + B*B()

• Metamers possible

• good: RGB functions are like cone response

• bad: Can’t match all visible lights with any triple of monochromatic lights. Need to add some of primaries to the matched light

Page 25: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Primarylights

Test light

Bipartitewhitescreen

Surround field

Test light Primary lights

Subject

Surround light

Page 26: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

350 400 450 500 550 600 650 700 750-0.5

0

0.5

1

1.5

2

2.5

3

3.5Stiles and Burch 1959 10-degree bipartite field color matching functions

primary lights at 645.2 nm 525.3 nmand 444.4 nm

b10() g10()

r10()

Page 27: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color matching

• Solution: XYZ basis functions

Page 28: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

350 400 450 500 550 600 650 700 7500

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

z

y x

CIE 1931 standard colorimetric observer color matching functions

Tris

timul

us v

alue

wavelength (nm)

Page 29: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color matching

• Note Y is V()

• None of these are lights

• Euclidean distance in RGB and in XYZ is not perceptually useful.

• Nothing about color appearance

Page 30: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

CIE L*a*b*

• Normalized to white-point

• L* is (relative) ligntness

• a* is (relative) redness-greeness

• b* is (relative) yellowness-blueness

• C* = length on a*-b* space is chroma, i.e. degree of colorfulness

• h = tan-1(b*/a*) is hue

Page 31: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

CIE L*a*b*, L*u*v*

• Euclidean distance corresponds to judgements of color difference, especially lightness

• Somewhat realistic nonlinearities modeled

Page 32: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

• Lightness.m

• colorPatch.m - matlab image repn.

• umbColormatching.m

Page 33: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color Appearance

Absolute

Brighness

Colorfulness

Relative

Lightness

Chromarel to white point“colorfulness/brightness(white)”

Saturationrel to own brightness“colorfulness/brightness”

Page 34: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Photoshop Calibration

• File->Color->RGB

• RGB space:– Gamma– White point– Primaries

• Reset to sRGB!!!

Page 35: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Photoshop color picker

• Examine planes of fixed– hue– saturation– lightness– L*– a*– b*

Page 36: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

b*

darkdark

red

yellow

blue

green

light

a*

CIE Lab space

Page 37: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 38: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 39: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 40: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 41: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 42: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 43: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 44: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 45: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

xyz2displayrgb

• SPD of color [r,g,b] :

Page 46: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

xyz2displayrgb

• SPD of color [r,g,b] :

phosphor

Page 47: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

xyz2displayrgb

• SPD of color [r,g,b] :

phosphor*[r,g,b]’

Page 48: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

xyz2displayrgb

• SPD of color [r,g,b] :

phosphor*[r,g,b]’

• XYZ tristimulus values

Page 49: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

xyz2displayrgb

• SPD of color [r,g,b] :

phosphor*[r,g,b]’

• XYZ tristimulus values xyz’=xyzbar’*phosphor*[r,g,b]’

Page 50: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

xyz2displayrgb

• SPD of color [r,g,b] :

phosphor*[r,g,b]’

• XYZ tristimulus values xyz’=xyzbar’*phosphor*[r,g,b]’

• [r,g,b]’=

Page 51: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

xyz2displayrgb

• SPD of color [r,g,b] :

phosphor*[r,g,b]’

• XYZ tristimulus values xyz’=xyzbar’*phosphor*[r,g,b]’

• [r,g,b]’= inv(xyzbar’*phosphor)*xyz’

Page 52: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

xyz2displayrgb

• SPD of color [r,g,b] :

phosphor*[r,g,b]’

• XYZ tristimulus values xyz’=xyzbar’*phosphor*[r,g,b]’

• [r,g,b]’= inv(xyzbar’*phosphor)*xyz’

mon2XYZ

Page 53: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

xyz2displayrgb

• SPD of color [r,g,b] :

phosphor*[r,g,b]’

• XYZ tristimulus values xyz’=xyzbar’*phosphor*[r,g,b]’

• [r,g,b]’= inv(xyzbar’*phosphor) *xyz’

xyz2displayrgb

Page 54: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Viewing Conditions

• Illuminant matters. Table 7-1 shows E* using two different illuminants.

• E* <= 2.5 is typically deemed a match.

• On the midterm: using chromaticities for Munsell principal hues, calculate E* for the hues with Wandell monitor whitepoint and D65

Page 55: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Viewing Modes

• Viewing mode = to what we attribute color

• Illuminant: illuminating light is colored

• Illumination: prevailing changes to the illuminant, e.g. shading from obstruction

• Surface: color belongs to the surface

• Volume: color belongs to the volume

• Aperture: pure color absent an object

Page 56: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Adaptation

• Light adaptation - quick

• Dark adaptation - slow

Page 57: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Chromatic Adaptation

• At all levels: cone, other retinal layers, LGN, cortex; including opponent mechanisms (e.g. green flash)

• Subserves discounting the illuminant when illuminant is spatially uniform

Page 58: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Adaptation mechanisms

• Neural gain control: reduced sensitivity at high input, increased at low input.– For cones this is photochemical dyanmics,

further up it is neurochemistry dynamics

• Temporal mechanisms -evidence for cortical adaptation mechanisms. (e.g. waterfall illusion).

Page 59: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Chromatic adaptation models

• vonKries: chromatic adaptation is– cone mediated– independent mechanisms in L,M,S– linear

• All are slightly wrong, but a good place to start.

Page 60: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Chromatic adaptation models

• three independent gain controls:

La = kLL

Ma=kMM

Sa=kSS

• L = L-cone response, La = adapted response of L cones, etc

Page 61: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Chromatic adaptation models

• Choice of gain control parameters depends on model. Often simply defined to guarantee adapted response is 1 at max of unadapted response or at scene-white

kL= 1/Lmax or kL= 1/Lwhite

so L max a = kL Lmax = 1, etc.

Page 62: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Chromatic adaptation models

• If have two viewing conditions and M is transform for CIE XYZ to cone responses then can convert from adaptation in one condition to adaptation in the other by

Page 63: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Chromatic adaptation models

Conversion from one adaptation to another

X1 Lmax2 0 0 1/Lmax1 0 0 X1

X2 = M-1 0 Mmax2 0 0 1/ Mmax1 0 M X2

X3 0 0 Smax2 0 0 1/ Smax1 X3

See Figure 9.2 for prediction of such a model

Page 64: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Non-linear chromatic adaptation models

• Nayatani: adds noise and power law in brightness.

• La = aL((L+Ln)/(L0+Ln))L etc.

• La : adapted L cone response

• Ln : noise signal; L0 : response to adapting field

• aL : fit from a color constancy hypothesis

Page 65: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Nayatani Color Appearance Model

• Model components– Nonlinear chromatic adaptation– One achromatic, two chromatic color opponent

channels weighted by cone population ratios

Page 66: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Nayatani Color Appearance Model

• Model outputs– Brightness as linear function of adapted cone

responses (which are non-linear!)– Lighness: achromatic channel origin translated

to black=0, white = 100– Brightness of “ideal white” (=perfect reflector)– Hue angle (from the chromatic channels)

Page 67: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Nayatani Color Appearance Model

• Model outputs– Hue quadrature: interpolation between 4 hues defined

by chromatic channels red (20.14), yellow (90 .00), green (164.25), blue (231.00)

– Saturation: depends on hue and luminance (predicts changes of chromaticity with luminance)

– Chroma = saturation*lightness

– Colorfullness: Chroma*brightness of ideal white.

Page 68: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Nayatani Color Appearance Model Advantages

• Invertible for many outputs, i.e. measure output quantities, predict inputs

• Accounts for changes in color appearance with chromatic adaptation and luminance

Page 69: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Nayatani Color Appearance Model Weaknesses

• Doesn’t predict:– Effects of changes in background color or

relative luminance– incomplete chromatic adaptation– cognitive discounting the illuminant– appearance of complex patches or background– mesopic color vision

Page 70: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color Appearance

Absolute

Brighness

Colorfulness

Relative

Lightness

Chromarel to white point“colorfulness/brightness(white)”

Saturationrel to own brightness“colorfulness/brightness”

Page 71: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Hunt Color Appearance Model

• Inputs– chromaticity of adapting field– chromaticity of illuminant– chromaticity and reflectivity of

• background

• proximal field (up to 2° from stimulus)

• reference white

Page 72: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Hunt Color Appearance Model

• Inputs– absolute luminance of

• reference white

• adapting field

– scotopic luminance data– parameters for chromatic and brightness

induction

Page 73: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Hunt Color Appearance Model

• Properties– Non-linear responses– Models incomplete chromatic adaptation– Chromatic adaptation constants depend on

luminance– Models saturation– Models brightness, lightness, chroma and

colorfulness

Page 74: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Hunt Color Appearance Model

• Good:– Predicts many color appearance phenomena– Useful for unrelated or related colors– Large range of luminance levels of stimuli and

background

• Bad:– Complex, computationally expensive– Not analytically invertible

Page 75: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Testing Color Appearance Models

• Qualitative tests

• Corresponding colors data (colors which appear the same when viewed under different conditions)

• Magnitude estimation tests

• Psychophysics

Page 76: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 77: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Testing Color Appearance Models- Qualitative Tests

• Predictions of color appearance phenomena, e.g. illuminant effects– Comparisons with color order systems

• e.g. Helson-Judd effect: perceived hue of neutral Munsell colors is not neutral under strong chromatic illumination but depends on hue of illuminant and relative brightness of test to background. Hunt model successfully predicts, von Kriess model does not.

Page 78: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Testing Color Appearance Models- Qualitative Tests

• Magnitude Estimation of appearance attributes

• Comparisons with color order systems– e.g. Helson-Judd effect: perceived hue of

neutral Munsell colors is not neutral under strong chromatic illumination but depends on hue of illuminant and relative brightness of test to background.

Page 79: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Testing Color Appearance Models- Qualitative Tests

• Adjust parameters to predict constancies in standard color order systems (e.g. constant L*a*b* chroma of Munsell colors), then test model for related properites (e.g. hue shift under luminance change).

• Predict complex related colors phenomena, e.g. local vs. global color filtering.

Page 80: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Testing Color Appearance Models- Corresponding Colors

• Corresponding colors: two different colors, C1, C2 which appear the same for two different viewing conditions V1, V2

• Test model by transforming C1 to V2.

• Importance: correcting images made under assumption of V1 but actually produce under V2, e.g. photos under D65 vs F vs A

Page 81: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Testing Color Appearance Models- Magnitude Estimation

• Observers assign numerical values to color appearance attributes

• Examples of results:– Background and white point have most influence

of colorfulness, lightness, hue– Magnitude estimation of lightness predicted best

by Hunt, next by CIELAB, then Nayatani– Estimation of colorfulness badly predicted by all

models

Page 82: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Testing Color Appearance Models- Magnitude Estimation

• Observers assign numerical values to color appearance attributes

• Examples of results:– Estimation of hue predicted best for Hunt

model, which was revised as suggested by experiments.

– etc. See Chapter 15, Fairchild

Page 83: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Testing Color Appearance Models- Pyschophysics

• Techniques starting with paired quality judgements can lead to a precise interval scale. (This is the way eyeglasses are prescribed.)

• Good for predicting media changes.

• (Review Fairchild 15.7)

Page 84: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

MacAdam Ellipses

• JND of chromaticity

• Bipartite equiluminant color matching to a given stimulus.

• Depends on chromaticity both in magnitude and direction.

Page 85: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 86: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

MacAdam Ellipses

• For each observer, high correlation to variance of repeated color matches in direction, shape and size– 2-d normal distributions are ellipses– neural noise?

• See Wysecki and Styles, Fig 1(5.4.1) p. 307

Page 87: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 88: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

MacAdam Ellipses

• JND of chromaticity – Weak inter-observer correlation in size, shape,

orientation. • No explanation in Wysecki and Stiles 1982

• More modern models that can normalize to observer?

Page 89: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

MacAdam Ellipses

• JND of chromaticity – Extension to varying luminence: ellipsoids in

XYZ space which project appropriately for fixed luminence

Page 90: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

MacAdam Ellipses

• JND of chromaticity – Technology applications:

• Bit stealing: points inside chromatic JND ellipsoid are not distinguishable chromatically but may be above luminance JND. Using those points in RGB space can thus increase the luminance resolution. In turn, this has appearance of increased spatial resolution (“anti-aliasing”)

• Microsoft ClearType. See http://www.grc.com/freeandclear.htm and http://www.ductus.com/cleartype/cleartype.html

Page 91: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Complementary Colors

• Colors which sum to white point are called complementary colors

• a*c1+b*c2 = wp

• Some monochromatic colors have complements, others don’t. See ComplementaryColors.m

• Complements may be out of gamut. See Photoshop.

Page 92: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 93: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Printer/monitor incompatibilities

• Gamut– Colors in one that are not in the other– Different whitepoint– Complements of one not in the other

• Luminance ranges have different quantization (especially gray)

Page 94: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Photography, Painting

• Photo printing is via filters.

• Really multiplicative (e.g. .2 x .2 = .04) but convention is to take logarithm and regard as subtractive.

• Oil paint mixing is additive, water color is subtractive.

Page 95: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Printing

• Inks are subtractive– Cyan (white - red)– Magenta (white - green)– Yellow (white - blue)

• In practice inks are opaque, so can’t do mixing like oil paints.

• May use black ink on economic and physical grounds

Page 96: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Halftoning

• The problem with ink: it’s opaque

• Screening: luminance range is accomplished by printing with dots of varying size. Collections of big dots appear dark, small dots appear light.

• % of area covered gives darkness.

Page 97: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 99: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color halftoning

• Needs screens at different angles to avoid moire

• Needs differential color weighting due to nonlinear visual color response and spatial frequency dependencies.

Page 100: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 101: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 102: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?
Page 103: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Device Independence

• Calibration to standard space– typically CIE XYZ

• Coordinate transforms through standard space

• Gamut mapping

Page 104: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Device independence

• Stone et. al. “Color Gamut Mapping and the Printing of Digital Color Images”, ACM Transactions on Graphics, 7(4) October 1998, pp. 249-292.

• The following slides refer to their techniques.

Page 105: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Device to XYZ

• Sample gamut in device space on 8x8x8 mesh (7x7x7 = 343 cubes).

• Measure (or model) device on mesh.

• Interpolate with trilinear interpolation – for small mesh and reasonable function

XYZ=f(device1, device2, device3) this approximates interpolating to tangent.

Page 106: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

XYZ to Device

• Invert function XYZ=f(device1, device2, device3)

– hard to do in general if f is ill behaved– At least make f monotonic by throwing out

distinct points with same XYZ.

• e.g. CMY device:– (continued)

Page 107: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

XYZ to CMY

• Invert function XYZ=f(c,m,y)– Given XYZ=[x,y,z] want to find CMY=[c,m,y]

such that f(CMY)=XYZ– Consider X(c,m,y), Y(c,m,y), Z(c,m,y)– A continuous function on a closed region has

max and min on the region boundaries, here the cube vertices. Also, if a continuous function has opposite signs on two boundary points, it is zero somewhere in between.

Page 108: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

XYZ to CMY

– Given X0, find [c,m,y] such that f(c,m,y) = X0

– if [ci,mi,yi] [cj,mj,yj] are vertices on a given cube, and U=X(c,m,y)- X0 has opposite sign on them, then it is zero in the cube. Similarly Y, Z. If find such vertices for all of X0,Y0,Z0, then the found cube contains the desired point. (and use interpolation). Doing this recursively will find the desired point if there is one.

Page 109: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Gamut Mapping

• Criteria:– preserve gray axis of original image– maximum luminance contrast– few colors map outside destination gamut– hue, saturation shifts minimized– increase, rather than decrease saturation– do not violate color knowledge, e.g. sky is blue,

fruit colors, skin colors

Page 110: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Gamut Mapping

• Special colors and problems– Highlights: this is a luminance issue so is about

the gray axis– Colors near black: locus of these colors in

image gamut must map into something reasonably similar shape else contrast and saturation is wrong

Page 111: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Gamut Mapping

• Special colors and problems– Highly saturated colors (far from white point):

printers often incapable.– Colors on the image gamut boundary

occupying large parts of the image. Should map inside target gamut else have to project them all on target boundary.

Page 112: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

CRT

Printer

Gamuts

Page 113: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Gamut Mapping

• First try: map black points and fill destination gamut.

Page 114: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

device gamutimage gamut

Page 115: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

translate Bito Bddevice gamut

image gamut

Page 116: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

translate Bito Bd

scale by csf

device gamutimage gamut

Page 117: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

translate Bito Bd

scale by csf rotate

device gamutimage gamut

Page 118: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Gamut Mapping

Xd = Bd + csf R (Xi - Bi)

Bi = image black, Bd = destination black

R = rotation matrix

csf = contrast scaling factor

Xi = image color, Xd = destination color

Problems:Image colors near black outside of destination are

especially bad: loss of detail, hue shifts due to quantization error, ...

Page 119: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

shift and scale alongdestination gray

Xd = Bd + csf R (Xi - Bi) + bs (Wd - Bd)

Page 120: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Fig 14a, bs>0, csf small, image gamut maps entirelyinto printer gamut, but contrast is low.

Fig 14b, bs=0, csf large, more contrast, more colors inside printer gamut, butalso more outside.

Page 121: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Saturation control

• “Umbrella transformation”[Rs Gs Bs] = monitor whitepoint

[Rn Gn Bn] new RGB coordinates such that Rs + Gs + Bs = Rn + Gn + Bn

and [Rn Gn Bn] maps inside destination gamut

First map R Rs+G Gs+B Bs to R Rn+G Gn+B Bn

Then map into printer coordinates

Makes minor hue changes, but “relative” colors preserved. Achromatic remain achromatic.

Page 122: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Projective Clipping

• After all, some colors remain outside printer gamut

• Project these onto the gamut surface:– Try a perpendicular projection to nearest

triangular face in printer gamut surface.– If none, find a perpendicular projection to the

nearest edge on the surface– If none, use closest vertex

Page 123: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Projective Clipping

• This is the closest point on the surface to the given color

• Result is continuous projection if gamut is convex, but not else.– Bad: want nearby image colors to be nearby in

destination gamut.

Page 124: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Projective Clipping

• Problems– Printer gamuts have worst concavities near

black point, giving quantization errors.– Nearest point projection uses Euclidean

distance in XYZ space, but that is not perceptually uniform.

• Try CIELAB? SCIELAB?

• Keep out of gamut distances small at cost of use of less than full printer gamut use.

Page 125: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color Management Systems

• Problems– Solve gamut matching issues– Attempt uniform appearance

• Solutions– Image dependent manipulations (e.g. Stone)– Device independent image editors (e.g.

Photoshop) with embedded CMS– ICC Profiles

Page 126: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

ICC Color Profiles

• International Color Consortium http://www.color.org.

• ICC Profile– device description text– characterization data– calibration data– invertible transforms to a fixed virtual color

space, the Profile Connection Space (PCS)

Page 127: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Profile Connection Space

• Presently only two PCS’s: CIELAB and CIEXYZ

• Both specified with D50 white point

• Device<-->PCS must account for viewing conditions, gamut mapping and tone (e.g. gamma) mapping.

Page 128: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

DVI color space(PCS)

Viewing-conditionindependent space

DVI color cpace

Output image and device

Input imageand device

DVI color space(e.g. XYZ)

Viewing-conditionindependent space

Chromatic adaptation and color appearance models

output devicecolorimetriccharacterization

Gamut mapping, tone control, etc

Chromatic adaptation and color appearance models

Chromatic adaptation and color appearance models

input devicecolorimetriccharacterization

Gamut mapping, tone control, etc

Page 129: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

ICC Profiles

• Device profiles

• Colorspace profiles – data conversion

• Device Link profile – concatenated D1->PCS->D2

• Abstract profile – generic for private purposes, e.g. special effects

Page 130: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

ICC Profiles

• Named color profile– Allows data described in Pantone system (and

others?) to map to other devices, e.g. view.– Supported in Photoshop

Page 131: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

ICC Profile Data Tags

• Profile header tags:– administrative and descriptive

• Start of Header

• Byte count of profile

• Profile version number

• Profile or device class (input, display, output, link, colorspace, abstract, named color profile)

• PCS target (CIEXYZ or CIELab)

Page 132: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

ICC Profile Data Tags

• Profile header tags:– ICC registered device manufacturer, model– Media attributes 64 attribute bits, 32 reserved

(reflective/transparent; glossy/matte. )– XYZ of illuminant– Rendering intent (Perceptual, relative

colorimetry, saturation, absolute colorimetry)

Page 133: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

ICC Profile Rendering Intents

• perceptual: “full gamut of the image is compressed or expanded to fill the gamut of the destination device. Gray balance is preserved but colorimetric accuracy might not be preserved.” (ICC Spec Clause 4.9)

• saturation: “specifies the saturation of the pixels in the image is preserved perhaps at the expense of accuracy in hue and lightness.” (ICC Spec Clause 4.12)

• absolute colorimetry: relative to illuminant only

• relative colorimetry: relative to illuminant and media whitepoint

Page 134: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

ICC Profile Data Tags

• Tone Reproduction Curve (TRC) tags:– grayTRC, redTRC, greenTRC, blueTRC

• single number (gamma) if TRC is exponential

• array of samples of the TRC appropriate to interpolation

Page 135: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

ICC Profile Data Tags

• Mapping tags (“AtoB0Tag”, “BtoA0Tag”, etc.)

– Map between device and PCS– Includes 3x3 matrix if mapping is linear map of

CIEXYZ spaces, or lookup table on sample points if not.

Page 136: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

ICC Profile Special Goodies

• Initimate with PostScript– Support for PostScript Color Rendering

Dictionaries reduces processing in printer– Support for argument lists to PostScript level 2

color handling

• Halftone screen geometry and frequency

• Undercolor removal

• Embedding profiles in pict, gif, tiff, jpeg,eps

Page 137: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

JPEG DCT Quantization

• FDCT of 8x8 blocks. – Order in increasing spatial frequency (zigzag)

• Low frequencies have more shape information, get finer quantization.

• High’s often very small so go to zero after quantizing

– If source has 8-bit entries ( s in [-27, 27-1), can show that quantized DCT needs at most 11 bits (c in [-210, 210-1])

Page 138: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

JPEG DCT Quantization

– Quantize with single 64x64 table of divisors– Quantization table can be in file or reference to

standard– Standard quantizer based on JND.– Note can have one quantizer table for each

image component– See Wallace p 12.

Page 139: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

JPEG DCT IntermediateEntropy Coding

– Variable length code (Huffman):• High occurrence symbols coded with fewer bits

– Intermediate code: symbol pairs

– symbol-1 chosen from table of symbols si,j

• i is run length of zeros preceding quantized dct amplitude,

• j is length of huffman coding of the dct amplitude

– i = 0…15, j= 1…10, and s0,0=‘EOB’ s15,0 = ‘ZRL’

– symbol-2: Huffman encoding of dct amplitude

– Finally, these 162 symbols are Huffman encoded.

Page 140: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

JPEG components

• Y = 0.299R + 0.587G + 0.114BCb = 0.1687R - 0.3313G + 0.5BCr = 0.5R - 0.4187G - 0.0813B

• Optionally subsample Cb, Cr – replace each pixel pair with its average. Not much loss

of fidelity. Reduce data by 1/2*1/3+1/2*1/3 = 1/3

• More shape info in achromatic than chromatic components. (Color vision poor at localization).

Page 141: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

JPEG goodies

• Progressive mode - multiple scans, e.g. increasing spatial frequency so decoding gives shapes then detail

• Hierarchical encoding - multiple resolutions• Lossless coding mode• JFIF:

– User embedded data

– more than 3 components possible?

Page 142: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

0 1

00s1

01s2

11s3

100s4

10

101

1011s6

1010s5

Huffman Encoding

Page 143: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

0 1

00s1

01s2

11s3

100s4

10

101

1011s6

1010s5

1110101101100Traverse from root to leaf, then repeat:

11 1010 11 01 100

s3 s5 s3 s2 s4

Huffman Encoding

Page 144: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Charge Coupled Device (CCD)

< 10m x 10m

Silicon cells emit electrons when light falls on it

Page 145: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

time

char

ge

charge

Charge Coupled Device (CCD)

lum

inan

ce

cell

< 10m x 10m

Page 146: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Y=0.299R + 0.587G +0.114B

Filters over cells

More green than red, blue

(For color tv and…?)

Page 148: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color TV

• Multiple standards - US, 2 in Europe, HDTV standards, Digital HDTV , Japanese analog.

• US: 525 lines (US HDTV is digital, and data stream defines resolution. Typically MPEG encoded to provide 1088 lines of which 1080 are displayed)

Page 149: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

NTSC Analog Color TV

• 525 lines/frame

• Interlaced to reduce bandwidth– small interframe changes help

• Primary chromaticities:

x y zR 0.67 0.33 0.00G 0.21 0.71 0.08B 0.14 0.08 0.78W 0.310 0.316 0.374

Page 150: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

NTSC Analog Color TV

• These yield 1.909 -0.985 0.058

RGB2XYZ = -0.532 1.997 -0.119-0.288 -0.028 0.902

Y=0.299R + 0.587G +0.114B (same as luminance channel for JPEG!)

= Y value of white point.

Cr = R-Y, Cb = B-Y with chromaticity: Cr: x=1.070, y=0; Cb: x=0.131 y=0;

y(C)=0 => Y(C)=0 => achromatic

Page 151: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

NTSC Analog Color TV

• Signals are gamma corrected under assumption of dim surround viewing conditions (high saturation).

• Y, Cr, Cb signals (EY, Er, Eb) are sent per scan line; NTSC, SECAM, PAL do this in differing clever ways EY typically with twice the bandwidth of Er, Eb

Page 152: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

NTSC Analog Color TV

• Y, Cr, Cb signals (EY, Er, Eb) are sent per scan line; NTSC, SECAM, PAL do this in differing clever ways.– EY with 4-10 x bandwidth of Er, Eb

– “Blue saving”

Page 153: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Digital HDTV

• 1987 - FCC seeks proposals for advanced tv– Broadcast industry wants analog, 2x lines of

NTSC for compatibility– Computer industry wanta digital

• 1993 (February) DHDTV demonstrated– in four incompatible systems

• 1993 (May) Grand Alliance formed

Page 154: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Digital HDTV

• 1996 (Dec 26) FCC accepts Grand Alliance Proposal of the Advanced Televisions Systems Committee ATSC

• 1999 first DHDTV broadcasts

Page 155: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Digital HDTV

lines hpix aspect frames frame rateratio

720 1280 16/9 progressive 24, 30 or 60

1080 1920 16/9 interlaced 60

1080 1920 16/9 progressive 24, 30

• MPEG video compression

• Dolby AC-3 audio compression

Page 156: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Some gamuts

SWOP

ENCAD GA ink

Page 158: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color naming

• “Basic colors”– Meaning not predicted from parts (e.g. blue,

yellow, but not bluish)– not subsumed in another color category, (e.g. red

but not crimson or scarlet)– can apply to any object (e.g. brown but not

blond)– highly meaningful across informants (red but not

chartruese)

Page 159: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color naming

Num clrs colors2 White, black3 White, black, red4 White, black, red, green | yellow5 White, black, red, green, yellow6 White, black, red, green, yellow, blue7 White, black, red, green, yellow, blue, brown

8-11 White, black, red, green, yellow, blue, brown, purple | pink | orange | gray

• “Basic colors”– Vary with language

Page 160: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color naming

• Berlin and Kay experiment:– Elicit all basic color terms from 329 Munsell

chips (40 equally spaced hues x 8 values plus 9 neutral hues

– Find best representative– Find boundaries of that

term

Page 161: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color naming

• Berlin and Kay experiment:– Representative (“focus” constant across lang’s)

• Boundaries vary even across subjects and trials

• Lammens fits a linear+sigmoid model to each of R-B B-Y and Brightness data from macaque monkey LGN data of DeValois et. al.(1966) to get a color model. As usual this is two chromatic and one achromatic

Page 162: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Color naming

• To account for boundaries Lammens used standard statistical pattern recognition with the feature set determined by the coordinates in his color space defined by macaque LGN opponent responses.

• Has some theoretical but no(?) experimental justification for the model.

Page 163: RGB Models human visual system? Gives an absolute color description? Models color similarity? Linear model? Convenient for color displays?

Canteen (Pantone 405 C)

Violet Quartz (Pantone 689 C)

Mecca Orange (Pantone 1675C)

Pantone Color Combo of the Month January 1999