Академический Документы
Профессиональный Документы
Культура Документы
on
of the
UNIVERSITY OF CALCUTTA
by
Niraj Kumar
Roll No.: 97/VLM/171004
Registration No.: 133-1121-0224-14
2018-2019
1
UNIVERSITY OF CALCUTTA
-------------------------------------------------
Dr. Pulak Mondal
Assistant Professor
Institute of Radio Physics & Electronics,
University of Calcutta Date:11/11/2018
2
Acknowledgement
I would like to take this opportunity to thank Dr. Pulak Mondal of the Institute of Radio
Physics and Electronics for their invaluable suggestions, encouragement and guidance.
---------------------------------------------
Niraj Kumar
University of Calcutta
Kolkata-700009
Date 11/11/2018
3
Contents
1. Introduction……………………………………………………………………………………………..………5
2. Why JPEG ………………………………………………………………………………………………………...7
3. Steps Involved………………………………………………………………………………………….……….9
4. JPEG Modes……………………………………………………………………………………………………..15
5. Hardware implementation……………………………………………………………………………….17
6. Study of Literature…………………………………………………………………………………………..17
7. Future Work…………………………………………………………………………………………………….19
8. Reference...…………………………………………………………………………………………………….20
4
Introduction
Image compression is an important topic in the digital world. Whether it be
commercial photography, industrial imagery, or video. A digital image bitmap
can contain considerably large amounts of data causing exceptional overhead in
both computational complexity as well as data processing. Storage media has
exceptional capacity, however, access speeds are typically inversely
proportional to capacity. [8] Compression is important to manage large amounts
of data for network, internet, or storage media. Compression techniques have
been studied for years, and will continue to improve.
5
Commission (IEC). The Joint Photographic Experts Group produced the well-
known image format JPEG, a widely used image format.
[2] JPEG provides a solid baseline compression algorithm that can be modified
numerous ways to tany desired application. The JPEG specification was
released initially in 1991, although it does not specify a particular
implementation.
6
Why JPEG
The compression ratio of lossless methods (e.g., Huffman, Arithmetic, LZW) is
not high enough for image and video compression.
Block Diagram
7
8
Steps Involved
1 .Discrete Cosine Transform of each 8x8 pixel array
f(x,y) T F(u,v)
There are other transformations which retain the spatial information. E.g.,
Fourier transform , DCT etc. Therefore allowing us to move back and forth
between spatial and frequency domains
9
Quantization
Why? -- To reduce number of bits per sample
Uniform Quantization:
q(u,v) is a constant.
Eye is most sensitive to low frequencies (upper left corner in frequency matrix),
less sensitive to high frequencies (lower right corner)
JPEG Standard defines two default quantization tables, one each for luminance
and chrominance
Zig-Zag Scan
Why? -- to group low frequency coefficients in top of vector and high
frequency coefficients at the bottom Maps 8 x 8 matrix to a 1 x 64 vector
.
10
DPCM on DC Components
The DC component value in each 8x8 block is large and varies across
blocks, but is often close to that in the previous block.
RLE on AC Components
The 1x64 vectors have a lot of zeros in them, more so towards the end of the
vector. Higher up entries in the vector capture higher frequency (DCT)
components which tend to be capture less of the content. Could have been as a
result of using a quantization table
11
Entropy Coding: DC Components (Contd..)
101: The size from the same table reads 4. The corresponding code from the
table at left is 101.
12
• SIZE: The number of bits needed to code the next nonzero
AC component’s value. [0-A]
S2: (Value)
13
Partial Huffman Table for AC Run/Size Pairs
14
JPEG modes
Sequential DCT Based
The sequential DCT based mode of operation comprises the baseline JPEG
algorithm. This technique can produce very good compression ratios, while
sacrificing image quality. The sequential DCT based mode achieves much of its
compression through quantization, which removes entropy from the data set.
Although this baseline algorithm is transform based, it does use some measure
of predictive coding called the di®erential pulse code modulation (DPCM).
After each input 8x8 block of pixels is transformed to frequency space using the
DCT, the resulting block contains a single DC component, and 63 AC
components. The DC component is predictively encoded through a difference
between the current DC value and the previous. This mode only uses Huffman
coding models, not arithmetic coding models which are used in JPEG
extensions. This mode is the most basic, but still has a wide acceptance for its
high compression ratios, which can’t many general applications very well.
Lossless Mode
Quite simply, this mode of JPEG experiences no loss when comparing the
source image, to the reproduced image. This method does not use the discrete
cosine transform, rather it uses predictive, differential coding. As it is lossless, it
also rules out the use of quantization. This method does not achieve high
compression ratios, but some applications do require extremely precise image
reproduction.
15
Hierarchical Mode
The hierarchical JPEG extension uses a multi-stage compression approach, with
Prediction , and can use the encoding methods from the progressive, sequential
or lossless modes of operation. The strategy is to down sample the image in
each dimension. Then code this data set using one of the three methods
discussed, lossless, sequential, or progressive. The resulting encoded data
stream is to be decoded, and up-sampled to recreate the source image. Then the
process encodes the difference between the recreated image and the source. This
process can be repeated multiple times.
16
HARDWARE IMPLEMENTATION
1) 1D-DCT module
Assuming that the input eight points are x0, x1, x2, x3, x4, x5,
x6, x7, 1D-DCT computing equation can be simplified as (4) based
on the characteristic of the symmetry and rotation for DCT
coefficient
• Y0 = [(x0+x7)+(x1+x6)+(x2+x5)+(x3+x4)]*C4 =
(s07341625)*C4
• Y1 = (x0-x7)*C1+(x1-x6)*C3+(x2-x5)*C5+(x3-x4)*C7
• = f0_7*C1+f1_6*C3+f2_5*C5+f3_4*C7
• Y2 = [(x0+x7)-(x3+x4)]*C2+[(x1+x6)-(x2+x5)]*C6 =
(s07_34)*C2+(s16_25)*C6
• Y3 = (x0-x7)*C3+(x1-x6)*(-C7)+(x2-x5)*(-C1)+(x3-x4)*(-
C5)
17
• = f0_7*C3+f1_6*(-C7)+f2_5*(-C1)+f3_4*(-C5)
• Y4 [(x0+x7)+(x3+x4)-(x1+x6)-(x2+x5)]*C4
(s0734_1625)*C4
• Y5 (x0-x7)*C5+(x1-x6)*(-C1)+(x2-x5)*C7+(x3-
x4)*C3 f0_7*C5+f1_6*(-C1)+f2_5*C7+f3_4*C3
• Y6 [(x0+x7)-(x3+x4)]*C6-[(x1+x6)-(x2+x5)]*C2
(s07_34)*C6+(s16_25)*(-C2)
• Y7 (x0-x7)*C7+(x1-x6)*(-C5)+(x2-x5)*C3+(x3-x4)*(-C1)
• f0_7*C7+f1_6*(-C5)+f2_5*C3+f3_4*(-C1)
18
Fig. 2. The computing architecture figure of 1D-DCT
19
20
Study of Literatures
.
1 ) Implementation of 2D-DCT Based on FPGA with Verilog HDL- Discrete
Cosine Transform is widely used in image compression.This paper describes the
FPGA implementation of a two dimensional (8×8) point Discrete Cosine
Transform (8×8 point 2D-DCT) processor with Verilog HDL for application of
image processing. The row-column decomposition algorithm and pipelining are
used to produce the high quality circuit design with the max clock frequency of
318MHz when implemented in a Xinlinx VIRTEX-ⅡPRO FPGA chip,
Yunqing Ye and Shuying Cheng.
3) Efficient hardware architecture for direct 2D DCT computation and its FPGA
Implementation- In this paper, we propose a low complexity architecture for
direct 2D-DCT computation. The architecture will transform the pixels from
spatial to spectral domain with the required quality constraints of the
compression standards. In our previous works we introduced a new fast 2D
DCT with low computations: only 40 additions are used and no multiplications
are needed. Based on that algorithm we developed in this work a new
architecture to achieve the computations of the 2D DCT directly without using
any transposition memory. We defined Sk functions blocks to build the 2D
DCT architecture. The Sk block perform 8 function depending on the control
signals of the system. The number of additions/subtractions used is 63, but no
multiplication or memory transposition is needed. The architecture is suitable
21
for usage with statistical rules to predict the zero quantized coefficients, which
can considerably reduce the number of computation. We implemented the
design using an FPGA Cyclone 3. The design can reach up to 244 MHz and
uses 1188 logic elements, and it respect the real time video requirements, Anas
Hatim, SaidBelkouch, Tayeb Sadiki.
4)The 2D-DCT combined with Forward and Inverse is designed using VHDL.
This has proposed a architecture based on the row column decomposition for
computation of 2D-DCT. Parallel process causes latency in the system. Latency
produced from this system is 113 clock cycles for 2D-DCT and 112 for 2D-
IDCT. The design implemented in the Xilinx KINTEX-7 FPGA chip can
complete the 2D-DCT/IDCT logic operations correctly at 161.793MHz clock
frequency for forward and 141.709MHz clock frequency for inverse with the
clock period of 6.181ns. Using the Row-Column decomposition algorithm, the
number of calculations are logically, reduced. Ankita Selokar,
A.C.Kailuke,V.B.Bagde
.
5) For the past few years, a joint ISO/CCITT committee known as JPEG (Joint
Photographic Experts Group) has been working to establish the first
international compression standard for continuous-tone still images, both
grayscale and color. JPEG’s proposed standard aims to be generic, to support a
wide variety of applications for continuous-tone images. To meet the differing
needs of many applications, the JPEG standard includes two basic compression
methods, each with various modes of operation. A DCT-based method is
specified for “lossy’’ compression, and a predictive method for “lossless’’
compression. JPEG features a simple lossy technique known as the Baseline
method, a subset of the other DCT-based modes of operation. The Baseline
method has been by far the most widely implemented JPEG method to date, and
is sufficient in its own right for a large number of applications. This article
provides an overview of the JPEG standard, and focuses in detail on the
Baseline method.George K. Wallace
22
FUTURE WORK
As we implement 8×8 block, in future we may implement it by 16×16, 32×32
upto a standard size of the image. The row column decomposition method
reduces the hardware complexity as per the other methods. As the block of the
size increases hardware also increases but we can implement it easily by this
row column decomposition method.
23
REFERENCES
24