Last TimeTodayQualitative ResponseSlide 4RecallTrichromacyTrichromacy means…The Math of TrichromacyPrimaries are Spectra TooColor MatchingThe RGB Color Matching FunctionsComputing the MatchingColor SpacesRGB Color SpaceProblems with RGBCIE XYZ Color SpaceCIE x, yCIE Matching FunctionsGoing from RGB to XYZStandard RGB↔XYZDetermining GamutsAccurate Color ReproductionMore linear color spacesHSV Color Space (Alvy Ray Smith, 1978)HSV Color SpaceUniform Color SpacesMacAdam EllipsesCIE u’v’ Space9/14/04 © University of Wisconsin, CS559 Spring 2004Last Time•Intensity perception – the importance of ratios•Dynamic Range – what it means and some of the issues•Gamma Correction – why and how•Color–Spectra–Emission vs. adsorption–Sensors and response–Human color perception•Programming tutorial 19/14/04 © University of Wisconsin, CS559 Spring 2004Today•Tri-chromacy•Color primaries•Color Spaces•Calibration•Homework 1 due•Do Programming Tutorial 29/14/04 © University of Wisconsin, CS559 Spring 2004Qualitative ResponseSensitivity, 400 500 600 700#photons, E400 500 600 700RedMultiplyE400 500 600 700Area under curve?Big response!9/14/04 © University of Wisconsin, CS559 Spring 2004Qualitative Response700MultiplyE400 500 600 700Area under curve?Tiny response!400 500 600Sensitivity, #photons, E400 500 600 700Blue9/14/04 © University of Wisconsin, CS559 Spring 2004Recall•We’re working toward a representation for digital color•We have seen that humans have three sensors for color vision•Now, the implications …9/14/04 © University of Wisconsin, CS559 Spring 2004Trichromacy•Experiment:–Show a target color spectrum beside a user controlled color–User has knobs that adjust primary sources to set their color•Primary sources are just lights with a fixed spectrum and variable intensity–Ask the user to match the colors – make their light look the same as the target•Experiments show that it is possible to match almost all colors using only three primary sources - the principle of trichromacy•Sometimes, have to add light to the target•In practical terms, this means that if you show someone the right amount of each primary, they will perceive the right color•This was how experimentalists knew there were 3 types of cones9/14/04 © University of Wisconsin, CS559 Spring 2004Trichromacy means…400 500 600 700400 500 600 700Spectrum3 PrimariesColor Matching:People think these two spectra look the same (monomers)Representing color:If you want people to “see” the continuous spectrum, you can just show the three primaries9/14/04 © University of Wisconsin, CS559 Spring 2004The Math of Trichromacy•Write primaries as R, G and B–We won’t precisely define them yet•Many colors can be represented as a mixture of R, G, B: M=rR + gG + bB (Additive matching)•Gives a color description system - two people who agree on R, G, B need only supply (r, g, b) to describe a color•Some colors can’t be matched like this, instead, write: M+rR=gG+bB (Subtractive matching)–Interpret this as (-r, g, b)–Problem for reproducing colors – you can’t subtract light using a monitor, or add it using ink9/14/04 © University of Wisconsin, CS559 Spring 2004Primaries are Spectra Too•A primary can be a spectrum–Single wavelengths are just a special case400 500 600 7003 Primaries400 500 6007003 Primariesor9/14/04 © University of Wisconsin, CS559 Spring 2004Color Matching•Given a spectrum, how do we determine how much each of R, G and B to use to match it?•First step:–For a light of unit intensity at each wavelength, ask people to match it using some combination of R, G and B primaries–Gives you, r(), g() and b(), the amount of each primary used for wavelength –Defined for all visible wavelengths, r(), g() and b() are the RGB color matching functions9/14/04 © University of Wisconsin, CS559 Spring 2004The RGB Color Matching Functions9/14/04 © University of Wisconsin, CS559 Spring 2004Computing the Matching•Given a spectrum, how do we determine how much each of R, G and B to use to match it?•The spectrum function that we are trying to match, E(), gives the amount of energy at each wavelength•The RGB matching functions describe how much of each primary is needed to give one energy unit’s worth of response at each wavelength bB gG rR E dEbbdEggdErr)()()()()()(9/14/04 © University of Wisconsin, CS559 Spring 2004Color Spaces•The principle of trichromacy means that the colors displayable are all the linear combination of primaries•Taking linear combinations of R, G and B defines the RGB color space–the range of perceptible colors generated by adding some part each of R, G and B•If R, G and B correspond to a monitor’s phosphors (monitor RGB), then the space is the range of colors displayable on the monitor9/14/04 © University of Wisconsin, CS559 Spring 2004RGB Color SpaceColor Cube Program9/14/04 © University of Wisconsin, CS559 Spring 2004Problems with RGB•Can only a small range of all the colors humans are capable of perceiving (particularly for monitor RGB)–Have you ever seen magenta on a monitor?•It isn’t easy for humans to say how much of RGB to use to make a given color–How much R, G and B is there in “brown”? (Answer: .64,.16, .16)•Perceptually non-linear–Two points a certain distance apart in one part of the space may be perceptually different–Two other points, the same distance apart in another part of the space, may be perceptually the same9/14/04 © University of Wisconsin, CS559 Spring 2004CIE XYZ Color Space•Defined in 1931 to describe the full space of perceptible colors–Revisions now used by color professionals•Color matching functions are everywhere positive–Cannot produce the primaries – need negative light!–But, can still describe a color by its matching weights–Y component intended to correspond to intensity•Most frequently set x=X/(X+Y+Z) and y=Y/(X+Y+Z)–x,y are coordinates on a constant brightness slice9/14/04 © University of Wisconsin, CS559 Spring 2004CIE x, yNote: This is a representation on a projector with limited range, so the correct colors are not being displayed9/14/04 © University of Wisconsin, CS559 Spring 2004CIE Matching Functions9/14/04 © University of Wisconsin, CS559 Spring 2004Going from RGB to XYZ•These are linear color spaces, related by a linear
View Full Document