Study Materials For Module 5 - DIP
Study Materials For Module 5 - DIP
MODULE - 5
Color Fundamentals
The characteristics generally used to distinguish one color from another are
brightness, hue, and saturation
brightness: the achromatic notion of intensity.
hue: dominant wavelength in a mixture of light waves, represents dominant
color as perceived by an observer.
saturation: relative purity or the amount of white light mixed with its hue.
Color Models
RGB
The RGB colour model relates very closely to the way we perceive colour
with the r, g and b receptors in our retinas. RGB uses additive colour mixing
and is the basic colour model used in television or any other medium that
projects colour with light. It is the basic colour model used in computers and
for web graphics, but it cannot be used for print production.
The secondary colours of RGB – cyan, magenta, and yellow – are formed by
mixing two of the primary colours (red, green or blue) and excluding the
third colour. Red and green combine to make yellow, green and blue to make
cyan, and blue and red form magenta. The combination of red, green, and
blue in full intensity makes white.
In Photoshop using the “screen” mode for the different layers in an image
will make the intensities mix together according to the additive colour mixing
model. This is analogous to stacking slide images on top of each other and
shining light through them.
CMYK The 4-colour CMYK model used in printing lays down overlapping
layers of varying percentages of transparent cyan (C), magenta (M) and
yellow (Y) inks. In addition a layer of black (K) ink can be added. The
CMYK model uses the subtractive colour model.
Gamut The range, or gamut, of human colour perception is quite large. The
two colour spaces discussed here span only a fraction of the colours we can
see. Furthermore the two spaces do not have the same gamut, meaning that
converting from one colour space to the other may cause problems for
colours in the outer regions of the gamuts.
The HSI color space is very important and attractive color model for image
processing applications because it represents color s similarly how the human
eye senses colors.
The HSI color model represents every color with three components: hue ( H
), saturation ( S ), intensity ( I ). The below figure illustrates how the HIS
color space represents colors.
The Hue component describes the color itself in the form of an angle between
[0,360] degrees. 0 degree mean red, 120 means green 240 means blue. 60
degrees is yellow, 300 degrees is magenta.
The Saturation component signals how much the color is polluted with white
color. The range of the S component is [0,1].
The Intensity range is between [0,1] and 0 means black, 1 means white.
To formula that converts from RGB to HSI or back is more complicated than
with other color models, therefore we will not elaborate on the detailed
specifics involved in this process.
Given the intensities of the three primaries RGB of a color, we can find its
HSV representation using different models. Here we use the RGB plane of
the cube to find the corresponding HSV. The three vertices are represented
If , then .
Determine S:
that .
Dept of ECE/SJBIT Page 83
Smartworld.asia 87
In general
Or
(p inside )
From , we get
and
we have
(p inside )
(p inside )
CMYK_CONVERT
The procedure uses the following method to convert from CMYK to RGB:
R = (255 - C) (1 - K/255)
G = (255 - M) (1 - K/255)
B = (255 - Y) (1 - K/255)
To convert from RGB to CMYK, the procedure uses the following method:
K = minimum of (R, G, B)
In both cases the CMYK and RGB values are assumed to be in the range 0 to
255.
Note
There is no single method that is used for CMYK/RGB conversion. The
method used by CMYK_CONVERT is the simplest and, depending on
printing inks and screen colors, might not be optimal in all situations.
This routine is written in the IDL language. Its source code can be found in
the file cmyk_convert.pro in the libsubdirectory of the IDL distribution.
Syntax
CMYK_CONVERT, C, M, Y, K, R, G, B [, /TO_CMYK]
Arguments
C, M, Y, K
R, G, B
Dept of ECE/SJBIT Page 86
Smartworld.asia 90
To convert from CMYK to RGB, set these arguments to named variables that
will contain the converted values. To convert from RGB to CMYK (with
the TO_CMYK keyword set), set these arguments to scalars or arrays
containing the RGB values.
Keywords
TO_CMYK
If this keyword is set, the values contained in the RGB arguments are
converted to CMYK. The default is to convert from CMYK to RGB.
Recommended Questions