Red, green and blue lights showing secondary c...

Image via Wikipedia

I didn’t know this before, but there is a colour space that is more appropriate to use for human viewing than RGB. YUV is made up of 3 components, but instead of mixes of the colours red, green and blue, it is composed of a luminescence value, and two chroma. Encoding in such a way can provide better transmission of pictures for human viewing than using the proportions of RGB.

Translating between the two is simple as \left(\begin{array}{c}Y'\\U\\V\end{array}\right)=\left(\begin{array}{ccc}0.299&0.587&0.114\\-0.14713&-0.28886&0.436\\ 0.615 & -0.51499 & -0.10001 \end{array}\right)\left(\begin{array}{c}R\\G\\B\end{array}\right) And the inverse \left(\begin{array}{c}R\\G\\B\end{array}\right)=\left(\begin{array}{ccc}1&0&1.13983\\1&-0.39465&-0.58060\\ 1 & 2.03211 & 0 \end{array}\right)\left(\begin{array}{c}Y'\\U\\V\end{array}\right) So, how does this make transmission of pictures better? The eye is typically most sensitive to brightness changes, which is recorded at the Y value. The U and V values stores information about colour. Most of this information can be thrown away. But wait, “Hold on, there’s a Y’ in the equations above, not a Y. You’re just trying to confuse me.” I hear you whine. Y refers to the quantity of light needed. However, what is more appropriate to encode is the electrical voltage/signal amplitude, Y’, needed to generate Y that we see.


One comment

  1. bencord0

    Let’s do some quick checks to see what this is like.
    First, the trivial, black is black.

    \left( \begin{array}{c} 0 \\ 0 \\ 0 \end{array} \right)_{RGB}=\left( \begin{array}{c} 0\\ 0\\ 0\end{array}\right)_{Y'UV}

    White is white.
    \left( \begin{array}{c} 1\\ 1\\ 1 \end{array} \right)_{RGB}=\left( \begin{array}{c} 1 \\ 0 \\ 0 \end{array} \right)_{Y'UV}

    We can make some other quick observations, Red \left( \begin{array}{c} 1\\ 0\\ 0\end{array}\right)_{RGB} is just the first column of the array \left(\begin{array}{c}0.299\\-0.14713 \\ 0.615 \end{array}\right)_{Y'UV}

    The same holds true for green and blue for the second and third columns respectively.

    If we now look to the inverse matrix, there’s a hint about what “colour” U and V represent.

    \left(\begin{array}{c} 0\\ 1\\ 0 \end{array}\right)_{Y'UV}=\left(\begin{array}{c} 0\\ -0.39463\\ 2.03211 \end{array}\right)_{RGB}

    \left(\begin{array}{c} 0\\ 0\\ 1 \end{array}\right)_{Y'UV}=\left(\begin{array}{c} 0\\ 1.13983\\ -0.58060 \end{array}\right)_{RGB}

    Here’s the plane of UV-space from wikipedia if you can’t translate numbers into colours in your imagination.

    UV colourspace

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s