Color Models
Color Models
A color image is composed of three gray scale images for the three primary colors red, green and blue:
Based on the discussion on color perception, we know that a color can always be specified by three variables. But representing
a color image by the three primary colors is not necessarily the most convenient way to do color image processing. Sometimes
a different set of three variables, such as hue, saturation, and value (or intensity).
RGB/YCM model
The red, green and blue are used as the three primary colors which span a 3D space. The intensities of these primaries
are calibrated to range from 0 to 1 so that all possible colors that can be produced by these primaries are located inside
the cube as shown below:
Each side of the RGB cube is 1 with its eight vertices located at (black), (red), (green),
diagonal is .
The RGB plane shown in the figure can be specified by the equation
The length of the line from a vertex to the middle of the opposing edge is .
This cross section has the shape of a hexagon with highly saturated hues along its sides (e.g., red, yellow, green, cyan,
blue, and magenta in the middle part of the six sides, respectively), Also we see that the closer a color is to the line of
grays, the less saturated it becomes. The third variable intensity is not represented in this cross section.
with the center at . Note that in this color cube, the primaries RGB are not on the same plane as the
The primary colors R,G,B are additive colors used to describe the mixture of lights. In the background of black color (no
light), the light corresponding to each of these primary colors will give us the color sensation of red, green or blue.
Moreover, the mixture of any two of the three primary colors will give use the color sensation of yellow (R+G), magenta
(R+B) and cyan (B+G). Finally the mixture of all three primaries (R+G+B) will give us the sensation of white color.
and
The secondary colors Y,C,M are subtractive colors used to describe the mixture of pigments or paints. In the background
of white color (white paper), the pigments corresponding to each of Y, C, M will absorb one primary color: cyan absorbs
(subtracts) red (C=W-R), magenta absorbs (subtracts) green (M=W-G), and yellow absorbs (subtracts) blue (Y=W-B).
Moreover, the mixture of pigments of two secondary colors will also absorb more colors: mixture of C and M appears
blue as both R and G are absorbed (W-R-G=B), mixture of C and Y appears green as both R and B are absorbed (W-R-
B=G), and mixture of Y and M appears red as both Y and G are absorbed (W-Y-G=R). Finally, the mixture of all three
secondaries appears black as all R, G and B are absorbed.
Note that here addition means mixture of pigments.
Alternatively, a color can be specified by a set of three different variables: the Hue (H), Saturation (S), and value (V) or
intensity (I).
These two models are called HSV and HSI models, respectively. Any color is represented by a 3D point in the solid, with
its hue represented by the angle with respect to red, its value or intensity represented by the vertical distance from zero
representing black, and its saturation represented by the horizontal distance to the closest side.
The hue, saturation and intensity of colors can also be represented by a similar model as shown below:
A horizontal cross section going through the middle of the cone is shown here:
Two perpendicular vertical cross sections cutting through center of the cone are also shown:
Refernce: http://fourier.eng.hmc.edu/e161/lectures/color_processing/
for more :- http://www.UandiStar.org
(1)
With
(2)
(3)
It is assumed that the RGB values have been normalized to the range [0, 1] and
that angle
θ is measured with respect to the red axis of the HST space. Hue can be normalized to
the range [0, 1] by dividing by 360° all values resulting from Eq. (1). The other two
HSI components
already are in this range if the given RGB values are in the interval [0, 1].
GRIET/ECE 6
100% free SMS:- ON<space>UandiStar to 9870807070 for JNTU, Job Alerts, Tech News , GK News directly to ur Mobile
for more :- http://www.UandiStar.org
When H is in this sector, the RGB components are given by the equations
B = I (1 – S)
G = 3 I – (R + B)
If the given value of H is in this sector, first subtract 120° from it.
H = H - 1200
R = I (1 – S)
B = 3 I – (R + G)
H = H - 2400
G = I (1 – S)
GRIET/ECE 7
100% free SMS:- ON<space>UandiStar to 9870807070 for JNTU, Job Alerts, Tech News , GK News directly to ur Mobile