You are on page 1of 23

A

TECHNICAL SEMINAR REPORT

On

COMPRESSED IMAGE PROCESSING

Submitted to Jawaharlal Nehru Technological University

in partial fulfillment of the requirements for the award of the degree of

BACHELOR OF TECHNOLOGY

In

ELECTRICAL & ELECTRONICS ENGINEERING


Submitted by

PAVANI RAVULAPALLI

18X01A0211

Department Of ELECTRICAL & ELECTRONICS ENGINEERING

NARSIMHA REDDY ENGINEERING COLLEGE

A UGC Autonomous Institution

(Affiliated to JNTU Hyderabad Approved by AICTE New Delhi) Maisammaguda,


Secunderabad, Hyderabad- 500100

2021-2022

1
CERTIFICATE
This is to certify that the desertion work entitled “COMPRESSED IMAGE PROCESSING” is the

work done by PAVANI RAVULAPALLI bearing Roll no. 18X01A0211 submitted towards partial

fulfillment for the award of ‘BACHELOR OF TECHNOLOGY’ in ELECTRICAL &

ELECTRONICS ENGINEERING under the guidance and supervision of during academic year

2021-2022.

SUPERVISOR HEAD OF THE DEPARTMENT


V. Kiranmayee Dr. G Seshadri
Associate Professor Professor
Department of EEE Department of EEE
NREC NREC

2
ACKNOWLEDGEMENT

I wish to take this opportunity to express our deep gratitude to all the people who
extended their co-operation in various ways during my work. It is my pleasure to acknowledge the
help of all those individuals.
I would like to express my sincere thanks to Dr. P. SEKHAR BABU, Principal,
NARSIMHA REDDY ENGINEERING COLLEGE. I am grateful for his constant support and
cooperation.
I would like to express my sincere thanks to Dr. G. SESHADRI, H.O.D, Dept of E.E.E,
NARSIMHA REDDY ENGINEERING COLLEGE. I am grateful for his encouragement and
cooperation.
I would like to express my sincere thanks to my supervisor,
V. KIRANMAYEE Associate professor of the Dept of E.E.E, NARSIMHA REDDY
ENGINEERING COLLEGE. I am grateful for his kind encouragement and valuable suggestions.
I would also like to convey special thanks to my faculty members and friends for their
support in all the way through the work which lead to successful completion of my work.

PAVANI RAVULAPALLI

18X01A0211

3
ABSTRACT

Image Compression is the Image data Elaboration dedicated to the image data representation.
It analyzes the techniques allowing to reduce the amount of data to describe the information content
of the image.
Data transfer rates are not keeping up due to bandwidth limitation and bottlenecks in existing
systems.
Image compression allows faster retrieval from disk and makes use of advances in CPU speed.
Image compression is intranet friendly. Image compression has important applications in image
storage and delivery.
Therefore, with scalable image compression, it is possible to browse large images quickly and on
demand.
image compression makes possible the adjustment of image quality and resolution after the photo is
shot, so that instead, the original digital photos always can be shot at the highest possible quality
and resolution, and when the camera memory is filled to capacity, the compressed bitstream of
existing shots may be truncated to smaller size to leave room for the upcoming shots.

4
TABLE OF CONTENT

CONTENT PAGE NO

1. What is image compression? 06

2. Why do we need image compression? 07

3. Terminology used in image compression 08

4. Entropy 09

5. Compression system model 10

6. Algorithms for image is compressed 11

7. Different coding method used in image compression 13

8. Some common image formats 19

9. Conclusion 22

5
CHAPTER 1
WHAT IS IMAGE COMPRESSION?

Image compression is the application of data compression on digital images. In effect, the objective
is to reduce redundancy of the image data in order to be able to store or transmit data in an efficient
form.

A chart showing the relative quality of various jpg settings and also compares saving a file as a jpg
normally and using a "save for web" technique

Image compression can be lossy or lossless. Lossless compression is sometimes preferred for
medical imaging, technical drawings, icons or comics. This is because lossy compression methods,
especially when used at low bit rates, introduce compression artifacts. Lossless compression
methods may also be preferred for high value content, such as medical imagery or image scans
made for archival purposes. Lossy methods are especially suitable for natural images such as photos
in applications where minor (sometimes imperceptible) loss of fidelity is acceptable to achieve a
substantial reduction in bit rate. The lossy compression that produces imperceptible differences can
be called visually lossless.

6
CHAPTER 2

WHY DO WE NEED COMPRESSION?

Requirements may outstrip the anticipated increase of storage space and bandwidth.
The figures in Table 1 show the qualitative transition from simple text to full-motion video data and
the disk space, transmission bandwidth, and transmission time needed to store and transmit such
uncompressed data.

Table 1 Multimedia data types and uncompressed storage space, transmission bandwidth, and
transmission time required. The prefix kilo- denotes a factor of 1000 rather than 1024.

Transmission
Uncompressed  Transmission
Bits/Pixel or  Time (using a
Multimedia Data Size/Duration Size Bandwidth
Bits/Sample 28.8K
(B for bytes) (b for bits)
Modem)
Varying
A page of text  11'' x 8.5'' 4-8 KB 32-64 Kb/page 1.1 - 2.2 sec
resolution
Telephone quality
10 sec 8 bps 80 KB 64 Kb/sec 22.2 sec
speech 
Grayscale Image  512 x 512 8 bpp 262 KB 2.1 Mb/image 1 min 13 sec
Color Image  512 x 512 24 bpp 786 KB 6.29 Mb/image 3 min 39 sec
Medical Image  2048 x 1680 12 bpp 5.16 MB 41.3 Mb/image 23 min 54 sec
SHD Image  2048 x 2048 24 bpp 12.58 MB 100 Mb/image 58 min 15 sec

7
The examples above clearly illustrate the need for sufficient storage space, large transmission
bandwidth, and long transmission time for image, audio, and video data. At the present state of
technology, the only solution is to compress multimedia data before its storage and transmission,
and decompress it at the receiver for play back. For example, with a compression ratio of 32:1, the
space, bandwidth, and transmission time requirements can be reduced by a factor of 32, with
acceptable quality.

8
CHAPTER 3

TERMINOLOGY USED IN IMAGE COMPRESSION

It refers relation between original image and the compressed file.


(1). Compression Ratio: --A large number implies a better compression.

Ex Image 256X256 pixels, 256 level grayscale can be compressed file size 6554 byte.
Original Image Size = 256X256(pixels) X 1(byte/pixel)
= 65536 bytes

(2). Bit Per Pixel: --A smaller number implies a better compression.
Bit Per Pixel = (No. of Bits)/(No. of Pixels)
Ex Image 256X256 pixels, 256 level grayscale can be compressed file size 6554 byte.
Original Image Size = 256X256(pixels) X 1(byte/pixel)
= 65536 bytes
Compressed file = 6554(bytes)X8(bits/pixel)
= 52432 bits

9
CHAPTER 4
ENTROPY

Entropy encoding which is a way of lossless compression that is done on an image after the
quantization stage. It enables to represent an image in a more efficient way with smallest memory
for storage or transmission in most images their neighboring pixels are correlated and thus contain
redundant information. Our task is to find less correlated representation
of the image, then perform redundancy reduction and irrelevancy reduction. Redundancy reduction
removes duplication from the signal source (for instance a digital image). Irrelevancy reduction
omits parts of the signal that will not be noticed by the Human Visual System (HVS).
Entropy encoding further compresses the quantized values in lossless manner which gives better
compression in overall. It uses a model to accurately determine the probabilities for each quantized
value and produces an appropriate code based on these probabilities so that the resultant output code
stream will be smaller than the input stream.
An entropy encoder further compresses the quantized values lossless Ly to give better overall
compression. It uses a model to accurately determine the probabilities for each quantized value and
produces an appropriate code based on these probabilities so that the resultant output code stream
will be smaller than the input stream. The most commonly used entropy encoders are the Huffman
encoder and the arithmetic encoder, although for applications requiring fast execution, simple run-
length encoding (RLE) has proven very effective.

• Average information in an image.

nk
pk  , where k  0,1,  , L  1
n

10
Compression system model consist of two main parts one is compression and another is
Decompression.
In compression the process is mainly divided in input, preprocessing, encoding and
compressed file respectively. First image is imputed then processing is done by using the
terminology. In encoding process, we use Run length coding and Huffman coding and image is
finally compressed.
In Decompression system the process is just converse of the compression.
Here compressed image is introduced first, then it is decoded and postprocessing is done. Finally,
output is obtained.

11
CHAPTER 5
ALGORITHMS FOR IMAGE IS COMPRESSED

The image compression algorithms can be divided into two branches:


- Lossless algorithms: - The information content is not modified.
- Lossy algorithms: -The information content is reduced and it is not recoverable.
Lossless compression algorithm
The emergence of multimedia technologies has made digital libraries a reality. Nowadays, libraries,
museums, film studios, and governments are converting more and more data and archives into
digital form. Some of the data indeed need to be stored without any loss. In this algorithm many
coding techniques that will effectively reduce the total number of bits needed to represent the above
information. The process involved is generally referred to as compression. The intermediate
medium could either be data storage or a communication/ computer network. If the compression and
decompression process induce no information loss, the compression scheme is lossless; otherwise, it
is lossy.

A general data compression scheme in lossless algorithm

Input Encoder Decoder output


Storage
data (compression or (decompression
data
) networks )

If the total number of bits required to represent the data before compression is B0 and the
total number of bits required to represent the data after compression is B1, then we define the
compression ratio as
compression ratio =B0/B1

the compression ratio is much larger than 1.0. the higher the compression ratio, the better the
lossless compression scheme, as long as it is computational feasible.

12
Lossy Algorithm
Image compression is in multimedia application, where a higher compression ratio is required, lossy
methods are usually adopted. Lossless compression ratio technique is low when the image
histogram is relatively flat. For this we have to use lossy compression. In lossy compression, the
compress image is usually not the same as the original image but is meant to form a close
approximation to the original image perceptually. To quantitatively describe how close the
approximation is to original data, some form of distortion measure is required.
Lossless vs. Lossy compression:
In lossless compression schemes, the reconstructed image, after compression, is numerically
identical to the original image. However lossless compression can only a achieve a modest amount
of compression. An image reconstructed following lossy compression contains degradation relative
to the original. Often this is because the compression scheme completely discards redundant
information. However, lossy schemes are capable of achieving much higher compression. Under
normal viewing conditions, no visible loss is perceived (visually lossless).

13
CHAPTER 6
COMPRESSION METHODS USED FOR IMAGE COMPRESSION

Lossy/Lossless data compression in Image Processing try to eliminate the spatial redundancies
Example of coding techniques are: -
Huffman coding: -
This method was first introduced by David A. Huffman in a 1952, this was attracted an
overwhelming amount of research and has been adopted in many important and/or commercial
application, such as fax machines, JPEG, and MEPG.
The encoding steps of the Huffman coding described in bottom-up manner.

Step 1: ---------------------------------------------------------------------
1. Sort the gray levels by decreasing probability.

2. Add the two smallest probabilities.


3. Sort the new value into the list.
4. Repeat until only two probabilities remain.
Step 2: ---------------------------------------------------------------------
1. Give the code 0 to the highest probability, and the code 1 to the lowest probability in the
present node.
2. Go backwards through the tree and add 0 to the highest and 1 to the lowest probability
in each node until all gray levels have a unique code
Example Huffman coding: -------------------------------------------

14
Huffman code of original image

15
Example of Huffman coding

Example of Huffman coding

The Huffman code

• The Huffman code results in unambiguous code.

• The code is reversible without loss.

16
• The table for the translation of the code has to be stored together with the coded image.

• The Huffman code does not take correlation between adjacent pixels into consideration.

Run-length coding

Instead of assuming a memoryless source, run-length coding (RLC) exploits memory


present in the information source. It is one of the simplest forms of the data compression.
The basic idea is that if the information source we wish to compress has the property that
symbols tend to form continuous groups, instead of coding each symbol in the group
individually, we can code one such symbol and the length of the group.

• E.g.,
56 56 56 82 82 82 83 80
56 56 56 56 56 80 80 80
creates the run-length code (56, 3) (82, 3) (83, 1) (80, 4) (56, 5).
• The code is calculated row by row.

• Very efficient coding for binary data.


• Important to know position, and the image dimensions must be stored with the coded image
Used in most fax machines

17
Example of Run-length coding: ------------------------------------------

Run-length coding

• Compression Achieved
• Original image requires 3 bits per pixel (in total - 8x8x3=192 bits).
• Compressed image has 29 runs and needs 3+3=6 bits per

18
run (in total - 174 bits or 2.72 bits per pixel).

19
CHAPTER 7
SOME COMMON IMAGE FORMATS

• JPEG Joint Photographic Experts Group - Exists in many different versions but is always
some kind of transformation coding. JPEG is not reversible due to quantification.

The JPEG standard supports numerous modes(variations). Some of the


commonly used ones are:
 Sequential Mode
 Progressive Mode
 Hierarchical Mode
 Lossless Mode

Sequential Mode
This is the default JPEG mode. Each gray-level image or color image component is
encoded in a single left- to-right, top-to-bottom scan. We implicitly assume this mode in the
discussion so far. The” Motion JPEG” video code uses Baseline Sequential JPEG, applied to
each image frame in the video.
Progressive Mode
Progressive JPEG Mode delivers low quality versions of the image quickly, followed
by higher quality passes, and has become widely supported in web browser s. such multiple
scans of images are of course most useful when the speed of the communication line is low. In
Progressive Mode, the first few scans carry only a few bits and deliver a rough picture what is to
follow. After each additional scan, more data is received, and image quality is gradually
enhanced.
Hierarchical Mode
Hierarchical JPEG Mode encodes the image in a hierarchy of several different
resolutions. The encoded image at the lowest resolution is basically compressed low-pass-
filtered image, whereas the images at successively higher resolutions provide additional details.

20
Three level hierarchical JPEG encoder is: -
1. Reduction of image resolution
2. Compress low-resolution image f4
3. Compress difference image d2 & d1

Three level hierarchical JPEG coder


1. Decompress the encoded low-resolution image F4
2. Restore image f2 at the intermediate resolution
3. Restore image f at the original resolution

Lossless Mode
Lossless JPEG is a very special case of JPEG which indeed has no loss in its image
quality. It is rarely used, since its compression ratio is very low compared to other, lossy modes. On
the other hand, it meets a special need, and the newly developed JPEG-LS standard is specifically
aimed at lossless image compression.

Start_of__mag

4-step process are used in JPEG Image Compression


1. Transforming RGB to YIQ/YUV, separating intensity from color
2. Identifying redundant data using a Discrete Cosine Transformation (DCT)
3. Quantizing remaining data
4. Encoding the result to minimize storage requirements
Example of JPEG compression

21
MPEG
The Moving Pictures Experts Group (MPEG) was established in 1988 to create standard for delivery
of digital video and audio. Membership grew from about 25 experts in 1988 to a community of
more than 350, from about 200 companies and organization. It is appropriately recognized that
proprietary interests need to be maintained within the family of MPEG standards.
MPEG introduces a third frame type- B-frames – and their accompanying bidirectional
motion compression. If both directional is successful, two motion vector will be sent, and the two
corresponding matching macroblocks are averaged before comparing to the target macroblock for
generating the prediction error. the MPEG encoder and decoder cannot work for any macroblock fro
B-frame without its succeeding P or I-frame, the actual coding and transmission order is different
from the display order of the video.

22
CONCLUSION

 Image compression is important.


 Image compression has come a long way.
 Image compression is nearly mature, but there is always room for improvement.

23

You might also like