Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing 10 20 18 10 16 10 14 10 12 10 10 10 8 10 6 10 4 10 10 © 1992–2008 R. C. Gonzalez & R. E. Woods 2 Ult i l t Ultraviolet Visible Infrared Microwave FM Radio + TV AM R Radio di Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing Colorimetric Color Perception involve Hue, Saturation, and Lightness Hue :distinguish g amongg colors such as red,, ggreen,, and ppurple. p Saturation :refer to how color far from gray. Lightness: the perceived intensity of a reflecting object. Brightness :refer to the perceived intensity of self-luminous. self luminous Artists Terms Tint: results of adding g white ppigments g pure pigments Shade: comes from adding black pigments to pure pigments Tone:results of adding both black and white pigments to pure pigments © 1992–2008 R. C. Gonzalez & R. E. Woods “Pure” color White Grays Tones Shades Black Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing Color Models: Green Yellow Cyan The Newton Color Circle Red Blue Magenta • The Newton color circle pprovides a convenient way y to pperceive the additive mixing properties of colors. • The R,G,B and their complementary colors C,M,Y are placed on the circle in the order of the wavelengths of the corresponding spectral colors. © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing • The separation of colors by a prism expose a continuous range of spectral colors © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing • A spectral p color is composed p of a single g wavelength g • The helium-neon laser monochromatic light is red (632 nm). • Most colored objects give off a range of wavelengths and the characterization of color is much more than the statement of wavelength. © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing Primary and Secondary colors © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing St d d C Standard Color l M Model d l Commission Intenationale de l’Eclairage (CIE), 1931 defined three standard primaries, i i called ll d X,Y,Z X Y Z to t replace l Red, R d Green, G Blue. Bl The primaries are used to match color by us using g tthree ee co corresponding espo d g color-matching functions © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing CIE Chromatic Diagram g Chromatic values depend on dominant wavelength and saturation and independent of luminous energy. Consider a color C, the we can Write C = XX + YY + ZZ Normalize Against g X+Y+Z x = X/(X+Y+Z) y = Y/(X+Y+Z) z = Z/(X+Y+Z) We know that x+y+z = 1, and the luminance information usually in Y (Y cef.), thus we can recover X,Y,Z X = Y ((x/y) / ) ; Y = Y ; Z = Y(1 Y(1-x-y)/y )/ Plotting these parameters © 1992–2008 R. C. Gonzalez & R. E. Woods The XYZ space Digital Image Processing, 3rd ed. Gonzalez & Woods XYZ Color Space p www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing W e two When wo color co o A and a d B are a e added together new color C lies on the line connects both colors. In the side Figure, B defines the dominant wavelength, and the ratio AC to BC expressed as a percent of the excitation purity of A. The closer A to C the more light A includes. Complementary colors are those that can be mixed to produce white light. D and E on the side Figure are complementary colors colors. Nonspectral color are those that can not be defined by dominant wavelength such as F. Color gamuts or color ranges is the effect of adding colors together © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing RGB Color Model The color range (gamut) RGB model is defined by the CRT’s phosphor. C = RR + GG + BB Let us look at these colors in XYZ space RGB NTSC CIE Monitor R (0.67, 0.33) (0.73, 0.26) (0.62, 0.34) G (0.21, 0.71) (0.27, 0.71) (0.26, (0 26 0.59) 0 59) B (0.14, 0.08) (0.16, 0.01) (0.15, 0.07) © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods CMY Color Model www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing Cyan, magenta, Cyan magenta and blue are the complements of red, red green, green blue. blue CMY is important when dealing with hardcopy that deposit color pigments onto paper. 1 R 1 C C M 1 G 1 M = Y Y 1 B 1 R 1R C 1 G 1 M G = 1 B 1B Y 1 © 1992–2008 R. C. Gonzalez & R. E. Woods - R G B - C M Y Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter YIQ is used by the US commercial TV. Color Image Processing YIQ Q Color Model • • • • • YIQ model exploits two properties of the visual system – More sensitive to changes luminance than to change hue or saturation – Object Obj t that th t cover an extremely t l small ll partt off our field fi ld off view, i produce d a limit color sensation. Y is the luminance (the same Y in XYZ space). The h chromaticity h i i is i encoded d d encoded d d in i I andd Q Only Y component will show black/White TV More bits are used for Y, and either I or Q has less bits than the other. 0.587 0.114 R Y 0.299 I 0.596 0.275 0.321 G Q 0.212 0.528 0.311 B © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing HSI Model The relationship between RGB and HSI RGB to HSI H 360 BG BG ( R G ) ( R B) 2 1/ 2 2 [( R G ) ( R B )( G B ) ] cos 1 3 [min( R, G, B)] ( R G B) I ( R G B) / 3 S 1 © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing Hue and saturation in the HSI color model. • The angle from the red axis gives the hue • The length of the vector i the is h saturation. i © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing HSI to RGB for (0 H 120 ) B I (1 S ) S cos( H ) R I 1 cos(60 H ) G 3I ( R B ) 120 H 240 H H 120 240 H 360 H H 240 B I (1 S ) S cos( H ) R I 1 cos(60 H ) G 3I ( R B ) © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing In various color processing applications it is possible to use the corresponding p g Red,, Green, and Blue channels © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing Color l Coding di for f visualization © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing Color Transformation © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods Digital Image Processing, 3rd ed. Gonzalez & Woods www.ImageProcessingPlace.com Ch t 6 Chapter Color Image Processing © 1992–2008 R. C. Gonzalez & R. E. Woods