Image Processing Reference
In-Depth Information
F
Conversion Between RGB and YUV/YC b C r
In this appendix the conversions from the RGB color space to the YUV/YC b C r (and
similar) color spaces, and reverse, are derived. That is, we seek a conversion from
[
]
[
Y,X 1 ,X 2 ]
[
Y,X 1 ,X 2 ]
[
]
.
In Sect. 3.3.3 it was stated that the luminance, Y , contains intensity information
while X 1 and X 2 code the color information as weighted difference signals with
respect to Y . That is:
R,G,B
to
, and one from
to
R,G,B
=
W R ·
+
W G ·
+
W B ·
∈[
]
Y
R
G
BY
0 , 255
(F.1)
W X 1
X 1 =
W B ·
(B
Y)
X 1 ∈[−
W X 1 ·
255 ,W X 1 ·
255
]
(F.2)
1
W X 2
X 2 =
W R ·
X 2 ∈[−
W X 2 ·
255 ,W X 2 ·
]
(R
Y)
255
(F.3)
1
F.1
The Output of a Colorless Signal
=
=
When a colorless signal is present, i.e., R
G
B ,wehave
B
Y
B
W R ·
R
W G ·
G
W B ·
B
X 1 =
W X 1 ·
W B =
W X 1 ·
1
1
W B
B
W R ·
B
W G ·
B
W B ·
B
X 1 =
W X 1 ·
1
W B
B( 1
W R
W G
W B )
X 1 =
W X 1 ·
=
0
(F.4)
1
W B
R
Y
R
W R ·
R
W G ·
G
W B ·
B
X 2 =
W X 2 ·
W R =
W X 2 ·
1
1
W R
R
W R ·
R
W G ·
R
W B ·
R
X 2 =
W X 2 ·
1
W R
R( 1
W R W G W B )
1
X 2 = W X 2 ·
=
0
(F.5)
W R
since W R +
W G +
W B =
1.
 
 
Search WWH ::




Custom Search