JPEG Compression Algorithm
Today JPEG is very popular as a data format. But it is not really a data format. It is an compression method. There are many compression method and JPEG is one of them. It becomes a standard in 1992 and JPEG stands for Joint Photographic Experts Group. JPEG is a lossy compression method.
Lossy compression vs Lossless compression
Lossy compression is when the compression happens it losses data and it never cannot be remade to the original image.
Lossless compression is it does not loose data when compression happens and it can be regenerated to the original image.
JPEG Compression Algorithm
JPEG Compression algorithm has five main basic steps.
- RGB color space to YCbCr color space Conversion
- Preprocessing for DCT transformation
- DCT Transformation
- Co-efficient Quantization
- Lossless Encoding
Let’s see what are these steps in more detail.
1. RGB color space to YCbCr color space conversion
I assume you know these color spaces. If you want to know more about this read this article. In the JPEG compression algorithm, first what it does is this conversion. An digital image in RGB format that is a combination of Red, Green, Blue color channel is converted to YCbCr color channels. Y is the…