0

I was reading about YCrCb colorspace.

First channel, Y is "luminance" (akin to the brightness) of the pixel. Second channel, Cb is the "chrominance" (aka color) for blue. Third channel, Cr, is the "chrominance" (aka color) for red.

But wait, why are the second and third channels blue and red? What happened to green? Did it just kinda work out that way, where blue and red work, and green doesn't?

  • 3
    It doesn't. The Cr and Cb channels do contain green information. See the example shown here. – Billy Kerr May 30 at 8:51
  • You are only thinking about the maximum values for those two channels. Just like RGB, each channel also has a distinct color for its minimum value. – usr2564301 May 30 at 12:07
  • I'm sorry, @BillyKerr, I don't really understand that crazy example! What is going on? :) – tumultous_rooster May 30 at 16:37
  • @usr2564301: could you expand on this and maybe consider submitting an answer? I'd really appreciate it. – tumultous_rooster May 30 at 16:38
  • 1
    There's nothing crazy about the example. It's from the Wikipedia page on the topic. – Billy Kerr May 30 at 17:53
1

Below is a visual aid I made in GIMP, so you can see what is going on in a simplified way. I'll leave the maths that lies behind it for those who are brainier than me.

YCbCr is a colour space, or if you prefer, a method for describing RGB colours - it's mostly used in video and digital photography systems, and rarely in graphic design. This colour space does contain green information. If it didn't, then it wouldn't be able to describe any RGB colours that have a green component which would kind of defeat the purpose.

The example below shows an RGB image decomposed to greyscale YCbCr layers. As you can see, in the Cb and Cr layers, the green component is quite distinctly visible. If there were no green information, the green area would disappear in these channels.

It's better to think of the Cb channel as the contrast between blue and green, (blue is almost white, and green is almost black), it's not just a blue channel. Similarly, the Cr channel can be thought of as the contrast between red and green (red is almost white, and green is almost black), again it's not just a red channel. Also note that there is also some red information in the Cb channel, and some blue information in the Cr channel, although to a much lesser extent - and these show up as mostly grey. GIMP names these channels "blueness" and "redness", which is also a nice way of thinking of these channels in natural language. It's quite hard to get your head around these concepts. Hopefully you'll find this helpful.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.