0% found this document useful (0 votes)
11 views86 pages

Image Coding Techniques Overview

Uploaded by

savithirysenthil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views86 pages

Image Coding Techniques Overview

Uploaded by

savithirysenthil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

IT217 - INFORMATION CODING

TECHNIQUES

Dr. M. Ezhilarasan
Professor
Department of Information Technology
Puducherry Technological University
Puducherry
UNIT – III : Image Coding

• Image Representation
• Transformation
• Quantization
• Image Coding Standards
• JPEG
• JPEG2000
Joint Photographic Experts Group
(JPEG)

• Still image coding is an important application of data


compression.
• When an analog image or picture is digitized, each
pixel is represented by a fixed number of bits, which
correspond to a certain number of gray levels.
• In this uncompressed format, the digitized image
requires a large number of bits to be stored or
transmitted.
• As a result, compression becomes necessary due to the
limited communication bandwidth or storage size.
JPEG

• Since the mid-1980s, the International


Telecommunication Union (ITU) and International
Standards Organization (ISO) have been working
together to develop a joint international standard for
the compression of still images.
• Officially, JPEG [jpeg 1992] is the ISO/IEC international
standard 10918-1: digital compression and coding of
continuous tone still images, or the ITU-T
Recommendation T.81. JPEG became an international
standard in 1992.
• The JPEG standard allows for both lossy and lossless
encoding of still images.
Pixels neighborhood

N4(p) N8(p) ND(p)


CONTINUOUS TONE

HALF TONE

QUARTER TONE
JPEG

• The algorithm for lossy coding is a discrete cosine


transform (DCT)-based coding scheme.
• This is the baseline of JPEG and is sufficient for many
applications.
• However, to meet the needs of applications that
cannot tolerate loss, e.g., compression of medical
images, a lossless coding scheme is also provided
and is based on a predictive coding scheme
JPEG Modes
From the algorithmic point of view, JPEG
includes four distinct modes of operation:

1. Sequential DCT-based mode


2. Progressive DCT-based mode
3. Hierarchical mode
4. Lossless mode
Modes of operation

• Sequential / Baseline encoding: each image component is


encoded in a single left-to-right, top-to-bottom scan.
• Progressive encoding: the image is encoded in multiple
scans for applications in which transmission time is long,
and the viewer prefers to watch the image build up in
multiple coarse-to-clear passes.
• Hierarchical encoding: the image is encoded at multiple
resolutions so that lower-resolution versions may be
accessed without first having to decompress the image at its
full resolution.
• Lossless encoding: the image is encoded to guarantee exact
recovery of every source image sample value (even though
the result is low compression compared to the lossy modes).
• Sequential / Baseline encoding: each image
component is encoded in a single left-to-right, top-
to-bottom scan.
• Progressive encoding: the image is encoded in
multiple scans for applications in which
transmission time is long, and the viewer prefers to
watch the image build up in multiple coarse-to-
clear passes.
• Hierarchical encoding: the image is encoded at
multiple resolutions so that lower-resolution
versions may be accessed without first having to
decompress the image at its full resolution.
TRANSFORM CODING
JPEG
JPEG
Sequential DCT-Based Encoding Algorithm

• The sequential DCT-based coding algorithm is the


baseline algorithm of the JPEG coding standard.
• The digitized image data is first partitioned into
blocks of 8 x 8 pixels.
• The 2-D forward DCT is applied to each 8 x 8 block.
• The 2-D forward and inverse DCT of 8 x 8 block are
defined as follows:
JPEG
JPEG

• Transform RGB to YCbCr and subsample colour


• Perform DCT on image blocks
• Apply Quantization
• Perform Zigzag ordering and run-length encoding
• Perform Entropy coding
JPEG

• Transform RGB to YCbCr and subsample colour


• Perform DCT on image blocks
• Apply Quantization
• Perform Zigzag ordering and run-length encoding
• Perform Entropy coding
24-BIT COLOR IMAGE
Y Cb Cr

[Link]

[Link]

[Link]
JPEG

• Transform RGB to YCbCr and subsample colour


• Perform DCT on image blocks
• Apply Quantization
• Perform Zigzag ordering and run-length encoding
• Perform Entropy coding
C[u ]C[v] 7 7 (2m  1)u (2n  1)v
X [u, v] 
4

m 0 n 0
x[m, n] cos
16
cos
16

1 / 2 , u  0,
u  
C    
 v   1 1 u  7

717.6 0.2 0.4 -19.8 -2.1 -6.2 -5.7 -7.6


69 71 74 76 89 106 111 122
-99.0 -35.8 27.4 19.4 -2.6 -3.8 9.0 2.7
59 70 61 61 68 76 88 94
51.8 -60.8 3.9 -11.8 1.9 4.1 1.0 6.4
82 70 77 67 65 63 57 70
30.0 -25.1 -6.7 6.2 -4.4 -10.7 -4.2 -8.0
97 99 87 83 72 72 68 63
22.6 2.7 4.9 3.4 -3.6 8.7 -2.7 0.9
91 105 90 95 85 84 79 75
15.6 4.9 -7.0 1.1 2.3 -2.2 6.6 -1.7
92 110 101 106 100 94 87 93
0.0 5.9 2.3 0.5 5.8 3.1 8.0 4.8
89 113 115 124 113 105 100 110
-0.7 -2.3 -5.2 -1.0 3.6 -0.5 5.1 -0.1
104 110 124 125 107 95 117 116

DCT
DCT
DC AC00

AC77
JPEG

• Transform RGB to YCbCr and subsample colour


• Perform DCT on image blocks
• Apply Quantization
• Perform Zigzag ordering and run-length encoding
• Perform Entropy coding
Quantization
717.6 0.2 0.4 -19.8 -2.1 -6.2 -5.7 -7.6
-99.0 -35.8 27.4 19.4 -2.6 -3.8 9.0 2.7
51.8 -60.8 3.9 -11.8 1.9 4.1 1.0 6.4
30.0 -25.1 -6.7 6.2 -4.4 -10.7 -4.2 -8.0
22.6 2.7 4.9 3.4 -3.6 8.7 -2.7 0.9
15.6 4.9 -7.0 1.1 2.3 -2.2 6.6 -1.7
0.0 5.9 2.3 0.5 5.8 3.1 8.0 4.8
-0.7 -2.3 -5.2 -1.0 3.6 -0.5 5.1 -0.1


16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56

Q 14 17 22 29 51
18 22 37 56 68
87
109 103 77
80 62

24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99]

45 0 0 -1 0 0 0 0
Quantization -8 -3 2 1 0 0 0 0
4 -5 0 0 0 0 0 0
2 -1 0 0 0 0 0 0
1 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
JPEG

• Transform RGB to YCbCr and subsample colour


• Perform DCT on image blocks
• Apply Quantization
• Perform Zigzag ordering and run-length encoding
• Perform Entropy coding
Zig-Zag Scanning
Zig-Zag Scanning

45 0 0 -1 0 0 0 0
-8 -3 2 1 0 0 0 0
4 -5 0 0 0 0 0 0
2 -1 0 0 0 0 0 0
1 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0

Result = 45,0,-8,4,-3,0,-1,2,-5,2,1,-1,0,1,0,0,0,0,0,0,1,0x23 times


JPEG

• Transform RGB to YCbCr and subsample colour


• Perform DCT on image blocks
• Apply Quantization
• Perform Zigzag ordering and run-length encoding
• Perform Entropy coding
DCT Coefficients
DC AC00

AC77
JPEG
From the algorithmic point of view, JPEG
includes four distinct modes of operation:

1. Sequential DCT-based mode


2. Progressive DCT-based mode
3. Hierarchical mode
4. Lossless mode
Progressive DCT-Based Encoding

In progressive DCT-based coding, the input image is first


partitioned to blocks of 8 x 8 pixels.
The 2-D 8 x 8 DCT is then applied to each block.
The transformed DCT-coefficient data is then encoded
with multiple scans.
In each scan, a portion of the transformed DCT coefficient
data is encoded.
This partial encoded data can be reconstructed to obtain a
full image size with picture of lower quality.
The coded data of each additional scan will enhance the
reconstructed image quality until the full quality has been
achieved at the completion of all scans.
DC AC00
DCT 8x8 Block

AC77
Discrete Cosine Transformation
DC alone
AC alone
DC and one row of AC coefficients
DC and one column of AC coefficients
DC and diagonal matrix of AC coefficients
DC and 3 AC coefficients
DC and 8 AC coefficients

DCT: Efficient decorrelation and high energy compaction property


Two methods have bee n used in JPEG standard to
perform the DCT-based progressive coding.

• Spectral selection
• Successive approximation
Spectral selection

• The transformed DCT coefficients are first reordered as


zigzag sequence and then divided into several bands.
• A frequency band is defined in the scan header by
specifying the starting and ending indices in the zigzag
sequence.
• The band containing DC coefficient is encoded at the first
scan.
• In the following scan, it is not necessary for the coding
procedure to follow the zigzag ordering.
Successive approximation

• The DC T coefficients are reduced in precision by the


Point transform.
• The point transform of the DC T coefficients is an
arithmetic-shift-right by a specified number of bits, or
divided by a power of 2 (near zero, there is slight
difference in truncation of precision between arithmetic
shift and divide by 2.
• This specified number is the successive approximation of
bit posit ion.
• To encode using successive approximations, the
significant bits of DCT coefficient are encoded in the first
scan, and each successive scan that follows progressively
improves the precision of the coefficients by 1 bit.
• This continues until full precision is reached.
JPEG
From the algorithmic point of view, JPEG
includes four distinct modes of operation:

1. Sequential DCT-based mode


2. Progressive DCT-based mode
3. Lossless mode
4. Hierarchical mode
JPEG
From the algorithmic point of view, JPEG
includes four distinct modes of operation:

1. Sequential DCT-based mode


2. Progressive DCT-based mode
3. Lossless mode
4. Hierarchical mode
• Hierarchical encoding: the image is encoded at
multiple resolutions so that lower-resolution
versions may be accessed without first having to
decompress the image at its full resolution.
END OF
JPEG

You might also like