1 of 37

Color Models & �Color Applications��Dr. Alaa

2 of 37

Color Spectrum

ECE533 Digital Image Processing

3 of 37

Electromagnetic Spectrum

ECE533 Digital Image Processing

Wavelength  Frequency Energy

4 of 37

Multi-Spectrum Imaging

  • LANDSAT
    • The first Landsat satellite was launched in 1972
    • Landsat 7 was launched on April 15, 1999
    • Landsat 7 sensors: Enhanced Thematic Mapper Plus (ETM+)
    • Landsat 7 Home page : http://landsat7.usgs.gov/index.php
    • NASA Landsat 7 Home page : http://landsat.gsfc.nasa.gov/

ECE533 Digital Image Processing

5 of 37

ECE533 Digital Image Processing

Alluvial Fan, China

Image taken 5/2/2002 by ASTER

A vast alluvial fan blossoms across the desolate landscape between the Kunlun and Altun mountain ranges that form the southern border of the Taklimakan Desert in China's XinJiang Province.

6 of 37

ECE533 Digital Image Processing

7 of 37

ECE533 Digital Image Processing

Amazing Andromeda Galaxy October 03, 2006

The wide, ultraviolet eyes of Galaxy Evolution Explorer reveal Andromeda's "fiery" nature -- hotter regions brimming with young and old stars.

In contrast, Spitzer's super-sensitive infrared eyes show Andromeda's relatively "cool" side, which includes embryonic stars hidden in their dusty cocoons.

Hyper-Spectrum Imaging

8 of 37

  • What is color?
  • Why the primary colors are R, G, B?
  • Will R, G, B produce all the visible color?
  • What model is the most suitable for human vision?

ECE533 Digital Image Processing

Questions of Color

9 of 37

ECE533 Digital Image Processing

Illumination and Reflection

  • Light source
    • Emit energy in a form of wave/particle
    • Intensity varies in both space and time
  • Illuminating sources
    • Emit light (e.g. the sun, light bulb, TV monitors)
    • Perceived color depends on the emitted freq.
    • Follows additive rule: R+G+B = White
  • Reflecting sources
    • Reflect an incident light (e.g. the color dye, matte surface, cloth)
    • Perceived color depends on reflected freq (=incident freq – absorbed freq.)
    • Follows subtractive rule: R+G+B = Black

10 of 37

Color fundamentals

  • The use of colors in image processing is very important due to :
    • Color is powerful descriptor that simplifies object identification
    • Humans can recognize thousands of color compared to only two dozen of gray levels.
  • The beam of sun light is consisting of continuous spectrum of colors ranging from violet at one end to red at the other end (the experiment of the prism)

11 of 37

Describing Chromatic lights

  • Three basic quantity used to describe the quality of a chromatic light source
    • Radiance (watt):
      • Total amount of energy flow from the light source.
    • Luminance (lumens, lm):
      • measure of amount of energy an observer perceives from a light source. It varies based on distance from the source, wavelength, etc.
      • Note the difference between the Radiance, Luminance in X-ray example.
    • Brightness:
      • a subjective descriptor, describing color sensation.

12 of 37

Primary Colors

  • Primary colors of light (additive):
    • Red (700 nm), 65% cones sensitive to red light.
    • Green (546.1nm), 33%
    • Blue(435.8nm). 2% cones sensitive to blue light.
  • Mixing of R,G,B may NOT generate ALL visible colors.

13 of 37

Primary and Secondary Colors of Lights and Pigments

  • Primary colors
    • Red
    • Green
    • Blue
  • (subtractive):
    • Cyan
    • Magenta
    • Yellow.

14 of 37

Characterization of Color

  • Colors are distinguished from one another based on brightness, hue, and saturation.
  • Hue:
    • an attribute associated with the dominant wavelength in a mixture of light waves. It represents the dominant color as perceived by an observer, thus when we calling object red we specify its hue.
  • Saturation:
    • specifies relative purity or the amount of white lights mixed with a hue.
  • Brightness : subjective
  • Hue and saturation together are called chromaticity.

15 of 37

Chromaticity Diagram

  • Tri-chromatic coefficients:
    • Let X, Y, Z: tri-stimulus values representing the amounts of red, green, and blue needed to form any particular color.
    • Since x + y + z = 1, x and y along will make a chromaticity diagram
  • CIE Chromaticity diagram
    • x-axis: red, y-axis: green
    • Color on boundary are completely saturated.
    • As a point leaves the boundary & approaches the point s of equal energy, it become less saturated because more white is added to it
    • Saturation at points of equal energy is zero

16 of 37

Color Gamut

  • Any 3 points in the chromaticity diagram can produce all colors within that triangle. Due to the tongue-shape indicates that no mixing of three primary color can produce ALL possible colors

17 of 37

ECE533 Digital Image Processing

Color Perceive

  • Brightness : Intensity
  • Hue : Dominant Color
  • Saturation : the amount of white mixed with a hue
  • Chromaticity = hue + saturation
  • Trichromatic coefficients :
    • x, y, z

18 of 37

ECE533 Digital Image Processing

Color Systems

  • RGB: Color monitor, color video cameras
  • CMY: Color printer
  • HIS: Color image processing
  • intensity component (I) is decoupled from the color components (H Hue and S Saturation).
  • XYZ: CIE standard, Y directly measures the luminance)
  • YUV: PAL color TV)
  • YIQ: NTSC color TV)
  • YCbCr: Digital color TV standard BT.601)

Composite video: color ("chrominance") and intensity ("luminance") signals are mixed into a single carrier wave.

  • Chrominance is a composition of two color components (I and Q, or U and V).

(I (in-phase) and Q (quadrature) signals into a single chroma signal C)

b) In NTSC TV, e.g., I and Q are combined into a chroma signal, and a color subcarrier is then employed to put the chroma signal at the high-frequency end of the signal shared with the luminance signal.

c) The chrominance and luminance components can be separated at the receiver end and then the two color components can be further recovered.

d) When connecting to TVs or VCRs, Composite Video uses only one wire and video color signals are mixed, not sent separately.

19 of 37

  • Pixel depth :

Number of bits used to represent each pixel

ECE533 Digital Image Processing

RGB System

24-Bit Color Cube

20 of 37

ECE533 Digital Image Processing

CMY / CMYK System

  • Color printer and copier
  • Deposit colored pigment on paper
  • Relationship with RGB model

K: Black

21 of 37

ECE533 Digital Image Processing

HIS System

  • The intensity component (I) is decoupled from the color components (H and S).
  • Ideal for image processing .
  • H and S are closely related to the way human visual system perceives colors.

22 of 37

ECE533 Digital Image Processing

HIS System

23 of 37

ECE533 Digital Image Processing

RGB to HIS

24 of 37

ECE533 Digital Image Processing

YCC System

25 of 37

RGB Color Model

  • R, G, B at 3 axis ranging in [0 1] each
  • Gray scale along the diagonal
  • If each component is quantized into 256 levels [0:255], the total number of different colors that can be produced is (28)3 = 224 = 16,777,216 colors.

24-bit RGB color cube

26 of 37

RGB Color Model

  • Image represented in RGB color model consists of 3 component images one for each primary color. When fed into an RGB monitor, these 3 images combine on the phosphor screen to produce a composite color image.
  • Acquiring color image is the last process in reverse. by using 3 filters sensitive to red, green, blue.
  • The number of bits used to represent each pixel in RGB space is called the pixel depth.

27 of 37

CMY Color Model

  • Most devices that deposit colored pigments on paper such as color printer require CMY data input.
  • equation
  • Equal amounts of cyan, magenta, yellow will produce black. But in practice we use black as a dominant color for printing so we add the black color to the model CMYK

28 of 37

HIS Color Model

  • Constructed by looking of the RGB cube from the top
  • Hue:
    • an attribute describing pure color
  • Saturation:
    • The degree of which a pure color is diluted by white light.
  • Intensity
    • A key factor in describing the color sensation
  • HSI model
    • Hue and saturation lie in a plane perpendicular to an intensity axis.

corresponds to the way that the human describe and interpret color e.g. one doesn't refer to the color of a car as a percentage of each primary color, but it view it as hue, saturation and intensity

29 of 37

NTSC color space

  • It is used in televesion in USA, its advantage is the gray-scale information is separated from color data, so the same signal is used for monochrome and color TV.
  • It consist s of three components
    • Luminance (Y). Gray-scale
    • Hue (I).
    • Saturation (Q).
  • EQUATION

color

30 of 37

MATLAB

  • To get the red, green, blue component of a colored image use the following
    • i=im2double(imread('peppers.png'));
    • ir=i(:,:,1);
    • ig=i(:,:,2);
    • ib=i(:,:,3);
    • figure,imshow(i);
    • figure,imshow(ir);
    • figure,imshow(ig);
    • figure,imshow(ib);
  • To form a colored image from 3 RGB component use
    • Rgb_image=cat(3,fr,fg,fb);

31 of 37

Red

Green

Blue

32 of 37

MATLAB

  • Indexed image has 2 components
    • Data matrix
    • Color map matrix
  • The color of each

pixel is determined

by using the

corresponding

value of the matrix

X (data matrix)

as a pointer into

the map.

33 of 37

MATLAB�different color maps for indexed images

  • autumn varies smoothly from red, through orange, to yellow.
  • cool consists of colors that are shades of cyan and magenta. It varies smoothly from cyan to magenta.
  • copper varies smoothly from black to bright copper.
  • gray returns a linear grayscale colormap.
  • hot varies smoothly from black through shades of red, orange, and yellow, to white.
  • jet ranges from blue to red, and passes through the colors cyan, yellow, and orange. shade of gray.
  • pink contains pastel shades of pink.
  • spring consists of colors that are shades of magenta and yellow.
  • summer consists of colors that are shades of green and yellow.
  • winter consists of colors that are shades of blue and green.

34 of 37

MATLAB

  • The following code demonstrates how to show the indexed image with different color map
    • i=imread('trees.tif');
    • figure,imshow(i,copper);
  • To convert from gray scale image to an indexed image use
    • j=imread('cameraman.tif');
    • g=gray2ind(j,255);
    • figure,imshow(g,jet(255));
  • To convert an indexed image to RGB image use
    • Rgb_image=ind2rgb(g, jet(255));

35 of 37

MATLAB

  • To convert from RGB color space to NTSC color space use:
    • Yiq_image=rgb2ntsc(rgb_image);
    • Y=Yiq_image(:,:,1); luminance
    • Y=Yiq_image(:,:,2); hue
    • Y=Yiq_image(:,:,3); saturation

36 of 37

MATLAB

  • To convert from RGB color space to CMY color space use:
    • cmy_image=imcomplement (rgb_image);
  • To covert from CMY color space to RGB color space use:
    • rgb_image=imcomplement (cmy_image);

37 of 37

MATLAB

  • Spatial filtering of color images
    • Use the filters described in the gray scale images without any changes.