Image Processing Reference
In-Depth Information
=
0 we are in the sextant RWY and find R , G , and B in the following
way. First we realize that R
When K
=
V in this sextant. Next we use the fact that B
=
min
{
R,G,B
}
in this sextant. Inserting this into Eq. E.5 we get B
=
V
·
( 1
S) . G
is found using the following equation derived above:
G
B
H
=
(E.14)
V
min
{
R,G,B
}
Substituting we have
G
V
·
( 1
S)
H
=
V
V
·
( 1
S)
G
=
H
·
V
H
·
V
·
( 1
S)
+
V
·
( 1
S)
G
=
V
·
(H
H
+
H
·
S
+
1
S)
· 1
H)
G
=
V
S
·
( 1
(E.15)
When K
1 the point is located in the sextant YWG . In this sextant we know from
above that G
=
=
V and B
=
min
{
R,G,B
}
. R is found using the following equation,
derived above:
V R
H =
(E.16)
V
min
{
R,G,B
}
Substituting we have
V R
V V · ( 1
H =
(E.17)
S)
R
=
V
H
·
V
+
H
·
V
·
( 1
S)
(E.18)
R
=
V
·
( 1
S
·
H)
(E.19)
For the remaining four sextants we end up with similar results. The last thing re-
maining before we can put it all together and derive a general conversion from HSV
to RGB is a method to map from H deg to H . This is done as follows:
H deg
60°
H =
(E.20)
= H
K
(E.21)
H
H
=
K
(E.22)
where
x
means the floor of x , see Appendix B . The final conversion is now given
as
Search WWH ::

Custom Search