Monday, March 21, 2016

BSA105: Diffrences between RGB and YUV colour space (Week 4)

What is a colour space?
Colour space, also known as the colour model (or colour system), is an abstract mathematical model which simply describes the range of colors as tuples of numbers, typically as 3 or 4 values or color components (e.g. RGB). It is an elaboration of the coordinate system and sub-space. Each colour in the system is represented by a single dot.

RGB Colour Space
RGB is a kind of color space which uses RED, GREEN and BLUE to elaborate colour model. An RGB colour space can be simply interpreted as "all possible colours" which can be made from three colours for red, green and blue. In such conception, each pixel of an image is assigned a range of 0 to 255 intensity values of RGB components. That is to say, using only these three colours, there can be 16,777,216 colours on the screen by different mixing ratios.


YUV Colour Space
The Y component determines the brightness of the colour (referred to as luminance or luma), while the U and V components determine the colour itself (the chroma). Y ranges from 0 to 1 (or 0 to 255 in digital formats), while U and V range from -0.5 to 0.5 (or -128 to 127 in signed digital form, or 0 to 255 in unsigned form). Some standards further limit the ranges so the out-of-bounds values indicate special information like synchronization.

One neat aspect of YUV is that you can throw out the U and V components and get a grey-scale image. Since the human eye is more responsive to brightness than it is to colour, many lossy image compression formats throw away half or more of the samples in the chroma channels to reduce the amount of data to deal with, without severely destroying the image quality.




1 comment: