Chapter 4 DIP

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

Chapter-4

Image Compression
Basic definition of image compression
 Image compression is a process applied to a graphics file to
minimize its size in bytes without degrading image quality
below an acceptable threshold.
 By reducing the file size, more images can be stored in a given
amount of disk or memory space.
 Image compression is typically performed through an
image/data compression algorithm or codec.
Cont..
Typically such codecs/algorithms apply different techniques
to reduce the image size, such as by:
 Specifying all similarly colored pixels by the color
name, code and the number of pixels. This way one
pixel can correspond to hundreds or thousands of
pixels.
 The image is created and represented using
mathematical wavelets.
 Splitting the image into several parts, each identifiable
using a fractal.
Cont..
 In the field of Image processing, the compression of
images is an important step before we start the processing
of larger images or videos.
 The compression of images is carried out by an encoder
and output a compressed form of an image.
 In the processes of compression, the mathematical
transforms play a vital role.
Data Compression Techniques
Two major types of image compression: lossless and lossy
compression.
1. Lossless compression:
 The compressed image file can be restored to its original form
perfectly.
 in lossless compression, the data is transformed through
encoding, and its size is reduced.
 It achieves data reduction without any loss of information,
thus named "lossless".
 Lossless Compression is used in Text, images, sound.
Cont..
 Formats that utilize lossless compression include PNG, ZIP,
GIF and TIFF.
 Algorithms used in Lossless compression are Huffman Coding,
Arithmetic encoding etc.
 Lossless Compression does not compromise the data’s quality.
 Lossless Compression is also termed as reversible
compression.
2. Lossy compression:
 In lossy, the insignificant piece of data is removed to reduce
the size
 This method provides even greater data reduction rates. It
eliminates redundant or unnecessary information, resulting in
the loss of some data in the process.
 This technique is useful when the loss of data does not greatly
affect the quality of the image.
 Lossy compression is used in images, audio, video.
 Image formats using include JPG, MP3, AAC.
 In Lossy compression, Data’s quality is compromised.
 Algorithms used in Lossy compression are: Transform
coding, Discrete Cosine Transform, fractal compression etc.
 Lossy Compression is also termed as irreversible compression.
Types Of Data Compression
There are four different types of data compression:
 Text compression—primarily uses codes or symbols for patterns and
redundancies; reduces overall size, but information remains unaltered.
 Audio compression—eliminates noise to shrink file sizes, but
reduces overall quality.
 Image compression—similar to text compression; replaces repeated
color patterns using codes to reduce size.
 Video compression—a combination of audio and image
compression, removes unwanted images and background noise to
reduce overall size at the expense of quality.
A flow chart of the process of the compression of the image can be
represented as:

There are several advantages of using the different data


compression techniques.
 Reduces the disk space occupied by the file.
 Reading and Writing of files can be done quickly.
 Increases the speed of transferring files through the
internet and other networks.
Data redundancy
 In digital image processing, data redundancy refers to the storage
of extra information to represent a quantity of information.
 redundancy of data on digital images we know that computer
store the images in pixel values so sometimes image has
duplicate pixel values or maybe if we remove some of the pixel
values they don’t affect the information of an actual image.
 Data Redundancy is one of the fundamental component of Data
Compression.
 The Data Compression refers to the process of reducing the
amount of data required to represent a given quantity of
information. We know that one common characteristic followed
by all the images is the neighboring of pixels and all the pixels
are correlated to each other so there is a chance of existing
redundant information.
Cont..
 In the context of neighboring pixels, there are three types of
redundancies in images pixels:
Spatial redundancy: Correlation between the neighboring
pixel values.
Spectral redundancy: Correlation between different color
planes or spectral bands.
Temporal redundancy: Correlation between adjacent
frames in the sequence of image.
Cont..
 To understand Image redundancy or data redundancy in digital
image processing lets look at the example. Let assume that 2
people Ramswarup and Suresh said a story. Suresh said the
story in fewer words compare to Ramswarup where
Ramswarup took too many words to said the same story. So
either Ramswarup said un-relevant information/data which are
not the part of the story or maybe he repeated his words more
than once.
Bit-plane slicing
 Bit-plane slicing is a method of representing an image with one
or more bits of byte used for each pixel.
 bit plane slicing can involve dividing each pixel by a certain
number of bits.
 For a 8 bit image ,0 is encoded as 00000000 and 255 is
encoded as 11111111.
 Any number between 0 to 255 is encoded as one byte.
Cont..
 In most cases, the bit in the far left side called the Most
Significant Bit (MSB).
 MSB is a high bit-plane is
 In most cases, The bit in the far right is called Least
Significant Bit (LSB).
 LSB a low bit-plane
 As such, each bit plane descending from MSB to LSB
contributes little to the overall details presented in the photo.
Eg.1

Eg.2
The main goals of bit plane slicing
The three main goals of bit plane slicing is:
 Converting a gray level image to a binary image.
 Representing an image with fewer bits and corresponding
the image to a smaller size
 Enhancing the image by focusing.

You might also like