Image Processing Reference
In-Depth Information
V
min
{ R,G,B }
V
S
=
(E.5)
where S
. Similar reasoning for the other five sextants in the hexagon shows
that Eq. E.5 is indeed a general equation that holds for the entire hexagon.
∈[
0 , 1
]
E.1.2 HSV: Hue
In Fig. E.1 (b) hue is illustrated as the angle between −− WR and −− WP . Hue is, however,
not calculated as an angle but rather as the following ratio:
= AP
AD
H
(E.6)
where A , P , and D are defined in Fig. E.1 (b). This definition is only valid when P
is located in the sextant shown in Fig. E.1 (b), i.e., then R
=
V and G
B .Inthis
sextant hue will be a value in the interval
[
0 , 1
]
where hue
=
0 corresponds to red
and hue
1 corresponds to yellow. The calculated hue value is normally multiplied
with 60° in order to obtain a hue value in the range of
=
when considering
all sextants. 2 Below we show how hue is calculated in the sextant RWY .
Looking at Fig. E.1 (b) we can see that
[
, 360°
[
AP
= EP
EA
EA
= AF
,
AD
= −− WD
and that
. From this follows that
= AP
= EP
AF
H
(E.7)
AD
−− WD
−− WD
Above we saw that
and stated that the “position” of P
in this sextant is given as (G, B) . Combining this with Eq. E.7 and converting the
ratio into degrees we have
=
V
min
{
R,G,B
}
G B
H deg =
{ R,G,B } ·
60°
(E.8)
V
min
A similar geometric reasoning can be carried out for the sextant MWR where R
=
V and B>G resulting in:
5
R
B
H deg =
} +
·
60°
(E.9)
V
min
{
R,G,B
=
Moving on to the sextant YWG where G
V and R>B we can derive that
2 Note that the range is defined as [ , 360° [ as opposed to [ , 360° ] . The reason for this is that
360°
=
0°, hence 360° is not included in the interval, but 359 . 99999° etc. is.
Search WWH ::




Custom Search