MAE 152 Computer Graphics for Scientists and Engineers

  • Slides: 65
Download presentation
MAE 152 Computer Graphics for Scientists and Engineers Colors In Computer Graphics

MAE 152 Computer Graphics for Scientists and Engineers Colors In Computer Graphics

How much red was she with anger ? ! • • • gl. Color

How much red was she with anger ? ! • • • gl. Color 3 d (1. 0, 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”

Why “color management”

Source, Object, Observer

Source, Object, Observer

Reflected light = color of object

Reflected light = color of object

The Eye

The Eye

Rods and Cones • Rods: sensitive to color intensity (black and white sensitivity in

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,

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 mo

CIE Color Matching Experiment Basis for industrial color standards and “pointwise” color mo

Color Matching Experiment Image courtesy Bill Freeman

Color Matching Experiment Image courtesy Bill Freeman

CIE Experiment Result • Three pure light source: R = 700. 0 nm, G

CIE Experiment Result • Three pure light source: R = 700. 0 nm, G = 546. 1 nm, B = 435. 8 nm.

Color Matching Experiment

Color Matching Experiment

CIE Color Space • 3 hypothetical light sources, X, Y, and Z, which yield

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

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

Principle of Tri-chromaticity

Grassman’s Laws

Grassman’s Laws

Color Spaces • Use color matching functions to define a coordinate system for color.

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.

3 D Tri-chromatic Space

3 D Tri-chromatic Space

CIE Chart A qualitative rendering of the CIE (x, y) space. The blobby region

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

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

Some Colour Gamuts

Undisplayable Colours • Suppose XYZ colour computed, but not displayable? • Terminology – Dominant

Undisplayable Colours • Suppose XYZ colour computed, but not displayable? • Terminology – Dominant wavelength – Saturation

A Maxwell Triangle, with white in the centre

A Maxwell Triangle, with white in the centre

Maxwell Triangle, showing where the spectral cyan matches

Maxwell Triangle, showing where the spectral cyan matches

The spectral locus and the resulting RGB colour matching functions

The spectral locus and the resulting RGB colour matching functions

The CIE tristimulus values and there relation to the spectral locus.

The CIE tristimulus values and there relation to the spectral locus.

Colour might not be displayable • Falls outside of the triangle (its chromaticity not

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

RGB Cube Mapped to XYZ Space

Market for Display Technologies

Market for Display Technologies

Cathode Ray Tube

Cathode Ray Tube

Color Shadow Mask CRT

Color Shadow Mask CRT

Color CRT Phosphor Pattern Versus Spot Size

Color CRT Phosphor Pattern Versus Spot Size

Raster Display • TV boom made it cheap • Entire screen painted 30 times/

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 –

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

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

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) –

Additive and subtractive color system (r, g, b) RGB = (1, 1, 1) – (c, m, y)CMY

Maping (r, g, b) = 2. 739 -1. 145 -. 424 -1. 110 2.

Maping (r, g, b) = 2. 739 -1. 145 -. 424 -1. 110 2. 029 0. 033 (x, y, z). 138 -. 333 1. 105

Raster Displays • • Display synchronized with CRT sweep Special memory for screen update

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

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 Depth = 1 is black and 0 is white

Color Index scheme

Color Index scheme

Color Index Example

Color Index Example

True Color

True Color

True Color Example

True Color Example

The RGB Cube

The RGB Cube

The HSB or HSL scheme Primary Colors

The HSB or HSL scheme Primary Colors

Secondary Colors

Secondary Colors

Tertiary colors

Tertiary colors

The SV Grid

The SV Grid

HSV Picker

HSV Picker

HSB Color Picker

HSB Color Picker

CMYK Color Picker

CMYK Color Picker

Metamerism The samples shown in Figure 6 as they appear under incandescent room lighting.

Metamerism The samples shown in Figure 6 as they appear under incandescent room lighting. The samples represented above appear identical under a D 65 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

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 Open. GL

Color Model in Open. GL