Examining Color Representation We ve generally treated colors solely as RGB triples with an optional alpha value perform almost all operations on each channel separately but usually treat them as identical trace one transmission ray despite wavelength dependence But this representation is rather limited today we ll explore color representation in more depth Light is What We re Trying to Represent A form of electromagnetic EM radiation like x rays microwaves radio waves characterized by wavelength alternatively frequency f 2 amplitude of wave determines intensity We perceive limited section of the spectrum each wavelength is a specific color Visible light spectrum 700 nm 400 nm 1 Spectral Distribution of Illumination Light is a mixture of many wavelengths each with some intensity represented by continuous function Sample Color P intensity at wavelength each as some intensity spectral distribution intensity as a function of wavelength over the entire spectrum We perceive these distributions as colors largely an artifact of our visual system Intensity Spectral Distribution Wavelength The Anatomy of the Eye 2 The Anatomy of the Eye Iris lets light into eye contracts and dilates in response to brightness the hole in the iris is the pupil Lens focuses light on retina dynamically reshaped by surrounding muscles to control focus Cells in retina react to light sends signal via optic nerve to visual cortex in brain fovea is the region of highest acuity Retinal Composition Two Kinds of Cells Cones are concentrated in fovea high acuity require more light respond to color Rods concentrate outside fovea lower acuity require less light respond to intensity only notice that you can t see color in low lighting very well near fovea cones larger cells away from fovea rods smaller cells 3 The Response of Cones to Color Response levels to illumination are s S P d m M P d l L P d where s m l are scalars this implies that we humans perceive light as a 3 D space 0 2 M L Fraction of Light Absorbed Three kinds of cones S L and M S cones respond to blue M cones respond to green L cones respond to red much less sensitive to blue S 0 400 680 Wavelength nm Humans Perceive a 3D Color Space Response levels to illumination are s S P d m M P d l L P d this implies that we humans perceive light as a 3 D space only because we have 3 cone types 0 2 M L Fraction of Light Absorbed Three kinds of cones S L and M S cones respond to blue M cones respond to green L cones respond to red much less sensitive to blue S 0 400 680 Wavelength nm 4 How We ve Been Representing Color Each pixel in the frame buffer is an RGB triple each color channel is a value ranging from 0 1 or 0 255 if we re using 8 bit channel integers Each pixel on CRT contains three phosphors red green and blue elements electron beam scans over pixels row by row Frame buffer values control intensity of electron beams R 0 implies red beam is off 0 R R 1 implies red beam at full intensity 1 The RGB Color Space We ve represented colors as combinations of three primaries established 3 special colors red green blue compose all colors by weighted combinations of these C rR gG bB and why did we pick red green and blue essentially because of the structure of our visual system roughly correspond to peaks of cone response curves note requires a choice of red green blue illuminants which does not necessarily correspond to your monitor phosphors Can think about the 3 D RGB color space all unique triples of r g b values in the range 0 1 or all colors realizable as a combination of red green blue 5 RGB Color Matching Functions Given a spectral distribution can compute RGB values using color matching functions r k r P d g k g P d b k b P d 0 4 r b g 0 2 0 presumes standard RGB lights In reality this is rather inexact CRT phosphors emit some spectral distribution of light every monitor is different 0 2 400 700 Wavelength nm What s This Negative Matching Values Some colors cannot be written as a combination of red green and blue illuminants 0 4 r b g 0 2 What negative values mean if we add red to given light then we can find RGB values 0 0 2 400 700 Wavelength nm 6 Looking Towards Other Color Spaces Our choice of RGB color space is fairly arbitrary it s loosely based on our perceptual system We could in principle select any 3 primaries we like and continue to represent colors as weighted combinations We can also construct other 3 D color spaces where the dimensions are no longer primary colors but have some other physical meaning As we ll see RGB color space is not always the best choice different color spaces lend themselves to different tasks The CMY Color Space The other most common set of primaries besides RGB cyan magenta and yellow complements of red green blue C M Y 1 R 1 G 1 B These are the so called subtractive primaries RGB are additive primaries start with black add up to white appropriate when dealing with emitted light CMY start with white and add up to black appropriate when dealing with inks pigments each ink absorbs some part of the spectrum subtracts light 7 The HSV Color Space Dimensions no longer primaries hue selects a base color saturation purity of color decrease adding white value brightness decrease adding black Designed for color specification more user friendly than RGB see Foley et al for conversion algorithm Can view this space as a hexcone RGB CMY are cubes HSV is Common in User Interfaces 8 The XYZ Color Space An empirical color space designed by CIE in 1930 s uses supersaturated primaries 1 9 z not physically realizable matching functions non negative X k x P d y Y k y P d x Z k z P d Represents all perceptible colors most used in color science based on human perception studies Y designed to be luminance perceived brightness of light 0 400 Wavelength nm 700 The XYZ Color Cone 9 Chromaticity Diagrams Can normalize XYZ colors X X Y Z Y y X Y Z x these are chromaticity values we ve factored out luminance Can plot x y for all colors chromaticity diagrams all colors realizable by a certain device is its gamut always falls within XYZ gamut The LUV Color Space All these color spaces are perceptually non uniform take any two given colors each of which is a color triple compute their distance in color space using coordinates have user observe both colors and rank similarity colors with a small distance aren t necessarily similar and colors with large distance aren t necessarily very different LUV color space is a variant of the XYZ system attempts to
View Full Document
Unlocking...