Académique Documents
Professionnel Documents
Culture Documents
Outline
n n n n n n n n
Intuitive Color Concepts RGB , YIQ , CMY , and HSV Color Models Conversion Between HSV and RGB Models HLS Color Model Color Selection and Applications Summary
2
Introduction
n
A method for explaining the properties or behavior of color within some context No single model can explain all aspects of color RGB, YIQ, CMY, HSV, and HSL Different output devices, video monitor, printer, plotter, and so on
Properties of Light
n
Electromagnetic Spectrum
n n
Microwaves
Ultraviolet
AM Radio
Infrared
Visible
X-rays
Frequency (Hertz) 5
Hue
n n
A dominant frequency of the light The combination of frequencies present in the reflected light determines the color of the object
Reflected Light WKTai/GAME Lab/CSIE/NDHU Color Models and Color Applications WKTai/GAME 6
Hue (Cont.)
n
Example
n n
White light source, see Fig. 15-3 Lower frequencies are predominant in the reflected light, red object, see Fig. 15-4 Energy ED EW Frequency
Energy
Violet
Brightness
n
Intensity
n
Is the radiant energy emitted per unit time, per unit solid angle, and per unit projected area of the source
Purity or Saturation
n n
How "pure" the color of the light appears Hue = ED Brightness = the area under the curve Saturation = ED - EW ED EW Frequency
Illustration
n n n
Dominant Frequency
Violet Fig. 15-4 WKTai/GAME Lab/CSIE/NDHU Color Models and Color Applications WKTai/GAME
Color Matching
n
Some different-color light sources with suitably chosen intensities can be used to produce a range of other colors approximately Color gamut
n
Color model use three colors to obtain a wide range of colors The two or three colors used to produce other colors in a color model Color A + Color B = White Color
10
Primary colors
n
Complementary color
n
The color matching , see Fig. 12-6 The RGB color matching function, see Fig. 12-5
n
test light
Fig. 15-5 WKTai/GAME Lab/CSIE/NDHU Color Models and Color Applications WKTai/GAME 11
Standard Primaries
n n
Since no finite set of color light sources can be combined to obtain all possible colors Three standard primaries
n
Defined mathematically with positive color matching function , see Fig. 12-6, in 1931 by CIE (International Commission on Illumination) Imaginary colors
X, Y, and Z designate the amounts of the standard primaries x= X/(X+Y+Z), y= Y/(X+Y+Z), z= Z/(X+Y+Z) x+y+z= 1 Any color can be represented with just x and y Depends only on hue and purity(saturation)
13
According to chromaticity values (x, y), we have the tongue-shaped curve, see Fig. 12-7
n n n
Points along the curve are the "pure" colors Interior points represent all possible visible color combinations Point C is the white light position
n
average daylight
Colors with different illuminance but the same chromaticity map to the same point Comparing color gamuts for different sets of primaries Identifying complimentary colors Determining dominant wavelength and the purity of a given color 14
480 400(violet) x Fig. 12-7 WKTai/GAME Lab/CSIE/NDHU Color Models and Color Applications WKTai/GAME 15
Color Gamut
n Straight
n
line
All colors along the line(C1, C2) can be obtained by C12= C1 + C2, +=1 C3, C4, and C5 can only generate colors inside or on the bounding edges of the triangle
C1 C3
C2 C4
n Polygons
n
C5 x Fig. 12-8 16
Complimentary Color
n
C= C1 + C2
C1
C2
Fig. 12-9 WKTai/GAME Lab/CSIE/NDHU Color Models and Color Applications WKTai/GAME
x 17
Dominant wavelength of C1 is Cs
n
The half line (C, C1) intersects the spectral curve at points, Cs The ratio of Distance(C, C1 )/Distance(C , Cs) y C1 C C2 Cs
Purity of C1
n
x Fig. 12-10 WKTai/GAME Lab/CSIE/NDHU Color Models and Color Applications WKTai/GAME
18
Creating a color
n
Pick up a dominant color(pure color) and mixing color pigments with white and/or black
n n n
Color palette
n
19
Principles
n n
Based on the tristimulus theory of vision The retina has peak sensitivities at 630nm(red), 530nm(green), and 450nm(blue) Used for displaying color on a video monitor C() = RR + GG + BB An additive model, see Fig. 12-11 and 12-12 See Fig. 12-13 and Table 12-1
20
n n
Application
n
10
Fig. 12-11 The RGB color model, defining colors with an additive process within the unit cube
Gray Scale G Green(0, 1, 0) Cyan(0, 1, 1) Black(0, 0, 0) Yellow(1, 1, 0)
White(1, 1, 1) Red(1, 0, 0) R
Blue(0, 0, 1) B
Magenta (1, 0, 1)
21
x CIE Model Approx. Color Monitor Value (0.735, 0.265) (0.628, 0.346) (0.274, 0.717) (0.268, 0.588) (0.167, 0.009) (0.150, 0.070)
Table 12-1, RGB (x, y) chromacity coordinates WKTai/GAME Lab/CSIE/NDHU Color Models and Color Applications WKTai/GAME 22
11
Application
n
Representation
n
Y= 0.299R+0.587G+0.114B I= R- Y Q= B- Y
n n
23
Application
n
Useful for describing color output to hard-copy devices Gray Scale a subtractive process (reflected light) M (Cyan, Magenta, Yellow) grays: equal amounts of CMY Magenta black: extra ink Red Black White Cyan C Green 24
Representation
n n n n
Blue
C 1 R M = 1 G Y 1 B
Yellow Y
12
Representation
n n
Hue(H), Saturation(S), and Value(V) An intuitive color description by selecting a spectral color, and the amount of white and black added to obtain different shades, tints, and tones See Fig. 12-16 and -15 Saturation -> horizontal axis Value -> vertical axis Adding black decreases V while S in held constant Adding white decreases S while keeping V constant Adding B/W decreases both S and V
25
B RGB color cube Green Cyan Blue Magenta Color hexagon Black Yellow V White
Red
Shades
S 26
13
128 different hues, 130 different tints, and 23 shades are discernible with yellow color and about 16 different shades at end of blue
128 hues, 8 saturation levels, and 15 value setting i.e., 14 bits per pixel
27
14
procedure hsvTo Rgb(real h, real s, real v) assumes h, s, and v to be in range [0, 1] Returns r, g, b in range [0, 1] begin if (s== 0){ // must be grayscale red= v; green= v; blue= v; } else { if (h==1.0) h= 0.0; h= h* 6.0; i= ffloor(h); f= h - i; a= v* (1-s); b= v*(1-(s*f)); c= v*(1-(s*(1-f))); case i of 0: red= v; green= c; blue= a; 1: red= b; green= v; blue= a; 2: red= a; green= v; blue= c; 3: red= a; green= b; blue= v; 4: red= c; green= a; blue= v; 5: red= v; green= a; blue= b; } end;
30
15
L(lightness)
L= 1 (White)
Representation
n n
Select color from a small subspace of a color model Avoid displaying adjacent colors that differ widely in dominant frequency Limit display to a color formed with tints and shades, rather than with pure hues
32
16
Summary
n
Dominant frequency(Hue), luminance(Brightness), and purity(Saturation) CIE XYZ -> hypothetical colors as the standard for defining all color combination
n
n n n n
RGB -> video monitor CMY -> hardcopy devices YIQ -> television signal HSV and HLS -> Intuitive color models
17