SlideShare a Scribd company logo
1 of 44
FOLLOWING SLIDES ARE PRESENTED TO YOU
BY
CONCEPTSINDEPTHANDEASY !
HAPPY LEARNING : )
https://www.youtube.com/channel/UCJPZjYLPApIZokATpjj5HZg
IMAGE
COMPRESSIO
N
FUNDAMENTALS
 Data compression: it refers to the process of reducing the
amount of data required to represent a given quantity of
information.
Data vs information
 Data and information are not synonymous terms!
 Data is the means by which information is conveyed.
DATA VS INFORMATION (CONT’D)
 The same information can be represented by different amount
of data – for example:
Example 1: your brother, rohit, will meet you at IGI airport in new
delhi at 5 minutes past 6:00 pm tomorrow night
Example 2: your brother will meet you at IGI airport at 5 minutes
past 6:00 pm tomorrow night
Example 3: rohit will meet you at IGI at 6:00 pm tomorrow night
DATA ≠ INFORMATION
 Data compression aims to reduce the amount of data
while preserving as much information as possible.
 Because various amount of data can be used to
represent the same amount of information,
representations that contain irrelevant or repeated
information are said to contain redundant data.
INTRODUCTION
To understand the need for image compression, consider the following
scenario:
Person ABC wish to downloaded the x-men movie in 720𝑝 (1280 × 720)
format. The movie is of 2 hours duration and was recorded at 60 𝑓𝑝𝑠 (frames
per second).
1. Calculate the amount of storage it would require to store this movie?
2. How many dual layer blu-ray disk would be required to store this movie??
3. How much time would it take to transmit this video over broadband
connection having bandwidth capacity of 100 Mbps??
INTRODUCTION
A VIDEO IS A SEQUENCE OF VIDEO FRAMES WHERE EACH FRAME IS A FULL
COLOR STILL IMAGE.
STORAGE REQUIREMENT OF 1SEC OF VIDEO:
1 FRAME IS ONE RGB IMAGE  3 B
VIDEO FRAME  1280 X 720 X 3 B
60FPS × 1280 × 720 PPF × 3B ≈ 158.2 MB
FPS – FRAMES PER SECOND,
PPF – PIXELS PER FRAME,
B – BYTES PER PIXEL
STORAGE REQUIREMENT OF COMPLETE 2 HOUR MOVIE:
158.2 × 60 × 60 × 2 ≈ 1113GB
INTRODUCTION
Number of blu-ray disks required:
1113/50 = 23
Time required to transmit complete 2 hour movie:
100 Mbps  100 Mb in 1 sec
100 x 1024 x 1024 bits  1 sec
1113 x 1024 x 1024 x 1024 x 8 bits 
1113×1024×1024×1024×8
100×1024x1024
≈ 25.33 hours
This explains the power and need of image compression.
We need to do Image Compression, so that
• No. of discs rq  less (STORAGE)
• Transmission time rq  less
INTRODUCTION
Web page images & high-resolution digital camera photos are
also compressed to save storage space & reduce transmission time.
In addition to these applications, image compression plays an
important role in many other areas, including
Tele-video conferencing,
Remote sensing,
Document and medical imaging,
Fax transmission
INTRODUCTION
INTRODUCTION
 Image compression: it is the art & science of reducing
the amount of data required to represent an image.
 The number of images that are compressed and
decompressed daily is staggering, and the compressions
and decompressions themselves are virtually invisible
to the user.
 Anyone who owns a digital camera, surfs the web, or
watches the latest hollywood movies (on dvds or yify
torrents) benefits from the compression algorithms
DATA VS INFORMATION EXAMPLE
 In terms of an image, information corresponds to the object captured in the
image, their shape, their color etc.
 The different ways to represent this information can be either:
Through pixel intensities (spatial domain) (basic), or
Through extracting features of that image (higher level of
information e.g. edge image.. Edge out of prev image), or
Through simply noting the frequencies of the intensity values
existing in the image along with their location (frequency domain),
etc.
COMPRESSION RATIO
compression
Let 𝑛1 and 𝑛2 denote the number of bits in
two representations of the same information
COMPRESSION RATIO
RELATIVE DATA REDUNDANCY OF THE
REPRESENTATION WITH 𝑛1 BITS
𝑅 = 1 −
1
𝐶
COMPRESSION RATIO
𝐶 =
𝑛1
𝑛2
COMPRESSION RATIO
 Image compression involves reducing the size of image data files,
while retaining necessary information
 Retaining necessary information depends upon the application
 The reduced file created by the compression process is called the
compressed file and is used to reconstruct the image, resulting in
the decompressed image
 The original image, before any compression is performed, is called
the uncompressed image file
 The ratio of the original, uncompressed image file and the
compressed file is referred to as the compression ratio
TYPES OF DATA REDUNDANCY
 Three principal types of data redundancies that can be
identified and exploited in digital images
1. Coding redundancy
2. Spatial or temporal (interpixel) redundancy
3. Psychovisual redundancy (irrelevant information)
 Data compression attempts to reduce one or more of
these redundancy types.
CODING REDUNDANCY
The 8-bit codes that are used
to represent the intensities in
most 2-D intensity arrays
contain more bits than are
needed to represent the
intensities.
Because, we go for uniform coding,
in general.
We can solve the problem by variable
length coding.
SPATIAL OR TEMPORAL (INTERPIXEL)
REDUNDANCY
Related to 2D Sxy (image)
Consider the following image of size 256 × 256. In the corresponding 2-D
image:
256, 255
256, 0
256, 1
Interpixel redundancy implies that pixel values are correlated
(i.e., A pixel value can be reasonably predicted by its neighbors).
Spatial
Related to 3D (videos)
Tempora
l
Y
X t (Z)
frame is moving w.r.t time
(t)
refresh rate = 60 fps
At same coordinate (x,y)
and diff times say t1, t2,
t3,…. that intensity remains
same
t1 t2
PSYCHOVISUAL REDUNDANCY
(irrelevant information)
Most images contain information that is
ignored by the human visual system and/or
irrelevant to the intended use of the image. It
is redundant in the sense that it is not used.
CODING - DEFINITIONS
 Code: a list of symbols (letters, numbers, bits etc.)
 Code word: a sequence of symbols used to represent some
information (e.g., Gray levels).
 Code word length: number of symbols in a code word.
CODE CODE WORD
CODING REDUNDANCY
 𝑟𝑘  Input Intensity Value e.g. 0 – 255 for grayscale image
 𝑙 𝑟𝑘  No. of bits used to represent 𝑟𝑘
 Then average no of bits required to represent each pixel is
𝐿𝑎𝑣𝑔 =
𝑘=0
𝐿−1
𝑙(𝑟𝑘) 𝑝𝑟(𝑟𝑘)
Say, uniform width str. (all pixels are using 8 bits to represent intensity)
 equal length code (fixed length code)
 m-bit fixed length code (8 bit fixed length code in our case)
CODING REDUNDANCY
 In this case, 𝑙 𝑟𝑘 = 8 [each rq. 8 bits in fixed length]
𝐿𝑎𝑣𝑔 = 8
𝑘=0
𝐿−1
𝑝𝑟(𝑟𝑘) = 8 ∗ 1 = 8
 Coding redundancy tries to reduce 𝐿𝑎𝑣𝑔
 Thus, total no. of bits required to represent an 𝑀 × 𝑁 image is 𝑀𝑁𝐿𝑎𝑣𝑔
 The code can be an equal length code, or variable length code.
CODING REDUNDANCY
Code 1  equal length code
Code 2  variable length
code
(obt by Huffman Coding)
Min bits  higher
probability
CODING REDUNDANCY
 For code 1, 𝐿𝑎𝑣𝑔 = 8
 On the other hand, using code 2, the average length of the
encoded pixels is
𝐿𝑎𝑣𝑔 = 0.25 2 + 0.47 1 + 0.25 3 + 0.03 3 = 1.81 bits
 The resulting compression and corresponding relative
redundancy are
𝐶 =
256 × 256 × 8
256 × 256 × 1.81
≈ 4.42
𝑅 = 1 −
1
4.42
= 0.774
Thus, 77.4% of the data
in the original 8-bit 2-D
intensity array is
redundant.
CODING REDUNDANCY
 Coding redundancy is present when the codes assigned to
intensity values do not take full advantage of their
probabilities of occurrence.
 The natural consequence is that, for most images, certain
intensities are more probable than others.
 A natural binary encoding assigns the same number of bits
to both the most and least probable values, failing to
minimize and resulting in coding redundancy.
MEASURING INFORMATION
A key question in image compression is:
• “What is the minimum amount of data that is sufficient to describe completely an image without
loss of information?”
• How do we measure the information content of an image?
• Lavg
• Entropy
• Measure of information
• Measure of amount of uncertainty
• More uncertainty
• More information
• More entropy
MEASURING INFORMATION (CONT’D)
• Information generation is a probabilistic process.
• A random event E with probability 𝑃(𝐸) contains:
𝐼 𝐸 = log
1
𝑃(𝐸)
= − log 𝑃 𝐸 units of information
Note: 𝐼(𝐸) = 0 when 𝑃(𝐸) = 1
HOW MUCH INFORMATION DOES A PIXEL CONTAIN?
• Suppose that gray level values are generated by a random process, then
𝑟𝑘 contains:
𝐼 𝑟𝑘 = − log 𝑃 𝑟𝑘 units of information
HOW MUCH INFORMATION DOES AN IMAGE
CONTAIN?
Average information content of an image:
units/pixel
(e.g., bits/pixel)
using
Entropy:
It is not possible to code the intensity values with fewer
than 𝐻 bits/pixel.
EXAMPLE OF COIN
• CASE 1
• Entropy = - (1/2) * log(1/2) - (1/2) * log(1/2)
= 1
• CASE 2
• Entropy = - (1) * log(1)
= 0
COIN
H T
H H
CASE 1
CASE 2
NOTE
Take log base
2
ENTROPY
• This defines the average amount of information
obtained by observing a single source output.
• As its magnitude increases, more uncertainty and thus
more information is associated with the source.
• When the probability of the occurrence of a symbol is
less, we require more information about the symbol.
REDUNDANCY - REVISITED
• REDUNDANCY:
where:
Note: if 𝐿𝑎𝑣𝑔 = 𝐻, then 𝑅 = 0 (no redundancy)
𝑅 =
𝐿𝑎𝑣𝑔 − 𝐻
𝐿𝑎𝑣𝑔
ENTROPY ESTIMATION EXAMPLE
Image
COMPRESSION
METHODS
HUFFMAN CODING
• A measure to reduce coding redundancy
• Most popular coding redundancy technique
• Variable length code
• Min length code is assigned to one with highest probability
Symbols
(like intensity
levels)
Probabilities
(sorted)
Source Reduction (do till two values are left)
(Maintain in sorted order here as well)
1 2 3 4
a2 0.4 0.4 0.4 0.4 0.6
a6 0.3 0.3 0.3 0.3 0.4
a1 0.1 0.1 0.2 0.3
a4 0.1 0.1 0.1
a3 0.06 0.1
a5 0.04
HUFFMAN CODING
Say, Image size: 10 x 10 (5 bit image)
Frequency:
a2 = 40 a6 = 30 a1 = 10 a4 = 10 a3 = 6 a5 = 4
P(a2) = 40/100 = 0.4
Symbols
(like intensity
levels)
Probabilities
(sorted)
Source Reduction (do till two values are left)
(Maintain in sorted order here as well)
1 2 3 4
a2 0.4 1 0.4 0.4 0.4 0.6 0
a6 0.3 00 0.3 0.3 0.3 00 0.4 1
a1 0.1 011 0.1 0.2 010 0.3 01
a4 0.1 0100 0.1 0100 0.1 011
a3 0.06 01010 0.1 0101
a5 0.04 01011
Encoded String: 010100111100
Decoding : a3 a1a2 a2 a6
Parameters:
1. Average length of code
Lavg = 0.4 * 1 + 0.3 * 2 + 0.1 * 3 + 0.1 * 4 + 0.06 * 5 + 0.04 * 5 = 2.2 bits/symbol
2. Total no. of bits to be transmitted
10 * 10 * 2.2 = 220 bits
3. Entropy = 2.1396/symbol
4. How much you saved = 10 * 10 * 5 – 10 * 10 * 2.2 = 0.56 = 56%
10 * 10 * 5
HUFFMAN CODING
• Let an 8-level image has the gray-level distribution as
𝒓𝒌 𝒑 𝒓𝒌 𝑪𝒐𝒅𝒆 𝟏 𝑪𝒐𝒅𝒆 𝟐
0 0.19 000
1 0.25 001
2 0.21 010
3 0.16 011
4 0.08 100
5 0.06 101
6 0.03 110
7 0.02 111
WHY CAN’T WE ASSIGN RANDOM CODES?
• Decoding (examine string left to right)
HUFFMAN CODING : COMPLEX EXAMPLE
IMAGE
SYMBOL FREQUENCY PROBABILITY
(FREQUENCY/2
5)
0 2 0.08
1 4 0.16
2 3 0.12
3 6 0.24
4 3 0.12
5 2 0.08
6 2 0.08
7 3 0.12
SYMBOL CODE PROBAB
0 111 0.08
1 000 0.16
2 100 0.12
3 01 0.24
4 101 0.12
5 0010 0.08
6 0011 0.08
7 110 0.12
Lavg = 2.92 bits/symbol
Entropy (H) = 2.892878689 bits/symbol
IF YOU GENUINELY FIND THESE VIDEOS
HELPFUL
KINDLY LIKE, SHARE, SUBSCRIBE
HAPPY LEARNING : )
CONCEPTSINDEPTHANDEASY !
https://www.youtube.com/channel/UCJPZjYLPApIZokATpjj5HZg

More Related Content

Similar to Image_Compression_Slide_Set_1.pptx

PIXEL SIZE REDUCTION LOSS-LESS IMAGE COMPRESSION ALGORITHM
PIXEL SIZE REDUCTION LOSS-LESS IMAGE COMPRESSION ALGORITHMPIXEL SIZE REDUCTION LOSS-LESS IMAGE COMPRESSION ALGORITHM
PIXEL SIZE REDUCTION LOSS-LESS IMAGE COMPRESSION ALGORITHMijcsit
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniquesDeep Bhatt
 
IRJET-Lossless Image compression and decompression using Huffman coding
IRJET-Lossless Image compression and decompression using Huffman codingIRJET-Lossless Image compression and decompression using Huffman coding
IRJET-Lossless Image compression and decompression using Huffman codingIRJET Journal
 
Seminar Report on image compression
Seminar Report on image compressionSeminar Report on image compression
Seminar Report on image compressionPradip Kumar
 
Low Complex-Hierarchical Coding Compression Approach for Arial Images
Low Complex-Hierarchical Coding Compression Approach for Arial ImagesLow Complex-Hierarchical Coding Compression Approach for Arial Images
Low Complex-Hierarchical Coding Compression Approach for Arial ImagesIDES Editor
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.pptHarisMasood20
 
Digital image compression techniques
Digital image compression techniquesDigital image compression techniques
Digital image compression techniqueseSAT Publishing House
 
Digital image compression techniques
Digital image compression techniquesDigital image compression techniques
Digital image compression techniqueseSAT Journals
 
Why Image compression is Necessary?
Why Image compression is Necessary?Why Image compression is Necessary?
Why Image compression is Necessary?Prabhat Kumar
 
ImageCompression.ppt
ImageCompression.pptImageCompression.ppt
ImageCompression.pptdudoo1
 
ImageCompression.ppt
ImageCompression.pptImageCompression.ppt
ImageCompression.pptssuser6d1fca
 
Image compression
Image compressionImage compression
Image compressionHuda Seyam
 
Iaetsd performance analysis of discrete cosine
Iaetsd performance analysis of discrete cosineIaetsd performance analysis of discrete cosine
Iaetsd performance analysis of discrete cosineIaetsd Iaetsd
 

Similar to Image_Compression_Slide_Set_1.pptx (20)

PIXEL SIZE REDUCTION LOSS-LESS IMAGE COMPRESSION ALGORITHM
PIXEL SIZE REDUCTION LOSS-LESS IMAGE COMPRESSION ALGORITHMPIXEL SIZE REDUCTION LOSS-LESS IMAGE COMPRESSION ALGORITHM
PIXEL SIZE REDUCTION LOSS-LESS IMAGE COMPRESSION ALGORITHM
 
Compressionbasics
CompressionbasicsCompressionbasics
Compressionbasics
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniques
 
www.ijerd.com
www.ijerd.comwww.ijerd.com
www.ijerd.com
 
IRJET-Lossless Image compression and decompression using Huffman coding
IRJET-Lossless Image compression and decompression using Huffman codingIRJET-Lossless Image compression and decompression using Huffman coding
IRJET-Lossless Image compression and decompression using Huffman coding
 
Seminar Report on image compression
Seminar Report on image compressionSeminar Report on image compression
Seminar Report on image compression
 
Low Complex-Hierarchical Coding Compression Approach for Arial Images
Low Complex-Hierarchical Coding Compression Approach for Arial ImagesLow Complex-Hierarchical Coding Compression Approach for Arial Images
Low Complex-Hierarchical Coding Compression Approach for Arial Images
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.ppt
 
Presentation on Image Compression
Presentation on Image Compression Presentation on Image Compression
Presentation on Image Compression
 
Digital image compression techniques
Digital image compression techniquesDigital image compression techniques
Digital image compression techniques
 
Digital image compression techniques
Digital image compression techniquesDigital image compression techniques
Digital image compression techniques
 
Image compression
Image compressionImage compression
Image compression
 
Why Image compression is Necessary?
Why Image compression is Necessary?Why Image compression is Necessary?
Why Image compression is Necessary?
 
ImageCompression.ppt
ImageCompression.pptImageCompression.ppt
ImageCompression.ppt
 
ImageCompression.ppt
ImageCompression.pptImageCompression.ppt
ImageCompression.ppt
 
akashreport
akashreportakashreport
akashreport
 
Image compression
Image compressionImage compression
Image compression
 
Iaetsd performance analysis of discrete cosine
Iaetsd performance analysis of discrete cosineIaetsd performance analysis of discrete cosine
Iaetsd performance analysis of discrete cosine
 
H0144952
H0144952H0144952
H0144952
 
Data compression
Data  compressionData  compression
Data compression
 

Recently uploaded

Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physicsvishikhakeshava1
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 
Caco-2 cell permeability assay for drug absorption
Caco-2 cell permeability assay for drug absorptionCaco-2 cell permeability assay for drug absorption
Caco-2 cell permeability assay for drug absorptionPriyansha Singh
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsSérgio Sacani
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxSwapnil Therkar
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCEPRINCE C P
 
Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfmuntazimhurra
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)PraveenaKalaiselvan1
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfnehabiju2046
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bSérgio Sacani
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptMAESTRELLAMesa2
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRDelhi Call girls
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 

Recently uploaded (20)

Work, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE PhysicsWork, Energy and Power for class 10 ICSE Physics
Work, Energy and Power for class 10 ICSE Physics
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
Caco-2 cell permeability assay for drug absorption
Caco-2 cell permeability assay for drug absorptionCaco-2 cell permeability assay for drug absorption
Caco-2 cell permeability assay for drug absorption
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
 
Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdf
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdf
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.ppt
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 

Image_Compression_Slide_Set_1.pptx

  • 1. FOLLOWING SLIDES ARE PRESENTED TO YOU BY CONCEPTSINDEPTHANDEASY ! HAPPY LEARNING : ) https://www.youtube.com/channel/UCJPZjYLPApIZokATpjj5HZg
  • 3. FUNDAMENTALS  Data compression: it refers to the process of reducing the amount of data required to represent a given quantity of information. Data vs information  Data and information are not synonymous terms!  Data is the means by which information is conveyed.
  • 4. DATA VS INFORMATION (CONT’D)  The same information can be represented by different amount of data – for example: Example 1: your brother, rohit, will meet you at IGI airport in new delhi at 5 minutes past 6:00 pm tomorrow night Example 2: your brother will meet you at IGI airport at 5 minutes past 6:00 pm tomorrow night Example 3: rohit will meet you at IGI at 6:00 pm tomorrow night
  • 5. DATA ≠ INFORMATION  Data compression aims to reduce the amount of data while preserving as much information as possible.  Because various amount of data can be used to represent the same amount of information, representations that contain irrelevant or repeated information are said to contain redundant data.
  • 6. INTRODUCTION To understand the need for image compression, consider the following scenario: Person ABC wish to downloaded the x-men movie in 720𝑝 (1280 × 720) format. The movie is of 2 hours duration and was recorded at 60 𝑓𝑝𝑠 (frames per second). 1. Calculate the amount of storage it would require to store this movie? 2. How many dual layer blu-ray disk would be required to store this movie?? 3. How much time would it take to transmit this video over broadband connection having bandwidth capacity of 100 Mbps??
  • 7. INTRODUCTION A VIDEO IS A SEQUENCE OF VIDEO FRAMES WHERE EACH FRAME IS A FULL COLOR STILL IMAGE. STORAGE REQUIREMENT OF 1SEC OF VIDEO: 1 FRAME IS ONE RGB IMAGE  3 B VIDEO FRAME  1280 X 720 X 3 B 60FPS × 1280 × 720 PPF × 3B ≈ 158.2 MB FPS – FRAMES PER SECOND, PPF – PIXELS PER FRAME, B – BYTES PER PIXEL STORAGE REQUIREMENT OF COMPLETE 2 HOUR MOVIE: 158.2 × 60 × 60 × 2 ≈ 1113GB
  • 8. INTRODUCTION Number of blu-ray disks required: 1113/50 = 23 Time required to transmit complete 2 hour movie: 100 Mbps  100 Mb in 1 sec 100 x 1024 x 1024 bits  1 sec 1113 x 1024 x 1024 x 1024 x 8 bits  1113×1024×1024×1024×8 100×1024x1024 ≈ 25.33 hours
  • 9. This explains the power and need of image compression. We need to do Image Compression, so that • No. of discs rq  less (STORAGE) • Transmission time rq  less
  • 10. INTRODUCTION Web page images & high-resolution digital camera photos are also compressed to save storage space & reduce transmission time. In addition to these applications, image compression plays an important role in many other areas, including Tele-video conferencing, Remote sensing, Document and medical imaging, Fax transmission
  • 12. INTRODUCTION  Image compression: it is the art & science of reducing the amount of data required to represent an image.  The number of images that are compressed and decompressed daily is staggering, and the compressions and decompressions themselves are virtually invisible to the user.  Anyone who owns a digital camera, surfs the web, or watches the latest hollywood movies (on dvds or yify torrents) benefits from the compression algorithms
  • 13. DATA VS INFORMATION EXAMPLE  In terms of an image, information corresponds to the object captured in the image, their shape, their color etc.  The different ways to represent this information can be either: Through pixel intensities (spatial domain) (basic), or Through extracting features of that image (higher level of information e.g. edge image.. Edge out of prev image), or Through simply noting the frequencies of the intensity values existing in the image along with their location (frequency domain), etc.
  • 14. COMPRESSION RATIO compression Let 𝑛1 and 𝑛2 denote the number of bits in two representations of the same information
  • 15. COMPRESSION RATIO RELATIVE DATA REDUNDANCY OF THE REPRESENTATION WITH 𝑛1 BITS 𝑅 = 1 − 1 𝐶 COMPRESSION RATIO 𝐶 = 𝑛1 𝑛2
  • 16. COMPRESSION RATIO  Image compression involves reducing the size of image data files, while retaining necessary information  Retaining necessary information depends upon the application  The reduced file created by the compression process is called the compressed file and is used to reconstruct the image, resulting in the decompressed image  The original image, before any compression is performed, is called the uncompressed image file  The ratio of the original, uncompressed image file and the compressed file is referred to as the compression ratio
  • 17. TYPES OF DATA REDUNDANCY  Three principal types of data redundancies that can be identified and exploited in digital images 1. Coding redundancy 2. Spatial or temporal (interpixel) redundancy 3. Psychovisual redundancy (irrelevant information)  Data compression attempts to reduce one or more of these redundancy types.
  • 18. CODING REDUNDANCY The 8-bit codes that are used to represent the intensities in most 2-D intensity arrays contain more bits than are needed to represent the intensities. Because, we go for uniform coding, in general. We can solve the problem by variable length coding.
  • 19. SPATIAL OR TEMPORAL (INTERPIXEL) REDUNDANCY Related to 2D Sxy (image) Consider the following image of size 256 × 256. In the corresponding 2-D image: 256, 255 256, 0 256, 1 Interpixel redundancy implies that pixel values are correlated (i.e., A pixel value can be reasonably predicted by its neighbors). Spatial Related to 3D (videos) Tempora l Y X t (Z) frame is moving w.r.t time (t) refresh rate = 60 fps At same coordinate (x,y) and diff times say t1, t2, t3,…. that intensity remains same t1 t2
  • 20. PSYCHOVISUAL REDUNDANCY (irrelevant information) Most images contain information that is ignored by the human visual system and/or irrelevant to the intended use of the image. It is redundant in the sense that it is not used.
  • 21. CODING - DEFINITIONS  Code: a list of symbols (letters, numbers, bits etc.)  Code word: a sequence of symbols used to represent some information (e.g., Gray levels).  Code word length: number of symbols in a code word. CODE CODE WORD
  • 22. CODING REDUNDANCY  𝑟𝑘  Input Intensity Value e.g. 0 – 255 for grayscale image  𝑙 𝑟𝑘  No. of bits used to represent 𝑟𝑘  Then average no of bits required to represent each pixel is 𝐿𝑎𝑣𝑔 = 𝑘=0 𝐿−1 𝑙(𝑟𝑘) 𝑝𝑟(𝑟𝑘) Say, uniform width str. (all pixels are using 8 bits to represent intensity)  equal length code (fixed length code)  m-bit fixed length code (8 bit fixed length code in our case)
  • 23. CODING REDUNDANCY  In this case, 𝑙 𝑟𝑘 = 8 [each rq. 8 bits in fixed length] 𝐿𝑎𝑣𝑔 = 8 𝑘=0 𝐿−1 𝑝𝑟(𝑟𝑘) = 8 ∗ 1 = 8  Coding redundancy tries to reduce 𝐿𝑎𝑣𝑔  Thus, total no. of bits required to represent an 𝑀 × 𝑁 image is 𝑀𝑁𝐿𝑎𝑣𝑔  The code can be an equal length code, or variable length code.
  • 24. CODING REDUNDANCY Code 1  equal length code Code 2  variable length code (obt by Huffman Coding) Min bits  higher probability
  • 25. CODING REDUNDANCY  For code 1, 𝐿𝑎𝑣𝑔 = 8  On the other hand, using code 2, the average length of the encoded pixels is 𝐿𝑎𝑣𝑔 = 0.25 2 + 0.47 1 + 0.25 3 + 0.03 3 = 1.81 bits  The resulting compression and corresponding relative redundancy are 𝐶 = 256 × 256 × 8 256 × 256 × 1.81 ≈ 4.42 𝑅 = 1 − 1 4.42 = 0.774 Thus, 77.4% of the data in the original 8-bit 2-D intensity array is redundant.
  • 26. CODING REDUNDANCY  Coding redundancy is present when the codes assigned to intensity values do not take full advantage of their probabilities of occurrence.  The natural consequence is that, for most images, certain intensities are more probable than others.  A natural binary encoding assigns the same number of bits to both the most and least probable values, failing to minimize and resulting in coding redundancy.
  • 27. MEASURING INFORMATION A key question in image compression is: • “What is the minimum amount of data that is sufficient to describe completely an image without loss of information?” • How do we measure the information content of an image? • Lavg • Entropy • Measure of information • Measure of amount of uncertainty • More uncertainty • More information • More entropy
  • 28. MEASURING INFORMATION (CONT’D) • Information generation is a probabilistic process. • A random event E with probability 𝑃(𝐸) contains: 𝐼 𝐸 = log 1 𝑃(𝐸) = − log 𝑃 𝐸 units of information Note: 𝐼(𝐸) = 0 when 𝑃(𝐸) = 1
  • 29. HOW MUCH INFORMATION DOES A PIXEL CONTAIN? • Suppose that gray level values are generated by a random process, then 𝑟𝑘 contains: 𝐼 𝑟𝑘 = − log 𝑃 𝑟𝑘 units of information
  • 30. HOW MUCH INFORMATION DOES AN IMAGE CONTAIN? Average information content of an image: units/pixel (e.g., bits/pixel) using Entropy: It is not possible to code the intensity values with fewer than 𝐻 bits/pixel.
  • 31. EXAMPLE OF COIN • CASE 1 • Entropy = - (1/2) * log(1/2) - (1/2) * log(1/2) = 1 • CASE 2 • Entropy = - (1) * log(1) = 0 COIN H T H H CASE 1 CASE 2 NOTE Take log base 2
  • 32. ENTROPY • This defines the average amount of information obtained by observing a single source output. • As its magnitude increases, more uncertainty and thus more information is associated with the source. • When the probability of the occurrence of a symbol is less, we require more information about the symbol.
  • 33. REDUNDANCY - REVISITED • REDUNDANCY: where: Note: if 𝐿𝑎𝑣𝑔 = 𝐻, then 𝑅 = 0 (no redundancy) 𝑅 = 𝐿𝑎𝑣𝑔 − 𝐻 𝐿𝑎𝑣𝑔
  • 36. HUFFMAN CODING • A measure to reduce coding redundancy • Most popular coding redundancy technique • Variable length code • Min length code is assigned to one with highest probability
  • 37. Symbols (like intensity levels) Probabilities (sorted) Source Reduction (do till two values are left) (Maintain in sorted order here as well) 1 2 3 4 a2 0.4 0.4 0.4 0.4 0.6 a6 0.3 0.3 0.3 0.3 0.4 a1 0.1 0.1 0.2 0.3 a4 0.1 0.1 0.1 a3 0.06 0.1 a5 0.04 HUFFMAN CODING Say, Image size: 10 x 10 (5 bit image) Frequency: a2 = 40 a6 = 30 a1 = 10 a4 = 10 a3 = 6 a5 = 4 P(a2) = 40/100 = 0.4
  • 38. Symbols (like intensity levels) Probabilities (sorted) Source Reduction (do till two values are left) (Maintain in sorted order here as well) 1 2 3 4 a2 0.4 1 0.4 0.4 0.4 0.6 0 a6 0.3 00 0.3 0.3 0.3 00 0.4 1 a1 0.1 011 0.1 0.2 010 0.3 01 a4 0.1 0100 0.1 0100 0.1 011 a3 0.06 01010 0.1 0101 a5 0.04 01011 Encoded String: 010100111100 Decoding : a3 a1a2 a2 a6 Parameters: 1. Average length of code Lavg = 0.4 * 1 + 0.3 * 2 + 0.1 * 3 + 0.1 * 4 + 0.06 * 5 + 0.04 * 5 = 2.2 bits/symbol 2. Total no. of bits to be transmitted 10 * 10 * 2.2 = 220 bits 3. Entropy = 2.1396/symbol 4. How much you saved = 10 * 10 * 5 – 10 * 10 * 2.2 = 0.56 = 56% 10 * 10 * 5
  • 39. HUFFMAN CODING • Let an 8-level image has the gray-level distribution as 𝒓𝒌 𝒑 𝒓𝒌 𝑪𝒐𝒅𝒆 𝟏 𝑪𝒐𝒅𝒆 𝟐 0 0.19 000 1 0.25 001 2 0.21 010 3 0.16 011 4 0.08 100 5 0.06 101 6 0.03 110 7 0.02 111
  • 40. WHY CAN’T WE ASSIGN RANDOM CODES? • Decoding (examine string left to right)
  • 41. HUFFMAN CODING : COMPLEX EXAMPLE IMAGE SYMBOL FREQUENCY PROBABILITY (FREQUENCY/2 5) 0 2 0.08 1 4 0.16 2 3 0.12 3 6 0.24 4 3 0.12 5 2 0.08 6 2 0.08 7 3 0.12
  • 42.
  • 43. SYMBOL CODE PROBAB 0 111 0.08 1 000 0.16 2 100 0.12 3 01 0.24 4 101 0.12 5 0010 0.08 6 0011 0.08 7 110 0.12 Lavg = 2.92 bits/symbol Entropy (H) = 2.892878689 bits/symbol
  • 44. IF YOU GENUINELY FIND THESE VIDEOS HELPFUL KINDLY LIKE, SHARE, SUBSCRIBE HAPPY LEARNING : ) CONCEPTSINDEPTHANDEASY ! https://www.youtube.com/channel/UCJPZjYLPApIZokATpjj5HZg