Image Processing Reference
In-Depth Information
F.2
The Range of X 1 and X 2
The minimum value for X 1 will be when (R,G,B)
=
( 255 , 255 , 0 ) . We will then
have
B W R · R W G · G W B · B
1
X 1 = W X 1 ·
W B
W X 1 ·
W R ·
W G ·
255
255
X 1 =
1
W B
W X 1 ·
255
·
(W R +
W G )
X 1 =
1
W B
X 1 = W X 1 ·
255 ( 1
W B )
=−
255
· W X 1
(F.6)
1
W B
since W R + W G + W B =
1. The maximum value for X 1 will be when (R,G,B) =
( 0 , 0 , 255 ) . We will then have
B
W R ·
R
W G ·
G
W B ·
B
X 1 =
W X 1 ·
1
W B
255
W B ·
255
X 1 =
W X 1 ·
1
W B
255 ( 1
W B )
X 1 =
W X 1 ·
=
255
·
W X 1
(F.7)
1
W B
So the range for X 1 is
[−
W X 1 ·
255 ,W X 1 ·
255
]
. Note that a similar argument exists
for X 2 .
F.3
YUV
The actual conversion from RGB to YUV is found by inserting the following weight
factors into Eqs. F.1 , F.2 , and F.3 : W R =
0 . 299, W G =
0 . 587, W B =
0 . 114, W X 1 =
0 . 436, and W X 2 =
0 . 615. To simplify matter Eqs. F.2 and F.3 are first rewritten as
W X 1
X 1 =
W B ·
(B
Y)
1
B
W R ·
R
W G ·
G
W B ·
B
X 1 =
W X 1 ·
1
W B
X 1 =
W X 1 ·
W R
+
W X 1 ·
W G
·
R
·
G
+
W X 1 ·
B
(F.8)
1
W B
1
W B
W X 2
X 2 =
W R · (R Y)
1
W R ·
W G ·
W B ·
R
R
G
B
X 2 =
W X 1 ·
1
W R
Search WWH ::




Custom Search