Скачать презентацию Introduction to Color Spaces Author Chik-Yau Foo E-mail Скачать презентацию Introduction to Color Spaces Author Chik-Yau Foo E-mail

4ba8d24f29cf3388e161063a0017fe75.ppt

  • Количество слайдов: 108

Introduction to Color Spaces Author: Chik-Yau Foo E-mail: r 89922082@ms 89. ntu. edu. tw Introduction to Color Spaces Author: Chik-Yau Foo E-mail: r 89922082@ms 89. ntu. edu. tw Mobile phone: 0920 -767 -580 v 030305 Presenter: Wei-Cheng Lin E-mail: r 97944028@ntu. edu. tw Mobile Phone: 0912 -808 -362 1

106 109 1012 Long-wave radio 103 Short-wave radio Microwave TV 100 Wavelength (m) v 106 109 1012 Long-wave radio 103 Short-wave radio Microwave TV 100 Wavelength (m) v Only a small part of the EM* spectrum is visible to us. v This part is known as the visible spectrum. v Wavelength in the region of 380 nm to 750 nm. Frequency (Hz) The EM Spectrum 10 -3 Infrared 1015 1018 Visible spectrum Ultraviolet X-rays Gamma rays 1021 *Electro-Magnetic 10 -6 10 -9 10 -12 Cosmic rays 2

Light and the Human Eye v When we focus on an image, light from Light and the Human Eye v When we focus on an image, light from the image enters the eye through the cornea and the pupil. v The light is focused by the lens onto the retina. Fovea Lens Retina Pupil Cornea Optic nerve Iris 3

Rods and Cones v When light reaches the retina, one of two kinds of Rods and Cones v When light reaches the retina, one of two kinds of light sensitive cells are activated. v These cells, called rods and cones, translate the image into electrical signals. Rod Cone Retina light v The electrical signals are transmitted through the optical nerve, and to the brain, where we will perceive the image. 4

Rods: Twilight Vision v 130 million rod cells per eye. v Most to green Rods: Twilight Vision v 130 million rod cells per eye. v Most to green light (about 550 -555 nm), but with a broad range of response throughout the visible spectrum. v Produces relatively blurred images, and in shades of gray. Relative response v 1000 times more sensitive to light than cone cells. 1. 00 0. 75 0. 50 0. 25 0. 00 400 500 600 Wavelength (nm) 700 Relative neural response of rods as a function of light wavelength. v Pure rod vision is also called twilight vision. 5

Cones: Color Vision v 7 million cone cells per eye. v S : 430 Cones: Color Vision v 7 million cone cells per eye. v S : 430 nm (blue) (2%) v M: 535 nm (green) (33%) v L : 590 nm (red) (65%) v Produces sharp, color images. v Pure cone vision is called photopic or color vision. *S = Short wavelength cone M = Medium wavelength cone L = Long wavelength cone S Relative absorbtion v Three types of cones* (S, M, L), each "tuned" to different maximum responses at: - 1. 00 M L 0. 75 0. 50 0. 25 0. 00 400 500 600 Wavelength (nm) 700 Spectral absorption of light by the three cone types 6

Photopic vs Twilight Vision v There about 20 x more rods than cones in Photopic vs Twilight Vision v There about 20 x more rods than cones in the eyes, but rod vision is poorer than cone vision. Rod vision Cone vision v This is because rods are distributed all over the retina, while cones are concentrated in the fovea. Rod vision Cone vision 130 million rods 7 million cones 7

Eye Color Sensitivity 1. 00 Relative sensitivity Relative absorbtion v Although cone response is Eye Color Sensitivity 1. 00 Relative sensitivity Relative absorbtion v Although cone response is similar for the L, M, and S cones, the number of the different types of cones vary. v L: M: S = 40: 20: 1 v Cone responses typically overlap for any given stimulus, especially for the M-L cones. v The human eye is most sensitive to green light. 0. 75 0. 1 S M M L L S 0. 50 0. 01 0. 25 0. 001 0. 0001400 500 600 Wavelength (nm) 700 Spectral absorption of light by Effective sensitivity of cones the three cone types (log plot) S, M, and L cone distribution in the fovea 8

Theory of Trichromatic Vision v The principle that the color you see depends on Theory of Trichromatic Vision v The principle that the color you see depends on signals from the three types of cones (L, M, S). v The principle that visible color can be mapped in terms of the three colors (R, G, B) is called trichromacy. v The three numbers used to represent the different intensities of red, green, and blue needed are called tristimulus values. = r g b Tristimulus values 9

Seeing Colors v The colors we perceive depends on: - Illumination source x v. Seeing Colors v The colors we perceive depends on: - Illumination source x v. Illumination source Object reflectance factor v. Object reflectance x v. Observer response v The product of these three factors will produce the sensation of color. Observer spectral sensitivity = r g Tristimulus values (Viewer response) b Observer response 10

Additive Colors v Start with Black – absence of any colors. The more colors Additive Colors v Start with Black – absence of any colors. The more colors added, the brighter it gets. v Color formation by the addition of Red, Green, and Blue, the three primary colors v Examples of additive color usage: v Human eye v Lighting v Color monitors v Color video cameras Additive color wheel 11

Subtractive Colors v Starts with a white background (usually paper). v Use Cyan, Magenta, Subtractive Colors v Starts with a white background (usually paper). v Use Cyan, Magenta, and/or Yellow dyes to subtract from light reflected by paper, to produce all colors. v Examples of Subtractive color use: v Color printers v Paints Subtractive color wheel 12

Using Subtractive Colors on Film v Color absorbing pigments are layered on each other. Using Subtractive Colors on Film v Color absorbing pigments are layered on each other. v As white light passes through each layer, different wavelengths are absorbed. v The resulting color is produced by subtracting unwanted colors from white. W M B C K G R Y White light Green Pigment layers Red Blue Yellow Magenta Cyan White Magenta Yellow Reflecting layer (white paper) Cyan Black 13

Color Matching Experiment 1. Observer views a split screen of pure white (100% reflectance). Color Matching Experiment 1. Observer views a split screen of pure white (100% reflectance). 2. On one half, a test lamp casts a pure spectral color on the screen. 3. On the other, three lamps emitting variable amounts of red, green, and blue light are adjusted to match the color of the test light. 4. The amounts of red, green and blue light used to match the pure colors were recorded when an identical match was obtained. 5. The RGB tristimulus values for each distinct color was obtained this way. Color matching experimental setup Test Light Primary Mixture Tristimulus values 14

Metamerism v Spectrally different lights that simulate cones identically appear identical. v This phenomena Metamerism v Spectrally different lights that simulate cones identically appear identical. v This phenomena is called metamerism. v Almost all the colors that we see on computer monitors are metamers. 9 Relative power v Such colors are called color metamers. 0 380 480 580 680 Wavelength (nm) 780 The dashed line represents daylight reflected from sunflower, while the solid line represents the light emitted from the color monitor adjusted to match the color of the sunflower. 15

v Under trichromacy, any color stimulus can be matched by a mixture of three v Under trichromacy, any color stimulus can be matched by a mixture of three primary stimuli. Relative power The Mechanics of Metamerism 9 0 380 Relative power v Metamers are colors having the same tristimulus values R, G, and B; they will match color stimulus C and will appear to be the same color. 480 580 680 780 Wavelength (nm) 9 Relative power 0 380 480 580 680 780 Wavelength (nm) 9 0 380 480 580 680 780 Wavelength (nm) The two metamers look the same because they have similar tristimulus values. 16

Human vision gamut Gamut v A gamut is the range of colors that a Human vision gamut Gamut v A gamut is the range of colors that a device can render, or detect. Photographic film gamut 0. 8 0. 6 v The larger the gamut, the more colors can be rendered or detected. v A large gamut implies a large color space. y 0. 4 0. 2 Monitor gamut 0 0 0. 2 0. 4 x 0. 6 0. 8 17

Color Spaces v A Color Space is a method by which colors are specified, Color Spaces v A Color Space is a method by which colors are specified, created, and visualized. v Colors are usually specified by using three attributes, or coordinates, which represent its position within a specific color space. v These coordinates do not tell us what the color looks like, only where it is located within a particular color space. v Color models are 3 D coordinate systems, and a subspace within that system, where each color is represented by a single point. 18

Color Spaces v Color Spaces are often geared towards specific applications or hardware. v Color Spaces v Color Spaces are often geared towards specific applications or hardware. v Several types: v. HSI (Hue, Saturation, Intensity) based v. RGB (Red, Green, Blue) based v. CMY(K) (Cyan, Magenta, Yellow, Black) based v. CIE based v. Luminance - Chrominance based CIE: International Commission on Illumination 19

RGB* v One of the simplest color models. Cartesian coordinates for each color; an RGB* v One of the simplest color models. Cartesian coordinates for each color; an axis is each assigned to the three primary colors red (R), green (G), and blue (B). Magenta (1, 0, 1) White (1, 1, 1) Green (0, 1, 0) Black (0, 0, 0) v Corresponds to the principles of additive colors. v Other colors are represented as an additive mix of R, G, and B. Cyan (0, 1, 1) Blue (0, 0, 1) Red (1, 0, 0) Yellow (1, 1, 0) RGB Color Space v Ideal for use in computers. *Red, Green, and Blue 20

RGB Image Data Full Color Image Red Channel Green Channel Blue Channel 21 RGB Image Data Full Color Image Red Channel Green Channel Blue Channel 21

CMY(K)* v Main color model used in the printing industry. Related to RGB. White CMY(K)* v Main color model used in the printing industry. Related to RGB. White v Corresponds to the principle of subtractive colors, using the three secondary colors Cyan, Magenta, and Yellow. Magenta Red Blue Black v Theoretically, a uniform mix of cyan, magenta, and yellow produces black (center of picture). In practice, the result is usually a dirty brown-gray tone. So black is often used as a fourth color. *Cyan, Magenta, Yellow, (and blac. K) Cyan Green Yellow Producing other colors from subtractive colors. 22

CMY Image Data Full Color Image Cyan Image (1 -R) Magenta Image (1 -G) CMY Image Data Full Color Image Cyan Image (1 -R) Magenta Image (1 -G) Yellow Image (1 -B) 23

CMY – RBG Transformation v The following matrices will perform transformations between RGB and CMY – RBG Transformation v The following matrices will perform transformations between RGB and CMY color spaces. v Note that: v R = Red v G = Green v B = Blue v C = Cyan v M = Magenta v Y = Yellow v All values for R, G, B and C, M, Y must first be normalized. 24

CMY – CMYK Transformations v The following matrices will perform transformations between CMY and CMY – CMYK Transformations v The following matrices will perform transformations between CMY and CMYK color spaces. v Note that: v C = Cyan v M = Magenta v Y = Yellow v K = blac. K v All values for R, G, B and C, M, Y, K must first be normalized. 25

RGB – CMYK Transformations v The following matrices perform transformations between RGB and CMYK RGB – CMYK Transformations v The following matrices perform transformations between RGB and CMYK color spaces. v Note that: v R = Red v G = Green v B = Blue v C = Cyan v M = Magenta v Y = Yellow v All values for R, G, B and C, M, Y must first be normalized. 26

RGB – Gray Scale Transformations v The luminancy component, Y, of each color is RGB – Gray Scale Transformations v The luminancy component, Y, of each color is summed to create the gray scale value. v ITU-R Rec. 601 -1* Gray scale: Y = 0. 299 R + 0. 587 G + 0. 114 B v ITU-R Rec. 709 D 65 Gray scale Y = 0. 2126 R + 0. 7152 G + 0. 0722 B v ITU standard D 65 Gray scale (Very close to Rec 709!) Y = 0. 222 R + 0. 707 G + 0. 071 B *601 -1: Based on an old television (NTSC: National Television System Committee) standard 709 : Based on High Definition TV colorimetry (Contemporary CRT phosphors) ITU : International Telecommunication Union 27

RGB and CMYK Deficiencies v RGB and CMY color models 0. 8 Photographic limited RGB and CMYK Deficiencies v RGB and CMY color models 0. 8 Photographic limited to brightest available film gamut primaries (R, G, and B) and 6 color secondaries (CYM). CMY printer 0. 6 v Not intuitive. We think of light in gamut terms of color, intensity of color, y and brightness. 0. 4 v Colors changed by changing R, G, B ratios. v Brightness changed by 0. 2 changing R, G, and B, while maintaining their ratios. Monitor RGB gamut v Intensity changed by 0 0 0. 2 0. 4 0. 6 0. 8 projecting RGB vector toward x largest valued primary color (R, G, or B). Hexachrome: Cyan, Magenta, Yellow, Black, Orange, Green 28

HSI / HSL / HSV* v Very similar to the way human visions see HSI / HSL / HSV* v Very similar to the way human visions see color. v Works well for natural illumination, where hue changes with brightness. v Used in machine color vision to identify the color of different objects. v Image processing applications like histogram operations, intensity transformations, and convolutions operate on only an image's intensity and are performed much easier on an image in the HSI color space. *H=Hue, S = Saturation, I (Intensity) = B (Brightness), L = Lightness, V = Value 29

HSI Color Space Blue 240º v Hue v What we describe as the color HSI Color Space Blue 240º v Hue v What we describe as the color of the object. v Hues based on RGB color space. Red 0º v The hue of a color is defined by its counterclockwise angle from Red (0°); e. g. Green = 120 °, Blue = 240 °. v Saturation v Degree to which hue differs from neutral gray. v 100% = Fully saturated, high contrast between other colors. v 0% = Shade of gray, low contrast. v Measured radially from intensity axis. Green 120º RGB Color Space RGB cube viewed from gray-scale axis, and HSI Color Wheel RGB cube viewed from rotated 30° gray-scale axis 0% Saturation 100% 30

HSI Color Space v Intensity 100% v Brightness of each Hue, defined by its HSI Color Space v Intensity 100% v Brightness of each Hue, defined by its height along the vertical axis. v Max saturation at 50% Intensity. v As Intensity increases or decreases from 50%, Saturation decreases. v Mimics the eye response in nature; As things become brighter they look more pastel until they become washed out. Hue v Pure white at 100% Intensity. Hue and Saturation undefined. v Pure black at 0% Intensity. Hue and Saturation undefined. 100% 0% Saturation 0% 31

HSI Image Data Full Image Hue Channel Saturation Channel Intensity Channel 32 HSI Image Data Full Image Hue Channel Saturation Channel Intensity Channel 32

HSI - RGB v For a given RGB color of (R, G, B), the HSI - RGB v For a given RGB color of (R, G, B), the same color in the HSI Model is C(x, y) = (H, S, I), where v Hue v where v Saturation v Intensity 33

RGB to HSI Example Blue (0, 0, 255) v Consider the RGB color defined RGB to HSI Example Blue (0, 0, 255) v Consider the RGB color defined by (215, 97, 198) R = 215, G = 97, B = 198 Green (0, 255, 0) Red (255, 0, 0) Red 0º Therefore, HSI coordinates = (308. 64°, 0. 843, 0. 67) Blue 240º Green 120º 34

HSI to RBG v Dependent on which sector H lies in. For 240º H HSI to RBG v Dependent on which sector H lies in. For 240º H 360 º Blue 240º Red 0º Green 120º For 0º H 120 º For 120º H 240 º 35

HSV Color Space v Hue and Saturation similar to that of HSI color model. HSV Color Space v Hue and Saturation similar to that of HSI color model. 100% Value v V: Value; defined as the height along the central vertical axis. v Like Intensity in HSI, color intensity increases as Value increases. Hue 0% 100% HSV: Hue, Saturation, and Value Saturation 0% 36

HSV Color Space v Hue and Saturation similar to that of HSI color model. HSV Color Space v Hue and Saturation similar to that of HSI color model. v V: Value; defined as the height along the central vertical axis. Value Intensity Smax at V 100 v Like Intensity in HSI, color intensity increases as Value increases. Smax at I 50 v As Value increases, hues become more saturated. Hues do not progress through the pastels to white, just as fluorescent images never change colors even though its intensity may increase. HSV is good for working with fluorescent colors. HSV: Hue, Saturation, and Value 37

Intensity Operations in HSI v To change the individual color of any region in Intensity Operations in HSI v To change the individual color of any region in the RGB image, change the value of the corresponding region in the Hue image. v Then convert the new H image with the original S and I images to get the transformed RGB image. v Saturation and Intensity components can likewise be manipulated. Original Image Hue Saturation Intensity 38

Disadvantages of HSI Color Model There are many disadvantages to the HS color model. Disadvantages of HSI Color Model There are many disadvantages to the HS color model. For example: v Cannot perform addition of colors expressed in polar coordinates. Transformations are very difficult because Hue is expressed as an angle. v For color machine vision, the hues of low-saturation may be difficult to determine accurately. Systems which must be able to differentiate all colors, saturated and unsaturated, will have significant problems using the HSI representation. v When saturation is zero, hue is undefined. v Transforming between HSI and RGB is complicated. 39

1931 CIE* Standard Observer (r, g, b) v The following color matching functions were 1931 CIE* Standard Observer (r, g, b) v The following color matching functions were obtained. 0. 4 0. 3 r v There were problems with the r, g, b color matching functions. v Negative values meant that the color had to be added to the test light before the two halves could be balanced. *Commission Internationale de L’Éclairage Tristimulus values b g 0. 2 0. 1 0. 0 -0. 1 380 480 580 Wavelength (nm) 680 780 Color-matching functions for 1931 Standard Observer, the average of 17 color-normal observers having matched each wavelength of the equal energy spectrum with primaries of 435. 8 nm, 546. 1 nm, and 700 nm, on a bipartite 2° field, surrounded by darkness. 40

1931 CIE Standard Observer (x, y, z) v Special properties of X, Y, Z: 1931 CIE Standard Observer (x, y, z) v Special properties of X, Y, Z: - 2. 0 z Tristimulus values v CIE adopted another set of primary stimuli, designated as X, Y, and Z. v Imaginary (non-physical) primary. v All luminance information is contributed by Y. v Linearly related to R, G, B. v Non-negative values for all tristimulus values. 1. 5 y 1. 0 x 0. 5 0. 0 380 480 580 Wavelength (nm) 680 780 1931 standard observer (2° observer). 41

CIE 1931 xy Chromaticity Diagram v 2 D projection of 3 D CIE XYZ CIE 1931 xy Chromaticity Diagram v 2 D projection of 3 D CIE XYZ color space onto X+Y+Z=1 plane. v x and y calculated as follows: - v The chromaticity of a color is determined by (x, y). 42

CIE 1931 xy Chromaticity Diagram v For color C, where C 0. 5 X CIE 1931 xy Chromaticity Diagram v For color C, where C 0. 5 X + 0. 4 Y + 0. 1 Z (0. 5, 0. 4) v Color C is represented as (0. 5, 0. 4) on the Chromaticity diagram. 43

CIE 1931 xy. Y Chromaticity Diagram v Each point on xy corresponds to many CIE 1931 xy. Y Chromaticity Diagram v Each point on xy corresponds to many points in the original 3 D CIE XYZ space. v Color is usually described by xy. Y coordinates, where Y is the luminance, or lightness component of color. v Y starts at 0 from the white spot (D 65) on the xy plane, and extends perpendicularly to 100. v As the Y increases, the colors become lighter, and the range of colors, or gamut, decreases. 44

CIE XYZD 65 to s. RGB* v The following transformations allow transformations between CIE CIE XYZD 65 to s. RGB* v The following transformations allow transformations between CIE XYZD 65 and the s. RGB color models. *s. RGB = Standard RGB, the standard for Internet use. 45

CIE XYZ Rec. 609 -1 - RGB v The following are the transformations needed CIE XYZ Rec. 609 -1 - RGB v The following are the transformations needed to convert between CIE XYZRec. 609 -1 and RGB. 46

CIE XYZ - RGBRec. 709 v Use the following matrices to transform between CIE CIE XYZ - RGBRec. 709 v Use the following matrices to transform between CIE XYZ and Rec. 709 RGB (with its D 65 white). 47

XYZ D 65 - XYZ D 50 Transformations v If the illuminant is changed XYZ D 65 - XYZ D 50 Transformations v If the illuminant is changed from D 50 to D 65, the observed color will also change. v The following matrices enable transformations between XYZD 65 and XYZD 50. 48

Inadequacies in the 1931 xy Chromaticity Diagram v Each line in the diagram represents Inadequacies in the 1931 xy Chromaticity Diagram v Each line in the diagram represents a color difference of equal proportion. v The lines vary in length, sometimes greatly, depending on what part of the diagram they're in. v The differences in line length indicates the amount of distortion between parts of the diagram. 49

CIE 1960 u, v Chromaticity Diagram v To correct for the deformities in the CIE 1960 u, v Chromaticity Diagram v To correct for the deformities in the 1931 xy diagram, a number of uniform chromaticity scale (UCS) diagrams were proposed. v The following formula transforms the XYZ values or x, y coordinates to a set of u, v values, which present a visually more accurate 2 D model. 50

CIE 1976 u', v' Chromaticity Diagram v But the 1960 uv diagram was still CIE 1976 u', v' Chromaticity Diagram v But the 1960 uv diagram was still unsatisfactory. v In 1975, CIE modified the u, v diagram and by supplying new (u', v') values. This was done by multiplying the v values by 1. 5. Thus in the new diagram u' = u and v' = 1. 5 v. v The following formulas allow transformation between u’v’ and xy coordinates. 51

CIE 1976 u', v' Chromaticity Diagram v Each line in the diagram represents a CIE 1976 u', v' Chromaticity Diagram v Each line in the diagram represents a color difference of equal proportion. v While the representation is not perfect (it can never be), the u', v' diagram offers a much better visual uniformity than the xy diagram. 52

CIE L*u*v* Color Space/ CIELUV v Replaces uniform lightness scale Y with L*, an CIE L*u*v* Color Space/ CIELUV v Replaces uniform lightness scale Y with L*, an visually linear scale. v Equations are as follows: - where un’ and vn’ refer the reference white light or light source. 53

CIE L*a*b* Color Space / CIELAB v Second of two systems adopted by CIE CIE L*a*b* Color Space / CIELAB v Second of two systems adopted by CIE in 1976 as models that better showed uniform color spacing in their values. v Based on the earlier (1942) color opposition system by Richard Hunter called L, a, b. v Very important for desktop color. v Basic color model in Adobe Post. Script (level 2 and level 3) CIE L*a*b* color axes v Used for color management as the device independent model of the ICC* device profiles. *International Color Consortium 54

CIE L*a*b* (cont’d) 100 v Central vertical axis : Lightness (L*), runs from 0 CIE L*a*b* (cont’d) 100 v Central vertical axis : Lightness (L*), runs from 0 (black) to 100 (white). v a-a' axis: +a values indicate amounts of red, -a values indicate amounts of green. L* -a v b-b' axis, +b indicates amounts of yellow; -b values indicates amounts of blue. For -b both axes, zero is neutral gray. v Only values for two color axes (a*, b*) and the lightness or grayscale axis (L*) are required to specify a color. v CIELAB Color difference, E*ab, is between two points is given by: +b +a (L 1*, a 1*, b 1*) (L 2*, a 2*, b 2*) 0 CIE L*a*b* color axes 55

CIELAB Image Data Full Color Image L data L-a channel L-b channel 56 CIELAB Image Data Full Color Image L data L-a channel L-b channel 56

XYZ to CIELAB v Given Xn, Yn, and Zn, which are the tristimulus values XYZ to CIELAB v Given Xn, Yn, and Zn, which are the tristimulus values for the reference white, for a point X, Y, Z: - 57

CIELAB to XYZ v Reverse transformation to XYZ, given L*a*b* values. For 58 CIELAB to XYZ v Reverse transformation to XYZ, given L*a*b* values. For 58

CIE L*C*h* (LCh) v Often referred to simply as LCh. v Same system is CIE L*C*h* (LCh) v Often referred to simply as LCh. v Same system is the same as the CIELab color space, except that it describes the location of a color in space by use of polar coordinates rather than rectangular coordinates. v L* is a measure of the lightness of a sample, ranging from 0 (black) to 100 (white). v C* is a measure of chroma (saturation), and represents distance from the neutral axis. v h is a measure of hue and is represented as an angle ranging from 0° to 360. L* (Lightness) 100% H (Hue) 0% 100% C* (Chroma) 0% 59

Y’U’V’ 1 (EBU 2) Color Space ü Red: x. R = 0. 630 y. Y’U’V’ 1 (EBU 2) Color Space ü Red: x. R = 0. 630 y. R = 0. 340 ü Green: x. G = 0. 310 y. G = 0. 595 ü Blue: x. B = 0. 155 y. B = 0. 070 ü White x. W= 0. 312713 y. W = 0. 329016 v Standard color space used for analogue television transmissions in European TVs (PAL 3 and SECAM 4). v Y is the luminance (or luma) or black and white component v U and V represent the color differences: U = B - Y; V = R - Y v U represents the Blue - Yellow axis; V, the Red - Green axis. v Gamma for PAL is assumed to be 2. 8 1 Y = Luminance, U and V are chrominance components 2 European Broadcasting Union 3 Phase Alternation Line video standard for Europe; U = 0. 492(B-Y); V = 0. 877(R-Y) 4 Sequential Couleur avec Mémoire, video standard for France, the Middle East and most of Eastern Europe 60

Y'UV Channels Full Color Image Y U (Blue - Yellow) V (Red - Green) Y'UV Channels Full Color Image Y U (Blue - Yellow) V (Red - Green) 61

Nonlinear Y’U’V’ Transformations v The following matrices allow transformations of nonlinear signals between Y’U’V’ Nonlinear Y’U’V’ Transformations v The following matrices allow transformations of nonlinear signals between Y’U’V’ and R’G’B. 62

Linear Y’U’V’ Transformations v The following matrices allow transformations of linear signals between YUV Linear Y’U’V’ Transformations v The following matrices allow transformations of linear signals between YUV RGB and XYZ. 63

Y’I’Q’ 1 Color Space ü Red: x. R = 0. 67 y. R = Y’I’Q’ 1 Color Space ü Red: x. R = 0. 67 y. R = 0. 33 ü Green: x. G = 0. 21 y. G = 0. 71 ü Blue: x. B = 0. 14 y. B = 0. 08 ü White x. W= 0. 310063 y. W = 0. 316158 v Used in NTSC 2 color broadcasting in USA; compatible with black and white television, which only uses Y. v U and V defines colors clearly, but do not align with desired human perceptual sensitivities. v Y [0. . 1] is the luminance (or luma) component. v I [-0. 523. . 0. 523] represents the Orange-Blue axis. v Q [-0. 596. . 0. 596] represents the Purple-Green axis. 1 Y’I’Q’ = Luminance, In-phase, and Quadrature phase. 2 National Television Standards Committee video standard for North America 64

YIQ Channels Full Color Image Y Channel I (Orange - Blue) Q (Purple - YIQ Channels Full Color Image Y Channel I (Orange - Blue) Q (Purple - Green) 65

Y’I’Q’ – R’G’B’ v Use the following matrices to transform linear signals between Y’I’Q’ Y’I’Q’ – R’G’B’ v Use the following matrices to transform linear signals between Y’I’Q’ and gamma-corrected RGB values. 66

YIQ - YUV v YIQ - YUV transformation is simply a color rotation of YIQ - YUV v YIQ - YUV transformation is simply a color rotation of 33º. v The following matrices can be used to transform between NTSC based YIQ and PAL based YUV. 67

Y’Cb. Cr* Color Space Independent of scanning standard and system primaries, therefore: ü No Y’Cb. Cr* Color Space Independent of scanning standard and system primaries, therefore: ü No chromaticity coordinates. ü No CIE XYZ matrices. ü No assumptions about white point. ü No assumptions about CRT gamma. v Y’ is luminance, Cb is the chromaticity component for blue, and Cr is the chromaticity component for red. v Very closely related to the YUV, it is a scaled and shifted YUV. Cb = (B - Y) / 1. 772 + 0. 5 Cr = (R - Y) / 1. 402 + 0. 5 v Chrominance values Cb and Cr are [ 0. . 1 ]. v Deals only with digital representation of R’G’B’ signals in Y’Cb. Cr form. v Color format for JPEG 1 and MPEG 2. 1 JPEG = Joint Photography Experts Group 2 MPEG = Motion Pictures Experts Group 68

Y'Cb. Cr - RGB[0. . +1] v Use the following matrices to convert between Y'Cb. Cr - RGB[0. . +1] v Use the following matrices to convert between YCb. Cr and RGB ranging from [0. . +1] 69

ITU-R. 601 YCb. Cr - R’G’B’ 219 v ITU-R. 601 defines 16 =< Y ITU-R. 601 YCb. Cr - R’G’B’ 219 v ITU-R. 601 defines 16 =< Y >= 235, and 16 =< Cb and Cr >= 240, with 128 corresponding to 0. v These BT. 601 equations are used by many video ICs to convert between digital R’G’B’ and BT. 601 YCb. Cr data. v The R’G’B’ values produced have a nominal range of 16 - 235. ITU-R. 601 = International Telecommunication Union – Radio communications Recommendation 601 RGB 219 = A restricted color space used to match YUV standard transmission values 70

ITU-R. 601 YCb. Cr - R’G’B’ 0 -255 v If 24 bit R’G’B’ data ITU-R. 601 YCb. Cr - R’G’B’ 0 -255 v If 24 bit R’G’B’ data needs to have a range of 0 -255, the following equation should be used. v The R’, G’, and B’ values must be saturated at the 0 and 255 values. 71

YCb. Cr 4: 4: 4 v Full resolution v YCb. Cr 4: 4: 4 YCb. Cr 4: 4: 4 v Full resolution v YCb. Cr 4: 4: 4 is in uncompressed data format. v Each pixel has all Y, Cb and Cr values. v Chrominance data can be subsampled without significant degradation in image quality. Y Y Y Y Cb C r Cb C r Cb C r Cb C r YCb. Cr 4: 4: 4 72

YCb. Cr 4: 2: 2 v Obtained by a 2: 1 horizontal subsampling of YCb. Cr 4: 2: 2 v Obtained by a 2: 1 horizontal subsampling of YCb. Cr 4: 4: 4 values. v Often used digital cameras, and many video ICs. v Restore original colors by interpolating missing Cb and Cr values from the values present. Y Y Y Y Cb C r Cb C r Cb C r Cb C r YCb. Cr 4: 4: 4 4: 2: 2 73

YCb. Cr 4: 2: 0 v YCb. Cr 4: 2: 0 obtained by a YCb. Cr 4: 2: 0 v YCb. Cr 4: 2: 0 obtained by a 2: 1 horizontal and vertical subsampling of YCb. Cr 4: 4: 4 values. v YCb. Cr (or, often called “YUV”) values are often subsampled to 4: 2: 0 before JPEG compression. v Restore original colors by interpolating missing Cb and Cr values from available values. Y Y Y Y Cb C r Cb C r Cb C r Cb C r YCb. Cr 4: 4: 4 4: 2: 0 74

YCb. Cr 4: 1: 1 v YCb. Cr 4: 1: 1 obtained by a YCb. Cr 4: 1: 1 v YCb. Cr 4: 1: 1 obtained by a 4: 1 horizontal subsampling of YCb. Cr 4: 4: 4 values. v VHS* quality color. Y Y Y Y Cb C r Cb C r Cb C r Cb C r YCb. Cr 4: 4: 4 4: 1: 1 VHS: Video Home System 75

YCb. Cr 4: 2: 2 - RGB 1. Convert YCb. Cr 4: 2: 2 YCb. Cr 4: 2: 2 - RGB 1. Convert YCb. Cr 4: 2: 2 to YCb. Cr 4: 4: 4, through interpolation. Y Cb C r Y Y Y Y Cb C r Y Cb C r Y Y Cb C r Y Y Y Y Y Cb C r Cb C r YCb. Cr 4: 2: 2 Interpolation of Cb and Cr values Y Y Cb C r YCb. Cr 4: 4: 4 76

YCb. Cr 4: 2: 2 - RGB 1. Convert YCb. Cr 4: 2: 2 YCb. Cr 4: 2: 2 - RGB 1. Convert YCb. Cr 4: 2: 2 to YCb. Cr 4: 4: 4, through interpolation. 2. Convert YCb. Cr 4: 4: 4 to nonlinear R’G’B’. 77

YCb. Cr 4: 2: 2 - RGB 1. Convert YCb. Cr 4: 2: 2 YCb. Cr 4: 2: 2 - RGB 1. Convert YCb. Cr 4: 2: 2 to YCb. Cr 4: 4: 4, through interpolation. 2. Convert YCb. Cr 4: 4: 4 to nonlinear R’G’B’. 3. If necessary, convert nonlinear R’G’B’ to linear RGB by removing gamma information. For (R’, G’, B’) < 21 For (R’, G’, B’) 21 78

SMPTE*-C RGB Color Space ü Red: x. R = 0. 630 y. R = SMPTE*-C RGB Color Space ü Red: x. R = 0. 630 y. R = 0. 340 ü Green: x. G = 0. 310 y. G = 0. 595 ü Blue: x. B = 0. 155 y. B = 0. 070 ü White x. W= 0. 312713 y. W = 0. 329016 v Current color standard for broadcasting in America, replacing older NTSC standard. v Reason for standard change: original set of (YIQ) primaries being slowly changed to YUV primaries. v CRT gamma assumed to be 2. 2 with NTSC, 2. 8 with PAL. *Society of Motion Picture and Television Engineers 79

Linear SMPTE-C RGB Transformations v The following matrices allow transformations of linear signals between Linear SMPTE-C RGB Transformations v The following matrices allow transformations of linear signals between SMPTE-C RGB and XYZ. 80

Nonlinear SMPTE-C RGB Transformation v The transformation matrices for non-linear signals are the same Nonlinear SMPTE-C RGB Transformation v The transformation matrices for non-linear signals are the same as that of the older YIQ (NTSC) standard. 81

ITU. BT-709 in Y'Cb. Cr ü Red: x. R = 0. 64 y. R ITU. BT-709 in Y'Cb. Cr ü Red: x. R = 0. 64 y. R = 0. 33 ü Green: x. G = 0. 30 y. G = 0. 60 ü Blue: x. B = 0. 15 y. B = 0. 06 ü White (D 65): x. W= 0. 312713 y. W = 0. 329016 v Recent standard, defined only as an interim standard for HDTV studio production. v Defined by the CCIR (now the ITU-R) in 1988, but is not yet recommended for use in broadcasting. v The primaries are the R and B from the EBU, and a G which is midway between SMPTE-C and EBU. v CRT gamma is assumed to be 2. 2. ITU: International Telecommunication Union CCIR: Comite Consultatif International des Radiocommunications 82

Linear XYZ Rec. 709 – RGBD 65 v The following matrices allow transformation between Linear XYZ Rec. 709 – RGBD 65 v The following matrices allow transformation between linear signals of Rec. 709 XYZ values and RGBD 65. 83

RGBEBU – RGB 709 v The following matrices allow transformation between linear Rec. 709 RGBEBU – RGB 709 v The following matrices allow transformation between linear Rec. 709 RGB signals and EBU* RGB signals. European Broadcasting Union 84

Nonlinear Y’Cb. Cr 709– R’G’B’ v The following matrices allow transformation between nonlinear Rec. Nonlinear Y’Cb. Cr 709– R’G’B’ v The following matrices allow transformation between nonlinear Rec. 709 Y’Cb. Cr signals and R’G’B’. v Scaling optimized for digital video. 85

SMPTE-240 M Y’Pb. Pr (HDTV*) ü Red: x. R = 0. 67 y. R SMPTE-240 M Y’Pb. Pr (HDTV*) ü Red: x. R = 0. 67 y. R = 0. 33 ü Green: x. G = 0. 21 y. G = 0. 71 ü Blue: x. B = 0. 15 y. B = 0. 06 ü White x. W= 0. 312713 y. W = 0. 329016 v This one of the developments of NTSC component coding, in which the B primary and white point were changed. With this space color, all three components Y’, Pb, and Pr are linked to luminance. v Standard for coding High Definition TV broadcasts in the USA. v The CRT gamma law is assumed to be 2. 2. *High Definition Tele. Vision 86

RGB 240 M - RGB 709 v The following transforms between SMPTE* 240 M RGB 240 M - RGB 709 v The following transforms between SMPTE* 240 M (SMPTE RP 145 or Y'Pb. Pr) RGB to Rec. 709 RGB. *Society of Motion Picture and Television Engineers 240 M = Recommended Standard for USA’s HDTV 87

RGB 240 M - RGB EBU v The following transforms from SMPTE 240 M RGB 240 M - RGB EBU v The following transforms from SMPTE 240 M (SMPTE RP 145, or YPb. Pr) RGB into to Rec. 709 RGB. 88

Linear SMPTE-240 M XYZ - RGB v The following matrices allow linear transformations between Linear SMPTE-240 M XYZ - RGB v The following matrices allow linear transformations between SMPTE-240 M XYZ and RGB. 89

Nonlinear SMPTE-240 M Y’Pb. Pr Transformations v The following matrices allow nonlinear transformations between Nonlinear SMPTE-240 M Y’Pb. Pr Transformations v The following matrices allow nonlinear transformations between Y’Pb. Pr and R’G’B’. v Scaling suited for component analogue video. 90

Xerox Corporation Y’E’S’ 1 v Standard proposed by Xerox Corporation. v YES has three Xerox Corporation Y’E’S’ 1 v Standard proposed by Xerox Corporation. v YES has three components: v Y, or luminancy, v E, or chrominancy of the red-green axis, and v S, chrominancy of the yellow-blue axis. v The following examples assume a CRT gamma of 2. 2. 1 YES = Luminance, E = red-green chromaticity, S = blue-yellow chromaticity 91

Y’E’S’ to XYZD 50 Transformation v If you start with non-linear Y’E’S’ values, apply Y’E’S’ to XYZD 50 Transformation v If you start with non-linear Y’E’S’ values, apply a gamma correction to convert to linear YES values first: - v Next, apply the following transformation to the linear YES. 92

XYZD 50 to YES Transformation v First, apply the following transformation matrix to obtain XYZD 50 to YES Transformation v First, apply the following transformation matrix to obtain linear YES from XYZD 50. v For non-linear Y’E’S’ values, apply a gamma correction. 93

YES to XYZD 65 Transformation v As before, if you start with non-linear Y’E’S’ YES to XYZD 65 Transformation v As before, if you start with non-linear Y’E’S’ values, apply a gamma correction to convert to linear YES values first: - v Next, apply the following transformation to the linear YES. 94

XYZD 65 to YES Transformation v First, apply the following transformation matrix to obtain XYZD 65 to YES Transformation v First, apply the following transformation matrix to obtain linear YES from XYZD 50. v If required, apply a gamma correction to obtain Y’E’S’. 95

Kodak Photo CD YCC (YC 1 C 2) Color Space v Based on Rec. Kodak Photo CD YCC (YC 1 C 2) Color Space v Based on Rec. 709 and 601 -1, the YCC color space has color gamut defined by the Rec. 709 primaries and a luminance - chrominance representation of color like ITU 601 -1's YCb. Cr. v YCC provides a color gamut that is greater than that which can currently be displayed, and is therefore suitable not only for both additive and subtractive (RGB and CMY(K)) reproduction. v Extended color gamut obtainable by the Photo. CD system is achieved by allowing both positive and negative values for each primary, allowing YCC to store more colors than current display devices, such as CRT monitors and dye-sublimation printers, can produce. 96

Transformations to Encode Kodak YC 1 C 2 Data v First, apply a gamma Transformations to Encode Kodak YC 1 C 2 Data v First, apply a gamma correction: For R 709, G 709, B 709 0. 018 v Next, transform the R’G’B’ data into YC 1 C 2 data. v Scaling is optimized for films. 97

Transformations to Encode YC 1 C 2 Data (cont’d) v Finally, store the floating Transformations to Encode YC 1 C 2 Data (cont’d) v Finally, store the floating point values as 8 -bit integers. v The unbalanced scale difference between Chroma 1 and Chroma 2 is designed, according to Kodak, to follow the typical distribution of colors in real scenes. 98

Transforming YC 1 C 2 Data to 24 -bit RGB v Kodak YCC can Transforming YC 1 C 2 Data to 24 -bit RGB v Kodak YCC can store more information than current display devices can cope with (it allows negative RGB values), so the transforms from YCC to RGB are not simply the inverse of RGB to YCC, they depend on the target display system. First, recover normal Luma (Y) and Chroma (C 1 and C 2) data. Second, if the display primaries match Rec. 709 primaries in their chromaticity, then 99

YC 1 C 2 – RGB Signal Voltages v First, recover normal Luma (Y) YC 1 C 2 – RGB Signal Voltages v First, recover normal Luma (Y) and Chroma (C 1 and C 2). v Then, calculate the RGB display voltages as follows; 100

Photo. YCC - YCb. Cr v Transform Photo. YCC color space into YCb. Cr Photo. YCC - YCb. Cr v Transform Photo. YCC color space into YCb. Cr values as follows: v As the Photo. YCC color space is larger than the YCb. Cr color space, the produced image may be poorer than the original. v Transform YCb. Cr data into Photo. YCC color space as follows: - v The image produced may not match an image that was one encoded directly in Photo. YCC color space. 101

s. RGB specs CIE chromaticities for ITU-R BT. 709 reference primaries and CIE standard s. RGB specs CIE chromaticities for ITU-R BT. 709 reference primaries and CIE standard illuminant Red Green Blue D 65 White Point x 0. 6400 0. 3000 0. 1500 0. 3127 y 0. 3300 0. 6000 0. 0600 0. 3290 z 0. 0300 0. 1000 0. 7900 0. 3583 s. RGB Viewing Environment Summary Condition s. RGB Display Luminance level 80 cd/m 2 Display White Point x = 0. 3127, y = 0. 3290 (D 65) Display model offset (R, G and B) 0. 0 Display input/output characteristic 2. 2 Reference ambient illuminance level 64 lux Reference Ambient White Point x = 0. 3457, y = 0. 3585 (D 50) Reference Veiling Glare 0. 2 cd m-2 102

Glossary of Color Models brightness - the human sensation by which an area exhibits Glossary of Color Models brightness - the human sensation by which an area exhibits more or less lightness - the sensation of an area's brightness relative to a reference white in the scene. luma - Luminance component corrected by a gamma function and often noted Y'. chroma - the colorfulness of an area relative to the brightness of a reference white. saturation - the colorfulness of an area relative to its brightness. CCIR: Comite Consultatif International des Radiocommunications 103

Glossary of Illuminants and Their Reference Whites Illuminant A B C D 5500 D Glossary of Illuminants and Their Reference Whites Illuminant A B C D 5500 D 6500 D 7500 E wx 0. 488 0. 348 0. 310 0. 332 0. 313 0. 299 0. 333 wy 0. 407 0. 352 0. 316 0. 348 0. 329 0. 315 0. 333 104

2 D Color Spaces ITU Color Space RGB Color Space NTSC Color Space HLS 2 D Color Spaces ITU Color Space RGB Color Space NTSC Color Space HLS Color Space SMPTE Color Space HSV Color Space Rec. 709 Color Space 105

References v BARCO Introduction to Color Theory, Monitor Calibration and Color Management, http: //www. References v BARCO Introduction to Color Theory, Monitor Calibration and Color Management, http: //www. barco. com/display_systems/support/colorthe. htm v R. S. Berns, Principles of Color Technology (3 rd Ed). , 2000 v S. M. Boker, The Representation of Color Metrics and Mappings in Perceptual Color Space, http: //kiptron. psyc. virginia. edu/steve_boker/Color. Vision 2. h tml v D. Bourgin, Color spaces FAQ, http: //www. inforamp. net/~poynton/notes/Timo/colorspace-faq, 1996, v R. Buckley, Xerox Corp. , G. Bretta, Hewlett-Packard Laboratories, Color Imaging on the Internet, http: //www. inventoland. net/imaging/cii/nip 01. pdf, 2001 v Color Representation, http: //203. 162. 7. 85/unescocourse/computervision/comp_frm. htm 106

References (cont’d) v A. Ford and A. Roberts, Color Space Conversions, www. inforamp. net/~poynton/PDFs/coloureq. References (cont’d) v A. Ford and A. Roberts, Color Space Conversions, www. inforamp. net/~poynton/PDFs/coloureq. pdf, 1998 v Gonzales, Woods, Digital Image Processing, 2000 v A. Kankaanpaa, Color Formats, www. physics. utu. fi/ett/kurssi/sfys 3066/arto_tiivis. pdf, 2000. v M. Nielsen and M. Stokes, Hewlett-Packard Company, The Creation of the s. RGB ICC Profile, http: //www. srgb. com/c 55. pdf v C. Poynton, Frequently Asked Questions about Color, http: //www. inforamp. net/~poynton/Color. FAQ. html, 1999 v C. Poynton, Frequently Asked Questions about Gamma, http: //www. inforamp. net/~poynton/Gamma. FAQ. html, 1999 v G. Starkweather, Colorspace interchange using s. RGB, http: //www. microsoft. com/hwdev/tech/color/s. RGB. asp, 2001 107

The End - Question and Answer Session - 108 The End - Question and Answer Session - 108