## Thursday, July 24, 2008

### Color

From my old note:

99.9 of digital image market is described by the following model:
Digital camera (acquisition) --> Digital computer (processing and storage) --> Digital printer (reproduction)

Two types of photo-sensitive cells in human eyes:
[-] Rods: Colorless, night vision
[-] Cones: color, bright light
Due to the sensitivity curves, it possible to fool the eye into seeing any color by mixing variable amounts of RED, GREEN and BLUE light.

The color triangle: A color is defined not by the amount of R, G or B, but by the proportion of R-to-G-to-B

In Chromaticity space, given the colors C1, C2 and C3 such that C3 is composed of a mixture of C1 and C2, then: C3 lies on the straight line segment defined by C1 and C2.

Gamut: set of achievable colors for a set of given stimulus. For R, G, and B strictly positive.

Standard RGB (CIE) defined:
B = 435.8nm
G = 546.1nm
R = 700nm
In this CIE-RGB color triangle, the problems are:
[-] Existence of negative R
[-] Different for R, G and B in order to obtain w= 1/3, 1/3, 1/3
[-] R, G and B do not relative directly to luminance.

What is Luminance? Brightness, Intensity of a color.

RGB-to-GRAY: L(c) = 0.176xR + 0.81xG + 0.011xB

CIE-XYZ system: Due to large bridge in R-Axis, CIE defined a new coordinate system: XYZ -- all colors have non-negative responses.

Properties of XYZ-System:
[-] Y-channel is the luminance of C
[-] XYZ always positive
[-] XYZ not perceptually linear color space

For perceptually linear color, CIE specified U, V coordinates:
U = 4X/(-2X+12Y+3), V=6Y/(-2x+12Y+3).
UVW-system: w = 1-U-V

L*U*V* System: Lightness (L*) , appearance of a color depends on:
[-] Luminance of surroundings
[-] Chromaticity of surroundings
[-] Lightness of samples

CIE-L*a*b*: a*= 500{...}, b*=200{...}
# (spring 03)

Other resources:

List of color spaces:
CIE-XYZ was one of the first attempts to produce a color space based on measurements of human color perception. Derivatives of the CIE XYZ space include CIELUV, CIEUVW, and CIELAB.
CIELUV space is especially useful for additive mixtures of lights, due to its linear addition properties.
CIELAB (or L*a*b* or Lab) is to produce a color space that is more perceptually linear than other color spaces. Perceptually linear means that a change of the same amount in a color value should produce a change of about the same visual importance.

RGB is not a color space, it is a color model. sRGB color space, or standard RGB (Red Green Blue).

YUV stores a luminance value with two chrominance values (color information). YPbPr is a scaled version of YUV. It is most commonly seen in its digital form, YCbCr, used widely in video and image compression schemes such as MPEG and JPEG.

HSV(hue, saturation, value), also known as HSB (hue, saturation, brightness), HSI (intensity).

CMYK (cyan, magenta, yello, and key(black)) is used in the printing process, because it describes what kind of inks need to be applied so the light reflected from the substrate and through the inks produces a given color

The followings are from book 'digital image processing' 3rd ed.

Cones are the sensors in the eye responsible for color vision. Cones in human eye can be divided into three principal sensing categories, corresponding roughly to red, green, and blue.

The characteristics generally used to distinguish one color from another are brightness, hue, and saturation. Brightness embodies the achromatic notion of intensity. Hue is an attribute associated with the dominant wavelength in a mixture of light waves. Thus, when we call an object red, orange, or yellow, we are referring to its hue. Saturation refers to the relative purity or the amount of white light mixed with a hue. The pure spectrum colors are fully saturated. Colors such as pink(red+white) is less saturated, with the degree of saturation being inversely proportional to the amount of white light added. Hue and saturation taken together are called chromaticity, therefor, a color may be characterized by its brightness and chromaticity.

[updated]
The corresponding perceptual terms:
Luminance -- Brightness
Hue -- Color
Saturation -- Purity

A pure spectral color has a saturation of 100 percent, while the saturation of white or gray light is zero.

X = \int _{380}^{780} L(t)x'(t) dt
Y = \int _{380}^{780} L(t)y'(t) dt
Z = \int _{380}^{780} L(t)z'(t) dt
where L(t) is the spectral energy density, and x', y' z' are the color-matching functions.
X = X/X+Y+Z
Y = Y/X+Y+Z
X+Y+Z = 1;

The CIE Chromaticity Diagram (horseshoe shape)

• All visible colors are located within the area bounded by the spectral curve and the line.
• Every color whose coordinates lie on a line joining a point at the white center of the diagram to the outer spectral curve have the same hue.
• The dominant wavelength for the color is determined by the point at which the line intersects the spectral curve.
• Its saturation is indicated on its location along this line, ranging from zero at the center to 100 percent at the spectral curve.
• The coordinates of a primary set are located at the corners of a triangle. for example, typical CRT gamut. At each point, the brightest possible RGB color of that chromaticity is displayed. (Primary colors: hue and saturation of most colors can be duplicated by combining three primary colors)

[updated:9/23/08]

CIE chromaticity diagram shows color composition as a function of x(red) and y (green), the corresponding value z (blue) is obtained from x+y+z = 1. Color gamut is he triangle shows a typical range of colors produced by RGB monitor.

[ C; M; Y ] = [ 1; 1; 1 ] - [ R; G; B ]