8/12/2019 digital image processing, color models
1/40
Color Models
8/12/2019 digital image processing, color models
2/40
What is Color
- Color is a powerful descriptor that often simplifies
object identification and extraction from a scene.
- Color is a fundamental attribute of our viewing
experience
8/12/2019 digital image processing, color models
3/40
Preview
8/12/2019 digital image processing, color models
4/40
Preview
8/12/2019 digital image processing, color models
5/40
Light
Light is fundamental forcolor vision
Unless there is a source of light, there is nothing to see!
What do we see?
We do not see objects,but the light that has been
reflected by or transmitted through the objects
8/12/2019 digital image processing, color models
6/40
Light and EM waves
Light is an electromagnetic wave
If its wavelength is comprised between 400 and 700 nm
(visible spectrum), the wave can be detected by the human
eye and is calledmonochromatic light
8/12/2019 digital image processing, color models
7/40
Physical properties of light
This distribution may indicate:
1) a dominant wavelength (or frequency) which is
the color of the light (hue),
2) brightness (luminance), intensity of the light
(value),
3) purity (saturation), which describes the degree
of vividness.
8/12/2019 digital image processing, color models
8/40
CIE standard
Commission Internationalede LEclairage (1931)
not a computer model
each color = a weighted
sum of three imaginaryprimary colors
8/12/2019 digital image processing, color models
9/40
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)
Types of Color Model
8/12/2019 digital image processing, color models
10/40
Basic quantities to describe the quality of light
source:
Radiance:Total amount of energy that flows from the
light source (in W). Luminance: A measure of the amount of energy an
observer perceives from the light source (in lm)
Brightness: A subjective descriptor that embodies the
achromatic notion of intensity and is practical
impossible to measure.
Color Fundamentals (cont)c
8/12/2019 digital image processing, color models
11/40
Color Fundamentals (cont )
Standard wavelength values for
the primary colors
8/12/2019 digital image processing, color models
12/40
Color Fundamentals (cont )
The characteristics generally used to distinguish one color
from another are Brightness,Hue, and Saturation.
Hue: Represents dominant color as perceive by an observer.
Saturation: Relative purity or the amount of white light mixed
with a hue
Hue and saturation taken together are called Chromatici ty, and
therefore, a color may be characterized by its Brightness and
Chromaticity.
8/12/2019 digital image processing, color models
13/40
Color Fundamentals (cont)
Tri-stimulusvalues: The amount of Red, Green andBlue needed to form any particular color
Denoted by: X, Y and Z
ZYX
Xx
ZYX
Yy
ZYX
Zz
1 zyx
Tri-chromatic coefficient:
8/12/2019 digital image processing, color models
14/40
Color Models
The purpose of a color model (also called
color space or color system) is to facilitate the
specification of colors in some standard,
generally accept way.
RGB(red, green, blue) : monitor, video camera.
CMY(cyan, magenta, yellow),CMYK(CMY, black)
model for color printing.
and HSImodel, which corresponds closely with the
way humans describe and interpret color.
8/12/2019 digital image processing, color models
15/40
RGB(red, green, blue)The RGB colour space is related to human vision through the
tristimulus theory of colour vision.
The RGB is an additive colour model. The primary colours red,
green andblueare combined to reproduce other colours.
In the RGB colour space, a colour is represented by a triplet (r,g,b)
r gives the intensity of the red component
ggives the intensity of the green component
bgives the intensity of the blue component
Here we assume that r,g,b are real numbers in the interval [0,1].
You will often see the values of r,g,b as integers in the interval
[0,255].
8/12/2019 digital image processing, color models
16/40
RGBColor model
16
Active displays, such as computer monitors and television sets, emit
combinations of red, green and blue light. This is an additivecolor model
Source: www.mitsubishi.com
8/12/2019 digital image processing, color models
17/40
The RGBColor Spaces
8/12/2019 digital image processing, color models
18/40
CMYColor model
18
Passive displays, such as color inkjet printers, absorblight instead of
emitting it. Combinations of cyan,magentaand yellowinks are used. This
is a subtractivecolor model.
Source: www.hp.com
8/12/2019 digital image processing, color models
19/40
CMY
CMY cartridges for colour printers.
8/12/2019 digital image processing, color models
20/40
The CMYand CMYKColor Spaces
8/12/2019 digital image processing, color models
21/40
The CMYand CMYKColor Models
B
G
R
Y
M
C
1
1
1
Cyan, Magenta and Yellow are the secondary colors
of light
Most devices that deposit colored pigments on
paper, such as color printers and copiers, requireCMY data input.
8/12/2019 digital image processing, color models
22/40
8/12/2019 digital image processing, color models
23/40
Example 11.3: The magenta is written in CMY as (0,1,0). In RGB it is
written as
giving,
that is, red and blue.
b
g
r
1
1
1
0
1
0
1
0
1
0
1
0
1
1
1
b
g
r
8/12/2019 digital image processing, color models
24/40
CMYK model
For printing and graphics art industry, CMY is
not enough; a fourth primary, K which stands
for black, is added.
Conversions between RGB and CMYK are
possible, although they require some extra
processing.
8/12/2019 digital image processing, color models
25/40
HSI Color Model
25
Hdominant
wavelength
Spurity
% white
IIntensity
Source: http://www.cs.cornell.edu/courses/cs631/1999sp/
8/12/2019 digital image processing, color models
26/40
8/12/2019 digital image processing, color models
27/40
8/12/2019 digital image processing, color models
28/40
HSI Color
Model
8/12/2019 digital image processing, color models
29/40
HSI Color Model
Hueis defined as an angle 0 degrees is RED
120 degrees is GREEN
240 degrees is BLUE
Saturation is defined as the percentage of distance from
the center of the HSI triangle to the pyramid surface.
Values range from 0 to 1.
Intensity is denoted as the distance up the axis from
black.
Values range from 0 to 1
29
8/12/2019 digital image processing, color models
30/40
HSVThe components of the HSV colour space are Hue, Saturationand Value.
Colour is the result of the perception of light at different wavelengths. Usually, we do not
experience light at a single wavelength but a blend of waves at different wavelengths. The
huecorresponds to the dominant wavelength and determines the type of the colour, for
example red, yellow, or blue.
The saturation determines the purity of the colour. High saturation gives pure colours
(narrow wavelength band), while low saturation means colours mixed with a lot of white
(white light combines all the visible wavelengths).
The valuedetermines the brightness. A value equal to zero represents absence of light,
while a high value gives bright colours.
8/12/2019 digital image processing, color models
31/40
H.R. Pourreza
The HSI Colo r Models
8/12/2019 digital image processing, color models
32/40
H.R. Pourreza
The HSI Colo r Models
RG
B
H
S I
H S
I RG
B
8/12/2019 digital image processing, color models
33/40
Converting colors from RGB to HSI
GBif360
GBif
H
2/12
1
)])(()[(
)]()[(2
1
cosBGBRGR
BRGR
)],,[min()(
31 BGRBGR
S
)(3
1BGRI
The HSI Colo r Models
8/12/2019 digital image processing, color models
34/40
Converting colors from
HIS to RGB
RG sector :
)1( SIB
)60cos(
cos1
H
HSIR
)(3 BRIG
The HSI Colo r Models
1200 H
8/12/2019 digital image processing, color models
35/40
Converting colors from
HIS to RGB
GB sector :
)1( SIR
)60cos(
cos1
H
HSIG
)(3 GRIB
The HSI Colo r Models
120HH
240120 H
8/12/2019 digital image processing, color models
36/40
Converting colors from
HIS to RGB
BR sector :
)1( SIG
)60cos(
cos1
H
HSIB
)(3 BGIR
The HSI Colo r Models
240HH
360240 H
8/12/2019 digital image processing, color models
37/40
8/12/2019 digital image processing, color models
38/40
YIQ Color Coordinate System
YIQ is defined by the National Television System
Committee (NTSC)
Y describes the luminance, I and Q describes the
chrominance.
A more compact representation of the color.
YUV plays similar role in PAL and SECAM.
8/12/2019 digital image processing, color models
39/40
YUV/YCbCr Coordinate
YUV is the color coordinate used in color TV in
PAL system, somewhat different from YIQ.
YCbCr is the digital equivalent of YUV, used for
digital TV, with 8 bit for each component, in
range of 0-255
8/12/2019 digital image processing, color models
40/40
YCbCr Color Space is used in MPEG video compression
standards
Y is luminance Cb is blue chromaticity
Cr is red chromaticity
Y = 0.257*R + 0.504*G + 0.098*B + 16
Cr = 0.439*R - 0.368*G - 0.071*B + 128
Cb = - 0.148*R - 0.291*G + 0.439*B + 128
YIQ color space (Matlab conversion function: rgb2ntsc):
Top Related