Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

SCHOOL OF COMPUTER SCIENCE AND ENGINEERING

Fall Semester 2020-21

Digital Assignment - I

Course Code: CSE4019 Programme: B.Tech


Course Name: Image Processing Faculty: Prabu S
Slot: C2+TC2

Name: Robin Sah Date of Submission:30-10-2020


Reg. No.: 18BCE2462

1. How the Discrete Cosine Transformation is applied for JPEG image


compression? Do intensive literature survey and explain in detail.

Ans: We can achieve compression by removing of one or more of three basic data
redundancies:

(1) Spatial Redundancy or correlation between neighbouring pixel.


(2) Due to the correlation between different colour planes or spectral bands, the
Spectral redundancy is founded.
(3) Due to properties of the human visual system, the Psycho-visual redundancy
is founded.
Various techniques can be used to compress the images to reduce their storage
sizes as well as using a smaller space. We can use two ways to categorize
compression techniques.
• Lossy Compression System: Lossy compression techniques are used in
images where we can sacrifice some of the finer details in the image to
save a little more bandwidth or storage space.

• Lossless compression system: Lossless Compression System aims at


reducing the bit rate of the compressed output without any distortion of the
image. The bit-stream after decompression is identical to the original
bitstream.

• Predictive coding: It is a lossless coding method, which means the value


for every element in the decoded image and the original image is identical
to Differential Pulse Code Modulation (DPCM).

• Transform coding: Transform coding forms an integral part of compression


techniques. the reversible linear transform in transform coding aims at
mapping the image into a set of coefficients and the resulting coefficients
are then quantized and coded. the first attempts are the discrete cosine
transform (DCT) domain.

Literature Survey

1) Jpeg Image Compression Using Discrete Cosine Transform - A Survey by A.M.Raid


, W.M.Khedr , M. A. El-dosuky and Wesam Ahmed , April 2014
Due to the increasing requirements for transmission of images in computer, mobile
environments, the research in the field of image compression has increased significantly. Image
compression plays a crucial role in digital image processing. Dealing with this vast amount of
information can often result in many difficulties. We must store, retrieve, analyse and process
Digital information in an efficient way, so as to be put to practical use. Image Compression
addresses the problem of reducing the amount of data required to represent the digital image.
We can achieve compression by removing of one or more of three basic data redundancies.
DCT The most popular technique for image compression, over the past several years, was
Discrete cosine transform (DCT). Its selection as the standard for JPEG is One of the major
reasons for its popularity. DCT is used by many Non-analytical applications such as image
processing and signal-processing DSP applications such as video conferencing. The DCT is
used in transformation for data compression. DCT is an orthogonal transform, which has a
fixed set of basis function.
Methods / Result
Here we study the paper and find Many Methods for image compression as for making colour
or high-resolution image are listed below here:
Three closely connected components form a typical lossy image compression system, they are
(a) Source Encoder (b) Quantizer and (c) Entropy Encoder.
Discrete Cosine Transform
Quantization in JPEG: Quantization aims at reducing most of the less important high
frequency DCT coefficients to zero, the more zeros the better the image will compress. Lower
frequencies are used to reconstruct the image because human eye is more sensitive to them and
higher frequencies are discarded.
Huffman Encoding: Entropy Coding achieves more lossless compression by encoding more
compactly the quantized DCT coefficients. Both Huffman coding and arithmetic coding is
specified by The JPEG proposal. Huffman coding is used in the baseline sequential codec, but
all modes of operation use Huffman coding and arithmetic coding.
Decompression: The compression phase is reversed in the decompression process, and in the
opposite order. The first step is restoring the Huffman tables from the image and decompressing
the Huffman tokens in the image. Next, the DCT values for each block will be the first things
needed to decompress a block.
Conclusion
Image compression is used for managing images in digital format. This survey paper has been
focused on the Fast and efficient lossy coding algorithms JPEG for image Compression /
Decompression using Discrete Cosine transform. We also briefly introduced the principles
behind the Digital Image compression and various image compression methodologies .and the
jpeg process steps including DCT, quantization, entropy encoding.
2) An image compression using discrete cosine transforms and JPEG enconder by Ravi
Mathey, Prof.P.S.Avadhani
Wavelets have generated a tremendous interest in both theoretical and applied areas, especially
over the past few years. The number of researchers, already large, continues to grow, so
progress is being made at a rapid pace. In fact, advancements in the area are occurring at such
a rate that the very meaning of \wavelet analysis" keeps changing to incorporate new ideas Our
paper contains some more recent developments and that it focuses on the multiresolution
analysis" aspect of wavelets. JPEG image compression standard use DCT (DISCRETE
COSINE TRANSFORM). The discrete cosine transform is a fast transform. It is a widely used
and robust method for image compression. It has excellent compaction for highly correlated
data. DCT has fixed basis images DCT gives good compromise between information packing
ability and computational complexity. DWT can be used to reduce the image size without
losing much of the resolutions computed and values less than a pre-specified threshold are
discarded. Thus, it reduces the amount of memory required to represent given image. Image
compression is very important for efficient transmission and storage of images.
Methods / Result
We can start from the filters (hi) and (gi) and try to pin down the requirements needed for these
to generate a valid orthonormal multiresolution and wavelet. It’s convenient to look at these in
Fourier transform form. Our approach is based on DCT and JPEG standard baseline coder
results shown above. All of them have very similar PSNR performance even with JPEG but
JPEG is affected by disturbing blocking effect.
Compressed results in jpeg format
Conclusion
Their work dealt with deals with the JPEG Encoder for image compression upon comparing
with Discrete cosine transform (DCT) is widely used in image processing, especially for
compression based on DCT and JPEG Standard coder and JPEG 2000 for image compression.

3) Image compression using discrete cosine transform & discrete wavelet transform by
Bhawna Gautam
Image compression is very important for efficient transmission and storage of images. Demand
for communication of multimedia data through the telecommunications network and accessing
the multimedia data through Internet is growing explosively. With the use of digital cameras,
requirements for storage, manipulation, and transfer of digital images, has grown explosively.
These image files can be very large and can occupy a lot of memory. A Gray scale image that
is 256 x 256 pixels has 65, 536 elements to store, and a typical 640 x 480 colour image has
nearly a million. Downloading of these files from internet can be very time-consuming task.
Image data comprise of a significant portion of the multimedia data and they occupy the major
portion of the communication bandwidth for multimedia communication. Therefore,
development of efficient techniques for image compression has become quite necessary. A
common characteristic of most images is that the neighbouring pixels are highly correlated and
therefore contain highly redundant information. The basic objective of image compression is
to find an image representation in which pixels are less correlated. The two fundamental
principles used in image compression are redundancy and irrelevancy. Redundancy removes
redundancy from the signal source and irrelevancy omits pixel values which are not noticeable
by human eye. JPEG and JPEG 2000 are two important techniques used for image
compression.

Methods / Result
JPEG stands for the Joint Photographic Experts Group, a standards committee that had its
origins within the International Standard Organization (ISO).JPEG provides a compression
method that is capable of compressing continuous-tone image data with a pixel depth of 6 to
24 bits with reasonable speed and efficiency.JPEG may be adjusted to produce very small,
compressed images that are of relatively poor quality in appearance but still suitable for many
applications. Conversely, JPEG is capable of producing very high-quality compressed images
that are still far smaller than the original uncompressed data.
Results obtained after performing DCT of various orders on original images are shown below:
Conclusion
DCT is used for transformation in JPEG standard. DCT performs efficiently at medium bit
rates. Disadvantage with DCT is that only spatial correlation of the pixels inside the single 2-
D block is considered and the correlation from the pixels of the neighbouring blocks is
neglected. Blocks cannot be decorrelated at their boundaries using DCT. DWT is used as basis
for transformation in JPEG 2000 standard. DWT provides high quality compression at low bit
rates. The use of larger DWT basis functions or wavelet filters produces blurring near edges in
images. DWT performs better than DCT in the context that it avoids blocking artifacts which
degrade reconstructed images. However, DWT provides lower quality than JPEG at low
compression rates. DWT requires longer compression time.

4) Image Compression Using the Discrete Cosine Transform by Andrew B. Watson

The rapid growth of digital imaging applications, including desktop publishing, multimedia,
teleconferencing, and high-definition television (HDTV) has increased the need for effective
and standardized image compression techniques. Among the emerging standards are JPEG, for
compression of still images [Wallace 1991]; MPEG, for compression of motion video [Puri
1992]; and CCITT H.261 (also known as Px64), for compression of video telephony and
teleconferencing. All three of these standards employ a basic technique known as the discrete
cosine transform (DCT). Developed by Ahmed, Natarajan, and Rao [1974], the DCT is a close
relative of the discrete Fourier transform (DFT). Its application to image compression was
pioneered by Chen and Pratt [1984]. In this article, some simple functions will be developed to
compute the DCT and show how it is used for image compression. We have used these
functions in our laboratory to explore methods of optimizing image compression for the human
viewer, using information about the human visual system [Watson 1993]. The goal of this paper
is to illustrate the use of Mathematica in image processing and to provide the reader with the
basic tools for further exploration of this subject.

Methods / Result
DCT-based image compression relies on two techniques to reduce the data required to represent
the image. The first is quantization of the image's DCT coefficients; the second is entropy
coding of the quantized coefficients. Quantization is the process of reducing the number of
possible values of a quantity, thereby reducing the number of bits needed to represent it.
Entropy coding is a technique for representing the quantized data as compactly as possible. We
will develop functions to quantize images and to calculate the level of compression provided
by different degrees of quantization. We will not implement the entropy coding required to
create a compressed image file.
Conclusion
Most of the computation time required to transform, quantize, dequantize, and reconstruct an
image is spent on forward and inverse DCT calculations. Because these transforms are applied
to blocks, the time required is proportional to the size of the image. On a SUN SPARCstation
2, the timings increase (at a rate of 0.005 second/pixel) from about 20 seconds for a 642-pixel
image to about 320 seconds for 2562 pixels. These times are much longer than for comparable
functions written in a low-level language such as C. For example, a C program performed the
same computations in under 2 seconds for an image of 2562 pixels, more than 100 times faster
than our Mathematica functions. However, for the purposes for which our code was developed,
namely education, algorithm development, and prototyping other applications, the timings are
acceptable.

5) Discrete Cosine Transform by N. Ahmed; T. Natarajan; K.R. Rao

In recent years there has been an increasing interest with respect to using a class of orthogonal
transforms in the general area of digital signal processing. This correspondence addresses itself
towards two problems associated with image processing, namely, pattern recognition and
Wiener filtering. In pattern recognition, orthogonal transforms enable a noninvertible
transformation from the pattern space to a reduced dimensionality feature space. This allows a
classification scheme to be implemented with substantially less features, with only a small
increase in classification error. In discrete Wiener filtering applications, the filter is represented
by an (M X M) matrix G. The estimate X of data vector X is given by GZ, where Z = X + N
and N is the noise vector. This implies that approximately 2M arithmetic operations are
required to compute X. Use of orthogonal transforms yields a G in which a substantial number
of elements are relatively small in magnitude, and hence can be set equal to zero. Thus, a
significant reduction in computation load is realized at the expense of a small increase in the
mean-square estimation error.

Methods / Result
The minimization of a linear sequential machine to a reduced form is an important topic and is
discussed in many texts. The minimization procedure presented is as follows. Let {A, B, C, D}
be an n-dimensional linear machine over GF(p), and let r, with r < n, be the rank of the
diagnostic matrix K A [C'A'C' … (A’) n-1 C']’, where the prime stands for the transpose. Define
an r X n matrix T consisting of the first r linearly independent rows of K, and an n X r matrix
R denoting the right inverse of T so that TR = L Then the linear machine {TAR, TB, CR, D}
is a reduced form of {A, B, C, D}. In this correspondence, an algorithm will be introduced to
find a special set of r linearly independent rows in K. A reduced machine can then be read out
from this algorithm without the need of inverting any matrix. Furthermore, the reduced
machine will be in a canonical form.
Conclusion
A new algorithm for computing the correlation of a block of sampled data has been presented.
It is a direct method which trades an increased number of additions for a decreased number of
multiplications. For applications where the "cost" (e.g., the time) of a multiplication is greater
than that of an addition, the new algorithm is always more computationally efficient than direct
evaluation of the correlation, and it is generally more efficient than FFT methods for processing
128 or fewer data points, or for calculating only the first L "lags" for L < 10 log2 2N.

6) Next generation image compression and manipulation using CREW by M.


Boliek; M.J. Gormish; E.L. Schwartz; A. Keith

This paper presents a multimedia processor based on a SIMD architecture optimized for block-
based video processing algorithms. The processor, called DGP (Digital Generic Processor), is
a generic system architecture, constituted by an array of pixel processors (SZMD) and a RISC
controller. It is able to execute various video processing algorithms such as digital filtering,
video effects, window clipping, and to perform video compression according to standards such
as H.261, H.263, MPEG-I and MPEG-2. The processor can be programmed in order to run the
code corresponding to each specific algorithm.

Methods / Result
Three main parts constitute the architecture of the DGP:
• a SIMD architecture composed of 64-pixel processors connected by a programmable
network.
• a 32-bit core RISC controller (master processor) which performs interfaces and
transfers exchange data with the SIMD array.
• A variable length codes unit (VLC-Coprocessor) which can load, encode and decode
variable length codes or arithmetic codes.
The master processor and the SIMD engine have their own data transfer unit based on a 32-bit
wide and its associated address is 16 bits wide. All units are connected to that bus. The master
controller is the master of that system bus and he manages also the VLD-coprocessor when
incoming data are needed for some algorithms.
Conclusion
A fixed array of a small number of cameras positioned to view a work environment or
demonstration area can be used to synthesize new perspective views of that environment. The
geometry of the fixed cameras will determine the extent to which new views can be created.
Depth resolution is limited by the pixel size, the width if the images and the separation of the
camera viewpoints. For many interactive applications, it is not necessary to fully define an
explicit three-dimensional model, and implicit models in which the depth of significant points
is determined may be adequate. Decreasing costs of computational power and imaging devices
make this type of interaction feasible, and the structure of the computation is well matched to
parallel implementations.

7) Implementation of Image Compression Using Discrete Cosine Transform (DCT) and


Discrete Wavelet Transform (DWT) by Andri Kurniawan
The main principles of image compression are to remove the redundant data in the image,
where most of images have them neighbouring pixels correlated to each other and these
correlated pixels include less information, so this correlated data can be removed by using some
form of image compression techniques. In fact, any image compression system depends on
removing the redundant data and removing the duplication from the original image, where the
part of the image that cannot noticed by the image receivers like Human Visual System (HVS)
is omitted. This redundancy is divided into three types, they are:
− Spatial Redundancy are obtained from the correlation between adjacent pixel values.
− Spectral Redundancy are obtained from the correlation between the spectral bands.
− Temporal Redundancy are obtained from correlation between adjacent frames in a
sequence of images (in video applications).
Compression is done by removing the spatial and spectral redundancies (in image
compression) and temporal redundancy in (video compression) as much as possible, because
this reduces of bits required to represent the image.
Methods / Result

Conclusion
From the experimental results, we can see that the compression ratio using DWT is greater.
Which means compression by using DWT method is smaller. However, we can get a better
image with DCT method.
DCT (Discrete Cosine Transform)
Concentrate image energy into a small number of coefficients (energy compaction).
Minimizes interdependencies among coefficients (decorrelation).
Not resistant to changes in an object
DCT calculates the quantity of bits of image where the message is hidden inside.

2. What is DCT and JPEG Compression?

Ans: The discrete cosine transform (DCT) represents an image as a sum of


sinusoids of varying magnitudes and frequencies. The dct2 function computes the
two-dimensional discrete cosine transform (DCT) of an image. The DCT has the
property that, for a typical image, most of the visually significant information
about the image is concentrated in just a few coefficients of the DCT. For this
reason, the DCT is often used in image compression applications. For example,
the DCT is at the heart of the international standard lossy image compression
algorithm known as JPEG. (The name comes from the working group that
developed the standard: The Joint Photographic Experts Group.)
JPEG Compression: JPEG Compression is the name given to an algorithm
developed by the Joint Photographic Experts Group whose purpose is to minimize
the file size of photographic image files. JPEG compression is a powerful tool,
and with great power comes great responsibility. While JPEG compression can
help you greatly reduce the size of an image file, it can also compromise the
quality of an image - and if you aren’t careful, there may not be any recovery

3. How JPEG Compression is implemented using DCT?

Ans: The first step is to convert an image to Y’CbCr and just pick the Y’ channel
and break into 8 x 8 blocks. Then starting from the first block, map the range from
-128 to 127. After that you have to find the discrete Fourier transform of the
matrix. The result of this should be quantized. The last step is to apply encoding
in the zig zag manner and do it till you find all zero.
Note. You have to repeat this procedure for all the block of 8 x 8.
The following is a general overview of the JPEG process.
1. The image is broken into 8x8 blocks of pixels.
2. Working from left to right, top to bottom, the DCT is applied to each
3. Each block is compressed through quantization. Block
4. The array of compressed blocks that constitute the image is stored in a
drastically reduced amount of space
5. When desired, the image is reconstructed through decompression, a process
that uses the Inverse Discrete Cosine Transform (IDCT).

4. What are other applications of DCT?


Ans: The DCT is the most widely used transformation technique in signal
processing and by far the most widely used linear transform in data compression.
DCT data compression has been fundamental to the Digital Revolution.
Uncompressed digital media as well as lossless compression.
More Application are listed here
1. Image compression
2. Audio compression
3. Data compression
4. Cryptography
5. Medical Technology
6. Pattern Recognition
7. Signal Processing
8. Digital Media ETC.

References
1. Raid, A. M., Khedr, W. M., El-Dosuky, M. A., & Ahmed, W. (2014). Jpeg image compression using
discrete cosine transform-A survey. arXiv preprint arXiv:1405.6147.
2. Mathey, R., & Avadhani, P. S. An Multi Resolution Using Discrete Wavelet Transforms and Fractals
Transforms.
3. Bhawna, G. (2010). Image compression using discrete cosine transform and discrete wavelet
transform (Doctoral dissertation).
4. Watson, A. B. (1994). Image compression using the discrete cosine transform. Mathematica
journal, 4(1), 81.
5. Ahmed, N., Natarajan, T., & Rao, K. R. (1974). Discrete cosine transform. IEEE transactions on
Computers, 100(1), 90-93.
6. Boliek, M., Gormish, M. J., Schwartz, E. L., & Keith, A. (1997, October). Next generation image
compression and manipulation using CREW. In Proceedings of International Conference on Image
Processing (Vol. 2, pp. 567-570). IEEE.
7. Kurniawan, A., Purboyo, T. W., & Prasasti, A. L. (2017). Implementation of image compression
using discrete cosine transform (dct) and discrete wavelet transform (dwt). International Journal of
Applied Engineering Research, 12(23), 13951-13958.

You might also like