Ch6 Color Image Processing
Ch6 Color Image Processing
◼ socio-psychological phenomenon
◼ How human brain perceive and interpret color?
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
Physical quantities to 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)
◼ Far 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?
◼ Color is sensed by the eye using three kinds of cones,
each sensitive primarily to red, green or blue, though
there is significant overlap.
◼ 6~7M Cones are the sensors in the eye
◼ 3 principal sensing categories in eyes
◼ Red light 65%, green light 33%, and blue light 2%
Primary and secondary colors
Color of light: R G B
◼ RGB model
Suitable for hardware or
◼ CYM model applications
◼ CYMK model
◼ HSI model - match the human description
RGB color model
Pixel depth
◼ Pixel depth: the number of bits used to
represent each pixel in RGB space
◼ Full-color image: 24-bit RGB color image
◼ (R, G, B) = (8 bits, 8 bits, 8 bits)
CMY model (+Black = CMYK)
◼ CMY: secondary colors of light, or primary
colors of pigments
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: associated with the dominant wavelength in a
mixture of light waves. When we call an object red,
orange, or yellow, we are specify its Hue.
◼ Saturation: refers to the relative purity or the amount
of white light mixed with Hue
◼ Brightness: achromatic notion of intensity
HSI color model (cont.)
◼ RGB -> HSI model Colors on this triangle
Have the same hue
Intensity
line
saturation
HSI model: hue and saturation
HSI model
HSI component images
R,G,B Hue
intensity
saturation
Converting colors from RGB to HSI
if B G
2 ( R − G ) + ( R − B )
1
H = = cos −1
1
360 − if B G
( R − G ) 2 + ( R − B)(G − B) 2
S = 1−
3
min( R, G, B)
( R + G + B)
1
I = ( R + G + B)
3
Converting colors from HSI to RGB
◼ RG sector ( 0o H 120 o )
B = I (1 − S )
S cos H
R = I 1 +
cos( 60 o
− H )
G = 3I − ( R + B )
Converting colors from HSI to RGB
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
◼ The idea is to perform three independent
transformations on the gray level of any
input pixel as shown. The three results are
then fed separately into the red, green, and
blue channels of a color television monitor.
Gray level to color transformation
Full Color Image Processing
◼ Two processing methods:
◼ process each channel (or color component)
separately, as if the color image were three gray
scale images;
◼ process all channels with each pixel represented
as a vector.
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 )
◼ si = k ri +(1-k)
I H,S
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
Matlab commands
Matlab commands
Spatial filtering of color images in Matlab