Computer Graphics CC 416 Lecture 03 Color Display

  • Slides: 44
Download presentation
Computer Graphics CC 416 Lecture 03: Color Display & Color Models Dr. Manal Helal

Computer Graphics CC 416 Lecture 03: Color Display & Color Models Dr. Manal Helal – Fall 2014

The Physics of Color • It’s all electromagnetic (EM) radiation – Different colors correspond

The Physics of Color • It’s all electromagnetic (EM) radiation – Different colors correspond to radiation of different wavelengths – Intensity of each wavelength specified by amplitude • Frequency = 2 pi/wavelength • We perceive EM radiation with in the 400700 nm range, the tiny piece of spectrum between infra-red and ultraviolet

Visible Light

Visible Light

Color and Wavelength Most light we see is not just a single wavelength, but

Color and Wavelength Most light we see is not just a single wavelength, but a combination of many wavelengths like below. This profile is often referred to as a spectrum, or spectral power distribution.

The Eye

The Eye

Color is Human Sensation • Cone and rod receptors in the retina • Rod

Color is Human Sensation • Cone and rod receptors in the retina • Rod receptor is mostly for luminance perception • 3 different types of cone receptors in the fovea of retina, responsible for color representation. Each type is sensitive to different wavelengths

Cone Receptors • There are three types of cones, referred to as S, M,

Cone Receptors • There are three types of cones, referred to as S, M, and L. They are roughly equivalent to blue, green, and red sensors, respectively. • Their peak sensitivities are located at approximately 430 nm, 560 nm, and 610 nm for the "average" observer.

Limitation of Knowledge • We don’t know the precise light sensitivity on each person’s

Limitation of Knowledge • We don’t know the precise light sensitivity on each person’s retina.

So, what is the standard color? • The basis of comparison is not math!!

So, what is the standard color? • The basis of comparison is not math!! • The basis of comparison is human color matching experiments • 100% mathematically correct light object interaction need to be evaluated at more than 3 points in the spectrum

Main Color Spaces • • CIE XYZ, xy. Y RGB, CMYK HSV (Munsell, HSL,

Main Color Spaces • • CIE XYZ, xy. Y RGB, CMYK HSV (Munsell, HSL, IHS) Lab, UVW, YUV, YCr. Cb, Luv,

Differences in Color Spaces • What is the use? For display, editing, computation, compression,

Differences in Color Spaces • What is the use? For display, editing, computation, compression, …? • Several key (very often conflicting) features may be sought after: – Additive (RGB) or subtractive (CMYK) – Separation of luminance and chromaticity – Equal distance between colors are equally perceivable

CIE Standard • CIE: International Commission on Illumination (Comission Internationale de l’Eclairage). • Human

CIE Standard • CIE: International Commission on Illumination (Comission Internationale de l’Eclairage). • Human perception based standard (1931), established with color matching experiment • Standard observer: a composite of a group of 15 to 20 people

CIE Experiment

CIE Experiment

3 D LMS Colour Space The normalized spectral sensitivity of human cone cells of

3 D LMS Colour Space The normalized spectral sensitivity of human cone cells of short (S, 420 – 440 nm)-, middle (M, 530– 540 nm)- and long (L, 560– 580 nm)wavelength types, using three pure light source: R = 700 nm, G = 546 nm, B = 436 nm. Cλ = r(λ) + g(λ) + b(λ)

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 matching curves • Y: roughly corresponds to luminous efficiency characteristic of human eye • the XZ plane will contain all possible chromaticities at that luminance.

CIE xy. Y Space • Irregular 3 D volume shape is difficult to understand

CIE xy. Y Space • Irregular 3 D volume shape is difficult to understand • Chromaticity diagram (the same color of the varying intensity, Y, should all end up at the same point)

Color Gamut • The range of color representation of a display device

Color Gamut • The range of color representation of a display device

COLOR MODELS FOR RASTER GRAPHICS • The purpose of a color model is to

COLOR MODELS FOR RASTER GRAPHICS • The purpose of a color model is to allow convenient specification of colors within some color gamut. • Three hardware-oriented color models are RGB (CRT monitors), YIQ (broadcast TV color system), and CMY (color-printing devices) • To be related directly to intuitive color notions of hue, saturation, and brightness, another class of models (HSV, HSL, HVC, etc) are developed with ease of use as a goal Copyright @ 2001 by Jim X. Chen: jchen@cs. gmu. edu

RGB (monitors) • The de facto standard

RGB (monitors) • The de facto standard

The RGB Cube • RGB color space is perceptually non-linear • RGB space is

The RGB Cube • RGB color space is perceptually non-linear • RGB space is a subset of the colors human can perceive • Con: what is ‘bloody red’ in RGB?

CMY(K): printing • Cyan, Magenta, Yellow (Black) – CMY(K) • A subtractive color model

CMY(K): printing • Cyan, Magenta, Yellow (Black) – CMY(K) • A subtractive color model dye color absorbs reflects cyan red blue and green magenta green blue and red yellow blue red and green black all none

RGB and CMY • Converting between RGB and CMY

RGB and CMY • Converting between RGB and CMY

RGB and CMY

RGB and CMY

Additive vs. Subtractive Color Models • Since additive color models display color as a

Additive vs. Subtractive Color Models • Since additive color models display color as a result of light being transmitted (added) the total absence of light would be perceived as black. Subtractive color models display color as a result of light being absorbed (subtracted) by the printing inks. As more ink is added, less and less light is reflected. Where there is a total absence of ink the resulting light being reflected (from a white surface) would be perceived as white. 24

Additive vs. Subtractive Color Models 25

Additive vs. Subtractive Color Models 25

The YIQ color model (US color TV broadcasting) • A recording of RGB for

The YIQ color model (US color TV broadcasting) • A recording of RGB for transmission efficiency and for downward compatibility with black and white television. • Here Y=luminance, the same as the CIE Y primary. Only the Y component of a color TV signal is shown on blackand-white TVs. • I stands for in-phase, while Q stands for quadrature, referring to the components used in quadrature amplitude modulation. Some forms of NTSC now use the YUV color space, which is also used by other systems such as PAL. • More bits of bandwidth are used to represent Y than to represent I and Q, because our eye is more sensitive to changes in luminance

The YIQ color space at Y=0. 5 From RGB to YIQ From YIQ to

The YIQ color space at Y=0. 5 From RGB to YIQ From YIQ to RGB

HSV • This color model is based on polar coordinates, not Cartesian coordinates. •

HSV • This color model is based on polar coordinates, not Cartesian coordinates. • HSV is a non-linearly transformed (skewed) version of RGB cube – Hue: quantity that distinguishes color family, say red from yellow, green from blue – Saturation (Chroma): color intensity (strong to weak). Intensity of distinctive hue, or degree of color sensation from that of white or grey – Value (luminance): light color or dark color

RGB to HSV Conversion • Preliminaries: R' = R/255 Cmax = max(R', G', B’)

RGB to HSV Conversion • Preliminaries: R' = R/255 Cmax = max(R', G', B’) Δ = Cmax – Cmin • Hue calculation: • Saturation calculation: • Value calculation: V = Cmax G' = G/255 B' = B/255 Cmin = min(R', G', B')

Lab: photoshop • Photoshop uses this model to get more control over color •

Lab: photoshop • Photoshop uses this model to get more control over color • It’s named CIE Lab model (refined from the original CIE model • Liminance: L • Chrominance: a – ranges from green to red and b ranges from blue to yellow

Luv and UVW • A color model for which, a unit change in luminance

Luv and UVW • A color model for which, a unit change in luminance and chrominance are uniformly perceptible U = 13 W* (u - uo ); V = 13 W* (v - vo); W = 25 ( 100 Y ) 1/3 - 17 where Y , u and v can be calculated from : X = O. 607 Rn + 0. 174 Gn + 0. 200 Bn Y = 0. 299 Rn + 0. 587 Gn + 0. 114 Bn Z = 0. 066 Gn + 1. 116 Bn x=X/(X+Y+Z) y=Y/(X+Y+Z) z=Z/(X+Y+Z) u = 4 x / ( -2 x + 12 y + 3 ) v = 6 y / ( -2 x + 12 y + 3 ) • Luv is derived from UVW and Lab, with all components guaranteed to be positive

Yuv and YCr. Cb: digital video • Initially, for PAL analog video, it is

Yuv and YCr. Cb: digital video • Initially, for PAL analog video, it is now also used in CCIR 601 standard for digital video • Y (luminance) is the CIE Y primary. Y = 0. 299 R + 0. 587 G + 0. 114 B • Chrominance is defined as the difference between a color and a reference white at the same luminance. It can be represented by U and V -- the color differences. U = B – Y; V = R - Y • YCr. Cb is a scaled and shifted version of YUV and used in JPEG and MPEG (all components are positive) Cb = (B - Y) / 1. 772 + 0. 5; Cr = (R - Y) / 1. 402 + 0. 5

Examples (RGB, HSV, Luv)

Examples (RGB, HSV, Luv)

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

LCD Displays • Liquid Crystal Display • Organic molecules that remain in crystalline structure

LCD Displays • Liquid Crystal Display • Organic molecules that remain in crystalline structure without external force, but realigns themselves like liquid under external force • So LCDs realigns themselves to EM field and changes their own polarizations

Passive LCD • LCD slowly transit between states. • In scanned displays, with a

Passive LCD • LCD slowly transit between states. • In scanned displays, with a large number of pixels, the percentage of the time that LCDs are excited is very small. • Crystals spend most of their time in intermediate states, being neither "On" or "Off". • These displays are not very sharp and are prone to ghosting.

Active Matrix LCD • E field is retained by a capacitor so that the

Active Matrix LCD • E field is retained by a capacitor so that the crystal remains in a constant state. • Transistor switches are used to transfer charge into the capacitors during scanning. • The capacitors can hold the charge for significantly longer than the refresh period • Crisp display with no shadows. • More expensive to produce.

Plasma Display • Basically fluorescent tubes • High- voltage discharge excites gas mixture (He,

Plasma Display • Basically fluorescent tubes • High- voltage discharge excites gas mixture (He, Xe), upon relaxation UV light is emitted, UV light excites phosphors • Large view angle • Large format display • Less efficient than CRT, more power • Large pixels: 1 mm (0. 2 mm for CRT) • Phosphors depletion

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

Memory Rasterizer • Maintains a copy of the screen (or some part of it)

Memory Rasterizer • Maintains a copy of the screen (or some part of it) in memory • Relies on a fast copy • Updates are nearly invisible

True Color and Indexed Color FB

True Color and Indexed Color FB

High Color FB • Popular PC/( SVGA) standard (popular with Gamers) • Each pixel

High Color FB • Popular PC/( SVGA) standard (popular with Gamers) • Each pixel can be one of 2^15 colors • Can exhibit worse quantization (banding) effects than indexed- color