680 likes | 916 Views
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 ?.
E N D
MAE152Computer 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 ?
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.
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
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.
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
Undisplayable Colours • Suppose XYZ colour computed, but not displayable? • Terminology • Dominant wavelength • Saturation
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)
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 • 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 • Advantages • Allows solids to be displayed • Leverages low- cost CRT H/W • Whole Screen is constantly updated
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 lightson a white ball Subtractive (CMYK) Mixing paint colors andilluminating 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.110 .138-1.145 2.029 -.333-.424 0.033 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