0% found this document useful (0 votes)
51 views22 pages

Fast Solvers in Image Compression: Federico Jean Valentin

The JPEG standard uses discrete cosine transform (DCT) to compress images. It divides images into 8x8 pixel blocks and applies DCT, quantizing the coefficients to ignore high frequency components. This compresses the data by prioritizing low frequency DCT coefficients. DCT is preferred over discrete Fourier transform (DFT) for image compression as it concentrates the image energy in fewer coefficients, allowing more coefficients to be quantized to zero for greater data compression at similar quality levels.

Uploaded by

Taxi Driver
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
0% found this document useful (0 votes)
51 views22 pages

Fast Solvers in Image Compression: Federico Jean Valentin

The JPEG standard uses discrete cosine transform (DCT) to compress images. It divides images into 8x8 pixel blocks and applies DCT, quantizing the coefficients to ignore high frequency components. This compresses the data by prioritizing low frequency DCT coefficients. DCT is preferred over discrete Fourier transform (DFT) for image compression as it concentrates the image energy in fewer coefficients, allowing more coefficients to be quantized to zero for greater data compression at similar quality levels.

Uploaded by

Taxi Driver
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 22

Fast Solvers In

Image compression
Federico
Jean
Valentin
Plan
Introduction

JPEG

Method

Complexity

Example

Q/A
The JPEG standard
- JPEG stands for Joint Photographic Experts Group
- The Joint Photographic Experts Group is the committee that created and
maintains the JPEG and JPEG 2000 standards.
- The first JPEG standard was released in 1992.
- The standard specifies the codec, which defines how an image is going to be
compressed
An introduction
Every image is an array of N x M pixels, where N is the width and M is the height
Each pixel is represented by three values Red, Green and Blue that go from 0 to
255 (indicating the intensity of each colour).
For our processes, we will not use R,G,B but instead three different quantities,
Luminance Y, and Blue and red chrominances Cb and Cr
Luminance (left) and chrominances Cr (middle) and Cb (right)
The algorithm

The image is divided into 8x8 pixel blocks, before the DCT is applied.The high
frequency components will be ignored as they don’t affect our perception of the
image.

The coefficients we obtain from the DCT are quantized using a 8x8 matrix Q so
we can store them as integers.

To compress the data we will use a parameter k .


The algorithm
The new quantized matrix F is going to be

A is our 8x8 block matrix


DCT
The algorithm
We have to repeat this process 3 times for each one of our matrices(luminance
and chrominances), because Luminance is more relevant for the human eye, we
use a different Q for that matrix, so we can get a better resolution.
The luminance of a picture and its corresponding 8x8 block.
The DFT of the 8x8 block and the quantized block with k=1
(Small coefficients correspond to darker colours)
This is the matrix after quantization. We can see that many coefficients turned to zero.
Nonetheless, we should reorder it to prioritize low frequency components, since they’re the most
information heavy.
The first value is called the DC component, and the others value are the AC components. The last 39
zeroes won’t be transmitted.
We can actually transmit this as an array of vectors that have the format (N, alpha) where N is the
number of zeroes preceding the coefficient and alpha is the coefficient of the original sequence in that
index.

The compression rate will then be given by:

Cb = N/2m where m is the number of pairs and N the number of pixels.

For our example with K = 1 the compression rate will be 64/(2*17) = 1.88

With K=5 it’d be equal to 4


The DC components are stored considering the DC components of neighboring
blocks, we go left to right, from to top to the bottom saving the difference with the
previous DC, except for the first value that remains the same.
We then use the Huffman code to save the difference sequence of DC’s
coefficients. And then our compression is finally done.

To decode it, we have to revert the process step by step.


Bit compression ratio and mean square error as a function of the compression parameter k.
Why we use DCT instead of DFT ?
The reason why the DCT is preferred to DFT in JPEG is that the DCT requires
fewer frequency coefficients (concentrate energy of the spatial sequence) than
DFT to get a good approximation to a typical signal.

– the better the energy compaction


– the larger the number of coefficients
that get wiped out
– the greater the bit savings for the same
loss
The Discrete Cosine Transform
Why DCT is a fast solver? : FFT inside

same
complexity
DFT overall
O(NlogN)

DCT
Relate DFT to DCT
step 1): create a sequence

step 2): compute the 2N-point DFT of y[n]

step 3 ): rewrite as a function of N terms only

= DCT in function of DFT

http://www.svcl.ucsd.edu/courses/ece161c/handouts/DCT.pdf

http://www.maia.ub.es/~soria/TFM_Juanjo-Bonet.pdf
The JPEG 2000 Compression Standard
http://www.maia.ub.es/~soria/TFM_Juanjo-Bonet.pdf

http://igm.univ-mlv.fr/~dr/XPOSE2013/La_compression_de_donnees/jpeg.html

https://en.wikipedia.org/wiki/JPEG

Why is better DCT than DFT for image compression : J. Blinn, What's the deal with DCT,
IEEE Computer Graphics and Applications 13 (1993)

You might also like