MAE152 Computer Graphics for Scientists and Engineers Colors In Computer Graphics How much red was she with anger ?! • • • • • glColor3d (1.0, 0.78, 0.78); May be! It’s YOUR perception. Can color be quantified ? Can a color be uniquely defined ? Is there a “common understanding” about colors ? Why “color management” Source, Object, Observer Reflected light = color of object The Eye Rods and Cones • Rods: sensitive to color intensity (black and white sensitivity in dark) • Cones: three types – S, M and L From left to right, the curves above show the sensitivity of the S, M, and L cones to various wavelengths of visible light CIE Color Matching Experiment Basis for industrial color standards and “pointwise” color models. Color Matching Experiment Image courtesy Bill Freeman CIE Experiment Result • Three pure light source: R = 700.0 nm, G = 546.1 nm, B = 435.8 nm. Color Matching Experiment CIE Color Space • 3 hypothetical light sources, X, Y, and Z, which yield positive (why?) matching curves • Y: roughly corresponds to luminous efficiency characteristic of human eye The CIE 1931 Standard Observer represents the color perception of a "normal" person. The curves show the intensity of X, Y, and Z values (akin to cone response) for a given wavelength Principle of Tri-chromaticity In general : m T wi Pi i 1 Pi are primaries, wi are weights. Example : P1 645.16 nm (R), P2 526.32 nm (G), P3 444.44 nm (B) Color matching experiment s imply that 3 primaries are enough 3 T wi Pi i 1 Grassman’s Laws Color Spaces • Use color matching functions to define a coordinate system for color. • Each color can be assigned a triple of coordinates with respect to some color space (e.g. RGB). • Devices (monitors, printers, projectors) and computers can communicate colors precisely. U ( ) f1 ( ) P1 f 2 ( ) P2 f 3 ( ) P3 S ( ) w1 P1 w2 P2 w3 P3 wi f i ( ) S ( )d 3D Tri-chromatic Space CIE Chart A qualitative rendering of the CIE (x,y) space. The blobby region represents visible colors. There are sets of (x, y) coordinates that don’t represent real colors, because the primaries are not real lights (so that the color matching functions could be positive everywhere). Slide courtesy Forsyth and Ponce A plot of the CIE (x,y) space: The spectral locus (the colors of monochromatic lights) and the black-body locus (the colors of heated black-bodies) is shown. The range of typical incandescent lighting is also plotted. Slide courtesy Forsyth and Ponce Some Colour Gamuts Undisplayable Colours • Suppose XYZ colour computed, but not displayable? • Terminology – Dominant wavelength – Saturation A Maxwell Triangle, with white in the centre Maxwell Triangle, showing where the spectral cyan matches The spectral locus and the resulting RGB colour matching functions The CIE tristimulus values and there relation to the spectral locus. Colour might not be displayable • Falls outside of the triangle (its chromaticity not displayable on this device) – Might desaturate it, move it along line QW until inside gamut (so dominant wavelength invariant) • Colour with luminance outside of displayable range. – Clip vector through the origin to the RGB cube (chrominance invariant) RGB Cube Mapped to XYZ Space Market for Display Technologies TOTAL WORLD MARKET ( $27.8 BILLION ) CRT (58.7%) LCD (35.7%) Vacuum Fluorescent (2.3%) LED (1.7%) Plasma (1.1%) EL (0.5%) Cathode Ray Tube Electron beam Deflection yoke Funnel Face Plate Electron gun Phosphor screen S hadow mask Base Neck Convergence magnet Color Shadow Mask CRT In-Line Electron guns Green Three-beam electron gun Blue Aperature Red Dot Triad B R G Metal mask G B R G R G B R B R G B G B R G R G B R R G G GR R B Metal strips Phosphors on glass faceplate B RG Phosphors on glass faceplate B Color CRT Phosphor Pattern Versus Spot Size R G Dot Pitch G R G R B R B G R G G B R B R B R B G B Spot Size G B R Raster Display • TV boom made it cheap • Entire screen painted 30 times/ sec • Screen is traversed 60 times/ sec • Even/ Odd lines on alternate scans, ‘interlace’. Pro/Con for Raster CRT Display • Advantages – Allows solids to be displayed – Leverages low- cost CRT H/W – Whole Screen is constantly updated •Disadvantages •Requires screen- sized memory array (frame buffer) •Discrete spatial sampling (pixels) •Moire patterns: when shadow- mask and dot- pitch frequencies mismatch •Convergence (varying angles of approach distance of e-beam across CRT face) •Limit on practical size (< 40 inches) •Spurious X- ray radiation •Occupies a large volume Color CRT • Requires precision geometry • Patterned phosphors on CRT face • Aligned metal shadow mask • Three electron guns • Less bright than monochrome CRTs Combining Colors Additive (RGB) Shining colored lights on a white ball Subtractive (CMYK) Mixing paint colors and illuminating with white light Additive and subtractive color system (r,g,b) RGB = (1,1,1) – (c,m,y)CMY Maping (r,g,b) = (x,y,z) 2.739 -1.145 -.424 -1.110 2.029 0.033 .138 -.333 1.105 Raster Displays • • • • Display synchronized with CRT sweep Special memory for screen update Pixels are the discrete elements displayed Generally, updates are visible Double Buffer • • • • Adds a second frame buffer Swaps during vertical blanking Updates are invisible Costly Color Depth = 1 is black and 0 is white Color Index scheme Color Index Example True Color True Color Example The RGB Cube The HSB or HSL scheme Primary Colors Secondary Colors Tertiary colors The SV Grid HSV Picker HSB Color Picker CMYK Color Picker Metamerism The same samples shown in Figure 6 as they appear under incandescent room lighting. The samples represented above appear identical under a D65 light source, which contains little light in the longer-wavelength end of the visible spectrum Dithering The process of approximating colors you don't have by mixing colors you do have. 100% of the pixels are a mixture 50% of the pixels are 100% red, of 50% red and 50% white 50% of the pixels are 100% white Color Model in OpenGL
© Copyright 2026 Paperzz