Color and Color Models
Total Page:16
File Type:pdf, Size:1020Kb
Einführung in Visual Computing 186.822 Color and Color Models Werner Purgathofer Color problem specification light and perception colilorime try device color systems color ordering systems color symbolism Werner Purgathofer 1 1 Color - Why Do We Care? Computer Graphics is all about the generation and the manipulation of color images proper understanding and handling of color is necessary at every step Werner Purgathofer 2 What is Light? “light” = narrow frequency band of electromagnetic spectrum red border: 380 THz ≈ 780 nm violet border: 780 THz ≈ 380 nm visible radio radio d TV rared raviolet rays icrowaves f t t M M - - M M ……n n F a in A m ul X wavelength 1016 1014 1012 1010 108 106 104 102 100 10-2 (nm) 102 104 106 108 1010 1012 1014 1016 1018 1020 frequency (Hz) Werner Purgathofer 3 2 Light - An Electromagnetic Wave light is electromagnetic energy monochrome light can be described either by freqqyuency f or waveleng th c = f (c = speed of light) E t shorter wavelength equals higher frequency red 700 nm violet 400 nm Werner Purgathofer 4 Light – Spectrum normally, a ray of light contains many different waves with individual frequencies the associated distribution of wavelength intensities per wavelength is referred to as the spectrum of a given ray or light source Werner Purgathofer 5 3 Dominant Wavelength | Frequency energy white light energy greenish light ED wave- E wave- length W length 400 nm 700 nm dominant wavelength dominant wavelength | frequency (hue, color) brightness (area under the curve) E ...dominant energy density purity ED EW D EW...white light energy density ED Werner Purgathofer 6 The Human Eye cornea aqueous [Hornhaut] retina contains [Augenkammer] iris [Regen- rods: b/w bogen- cones: color lens haut] vitreous humor [Glaskörper] optical axis visual axis rods optic disc [Papille] fovea cones retina [Netzhaut] nerve macula lutea [gelber Fleck] Werner Purgathofer 7 4 The Human Eye 3 types of cones different fraction of wavelength absorbed light sensitivities: 16% 8% red 4% green 2% 1% blue λ 400 440 480 520 560 600 640 680 Werner Purgathofer 8 Color Blindness red/green blindness red & green cones too similar fraction of absorbed light 16% 8% 4% 2% 1% λ 400 440 480 520 560 600 640 680 Werner Purgathofer 9 5 Color Blindness red/green blindness red & green cones too similar fraction of blue blindness absorbed light 16% no blue cones 8% 4% other 2% 1% cones missing λ cones too similar 400 440 480 520 560 600 640 680 Werner Purgathofer 10 Color Blindness Tests 5 = normal 2 = red/green weak nothing = red/green blind nothing = normal Werner Purgathofer 11 6 Color Blindness Tests 8 = normal 8 = red/green blind 3 = red/green weak 12 = blue/yellow blind nothing = r/g blind 182 = normal Werner Purgathofer 12 Color Spaces (CS) Color Metric Spaces (CIE XYZ, L*a*b*) used to measure absolute values and differences - roots in colorimetry Device Color Spaces (RGB, CMY, CMYK) used in conjunction with device Color Ordering Spaces (HSV, HLS) used to find colors according to some criterion the distinction between them is somewhat obscured by the prevalence of multi-purpose RGB in computer graphics Werner Purgathofer 13 7 What is our Goal? to be able to quantify color in a meaningful, expressive, consistent and reproducible way. problem: color is a perceived quantity, not a direct, physical observable Werner Purgathofer 14 Color - A Visual Sensation light nerve object eye brain stimulus signal electromagnetic color rays sensation realm of direct realm of psychology observables Werner Purgathofer 15 8 Colorimetry CM is the branch of color science concerned with numerically specifying the color of a physically defined visual stimulus in such manner that stimuli with the same specification look alike under the same viewing conditions stimuli that look alike have the same specifica tion the numbers used are continuous functions of the physical parameters Werner Purgathofer 16 Colorimetry Properties Colorimetry only considers the visual discriminability of physical beams of radiation fthfor the purposes o f ClColor ime try a „col“ilor“ is an equivalence class of mutually indiscriminable beams colors in this sense cannot be said to be “red”, “green” or any other “color name” discriminability is decided before the brain - Colorimetry is not psychology Werner Purgathofer 17 9 Color Matching Experiments observers had to match monochromatic test lights by combining 3 fixed primaries test green test R+G+B 010101 goal: find the unique RGB coordinates for each stimulus Werner Purgathofer 18 Color Matching Experiments observers had to match monochromatic test lights by combining 3 fixed primaries R = 700.0 nm viewer G = 546.1 nm controls independently B = 435.8 nm variable ppyrimary sources masking viewing test screen screen source Werner Purgathofer 19 10 Tristimulus Values the values RQ, GQ and BQ test green test of a stimulus Q that fulfill R+G+B Q RQ R GQ G BQ B are called the tristimulus values of Q ihin the case o f a monochihromatic stilimulus Q, the values R, G and B are called the spectral tristimulus values Werner Purgathofer 20 Color Matching Procedure (1) test field = 700 nm-red with radiance Pref observer adjusts luminance of R (G=0, B=0) (2) test light wavelength is decreased in constant steps (radiance Pref stays the same) observer adjusts R, G, B (3) repeat for entire visible range Werner Purgathofer 350 400 450 500 550 600 650 700 nm 11 Color Matching Result !? 100 no match possible !?!? 0 350 400 450 500 550 600 650 700 nm observers want to „subtract“ red light from the match side...!? Werner Purgathofer 22 Color Matching Experiment Problem for some colors observers want to reduce red light to negative values…!? but there is no negggative light…! test green G+B est t t + + R ? 010101 Werner Purgathofer 23 12 “Negative” Light in a Color Matching Exp. if a match using only positive RGB values proved impossible, observers could simulate a subtraction of red from the match side by adding it to the test side test green +B t + R s G G te 01 010101 Werner Purgathofer 24 CIE RGB Color Matching Functions b(λ) r(λ) 100 g(λ) ? 0 350 400 450 500 550 600 650 700 nm 435.8 nm 546.1 nm 700.0 nm Werner Purgathofer 25 13 CIE XYZ problem solution: XYZ color system tristimulus system derived from RGB bd3based on 3 iiimaginary priiimaries all 3 primaries are imaginary colors Y only positive XYZ values can occur! 1931 by CIE (Commission Internationale de l’Eclairage) X Z Werner Purgathofer 26 RGB vs. XYZ negative component disappears y() is the achromatic luminance sensitivity RGB system XYZ system b(λ) r(λ) z(λ) g(λ) y(λ) x(λ) 1 0 350 400 450 500 550 600 650 700 nm 350 400 450 500 550 600 650 700 nm amounts of RGB primaries amounts of CIE primaries needed needed to display spectral colors to display spectral colors Werner Purgathofer 27 14 CIE Color Model Formulas XYZ color model C() = XX + YY + ZZ (X, Y, Z are primaries) normalized chromaticity values xyx, y X Y x y X Y Z X Y Z Y ( z = 1 –x –y ) 1 complete description of color: x, y, Y 1 X 1 Z Werner Purgathofer 28 CIE Chromaticity Diagram identifying spectral colors complementary colors determining dominant wavelength, purity comparing color gamuts spectral color positions purple line are along the boundary curve Werner Purgathofer 29 15 Properties of CIE Diagram (2) reppgresenting complementary colors on the chromaticity diagram C1 C C2 Werner Purgathofer 30 Properties of CIE Diagram (3) determining dominant wavelength Cs and purity with the chromaticity diagram Csp C1 → Cs C1 C C2 → Cp? → complement Csp C2 Cp Werner Purgathofer 31 16 Color Spaces (CS) Color Metric Spaces (CIE XYZ, L*a*b) used to measure absolute values and differences - roots in colorimetry Device Color Spaces (RGB, CMY, CMYK) used in conjunction with device Color Ordering Spaces (HSV, HLS) used to find colors according to some criterion the distinction between them is somewhat obscured by the prevalence of multi-purpose RGB in computer graphics Werner Purgathofer 32 RGB Color Model green (0,1,0) yellow primary colors (1,1,0) red, green, blue cyan white (0,1,1) (1,1,1) additive color model red black (1,0,0) (for monitors) (0,0,0) blue (0,0,1) magenta (1,0,1) C() = RR + GG + BB Werner Purgathofer 33 17 RGB Color Model Images 3 views of the RGB color cube Werner Purgathofer 34 Gamuts of RGB Monitors monitor gamuts can be very different no monitor can display all colors Werner Purgathofer 35 18 CMY Color Model magenta primary colors (0,1,0) blue (1,1,0) cyan, magenta, red black yellow (011)(0,1,1) (1,1,1) subtractive color cyan model (for white (1,0,0) hardcopy devices) yellow (0,0,0) (0,0,1) C=G+B, using C “subtracts” R green (1,0,1) C 1 R M 1 G Y 1 B Werner Purgathofer 36 CMY Color Model Images 3 views of the CMY color cube Werner Purgathofer 37 19 Gamuts of CMY(K) Printers printer gamuts can be very different no printer can display all colors Werner Purgathofer 38 Color Spaces (CS) Color Metric Spaces (CIE XYZ, L*a*b) used to measure absolute values and differences - roots in colorimetry Device Color Spaces (RGB, CMY, CMYK) used in conjunction with device Color Ordering Spaces (HSV, HLS) used to find colors according to some criterion the distinction between them is somewhat obscured by the prevalence of multi-purpose RGB in computer graphics Werner Purgathofer 39 20 Colour Ordering Systems (COS) primary aim: enable the user to intuitively choose colour values according to certain criteria choice can yield single or multiple colour values examples: HSV, HLS, Munsell, NCS, RAL Design, Coloroid