<<

: Intro • To create image, need 3 things: 1. Object 2. 3. Viewer • Same thing is true for color – Color of object depends on ”natural” color (under light) and color of light – Color perceived depends on viewer ∗ 2 viewers observing same object under same conditions may perceive different color • Major topics to be discussed: – Nature of light and color – The eye and color perception – Color models

1 Color: Basics • Color attributes – - basic color – Saturation - purity of a color ∗ How much white is mixed with a pure color – (brightness) - intensity ∗ Lightness pertains to reflected color ∗ Brightness pertains to emitted color • Artists’ terminology – These relate to pure pigments (pure ) – Tint ∗ Result of adding white to pigment ∗ Reduces saturation – Shade ∗ Result of adding to pigment ∗ Reduces lightness – Tone ∗ Result of adding white and black to pigment • Both terminologies widely used – Both are subjective • Want objective system for describing color

2 Color: Primaries • Represent using • Additive primaries

– Apply to colors of light – Primaries: RGB – Secondaries: CMY – Max combination of 3 primaries: white – Absence of primaries: black – Called additive because as add more primaries, are contributing more colors to the light ∗ i.e., the more wavelengths are represented • Subtractive

– Apply to colors of pigments – Primaries: CMY – Secondaries: RGB – Max combination of 3 primaries: black – Absence of primaries: white** – Called subtractive because as add more primaries, are absorbing more colors from the light • is set of colors that can be generated from a set of primaries

3 Color: Light • Characterized by wavelength (λ) and intensity • Visible light λ in range [380, 700] nm

• Basic colors of spectrum: ROYGBIV • Given color represented by a spectral (color distribution) curve

: objective, quantitative science of color • Objective characteristics of color – Dominant wavelength - observed color (λ) ∗ Corresponds to hue – Excitation purity - per cent of dominant λ ∗ Corresponds to saturation – Luminance - intensity; total amount of energy ∗ Corresponds to lightness/brightness

4 Color: Eye Structure

• Retina covered with 2 types of photoreceptors

1. Rods – Sensitive to low-intensity light – Overloaded by bright light – Only useful for night vision – Densest around perimeter of retina – ∼ 120 million

5 Color: Eye Structure (2) 2. Cones – Only stimulated by bright light – 3 types ∗ Usually referred to as R, G, B types – ∼ 6 million – Most dense in fovea - center of retina ∗ Only place where cone density > rod density – Foveola - center of fovea ∗ 100% cones ∗ Greatest density of cones ∗ Part of eye most sensitive to color ∗ Has greatest visual acuity

• Trichromacy theory (3 channel, Young-Helmholtz theory) – Eye has 3 color channels

6 Color: Eye Response to Light • Cones respond to light differently

– B cone most sensitive to 440 nm () – G cone most sensitive to 545 nm () – R cone most sensitive to 580 nm (greenish-) – Better labels are S, M, L for short, medium, and long λ sensitivity • Rods most sensitive to 449 nm • Comparatively, eye least sensitive to

– I.e., given R, G, B light of equal intensities, B will seem much dimmer

7 Color: Eye Response to Light (2)

• Luminance efficiency function – Shows eye’s response to light of equal intensities as a function of λ – Peak sensitivity 550 nm – Linear combination of 3 cone functions

8 Color: Eye Response to Light (3)

• Functions rλ, gλ, bλ represent amounts of additive primaries needed to create perception of all colors of spectrum

– Negative values ⇒ cannot produce color from primaries – Such colors only generated by adding the negative amount to color sample – Hence, additive primaries cannot reproduce all colors of spectrum (wrt eye) • Eye can distinguish ∼ 128 different fully saturated – Proximity of each hue not linear wrt λ • Eye’s response to brightness not linear – Doubling intensity does not result in perception of doubled brightness

9 Color: Tristimulus Theory • Given spectral distribution P (λ) and sensitivity curve S(λ) – Particular cone generates signal A = ∫ S(λ)P (λ)d(λ) – Cone converts continuous distribution into a discrete value

– 3 discrete signals generated by eye: AR,AG,AB

• Perceived color can be represented as C = TRα + TBβ + TGγ

– α, β, γ are primaries, Ti are intensities of each

• Ti called tristimulus values • Tristimulus theory states that can produce any color with the right tristimulus values • Many:1 correspondence between tristimulus values and perceived color – Several sets of TSVs can generate same color perception – Such sets called metamers – Implication: 2 spectral distributions may appear the same color • depends on light source, object, and viewer – 2 objects may appear same color under one light, but different under an- other light – One viewer may see 2 spectral distributions as same color, while another viewer sees the same distributions as different colors

10 COLOR: CIE • Commission Internationale de l’Eclairage (International Commission on Illu- mination) • Founded in 1920’s • Purpose is the study and standardization of color – Intent is to provide objective description of color • Responsible for a number of standards – Standard illuminant - light source ∗ Defined in terms of black body radiators · Ideal object that produces light solely via thermal energy · Observed color only depends on light source ∗ Standards: 1. Illuminant A - tungsten lamp 2. Illuminant B - sunlight with correlated of 4874oK 3. Illuminant C - sunlight with correlated color temperature of 6774oK 4. Illuminants D - series of various daylight conditions (a) D50 - sunlight with correlated color temperature of 5000oK (b) D65 - sunlight with correlated color temperature of 6504oK 5. Illuminant E - equal energy illuminant · Theoretical ideal 6. Illuminants F - series of various fluorescent lamps – Standard observer ∗ Represents full tristimulus response of typical human ∗ Standards: 1. 2o observer (1931) - observes color swatches that subtend 2o FOV of retina · (Color concentrated on fovea) 2. 10o observer (1964) - observes color swatches that subtend 10o FOV of retina

11 COLOR: CIE Color Systems • Designed to provide 3 primaries that capture full range of visible light • Replace RGB • Systems: 1. XYZ 2. xyY 3. Lab 4. Luv

12 COLOR: CIE XYZ System • Primaries –X, Y, Z – Loosely correspond to R, G, B – Do NOT require negative values to generate all colors • Blending functions

– xλ, yλ, zλ – Represent amount of X, Y, Z to generate all colors

– yλ chosen to be same as luminance function – Defined for standard 2o observer

– xλ, yλ, zλ linear combinations of rλ, gλ, bλ ∗ Can convert between 2 systems

13 COLOR: CIE XYZ System (2)

• XYZ space – Given a spectral distribution P (λ), the amount of X needed to match this color is X = k ∫ P (λ)xλdλ – Similarly for Y, Z – k defined by ∗ For emitters, k = 680 lumens/watt ∗ For reflectors, chosen so bright white has Y = 100

· Hence 100 k = ∫ Pw(λ)yλdλ

· where Pw is spectral distribution of source used for white – Visible part of XYZ space

∗ Curved surface represents X + Y + Z = 1 plane – Color C = XX + Y Y + ZZ

14 Color: CIE • Chromaticity represents color info only – Excludes luminance aspect (i.e., represents hue and saturation, but not lightness) • Defined as X x = X + Y + Z Y y = X + Y + Z Z z = X + Y + Z • x + y + z = 1 and falls on X + Y + Z = 1 plane • CIE chromaticity diagram

15 Color: CIE Chromaticity (2) – Projection of X + Y + Z = 1 onto X-Y plane represents all visible chro- maticity values

– All colors with same hue and saturation map to same point, regardless of luminance – Pure hues lie on perimeter – Central dot represents illuminant C • Given x, y – z = 1 − x − y – Not enough info to recover X, Y , Z – Requires an additional value: Y – XYZ recovered by x X = Y y Y = Y 1 − x − y Z = Y y • THE FOLLOWING MUST BE DISTINGUISHED: –X, Y, Z represent the 3 CIE primaries

– xλ, yλ, zλ represent the functions that represent the amount of each CIE primary needed to produce a given visible dominant wavelength – X, Y, Z represent tristimulus values of the primaries – x, y, z represent chromaticity values of a color

16 Color: CIE Chromaticity Diagram Applications • If 2 colors mixed, resultant color lies on straight line connecting them • Finding dominant λ of color – Measure XYZ tristimulus values – Calculate xy chromaticity values – Plot point on diagram – Draw straight line thru point and white – Point of intersection with perimeter is dominant hue • Finding excitation purity of color – Given: chromaticity values of color C and dominant hue H |CW | ep = |HW | • Finding complements – Draw line thru color and white – Complement is on line on opposite side of white • Non-spectral colors – Do not correspond to a visible hue – Represent their dominant hue as a complement, represented λc • Color gamuts – Gamut is set of all possible colors that can be produced from a given set – Gamut’s represented by triangle defined by chromaticities of primaries – No visible primaries capable of producing all visible colors • Chromaticity diagram does not represent full palette – Luminance values not represented – Infinitely many planes in XYZ space, each with different luminosity, that project to chromaticity diagram

17 Color: CIE Luv • Consider

– C1 = (X1,Y1,Z1)

– D1 = C1 + ∆C, where ∆C = (∆X, ∆Y, ∆Z)

– C2 = (X2,Y2,Z2)

– D2 = C2 + ∆C

– In general, the perceived difference between C1 and D1 will not be the same as the difference between C2 and D2 • A perceptually uniform color space is one in which 2 colors that are equally distant from other colors will be perceived as having the same amount of dif- ference • CIE Luv space designed to be uniform

– (Xn,Yn,Zn) defines white – L∗ = 116( Y )1/3 − 16 Yn – Y/Yn > 0.01 ∗ ∗ 0 0 – u = 13L (u − un) ∗ ∗ 0 0 – v = 13L (v − vn) – where 4X u0 = X + 15Y + 3Z 4Y v0 = X + 15Y + 3Z

0 4Xn un = Xn + 15Yn + 3Zn

0 4Yn vn = Xn + 15Yn + 3Zn

18 Color: Failures of Trichromacy Theory • Fundamental colors – RBY primaries do not correspond to standard primaries

– Y ”more basic” than G, M, C • Anomalous pairs/opponency – Some mixtures are not ”natural”: B-Y, R-G – tends to affect pairs: ∗ RG ∗ BY – After images based on same pairs (see flag ex) – Opponency (Herring) theory ∗ Retina consists of components that generate inhibiting signals, based on λ ∗ Components work as antagonistic pairs: 1. RG 2. BY 3. KW To demonstrate, stare at the flag for 1 minute, then stare at the white area underneath.

19 Color: Failures of Trichromacy Theory (2)

• Zone theory – Reconciles trichromacy and opponency – 2 layers of retina ∗ First consists of trichromatic cones ∗ Second receives inhibitory and positive signals from first

• Context

20 Color: RGB Model • Additive primaries • Used for CRTs • Color cube – Plotted on Cartesian coordinate system – Black at origin – White at FUR corner – Main diagonal represents grays

21 Color: RGB Model (2)

• To convert arbitrary RGB → CIE XYZ value – Based on chromaticity values of monitor’s phosphors – Use xyY values

– [1] X = XrR + XgG + XbB

∗ where Xr, Xg, Xb represent contribution of X by R, G, B phosphors ∗ Similarly for Y , Z

– To determine Xr, Xg, Xb ∗ Let C = X + Y + Z · r r r r

Xr Xr xr = = Xr + Yr + Zr Cr

· where xr is chromaticity value for phosphor ∗ [2] Xr = xrCr

∗ xr, yr available from CRT specs → zr = 1 − xr − yr ∗ Given Yr, Cr = Yr/yr (similarly for Yg, Yb) ∗ Thus x Y x Y x Y X = r r R + g g G + b b B yr yg yb

· (Substitution for Xr, etc. in [1], [2]) ∗ (Similarly for Y , Z)

22 Color: CMYK Model • Subtractive primaries • Used in hard-copy devices • Each primary absorbs a specific additive primary – e.g., C (B + G) subtracts R • Can write as C = 1 − R, M = 1 − G, Y = 1 − B, • Color cube – Inverse of RGB case – White at origin – Black at FUR corner – Main diagonal represents grays

• Usually use black (K) as 4th primary – Hard to produce true K with CMY – Requires less ink (dries faster, less soggy paper)

23 Color: YIQ Model • NTSC standard for TV color broadcast • Y represents luminance info: same as CIE Y • IQ represent chromaticity info • Black and white TV only uses Y value • Conversions: – Y = 0.299R + 0.587G + 0.114B – I = 0.596R − 0.275G − 0.321B – Q = 0.212R − 0.523G + 0.311B • Based on NTSC standard RGB phosphors RGB x 0.67 0.21 0.14 y 0.33 0.71 0.08

where illuminant C has white point xw = 0.31, yw = 0.316, Yw = 100.0 • Encoding based on eye characteristics: – Eye more sensitive to changes in luminance than to changes in saturation ∗ → Y more important than I or Q – Objects that subtend a small FOV produce limited sensation ∗ → do not need same values for I and Q ∗ Since eye is less sensitive to B, use less bandwidth for it – To maximize amount of info in signal, use ∗ 4Mz for Y ∗ 1.5 Mz for I ∗ 0.6Mz for Q

24 Color: HSV Model • Based on artist concepts of tint, shade, tone • Color cone – Cylindrical coordinate system – Vertical axis V (value) - represents lightness – H (hue) measured as angle around V axis ∗ R at 0o – S (saturation) measured as distance from V axis to edge ∗ Edge represents S = 1 – Apex of cone at origin – Black at V = 0, S = 0 – White at V = 1, S = 0 – Pure colors at V = 1, S = 1

• Tints generated by decreasing S value • Shades generated by decreasing V value • Tones generated by decreasing S and V values • Top plane of cone corresponds to looking down main diagonal of RGB color cube • Each plane of constant V corresponds to subcube of RGB space

25 Color: HLS Model • Based on HLS space • Pair of face-to-face cones – L axis corresponds to V axis – V = 1 corresponds to L = 0.5 – Black at L = 0, S = 0 – White at L = 1, S = 0 – L = 0.5 plane corresponds to V = 1 plane of HSV – Pure colors at L = 0.5, S = 0

26 Color: CRT Considerations/Limitations • Color/frame buffer – Buffer depth: Number of color bits ∗ Often represented as bit planes · Have 1 plane for each bit · Bits in a given cell collectively represent color for that pixel:

27 Color: CRT Considerations/Limitations (2)

• Color indexing – Method to provide relatively rich palette when color buffer has limited depth ∗ Assume depth = k bits – Pixel does not store color data (e.g., RGB), but an index to a color table (index) ∗ Color table is lookup table ∗ Has 2k entries ∗ Memory allocated per slot >>> k (e.g., 4m where m = 8 bits) ∗ Entries represent RGBA values ∗ If pixel value = p, pixel color is color table[p] ∗ Can represent 23m colors, but only 2k at any one time – Adds level of indirection to color access • Dithering – Another means of providing more colors than may be available – Generated by color pattern distributed over area – Decreases resolution

28