Chap 6 Color
Chap 6 Color
Preview
Why use color in image processing?
Color is a powerful descriptor
Object identification and extraction
eg. Face detection using skin colors
Humans can discern thousands of color shades
and intensities
Human discern only two dozen shades of
grays
Preview (cont.)
Two category of color image
processing
Full color processing
Images are acquired from full-color sensor or
equipments
Pseudo-color processing
In the past decade, color sensors and
processing hardware are not available
Colors are assigned to a range of monochrome
intensities
Outline
Color fundamentals
Color models
Basics of full-color image
processing
Noise in color images
Color image compression
Color fundamentals
Physical phenomenon
Physical nature of color is known
Psysio-psychological phenomenon
How human brain perceive and interpret
color?
Color fundamentals (cont.)
1666, Isaac Newton
Visible light
Chromatic light span the
electromagnetic spectrum (EM) from
400 to 700 nm
Color fundamentals (cont.)
The color that human perceive in an
object = the light reflected from the
object
scene
Illumination source
reflection
eye
describe a chromatic light
source
Radiance: total amount of energy that flow from the
light source, measured in watts (W)
Luminance: amount of energy an observer perceives
from a light source, measured in lumens (lm)
infrared light: high radiance, but 0 luminance
Brightness: subjective descriptor that is hard to
measure, similar to the achromatic notion of intensity
How human eyes sense
light?
3 principal sensing categories in
eyes
Red light 65%, green light 33%, and
blue light 2%
Primary and secondary
colors
In 1931, International Commission on
Illumination defines
specific wavelength values to the primary
colors
B = 435.8 nm, G = 546.1 nm, R = 700 nm
However, we know that no single color may
be called red, green, or blue
Secondary colors:
G+B=Cyan, R+G=Yellow, R+B=Magenta
Primary colors of light v.s.
primary colors of pigments
Primary color of pigments
Color that subtracts or absorbs a primary
color of light and reflects or transmits the
other two
Color of light: R G B
RGB gamut of
monitors
Color gamut of
printers
Outline
Color fundamentals
Color models
Basics of full-color image
processing
Color transformations
Smoothing and sharpening
Color models
Color model / color space / color system
Specify colors in a standard way
A coordinate system that each color is
represented by a single point
(6)3 = 216
Safe RGB color (cont.)
C 1 R
M 1 G
Y 1 B
HSI color model
Will you describe a color using its R, G,
B components?
Human describe a color by its hue,
saturation, and brightness
Hue : color attribute
Saturation: purity of color (white->0,
primary color->1)
Brightness: achromatic notion of intensity
HSI color model (cont.)
RGB -> HSI model Relation
Colors on this triangle
Have the same hue
Intensity
line
saturation
HSI model: hue and
saturation
HSI model
Convert colors from RGB – HSI
Theta = cos -1
{ ½ [(R-G) + (R-B)] /
[(R-G)2 + (R-B)(G-B)]2}
B=I(1-S)
R=I[1+((S cos H) / cos (60deg – H))]
G = 3I – (R+B)
R=I(1-S)
G=I[1+((S cos H) / cos (60deg – H))]
B = 3I – (R+B)
G=I(1-S)
B=I[1+((S cos H) / cos (60deg – H))]
R= 3I – (R+B)
Manipulating
HSI component images
R,G,B Hue
intensity
saturation
Outline
Color fundamentals
Color models
Pseudo-color image processing
Basics of full-color image
processing
Color transformations
Smoothing and sharpening
Pseudo-color image
processing
Color 1
Color 2
Image plane
Intensity slicing (cont.)
Alternative representation of intensity
slicing
Intensity slicing (cont.)
More slicing plane, more colors
Application 1
Rainfall statistics
Gray level to color
transformation
Intensity slicing: piecewise linear
transformation
R G
Near
Infrared
B (sensitive
to biomass)
R+G+B near-infrared+G+B
Outline
Color fundamentals
Color models
Pseudo-color image processing
Basics of full-color image
processing
Color transformations
Smoothing and sharpening
Color pixel
A pixel at (x,y) is a vector in the color
space
RGB color space
R ( x, y )
c( x, y ) G ( x, y )
B ( x, y )
Vector-based processing
Process the color vector of each pixel
vectors
Operation on each component of a vector
complex operations
RGB color space
For each R,G,B component: si = k ri
CMY color space
For each C,M,Y component:
si = k ri +(1-k)
I H,S
Problem of using Hue
component
dis-continuous
Un-defined
over gray
axis
Implementation of color
slicing
Recall the pseudo-color intensity slicing
1-D intensity
Implementation of color
slicing
How to take a region of colors of
interest?
cube sphere
Outline
Color fundamentals
Color models
Pseudo-color image processing
Basics of full-color image
processing
Color transformations
Smoothing and sharpening
Color image smoothing
Neighborhood processing
Color image smoothing:
averaging mask
1
c( x, y )
K
c( x, y )
( x , y )S xy
vector processing
Neighborhood
Centered at (x,y)
1
R ( x, y )
K ( x , y )S xy
1
c ( x , y ) G ( x, y )
per-component processing
K ( x , y )S xy
1
K B ( x, y )
( x , y )S xy
original R
G G
Example: 5x5 smoothing
mask
Smooth I
RGB model in HSI model difference