chapter-5
chapter-5
chapter-5
2. Data that has been compressed using this technique 2. If data has been (lossless) compressed, the original
can’t be recovered and reconstructed exactly. data can be recovered from the compressed data.
3. Used for application that can tolerate difference 3. Used for application that can’t tolerate any
between the original and reconstructed data. difference between original and reconstructed data.
5. Sound and Image compression uses lossy 5. Text compression uses lossless compression
compression.
6. More data can be accommodated in channel. 6. Less data can be accommodated in channel.
3
Examples of
Redundancy
JPEG is an image compression standard
that was developed by the “Joint
Photographic Experts Group”.
JPEG Compression for color image
8x8 blocks Source
Image
DCT-based encoding
Entropy Compressed
FDCT Quantizer
Encoder image data
Table Table
JPEG Compression
▪ Baseline JPEG supports the subsampling of CB & CR according to 4:2:2 or 4:4:4 color formats
▪ Choosing 4:2:2 would be the first lossy step in the baseline compression
▪ The color space conversion is not applicable for Grayscale images
▪ Dimension of each component Y, Cb and Cr could be different, due to subsampling
▪ Each component is divided into 8 x 8 non overlapping blocks
▪ In non interleaved scan, each data blocks are coded from left to right & top to bottom
▪ In Interleaved scan, Minimum coded Unit (MCU) consists data blocks from all the three
components
❑ Level shift each pixel in the 8 x 8 block & convert it to signed integer (subtract 128)
❑ Transform each pixel in the block into frequency domain via forward discrete cosine
transform (FDCT)
❑ The FDCT for 8 x 8 block is defined by
❑ Transformed 8 × 8 block now consists of 64 DCT
coefficients
❑ The first coefficient F(0, 0) is the DC component
of the block
❑ DC components is the sum of all the 64 pixels in
the input scaled by 1/8
QUANTIZATION
Remaining 63 coefficients are AC components ACu,v = F(u, v) of the block. Each of the 64
coefficients are uniformly quantized
• Quantization Matrix gives the 64 quantization step-size parameters for uniform quantization
of the 64 DCT coefficients
– Each element in the quantization matrix is an integer between 1 and 255.
– Each DCT coefficient F(u, v) is divided by the corresponding quantizer step-size
parameter Q(u, v) in the quantization matrix and rounded to the nearest integer as
The JPEG quantization are given as follows:
16 11 10 16 24 40 51 61 17 18 24 47 99 99 99 99
12 12 14 19 26 58 60 55
18 21 26 66 99 99 99 99
14 13 16 24 40 57 69 56 24 26 56 99 99 99 99 99
14 17 22 29 51 87 80 62
=
47 66 99 99 99 99 99 99
QCL
18 QCR =
22 37 56 68 109 103 77 99 99 99 99 99 99 99 99
24 35 55 64 81 104 113 92 99 99 99 99 99 99 99 99
49 101 99
64 78 87 103 121 120
99 99 99 99 99 99 99
72 92 95 98 112 100 103 99 99 99 99 99 99 99 99 99
c( i , j ) k
u( i , j ) k = Round
Q( i , j )
Where c(i , j ) k is the frequency image signals at coordinates (i,j) in the k block.
9. Huffman Coding
Encoding AC Components
o Only the nonzero coefficients are encoded
that the runs of zeros preceding a nonzero
value are embedded into the encoding.
o Irregular ordering of the AC coefficients is
called zig-zag ordering
9. Huffman Coding
• This sequence of AC coefficients is mapped into an intermediate sequence of a combination of two
symbols, symbol1, symbol2
– symbol1 is represented by a pair (RUNLENGTH, CATEGORY)
RUNLENGTH is the number of consecutive zeros preceding the nonzero AC coefficient being
encoded
CATEGORY is the number of bits to represent the VLI code of this nonzero AC coefficient
o symbol2 is a single piece of information designated (AMPLITUDE) that is encoded by the VLI
code of the nonzero AC coefficient.
• Assume the zigzag ordering results in the sequence as follows
−6 6 −5 0 2 0 −1 0 0 0 0 0 −1 0 0 −1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
• This can be represented as (0, 3)(−6), (0, 3)(6), (0, 3)(−5), (1, 2)(2), (1, 1)(−1), (5, 1)(−1), (2, 1)(−1), (0, 1)(1),
9. Huffman Coding
Example 1
63 AC coefficience:
57, 45, 0, 0, 0, 0, 23, 0, -30, -16, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,..., 0
Run Length Coding :
(0,57) ; (0,45) ; (4,23) ; (1,-30) ; (0,-16) ; (2,1) ; EOB
Example 2
63 AC coefficience:
57, 0, 0, ... , 0, 3, 0, 0, 0, 0, 2, 0, 0, ... , 0, 895, EOB
Run Length Coding :
(0,57) ; (15,0) ; (2,3) ; (4,2) ; (15,0) ; (15,0) ; (1,895) ; (0,0)
Example
Run lenth coding of 63 AC coefficiences :
(0,57) ; (0,45) ; (4,23) ; (1,-30) ; (0,-8) ; (2,1) ; (0,0)
Encode the right value of these pair as category and bits for the value, except the special markers
like (0,0) or (15,0) :
(0,6,111001) ; (0,6,101101) ; (4,5,10111);
(1,5,00001) ; (0,4,0111) ; (2,1,1) ; (0,0)
Image fusion
combines multiple images of the same scene into a single
image which is suitable for human perception and practical
applications.
Image fusion is applicable for numerous fields including:
remote sensing and geosciences, robotics and industrial
engineering, and medical imaging.
Image Fusion
• Merging two or more images of a scene obtained from the same sensor at different
times or from different sensors at the same instant to form a single composite image
that has the maximum information content.
Spatial Resolution
Spectral Resolution
Multi-spectral &
high spatial resolution
Block-diagram for DCT
fusion
Block-diagram for wavelet
fusion