Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 31

Outline

 Color and electromagnetic spectrum


 Primary colors
 Chromaticity diagram
 Color models
 RGB model
 CMY model
 CMYK model
 HSI model
Color Image Processing

 In automated image analysis,


 color is a powerful descriptor, which simplifies object

identification and extraction.


 The human eye can distinguish between
 thousands of color shades and intensities

 but only about 20-30 shades of gray.

 Hence, use of color in human image processing would be very


effective.
Color Fundamentals

 When a beam of sunlight is passed through a glass prism, the


emerging beam of light is not white but consists of a continuous
spectrum of colors (Sir Isaac Newton, 1666).
 The color spectrum can be divided into six broad regions: violet,
blue, green, yellow, orange, and red.
Color of Light

 Ultraviolet
 visible light(Chromatic light)
 infrared
 Visible light
 is composed of a relatively narrow
band of frequencies in the
electromagnetic spectrum.
 The longer the wavelength
(meter), the lower the frequency
(Hz), the lower the energy
(electron volts)
 Characterization of light is important for the understanding of
color.

 The Chromatic light


 is visible to human eyes if its wavelength is between 380-

780 (nm).
 If the light is achromatic (devoid of color),
 its only attribute is its intensity (amount of light).

 The different colors in the spectrum do not end abruptly but


each color blends smoothly into the next.
Color of Light

 Perceived color depends


on spectral content
(wavelength composition)
 e.g., 700nm ~ red

 “spectral color”: a

light with very narrow


bandwidth
 A light with equal energy
in all visible bands
appears white
 Color perceived by the human eye
 depends on the nature of light
reflected by an object.
 Light that is relatively balanced in
all visible wavelengths
 is perceived as white.
 Green objects
 reflect light with wavelengths in the
500 to 570 nm,
 absorb those at other wavelengths.
Color Fundamentals

 Three basic quantities


 are used to describe the quality of a chromatic source
of light:
 Radiance
 Luminance
 Brightness
Color Fundamentals

 Radiance
 is the total amount of light that flows from a light source
(measured in Watts).
 Luminance
 gives a measure of the amount of energy an observer
perceives from a light source (measured in lumens).
 Brightness
 is a subjective descriptor that is impossible to measure.
Color Fundamentals

 Cones in the retina are responsible for color perception in the


human eye.

 Six to seven million cones in the human eye can be divided into
three categories:
 red light sensitive cones (65%),

 green light sensitive cones (33%) and

 blue light sensitive cones (2%).

 The latter cones are the most sensitive ones.

 Different cones have different frequency responses


Color Fundamentals

 Absorption curves for the different cones have been determined experimentally

 Primary colors: Defined CIE in 1931 (The International Commission on Illumination)


 Red = 700 nm Green = 546.1nm Blue = 435.8 nm
 Secondary colors :
 light magenta (R+B) cyan(G+B) yellow(R+G)
 Due to the absorption characteristics of the human eye,
all colors perceived by the human can be considered
as a variable combination of the so called three
primary colors:
 Red (R) (700 nm)

 Green (G) (546.1 nm)

 Blue (B) (435.8 nm)

 The wavelengths for the three primary colors are


established by standardization by the CIE
(International Commission on Illumination) in 1931.
 This standardization does not mean these three primary
colors can generate all spectrum colors
 They correspond to the experimental curve only
approximately
 The specific color wavelengths are used mainly for
standardization.
 It is not possible to produce all colors purely by
combining these specific wavelengths.
Color Image Processing - 1
Primary colors of human vision
 For this reason, red, green, and blue are referred
to as the primary colors of human vision..
 Red : 700 nm
 Green : 546.1 nm
 Blue : 435.8 nm

14
Color Image Processing - 1
Some clarification
 No single color may be called red, green, or blue.
 R, G, B are only specified by standard.
 The primary colors can not produce all the visible
colors.

15
Color Image Processing - 1
Secondary colors

 Magenta (R+B)
 Cyan (G+B)
 Yellow (R+G)

16
Color Image Processing - 1
Color characterization

 Brightness : chromatic notion of intensity


 Hue : dominant color (dominant wavelength in a mixture of light waves)
perceived by an observer
 Saturation : relative purity of the amount of white mixed with a hue

 So when we call an object red, orange, etc., we refer to its hue.

17
Color Image Processing - 1
Chromaticity
 Chromaticity = hue + saturation
 Therefore Color = Chromaticity +
X
Brightness x
 Tristimulus : the amount of R, G X Y  Z
and B needed to form any color Y
y
(R, G, B) – X, Y, Z X Y  Z
 Trichromatic coefficients : x, y, z Z
z
X Y  Z
x  y  z 1
18
Color Image Processing - 1
Chromaticity diagram

 CIE standard (1931)


 Shows all the possible colors
 Color Composition as a function of
x(red) and y(green). z=1-(x+y)
(blue)
 GREEN=62%y+25%x
 z=13%(Blue)

 Questions
 Can different portions of R, G, and B create all the
possible colors?
 Where is the brown in the diagram?
19
Color Image Processing - 1
Chromaticity diagram

 Questions
 Can different portions of R, G, and B
create all the possible colors?
 Where is the brown in the diagram?

20
Color Image Processing - 1
Answers

 A triangle can never cover


the house-shoe shape
diagram
 Chromaticity diagram
only shows dominant
wavelengths and the
saturation, and is
independent of the
amount of luminous
energy (brightness)
21
Color Image Processing - 1
Color models

 RGB model
 Color monitor, color video cameras
 CMY model
 Color printer
 HSI model
 Color image manipulation
 XYZ (CIE standard, Y directly measures the luminance)
 YUV (used in PAL color TV)
 YIQ (used in NTSC color TV)
 YCbCr (used in digital color TV standard BT.601)

22
RGB Color Models
 A color model: color space, color system
 Each color is represented by a single point in a color
space.
 Generating an RGB image

Image Processing and Intelligent Systems Laboratory 24


 Bpp – pixel depth
 Full rendition of RGB color requires 24 bits. Total
colors (28)3
 Safe RGB colors: a subset of full RGB colors (256
colors)

 Structure: 40 different, 216 common (standard)


 ure red (R=255, G=0, B=0): FF0000, white: FFFFFF

Image Processing and Intelligent Systems Laboratory 25


 The CMY and CMYK Color Models
 C  1  R 
 M   1  G  , K : Black
    
 Y  1  B 

Image Processing and Intelligent Systems Laboratory 26


 The HSI Color Model
 RGB: good for cones’ red, green, and blue perception
 CMY(K): good for hardware (printer) implementation
 How human interprets a color?
 Not as a combination (percentage) of three primary components.
 But as a combination of hue, saturation, and brightness
 HSI Color Model
 Decouples intensity (I) from color-carrying components (H, S)

Image Processing and Intelligent Systems Laboratory 27


 Detail description of HIS model

Image Processing and Intelligent Systems Laboratory 28


Image Processing and Intelligent Systems Laboratory 29
 RGB to HSI
 RGB values are normalized, θ is measured w.r.t. the red
axis H  360,  , BB  GG , where   cos  R  G  R  B  
1

  
 R  G 2  R  B G  B 
1/ 2

3
S  1 minR, G, B 
R  G  B 
1
I R  G  B 
3

 HSI to RGB
 0≤H<120 (RG sector)
 S cos H 
B  I (1  S ), R  I 1 
cos60  H  , G  1  R  B 
 

 120≤H<240 (GB sector)


 S cos H 
H  H  120, R  I (1  S ), G  I 1 
cos60  H , B  1  R  G 
 

 240≤H<360 (BR sector)


 S cos H 
H  H  240, G  I (1  S ), B  I 1 
cos 60  H  , R  1  G  B 
 
Image Processing and Intelligent Systems Laboratory 30
Image Processing and Intelligent Systems Laboratory 31

You might also like