Formulas
The three component signals are created from an original
(red, green and blue) source. The weighted values of
,
and
are added together to produce a single
signal, representing the overall brightness, or luminance, of that spot. The
signal is then created by subtracting the
from the blue signal of the original
, and then scaling; and
by subtracting the
from the red, and then scaling by a different factor.
These formulae approximate the conversion between the RGB colour space and
.
![{\displaystyle {\begin{aligned}R,G,B,Y&\in \left[0,1\right]\\D_{B},D_{R}&\in \left[-1.333,1.333\right]\end{aligned))}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4752fc4788d6d8c643ec89a5d41caeff978065ea)
From RGB to YDbDr:
![{\displaystyle {\begin{aligned}Y&=+0.299R+0.587G+0.114B\\D_{B}&=-0.450R-0.883G+1.333B\\D_{R}&=-1.333R+1.116G+0.217B\\{\begin{bmatrix}Y\\D_{B}\\D_{R}\end{bmatrix))&={\begin{bmatrix}0.299&0.587&0.114\\-0.450&-0.883&1.333\\-1.333&1.116&0.217\end{bmatrix)){\begin{bmatrix}R\\G\\B\end{bmatrix))\end{aligned))}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2179e5ba20bcb5c615e81966cf3bff44cc132804)
From YDbDr to RGB:
![{\displaystyle {\begin{aligned}R&=Y+0.000092303716148D_{B}-0.525912630661865D_{R}\\G&=Y-0.129132898890509D_{B}+0.267899328207599D_{R}\\B&=Y+0.664679059978955D_{B}-0.000079202543533D_{R}\\{\begin{bmatrix}R\\G\\B\end{bmatrix))&={\begin{bmatrix}1&0.000092303716148&-0.525912630661865\\1&-0.129132898890509&0.267899328207599\\1&0.664679059978955&-0.000079202543533\end{bmatrix)){\begin{bmatrix}Y\\D_{B}\\D_{R}\end{bmatrix))\end{aligned))}](https://wikimedia.org/api/rest_v1/media/math/render/svg/80c2e65ca02f73bf67a9ca970dfb32b0b95ecae7)
You may note that the
component of
is the same as the
component of ![{\displaystyle Y}](https://wikimedia.org/api/rest_v1/media/math/render/svg/961d67d6b454b4df2301ac571808a3538b3a6d3f)
![{\displaystyle U}](https://wikimedia.org/api/rest_v1/media/math/render/svg/458a728f53b9a0274f059cd695e067c430956025)
.
and
are related to the
and
components of the YUV colour space as follows:
![{\displaystyle {\begin{aligned}D_{B}&=+3.059U\\D_{R}&=-2.169V\end{aligned))}](https://wikimedia.org/api/rest_v1/media/math/render/svg/027d4a51c747b0a38b8589647ae02daecb8505b2)