Quick viewing(Text Mode)

Color Science What Light Is Measuring Light

Color Science What Light Is Measuring Light

Science

CS 465 Lecture 23 [source unknown]

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 1 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 2

What is Measuring light

• Light is electromagnetic radiation • Salient property is the spectral power distribution (SPD) – exists as oscillations of different frequency (or, wavelength) – the amount of light present at each wavelength – units: Watts per nanometer (tells you how much power you’ll find in a narrow range of wavelengths) – for color, often use “relative units” when overall intensity is not important

amount of light = 180 d (relative units) wavelength band (width d) [Lawrence Berkeley Lab / MicroWorlds][Lawrence Berkeley Lab /

wavelength (nm)

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 3 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 4 What color is The problem of color science

are the sensations that arise from light energy • Build a model for human color perception of different wavelengths • That is, map a Physical light description to a – we are sensitive from about 380 to 760 nm—one “octave” Perceptual color sensation • Color is a phenomenon of human perception; it is not a universal property of light • Roughly speaking, things appear “colored” when they depend on wavelength and “gray” when they do not. ? [Stone 2003]

Physical Perceptual

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 5 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 6

The eye as a measurement device A simple light detector

• We can model the low-level • Produces a scalar value (a number) when photons land behavior of the eye by thinking on it of it as a light-measuring machine – this value depends strictly on the number of photons – its optics are much like a camera detected – its detection mechanism is also – each photon has a probability of being detected that much like a camera depends on the wavelength • Light is measured by the – there is no way to tell the difference between signals caused photoreceptors in the retina by light of different wavelengths: there is just a number – they respond to visible light • This model works for many detectors: – different types respond to – based on semiconductors (such as in a digital camera)

[Greger et al. 1995] different wavelengths – based on visual photopigments (such as in human eyes)

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 7 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 8 A simple light detector Light detection math

• Same math carries over to power distributions – spectum entering the detector has its spectral power distribution (SPD), s() – detector has its spectral sensitivity or spectral response, r()

measured signal detector’s sensitivity

input spectrum

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 9 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 10

Light detection math Cone Responses

or • S,M,L cones have broadband spectral sensitivity • If we think of s and r as vectors, this operation is a dot • S,M,L neural response is product (aka inner product) integrated w.r.t.  – in fact, the computation is done exactly this way, using – we’ll call the response functions r , r , r sampled representations of the spectra. S M L • Results in a trichromatic • let i be regularly spaced sample points D apart; then: visual system • S, M, and L are tristimulus values [source unknown] • this sum is very clearly a dot product

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 11 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 12 Cone responses to a spectrum s : an answer to the problem

• Wanted to map a Physical light description to a Perceptual color sensation • Basic solution was known and standardized by 1930 – Though not quite in this form—more on that in a bit

s [Stone 2003] Physical Perceptual

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 13 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 14

Basic fact of colorimetry Pseudo-geometric interpretation

• Take a spectrum (which is a function) • A dot product is a projection • Eye produces three numbers • We are projecting a high dimensional vector (a • This throws away a lot of information! spectrum) onto three vectors – Quite possible to have two different spectra that have the – differences that are perpendicular to all 3 vectors are not same S, M, L tristimulus values detectable – Two such spectra are metamers • For intuition, we can imagine a 3D analog – 3D stands in for high-D vectors – 2D stands in for 3D – Then vision is just projection onto a plane

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 15 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 16 Pseudo-geometric interpretation Basic colorimetric concepts

• The information available to the visual system about a • Luminance spectrum is three values – the overall magnitude of the the visual response to a – this amounts to a spectrum (independent of its color) loss of information • corresponds to the everyday concept “brightness” analogous to – determined by product of SPD with the luminous efficiency projection on a plane function V that describes the eye’s overall ability to detect • Two spectra that light at each wavelength produce the same – e.g. lamps are optimized response are to improve their luminous metamers efficiency (tungsten vs. fluorescent vs. sodium vapor) [Stone 2003]

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 17 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 18

Luminance, mathematically More basic colorimetric concepts

• Y just has another response curve (like S, M, and L) • – what’s left after luminance is factored out (the color without regard for overall brightness) – scaling a spectrum up or down leaves chromaticity alone – r is really called “V ” Y  • • V is a linear combination of S, M, and L  – many colors can be matched by plus a spectral color – Has to be, since it’s derived from cone outputs – correlates to everyday concept “” •Purity – ratio of pure color to white in matching mixture – correlates to everyday concept “” or “saturation”

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 19 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 20 Color reproduction

• Have a spectrum s; want to match on RGB monitor – “match” means it looks the same – any spectrum that projects to the same point in the visual is a good reproduction •Must find a spectrum that the monitor can produce that is a metamer of s [cs417—Greenberg] [source unknown]

R, G, B? Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 21 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 22

CRT display primaries LCD display primaries ) 2 Emission (watts/m Emission

wavelength (nm) – Curves determined by phosphor emission properties – Curves determined by (fluorescent) backlight and filters

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 23 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 24 Combining Monitor Phosphors with Color reproduction Spatial Integration • Say we have a spectrum s we want to match on an RGB monitor – “match” means it looks the same – any spectrum that projects to the same point in the visual color space is a good reproduction • So, we want to find a spectrum that the monitor can produce that matches s – that is, we want to display a metamer of s on the screen [source unknown]

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 25 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 26

Color reproduction Color reproduction as linear algebra

• We want to compute • The projection onto the three response functions can the combination of be written in matrix form: r, g, b that will project to the same visual response as s.

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 27 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 28 Color reproduction as linear algebra Color reproduction as linear algebra

• The spectrum that is produced by the monitor for the • What color do we see when we look at the display? color signals R, G, and B is: – Feed C to display – Display produces sa • Again the discrete form can be written as a matrix: – Eye looks at sa and produces V

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 29 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 30

Color reproduction as linear algebra

• Goal of reproduction: visual response to s and sa is the same:

• Substituting in the expression for sa,

color matching matrix for RGB [source unknown]

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 31 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 32 Reflection from colored surface Subtractive color

• Produce desired spectrum by subtracting from white light (usually via absorption by ) • Photographic media (slides, prints) work this way • Leads to C, M, Y as primaries • Approximately, 1 – R, 1 – G, 1 – B [Stone 2003]

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 33 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 34

Color spaces Standard color spaces

• Need three numbers to specify a color • Standardized RGB (sRGB) – but what three numbers? – makes a particular monitor RGB standard –a color space is an answer to this question – other color devices simulate that monitor by calibration • Common example: monitor RGB – sRGB is usable as an interchange space; widely adopted today –define colors by what R, G, B signals will produce them on – is still limited your monitor (in math, s = RR + GG + BB for some spectra R, G, B) – device dependent (depends on gamma, phosphors, gains, …) • therefore if I choose RGB by looking at my monitor and send it to you, you may not see the same color – also leaves out some colors (limited gamut), e.g. vivid

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 35 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 36 A universal color space: XYZ Separating luminance, chromaticity

• Standardized by CIE (Commission Internationale de • Luminance: Y l’Eclairage, the standards organization for color science) • Chromaticity: x, y, z, defined as • Based on three “imaginary” primaries X, Y, and Z (in math, s = XX + YY + ZZ) – imaginary = only realizable by spectra that are negative at some wavelengths – key properties • any stimulus can be matched with positive X, Y, and Z • separates out luminance: X, Z have zero luminance, so Y tells you the luminance by itself – since x + y + z = 1, we only need to record two of the three • usually choose x and y, leading to (x, y, Y) coords

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 37 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 38

Chromaticity Diagram Chromaticity Diagram

spectral locus

line [source unknown] [source unknown]

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 39 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 40 Color Perceptually organized color spaces

• Artists often refer to colors as tints, shades, and tones Monitors/printers can’t of pure pigments produce all visible colors – tint: mixture with white tints Reproduction is limited – shade: mixture with pure white to a particular domain – tones: mixture with color grays For additive color (e.g. – gray: no color at all shades monitor) gamut is the (aka. neutral) black FvDFH] [after triangle defined by the • This seems intuitive of the three primaries. – tints and shades are inherently related to the pure color [source unknown] [source • “same” color but lighter, darker, paler, etc.

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 41 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 42

Perceptual dimensions of color Perceptual dimensions: chromaticity

•Hue • In x, y, Y (or another – the “kind” of color, regardless of attributes luminance/chromaticity – colorimetric correlate: dominant wavelength space), Y corresponds to – artist’s correlate: the chosen color • Saturation • hue and saturation are – the “colorfulness” then like polar – colorimetric correlate: purity coordinates for – artist’s correlate: fraction of paint from the colored tube chromaticity (starting at • Lightness (or value) white, which way did you – the overall amount of light go and how far?)

– colorimetric correlate: luminance [source unknown] – artist’s correlate: tints are lighter, shades are darker Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 43 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 44 Perceptual dimensions of color

• There’s good evidence (“opponent ”) for a neurological basis for these dimensions – the brain seems to encode color early on using three axes: white — black, , yellow — – the white—black axis is lightness; the others determine hue and saturation – one piece of evidence: you can have a light green, a dark green, a yellow-green, or a blue-green, but you can’t have a reddish green (just doesn’t make sense) • thus red is the opponent to green – another piece of evidence: afterimages (next slide)

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 45 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 46

RGB as a 3D space

• A cube:

(demo of RGB cube)

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 47 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 48 Perceptual organization for RGB: HSV Perceptually uniform spaces

• Uses hue (an angle, 0 to 360), saturation (0 to 1), and • Two major spaces standardized by CIE value (0 to 1) as the three coordinates for a color – designed so that equal differences in coordinates produce – the brightest available equally visible differences in color RGB colors are those – LUV: earlier, simpler space; L*, u*, v* with one of R,G,B – LAB: more complex but more uniform: L*, a*, b* equal to 1 (top surface) – both separate luminance from chromaticity – each horizontal slice is – including a gamma-like nonlinear component is important the surface of a sub-cube

of the RGB cube [FvDFH]

(demo of HSV color pickers)

Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 49 Cornell CS465 Fall 2004 •Lecture 23 © 2004 Steve Marschner • 50