3 Lossless compression algorithms do not deliver compression ratios that are high enough.. In order to achieve higher rate of compression, we give up complete reconstruction and cons
Trang 1Multimedia Engineering
Lecture 4: Lossy Compression
-Techniques
Lecturer: Dr Đỗ Văn Tuấn
Department of Electronics and
Telecommunications
Email: tuandv@epu.edu.vn
Trang 3
3
Lossless compression algorithms do not deliver compression ratios that are
high enough Hence, most multimedia compression algorithms are lossy
In order to achieve higher rate of compression, we give up complete
reconstruction and consider lossy compression technique
So we need a way to measure how good the compression technique is meaning
that how close to the original data the reconstructed data is
Introduction
Trang 5
5
Mean Square Error (MSE)
Signal to Noise Ratio
Peak Signal to Noise Ratio
Distortion Measures
Trang 6
6
We trade-off rate (number of bits per symbol) versus distortion this is
represented by a rate-distortion function R(D)
Rate-Distortion Theory
Trang 8
8
Quantization is a heart of any scheme
The source we are compressing contains a large number of distinct output
values (infinite for analog)
We compress the source output by reducing the distinct values to a
smaller set via quantization
Each quantizer can be uniquely described by its partition of the input
range (encoder side) and set of output values (decoder side)
Two types of quantization: Uniform quantization and non-uniform
quantization
Quantization
Trang 10
10
Non-uniform Quantization
Typical one is companded quantization
Companded quantization is nonlinear
As shown above, a compander consists of a compressor function G, a uniform
quantizer, and an expander function G−1
The two commonly used companders are the μ-law and A-law companders
Trang 12
12
Transform coding
Reason for transform coding
Coding vectors is more efficient than coding scalars so we need to group
blocks of consecutive samples from the source into vectors
If Y is the results of a linear transformation T of an input X such that the
elements of Y are much less correlated than X, then Y can be coded more efficiently than X
With vectors of high dimensions, if most of the information in the vectors is
carried in the first few components we can roughly quantize the remaining elements
The more decorrelated the elements are, the more we can compress the less
important elements without affecting the important ones
Trang 13
13
The DCT is a wildly used transform technique
Spatial frequency: indicates how many times pixel values change across
an image block
The DCT formalizes this notion in terms of how much the image contents
change in correspondence to the number of cycles of a cosine wave per block
The DCT decomposes the original signal into its DC and AC components
The inverse DCT (Called IDCT) reconstructs the original signal
Discrete Cosine Transform
Trang 14
14
Given an input function f(i,j) over two integer variables i and j (a piece of
an image), the 2D DCT transforms it into a new function F(u, v), with integer
u and v running over the same range as i and j The general definition of
the transform is:
Where i , u = 0, 1, ,M − 1; j , v = 0, 1, ,N − 1 and the constants
C(u), C(v) are determined by
Discrete Cosine Transform
Trang 15
15
Discrete Cosine Transform
2D discrete cosine transform (2D DCT) – In JPEG
Where i , j, u , v = 1,2, ,7
2D inverse discrete cosine transform (2D IDCT)
Trang 16
16
Discrete Cosine Transform
1D discrete cosine transform (1D DCT)
Where i , u = 1,2, ,7
1D inverse discrete cosine transform (1D IDCT)
Trang 17
17
Basic functions of DCT
Trang 18
18
Basic functions of DCT
Trang 19
19
Example of 1D DCT
Trang 20
20
Example of 1D DCT
Trang 22
22
End of the lecture