SlideShare a Scribd company logo
1 of 54
BY
Ziyad
Lossy Compression
Algorithms
•Distortion Measures
•The Rate-Distortion Theory
•Quantization
•Uniform Scalar Quantization
•Nonuniform Scalar Quantization
•Vector Quantization
•Transform Coding
•Discrete Cosine Transform (DCT)
outline
Outline
• 2D Discrete Cosine Transform (2D DCT)
• 1D Discrete Cosine Transform (1D DCT)
• 1D Inverse Discrete Cosine Transform
(1D-IDCT)
• One-Dimensional DCT
• The Cosine Basis Functions
• 2D Basis Functions
• Wavelet-Based Coding
• 2D Haar Wavelet Transform
• Discrete Wavelet Transform*
• 2D Discrete Wavelet Transform
What is lossy compression?
 The compressed data is not the same as
the original data, but a close approximation
of it.
Yields a much higher compression ratio than
that of lossless compression.
Distortion Measures
A distortion measure is a mathematical
quantity that specifies how close an
approximation is to its original, using
some distortion criteria. When looking at
compressed data, it is natural to think
the distortion :in terms of the numerical
difference between the original data and
the reconstructed data. However, when
the data to be
compressed is an image, such a measure
may not yield the intended result.
Distortion Measures
 The three most commonly used distortion measures in image
compression are:
 mean square error (MSE) σ2,
(8.1)
where xn, yn, and N are the input data sequence, reconstructed data
sequence, and length of the data sequence respectively.
 signal to noise ratio (SNR), in decibel units (dB),
(8.2)
where σ2 x is the average square value of the original data sequence
and σ2d is the MSE.
 peak signal to noise ratio (PSNR),
(8.3)
2
10 2
10log x
d
SNR



2
10 2
10log peak
d
x
PSNR


2 2
1
1 ( )
N
n n
n
x y
N


 
The Rate-Distortion Theory
 Lossy compression always involves a tradeoff
between rate and distortion. Rate is the average
number of bits required to represent each source
symbol. Within this framework, the tradeoff between
rate and distortion is represented in the form of
a rate-distortion function R(D).
 Intuitively, for a given source and a given distortion
measure, if D is a tolerable amount of distortion,
R(D) specifies the lowest rate at which the source
data can be encoded while keeping the distortion
bounded above by D. It is easy to see that when D =
0, we have a lossless compression of the source.
 The rate-distortion function is meant to describe a
fundamental limit for the performance of a coding
algorithm and so can be used to evaluate the
performance of different algorithms.
Figure 8.1 shows a typical rate-distortion function.
Notice that the minimum possible rate at D = 0, no
loss, is the entropy of the source data. The distortion
corresponding to a rate R(D) ⇒ 0 is the maximum
amount of distortion incurred when “ nothing ” is
coded.
Quantization
Quantization in some form is the heart of any
lossy scheme. Without quantization, we would
indeed be losing little information. Here, we
embark on a more detailed discussion of
quantization. The source
we are interested in compressing may contain
a large number of distinct output values
(or even infinite, if analog).
To efficiently represent the source output, we
have to reduce the number of distinct values
to a much smaller set, via quantization.
Quantization
Each algorithm (each quantizer) can be
uniquely determined by its partition of the
input range, on the encoder side, and the set
of output values, on the decoder side.
The input and output of each quantizer can be
either scalar values or vector values, thus
leading to scalar quantizers and vector
quantizers.
In this section, we examine the design of both
uniform and nonuniform scalar quantizers and
briefly introduce the topic of vector
quantization (VQ).
Uniform Scalar Quantization
A uniform scalar quantizer partitions the domain
of input values into equally spaced intervals,
except possibly at the two outer intervals. The
endpoints of partition intervals are called the
quantizer’s decision boundaries. The output or
reconstruction value corresponding to each
interval is taken to be the midpoint of the
interval.
The length of each interval is referred to as the
step size, denoted by the symbol .
Uniform scalar quantizers are of two types:
midrise and midtread.
A midrise quantizer is used with an even
number of output levels, and a midtread
quantizer with an odd number. The midrise
Uniform Scalar Quantization
 The midtread quantizer has zero as one of its
output values, hence, it is also known as dead-
zone quantizer, because it turns a range of
nonzero input values into the zero output.
 The midtread quantizer is important when source data
represents the zero value by fluctuating between
small positive and negative numbers. Applying the
midtread quantizer in this case would produce an
accurate and steady representation of the value zero.
For the special case = 1, we can simply compute
the output values for
 these quantizers as
Qmidrise(x) = [x]− 0.5
Uniform Scalar Quantization
 The goal for the design of a successful uniform quantizer is
to minimize the distortion for a given source input with a
desired number of output values. This can be done by
adjusting the step size to match the input statistics.Let’s
examine the performance of an M level quantizer .
Let B = {b0, b1, . . . , bM} be the set of decision boundaries
and Y = {y1, y2, . . . , yM} be the set of
reconstruction or output values. Suppose the input is
uniformly distributed in the interval [−Xmax, Xmax].
The rate of the quantizer is:
 R = [log2 M].
 That is, R is the number of bits required to code M things—in this
case, the M output levels.
 The step size is given by
 = 2Xmax
 M
R = [-1.5,1.5] , M = 4 level , X = [1.2,-0.2 ,0.1,-
1.2]
2.Xmax
= m
= 2. 1.5 = 3 = 0.75
m 4
X = 0.75 + 1.5 = 1.125
2
EX:
Example
 For the following sequence {1.2,-0.2,-0.5,0.4,0.89,1.3…}, Quantize it using a
 uniform quantizer in the range of (-1.5,1.5) with 4 levels, and write the
quantized sequence.
 Solution: Q=3/4=0.75. Quantizer is illustrated below.
 Quantized sequence:
 {1.125,-0.375,-0.375,0.375,1.125,1.125}
 Yellow dots indicate the partition levels (boundaries between separate
quantization intervals)
 Red dots indicate the reconstruction levels (middle of each interval)
 1.2 fall between 0.75 and 1.5, and hence is quantized to 1.125
Nonuniform Scalar
Quantization
 If the input source is not uniformly distributed, a
uniform quantizer may be inefficient.
 Increasing the number of decision levels within
the region where the source is densely distributed
can effectively lower granular distortion. In
addition, without having to increase the total
number of decision levels, we can enlarge the
region in which the source is sparsely distributed.
Such nonuniform quantizers thus have
nonuniformly defined decision boundaries.
 There are two common approaches for
nonuniform quantization: the Lloyd–Max
quantizer and the companded
quantizer.
Vector Quantization
 One of the fundamental ideas in Shannon’s
original work on information theory is that any
compression system performs better if it operates
on vectors or groups of samples rather than on
individual symbols or samples . We can form
vectors of input samples by concatenating a
number of consecutive samples into a single
vector.
 For example, an input vector might be a segment
of a speech sample, a group of consecutive
pixels in an image, or a chunk of data in any other
format. The idea
behind vector quantization (VQ) is similar to that
Vector Quantization
Instead of representing values within an
interval in one-dimensional space by a
reconstruction value, as in scalar
quantization,
 VQ an n-component code vector represents
vectors that lie within a region in n-
dimensional space.
A collection of these code vectors forms the
codebook for the vector quantizer.
Transform Coding
 From basic principles of information theory, we know
that coding vectors is more efficient than coding
scalars. To carry out such an intention, we need to
group blocks of consecutive samples from the source
input into vectors.
 Let X = {x1, x2, . . . , xk }T be a vector of samples.
Whether our input data is an image, a piece of music,
an audio or video clip, or even a piece of text, there is
a good chance that a substantial amount of
correlation is inherent among neighboring samples xi .
 The rationale behind transform coding is that if Y is
the result of a linear transform T of the input vector X
in such a way that the components of Y are much
less correlated, then Y can be coded more efficiently
than X.
 Generally, the transform T itself does not
compress any data. The compressio n comes
Discrete Cosine Transform
(DCT)
 The Discrete Cosine Transform (DCT)
a widely used transform coding technique,
is able to perform decorrelation of the input signal in a
data-independent,
 Because of this, it has gained tremendous popularity .
Definition of DCT
Let’s start with the two-dimensional DCT. Given a
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:
2D Discrete Cosine Transform (2D
DCT)
where i, j, u, v = 0, 1, . . . , 7, and the
constants C(u) and C(v) are determined by
Eq(8.16).
• The 2D transforms are applicable to
2D signals, such as digital images
1D Discrete Cosine Transform (1D
DCT)
1D Inverse Discrete Cosine Transform (1D-
IDCT)
where i = 0, 1, . . . , 7,u = 0, 1, . . . , 7and
the constants C(u) and C(v) is the same
as in Eq(8.16).
One-Dimensional DCT
Let’s examine the DCT for a one-dimensional
signal; almost all concepts are readily
extensible to the 2D DCT.
 An electrical signal with constant magnitude
is known as a DC (direct current) signal. A
common example is a battery that carries 1.5
or 9 volts DC.
 An electrical signal that changes its
magnitude periodically at a certain frequency
is known as an AC (alternating current) signal.
A good example is the household electric
power circuit, which carries electricity with
One-Dimensional DCT
 Most real signals are more complex. Speech signals or a
row of gray-level intensities in a digital image are examples
of such 1D signals.
 However, any signal can be expressed as a sum of
multiple signals that are sine or cosine waveforms at
various amplitudes and frequencies. This is known as
Fourier analysis.
 The terms DC and AC, originating in electrical engineering,
are carried over to describe these components of a signal
(usually) composed of one DC and several AC
components.
 If a cosine function is used, the process of determining the
amplitudes of the AC and DC components of the signal is
called a Cosine Transform, and the integer indices make it
a Discrete Cosine Transform. When u = 0, Eq. (8.19)
yields the DC coefficient; when u = 1, or 2,..., up to 7, it
yields the first or second, etc., up to the seventh AC
Example 8.1
= 0
The Cosine Basis Functions
For a better decomposition, the basis functions
should be orthogonal, so as to have the least
redundancy among them.
2D Basis Functions
Fig. 8.9 Graphical
illustration of 8 × 8 2D DCT
basis i
j
u
v
Wavelet-Based Coding
 Wavelets are a more general way to represent
and analyze multiresolution images
 Can also be applied to 1D signals
 Very useful for :
– image compression (e.g., in the JPG-2000
standard)
– removing noise
Wavelet Analysis
Wavelet-Based Coding
Decomposing the input signal into its
constituents allows us to apply coding
techniques suitable for each constituent, to
improve compression performance.
 time-dependent signal f (t) ,The
traditional method of signal decomposition
is the Fourier transform .
. If we carry out analysis based on both
sine and cosine, then a concise notation
assembles the results into a function F(w),
a complex-valued function of real-valued
Wavelet-Based Coding
the method of decomposition that has gained
a great deal of popularity in recent years is the
wavelet transform. It seeks to represent a
signal with good resolution in both time and
frequency, by using a set of basis functions
called wavelets.
There are two types of wavelet transforms.
the Continuous Wavelet Transform (CWT) and
the Discrete Wavelet Transform (DWT).
Wavelet-Based Coding
 The other kind of wavelet transform, the DWT, operates on
discrete samples of
the input signal. The DWT resembles other discrete linear
transforms, such as the
DFT or the DCT, and is very useful for image processing and
compression.
 let’s develop an intuition about this approach by going through
an example using the simplest wavelet transform, the so-called
Haar Wavelet Transform, to form averages and differences of a
sequence of float values.
 If we repeatedly take averages and differences and keep results
for every step, create a multiresolution analysis of the sequence.
 For images, this would be equivalent to creating smaller and
smaller summary images, one-quarter the size for each step,
and keeping track of differences from the average as well.
Mentally stacking the full-size image, the quarter-size image, the
2D HaarWavelet Transform
 We begin by applying a one-dimensional Haar
wavelet transform to each row of the input. The first
and last two rows of the input are trivial. After
performing the averaging and differencing operations
on the remaining rows, we obtain the intermediate
output shown in Fig. 8.14. (Intermediate output of the 2D
Haar Wavelet Transform) 00000000
00000000
032-3200191950
064-64001911910
064-64001911910
032-320095950
00000000
00000000
Discrete Wavelet Transform*
2D DiscreteWavelet Transform
2D Discrete Wavelet Transform
LL: The upper left quadrant consists of all coefficients, which were filtered by
the analysis
low pass filter ˜h along the rows and then filtered along the corresponding
columns with
the analysis low pass filter ˜h again. This subblock is denoted by LL and
represents the
approximated version of the original at half the resolution.
HL/LH: The lower left and the upper right blocks were filtered along the rows
and columns with
˜h and ˜g, alternatively.
The LH block contains vertical edges, mostly. In contrast, the HL
blocks shows horizontal edges very clearly.
HH: The lower right quadrant was derived analogously to the upper left
quadrant but with the
use of the analysis high pass filter ˜g which belongs to the given wavelet. We
can interpret
this block as the area, where we find edges of the original image in diagonal
direction.
 The two dimensional wavelet transform can be applied to the coarser version
 The inverse transform simply reverses the steps of
the forward transform.
1. For each stage of the transformed image, starting
with the last, separate each column into low-pass and
high-pass coefficients. Upsample each of the low-
pass and high-pass arrays by inserting a zero after
each coefficient.
2. Convolve the low-pass coefficients with h0[n] and
high-pass coefficients with h1[n] and add the two
resulting arrays.
3. After all columns have been processed, separate
each row into low-pass and high-pass coefficients and
upsample each of the two arrays by inserting a zero
after each coefficient.
4. Convolve the low-pass coefficients with h0[n] and
high-pass coefficients with h1[n] and add the two
Multimedia lossy compression algorithms

More Related Content

What's hot

Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial DomainDEEPASHRI HK
 
Transform coding
Transform codingTransform coding
Transform codingNancy K
 
Wavelet based image compression technique
Wavelet based image compression techniqueWavelet based image compression technique
Wavelet based image compression techniquePriyanka Pachori
 
Video Compression Techniques
Video Compression TechniquesVideo Compression Techniques
Video Compression Techniquescnssources
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standardsMazin Alwaaly
 
Image compression in digital image processing
Image compression in digital image processingImage compression in digital image processing
Image compression in digital image processingDHIVYADEVAKI
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency DomainAmnaakhaan
 
Interpixel redundancy
Interpixel redundancyInterpixel redundancy
Interpixel redundancyNaveen Kumar
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGmuthu181188
 
Predictive coding
Predictive codingPredictive coding
Predictive codingp_ayal
 
Chapter 5 - Data Compression
Chapter 5 - Data CompressionChapter 5 - Data Compression
Chapter 5 - Data CompressionPratik Pradhan
 

What's hot (20)

Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Transform coding
Transform codingTransform coding
Transform coding
 
Wavelet based image compression technique
Wavelet based image compression techniqueWavelet based image compression technique
Wavelet based image compression technique
 
Video Compression Techniques
Video Compression TechniquesVideo Compression Techniques
Video Compression Techniques
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standards
 
JPEG
JPEGJPEG
JPEG
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
 
Image compression in digital image processing
Image compression in digital image processingImage compression in digital image processing
Image compression in digital image processing
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
Digital image processing
Digital image processing  Digital image processing
Digital image processing
 
Interpixel redundancy
Interpixel redundancyInterpixel redundancy
Interpixel redundancy
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSING
 
Data compression
Data compressionData compression
Data compression
 
Predictive coding
Predictive codingPredictive coding
Predictive coding
 
Run length encoding
Run length encodingRun length encoding
Run length encoding
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Chapter 5 - Data Compression
Chapter 5 - Data CompressionChapter 5 - Data Compression
Chapter 5 - Data Compression
 
H261
H261H261
H261
 
Noise Models
Noise ModelsNoise Models
Noise Models
 

Similar to Multimedia lossy compression algorithms

Dynamic time wrapping (dtw), vector quantization(vq), linear predictive codin...
Dynamic time wrapping (dtw), vector quantization(vq), linear predictive codin...Dynamic time wrapping (dtw), vector quantization(vq), linear predictive codin...
Dynamic time wrapping (dtw), vector quantization(vq), linear predictive codin...Tanjarul Islam Mishu
 
International Journal of Engineering Research and Development (IJERD)
 International Journal of Engineering Research and Development (IJERD) International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Vector Quantization Vs Scalar Quantization
Vector Quantization Vs Scalar Quantization Vector Quantization Vs Scalar Quantization
Vector Quantization Vs Scalar Quantization ManasiKaur
 
Performance bounds for unequally punctured
Performance bounds for unequally puncturedPerformance bounds for unequally punctured
Performance bounds for unequally puncturedeSAT Publishing House
 
Performance bounds for unequally punctured terminated convolutional codes
Performance bounds for unequally punctured terminated convolutional codesPerformance bounds for unequally punctured terminated convolutional codes
Performance bounds for unequally punctured terminated convolutional codeseSAT Journals
 
My review on low density parity check codes
My review on low density parity check codesMy review on low density parity check codes
My review on low density parity check codespulugurtha venkatesh
 
Energy-Efficient LDPC Decoder using DVFS for binary sources
Energy-Efficient LDPC Decoder using DVFS for binary sourcesEnergy-Efficient LDPC Decoder using DVFS for binary sources
Energy-Efficient LDPC Decoder using DVFS for binary sourcesIDES Editor
 
Image processing
Image processingImage processing
Image processingmaheshpene
 
Convolutional Error Control Coding
Convolutional Error Control CodingConvolutional Error Control Coding
Convolutional Error Control CodingMohammed Abuibaid
 
image compression in data compression
image compression in data compressionimage compression in data compression
image compression in data compressionZaabir Ali
 
Error Detection N Correction
Error Detection N CorrectionError Detection N Correction
Error Detection N CorrectionAnkan Adhikari
 

Similar to Multimedia lossy compression algorithms (20)

Dynamic time wrapping (dtw), vector quantization(vq), linear predictive codin...
Dynamic time wrapping (dtw), vector quantization(vq), linear predictive codin...Dynamic time wrapping (dtw), vector quantization(vq), linear predictive codin...
Dynamic time wrapping (dtw), vector quantization(vq), linear predictive codin...
 
Lossy
LossyLossy
Lossy
 
International Journal of Engineering Research and Development (IJERD)
 International Journal of Engineering Research and Development (IJERD) International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Vector Quantization Vs Scalar Quantization
Vector Quantization Vs Scalar Quantization Vector Quantization Vs Scalar Quantization
Vector Quantization Vs Scalar Quantization
 
E017263040
E017263040E017263040
E017263040
 
Lassy
LassyLassy
Lassy
 
Performance bounds for unequally punctured
Performance bounds for unequally puncturedPerformance bounds for unequally punctured
Performance bounds for unequally punctured
 
dsp
dspdsp
dsp
 
coding.pdf
coding.pdfcoding.pdf
coding.pdf
 
Real time signal processing
Real time signal processingReal time signal processing
Real time signal processing
 
Performance bounds for unequally punctured terminated convolutional codes
Performance bounds for unequally punctured terminated convolutional codesPerformance bounds for unequally punctured terminated convolutional codes
Performance bounds for unequally punctured terminated convolutional codes
 
My review on low density parity check codes
My review on low density parity check codesMy review on low density parity check codes
My review on low density parity check codes
 
Energy-Efficient LDPC Decoder using DVFS for binary sources
Energy-Efficient LDPC Decoder using DVFS for binary sourcesEnergy-Efficient LDPC Decoder using DVFS for binary sources
Energy-Efficient LDPC Decoder using DVFS for binary sources
 
LDPC Encoding
LDPC EncodingLDPC Encoding
LDPC Encoding
 
ma92008id393
ma92008id393ma92008id393
ma92008id393
 
Image processing
Image processingImage processing
Image processing
 
Convolutional Error Control Coding
Convolutional Error Control CodingConvolutional Error Control Coding
Convolutional Error Control Coding
 
Digital communication unit II
Digital communication unit IIDigital communication unit II
Digital communication unit II
 
image compression in data compression
image compression in data compressionimage compression in data compression
image compression in data compression
 
Error Detection N Correction
Error Detection N CorrectionError Detection N Correction
Error Detection N Correction
 

More from Mazin Alwaaly

Pattern recognition voice biometrics
Pattern recognition voice biometricsPattern recognition voice biometrics
Pattern recognition voice biometricsMazin Alwaaly
 
Pattern recognition palm print authentication system
Pattern recognition palm print authentication systemPattern recognition palm print authentication system
Pattern recognition palm print authentication systemMazin Alwaaly
 
Pattern recognition on line signature
Pattern recognition on line signaturePattern recognition on line signature
Pattern recognition on line signatureMazin Alwaaly
 
Pattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and earPattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and earMazin Alwaaly
 
Pattern recognition IRIS recognition
Pattern recognition IRIS recognitionPattern recognition IRIS recognition
Pattern recognition IRIS recognitionMazin Alwaaly
 
Pattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognitionPattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognitionMazin Alwaaly
 
Pattern recognition Hand Geometry
Pattern recognition Hand GeometryPattern recognition Hand Geometry
Pattern recognition Hand GeometryMazin Alwaaly
 
Pattern recognition forensic dental identification
Pattern recognition forensic dental identificationPattern recognition forensic dental identification
Pattern recognition forensic dental identificationMazin Alwaaly
 
Pattern recognition fingerprints
Pattern recognition fingerprintsPattern recognition fingerprints
Pattern recognition fingerprintsMazin Alwaaly
 
Pattern recognition facial recognition
Pattern recognition facial recognitionPattern recognition facial recognition
Pattern recognition facial recognitionMazin Alwaaly
 
Pattern recognition ear as a biometric
Pattern recognition ear as a biometricPattern recognition ear as a biometric
Pattern recognition ear as a biometricMazin Alwaaly
 
Pattern recognition 3d face recognition
Pattern recognition 3d face recognitionPattern recognition 3d face recognition
Pattern recognition 3d face recognitionMazin Alwaaly
 
Multimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networksMultimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networksMazin Alwaaly
 
Multimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communicationsMultimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communicationsMazin Alwaaly
 
Multimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMultimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMazin Alwaaly
 
Multimedia lossless compression algorithms
Multimedia lossless compression algorithmsMultimedia lossless compression algorithms
Multimedia lossless compression algorithmsMazin Alwaaly
 
Multimedia fundamental concepts in video
Multimedia fundamental concepts in videoMultimedia fundamental concepts in video
Multimedia fundamental concepts in videoMazin Alwaaly
 
Multimedia color in image and video
Multimedia color in image and videoMultimedia color in image and video
Multimedia color in image and videoMazin Alwaaly
 
Multimedia graphics and image data representation
Multimedia graphics and image data representationMultimedia graphics and image data representation
Multimedia graphics and image data representationMazin Alwaaly
 
Information and data security steganography and watermarking
Information and data security steganography and watermarkingInformation and data security steganography and watermarking
Information and data security steganography and watermarkingMazin Alwaaly
 

More from Mazin Alwaaly (20)

Pattern recognition voice biometrics
Pattern recognition voice biometricsPattern recognition voice biometrics
Pattern recognition voice biometrics
 
Pattern recognition palm print authentication system
Pattern recognition palm print authentication systemPattern recognition palm print authentication system
Pattern recognition palm print authentication system
 
Pattern recognition on line signature
Pattern recognition on line signaturePattern recognition on line signature
Pattern recognition on line signature
 
Pattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and earPattern recognition multi biometrics using face and ear
Pattern recognition multi biometrics using face and ear
 
Pattern recognition IRIS recognition
Pattern recognition IRIS recognitionPattern recognition IRIS recognition
Pattern recognition IRIS recognition
 
Pattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognitionPattern recognition hand vascular pattern recognition
Pattern recognition hand vascular pattern recognition
 
Pattern recognition Hand Geometry
Pattern recognition Hand GeometryPattern recognition Hand Geometry
Pattern recognition Hand Geometry
 
Pattern recognition forensic dental identification
Pattern recognition forensic dental identificationPattern recognition forensic dental identification
Pattern recognition forensic dental identification
 
Pattern recognition fingerprints
Pattern recognition fingerprintsPattern recognition fingerprints
Pattern recognition fingerprints
 
Pattern recognition facial recognition
Pattern recognition facial recognitionPattern recognition facial recognition
Pattern recognition facial recognition
 
Pattern recognition ear as a biometric
Pattern recognition ear as a biometricPattern recognition ear as a biometric
Pattern recognition ear as a biometric
 
Pattern recognition 3d face recognition
Pattern recognition 3d face recognitionPattern recognition 3d face recognition
Pattern recognition 3d face recognition
 
Multimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networksMultimedia multimedia over wireless and mobile networks
Multimedia multimedia over wireless and mobile networks
 
Multimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communicationsMultimedia network services and protocols for multimedia communications
Multimedia network services and protocols for multimedia communications
 
Multimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMultimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital libraries
 
Multimedia lossless compression algorithms
Multimedia lossless compression algorithmsMultimedia lossless compression algorithms
Multimedia lossless compression algorithms
 
Multimedia fundamental concepts in video
Multimedia fundamental concepts in videoMultimedia fundamental concepts in video
Multimedia fundamental concepts in video
 
Multimedia color in image and video
Multimedia color in image and videoMultimedia color in image and video
Multimedia color in image and video
 
Multimedia graphics and image data representation
Multimedia graphics and image data representationMultimedia graphics and image data representation
Multimedia graphics and image data representation
 
Information and data security steganography and watermarking
Information and data security steganography and watermarkingInformation and data security steganography and watermarking
Information and data security steganography and watermarking
 

Recently uploaded

Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfmuntazimhurra
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoSérgio Sacani
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticssakshisoni2385
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsSérgio Sacani
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfSumit Kumar yadav
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bSérgio Sacani
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptxRajatChauhan518211
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)Areesha Ahmad
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencySheetal Arora
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PPRINCE C P
 
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINsankalpkumarsahoo174
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsSumit Kumar yadav
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPirithiRaju
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...ssifa0344
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptxanandsmhk
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bSérgio Sacani
 

Recently uploaded (20)

Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdf
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceuticsPulmonary drug delivery system M.pharm -2nd sem P'ceutics
Pulmonary drug delivery system M.pharm -2nd sem P'ceutics
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdf
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
 
Green chemistry and Sustainable development.pptx
Green chemistry  and Sustainable development.pptxGreen chemistry  and Sustainable development.pptx
Green chemistry and Sustainable development.pptx
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATINChromatin Structure | EUCHROMATIN | HETEROCHROMATIN
Chromatin Structure | EUCHROMATIN | HETEROCHROMATIN
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questions
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
TEST BANK For Radiologic Science for Technologists, 12th Edition by Stewart C...
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 

Multimedia lossy compression algorithms

  • 2. •Distortion Measures •The Rate-Distortion Theory •Quantization •Uniform Scalar Quantization •Nonuniform Scalar Quantization •Vector Quantization •Transform Coding •Discrete Cosine Transform (DCT) outline
  • 3. Outline • 2D Discrete Cosine Transform (2D DCT) • 1D Discrete Cosine Transform (1D DCT) • 1D Inverse Discrete Cosine Transform (1D-IDCT) • One-Dimensional DCT • The Cosine Basis Functions • 2D Basis Functions • Wavelet-Based Coding • 2D Haar Wavelet Transform • Discrete Wavelet Transform* • 2D Discrete Wavelet Transform
  • 4. What is lossy compression?  The compressed data is not the same as the original data, but a close approximation of it. Yields a much higher compression ratio than that of lossless compression.
  • 5. Distortion Measures A distortion measure is a mathematical quantity that specifies how close an approximation is to its original, using some distortion criteria. When looking at compressed data, it is natural to think the distortion :in terms of the numerical difference between the original data and the reconstructed data. However, when the data to be compressed is an image, such a measure may not yield the intended result.
  • 6. Distortion Measures  The three most commonly used distortion measures in image compression are:  mean square error (MSE) σ2, (8.1) where xn, yn, and N are the input data sequence, reconstructed data sequence, and length of the data sequence respectively.  signal to noise ratio (SNR), in decibel units (dB), (8.2) where σ2 x is the average square value of the original data sequence and σ2d is the MSE.  peak signal to noise ratio (PSNR), (8.3) 2 10 2 10log x d SNR    2 10 2 10log peak d x PSNR   2 2 1 1 ( ) N n n n x y N    
  • 7. The Rate-Distortion Theory  Lossy compression always involves a tradeoff between rate and distortion. Rate is the average number of bits required to represent each source symbol. Within this framework, the tradeoff between rate and distortion is represented in the form of a rate-distortion function R(D).  Intuitively, for a given source and a given distortion measure, if D is a tolerable amount of distortion, R(D) specifies the lowest rate at which the source data can be encoded while keeping the distortion bounded above by D. It is easy to see that when D = 0, we have a lossless compression of the source.  The rate-distortion function is meant to describe a fundamental limit for the performance of a coding algorithm and so can be used to evaluate the performance of different algorithms.
  • 8. Figure 8.1 shows a typical rate-distortion function. Notice that the minimum possible rate at D = 0, no loss, is the entropy of the source data. The distortion corresponding to a rate R(D) ⇒ 0 is the maximum amount of distortion incurred when “ nothing ” is coded.
  • 9. Quantization Quantization in some form is the heart of any lossy scheme. Without quantization, we would indeed be losing little information. Here, we embark on a more detailed discussion of quantization. The source we are interested in compressing may contain a large number of distinct output values (or even infinite, if analog). To efficiently represent the source output, we have to reduce the number of distinct values to a much smaller set, via quantization.
  • 10. Quantization Each algorithm (each quantizer) can be uniquely determined by its partition of the input range, on the encoder side, and the set of output values, on the decoder side. The input and output of each quantizer can be either scalar values or vector values, thus leading to scalar quantizers and vector quantizers. In this section, we examine the design of both uniform and nonuniform scalar quantizers and briefly introduce the topic of vector quantization (VQ).
  • 11. Uniform Scalar Quantization A uniform scalar quantizer partitions the domain of input values into equally spaced intervals, except possibly at the two outer intervals. The endpoints of partition intervals are called the quantizer’s decision boundaries. The output or reconstruction value corresponding to each interval is taken to be the midpoint of the interval. The length of each interval is referred to as the step size, denoted by the symbol . Uniform scalar quantizers are of two types: midrise and midtread. A midrise quantizer is used with an even number of output levels, and a midtread quantizer with an odd number. The midrise
  • 12.
  • 13. Uniform Scalar Quantization  The midtread quantizer has zero as one of its output values, hence, it is also known as dead- zone quantizer, because it turns a range of nonzero input values into the zero output.  The midtread quantizer is important when source data represents the zero value by fluctuating between small positive and negative numbers. Applying the midtread quantizer in this case would produce an accurate and steady representation of the value zero. For the special case = 1, we can simply compute the output values for  these quantizers as Qmidrise(x) = [x]− 0.5
  • 14. Uniform Scalar Quantization  The goal for the design of a successful uniform quantizer is to minimize the distortion for a given source input with a desired number of output values. This can be done by adjusting the step size to match the input statistics.Let’s examine the performance of an M level quantizer . Let B = {b0, b1, . . . , bM} be the set of decision boundaries and Y = {y1, y2, . . . , yM} be the set of reconstruction or output values. Suppose the input is uniformly distributed in the interval [−Xmax, Xmax]. The rate of the quantizer is:  R = [log2 M].  That is, R is the number of bits required to code M things—in this case, the M output levels.  The step size is given by  = 2Xmax  M
  • 15. R = [-1.5,1.5] , M = 4 level , X = [1.2,-0.2 ,0.1,- 1.2] 2.Xmax = m = 2. 1.5 = 3 = 0.75 m 4 X = 0.75 + 1.5 = 1.125 2 EX:
  • 16. Example  For the following sequence {1.2,-0.2,-0.5,0.4,0.89,1.3…}, Quantize it using a  uniform quantizer in the range of (-1.5,1.5) with 4 levels, and write the quantized sequence.  Solution: Q=3/4=0.75. Quantizer is illustrated below.  Quantized sequence:  {1.125,-0.375,-0.375,0.375,1.125,1.125}  Yellow dots indicate the partition levels (boundaries between separate quantization intervals)  Red dots indicate the reconstruction levels (middle of each interval)  1.2 fall between 0.75 and 1.5, and hence is quantized to 1.125
  • 17. Nonuniform Scalar Quantization  If the input source is not uniformly distributed, a uniform quantizer may be inefficient.  Increasing the number of decision levels within the region where the source is densely distributed can effectively lower granular distortion. In addition, without having to increase the total number of decision levels, we can enlarge the region in which the source is sparsely distributed. Such nonuniform quantizers thus have nonuniformly defined decision boundaries.  There are two common approaches for nonuniform quantization: the Lloyd–Max quantizer and the companded quantizer.
  • 18. Vector Quantization  One of the fundamental ideas in Shannon’s original work on information theory is that any compression system performs better if it operates on vectors or groups of samples rather than on individual symbols or samples . We can form vectors of input samples by concatenating a number of consecutive samples into a single vector.  For example, an input vector might be a segment of a speech sample, a group of consecutive pixels in an image, or a chunk of data in any other format. The idea behind vector quantization (VQ) is similar to that
  • 19. Vector Quantization Instead of representing values within an interval in one-dimensional space by a reconstruction value, as in scalar quantization,  VQ an n-component code vector represents vectors that lie within a region in n- dimensional space. A collection of these code vectors forms the codebook for the vector quantizer.
  • 20.
  • 21. Transform Coding  From basic principles of information theory, we know that coding vectors is more efficient than coding scalars. To carry out such an intention, we need to group blocks of consecutive samples from the source input into vectors.  Let X = {x1, x2, . . . , xk }T be a vector of samples. Whether our input data is an image, a piece of music, an audio or video clip, or even a piece of text, there is a good chance that a substantial amount of correlation is inherent among neighboring samples xi .  The rationale behind transform coding is that if Y is the result of a linear transform T of the input vector X in such a way that the components of Y are much less correlated, then Y can be coded more efficiently than X.  Generally, the transform T itself does not compress any data. The compressio n comes
  • 22.
  • 23. Discrete Cosine Transform (DCT)  The Discrete Cosine Transform (DCT) a widely used transform coding technique, is able to perform decorrelation of the input signal in a data-independent,  Because of this, it has gained tremendous popularity . Definition of DCT Let’s start with the two-dimensional DCT. Given a 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:
  • 24.
  • 25. 2D Discrete Cosine Transform (2D DCT) where i, j, u, v = 0, 1, . . . , 7, and the constants C(u) and C(v) are determined by Eq(8.16). • The 2D transforms are applicable to 2D signals, such as digital images
  • 26. 1D Discrete Cosine Transform (1D DCT)
  • 27. 1D Inverse Discrete Cosine Transform (1D- IDCT) where i = 0, 1, . . . , 7,u = 0, 1, . . . , 7and the constants C(u) and C(v) is the same as in Eq(8.16).
  • 28. One-Dimensional DCT Let’s examine the DCT for a one-dimensional signal; almost all concepts are readily extensible to the 2D DCT.  An electrical signal with constant magnitude is known as a DC (direct current) signal. A common example is a battery that carries 1.5 or 9 volts DC.  An electrical signal that changes its magnitude periodically at a certain frequency is known as an AC (alternating current) signal. A good example is the household electric power circuit, which carries electricity with
  • 29. One-Dimensional DCT  Most real signals are more complex. Speech signals or a row of gray-level intensities in a digital image are examples of such 1D signals.  However, any signal can be expressed as a sum of multiple signals that are sine or cosine waveforms at various amplitudes and frequencies. This is known as Fourier analysis.  The terms DC and AC, originating in electrical engineering, are carried over to describe these components of a signal (usually) composed of one DC and several AC components.  If a cosine function is used, the process of determining the amplitudes of the AC and DC components of the signal is called a Cosine Transform, and the integer indices make it a Discrete Cosine Transform. When u = 0, Eq. (8.19) yields the DC coefficient; when u = 1, or 2,..., up to 7, it yields the first or second, etc., up to the seventh AC
  • 31.
  • 32.
  • 33. = 0
  • 34. The Cosine Basis Functions For a better decomposition, the basis functions should be orthogonal, so as to have the least redundancy among them.
  • 35.
  • 37. Fig. 8.9 Graphical illustration of 8 × 8 2D DCT basis i j u v
  • 38. Wavelet-Based Coding  Wavelets are a more general way to represent and analyze multiresolution images  Can also be applied to 1D signals  Very useful for : – image compression (e.g., in the JPG-2000 standard) – removing noise
  • 40.
  • 41. Wavelet-Based Coding Decomposing the input signal into its constituents allows us to apply coding techniques suitable for each constituent, to improve compression performance.  time-dependent signal f (t) ,The traditional method of signal decomposition is the Fourier transform . . If we carry out analysis based on both sine and cosine, then a concise notation assembles the results into a function F(w), a complex-valued function of real-valued
  • 42. Wavelet-Based Coding the method of decomposition that has gained a great deal of popularity in recent years is the wavelet transform. It seeks to represent a signal with good resolution in both time and frequency, by using a set of basis functions called wavelets. There are two types of wavelet transforms. the Continuous Wavelet Transform (CWT) and the Discrete Wavelet Transform (DWT).
  • 43. Wavelet-Based Coding  The other kind of wavelet transform, the DWT, operates on discrete samples of the input signal. The DWT resembles other discrete linear transforms, such as the DFT or the DCT, and is very useful for image processing and compression.  let’s develop an intuition about this approach by going through an example using the simplest wavelet transform, the so-called Haar Wavelet Transform, to form averages and differences of a sequence of float values.  If we repeatedly take averages and differences and keep results for every step, create a multiresolution analysis of the sequence.  For images, this would be equivalent to creating smaller and smaller summary images, one-quarter the size for each step, and keeping track of differences from the average as well. Mentally stacking the full-size image, the quarter-size image, the
  • 44.
  • 45. 2D HaarWavelet Transform  We begin by applying a one-dimensional Haar wavelet transform to each row of the input. The first and last two rows of the input are trivial. After performing the averaging and differencing operations on the remaining rows, we obtain the intermediate output shown in Fig. 8.14. (Intermediate output of the 2D Haar Wavelet Transform) 00000000 00000000 032-3200191950 064-64001911910 064-64001911910 032-320095950 00000000 00000000
  • 47.
  • 48.
  • 50. 2D Discrete Wavelet Transform LL: The upper left quadrant consists of all coefficients, which were filtered by the analysis low pass filter ˜h along the rows and then filtered along the corresponding columns with the analysis low pass filter ˜h again. This subblock is denoted by LL and represents the approximated version of the original at half the resolution. HL/LH: The lower left and the upper right blocks were filtered along the rows and columns with ˜h and ˜g, alternatively. The LH block contains vertical edges, mostly. In contrast, the HL blocks shows horizontal edges very clearly. HH: The lower right quadrant was derived analogously to the upper left quadrant but with the use of the analysis high pass filter ˜g which belongs to the given wavelet. We can interpret this block as the area, where we find edges of the original image in diagonal direction.  The two dimensional wavelet transform can be applied to the coarser version
  • 51.
  • 52.
  • 53.  The inverse transform simply reverses the steps of the forward transform. 1. For each stage of the transformed image, starting with the last, separate each column into low-pass and high-pass coefficients. Upsample each of the low- pass and high-pass arrays by inserting a zero after each coefficient. 2. Convolve the low-pass coefficients with h0[n] and high-pass coefficients with h1[n] and add the two resulting arrays. 3. After all columns have been processed, separate each row into low-pass and high-pass coefficients and upsample each of the two arrays by inserting a zero after each coefficient. 4. Convolve the low-pass coefficients with h0[n] and high-pass coefficients with h1[n] and add the two