# Colour images RGB to YCbCr Example Example, RGB Colour images RGB to YCbCr Example Example, RGB

Colour images

RGB to YCbCr

When coding images we usually don’t use the RGB colour space. Instead

the image is described in another colour space, where the pixel values are

given using a luminance (or luma) component (called Y), that tells us how

bright the pixel is (ie basically a grayscale signal) and two chrominance (or

chroma) components (called Cb and Cr) that tells the actual colour of the

pixel.

The chrominance components can often be downsampled to a lower

resolution, without a human observer noticing any reduction in image

quality.

There are many variants of luminance-chrominance colour spaces, but

they are rather similar to each other.

Suppose that E R , E G and E B are analog values between 0 and 1 that

describe how much red, green and blue there is in a pixel (given eight bit

quantization we have E R = R/255, E G = G/255 and E B = B/255). A

typical conversion (ITU-R Recommendation 624-4 System B,G) to

luminance-chrominance is then given by

⎪⎨

⎪⎩

E Y = 0.299 · E R +0.587 · E G +0.114 · E B

E Cb = −0.169 · E R − 0.331 · E G +0.500 · E B

E Cr = 0.500 · E R − 0.419 · E G − 0.081 · E B

where E Y is between 0 and 1 and E Cb and E Cr are between -0.5 and 0.5.

Conversion to 8-bit values are then done by

⎪⎨

⎪⎩

Y = 219 · E Y +16

Cb = 224 · E Cb + 128

Cr = 224 · E Cr + 128

Example

TSBK06 colour images – p. 1/7

Example, RGB

TSBK06 colour images – p. 2/7

Colour components: R, G and B

As grayscale images

TSBK06 colour images – p. 3/7

TSBK06 colour images – p. 4/7

Example, YCbCr

Example

Colour components: Y, Cb and Cr

As grayscale images

Image where Cb and Cr have been downsampled a factor 2 both

horizontally and vertically, ie half of the image information has been

removed.

Example

TSBK06 colour images – p. 5/7

TSBK06 colour images – p. 6/7

Image where R, G and B have been downsampled a factor √ 2 both

horizontally and vertically, ie half of the image information has been

removed.

TSBK06 colour images – p. 7/7

More magazines by this user
Similar magazines