Image Processing Reference
In-Depth Information
Fig. D.1 ( a ) The rgb triangle inside the RGB color cube. ( b ) The rgb triangle
Fig. D.2 The location of
different points used to define
saturation
min
{ P R ,P G ,P B }
P R +
S =
1
3
·
(D.4)
P G +
P B
Similar arguments hold for the other two triangles WG B and WB R and Eq. D.4
is therefore the general expression for saturation in the HSI representation.
Hue is defined as the angle, θ , between the two vectors −− WR and −− WP ,see
Fig. 3.11. Referring to Eq. B.16 we can express the angle between the vectors as
cos 1
−− WR −− WP
−− WR · −− WP
θ =
(D.5)
Inserting the actual points yields
1
0
0
1 / 3
1 / 3
1 / 3
2 / 3
−− WR = R W =
=
1 / 3
(D.6)
1 / 3
( 2 / 3 ) 2
6 / 9
2 / 3
−− WR =
1 / 3 ) 2
1 / 3 ) 2
+
(
+
(
=
=
(D.7)
P r
P g
P b
1 / 3
1 / 3
1 / 3
P r
1 / 3
−− WP
= P
W
=
=
P g
1 / 3
(D.8)
P b
1 / 3
(P r
−− WP
1 / 3 ) 2
1 / 3 ) 2
1 / 3 ) 2
=
+
(P g
+
(P b
Search WWH ::




Custom Search