Discrete Cosine Transform (DCT)
The color space transformation is usually the first step in compressing the image. For color images, we transform RGB into a luminance-chrominance color space (YCbCr, YUV, etc).
The reason for doing this is that we can afford to lose more information in the chrominance component than in the luminance component: Human eyes are more sensitive to small changes in luminance (brightness of color) than small changes in chrominance (color).
* RGB Color Space
Colors are represented as points in a three-dimensional space.
* Luminance-chrominance Color Space
The luminance, denoted by Y, is one of the three parameters in a
color space. The other two components which represent hue and
saturation are defined as B-Y and R-Y.
The YCbCr, a luminance-chrominance color space, consists of:
- a luminace component:
Y = (77/256)R + (150/256)G + (29/256)B
- two chrominance components:
Cb = -(44/256)R - (87/256)G + (131/256)B + 128
Cr = (131/256)R - (110/256)G - (21/256)B + 128
E-mail comments or suggestions about JPEG to khuri@cs.sjsu.edu or joy@mathcs.sjsu.edu