DATA COMPRESSION
UNIT 4
Ques 1 Write a short note on Multi resolution analysis and scaling
function
Multi Resolution Analysis (MRA) and Scaling Function
Multi Resolution Analysis (MRA) is a mathematical technique used in wavelet
transform, signal processing, and data compression. It represents a signal at
different levels of resolution, from coarse to fine. MRA helps in analyzing both
low-frequency and high-frequency components of a signal efficiently.
In MRA, a signal is decomposed into:
Approximation components → low-frequency information
Detail components → high-frequency information
This allows efficient storage, transmission, denoising, and compression of signals
and images.
Wavelet Transform
Wavelet transform decomposes a signal into small wavelets.
Unlike Fourier transform, wavelets provide:
Frequency information
Location information
Therefore, wavelets are suitable for analyzing non-stationary signals such as
images, audio, and videos.
Scaling Function
The scaling function is denoted by:
ϕ (t )
It is also called the father wavelet.
The scaling function represents the low-frequency or smooth part of the signal. It
provides a coarse approximation of the original signal and generates
approximation spaces at different resolutions.
Functions of Scaling Function
Represents low-frequency components
Generates approximation coefficients
Produces smooth representation of the signal
Forms the basis for wavelet construction
Detail Function (Wavelet Function)
The detail function is denoted by:
ψ (t)
It captures:
High-frequency components
Edges and sudden changes in the signal
The detail function provides fine details of the signal.
Hierarchical Structure of MRA
MRA represents a signal at multiple levels:
Coarse resolution → overall shape
Fine resolution → detailed information
Thus, the signal can be represented as:
Signal=Approximation+ Details
This hierarchical structure helps in efficient compression and reconstruction.
Steps in Multi Resolution Analysis
1. Decomposition
The signal is decomposed using scaling and wavelet functions into approximation
and detail coefficients.
2. Thresholding
Small coefficients are removed to reduce redundancy and noise.
3. Reconstruction
The original signal is reconstructed using inverse wavelet transform.
Applications of MRA
1. Image Compression (JPEG 2000)
2. Audio Compression
3. Video Compression
4. Signal Denoising
5. Medical Imaging
6. Satellite Image Processing
Advantages
Efficient compression
Preserves edges and details
Multi-resolution representation
Better noise reduction
Ques 2 Write a short note on JPEG 2000.
JPEG 2000
JPEG 2000 is an advanced image compression standard developed as an
improvement over the traditional JPEG format. It is mainly used for efficient
image storage and transmission with better image quality and higher
compression efficiency.
Unlike traditional JPEG, JPEG 2000 uses wavelet transform instead of Discrete
Cosine Transform (DCT). This helps in achieving better compression with less
image distortion.
Features of JPEG 2000
1. High Compression Efficiency
Provides better image quality even at high compression ratios.
2. Wavelet-Based Compression
Uses Discrete Wavelet Transform (DWT) for image decomposition.
3. Lossless and Lossy Compression
Supports both:
o Lossless compression → original image recovered completely
o Lossy compression → some information removed for higher
compression
4. Progressive Transmission
Image quality improves gradually during transmission.
5. Region of Interest (ROI)
Important parts of the image can be compressed with higher quality.
6. Error Resilience
Performs better in noisy communication channels.
Steps in JPEG 2000 Compression
1. Image Preprocessing
2. Discrete Wavelet Transform (DWT)
3. Quantization
4. Encoding (Entropy Coding)
5. Bitstream Formation
Advantages
Better compression than JPEG
Improved image quality
Supports large images
Reduced blocking artifacts
Suitable for medical and satellite images
Disadvantages
More computational complexity
Higher processing time
Requires more memory
Applications
Medical imaging
Digital libraries
Satellite imaging
Internet image transmission
Multimedia applications
Ques 3 Write a short on JPEG compression. Explain the procedure step
by step
JPEG Compression
JPEG (Joint Photographic Experts Group) is a widely used image compression
technique mainly used for photographic images. It reduces image file size while
maintaining acceptable image quality. JPEG uses lossy compression, which
means some image information is removed during compression.
JPEG is very effective for continuous-tone images such as:
Digital photographs
Web images
Multimedia images
Steps in JPEG Compression
1. Color Space Conversion
Initially, images are stored in RGB (Red, Green, Blue) format.
JPEG converts the image into YCbCr color space:
Y → Luminance (brightness)
Cb, Cr → Chrominance (color information)
Human eyes are more sensitive to brightness than color, so this conversion helps
achieve better compression.
2. Subsampling
The chrominance components (Cb and Cr) are reduced because the human eye
is less sensitive to color details.
Example:
4:2:0 subsampling
This reduces the amount of color data and decreases file size.
3. Block Splitting
The image is divided into small blocks of:
8×8
pixels.
Each block is compressed separately.
4. Discrete Cosine Transform (DCT)
Each 8×8 block undergoes DCT.
DCT converts image data from:
Spatial domain → Frequency domain
After DCT:
Low-frequency components contain important image information
High-frequency components contain fine details
Most high-frequency data can be reduced without major visual loss.
5. Quantization
The DCT coefficients are divided by quantization values and rounded off.
This is the main lossy step in JPEG compression.
Small coefficients become zero
Reduces unnecessary information
Achieves high compression
6. Zig-Zag Scanning
The quantized coefficients are arranged in zig-zag order.
Purpose:
Groups zero values together
Improves compression efficiency
7. Entropy Encoding
Finally, lossless encoding methods are used:
Run Length Encoding (RLE)
Huffman Coding
This removes statistical redundancy and generates the compressed JPEG file.
Advantages of JPEG Compression
High compression ratio
Reduced storage space
Faster image transmission
Widely supported format
Disadvantages
Loss of image quality
Blocking artifacts may appear at high compression
Not suitable for text or sharp-edged graphics
Applications
Digital photography
Web images
Multimedia systems
Social media image sharing
Ques 3 Explain vector Quantization procedure in detail.
Vector Quantization (VQ)
Vector Quantization (VQ) is a lossy compression technique used in image
compression, speech coding, and pattern recognition.
It compresses data by replacing groups of data values with representative
vectors called code vectors or codewords.
Instead of storing the original data, only the index of the closest codeword is
stored, which reduces storage space and transmission bandwidth.
Basic Idea of VQ
Similar data vectors are grouped into clusters.
Each cluster is represented by one vector called a code vector.
All code vectors together form a codebook.
During compression, each input vector is replaced by the index of the
nearest code vector.
Thus, large data can be represented using fewer bits.
Steps in Vector Quantization Procedure
1. Grouping into Vectors
The input image or signal is divided into small blocks or vectors.
Example:
2×2 pixel blocks
4×4 pixel blocks
Each block forms a vector.
2. Codebook Training
A training set is used to generate representative vectors called codewords.
The collection of all codewords is called the codebook.
The codebook contains vectors that best represent the original data.
3. Finding Closest Code Vector
For every input vector:
Compare it with all codewords in the codebook.
Calculate similarity using Euclidean distance.
The nearest codeword is selected.
4. Quantization
The original vector is replaced by:
The index number of the nearest codeword.
This reduces the amount of data significantly.
5. Encoding / Compression
Only the indices are transmitted or stored instead of complete vectors.
Thus:
Storage requirement decreases
Compression is achieved
6. Decoding / Reconstruction
At the receiver:
The decoder uses the same codebook.
Using the received index, the corresponding codeword is retrieved.
Original image or signal is approximately reconstructed.
Since VQ is lossy, reconstructed data may not be exactly identical to the original.
Advantages of Vector Quantization
High compression ratio
Reduces storage space
Fast decoding
Efficient for image and speech compression
Disadvantages
Loss of some information
Complex codebook generation
Quality depends on codebook design
Applications
Image compression
Speech coding
Pattern recognition
Video compression
Ques 5 Explain wavelet based compression process. Why is it
important? Also, write the Applications of wavelet compression.
Wavelet Based Compression
Wavelet-based compression is an advanced image compression technique that
uses wavelet transform to reduce image size while preserving image quality.
It is widely used in modern image compression standards such as JPEG 2000.
Unlike traditional JPEG compression, wavelet compression analyzes the image at
multiple resolutions and preserves important image features like edges and
textures more effectively.
Why Wavelets are Used?
Wavelets are important because they:
Preserve sharp edges and fine details
Provide multi-resolution analysis
Give better quality at high compression ratios
Reduce blocking artifacts seen in JPEG
Support progressive image transmission
Wavelet-Based Compression Process
Step 1: Input Image
The compression process starts with a grayscale or color image.
For color images:
RGB is converted into YCbCr format
Luminance (Y) is compressed carefully because human eyes are more
sensitive to brightness.
Step 2: Apply Discrete Wavelet Transform (DWT)
The image undergoes Discrete Wavelet Transform (DWT).
DWT divides the image into four sub-bands:
LL → Approximation (low frequency)
LH → Horizontal details
HL → Vertical details
HH → Diagonal details
DWT Decomposition Diagram
The LL band can again be decomposed into smaller sub-bands. This
process is called multi-level decomposition.
Step 3: Quantization
Wavelet coefficients are quantized by reducing their precision.
Less important coefficients are removed
High-frequency coefficients are heavily compressed
Reduces the number of bits required
This is the main lossy step.
Step 4: Entropy Encoding
The quantized coefficients are encoded using:
Run Length Encoding (RLE)
Huffman Coding
Arithmetic Coding
This produces the final compressed bitstream.
Step 5: Decompression
To reconstruct the image:
1. Decode the bitstream
2. Dequantize coefficients
3. Apply Inverse DWT (IDWT)
The image is reconstructed with high quality.
Importance of Wavelet Compression
1. Efficient Storage and Transmission
Wavelet compression significantly reduces file size, saving storage space and
bandwidth.
2. Better Image Quality
It preserves edges, textures, and fine details better than JPEG.
3. Multi-Resolution Representation
Images can be viewed at different resolutions without full decoding.
4. Progressive Transmission
A low-quality image appears first and gradually improves during transmission.
5. Suitable for Many Image Types
Works effectively for:
Medical images
Satellite images
Photographs
Scientific images
Advantages
High compression ratio
Better image quality
Reduced blocking artifacts
Supports scalability
Good for large images
Drawbacks
Complex algorithms
Higher computational cost
Slower processing
Compatibility limitations
Types of Wavelets
1. Haar Wavelet
Simplest wavelet
Fast computation
Uses step functions
2. Daubechies Wavelet
Smooth wavelets
Widely used in compression
3. Symlets
More symmetric version of Daubechies wavelets
Applications of Wavelet Compression
1. Image Compression (JPEG 2000)
2. Medical Imaging
3. Satellite Imaging
4. Audio Compression
5. Video Compression
6. Multimedia Applications
7. Signal Processing
Simple Wavelet Compression Flow Diagram
Conclusion
Wavelet-based compression is a powerful image compression technique
that provides high compression efficiency and superior image quality.
By using wavelet transform and multi-resolution analysis, it preserves
important image features while reducing storage and transmission
requirements.