Image Processing Reference
In-Depth Information
Fig. 3.11 ( a ) The definition
of hue and saturation. ( b )The
hue-saturation representation.
The color of a pixel (indicated
by a dot) is represented by a
hue value and a saturation
value (denoted S in the
figure). The figure also
indicates the location of some
of the pure colors
the pure colors. It is important to realize how this figure relates to Fig. 3.7 , or in other
words, how the hue-saturation representation relates to the RGB representation. The
center of the hue-saturation circle in Fig. 3.11 (b) is a shade of gray and corresponds
to the gray-vector in Fig. 3.7 . The circle is located so that it is perpendicular to
the gray-vector. For a particular RGB value, the hue-saturation circle is therefore
centered at a position on the gray-vector, so that the RGB value is included in the
circle.
A number of different color representations exist, which are based on the notion
of hue and saturation. Below two of these are presented. 4
3.3.1 The HSI Color Representation
The HSI color representation is short for hue, saturation and intensity. The represen-
tation follows the exact definition mentioned above. That is, the intensity is defined
as I =
R + G + B
3 and hue and saturation is defined as illustrated in Fig. 3.11 . When
calculating the conversion from RGB to HSI we seek a way of avoiding fist con-
verting from RGB to rg, i.e., we want to represent the conversion in terms of RGB
values. In Appendix D it is shown how this is possible and the resulting conversion
from RGB to HSI is defined as
cos 1 1 / 2
(R G)(R G) + (R B)(G B) ,
(R
G)
+
(R
B)
·
if G
B ;
H
=
cos 1 1 / 2
B) ,
(3.8)
(R
G)
+
(R
B)
360°
·
Otherwise
(R
G)(R
G)
+
(R
B)(G
H
∈[
0 , 360
[
min
{
R,G,B
}
S
=
1
3
·
S
∈[
0 , 1
]
(3.9)
R
+
G
+
B
R
+
G
+
B
I
=
I
∈[
0 , 255
]
(3.10)
3
4 It should be noted that the naming of the different color representations based on hue and satu-
ration is not consistent throughout the body of literature covering this subject. Please have this in
mind when studying other information sources.
Search WWH ::

Custom Search